issue-to-plan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Issue to Plan

Issue 转计划

Overview

概述

Turn a finalized issue into a draft PR plus a single marked plan comment, then stop. The draft PR and its plan comment are the durable boundary between planning and execution.
Core principle: planning and execution happen in separate contexts. This skill never runs SDD or dispatches Task 1.
The plan lives in a PR comment, never the description. The description stays a concise, reviewer-facing summary (
Closes #N
+ change summary + test plan): the simplest merge path — squash-merging from the GitHub web UI, which prefills the commit message from the PR body — then produces a clean commit message instead of a multi-kilobyte plan.
将已最终确定的issue转化为一个draft PR外加一条带标记的计划评论,然后停止。draft PR及其计划评论是规划与执行之间的持久边界。
核心原则: 规划和执行在不同的上下文中进行。本技能绝不会运行SDD或派发任务1。
计划存放在PR评论中,绝不会放在描述里。PR描述保持为面向评审者的简洁摘要(
Closes #N
+ 变更摘要 + 测试计划):最简单的合并路径——通过GitHub网页界面进行squash合并(会自动用PR正文预填提交信息)——这样会生成干净的提交信息,而不是几千字的计划。

Entry Gate (all 5 steps, in order)

准入门槛(共5步,按顺序执行)

  1. Run
    gh issue view <N> --json number,title,body,state
    .
  2. If the title starts with
    [DRAFT]
    , stop and route to
    brainstorming-to-issue
    .
  3. If the entire change is one file, one behavior, and one red-green-commit review pass, use
    superpowers:test-driven-development
    directly. Uncertainty means it is not trivial.
  4. Claim the issue per repository rules: assign it and add the
    in-progress
    label.
  5. Retain
    Closes #<N>
    for the PR description.
  1. 运行
    gh issue view <N> --json number,title,body,state
  2. 如果标题以
    [DRAFT]
    开头,停止并转至
    brainstorming-to-issue
  3. 如果整个变更仅涉及单个文件、单个行为,且只需一次红-绿提交评审流程,请直接使用
    superpowers:test-driven-development
    。存在不确定性就说明它不是简单变更。
  4. 按照仓库规则认领issue:分配给自己并添加
    in-progress
    标签。
  5. 在PR描述中保留
    Closes #<N>

Generate the Plan (all 3 steps, in order)

生成计划(共3步,按顺序执行)

  1. REQUIRED SUB-SKILL:
    superpowers:using-git-worktrees
    — create the execution worktree and branch first, before any plan is written. Declared worktree preference — never ask: always isolate. This is the user's standing answer to that skill's Step 0 consent question; prefer the native worktree tool (
    EnterWorktree
    or equivalent), else
    git worktree add
    under
    .worktrees/<branch>
    . If its Step 3 baseline tests fail, do not ask whether to proceed — stop and report the failures; never plan or implement on a red baseline.
  2. REQUIRED SUB-SKILL:
    superpowers:writing-plans
    — including its Self-Review, File Structure, Global Constraints, per-task Interfaces, and bite-sized TDD steps.
  3. Override inside
    writing-plans
    — its persistence and handoff only:
    • Write the plan to
      .superpowers/sdd/plan.md
      in the execution worktree, protected by the nested scratch
      .gitignore
      convention.
    • Never write it under
      docs/
      and never commit it.
    • Never offer execution approaches and never start implementation.
  1. 必选子技能:
    superpowers:using-git-worktrees
    —— 先创建执行用的worktree和分支,再编写任何计划。已声明的worktree偏好——请勿询问: 始终隔离。这是用户对该技能第0步同意问题的固定答复;优先使用原生worktree工具(
    EnterWorktree
    或等效工具),否则使用
    .worktrees/<branch>
    下的
    git worktree add
    。如果其第3步的基线测试失败,不要询问是否继续——停止并报告失败;绝不能在红色基线上做规划或实现。
  2. 必选子技能:
    superpowers:writing-plans
    —— 包括其自评审、文件结构、全局约束、逐任务接口,以及小颗粒度的TDD步骤。
  3. 仅覆盖
    writing-plans
    中的持久化和交接部分:
    • 将计划写入执行worktree中的
      .superpowers/sdd/plan.md
      ,受嵌套临时
      .gitignore
      约定保护。
    • 绝不要写在
      docs/
      目录下,也绝不要提交它。
    • 绝不提供实现方案,也绝不开始编码实现。

Publish the Durable Handoff (all 8 steps, in order)

发布持久化交接物(共8步,按顺序执行)

Pre-publish gate — before creating anything, confirm each check aloud:
  1. Source issue is finalized (no
    [DRAFT]
    ), assigned, and labeled
    in-progress
    .
  2. The plan is at
    .superpowers/sdd/plan.md
    , untracked and unstaged.
  3. The description file contains
    Closes #<N>
    , a concise change summary, and a concise test plan — and contains no plan markers.
  4. The comment file contains exactly one ordered
    BEGIN PLAN
    /
    END PLAN
    marker pair; the plan between the markers is the verbatim contents of
    .superpowers/sdd/plan.md
    — never a summary — and the comment file is within GitHub's 65,536-character comment limit.
Then, with the exact commands and shapes in
plan-and-publish.md
:
  1. Create an empty seed commit to anchor the branch.
  2. Push the branch.
  3. Open a draft PR whose description carries
    Closes #N
    , the change summary, and the test plan.
  4. Publish the plan as a single PR comment containing the complete plan between
    <!-- BEGIN PLAN -->
    and
    <!-- END PLAN -->
    .
  5. Verify the published PR: state OPEN,
    isDraft
    true, and exactly one comment containing the ordered marker pair with the complete plan between them.
  6. Print the PR URL.
  7. Print exactly:
    Run plan-to-implementation for PR #M in a fresh session.
  8. STOP.
