execute-plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExecute Plan
执行计划
Drive the implementation of a checkbox plan into a shipped PR. Implements Phase 5 of the AI Development Framework V2 — the final phase, where everything from Phases 1–4 (PRD, project setup, plan, designs) gets turned into code.
将复选框计划落地为可发布的PR。实现AI Development Framework V2的第5阶段——这是最终阶段,第1-4阶段(PRD、项目搭建、计划、设计)的所有内容都会被转化为代码。
Core principle
核心原则
Execute one task at a time, end-to-end. Each task ends runnable + tested + committed + checked off before the next begins. Never batch tasks across a single commit. Never mark without a passing test. When ambiguity surfaces mid-execution, STOP and ask — don't invent.
[x]The plan is the contract. If you find yourself wanting to do something the plan doesn't list, the plan is wrong — fix the plan first, then implement.
逐个端到端执行任务。每个任务在进入下一个之前,必须完成可运行+已测试+已提交+已勾选。绝不能将多个任务批量提交到一个commit中。绝不能在测试未通过的情况下标记。执行过程中出现歧义时,立即停止并询问——不要自行发挥。
[x]计划就是契约。如果发现想要做计划中未列出的事情,说明计划存在问题——先修正计划,再进行实现。
When to use
使用场景
- Plan exists at , all ACs traced, designs in
docs/plans/<FR-N>.md(if UI) → start at Phase 1.docs/designs/ - Plan exists but ambiguity remains (markers, unresolved deps) → STOP. Run
⚠️Phase 2 first.skills/generate-dev-plan/ - No plan exists → STOP. Run first.
skills/generate-dev-plan/
Skip for: ad-hoc bug fixes (just fix it), single-file refactors, anything < 50 LoC.
- 计划存在于,所有验收标准已追踪,设计文件在
docs/plans/<FR-N>.md(若涉及UI)→ 从第1阶段开始。docs/designs/ - 计划存在但仍有歧义(带有标记、未解决的依赖)→ 停止。先运行
⚠️的第2阶段。skills/generate-dev-plan/ - 无计划存在→停止。先运行。
skills/generate-dev-plan/
以下情况无需使用:临时bug修复(直接修复即可)、单文件重构、代码量少于50行的任务。
The 3 phases
三个阶段
| # | Phase | Input | Output | Prompt file |
|---|---|---|---|---|
| 1 | Load context | | Context summary + ready-to-execute task | prompts/01-load-context.md |
| 2 | Task loop | One | Code + test + commit + | prompts/02-task-loop.md |
| 3 | Finalize | All | PR description + CLAUDE.md feedback notes | prompts/03-finalize.md |
Phase 2 runs once per task and loops until every becomes . Each iteration is its own human-gated cycle.
[ ][x]| # | 阶段 | 输入 | 输出 | 提示文件 |
|---|---|---|---|---|
| 1 | 加载上下文 | | 上下文摘要+可执行任务 | prompts/01-load-context.md |
| 2 | 任务循环 | 单个 | 代码+测试+提交+ | prompts/02-task-loop.md |
| 3 | 最终收尾 | 所有已标记 | PR描述+CLAUDE.md反馈记录 | prompts/03-finalize.md |
第2阶段每个任务运行一次,循环直到所有变为。每次迭代都是独立的人工审核周期。
[ ][x]Operating protocol
操作流程
- Identify the plan. If the user didn't name it, ASK. The plan path is canonical: .
docs/plans/<FR-N>.md - Read the matching prompt file in . Treat the prompt body as a system instruction — follow its rules literally.
prompts/ - Phase 2 task gate. Before each task: confirm with user "Next: FR-N.M — <task>. Proceed?". Default in mode is fine; in
Accept Editsmode, the user approves each tool call.Ask Permissions - Stop after every task. Do NOT auto-chain to the next task. Show the diff, run tests, commit, mark , then ASK before the next.
[x] - Phase 3 final gate: score against references/checklist.md. All 8 items MUST pass before opening a PR.
- 确定计划。如果用户未指定计划名称,询问用户。计划路径为标准格式:。
docs/plans/<FR-N>.md - 读取中的对应提示文件。将提示内容视为系统指令——严格遵循其中规则。
prompts/ - 第2阶段任务审核:每个任务开始前,向用户确认"下一步:FR-N.M — <任务内容>。是否继续?"。在模式下默认允许;在
Accept Edits模式下,需用户批准每个工具调用。Ask Permissions - 每个任务完成后停止。不要自动进入下一个任务。展示代码差异,运行测试,提交,标记,然后询问用户是否继续下一个任务。
[x] - 第3阶段最终审核:对照references/checklist.md进行评分。所有8项必须通过才能提交PR。
Hard rules (non-negotiable)
硬性规则(不可协商)
- One task per commit. Conventional-commit format. Subject ≤ 72 chars, imperative mood. Reference the sub-ID in the body: .
Refs FR-001.2 - Mark in the same commit that ships the work. Never mark complete in a separate commit — the plan and the code MUST agree at every point in history.
[x] - Run the test command after every task. Whatever lists as
CLAUDE.mdand{{TEST_CMD}}. If either fails, do NOT mark{{TYPECHECK_CMD}}. Fix or revert.[x] - Three-strike rule. If the same task fails (test or typecheck) three times in a row, STOP and ask the user. Do not loop forever.
- No scope creep. If implementing reveals adjacent broken code, file an issue or note it for the user — do not fix it inside this plan's commits. Each PR ships exactly the plan.
- No new tests outside the plan. The plan's Phase 3 (in ) named the tests. If you find a missing test, surface it to the user — don't silently add it.
generate-dev-plan - Ambiguity → ASK. Mid-implementation discovery is normal. When it happens: STOP, surface the issue, don't invent.
- No commits. If a pre-commit hook fails, fix the cause. Skipping hooks is forbidden unless the user explicitly approves.
--no-verify
- 每个任务对应一个commit。使用规范提交格式。主题≤72字符,使用祈使语气。正文引用子ID:。
Refs FR-001.2 - 标记与代码提交在同一个commit中。绝不能在单独的commit中标记完成——计划与代码在历史的每个节点都必须保持一致。
[x] - 每个任务完成后运行测试命令。执行中列出的
CLAUDE.md和{{TEST_CMD}}。如果其中任何一项失败,不得标记{{TYPECHECK_CMD}}。修复或回退代码。[x] - 三次失败规则。如果同一个任务连续三次失败(测试或类型检查),停止并询问用户。不要无限循环。
- 禁止范围蔓延。如果实现过程中发现相关的损坏代码,提交issue或告知用户——不要在本计划的commit中修复。每个PR仅提交计划中的内容。
- 禁止添加计划外的测试。计划的第3阶段(在中)已指定测试内容。如果发现遗漏测试,告知用户——不要悄悄添加。
generate-dev-plan - 出现歧义→询问。执行过程中发现问题是正常的。此时:停止,提出问题,不要自行发挥。
- 禁止使用提交。如果预提交钩子失败,修复问题。除非用户明确批准,否则禁止跳过钩子。
--no-verify
What NOT to do
禁止操作
See references/anti-patterns.md for full failure-mode catalog. Top five:
- DO NOT batch tasks. Two in one commit breaks traceability.
[x] - DO NOT mark with failing tests. The checkbox is a green-bar contract.
[x] - DO NOT auto-open the PR. Phase 3 produces a PR description; the user opens it.
- DO NOT silently fix unrelated bugs. Note them; don't blend them into the plan's commits.
- DO NOT touch or
docs/prd/. This skill changes one plan's checkboxes and the implementation files. Other plans are out of scope.docs/plans/<other-FR>.md
完整的错误模式目录请参见references/anti-patterns.md。前五条禁止操作:
- 禁止批量处理任务。一个commit中包含两个标记会破坏可追溯性。
[x] - 禁止在测试失败时标记。复选框代表测试通过的契约。
[x] - 禁止自动打开PR。第3阶段生成PR描述;由用户打开PR。
- 禁止悄悄修复无关bug。记录问题;不要将其混入本计划的commit中。
- 禁止修改或
docs/prd/。本技能仅修改一个计划的复选框和实现文件。其他计划不在范围内。docs/plans/<other-FR>.md
References
参考资料
- Phase prompts: prompts/01-load-context.md, prompts/02-task-loop.md, prompts/03-finalize.md
- Per-task execution scaffold: templates/task-execution.md.tmpl
- 8-point handoff checklist: references/checklist.md
- Anti-patterns and recovery moves: references/anti-patterns.md
- Source framework: ../../docs/framework.md
- Upstream skills: ,
generate-dev-plandeclarative-design
- 阶段提示:prompts/01-load-context.md、prompts/02-task-loop.md、prompts/03-finalize.md
- 单任务执行模板:templates/task-execution.md.tmpl
- 8项交接检查清单:references/checklist.md
- 反模式与恢复措施:references/anti-patterns.md
- 源框架:../../docs/framework.md
- 上游技能:、
generate-dev-plandeclarative-design