implement-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplement Issues
Implement Issues
Build open issues with agents, one pull request per issue. Each issue goes
through the flow a person would take it through:
- a spec and plan, written by Superpowers from the issue;
- the build, done by Superpowers;
- a pull request and a code review;
except that no one answers questions along the way. Every decision an agent
makes on the user's behalf lands in its pull request, where the user reviews
it.
Two agents work on each issue. A planner writes the spec and plan. A
build lead executes the plan and answers the review. When plan approval
is on, the user reviews the spec and plan on a draft pull request before the
build lead starts, and a later run picks up what they approved.
The built pull request opens as a draft. A second agent runs on
it, and the build lead answers that review with . The pull
request is marked ready once the review is answered and the checks pass.
review-prsanswer-pr-reviewsYou are the dispatcher. Agents write in their own worktrees; you push each
branch, open its pull request, and give the verdict on each agent's work.
Nothing is marked ready until you have seen the checks pass yourself.
Superpowers owns the spec, the plan, and the build. This skill answers the
questions Superpowers would ask a person — which execution mode, which
model, how many fix rounds — from the user's settings. It never changes how
Superpowers works inside.
This skill names actions — "dispatch an agent", "choose a model" — not tools.
Use your platform's equivalents.
由 Agent 构建开放的 Issue,每个 Issue 对应一个 Pull Request。每个 Issue 都走完一个人通常会经历的流程:
- 由 Superpowers 根据 Issue 编写 spec 和 plan;
- 由 Superpowers 完成 build;
- 创建 Pull Request 并进行 Code Review;
唯一区别是,过程中没有人回答问题。Agent 代表用户作出的每个决定都会记录在其 Pull Request 中,供用户审阅。
每个 Issue 由两个 Agent 处理。Planner 编写 spec 和 plan;Build Lead 执行 plan 并回复 review。启用 Plan Approval 时,用户会在 Build Lead 开始前,于一个 draft Pull Request 中审阅 spec 和 plan;后续运行会接续处理用户已经批准的内容。
构建后的 Pull Request 以 draft 形式打开。第二个 Agent 对其运行 ,Build Lead 则使用 回复 review。Review 已回复且 checks 通过后,Pull Request 才会标记为 ready。
review-prsanswer-pr-reviews你是 dispatcher。Agent 在各自的 worktree 中工作;你负责 push 每个分支、打开其 Pull Request,并给出对每个 Agent 工作的结论。在亲自确认 checks 通过之前,任何内容都不会被标记为 ready。
Superpowers 负责 spec、plan 和 build。这个 skill 会根据用户的 settings,回答 Superpowers 本应向人提出的问题——采用哪种执行模式、使用哪个 model、进行多少轮修复。它绝不会改变 Superpowers 内部的运行方式。
这个 skill 指定的是动作——"dispatch an agent"、"choose a model"——而不是具体工具。请使用你所在平台的等价功能。
Requirements
Requirements
- Superpowers (,
brainstorming,writing-plans,subagent-driven-development,executing-plans,finishing-a-development-branch), plus theverification-before-completion,fetch-issues,superpowers-issue-bridge, andreview-prsskills. If one is missing, name it and stop.answer-pr-reviews - A GitHub repository and , with
ghpassing — pull requests and their reviews live there, wherever the issues live.gh auth status - When the Review agent uses Codex: the Codex CLI, logged in, with
installed for Codex.
review-prs
- Superpowers(、
brainstorming、writing-plans、subagent-driven-development、executing-plans、finishing-a-development-branch),以及verification-before-completion、fetch-issues、superpowers-issue-bridge和review-prsskills。如果缺少其中任何一个,请指出并停止。answer-pr-reviews - 一个 GitHub repository 和 ,且
gh必须通过——Pull Request 及其 review 存放在那里,无论 Issue 位于何处。gh auth status - 当 Review Agent 使用 Codex 时:Codex CLI 必须已登录,并为 Codex 安装了 。
review-prs
Settings
Settings
Three settings shape a run. in the repository holds
the saved ones; its shape is .
docs/agents/delivery.mdassets/delivery.md-
Effort —,
low, ormedium. Take it from the first of: the run's argument (high, "at medium effort"), the file's Effort line, or a question in Stage 2. It decides:/implement-issues lowlow medium high Build mode, answering ' execution questionwriting-plansone agent, with executing-plansper task, with subagent-driven-developmentper task, with subagent-driven-developmentFix rounds per task review — 2 5 code passreview-prsoff off on Your full checks after the review fixes CI is the evidence; run them only when the pull request has no CI yes yes 's own suite runfinishing-a-development-branchskipped when HEAD hasn't moved since Stage 5 skipped when HEAD hasn't moved since Stage 5 runs CI fix attempts 1 2 3 Plan revision rounds 1 2 3 At every effort, Superpowers' whole-branch review runs at the end of the build, you run the full checks before the first push, and nothing merges. -
Plan approval — on or off; off when the file doesn't say.
-
Models, one per agent. Six agents work on an issue, and each sets the model of one or more seats:
Agent Seats Dispatched by Planner planner, spec-check you Build lead build-lead you Implementers implementer, escalation Superpowers, inside the build lead Task reviewers task-reviewer, re-reviewer, final-reviewer Superpowers, inside the build lead Review agent pr-reviewer you PR code reviewer pr-code-reviewer , inside the review agentreview-prsYour session is the dispatcher; it has no setting.Values. Each value is a tier (,cheap,standard) looked up in the file's Tiers table,strong, an exact model name, or — for Implementers —session, which leaves the choice toby-task's own rules. Review agent may also takesubagent-driven-developmentand a tier or a Codex model; see Codex as a reviewer, below.codex:Presets. One word sets every agent left unset. Presets are tiers:Agent budget balanced max Planner strong strong strong Build lead standard standard strong Implementers cheap standard strong Task reviewers standard standard strong Review agent standard standard strong PR code reviewer standard strong strong Precedence. For each seat, the first of these that names it wins:- a run override — from the request or from Stage 2;
- the seat's row in the file's Seats table;
- its agent's row in the Agents table;
- the Preset;
- the fallback below.
A value resolves whole: provider and model come from the same level, never a provider from one and a model from another. A value with noprefix runs on the provider of whoever dispatches that agent — your session for the Planner, Build lead and Review agent; the build lead's provider for Implementers and Task reviewers; the review agent's for the PR code reviewer. A tier resolves in that provider's Tiers column.codex:Escalation. Fix rounds 4–5 exist because an implementer got stuck. When the Implementers value came from a run override, the Agents row or the Preset, and the escalation seat isn't set on its own, escalation runs one tier above it on the same provider:→cheap,standard→standard,strongstays. When that value is an exact model,strongorsession, or no Implementers value is set, escalation followsby-task's own rule.subagent-driven-developmentCodex as a reviewer. Only the Review agent may name. Codex reads and reports; it never writes, and you post its review (Stage 7). The PR code reviewer runs inside the review, so it follows the Review agent's provider. Any other agent that namescodex:stops the run in Stage 2: Codex is for reviews only. A model the parent's provider doesn't accept stops the run too — a Claude model on the PR code reviewer under a Codex review agent, for example.codex:Fallback. A seat nothing above names falls back:Seat When not set planner, build-lead, pr-reviewer session model implementer asked in Stage 2 spec-check, task-reviewer, re-reviewer, escalation, final-reviewer that skill's own rule pr-code-reviewer that skill's own rule
三个 settings 决定一次运行。已保存的 settings 位于 repository 中的 ;其结构见 。
docs/agents/delivery.mdassets/delivery.md-
Effort——、
low或medium。按以下顺序取第一个明确给出的值:运行参数(high、"at medium effort")、文件中的 Effort 行,或 Stage 2 中的提问。它决定:/implement-issues lowlow medium high Build mode,回答 的执行问题writing-plans一个 Agent,使用 executing-plans每个任务一个 Agent,使用 subagent-driven-development每个任务一个 Agent,使用 subagent-driven-development每个任务 review 的修复轮次 — 2 5 代码检查review-prs关闭 关闭 开启 Review 修复后的完整 checks CI 是证据;仅在 Pull Request 没有 CI 时运行 是 是 自身的 suite runfinishing-a-development-branch如果 HEAD 自 Stage 5 以来没有移动,则跳过 如果 HEAD 自 Stage 5 以来没有移动,则跳过 运行 CI 修复尝试次数 1 2 3 Plan 修订轮次 1 2 3 在所有 effort 下,Superpowers 的整分支 Code Review 都会在 build 结束时运行;你会在首次 push 前运行完整 checks;并且不会 merge 任何内容。 -
Plan Approval——on 或 off;如果文件中没有说明,则为 off。
-
Models,每个 Agent 一个。一个 Issue 涉及六个 Agent,每个 Agent 为一个或多个 seat 设置 model:
Agent Seats Dispatched by Planner planner, spec-check 你 Build Lead build-lead 你 Implementers implementer, escalation Superpowers,在 Build Lead 内部 Task Reviewers task-reviewer, re-reviewer, final-reviewer Superpowers,在 Build Lead 内部 Review Agent pr-reviewer 你 PR Code Reviewer pr-code-reviewer ,在 Review Agent 内部review-prs你的 session 是 dispatcher;它没有对应的 setting。**Values。**每个值可以是一个 tier(、cheap、standard),从文件中的 Tiers 表查得;也可以是strong、一个确切的 model 名称,或者是——对于 Implementers——session,由by-task自身的规则决定选择。Review Agent 还可以使用subagent-driven-development加一个 tier 或一个 Codex model;参见下文“Codex as a reviewer”。codex:**Presets。**一个单词会为所有尚未单独设置的 Agent 设置 model。Preset 是 tier:Agent budget balanced max Planner strong strong strong Build Lead standard standard strong Implementers cheap standard strong Task Reviewers standard standard strong Review Agent standard standard strong PR Code Reviewer standard strong strong **Precedence。**对于每个 seat,以下第一个明确指定它的值优先:- 一次运行的 override——来自请求或 Stage 2;
- 文件 Seats 表中该 seat 所在的行;
- Agents 表中该 Agent 所在的行;
- Preset;
- 下方的 fallback。
一个值会整体解析:provider 和 model 必须来自同一层级,绝不能混用一个层级的 provider 与另一个层级的 model。没有前缀的值,使用调度该 Agent 者的 provider——对于 Planner、Build Lead 和 Review Agent 是你的 session;对于 Implementers 和 Task Reviewers 是 Build Lead 的 provider;对于 PR Code Reviewer 是 Review Agent 的 provider。Tier 根据该 provider 的 Tiers 列进行解析。codex:**Escalation。**第 4~5 轮修复的存在,是因为 Implementer 遇到了阻塞。当 Implementers 的值来自运行 override、Agents 行或 Preset,并且 escalation seat 本身未设置时,escalation 会在同一 provider 上使用高一个 tier 的 model:→cheap,standard→standard,strong保持不变。当该值是确切的 model、strong或session,或者没有设置 Implementers 值时,escalation 遵循by-task自身的规则。subagent-driven-development**Codex as a reviewer。**只有 Review Agent 可以指定。Codex 负责读取和报告;它绝不写入代码,由你发布其 review(Stage 7)。PR Code Reviewer 在 review 内部运行,因此遵循 Review Agent 的 provider。任何其他 Agent 如果指定codex:,都会在 Stage 2 停止运行:Codex 仅用于 review。如果父级 provider 不接受某个 model,运行也会停止——例如,在 Codex Review Agent 下为 PR Code Reviewer 设置 Claude model。codex:**Fallback。**如果上述规则都没有指定某个 seat,则使用:Seat 未设置时的处理方式 planner, build-lead, pr-reviewer session model implementer 在 Stage 2 中询问 spec-check, task-reviewer, re-reviewer, escalation, final-reviewer 该 skill 自身的规则 pr-code-reviewer 该 skill 自身的规则
Stage 1 — Build the queue
Stage 1 — Build the queue
-
Get the open issues with. If the user named issues ("#12 and #15"), keep only those.
fetch-issues -
Readfor its Linking section — it decides what each pull request writes to close its issue. Read
docs/agents/issue-tracker.mdif it exists.docs/agents/delivery.md -
Find each issue's open pull requests and branches (,
feat/42-*). An open pull request whose body holdsfix/42-*is this skill's plan pull request:<!-- implement-issues: plan -->- labeled → build;
plan-approved - with unanswered review comments — an unresolved thread whose last
comment doesn't end with → revise the plan;
<!-- answer-pr-reviews --> - otherwise → waiting on the user.
Any other open pull request or branch for the issue → skip, and record why. No pull request and no branch → plan. - labeled
-
An issue whose body references another queued issue depends on it: start it after that issue's pull request is marked ready, branched from that issue's branch instead of the base branch, and say so in its pull request. If that issue ends without a ready pull request, skip this one and record why.
-
Find the base branch — the remote's default branch — and fetch it.
Print the queue — reference, title, branch, action (plan, revise the plan,
build), dependency — then the waiting and skipped lists.
-
使用获取开放的 Issues。如果用户指定了 Issues(例如 "#12 and #15"),则仅保留这些 Issues。
fetch-issues -
阅读中的 Linking 部分——它决定每个 Pull Request 应写入什么内容来关闭对应 Issue。如果
docs/agents/issue-tracker.md存在,也阅读它。docs/agents/delivery.md -
查找每个 Issue 的开放 Pull Requests 和 branches(、
feat/42-*)。正文包含fix/42-*的开放 Pull Request 是这个 skill 的 Plan Pull Request:<!-- implement-issues: plan -->- 带有 label → build;
plan-approved - 存在未回复的 review 评论——某个 unresolved thread 的最后一条评论未以 结尾 → revise the plan;
<!-- answer-pr-reviews --> - 其他情况 → waiting,等待用户处理。
该 Issue 的任何其他开放 Pull Request 或 branch → skip,并记录原因。既没有 Pull Request 也没有 branch → plan。 - 带有
-
如果某个 Issue 的正文引用了队列中的另一个 Issue,则它依赖那个 Issue:必须等被依赖 Issue 的 Pull Request 标记为 ready 后才能开始;从该 Issue 的 branch 而非 base branch 创建,并在其 Pull Request 中说明这一点。如果被依赖的 Issue 最终没有产生 ready Pull Request,则跳过当前 Issue,并记录原因。
-
找到 base branch——remote 的 default branch——并 fetch 它。
打印队列——reference、title、branch、action(plan、revise the plan、build)、dependency——然后打印 waiting 和 skipped 列表。
Stage 2 — Settle the settings, then ask how to run
Stage 2 — Settle the settings, then ask how to run
Ask before dispatching anything.
-
Settings. Print the effort and where it came from, plan approval, and the preset, if there is one. Then print one table of the six agents: each one's provider, model, and source — run, Seats, Agents, Preset, or fallback. List under an agent any of its seats that resolved differently. Mark Implementers "not used at this effort" at, Task reviewers "final review only" at
low, and PR code reviewer "not used at this effort" belowlow, rather than leaving them out.highCheck every resolved model against what its provider accepts right now — for your platform, its dispatch's model options or spawn allowlist. One it doesn't accept stops the run: name the agent, the seat, the value, and where it came from. That includes an exact name from another platform, and a tier with no column for its provider.When the Review agent resolves to, check Codex before dispatching anything:codex:succeeds;codex --versionexits 0;codex login statusis installed for Codex — in the repository'sreview-prs, in.agents/skills/, or in~/.agents/skills/(default$CODEX_HOME/skills/); at high effort, when the code pass runs, Superpowers'~/.codex/skills/is installed for Codex the same way and Codex's multi-agent feature is on (requesting-code-review), so the code pass can run on its own model; and each distinct Codex model the review resolves to answers, with exit 0:codex featuresbashcodex exec --ephemeral -s read-only -m "<model>" "Reply with the single word OK."Any failure stops the run: name the agent, the value, and where it came from. A run with no Codex reviewer checks none of this. Run every check in this step — the Codex ones too — again on the final table, after the questions and overrides below and just before the user confirms, so an answer that turns Codex on is checked before any agent starts.Ask for what the file doesn't settle: the effort, when the run had no argument; plan approval, when the file has no line for it; and the models. With no, say once that the optionaldocs/agents/delivery.mdskill saves these settings ahead of time, then ask the preset first —setup-delivery,budget,balanced, or "set each agent", which asks all six agents in one question. With a file that leaves the implementer unset, ask for it as before; that answer sets the implementer seat, not the Implementers agent, and doesn't trigger the escalation step-up. When a value resolves through a tier and there is no Tiers column for its provider — always the case with no file — ask for that provider's cheap, standard and strong models in one question, and include them in the save offer. Offer only the models your dispatch accepts, never a name remembered from elsewhere. If your platform can't set a model per dispatch, say so and use its default for every seat. Then ask whether to use these settings for the run, or override any of them for this run only.maxOverrides in words. A run override from the request maps to agents by this vocabulary only: "plans" → Planner; "builds" or "executes" → Implementers; "leads the build" → Build lead; "reviews tasks" → Task reviewers; "reviews" or "reviews the PR" → Review agent; "reviews the code" → PR code reviewer. Print the agents table with "run" as the source of each overridden row; the run starts only after the user confirms the printed table.When anything was asked, offer to save it to: show the file's diff, and write it only on the user's yes. A run's overrides are saved only when the user says so.docs/agents/delivery.md -
Sequential or parallel? Sequential runs one issue at a time. Parallel runs up to N at once — ask for N, suggesting 3. Offer parallel only if your platform can run several dispatched agents at the same time. Either way, an issue holds its place from dispatch until it stops: waiting on plan approval, marked ready, or ended.
With the printed queue, the answers are the user's go-ahead for the whole
run — for each issue: pushing its branch; opening a draft plan pull request
and creating the label if it's missing; pushing plan
revisions with replies to their comments; opening or converting the draft
pull request; posting a review on it; pushing the fixes for that review
with replies to its comments; pushing fixes for its failing CI checks; and
marking it ready.
plan-approved在 dispatch 任何 Agent 之前先询问。
-
**Settings。**打印 effort 及其来源、Plan Approval,以及 Preset(如果存在)。然后打印一张包含六个 Agent 的表:每个 Agent 的 provider、model 和来源——run、Seats、Agents、Preset 或 fallback。如果某个 Agent 下的 seat 解析结果不同,应单独列出。在 low effort 下,将 Implementers 标为"not used at this effort";在 low effort 下,将 Task Reviewers 标为"final review only";在低于 high 的 effort 下,将 PR Code Reviewer 标为"not used at this effort",而不是直接省略它们。将每个解析后的 model 与其 provider 当前接受的 model 进行核对——对照你所在平台的 model options 或 spawn allowlist。如果 provider 不接受该值,则停止运行:指出 Agent、seat、值以及值的来源。这也包括来自其他平台的确切名称,以及其 provider 没有对应列的 tier。**当 Review Agent 解析为时,**在 dispatch 任何 Agent 之前检查 Codex:
codex:成功;codex --version以 0 退出;已为 Codex 安装codex login status——位于 repository 的review-prs、.agents/skills/或~/.agents/skills/(默认为$CODEX_HOME/skills/);在 high effort 下,当代码检查运行时,Superpowers 的~/.codex/skills/也必须以相同方式为 Codex 安装,并且 Codex 的 multi-agent feature 已开启(requesting-code-review),以便代码检查能够使用自己的 model;此外,review 解析出的每个不同 Codex model 都必须能够以 0 退出并回复:codex featuresbashcodex exec --ephemeral -s read-only -m "<model>" "Reply with the single word OK."任何检查失败都要停止运行:指出 Agent、值以及值的来源。如果没有 Codex Reviewer,则不检查这些内容。完成下方的提问和 overrides 后,并在用户确认前的最终表格阶段,再次运行本步骤中的所有检查——包括 Codex 检查——这样一旦回答启用了 Codex,就会在任何 Agent 启动前完成检查。询问文件中没有确定的内容:运行参数中没有指定 effort 时询问 effort;文件中没有 Plan Approval 行时询问 Plan Approval;询问 models。如果没有,只需说明一次可选的docs/agents/delivery.mdskill 可以提前保存这些 settings,然后先询问 Preset——setup-delivery、budget、balanced或 "set each agent";选择后者时,在一个问题中询问全部六个 Agent。如果文件未设置 implementer,则像之前一样询问;该回答设置的是 implementer seat,而不是 Implementers Agent,并且不会触发 escalation 升档。当一个值通过 tier 解析,但对应 provider 没有 Tiers 列时——没有文件时始终如此——一次询问该 provider 的 cheap、standard 和 strong models,并将其纳入保存选项。只提供你的 dispatch 所接受的 models,绝不提供从其他地方记住的名称。如果你的平台无法为每次 dispatch 单独设置 model,请说明这一点,并对每个 seat 使用其默认 model。然后询问本次运行是否使用这些 settings,或者仅为本次运行覆盖其中某些设置。max**使用文字指定 Overrides。**来自请求的运行 override 只能按以下词汇映射到 Agent:"plans" → Planner;"builds" 或 "executes" → Implementers;"leads the build" → Build Lead;"reviews tasks" → Task Reviewers;"reviews" 或 "reviews the PR" → Review Agent;"reviews the code" → PR Code Reviewer。打印 Agent 表,并将被覆盖的行标为来源 "run";只有用户确认打印出的表格后,运行才能开始。如果询问了任何内容,应主动提出将其保存到:展示文件 diff,并且只有用户回答 yes 后才写入。某次运行的 overrides 只有在用户明确要求时才能保存。docs/agents/delivery.md -
**Sequential 还是 Parallel?**Sequential 每次处理一个 Issue。Parallel 最多同时运行 N 个——请询问 N,并建议设为 3。只有当你的平台可以同时运行多个 dispatched Agent 时,才提供 Parallel 选项。无论采用哪种方式,一个 Issue 从 dispatch 开始直到停止都会保留自己的位置:等待 Plan Approval、标记为 ready,或结束。
打印出的队列和用户的回答构成对整次运行的许可——针对每个 Issue:push 其 branch;打开 draft Plan Pull Request,并在缺少时创建 label;push Plan 修订并回复其评论;打开或转换 draft Pull Request;在其上发布 review;push 该 review 的修复并回复其评论;push 其失败 CI checks 的修复;以及将其标记为 ready。
plan-approvedStage 3 — Plan
Stage 3 — Plan
For each issue to plan, create its branch and worktree, then dispatch its
planner:
-
Branch:for an issue labeled as a bug, otherwise
fix/<ref>-<slug>.feat/<ref>-<slug>is the issue's reference without<ref>(#,42);PROJ-123is the title lowercased, each run of characters outside<slug>replaced bya-z0-9, trimmed to 40 characters.- -
Worktree:, created with git from the base branch, or from the dependency's branch. Keep
.worktrees/<ref>-<slug>out of commits: if.worktrees/fails, add it togit check-ignore -q .worktrees..git/info/excludebashgit worktree add -b "<branch>" ".worktrees/<ref>-<slug>" "origin/<base>" -
Planner: fill inwith no plan pull request, and dispatch it as a background agent on the planner seat.
assets/planner-brief.md
For each plan to revise, reuse the issue's worktree when it is clean;
otherwise create one from the pushed branch
(). Count the
revision rounds already done — the conversation comments on the plan pull
request that hold . At the effort's
cap, leave it waiting and record why. Otherwise dispatch a planner from
, naming the plan pull request.
git worktree add ".worktrees/<ref>-<slug>" "<branch>"<!-- implement-issues: plan revision -->assets/planner-brief.mdWhen a planner reports:
- or
BLOCKED, or no commits on the branch: no pull request. Keep the worktree and record why.NEEDS_DESIGN_SESSION - A revision: confirm it pushed and replied, then post a conversation comment on the plan pull request — `Plan revision <n> of <cap>. <!-- implement-issues: plan revision -->` — and leave it waiting.
- Plan approval on: push the branch and open a draft plan pull request —
, title
gh pr create --draft, body fromplan: <issue title> (<reference>), base the base branch or the dependency's branch. Create theassets/plan-pr-body.mdlabel first ifplan-approveddoesn't show it. Leave the issue waiting.gh label list - Plan approval off: go straight to Stage 4 with the planner's spec and plan.
对于每个需要 plan 的 Issue,创建其 branch 和 worktree,然后 dispatch 其 Planner:
-
**Branch:**如果 Issue 被标记为 bug,则使用,否则使用
fix/<ref>-<slug>。feat/<ref>-<slug>是去掉<ref>的 Issue reference(例如#、42);PROJ-123是将 title 转为小写后,把每一段<slug>之外的字符替换为a-z0-9,并截取到 40 个字符。- -
Worktree:,使用 git 从 base branch 或依赖项的 branch 创建。不要将
.worktrees/<ref>-<slug>提交进去:如果.worktrees/失败,将其添加到git check-ignore -q .worktrees。.git/info/excludebashgit worktree add -b "<branch>" ".worktrees/<ref>-<slug>" "origin/<base>" -
**Planner:**使用没有 Plan Pull Request 的填充内容,并以 background Agent 形式在 planner seat 上 dispatch。
assets/planner-brief.md
对于每个需要 revise the plan 的 Issue,如果其 worktree 干净则直接复用;否则从已 push 的 branch 创建一个()。统计已经完成的修订轮次——即 Plan Pull Request 的 conversation comments 中包含 的评论数量。达到当前 effort 的上限时,将其留在 waiting 状态并记录原因。否则,从 dispatch 一个 Planner,并指明 Plan Pull Request。
git worktree add ".worktrees/<ref>-<slug>" "<branch>"<!-- implement-issues: plan revision -->assets/planner-brief.md当 Planner 报告以下结果时:
- 或
BLOCKED,或者 branch 上没有 commits:不创建 Pull Request。保留 worktree 并记录原因。NEEDS_DESIGN_SESSION - **一次修订:**确认其已 push 并回复后,在 Plan Pull Request 上发布一条 conversation comment——`Plan revision <n> of <cap>. <!-- implement-issues: plan revision -->`——并将其留在 waiting 状态。
- **Plan Approval on:**push branch 并打开一个 draft Plan Pull Request——,title 为
gh pr create --draft,body 来自plan: <issue title> (<reference>),base 为 base branch 或依赖项的 branch。如果assets/plan-pr-body.md没有显示gh label list,则先创建该 label。将该 Issue 留在 waiting 状态。plan-approved - **Plan Approval off:**直接进入 Stage 4,使用 Planner 的 spec 和 plan。
Stage 4 — Build
Stage 4 — Build
For each issue to build, reuse its worktree when it is clean, or create
one from the pushed branch. Fill in and dispatch it as
a background agent on the build-lead seat. Sequential: one issue at a time.
Parallel: up to N at once, starting the next as each one ends. Keep each build
lead's identity; Stages 5 and 8 may message it.
assets/build-brief.md对于每个需要 build 的 Issue,如果其 worktree 干净则复用,否则从已 push 的 branch 创建一个。使用 填充内容,并以 background Agent 形式在 build-lead seat 上 dispatch。Sequential:每次一个 Issue。Parallel:最多同时 N 个,并在每个 Issue 结束时启动下一个。保持每个 Build Lead 的身份;Stage 5 和 Stage 8 可以向它发送消息。
assets/build-brief.mdStage 5 — Verify each built issue
Stage 5 — Verify each built issue
When a build lead reports:
- A or
BLOCKEDreport, or no new commits on the branch, means no pull request. Keep the worktree and record why.NEEDS_DESIGN_SESSION - Check the work yourself inside its worktree: read
and the diff, and run the project's test, lint, and typecheck commands (from
git log origin/<base>..HEADor the project's manifest). Write each command's output to a log file under the worktree's git directory and read back its exit code, its summary, and the tail of any failure — not the whole log. An agent's "tests pass" is a claim, not evidence.AGENTS.md - If a check fails, send the same build lead one message with the failures, then verify again. Still failing: no pull request; record the failure.
当 Build Lead 报告以下结果时:
- 报告 或
BLOCKED,或者 branch 上没有新的 commits,意味着不创建 Pull Request。保留 worktree 并记录原因。NEEDS_DESIGN_SESSION - 亲自在其 worktree 中进行检查:阅读 和 diff,并运行项目的 test、lint 和 typecheck 命令(来自
git log origin/<base>..HEAD或项目 manifest)。将每条命令的输出写入 worktree 的 git 目录下的日志文件,并读回其 exit code、summary 和任何失败的末尾部分——无需读取完整日志。Agent 所说的 "tests pass" 只是一个声明,不是证据。AGENTS.md - 如果某项检查失败,将失败信息通过一条消息发送给同一个 Build Lead,然后再次验证。如果仍然失败:不创建 Pull Request;记录失败原因。
Stage 6 — Open the draft pull request
Stage 6 — Open the draft pull request
Land each verified branch through . Its menu
is already answered — push and create a pull request, as a draft — so don't
wait on it. Below high effort, Stage 5's check run is its Step 1 when HEAD
hasn't moved since.
finishing-a-development-branch- Title: Conventional Commit form ending with the issue's reference, for
example .
feat: confirm waitlist emails (#42) - Body: fill in . Its link line comes from the tracker's Linking section. First judge each item the report left undone yourself: one no change to this repository can do is a follow-up, and follow-ups never make the work partial. With nothing else left undone, write the finishing reference (on GitHub,
assets/pr-body.md); otherwise the partial reference (Closes #42) followed by what is left. A tracker whose Finishing PR is None has no finishing reference: write the partial reference, and say whether the work fully resolves the issue. This isRelates to #42's rule for unattended runs.superpowers-issue-bridge - Base: the base branch, or the dependency's branch for a dependent issue.
- An approved plan pull request is this issue's pull request: push to
its branch, then give it the title and body above with
. It stays a draft.
gh pr edit <number> --title <title> --body-file <file>
Keep each worktree after its pull request opens — review fixes happen there.
通过 完成每个已验证 branch 的收尾。它的 menu 已经回答完毕——push 并创建一个 draft Pull Request——因此不要等待它。在低于 high 的 effort 下,如果 HEAD 自 Stage 5 以来没有移动,Stage 5 的 check run 就是它的 Step 1。
finishing-a-development-branch- **Title:**使用 Conventional Commit 格式,并以 Issue reference 结尾,例如 。
feat: confirm waitlist emails (#42) - **Body:**填充 。其 link line 来自 tracker 的 Linking 部分。首先自行判断报告中每个未完成项:如果 repository 内无需任何改动即可处理,则它属于 follow-up;follow-up 不会使工作变成部分完成。如果不存在其他未完成项,则写入 finishing reference(在 GitHub 上为
assets/pr-body.md);否则写入 partial reference(Closes #42),并说明还剩下什么。如果 tracker 的 Finishing PR 为 None,则没有 finishing reference:写入 partial reference,并说明该工作是否完整解决了 Issue。这是Relates to #42对无人值守运行的规则。superpowers-issue-bridge - **Base:**base branch;对于依赖 Issue,则使用其依赖项的 branch。
- 已批准的 Plan Pull Request就是该 Issue 的 Pull Request:push 到其 branch,然后使用上述 title 和 body 执行 。它仍然是 draft。
gh pr edit <number> --title <title> --body-file <file>
每个 Pull Request 打开后都要保留其 worktree——review 修复将在其中进行。
Stage 7 — Review the pull request
Stage 7 — Review the pull request
Dispatch a new agent on the pr-reviewer seat — never the planner or the
build lead — to run on , telling it:
review-prs #<number><owner/repo>- the user's go-ahead for this run covers posting the review;
- below high effort, the code pass is off, because the build's whole-branch review already covered the code;
- at high effort, the code pass's model: the PR code reviewer's resolved
model, which comes first in ' own order.
review-prs
It posts its findings as comments on the pull request and reports the
review's URL. A review changes nothing locally, so it can run while other
issues build.
When the Review agent is on Codex, run the review yourself through the
Codex CLI instead of dispatching an agent:
-
Gather the context into:
<worktree git dir>/implement-issues/review-<number>/frompr.json,gh pr view <number> --json number,url,title,body,baseRefName,headRefOidfromcomments.json, andgh api --paginate repos/<owner>/<repo>/pulls/<number>/commentswith the linked intent issue's body, read with the tracker's Reading method — left out when the pull request links none. In the worktree, runissue.md.git fetch origin <base> pull/<number>/head -
Fill inas
assets/review-brief.mdin that directory, with the code pass off below high effort and the PR code reviewer's resolved Codex model. Run, in the background:brief.mdbashcodex exec -C "<worktree>" -m "<Review agent's resolved Codex model>" -s read-only --json \ -o "<context dir>/report.md" - < "<context dir>/brief.md" -
When it exits,must hold exactly one fenced
report.mdblock. Write it tojsonin the same directory, set itsreview.jsonwhatever it says, and check that its"event": "COMMENT"iscommit_id'spr.json— a different commit posts nothing. Then post it:headRefOid. Read the review's URL from the response.gh api --method POST repos/<owner>/<repo>/pulls/<number>/reviews --input <context dir>/review.json -
No block, more than one, a non-zero exit, or a failed post: post nothing, leave the pull request a draft, and record why.
Read Codex's token counts from its events for the report when they
include them. Everything after the review is the same as for any review
agent.
--jsonNo review posted: leave the pull request a draft and record why. A review
with no findings: go to Stage 8, step 3.
在 pr-reviewer seat 上 dispatch 一个新的 Agent——绝不能使用 Planner 或 Build Lead——让它对 运行 ,并告知它:
<owner/repo>review-prs #<number>- 用户对本次运行的许可涵盖发布 review;
- 在低于 high 的 effort 下,代码检查关闭,因为 build 的整分支 review 已经覆盖了代码;
- 在 high effort 下,提供 PR Code Reviewer 解析后的 model;该 model 首先由 自身的顺序决定。
review-prs
它会将发现作为 comments 发布到 Pull Request 上,并报告 review 的 URL。Review 不会在本地修改任何内容,因此可以在其他 Issues build 时并行运行。
**当 Review Agent 位于 Codex 上时,**不要 dispatch Agent,而是亲自通过 Codex CLI 运行 review:
-
将上下文收集到:
<worktree git dir>/implement-issues/review-<number>/来自pr.json,gh pr view <number> --json number,url,title,body,baseRefName,headRefOid来自comments.json,gh api --paginate repos/<owner>/<repo>/pulls/<number>/comments包含关联意图 Issue 的正文,并使用 tracker 的 Reading method 读取——如果 Pull Request 没有关联 Issue,则省略该文件。在 worktree 中运行issue.md。git fetch origin <base> pull/<number>/head -
使用填充该目录中的
assets/review-brief.md,在低于 high effort 时关闭代码检查,并提供 PR Code Reviewer 解析后的 Codex model。在后台运行:brief.mdbashcodex exec -C "<worktree>" -m "<Review agent's resolved Codex model>" -s read-only --json \ -o "<context dir>/report.md" - < "<context dir>/brief.md" -
退出后,必须恰好包含一个 fenced
report.mdblock。将其写入同一目录中的json,无论其内容如何,都将其review.json,并检查其"event": "COMMENT"是否等于commit_id中的pr.json——如果 commit 不同,则不发布任何内容。然后发布它:headRefOid。 从响应中读取 review 的 URL。gh api --method POST repos/<owner>/<repo>/pulls/<number>/reviews --input <context dir>/review.json -
如果没有 block、存在多个 block、退出码非零或发布失败:不发布任何内容,将 Pull Request 保留为 draft,并记录原因。
如果 report 的 events 包含 token counts,则读取 Codex 的 token 用量。Review 之后的所有步骤与使用其他 Review Agent 时完全相同。
--json没有发布 review:将 Pull Request 保留为 draft,并记录原因。Review 没有 findings:进入 Stage 8 的第 3 步。
Stage 8 — Answer the review and mark it ready
Stage 8 — Answer the review and mark it ready
- Message the build lead — or, if it can no longer be messaged, dispatch a
new one on the build-lead seat into the same worktree — to run
on
answer-pr-reviews #<number>in that worktree, telling it the user's go-ahead for this run covers pushing the fixes and replying to each comment.<owner/repo> - At medium and high effort, verify the pushed head with
, running Stage 5's checks yourself. If one fails, send the build lead the failures once, then check again. At low effort, CI is the evidence for the review fixes; run Stage 5's checks only when the pull request has no CI.
verification-before-completion - Wait for the pull request's CI checks on the pushed head —
. When it reports no checks, there is nothing to wait for. Passing locally is not passing CI: a check can fail only there, on a different runtime, a missing variable, or a step the project's local commands skip. When one fails, send the build lead the failing check's name and log (
gh pr checks <number> --watch), asking it to fix, commit, and push this branch — never force. Then run step 2 again and wait for CI again, up to the effort's CI fix attempts.gh run view <run-id> --log-failed - Mark the pull request ready — — once the checks pass and every review comment has a reply. It stays a draft, and you record why, when the checks still fail or a finding that holds was left unfixed.
gh pr ready <number>
- 向 Build Lead 发送消息——如果已无法向它发送消息,则在同一个 worktree 中、build-lead seat 上 dispatch 一个新的 Agent——让它在 worktree 中对 运行
<owner/repo>,并告知它,用户对本次运行的许可涵盖 push 修复以及回复每条评论。answer-pr-reviews #<number> - 在 medium 和 high effort 下,使用 验证已 push 的 HEAD,并亲自运行 Stage 5 的 checks。如果某项检查失败,将失败信息发送给 Build Lead 一次,然后再次检查。在 low effort 下,CI 是 review 修复的证据;仅在 Pull Request 没有 CI 时才运行 Stage 5 的 checks。
verification-before-completion - 等待已 push HEAD 上的 Pull Request CI checks——。如果它报告没有 checks,则无需等待。本地通过不等于 CI 通过:某项检查可能只在 CI 中失败,原因包括不同的 runtime、缺少变量,或项目的本地命令跳过了某个步骤。如果某项检查失败,将失败 check 的名称和日志(
gh pr checks <number> --watch)发送给 Build Lead,要求它修复、commit 并 push 此 branch——绝不能 force push。然后再次执行第 2 步并重新等待 CI,最多尝试当前 effort 规定的 CI 修复次数。gh run view <run-id> --log-failed - 只有当 checks 通过且每条 review comment 都已回复时,才将 Pull Request 标记为 ready——。如果 checks 仍然失败,或存在未修复的实质性 finding,则将其保留为 draft,并记录原因。
gh pr ready <number>
Stage 9 — Report
Stage 9 — Report
One table: issue, branch, pull request URL or the reason there is none,
state (waiting on plan approval, ready, or draft and why), checks result
locally and in CI, review findings by severity with how many were fixed, and
how many decisions the agents made. Above it, the run's effort and plan
approval and the preset; under it, each agent with its provider and the
model each of its seats ran on, with token use or time per agent where the
provider reports them. Then list every issue waiting or
skipped in Stage 1, and why.
A pull request with the partial reference leaves its issue open when it
merges. For each one that left work undone, ask the user once, naming that
work: does it fully resolve the issue? On yes, swap its link line for the
finishing reference () and keep what
was left undone as follow-ups.
gh pr edit <number> --body-file <file>A tracker with no finishing reference — local markdown, or a Jira or Trello
board that no integration closes — has no link line to swap. For each
pull request that fully resolves its issue, including each yes above, give
the user the tracker's Close-by-hand step to run once it merges.
输出一张表:Issue、branch、Pull Request URL 或没有 PR 的原因、状态(等待 Plan Approval、ready,或 draft 及其原因)、本地和 CI checks 结果、按严重程度划分的 review findings 及其修复数量,以及 Agents 作出的决策数量。在表格上方,列出本次运行的 effort、Plan Approval 和 Preset;在表格下方,列出每个 Agent 及其 provider,以及每个 seat 使用的 model,并在 provider 提供相应数据时列出 token 用量或耗时。然后列出 Stage 1 中所有 waiting 或 skipped 的 Issues 及其原因。
使用 partial reference 的 Pull Request 在 merge 后仍会让其 Issue 保持开放。对于每个仍有未完成工作的 Pull Request,只询问用户一次并明确指出这些工作:它是否完整解决了 Issue?如果回答 yes,将 link line 替换为 finishing reference(),并仍将未完成部分保留为 follow-ups。
gh pr edit <number> --body-file <file>对于没有 finishing reference 的 tracker——例如本地 Markdown,或没有 integration 可关闭 Issue 的 Jira 或 Trello board——没有需要替换的 link line。对于每个完整解决其 Issue 的 Pull Request,包括上面所有回答 yes 的 Pull Request,向用户提供 tracker 的 Close-by-hand 步骤,以便在 merge 后执行一次。
What NOT to do
What NOT to do
- Don't merge, enable auto-merge, or approve a pull request — marking it ready hands it to the user, who accepts the work.
- Don't let a Codex agent write — run it only with , and post its review yourself. Don't post a Codex review unless its reply holds exactly one fenced
-s read-onlyblock.json - Don't read a run override's wording any other way than Stage 2's vocabulary, and don't start before the user confirms the printed agents table.
- Don't push the base branch, and never force-push.
- Don't take an agent's report as proof — run the checks yourself before the first push, at every effort.
- Don't open a pull request for an issue that already has one, other than converting its approved plan pull request.
- Don't build from a plan pull request without the label, and don't add that label yourself — approval is the user's.
plan-approved - Don't offer or dispatch a model your platform's dispatch doesn't accept, and don't fall back to another model silently.
- Don't write a model name into this skill or its assets; model names live
only in , as the user's choice.
docs/agents/delivery.md - Don't save settings to without showing the diff and receiving a yes.
docs/agents/delivery.md - Don't write the finishing reference while work this repository could do is left undone, unless the user says in Stage 9 that the pull request fully resolves the issue. Don't write the partial reference for follow-ups alone.
- Don't open a pull request whose Decisions section is missing or vague — it is the only place the user sees the choices an agent made for them.
- Don't have the planner or the build lead review their own pull request.
- Don't mark a pull request ready while a review comment is unanswered or the checks fail on the pushed head — locally or in CI.
- 不要 merge、启用 auto-merge 或 approve Pull Request——标记为 ready 只是将其交给用户,由用户接受工作。
- 不要让 Codex Agent 写入内容——仅使用 运行它,并由你亲自发布其 review。如果 Codex 的回复不是恰好包含一个 fenced
-s read-onlyblock,不要发布其 Codex review。json - 除了 Stage 2 的词汇表之外,不要以其他任何方式解读运行 override 的措辞,并且不要在用户确认打印出的 Agent 表格之前开始运行。
- 不要 push base branch,绝不要 force-push。
- 不要把 Agent 的报告当作证据——在首次 push 前以及所有 effort 下,都要亲自运行 checks。
- 不要为已有 Pull Request 的 Issue 再创建 Pull Request,转换已批准的 Plan Pull Request 除外。
- 不要在没有 label 的情况下从 Plan Pull Request 开始 build,也不要自行添加该 label——批准权属于用户。
plan-approved - 不要提供或 dispatch 平台 dispatch 不接受的 model,也不要悄悄回退到另一个 model。
- 不要把 model 名称写入这个 skill 或其 assets;model 名称只能保存在 中,由用户选择。
docs/agents/delivery.md - 不要在未展示 diff 且未获得用户 yes 的情况下,将 settings 保存到 。
docs/agents/delivery.md - 不要在 repository 本可完成的 work 仍有未完成项时写入 finishing reference,除非用户在 Stage 9 中说明该 Pull Request 完整解决了 Issue。不要仅为 follow-ups 写入 partial reference。
- 不要打开缺少 Decisions 部分或其内容含糊的 Pull Request——这是用户唯一能看到 Agent 代其所作选择的地方。
- 不要让 Planner 或 Build Lead review 自己创建的 Pull Request。
- 不要在仍有未回复的 review comment,或已 push HEAD 上的 checks——无论本地还是 CI——失败时,将 Pull Request 标记为 ready。