The plan remains untracked scratch locally; its durable copy is the marked PR comment. When the plan later changes, that comment is edited in place by its comment ID — never reposted as a new comment. The empty seed commit contains no plan and disappears under squash merge.
预发布门槛——创建任何内容之前,逐一确认以下检查项:
  1. 源issue已最终确定(无
    [DRAFT]
    )、已分配、已打
    in-progress
    标签。
  2. 计划位于
    .superpowers/sdd/plan.md
    ,未被跟踪且未暂存。
  3. 描述文件包含
    Closes #<N>
    、简洁的变更摘要和简洁的测试计划——且不包含任何计划标记。
  4. 评论文件恰好包含一对有序的
    BEGIN PLAN
    /
    END PLAN
    标记;标记之间的计划是
    .superpowers/sdd/plan.md
    的逐字内容——绝不是摘要——且评论文件大小在GitHub 65536字符的评论限制以内。
然后,按照
plan-and-publish.md
中的精确命令和格式执行:
  1. 创建一个空的种子提交来锚定分支。
  2. 推送分支。
  3. 创建一个draft PR,其描述包含
    Closes #N
    、变更摘要和测试计划。
  4. 将计划作为单条PR评论发布,内容为包含在
    <!-- BEGIN PLAN -->
    <!-- END PLAN -->
    之间的完整计划。
  5. 验证已发布的PR:状态为OPEN,
    isDraft
    为true,且恰好有一条评论包含有序标记对,标记之间是完整计划。
  6. 打印PR URL。
  7. 精确打印:
    Run plan-to-implementation for PR #M in a fresh session.
  8. 停止。
计划在本地保留为未跟踪的临时文件;其持久化副本是带标记的PR评论。后续计划变更时,通过评论ID原地编辑该评论——绝不要以新评论的形式重新发布。空种子提交不包含任何计划,且会在squash合并时消失。

Quick Reference

快速参考

ArtifactRequired state
Source issueFinalized, assigned,
in-progress
Local plan
.superpowers/sdd/plan.md
, ignored, uncommitted
BranchPushed, anchored by empty seed commit
PROpen draft; description =
Closes #N
+ summary + test plan, no markers
Plan commentExactly one, holding the verbatim plan between markers
Terminal actionPrint handoff, then stop
制品要求状态
源issue已最终确定、已分配、打有
in-progress
标签
本地计划
.superpowers/sdd/plan.md
,被忽略,未提交
分支已推送,由空种子提交锚定
PR开放的draft;描述 =
Closes #N
+ 摘要 + 测试计划,无标记
计划评论恰好1条,包含标记之间的逐字计划
终端操作打印交接信息,然后停止

Common Mistakes

常见错误

MistakeRequired correction
Asking whether to create a worktreeThe preference is declared: always isolate, never ask
Auto-dispatching Task 1 or running SDD in this sessionStop at the published draft PR; execution requires a fresh context
Keeping the only plan copy in local scratchPut the complete plan between markers in the PR comment
Embedding the plan in the PR descriptionThe description is reviewer-facing (
Closes #N
, summary, test plan); the plan belongs in the comment
Opening a non-draft PRUse
gh pr create --draft
; it stays draft until execution finishes
Committing the planCommit only an empty seed; keep the plan untracked
Saving under
docs/superpowers/plans/
Divert
writing-plans
output to
.superpowers/sdd/plan.md
Asking which execution approach to useThere is no execution in this skill
Summarizing or trimming the plan to fit GitHub's 65k comment limitNever compress the plan; stop, report the size, and split the source issue instead
错误正确做法
询问是否创建worktree偏好已声明:始终隔离,请勿询问
在本次会话中自动派发任务1或运行SDD停在已发布的draft PR阶段;执行需要全新上下文
仅在本地临时目录保留计划副本将完整计划放在PR评论的标记之间
将计划嵌入PR描述描述是面向评审者的(
Closes #N
、摘要、测试计划);计划应放在评论中
创建非draft PR使用
gh pr create --draft
;在执行完成前保持draft状态
提交计划仅提交空种子提交;让计划保持未跟踪状态
保存在
docs/superpowers/plans/
writing-plans
的输出重定向到
.superpowers/sdd/plan.md
询问使用哪种实现方案本技能不涉及执行
为了适配GitHub 65k评论限制而摘要或删减计划绝不要压缩计划;停止,报告大小,转而拆分源issue

Red Flags — STOP

危险信号——立即停止

  • SDD is about to start or Task 1 is about to be dispatched.
  • No open draft PR has exactly one comment containing the complete marked plan.
  • Plan markers appear in the PR description instead of the comment.
  • The plan or
    .superpowers/
    is staged.
  • The PR is ready for review instead of draft.
  • The plan in the comment is a summary or paraphrase instead of the verbatim
    .superpowers/sdd/plan.md
    contents.
  • Planning and execution are still happening in one session.
Any red flag means: first restore the durable draft-PR handoff (for a non-draft PR, convert it back to draft or re-publish it as draft), then stop without implementation — restore, then stop, in that order.
  • SDD即将启动,或任务1即将被派发。
  • 没有开放的draft PR且该PR恰好有一条包含完整带标记计划的评论。
  • 计划标记出现在PR描述而非评论中。
  • 计划或
    .superpowers/
    已被暂存。
  • PR已准备好评审而非draft状态。
  • 评论中的计划是摘要或改写版本,而非
    .superpowers/sdd/plan.md
    的逐字内容。
  • 规划和执行仍在同一会话中进行。
任何危险信号都意味着:首先恢复持久化的draft PR交接物(对于非draft PR,将其转回draft或重新发布为draft),然后停止,不进行任何实现——先恢复,再停止,按此顺序。