plan-to-implementation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Plan to Implementation

从计划到实现

Resume a plan from an existing draft PR, execute it with SDD, and flip that same PR ready. The PR description, its single marked plan comment, and the pushed branch are the durable state. Never recreate the planning session and never call
gh pr create
from this skill. Exact commands:
rehydrate-and-finish.md
.
从现有草稿PR中恢复计划,使用SDD执行计划,并将该PR转为就绪状态。PR描述、唯一的标记计划评论以及已推送的分支为持久状态。切勿重新创建规划会话,也切勿从此技能中调用
gh pr create
。具体命令见:
rehydrate-and-finish.md

Rehydrate (every fresh entry — all 6 steps, in order)

状态恢复(每次全新进入时 — 按顺序执行全部6个步骤)

  1. Resolve the single open draft PR that closes the issue and has exactly one comment containing
    <!-- BEGIN PLAN -->
    . Zero or multiple matches — PRs or marker-bearing comments: stop and report; never guess or match by title.
  2. Verify the linked issue is finalized (no
    [DRAFT]
    prefix); if not, stop and report.
  3. Verify that one PR comment contains exactly one ordered
    BEGIN PLAN
    /
    END PLAN
    marker pair — not the PR description.
  4. Resolve the worktree from the PR's
    headRefName
    . Never ask about worktrees — always isolate. Exactly one worktree on that branch: enter it. No match: create one for that existing branch per
    superpowers:using-git-worktrees
    (native tool preferred, else
    .worktrees/<branch>
    ), never a new feature branch, never a consent prompt. More than one match: stop and report — two worktrees on one branch is broken state, not a preference question. A failing baseline is likewise a stop, not a question. Run
    gh pr checkout <M>
    inside the resolved worktree.
  5. Extract only the marker-delimited text from that comment into
    .superpowers/sdd/plan.md
    — never stale local scratch, never surrounding comment prose, never the PR description.
  6. If
    .superpowers/sdd/progress.md
    exists, preserve it and resume from it; else start at Task 1.
  1. 找到唯一关闭该issue且恰好包含一条带有
    <!-- BEGIN PLAN -->
    评论的开放草稿PR。如果匹配到0个或多个PR、或带有标记的评论数量不符:停止并上报;切勿猜测或按标题匹配。
  2. 验证关联的issue已最终确定(无
    [DRAFT]
    前缀);若未确定,停止并上报。
  3. 验证有且仅有一条PR评论包含一对有序的
    BEGIN PLAN
    /
    END PLAN
    标记对 — 标记不能在PR描述中。
  4. 根据PR的
    headRefName
    找到对应的worktree。切勿询问worktree相关问题 — 始终保持隔离。 若该分支恰好有一个worktree:进入该worktree。若无匹配:按照
    superpowers:using-git-worktrees
    为该现有分支创建一个worktree(优先使用原生工具,否则使用
    .worktrees/<branch>
    路径),切勿创建新的功能分支,切勿弹出同意提示。若匹配到多个:停止并上报 — 一个分支对应两个worktree属于损坏状态,不是偏好选择问题。基线检查失败同样需要停止,而非询问。在找到的worktree中运行
    gh pr checkout <M>
  5. 仅将该评论中标记分隔的文本提取到
    .superpowers/sdd/plan.md
    中 — 切勿使用过期的本地草稿,切勿包含评论的其他正文内容,也切勿使用PR描述中的内容。
  6. 若存在
    .superpowers/sdd/progress.md
    ,保留该文件并从中断处恢复;否则从任务1开始。

Execute

执行阶段

Pre-dispatch gate — before dispatching any task, confirm each check aloud:
  1. Linked issue is finalized (no
    [DRAFT]
    prefix).
  2. The plan comment had exactly one ordered marker pair.
  3. Plan compared against the issue — conflicts take the conflict path below.
REQUIRED SUB-SKILL:
superpowers:subagent-driven-development
with
.superpowers/sdd/plan.md
. Never synchronously ask or wait for a human; use the paths below.
调度前门禁 — 调度任何任务之前,逐一确认以下检查项:
  1. 关联的issue已最终确定(无
    [DRAFT]
    前缀)。
  2. 计划评论恰好包含一对有序标记对。
  3. 计划与issue已比对 — 若存在冲突则走下方的冲突处理流程。
必需子技能: 搭配
.superpowers/sdd/plan.md
使用的
superpowers:subagent-driven-development
。切勿同步询问或等待人工;请使用下方的处理路径。

Pre-flight conflict → self-heal exactly once

