blueprint-prp-execute
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/blueprint:prp-execute
/blueprint:prp-execute
Execute a PRP (Product Requirement Prompt) with systematic implementation, validation gates, TDD workflow, and quality assurance.
Usage:
/blueprint:prp-execute [prp-name]Prerequisites:
- PRP exists in
docs/prps/[prp-name].md - Confidence score >= 7 (if lower, suggest refinement)
/blueprint:prp-create
For detailed report templates, deferred items workflow, feature tracker sync, and error handling patterns, see REFERENCE.md.
执行PRP(Product Requirement Prompt,产品需求提示),包含系统化实现、验证关卡、TDD工作流和质量保证。
用法:
/blueprint:prp-execute [prp-name]前提条件:
- PRP已存在于
docs/prps/[prp-name].md - 置信度评分 >=7(若低于该值,建议使用进行优化)
/blueprint:prp-create
关于详细的报告模板、延期项工作流、功能跟踪器同步和错误处理模式,请查看REFERENCE.md。
When to Use This Skill
何时使用该技能
| Use this skill when... | Use alternative when... |
|---|---|
| Ready to implement a planned feature from a PRP | PRP is not yet ready (confidence < 7) |
| Want to execute with full validation and TDD workflow | Implementing ad-hoc features without documentation |
| Need feature tracker and GitHub issue tracking | Working on isolated bug fixes |
| Want automatic progress reporting and deferred items tracking | Quick prototyping without formal tracking |
| 适合使用本技能的场景... | 适合使用替代方案的场景... |
|---|---|
| 准备从PRP实现已规划的功能 | PRP尚未就绪(置信度 <7) |
| 希望通过完整的验证和TDD工作流执行 | 实现无文档记录的临时功能 |
| 需要功能跟踪器和GitHub问题跟踪 | 处理孤立的Bug修复 |
| 希望自动跟踪进度和延期项 | 无需正式跟踪的快速原型开发 |
Context
上下文
- PRP file path: !
find . -maxdepth 1 -name \'docs/prps/${1:-unknown}.md\' 2>/dev/null - PRP confidence score: !
grep -m1 "^confidence:" docs/prps/${1:-unknown}.md 2>/dev/null - Feature tracker enabled: !
test -f docs/blueprint/feature-tracker.json 2>/dev/null - Current branch: !
git rev-parse --abbrev-ref HEAD 2>/dev/null - Uncommitted changes: !
git status --porcelain 2>/dev/null
- PRP文件路径:!
find . -maxdepth 1 -name \'docs/prps/${1:-unknown}.md\' 2>/dev/null - PRP置信度评分:!
grep -m1 "^confidence:" docs/prps/${1:-unknown}.md 2>/dev/null - 功能跟踪器已启用:!
test -f docs/blueprint/feature-tracker.json 2>/dev/null - 当前分支:!
git rev-parse --abbrev-ref HEAD 2>/dev/null - 未提交的更改:!
git status --porcelain 2>/dev/null
Parameters
参数解析
Parse :
$ARGUMENTS- (required): Name of PRP file in
prp-name(without .md extension)docs/prps/- Example: → loads
feature-auth-oauth2docs/prps/feature-auth-oauth2.md
- Example:
解析:
$ARGUMENTS- (必填):
prp-name目录下PRP文件的名称(不含.md扩展名)docs/prps/- 示例:→ 加载
feature-auth-oauth2docs/prps/feature-auth-oauth2.md
- 示例:
Execution
执行流程
Execute the complete PRP implementation workflow:
执行完整的PRP实现工作流:
Step 1: Load and validate PRP
步骤1:加载并验证PRP
- Read PRP file:
docs/prps/{prp-name}.md - Extract confidence score from frontmatter
- If confidence < 7 → Error: "PRP confidence too low. Run to refine"
/blueprint:prp-create {prp-name} - If confidence >= 9 → Offer delegation: "This PRP has high confidence. Execute now (current session) or create work-order for delegation?"
- If work-order chosen → Run and exit
/blueprint:work-order --from-prp {prp-name} - If delegation to multiple subagents chosen → Create focused work-orders per module from Implementation Blueprint and exit
- If work-order chosen → Run
- Continue to Step 2 if executing now OR confidence 7-8
- Load all referenced ai_docs entries for context
- Parse Implementation Blueprint and create TodoWrite entries ordered by dependencies
- 读取PRP文件:
docs/prps/{prp-name}.md - 从前置元数据中提取置信度评分
- 若置信度 <7 → 错误提示:"PRP置信度过低。请运行进行优化"
/blueprint:prp-create {prp-name} - 若置信度 >=9 → 提供委托选项:"该PRP置信度较高。立即执行(当前会话)还是创建工单进行委托?"
- 若选择工单 → 运行并退出
/blueprint:work-order --from-prp {prp-name} - 若选择委托给多个子Agent → 根据实现蓝图为每个模块创建针对性工单并退出
- 若选择工单 → 运行
- 若选择立即执行,或置信度为7-8,则继续步骤2
- 加载所有相关的ai_docs条目以获取上下文
- 解析实现蓝图并按依赖顺序创建TodoWrite条目
Step 2: Establish baseline with validation gates
步骤2:通过验证关卡建立基线
Run pre-implementation validation gates (see REFERENCE.md) to establish clean starting state:
- Linting gate: - Expected: PASS
[command from PRP] - Existing tests gate: - Expected: PASS
[command from PRP]
If gates fail:
- Document existing issues
- Decide: fix first or proceed with note
- Continue when ready
运行实现前的验证关卡(参见REFERENCE.md)以建立干净的起始状态:
- 代码检查关卡:- 预期结果:通过
[PRP中指定的命令] - 现有测试关卡:- 预期结果:通过
[PRP中指定的命令]
若关卡未通过:
- 记录现有问题
- 决策:先修复问题还是附带说明继续执行
- 准备就绪后继续
Step 3: Execute TDD implementation cycle
步骤3:执行TDD实现周期
For each task in Implementation Blueprint:
-
RED phase: Write failing test matching PRP TDD Requirements
- Create test file if needed
- Run tests → Confirm FAILURE (test is meaningful)
-
GREEN phase: Implement minimal code to pass test
- Follow Codebase Intelligence patterns from PRP
- Apply patterns from ai_docs references
- Watch for Known Gotchas
- Run tests → Confirm SUCCESS
-
REFACTOR phase: Improve code while keeping tests green
- Extract common patterns
- Improve naming, add type hints
- Follow project conventions
- Run tests → Confirm PASS
- Run validation gates frequently (not just at end)
-
Mark progress: Update TodoWrite:
✅ Task N: [Description]
针对实现蓝图中的每个任务:
-
RED阶段:编写符合PRP中TDD要求的失败测试
- 若需要则创建测试文件
- 运行测试 → 确认失败(确保测试有实际意义)
-
GREEN阶段:实现最小化代码以通过测试
- 遵循PRP中的代码库智能模式
- 应用ai_docs引用中的模式
- 注意已知陷阱(Known Gotchas)
- 运行测试 → 确认成功
-
REFACTOR阶段:在保持测试通过的同时优化代码
- 提取通用模式
- 优化命名、添加类型提示
- 遵循项目规范
- 运行测试 → 确认通过
- 频繁运行验证关卡(而非仅在最后执行)
-
标记进度:更新TodoWrite:
✅ 任务N:[描述]
Step 4: Run comprehensive final validation
步骤4:运行全面的最终验证
Execute all validation gates from PRP (see REFERENCE.md):
- Linting: - Expected: PASS
[cmd] - Type checking: - Expected: PASS
[cmd] - Unit tests: - Expected: PASS (all tests)
[cmd] - Integration tests: - Expected: PASS (if applicable)
[cmd] - Coverage check: - Expected: Meets threshold
[cmd] - Security scan: - Expected: No high/critical issues (if applicable)
[cmd] - Performance tests: - Expected: Meets baseline (if defined)
[cmd]
Verify each success criterion from PRP.
执行PRP中所有的验证关卡(参见REFERENCE.md):
- 代码检查:- 预期结果:通过
[命令] - 类型检查:- 预期结果:通过
[命令] - 单元测试:- 预期结果:通过(所有测试)
[命令] - 集成测试:- 预期结果:通过(若适用)
[命令] - 覆盖率检查:- 预期结果:达到阈值
[命令] - 安全扫描:- 预期结果:无高/严重问题(若适用)
[命令] - 性能测试:- 预期结果:符合基线(若已定义)
[命令]
验证PRP中的所有成功标准。
Step 5: Document deferred items
步骤5:记录延期项
Identify and track any deferred work:
- Review Implementation Blueprint - items not completed
- Categorize each deferred item:
- Phase 2 (Required): Must have GitHub issues created
- Nice-to-Have: Optional, no issue required
- Blocked: Cannot complete - document blocker, create issue
- Create GitHub issues for all Phase 2 and Blocked items (see REFERENCE.md)
- Update PRP with deferred items section linking to GitHub issues
- Do NOT proceed to Step 6 until all required issues are created
识别并跟踪所有延期工作:
- 审查实现蓝图 - 未完成的项
- 对每个延期项进行分类:
- 第二阶段(必填):必须创建GitHub问题
- 锦上添花项:可选,无需创建问题
- 受阻项:无法完成 - 记录阻塞原因,创建问题
- 为所有第二阶段和受阻项创建GitHub问题(参见REFERENCE.md)
- 更新PRP,添加链接到GitHub问题的延期项部分
- 在所有必填问题创建完成前,不得进入步骤6
Step 6: Sync feature tracker (if enabled)
步骤6:同步功能跟踪器(若已启用)
If feature tracker exists ():
docs/blueprint/feature-tracker.json- Identify which feature codes (e.g., FR2.1) were addressed from PRP
- Update feature tracker for each code:
- Status: (all criteria met) or
complete(some criteria met) orpartialin_progress - Files: List of modified/created files
- Tests: List of test files
- Commits: Commit hashes
- Notes: Implementation notes
- Status:
- Recalculate statistics: completion percentages, phase status
- Update TODO.md: Check boxes for completed features
- Report feature tracker changes
若功能跟踪器存在():
docs/blueprint/feature-tracker.json- 识别PRP中涉及的功能代码(例如FR2.1)
- 为每个代码更新功能跟踪器:
- 状态:(所有标准已满足)或
complete(部分标准已满足)或partialin_progress - 文件:已修改/创建的文件列表
- 测试:测试文件列表
- 提交:提交哈希值
- 备注:实现说明
- 状态:
- 重新计算统计数据:完成百分比、阶段状态
- 更新TODO.md:勾选已完成的功能
- 报告功能跟踪器的变更
Step 7: Report results and next steps
步骤7:报告结果和下一步行动
Generate comprehensive execution summary report:
- Tasks completed: X/Y
- Tests added: N
- Files modified: [list]
- Validation results: Table of all gates (PASS/FAIL status)
- Success criteria: All verified
- Deferred items summary: Count and GitHub issue numbers
- Feature tracker updates: Features updated and percentages
- New gotchas discovered: [documented for future reference]
- Recommendations: Follow-up work or ai_docs updates
Prompt user for next action:
- Commit changes (Recommended) → Run
/git:commit - Create work-order for follow-up → Run
/blueprint:work-order - Update ai_docs with patterns → Run
/blueprint:curate-docs - Continue to next PRP → Run
/blueprint:prp-execute [next] - Done for now → Exit
生成全面的执行总结报告:
- 已完成任务:X/Y
- 新增测试:N
- 已修改文件:[列表]
- 验证结果:所有关卡的状态表(通过/未通过)
- 成功标准:全部已验证
- 延期项摘要:数量及GitHub问题编号
- 功能跟踪器更新:已更新的功能及百分比
- 新发现的陷阱:[记录以供未来参考]
- 建议:后续工作或ai_docs更新
提示用户选择下一步行动:
- 提交更改(推荐)→ 运行
/git:commit - 创建后续工单 → 运行
/blueprint:work-order - 更新ai_docs中的模式 → 运行
/blueprint:curate-docs - 继续执行下一个PRP → 运行
/blueprint:prp-execute [next] - 暂时结束 → 退出
Agentic Optimizations
Agent优化
| Context | Command |
|---|---|
| Check PRP exists | |
| Extract confidence | |
| List all PRPs | |
| Check feature tracker | |
| Fast validation | Run validation gates in parallel when possible |
For detailed validation gate definitions, deferred items workflow, error handling procedures, and agent team coordination, see REFERENCE.md.
| 上下文 | 命令 |
|---|---|
| 检查PRP是否存在 | |
| 提取置信度 | |
| 列出所有PRP | |
| 检查功能跟踪器 | |
| 快速验证 | 尽可能并行运行验证关卡 |
关于详细的验证关卡定义、延期项工作流、错误处理流程和Agent团队协作,请查看REFERENCE.md。