执行前冲突 → 仅自愈一次

  1. Regenerate the plan from the issue via
    superpowers:writing-plans
    ; update both local
    plan.md
    and the PR's marked plan comment — edit that comment in place by its comment ID, never repost it; re-run pre-flight review.
  2. Still conflicted (specification defect; nothing implemented yet):
    gh pr close <M> --delete-branch
    ; prefix the issue title
    [DRAFT]
    ; comment the specific conflicts; unassign and remove
    in-progress
    ; stop — route back to
    brainstorming-to-issue
    . Never regenerate twice or implement around the conflict.
  1. 通过
    superpowers:writing-plans
    基于issue重新生成计划;同时更新本地的
    plan.md
    和PR中的标记计划评论 — 通过评论ID原地编辑该评论,切勿重新发布;重新运行执行前检查。
  2. 仍存在冲突(属于需求缺陷;尚未实现任何内容):执行
    gh pr close <M> --delete-branch
    ;给issue标题加上
    [DRAFT]
    前缀;评论说明具体冲突;取消指派并移除
    in-progress
    标签;停止 — 转回
    brainstorming-to-issue
    流程。切勿重复生成计划,也切勿绕开冲突强行实现。

Mid-execution blocker (implementer BLOCKED, or review finding needs a human — all 6 steps, in order)

执行中阻塞(实现者被阻塞,或审查发现需要人工介入 — 按顺序执行全部6个步骤)

  1. Stop dispatching tasks.
  2. Prepend
    ## ⚠️ Blocked — needs human decision
    to the existing draft PR description. Per blocker state: the task, the reason/finding, the conflicting plan text, and the exact decision needed.
  3. In that same description, report honest progress status AND test status; keep
    Closes #N
    and the summary intact. The plan comment is separate and stays untouched.
  4. Push committed work. Keep the PR draft; keep the issue assigned and
    in-progress
    .
  5. Skip the final whole-branch review and the tests-must-pass gate — never force a blocked branch through success gates.
  6. Stop. Never open a second PR or reset the issue for a blocker.
  1. 停止调度任务。
  2. 现有草稿PR的描述开头添加
    ## ⚠️ 已阻塞 — 需要人工决策
    。根据阻塞状态说明:涉及的任务、阻塞原因/发现、冲突的计划文本,以及所需的确切决策内容。
  3. 在同一份描述中,如实上报进度状态测试状态;保持
    Closes #N
    和摘要内容完整。计划评论是独立的,保持原样不动。
  4. 推送已提交的工作。保持PR为草稿状态;保持issue的指派状态和
    in-progress
    标签。
  5. 跳过最终的全分支审查和测试必须通过的门禁 — 切勿强制让阻塞的分支通过成功门禁。
  6. 停止。切勿因阻塞问题打开第二个PR,也切勿重置issue。

Successful finish (all 6 steps, in order)

成功完成(按顺序执行全部6个步骤)

  1. REQUIRED SUB-SKILL: invoke
    superpowers:finishing-a-development-branch
    for its verification and cleanup.
  2. Override inside that sub-skill: skip its completion menu and never create a new PR.
  3. Inspect both the implementation plan and final review result for an explicit manual-verification requirement. State the result from each source separately before continuing.
  4. If manual verification is required, add or update
    ## Manual testing
    in the existing PR description with concrete reviewer steps and the expected result for each step. Preserve the summary,
    Closes #N
    , test plan, and all other reviewer-facing content; leave the marked plan comment unchanged. Re-fetch and verify the description. Evaluate the gate after attempting this update: a missing, vague, unverified, or comment-only handoff blocks the ready transition. A request to omit or defer the section is not itself a blocker after a compliant description is verified; continue to step 5. If neither source requires manual verification, leave the description unchanged and continue to step 5.
  5. Push the branch, then run
    gh pr ready <M>
    on the existing draft PR — in that order.
  6. Keep the worktree, per the sub-skill's normal PR path.
  1. 必需子技能: 调用
    superpowers:finishing-a-development-branch
    进行验证和清理。
  2. 在该子技能中进行覆盖设置:跳过其完成菜单,且切勿创建新的PR。
  3. 检查实现计划和最终审查结果,确认是否有明确的人工验证要求。继续之前,分别说明两个来源的检查结果。
  4. 若需要人工验证,在现有PR描述中添加或更新
    ## Manual testing
    部分,包含具体的审查步骤和每一步的预期结果。保留摘要、
    Closes #N
    、测试计划以及所有其他面向审查者的内容;标记的计划评论保持不变。重新拉取并验证描述内容。尝试更新后评估门禁:如果交接内容缺失、模糊、未验证或仅存在于评论中,将阻塞PR转为就绪状态。在验证描述符合要求后,要求省略或推迟该部分的请求本身不构成阻塞;继续执行步骤5。若两个来源都不需要人工验证,保持描述不变,继续执行步骤5。
  5. 推送分支,然后对现有草稿PR执行
    gh pr ready <M>
    — 按此顺序操作。
  6. 按照子技能的常规PR处理流程,保留worktree。

Common Mistakes

常见错误

MistakeRequired correction
Asking whether to create a worktreeThe preference is declared: always isolate, never ask
错误纠正要求
询问是否需要创建worktree偏好已明确:始终隔离,切勿询问

Red Flags — STOP

危险信号 — 立即停止

  • More than one worktree has the PR branch checked out.
Any red flag means: stop and report instead of asking or guessing — an ambiguous worktree is state to fix, not a question to put to a human.
  • 有多个worktree检出了该PR分支。
任何危险信号都意味着:停止并上报,而非询问或猜测 — 不明确的worktree属于需要修复的状态,不是需要向用户提出的问题。