[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70DH0BY56EXSQRB1BVXP8YV":3,"skill-same:01M70DH0BY56EXSQRB1BVXP8YV":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M70DH0BY56EXSQRB1BVXP8YV","subagent-driven-development",null,"Use when executing implementation plans with independent tasks in the current session","EthanYoQ\u002FSkill-hub","EthanYoQ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257484394?v=4","01M70C9QKWR1YS0S7V26DNB18H","Ethan","01M70C9QMER047R5ANZZA6KC2P",11,"MIT","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34],"development","subagent driven development","subagent","driven","session","plans","use","when","tasks","with","implementation","2026-11-10 10:12:30",false,"---\nname: subagent-driven-development\ndescription: Use when executing implementation plans with independent tasks in the current session\n---\n\n# Subagent-Driven Development\n\nExecute plan by dispatching a fresh implementer subagent per task, a task review (spec compliance + code quality) after each, and a broad whole-branch review at the end.\n\n**Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.\n\n**Core principle:** Fresh subagent per task + task review (spec + quality) + broad final review = high quality, fast iteration\n\n**Narration:** between tool calls, narrate at most one short line — the\nledger and the tool results carry the record.\n\n**Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. \"Should I continue?\" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.\n\n## When to Use\n\n```dot\ndigraph when_to_use {\n    \"Have implementation plan?\" [shape=diamond];\n    \"Tasks mostly independent?\" [shape=diamond];\n    \"Stay in this session?\" [shape=diamond];\n    \"subagent-driven-development\" [shape=box];\n    \"executing-plans\" [shape=box];\n    \"Manual execution or brainstorm first\" [shape=box];\n\n    \"Have implementation plan?\" -> \"Tasks mostly independent?\" [label=\"yes\"];\n    \"Have implementation plan?\" -> \"Manual execution or brainstorm first\" [label=\"no\"];\n    \"Tasks mostly independent?\" -> \"Stay in this session?\" [label=\"yes\"];\n    \"Tasks mostly independent?\" -> \"Manual execution or brainstorm first\" [label=\"no - tightly coupled\"];\n    \"Stay in this session?\" -> \"subagent-driven-development\" [label=\"yes\"];\n    \"Stay in this session?\" -> \"executing-plans\" [label=\"no - parallel session\"];\n}\n```\n\n**vs. Executing Plans (parallel session):**\n- Same session (no context switch)\n- Fresh subagent per task (no context pollution)\n- Review after each task (spec compliance + code quality), broad review at the end\n- Faster iteration (no human-in-loop between tasks)\n\n## The Process\n\n```dot\ndigraph process {\n    rankdir=TB;\n\n    subgraph cluster_per_task {\n        label=\"Per Task\";\n        \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\" [shape=box];\n        \"Implementer asks questions?\" [shape=diamond];\n        \"Answer questions, provide context\" [shape=box];\n        \"Implementer implements, tests, commits, self-reviews\" [shape=box];\n        \"Generate review package, dispatch task reviewer (.\u002Ftask-reviewer-prompt.md)\" [shape=box];\n        \"Spec ✅ and quality approved?\" [shape=diamond];\n        \"Finding conflicts with plan text?\" [shape=diamond];\n        \"Ask human partner which governs\" [shape=box];\n        \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" [shape=box];\n        \"Dispatch scoped re-review (.\u002Fre-review-prompt.md)\" [shape=box];\n        \"All findings addressed?\" [shape=diamond];\n        \"R = 5?\" [shape=diamond];\n        \"Adjudicate each open finding\" [shape=box];\n        \"Any load-bearing finding?\" [shape=diamond];\n        \"STOP: report BLOCKED to human partner\" [shape=box];\n        \"Park findings in ledger with rulings\" [shape=box];\n        \"Append completion to ledger, mark todo complete\" [shape=box];\n    }\n\n    \"Setup: worktree, ledger check, read plan, pre-flight review\" [shape=box];\n    \"More tasks remain?\" [shape=diamond];\n    \"Dispatch final code reviewer (..\u002Frequesting-code-review\u002Fcode-reviewer.md)\" [shape=box];\n    \"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals\" [shape=box];\n    \"Final review clean: delete this plan's workspace\" [shape=box];\n    \"Use superpowers:finishing-a-development-branch\" [shape=box style=filled fillcolor=lightgreen];\n\n    \"Setup: worktree, ledger check, read plan, pre-flight review\" -> \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\";\n    \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\" -> \"Implementer asks questions?\";\n    \"Implementer asks questions?\" -> \"Answer questions, provide context\" [label=\"yes\"];\n    \"Answer questions, provide context\" -> \"Implementer implements, tests, commits, self-reviews\";\n    \"Implementer asks questions?\" -> \"Implementer implements, tests, commits, self-reviews\" [label=\"no\"];\n    \"Implementer implements, tests, commits, self-reviews\" -> \"Generate review package, dispatch task reviewer (.\u002Ftask-reviewer-prompt.md)\";\n    \"Generate review package, dispatch task reviewer (.\u002Ftask-reviewer-prompt.md)\" -> \"Spec ✅ and quality approved?\";\n    \"Spec ✅ and quality approved?\" -> \"Append completion to ledger, mark todo complete\" [label=\"yes\"];\n    \"Spec ✅ and quality approved?\" -> \"Finding conflicts with plan text?\" [label=\"no\"];\n    \"Finding conflicts with plan text?\" -> \"Ask human partner which governs\" [label=\"yes\"];\n    \"Ask human partner which governs\" -> \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\";\n    \"Finding conflicts with plan text?\" -> \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" [label=\"no\"];\n    \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" -> \"Dispatch scoped re-review (.\u002Fre-review-prompt.md)\";\n    \"Dispatch scoped re-review (.\u002Fre-review-prompt.md)\" -> \"All findings addressed?\";\n    \"All findings addressed?\" -> \"Append completion to ledger, mark todo complete\" [label=\"yes\"];\n    \"All findings addressed?\" -> \"R = 5?\" [label=\"no\"];\n    \"R = 5?\" -> \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" [label=\"no - next round\"];\n    \"R = 5?\" -> \"Adjudicate each open finding\" [label=\"yes - breaker trips\"];\n    \"Adjudicate each open finding\" -> \"Any load-bearing finding?\";\n    \"Any load-bearing finding?\" -> \"STOP: report BLOCKED to human partner\" [label=\"yes\"];\n    \"Any load-bearing finding?\" -> \"Park findings in ledger with rulings\" [label=\"no\"];\n    \"Park findings in ledger with rulings\" -> \"Append completion to ledger, mark todo complete\";\n    \"Append completion to ledger, mark todo complete\" -> \"More tasks remain?\";\n    \"More tasks remain?\" -> \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\" [label=\"yes\"];\n    \"More tasks remain?\" -> \"Dispatch final code reviewer (..\u002Frequesting-code-review\u002Fcode-reviewer.md)\" [label=\"no\"];\n    \"Dispatch final code reviewer (..\u002Frequesting-code-review\u002Fcode-reviewer.md)\" -> \"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals\";\n    \"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals\" -> \"Final review clean: delete this plan's workspace\";\n    \"Final review clean: delete this plan's workspace\" -> \"Use superpowers:finishing-a-development-branch\";\n}\n```\n\n## Setup\n\nEnsure the work happens in an isolated workspace: use\nsuperpowers:using-git-worktrees to create one or verify the existing one.\nNever start implementation on a main\u002Fmaster branch without your human\npartner's explicit consent.\n\nConversation memory does not survive compaction. In real sessions,\ncontrollers that lost their place have re-dispatched entire completed task\nsequences — the single most expensive failure observed. Track progress in\na ledger file, not only in todos.\n\n- Each plan owns a workspace: at skill start, run this skill's\n  `scripts\u002Fsdd-workspace PLAN_FILE` — it prints the plan's git-ignored\n  directory (`\u003Crepo-root>\u002F.superpowers\u002Fsdd\u002F\u003Cplan-basename>\u002F`), home to\n  every artifact for THIS plan: ledger, briefs, reports, review packages.\n  Another plan's directory is never yours to read or write.\n- Check for this plan's ledger at `\u003Cworkspace>\u002Fprogress.md`. If its first\n  line names your plan file, tasks with a `Task \u003CN>: complete` line are DONE\n  — do not re-dispatch them; resume at the first task without one. A task\n  whose last line is a fix round is mid-loop: resume the loop at the next\n  round. A ledger whose first line names a different plan file — or a stray\n  ledger at the old flat path `.superpowers\u002Fsdd\u002Fprogress.md` — is another\n  plan's progress: leave it in place and start your own, fresh.\n- Create the ledger with its identity as the first line:\n  `# SDD ledger — plan: \u003Cplan file path>`.\n- The ledger is your recovery map: the commits it names exist in git even\n  when your context no longer remembers creating them. After compaction,\n  trust the ledger and `git log` over your own recollection.\n- `git clean -fdx` will destroy the workspace (it's git-ignored scratch); if\n  that happens, recover from `git log`.\n\nRead the plan once, note its context and Global Constraints, and create a\ntodo per task.\n\nBefore dispatching Task 1, scan the plan once for conflicts:\n\n- tasks that contradict each other or the plan's Global Constraints\n- anything the plan explicitly mandates that the review rubric treats as a\n  defect (a test that asserts nothing, verbatim duplication of a logic block)\n\nPresent everything you find to your human partner as one batched question —\neach finding beside the plan text that mandates it, asking which governs —\nbefore execution begins, not one interrupt per discovery mid-plan. If the\nscan is clean, proceed without comment. The review loop remains the net for\nconflicts that only emerge from implementation.\n\n## Model Selection\n\nUse the least powerful model that can handle each role to conserve cost and increase speed.\n\n**Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.\n\n**Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.\n\n**Architecture and design tasks**: use the most capable available model.\nThe final whole-branch review is one of these — dispatch it on the most\ncapable available model, not the session default.\n\n**Review tasks**: choose the model with the same judgment, scaled to the\ndiff's size, complexity, and risk. A small mechanical diff does not need the\nmost capable model; a subtle concurrency change does. Scoped re-reviews of\nsmall fix diffs take a cheap-to-mid tier.\n\n**Fix-loop escalation (rounds 4-5)**: use a model at least one tier above\nthe implementer that got stuck.\n\n**Always specify the model explicitly when dispatching a subagent.** An\nomitted model inherits your session's model — often the most capable and\nmost expensive — which silently defeats this section.\n\n**Turn count beats token price.** Wall-clock and context cost scale with how\nmany turns a subagent takes, and the cheapest models routinely take 2-3× the\nturns on multi-step work — costing more overall. Use a mid-tier model as the\nfloor for reviewers and for implementers working from prose descriptions.\nWhen the task's plan text contains the complete code to write, the\nimplementation is transcription plus testing: use the cheapest tier for\nthat implementer. Single-file mechanical fixes also take the cheapest tier.\n\n**Task complexity signals (implementation tasks):**\n- Touches 1-2 files with a complete spec → cheap model\n- Touches multiple files with integration concerns → standard model\n- Requires design judgment or broad codebase understanding → most capable model\n\n## The Task Loop\n\nEverything you paste into a dispatch prompt — and everything a subagent\nprints back — stays resident in your context for the rest of the session\nand is re-read on every later turn. Hand artifacts over as files.\n\n### 1. Dispatch the implementer\n\nRecord BASE (`git rev-parse HEAD`) before dispatching — the review package\nand fix-round diffs need it.\n\n- **Task brief:** before dispatching an implementer, run this skill's\n  `scripts\u002Ftask-brief PLAN_FILE N` — it extracts the task's full text to a\n  uniquely named file and prints the path. Compose the dispatch so the\n  brief stays the single source of\n  requirements. Your dispatch should contain: (1) one line on where this\n  task fits in the project; (2) the brief path, introduced as \"read this\n  first — it is your requirements, with the exact values to use verbatim\";\n  (3) interfaces and decisions from earlier tasks that the brief cannot\n  know; (4) your resolution of any ambiguity you noticed in the brief;\n  (5) the report-file path and report contract. Exact values (numbers,\n  magic strings, signatures, test cases) appear only in the brief. Never\n  make a subagent read the whole plan file.\n- **Report file:** name the implementer's report file after the brief\n  (brief `…\u002Ftask-N-brief.md` → report `…\u002Ftask-N-report.md`) and put it in\n  the dispatch prompt. The implementer writes the full report there and\n  returns only status, commits, a one-line test summary, and concerns.\n- A dispatch prompt describes one task, not the session's history. Do not\n  paste accumulated prior-task summaries (\"state after Tasks 1-3\") into\n  later dispatches — a real session's dispatch hit 42k chars of which 99%\n  was pasted history. A fresh subagent needs its task, the interfaces it\n  touches, and the global constraints. Nothing else.\n- If an earlier task parked a finding in the area this task touches, carry\n  a pointer to that ledger entry in the dispatch.\n- Record the implementer's agent identity from the dispatch result —\n  fix-loop rounds 1-3 resume this agent.\n- Never dispatch multiple implementation subagents in parallel (conflicts).\n\nTemplate: [implementer-prompt.md](implementer-prompt.md)\n\n### 2. Handle the report\n\nImplementer subagents report one of four statuses. Handle each appropriately:\n\n**DONE:** Generate the review package (`scripts\u002Freview-package PLAN_FILE BASE HEAD`, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never `HEAD~1`, which silently drops all but the last commit of a multi-commit task), then dispatch the task reviewer with the printed path.\n\n**DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., \"this file is getting large\"), note them and proceed to review.\n\n**NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.\n\n**BLOCKED:** The implementer cannot complete the task. Assess the blocker:\n1. If it's a context problem, provide more context and re-dispatch with the same model\n2. If the task requires more reasoning, re-dispatch with a more capable model\n3. If the task is too large, break it into smaller pieces\n4. If the plan itself is wrong, escalate to the human\n\n**Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.\n\nIf the implementer asks questions — before starting or mid-task — answer\nclearly and completely, provide additional context if needed, and don't\nrush it into implementation.\n\n### 3. Review the task\n\nPer-task reviews are task-scoped gates. The broad review happens once, at the\nfinal whole-branch review. Never skip the task review, and never accept a\nreport missing either verdict — spec compliance AND task quality are both\nrequired. Implementer self-review never replaces the task review; both are\nneeded.\n\n- Hand the reviewer its diff as a file: run this skill's\n  `scripts\u002Freview-package PLAN_FILE BASE HEAD` and pass the reviewer the file path\n  it prints (or, without bash: `git log --oneline`, `git diff --stat`,\n  and `git diff -U10` for the range, redirected to one uniquely named\n  file). The output never enters your own context, and the reviewer sees\n  the commit list, stat summary, and full diff with context in one Read\n  call. Use the BASE you recorded before dispatching the implementer —\n  never `HEAD~1`, which silently truncates multi-commit tasks. Never\n  dispatch a task reviewer without a diff file.\n- **Reviewer inputs:** the task reviewer gets three paths — the same brief\n  file, the report file, and the review package — plus the global\n  constraints that bind the task.\n- The global-constraints block you hand the reviewer is its attention\n  lens. Copy the binding requirements verbatim from the plan's Global\n  Constraints section or the spec: exact values, exact formats, and the\n  stated relationships between components (\"same layout as X\", \"matches\n  Y\"). The reviewer's template already carries the process rules (YAGNI,\n  test hygiene, review method) — the constraints block is for what THIS\n  project's spec demands.\n- Do not add open-ended directives like \"check all uses\" or \"run race tests\n  if useful\" without a concrete, task-specific reason\n- Do not ask a reviewer to re-run tests the implementer already ran on the\n  same code — the implementer's report carries the test evidence\n- Do not pre-judge findings for the reviewer — never instruct a reviewer to\n  ignore or not flag a specific issue. If you believe a finding would be a\n  false positive, let the reviewer raise it and adjudicate it in the review\n  loop. If the prompt you are writing contains \"do not flag,\" \"don't treat X\n  as a defect,\" \"at most Minor,\" or \"the plan chose\" — stop: you are\n  pre-judging, usually to spare yourself a review loop.\nThe task reviewer may report \"⚠️ Cannot verify from diff\" items — requirements\nthat live in unchanged code or span tasks. These do not block the rest of the\nreview, but you must resolve each one yourself before marking the task\ncomplete: you hold the plan and cross-task context the reviewer\nlacks. If you confirm an item is a real gap, treat it as a failed spec\nreview — it enters the fix loop with the other findings.\n\nTemplate: [task-reviewer-prompt.md](task-reviewer-prompt.md)\n\n### 4. The fix loop\n\nThe loop triggers when the review reports spec ❌, any Critical or Important\nfinding, or a ⚠️ item you confirmed as a real gap.\n\nBefore the loop starts, two routes leave it immediately:\n\n- Record Minor findings in the progress ledger as you go\n  (`Task \u003CN>: minor (deferred): \u003Cone-liner>`), and point the final\n  whole-branch review at that list so it can triage which must be fixed\n  before merge. A roll-up nobody reads is a silent discard. Minor findings\n  never enter the loop.\n- A finding labeled plan-mandated — or any finding that conflicts with\n  what the plan's text requires — is the human's decision, like any plan\n  contradiction: present the finding and the plan text, ask which governs.\n  Do not dismiss the finding because the plan mandates it, and do not\n  dispatch a fix that contradicts the plan without asking.\nEverything else enters the loop. A fix round is one fix dispatch plus one\nscoped re-review. Five rounds maximum per task:\n\n**Rounds 1-3 — resume the original implementer.** Send it the open findings\nverbatim. Its context is intact: it knows the task, the code, and its own\nchoices. If your harness cannot send another message to a live subagent,\ndispatch a fresh implementer carrying the brief path, the report-file path,\nand the findings — the report file is the persistent memory either way.\n\n**Rounds 4-5 — dispatch a fresh implementer on a more capable model** (per\nModel Selection), with the brief path, the report-file path, the open\nfindings, and this framing: \"A prior implementer attempted this task\n[N] times; you own it now. Read the report file for what was tried.\" A loop\nthat survives three resumes usually means the implementer cannot see its\nown problem — fresh eyes and a capability bump in one move.\n\n**Every round, either way:** the implementer fixes, re-runs the tests\ncovering the amended code, appends its fix report to the same report file,\nand returns the short contract. Before re-dispatching the reviewer, confirm\nthe fix report contains the covering tests, the command run, and the\noutput; dispatch the re-review once all three are present. Name the\ncovering test files in the fix message — a one-line fix does not need the\nwhole suite.\n\n**The re-review is scoped.** Run `scripts\u002Freview-package PLAN_FILE FIX_BASE HEAD`\nwhere FIX_BASE is the head the previous review saw, and dispatch\n[re-review-prompt.md](re-review-prompt.md) with the findings list, the\nbrief, the report file, and the printed diff path. The re-reviewer verdicts\neach finding ADDRESSED or NOT ADDRESSED and flags new breakage in the fix\ndiff only. New Critical\u002FImportant breakage in the fix diff joins the open\nfindings list. Out-of-scope observations go to the ledger as deferred\nminors — they never extend the loop.\n\n**After each round,** append to the ledger:\n`Task \u003CN>: fix round \u003CR>\u002F5 (\u003CX> addressed, \u003CY> open — \u003Cfinding one-liners>; commits \u003Ca7>..\u003Cb7>)`\n\nNever fix findings yourself in the controller session — your context stays\nclean for coordination, and controller fixes skip review.\n\n**The breaker.** When round 5's re-review still leaves findings open, stop\ndispatching. Adjudicate each open finding yourself — you hold the plan and\nthe cross-task context the reviewer lacks:\n\n- **The reviewer is wrong, or the point is contestable:** park it —\n  `Task \u003CN>: parked — \u003Cfinding> — ruling: \u003Cwhy the code stands>`. The final\n  review sees both sides.\n- **Real, but nothing downstream builds on it:** park it the same way, with\n  a ruling that says it's real and deferred.\n- **Real and load-bearing** — a later task builds on it, or it reveals a\n  plan defect: STOP. Append `Task \u003CN>: BLOCKED — \u003Creason>` and report to\n  your human partner with the finding, the plan text it collides with, and\n  the fix history. Parking a structural failure lets every dependent task\n  build on it and hands the final review a problem it cannot fix either.\n\nAdjudicate only at the cap. Adjudicating earlier to end a loop is\npre-judging with a different name. Every adjudication is a ledger entry —\na silent discard is forbidden.\n\n### 5. Complete the task\n\nWhen the review comes back clean — or every open finding is parked with a\nruling at the cap — append the completion line to the ledger in the same\nmessage as your other bookkeeping:\n\n- `Task \u003CN>: complete (commits \u003Cbase7>..\u003Chead7>, review clean)`\n- `Task \u003CN>: complete (commits \u003Cbase7>..\u003Chead7>, \u003CK> parked)` after a\n  tripped breaker\n\nThen mark the todo complete and move on. Never move to the next task while\nthe review has open Critical\u002FImportant issues that are neither fixed nor\nparked-with-ruling at the cap.\n\n## Final Review\n\nThe final whole-branch review gets a package too: run\n`scripts\u002Freview-package PLAN_FILE MERGE_BASE HEAD` (MERGE_BASE = the commit the\nbranch started from, e.g. `git merge-base main HEAD`) and include the\nprinted path in the final review dispatch, so the final reviewer reads\none file instead of re-deriving the branch diff with git commands. Dispatch\non the most capable available model (see Model Selection), using\nsuperpowers:requesting-code-review's\n[code-reviewer.md](..\u002Frequesting-code-review\u002Fcode-reviewer.md). Point it at\nthe ledger's deferred-minor and parked lines so it can triage which must be\nfixed before merge.\n\nIf the final whole-branch review returns findings, dispatch ONE fix subagent\nwith the complete findings list — not one fixer per finding.\nPer-finding fixers each rebuild context and re-run suites; a real\nsession's final-review fix wave cost more than all its tasks combined.\nThen run exactly one scoped re-review of the fix wave\n(`scripts\u002Freview-package PLAN_FILE FIX_BASE HEAD` over the fix range,\n[re-review-prompt.md](re-review-prompt.md)).\nAdjudicate any residual findings as in the task loop's breaker: park with\nrulings, or stop on load-bearing ones. There is no second fix wave —\nresidual load-bearing findings surface to your human partner when\nfinishing-a-development-branch presents the options.\n\n## Finish\n\nWhen the final whole-branch review is clean and its fixes are merged,\ndelete this plan's workspace (`rm -rf \u003Cworkspace>`) — the git history is\nthe record now. Sibling directories belong to other plans; leave them\nalone.\n\nUse superpowers:finishing-a-development-branch.\n\n## Common Rationalizations\n\n| Excuse | Reality |\n|--------|---------|\n| \"Close enough on spec compliance\" | Reviewer found spec gaps = not done. Fix or hit the cap and adjudicate — those are the only exits. |\n| \"I'll fix it myself, dispatching is overhead\" | Controller fixes pollute your context and skip review. Resume the implementer. |\n| \"One more round will converge\" | Past the cap, rounds don't converge — the failure is structural. Adjudicate and route. |\n| \"The reviewer will just find something new anyway\" | Scoped re-reviews verify fixes; they cannot wander. New findings on untouched code go to the ledger, not the loop. |\n| \"This finding is obviously wrong, I'll drop it\" | You adjudicate only at the cap, and every ruling is a ledger entry. Silent discards are forbidden. |\n| \"The fix was small, skip the re-review\" | Unreviewed fixes are how regressions land. Every round ends with a scoped re-review. |\n| \"Reviews slow the loop down\" | The loop without reviews is just unverified churn. Reviews are the loop's brakes and steering. |\n| \"Ledger bookkeeping is overhead\" | The ledger is what survives compaction. Controllers without one have re-dispatched entire completed task sequences. |\n\n## Example Workflow\n\n```\nYou: I'm using Subagent-Driven Development to execute this plan.\n\n[Setup: worktree verified]\n[Read plan file once: docs\u002Fsuperpowers\u002Fplans\u002Ffeature-plan.md]\n[Resolve workspace: scripts\u002Fsdd-workspace docs\u002Fsuperpowers\u002Fplans\u002Ffeature-plan.md — no ledger inside, fresh start]\n[Create todos for all tasks]\n\nTask 1: Hook installation script\n\n[Run task-brief for Task 1; dispatch implementer with brief + report paths + context]\n\nImplementer: \"Before I begin - should the hook be installed at user or system level?\"\n\nYou: \"User level (~\u002F.config\u002Fsuperpowers\u002Fhooks\u002F)\"\n\nImplementer: [Later]\n  - Implemented install-hook command\n  - Added tests, 5\u002F5 passing\n  - Self-review: Found I missed --force flag, added it\n  - Committed\n\n[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]\nTask reviewer: Spec ✅ - all requirements met, nothing extra.\n  Strengths: Good test coverage, clean. Issues: None. Task quality: Approved.\n\n[Ledger: Task 1: complete (commits a1b2c3d..d4e5f6a, review clean)]\n\nTask 2: Recovery modes\n\n[Run task-brief for Task 2; dispatch implementer with brief + report paths + context]\n\nImplementer: [No questions]\n  - Added verify\u002Frepair modes\n  - 8\u002F8 tests passing\n  - Committed\n\n[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]\nTask reviewer: Spec ❌:\n  - Missing: Progress reporting (spec says \"report every 100 items\")\n  Issues (Important): Magic number (100)\n\n[Fix round 1: resume the implementer with both findings]\nImplementer: Added progress reporting, extracted PROGRESS_INTERVAL constant.\n  Re-ran test\u002Frecovery.test.js — 10\u002F10 passing. Fix report appended.\n\n[Run review-package PLAN_FILE FIX_BASE HEAD; dispatch scoped re-review]\nRe-reviewer: Missing progress reporting — ADDRESSED (src\u002Frecovery.js:41).\n  Magic number — ADDRESSED (src\u002Frecovery.js:7). New breakage: none.\n  Verdict: all findings addressed.\n\n[Ledger: Task 2: fix round 1\u002F5 (2 addressed, 0 open; commits d4e5f6a..b7c8d9e)]\n[Ledger: Task 2: complete (commits d4e5f6a..b7c8d9e, review clean)]\n\n...\n\n[After all tasks]\n[Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]\nFinal reviewer: All requirements met. Deferred minors triaged: none block merge.\n\n[Delete this plan's workspace — the record now lives in git]\n\nDone! Using superpowers:finishing-a-development-branch.\n```\n","# Subagent-Driven Development\n\nExecute plan by dispatching a fresh implementer subagent per task, a task review (spec compliance + code quality) after each, and a broad whole-branch review at the end.\n\n**Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.\n\n**Core principle:** Fresh subagent per task + task review (spec + quality) + broad final review = high quality, fast iteration\n\n**Narration:** between tool calls, narrate at most one short line — the\nledger and the tool results carry the record.\n\n**Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. \"Should I continue?\" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.\n\n## When to Use\n\n```dot\ndigraph when_to_use {\n    \"Have implementation plan?\" [shape=diamond];\n    \"Tasks mostly independent?\" [shape=diamond];\n    \"Stay in this session?\" [shape=diamond];\n    \"subagent-driven-development\" [shape=box];\n    \"executing-plans\" [shape=box];\n    \"Manual execution or brainstorm first\" [shape=box];\n\n    \"Have implementation plan?\" -> \"Tasks mostly independent?\" [label=\"yes\"];\n    \"Have implementation plan?\" -> \"Manual execution or brainstorm first\" [label=\"no\"];\n    \"Tasks mostly independent?\" -> \"Stay in this session?\" [label=\"yes\"];\n    \"Tasks mostly independent?\" -> \"Manual execution or brainstorm first\" [label=\"no - tightly coupled\"];\n    \"Stay in this session?\" -> \"subagent-driven-development\" [label=\"yes\"];\n    \"Stay in this session?\" -> \"executing-plans\" [label=\"no - parallel session\"];\n}\n```\n\n**vs. Executing Plans (parallel session):**\n- Same session (no context switch)\n- Fresh subagent per task (no context pollution)\n- Review after each task (spec compliance + code quality), broad review at the end\n- Faster iteration (no human-in-loop between tasks)\n\n## The Process\n\n```dot\ndigraph process {\n    rankdir=TB;\n\n    subgraph cluster_per_task {\n        label=\"Per Task\";\n        \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\" [shape=box];\n        \"Implementer asks questions?\" [shape=diamond];\n        \"Answer questions, provide context\" [shape=box];\n        \"Implementer implements, tests, commits, self-reviews\" [shape=box];\n        \"Generate review package, dispatch task reviewer (.\u002Ftask-reviewer-prompt.md)\" [shape=box];\n        \"Spec ✅ and quality approved?\" [shape=diamond];\n        \"Finding conflicts with plan text?\" [shape=diamond];\n        \"Ask human partner which governs\" [shape=box];\n        \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" [shape=box];\n        \"Dispatch scoped re-review (.\u002Fre-review-prompt.md)\" [shape=box];\n        \"All findings addressed?\" [shape=diamond];\n        \"R = 5?\" [shape=diamond];\n        \"Adjudicate each open finding\" [shape=box];\n        \"Any load-bearing finding?\" [shape=diamond];\n        \"STOP: report BLOCKED to human partner\" [shape=box];\n        \"Park findings in ledger with rulings\" [shape=box];\n        \"Append completion to ledger, mark todo complete\" [shape=box];\n    }\n\n    \"Setup: worktree, ledger check, read plan, pre-flight review\" [shape=box];\n    \"More tasks remain?\" [shape=diamond];\n    \"Dispatch final code reviewer (..\u002Frequesting-code-review\u002Fcode-reviewer.md)\" [shape=box];\n    \"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals\" [shape=box];\n    \"Final review clean: delete this plan's workspace\" [shape=box];\n    \"Use superpowers:finishing-a-development-branch\" [shape=box style=filled fillcolor=lightgreen];\n\n    \"Setup: worktree, ledger check, read plan, pre-flight review\" -> \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\";\n    \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\" -> \"Implementer asks questions?\";\n    \"Implementer asks questions?\" -> \"Answer questions, provide context\" [label=\"yes\"];\n    \"Answer questions, provide context\" -> \"Implementer implements, tests, commits, self-reviews\";\n    \"Implementer asks questions?\" -> \"Implementer implements, tests, commits, self-reviews\" [label=\"no\"];\n    \"Implementer implements, tests, commits, self-reviews\" -> \"Generate review package, dispatch task reviewer (.\u002Ftask-reviewer-prompt.md)\";\n    \"Generate review package, dispatch task reviewer (.\u002Ftask-reviewer-prompt.md)\" -> \"Spec ✅ and quality approved?\";\n    \"Spec ✅ and quality approved?\" -> \"Append completion to ledger, mark todo complete\" [label=\"yes\"];\n    \"Spec ✅ and quality approved?\" -> \"Finding conflicts with plan text?\" [label=\"no\"];\n    \"Finding conflicts with plan text?\" -> \"Ask human partner which governs\" [label=\"yes\"];\n    \"Ask human partner which governs\" -> \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\";\n    \"Finding conflicts with plan text?\" -> \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" [label=\"no\"];\n    \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" -> \"Dispatch scoped re-review (.\u002Fre-review-prompt.md)\";\n    \"Dispatch scoped re-review (.\u002Fre-review-prompt.md)\" -> \"All findings addressed?\";\n    \"All findings addressed?\" -> \"Append completion to ledger, mark todo complete\" [label=\"yes\"];\n    \"All findings addressed?\" -> \"R = 5?\" [label=\"no\"];\n    \"R = 5?\" -> \"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model\" [label=\"no - next round\"];\n    \"R = 5?\" -> \"Adjudicate each open finding\" [label=\"yes - breaker trips\"];\n    \"Adjudicate each open finding\" -> \"Any load-bearing finding?\";\n    \"Any load-bearing finding?\" -> \"STOP: report BLOCKED to human partner\" [label=\"yes\"];\n    \"Any load-bearing finding?\" -> \"Park findings in ledger with rulings\" [label=\"no\"];\n    \"Park findings in ledger with rulings\" -> \"Append completion to ledger, mark todo complete\";\n    \"Append completion to ledger, mark todo complete\" -> \"More tasks remain?\";\n    \"More tasks remain?\" -> \"Dispatch implementer subagent (.\u002Fimplementer-prompt.md)\" [label=\"yes\"];\n    \"More tasks remain?\" -> \"Dispatch final code reviewer (..\u002Frequesting-code-review\u002Fcode-reviewer.md)\" [label=\"no\"];\n    \"Dispatch final code reviewer (..\u002Frequesting-code-review\u002Fcode-reviewer.md)\" -> \"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals\";\n    \"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals\" -> \"Final review clean: delete this plan's workspace\";\n    \"Final review clean: delete this plan's workspace\" -> \"Use superpowers:finishing-a-development-branch\";\n}\n```\n\n## Setup\n\nEnsure the work happens in an isolated workspace: use\nsuperpowers:using-git-worktrees to create one or verify the existing one.\nNever start implementation on a main\u002Fmaster branch without your human\npartner's explicit consent.\n\nConversation memory does not survive compaction. In real sessions,\ncontrollers that lost their place have re-dispatched entire completed task\nsequences — the single most expensive failure observed. Track progress in\na ledger file, not only in todos.\n\n- Each plan owns a workspace: at skill start, run this skill's\n  `scripts\u002Fsdd-workspace PLAN_FILE` — it prints the plan's git-ignored\n  directory (`\u003Crepo-root>\u002F.superpowers\u002Fsdd\u002F\u003Cplan-basename>\u002F`), home to\n  every artifact for THIS plan: ledger, briefs, reports, review packages.\n  Another plan's directory is never yours to read or write.\n- Check for this plan's ledger at `\u003Cworkspace>\u002Fprogress.md`. If its first\n  line names your plan file, tasks with a `Task \u003CN>: complete` line are DONE\n  — do not re-dispatch them; resume at the first task without one. A task\n  whose last line is a fix round is mid-loop: resume the loop at the next\n  round. A ledger whose first line names a different plan file — or a stray\n  ledger at the old flat path `.superpowers\u002Fsdd\u002Fprogress.md` — is another\n  plan's progress: leave it in place and start your own, fresh.\n- Create the ledger with its identity as the first line:\n  `# SDD ledger — plan: \u003Cplan file path>`.\n- The ledger is your recovery map: the commits it names exist in git even\n  when your context no longer remembers creating them. After compaction,\n  trust the ledger and `git log` over your own recollection.\n- `git clean -fdx` will destroy the workspace (it's git-ignored scratch); if\n  that happens, recover from `git log`.\n\nRead the plan once, note its context and Global Constraints, and create a\ntodo per task.\n\nBefore dispatching Task 1, scan the plan once for conflicts:\n\n- tasks that contradict each other or the plan's Global Constraints\n- anything the plan explicitly mandates that the review rubric treats as a\n  defect (a test that asserts nothing, verbatim duplication of a logic block)\n\nPresent everything you find to your human partner as one batched question —\neach finding beside the plan text that mandates it, asking which governs —\nbefore execution begins, not one interrupt per discovery mid-plan. If the\nscan is clean, proceed without comment. The review loop remains the net for\nconflicts that only emerge from implementation.\n\n## Model Selection\n\nUse the least powerful model that can handle each role to conserve cost and increase speed.\n\n**Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.\n\n**Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.\n\n**Architecture and design tasks**: use the most capable available model.\nThe final whole-branch review is one of these — dispatch it on the most\ncapable available model, not the session default.\n\n**Review tasks**: choose the model with the same judgment, scaled to the\ndiff's size, complexity, and risk. A small mechanical diff does not need the\nmost capable model; a subtle concurrency change does. Scoped re-reviews of\nsmall fix diffs take a cheap-to-mid tier.\n\n**Fix-loop escalation (rounds 4-5)**: use a model at least one tier above\nthe implementer that got stuck.\n\n**Always specify the model explicitly when dispatching a subagent.** An\nomitted model inherits your session's model — often the most capable and\nmost expensive — which silently defeats this section.\n\n**Turn count beats token price.** Wall-clock and context cost scale with how\nmany turns a subagent takes, and the cheapest models routinely take 2-3× the\nturns on multi-step work — costing more overall. Use a mid-tier model as the\nfloor for reviewers and for implementers working from prose descriptions.\nWhen the task's plan text contains the complete code to write, the\nimplementation is transcription plus testing: use the cheapest tier for\nthat implementer. Single-file mechanical fixes also take the cheapest tier.\n\n**Task complexity signals (implementation tasks):**\n- Touches 1-2 files with a complete spec → cheap model\n- Touches multiple files with integration concerns → standard model\n- Requires design judgment or broad codebase understanding → most capable model\n\n## The Task Loop\n\nEverything you paste into a dispatch prompt — and everything a subagent\nprints back — stays resident in your context for the rest of the session\nand is re-read on every later turn. Hand artifacts over as files.\n\n### 1. Dispatch the implementer\n\nRecord BASE (`git rev-parse HEAD`) before dispatching — the review package\nand fix-round diffs need it.\n\n- **Task brief:** before dispatching an implementer, run this skill's\n  `scripts\u002Ftask-brief PLAN_FILE N` — it extracts the task's full text to a\n  uniquely named file and prints the path. Compose the dispatch so the\n  brief stays the single source of\n  requirements. Your dispatch should contain: (1) one line on where this\n  task fits in the project; (2) the brief path, introduced as \"read this\n  first — it is your requirements, with the exact values to use verbatim\";\n  (3) interfaces and decisions from earlier tasks that the brief cannot\n  know; (4) your resolution of any ambiguity you noticed in the brief;\n  (5) the report-file path and report contract. Exact values (numbers,\n  magic strings, signatures, test cases) appear only in the brief. Never\n  make a subagent read the whole plan file.\n- **Report file:** name the implementer's report file after the brief\n  (brief `…\u002Ftask-N-brief.md` → report `…\u002Ftask-N-report.md`) and put it in\n  the dispatch prompt. The implementer writes the full report there and\n  returns only status, commits, a one-line test summary, and concerns.\n- A dispatch prompt describes one task, not the session's history. Do not\n  paste accumulated prior-task summaries (\"state after Tasks 1-3\") into\n  later dispatches — a real session's dispatch hit 42k chars of which 99%\n  was pasted history. A fresh subagent needs its task, the interfaces it\n  touches, and the global constraints. Nothing else.\n- If an earlier task parked a finding in the area this task touches, carry\n  a pointer to that ledger entry in the dispatch.\n- Record the implementer's agent identity from the dispatch result —\n  fix-loop rounds 1-3 resume this agent.\n- Never dispatch multiple implementation subagents in parallel (conflicts).\n\nTemplate: [implementer-prompt.md](implementer-prompt.md)\n\n### 2. Handle the report\n\nImplementer subagents report one of four statuses. Handle each appropriately:\n\n**DONE:** Generate the review package (`scripts\u002Freview-package PLAN_FILE BASE HEAD`, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never `HEAD~1`, which silently drops all but the last commit of a multi-commit task), then dispatch the task reviewer with the printed path.\n\n**DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., \"this file is getting large\"), note them and proceed to review.\n\n**NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.\n\n**BLOCKED:** The implementer cannot complete the task. Assess the blocker:\n1. If it's a context problem, provide more context and re-dispatch with the same model\n2. If the task requires more reasoning, re-dispatch with a more capable model\n3. If the task is too large, break it into smaller pieces\n4. If the plan itself is wrong, escalate to the human\n\n**Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.\n\nIf the implementer asks questions — before starting or mid-task — answer\nclearly and completely, provide additional context if needed, and don't\nrush it into implementation.\n\n### 3. Review the task\n\nPer-task reviews are task-scoped gates. The broad review happens once, at the\nfinal whole-branch review. Never skip the task review, and never accept a\nreport missing either verdict — spec compliance AND task quality are both\nrequired. Implementer self-review never replaces the task review; both are\nneeded.\n\n- Hand the reviewer its diff as a file: run this skill's\n  `scripts\u002Freview-package PLAN_FILE BASE HEAD` and pass the reviewer the file path\n  it prints (or, without bash: `git log --oneline`, `git diff --stat`,\n  and `git diff -U10` for the range, redirected to one uniquely named\n  file). The output never enters your own context, and the reviewer sees\n  the commit list, stat summary, and full diff with context in one Read\n  call. Use the BASE you recorded before dispatching the implementer —\n  never `HEAD~1`, which silently truncates multi-commit tasks. Never\n  dispatch a task reviewer without a diff file.\n- **Reviewer inputs:** the task reviewer gets three paths — the same brief\n  file, the report file, and the review package — plus the global\n  constraints that bind the task.\n- The global-constraints block you hand the reviewer is its attention\n  lens. Copy the binding requirements verbatim from the plan's Global\n  Constraints section or the spec: exact values, exact formats, and the\n  stated relationships between components (\"same layout as X\", \"matches\n  Y\"). The reviewer's template already carries the process rules (YAGNI,\n  test hygiene, review method) — the constraints block is for what THIS\n  project's spec demands.\n- Do not add open-ended directives like \"check all uses\" or \"run race tests\n  if useful\" without a concrete, task-specific reason\n- Do not ask a reviewer to re-run tests the implementer already ran on the\n  same code — the implementer's report carries the test evidence\n- Do not pre-judge findings for the reviewer — never instruct a reviewer to\n  ignore or not flag a specific issue. If you believe a finding would be a\n  false positive, let the reviewer raise it and adjudicate it in the review\n  loop. If the prompt you are writing contains \"do not flag,\" \"don't treat X\n  as a defect,\" \"at most Minor,\" or \"the plan chose\" — stop: you are\n  pre-judging, usually to spare yourself a review loop.\nThe task reviewer may report \"⚠️ Cannot verify from diff\" items — requirements\nthat live in unchanged code or span tasks. These do not block the rest of the\nreview, but you must resolve each one yourself before marking the task\ncomplete: you hold the plan and cross-task context the reviewer\nlacks. If you confirm an item is a real gap, treat it as a failed spec\nreview — it enters the fix loop with the other findings.\n\nTemplate: [task-reviewer-prompt.md](task-reviewer-prompt.md)\n\n### 4. The fix loop\n\nThe loop triggers when the review reports spec ❌, any Critical or Important\nfinding, or a ⚠️ item you confirmed as a real gap.\n\nBefore the loop starts, two routes leave it immediately:\n\n- Record Minor findings in the progress ledger as you go\n  (`Task \u003CN>: minor (deferred): \u003Cone-liner>`), and point the final\n  whole-branch review at that list so it can triage which must be fixed\n  before merge. A roll-up nobody reads is a silent discard. Minor findings\n  never enter the loop.\n- A finding labeled plan-mandated — or any finding that conflicts with\n  what the plan's text requires — is the human's decision, like any plan\n  contradiction: present the finding and the plan text, ask which governs.\n  Do not dismiss the finding because the plan mandates it, and do not\n  dispatch a fix that contradicts the plan without asking.\nEverything else enters the loop. A fix round is one fix dispatch plus one\nscoped re-review. Five rounds maximum per task:\n\n**Rounds 1-3 — resume the original implementer.** Send it the open findings\nverbatim. Its context is intact: it knows the task, the code, and its own\nchoices. If your harness cannot send another message to a live subagent,\ndispatch a fresh implementer carrying the brief path, the report-file path,\nand the findings — the report file is the persistent memory either way.\n\n**Rounds 4-5 — dispatch a fresh implementer on a more capable model** (per\nModel Selection), with the brief path, the report-file path, the open\nfindings, and this framing: \"A prior implementer attempted this task\n[N] times; you own it now. Read the report file for what was tried.\" A loop\nthat survives three resumes usually means the implementer cannot see its\nown problem — fresh eyes and a capability bump in one move.\n\n**Every round, either way:** the implementer fixes, re-runs the tests\ncovering the amended code, appends its fix report to the same report file,\nand returns the short contract. Before re-dispatching the reviewer, confirm\nthe fix report contains the covering tests, the command run, and the\noutput; dispatch the re-review once all three are present. Name the\ncovering test files in the fix message — a one-line fix does not need the\nwhole suite.\n\n**The re-review is scoped.** Run `scripts\u002Freview-package PLAN_FILE FIX_BASE HEAD`\nwhere FIX_BASE is the head the previous review saw, and dispatch\n[re-review-prompt.md](re-review-prompt.md) with the findings list, the\nbrief, the report file, and the printed diff path. The re-reviewer verdicts\neach finding ADDRESSED or NOT ADDRESSED and flags new breakage in the fix\ndiff only. New Critical\u002FImportant breakage in the fix diff joins the open\nfindings list. Out-of-scope observations go to the ledger as deferred\nminors — they never extend the loop.\n\n**After each round,** append to the ledger:\n`Task \u003CN>: fix round \u003CR>\u002F5 (\u003CX> addressed, \u003CY> open — \u003Cfinding one-liners>; commits \u003Ca7>..\u003Cb7>)`\n\nNever fix findings yourself in the controller session — your context stays\nclean for coordination, and controller fixes skip review.\n\n**The breaker.** When round 5's re-review still leaves findings open, stop\ndispatching. Adjudicate each open finding yourself — you hold the plan and\nthe cross-task context the reviewer lacks:\n\n- **The reviewer is wrong, or the point is contestable:** park it —\n  `Task \u003CN>: parked — \u003Cfinding> — ruling: \u003Cwhy the code stands>`. The final\n  review sees both sides.\n- **Real, but nothing downstream builds on it:** park it the same way, with\n  a ruling that says it's real and deferred.\n- **Real and load-bearing** — a later task builds on it, or it reveals a\n  plan defect: STOP. Append `Task \u003CN>: BLOCKED — \u003Creason>` and report to\n  your human partner with the finding, the plan text it collides with, and\n  the fix history. Parking a structural failure lets every dependent task\n  build on it and hands the final review a problem it cannot fix either.\n\nAdjudicate only at the cap. Adjudicating earlier to end a loop is\npre-judging with a different name. Every adjudication is a ledger entry —\na silent discard is forbidden.\n\n### 5. Complete the task\n\nWhen the review comes back clean — or every open finding is parked with a\nruling at the cap — append the completion line to the ledger in the same\nmessage as your other bookkeeping:\n\n- `Task \u003CN>: complete (commits \u003Cbase7>..\u003Chead7>, review clean)`\n- `Task \u003CN>: complete (commits \u003Cbase7>..\u003Chead7>, \u003CK> parked)` after a\n  tripped breaker\n\nThen mark the todo complete and move on. Never move to the next task while\nthe review has open Critical\u002FImportant issues that are neither fixed nor\nparked-with-ruling at the cap.\n\n## Final Review\n\nThe final whole-branch review gets a package too: run\n`scripts\u002Freview-package PLAN_FILE MERGE_BASE HEAD` (MERGE_BASE = the commit the\nbranch started from, e.g. `git merge-base main HEAD`) and include the\nprinted path in the final review dispatch, so the final reviewer reads\none file instead of re-deriving the branch diff with git commands. Dispatch\non the most capable available model (see Model Selection), using\nsuperpowers:requesting-code-review's\n[code-reviewer.md](..\u002Frequesting-code-review\u002Fcode-reviewer.md). Point it at\nthe ledger's deferred-minor and parked lines so it can triage which must be\nfixed before merge.\n\nIf the final whole-branch review returns findings, dispatch ONE fix subagent\nwith the complete findings list — not one fixer per finding.\nPer-finding fixers each rebuild context and re-run suites; a real\nsession's final-review fix wave cost more than all its tasks combined.\nThen run exactly one scoped re-review of the fix wave\n(`scripts\u002Freview-package PLAN_FILE FIX_BASE HEAD` over the fix range,\n[re-review-prompt.md](re-review-prompt.md)).\nAdjudicate any residual findings as in the task loop's breaker: park with\nrulings, or stop on load-bearing ones. There is no second fix wave —\nresidual load-bearing findings surface to your human partner when\nfinishing-a-development-branch presents the options.\n\n## Finish\n\nWhen the final whole-branch review is clean and its fixes are merged,\ndelete this plan's workspace (`rm -rf \u003Cworkspace>`) — the git history is\nthe record now. Sibling directories belong to other plans; leave them\nalone.\n\nUse superpowers:finishing-a-development-branch.\n\n## Common Rationalizations\n\n| Excuse | Reality |\n|--------|---------|\n| \"Close enough on spec compliance\" | Reviewer found spec gaps = not done. Fix or hit the cap and adjudicate — those are the only exits. |\n| \"I'll fix it myself, dispatching is overhead\" | Controller fixes pollute your context and skip review. Resume the implementer. |\n| \"One more round will converge\" | Past the cap, rounds don't converge — the failure is structural. Adjudicate and route. |\n| \"The reviewer will just find something new anyway\" | Scoped re-reviews verify fixes; they cannot wander. New findings on untouched code go to the ledger, not the loop. |\n| \"This finding is obviously wrong, I'll drop it\" | You adjudicate only at the cap, and every ruling is a ledger entry. Silent discards are forbidden. |\n| \"The fix was small, skip the re-review\" | Unreviewed fixes are how regressions land. Every round ends with a scoped re-review. |\n| \"Reviews slow the loop down\" | The loop without reviews is just unverified churn. Reviews are the loop's brakes and steering. |\n| \"Ledger bookkeeping is overhead\" | The ledger is what survives compaction. Controllers without one have re-dispatched entire completed task sequences. |\n\n## Example Workflow\n\n```\nYou: I'm using Subagent-Driven Development to execute this plan.\n\n[Setup: worktree verified]\n[Read plan file once: docs\u002Fsuperpowers\u002Fplans\u002Ffeature-plan.md]\n[Resolve workspace: scripts\u002Fsdd-workspace docs\u002Fsuperpowers\u002Fplans\u002Ffeature-plan.md — no ledger inside, fresh start]\n[Create todos for all tasks]\n\nTask 1: Hook installation script\n\n[Run task-brief for Task 1; dispatch implementer with brief + report paths + context]\n\nImplementer: \"Before I begin - should the hook be installed at user or system level?\"\n\nYou: \"User level (~\u002F.config\u002Fsuperpowers\u002Fhooks\u002F)\"\n\nImplementer: [Later]\n  - Implemented install-hook command\n  - Added tests, 5\u002F5 passing\n  - Self-review: Found I missed --force flag, added it\n  - Committed\n\n[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]\nTask reviewer: Spec ✅ - all requirements met, nothing extra.\n  Strengths: Good test coverage, clean. Issues: None. Task quality: Approved.\n\n[Ledger: Task 1: complete (commits a1b2c3d..d4e5f6a, review clean)]\n\nTask 2: Recovery modes\n\n[Run task-brief for Task 2; dispatch implementer with brief + report paths + context]\n\nImplementer: [No questions]\n  - Added verify\u002Frepair modes\n  - 8\u002F8 tests passing\n  - Committed\n\n[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]\nTask reviewer: Spec ❌:\n  - Missing: Progress reporting (spec says \"report every 100 items\")\n  Issues (Important): Magic number (100)\n\n[Fix round 1: resume the implementer with both findings]\nImplementer: Added progress reporting, extracted PROGRESS_INTERVAL constant.\n  Re-ran test\u002Frecovery.test.js — 10\u002F10 passing. Fix report appended.\n\n[Run review-package PLAN_FILE FIX_BASE HEAD; dispatch scoped re-review]\nRe-reviewer: Missing progress reporting — ADDRESSED (src\u002Frecovery.js:41).\n  Magic number — ADDRESSED (src\u002Frecovery.js:7). New breakage: none.\n  Verdict: all findings addressed.\n\n[Ledger: Task 2: fix round 1\u002F5 (2 addressed, 0 open; commits d4e5f6a..b7c8d9e)]\n[Ledger: Task 2: complete (commits d4e5f6a..b7c8d9e, review clean)]\n\n...\n\n[After all tasks]\n[Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]\nFinal reviewer: All requirements met. Deferred minors triaged: none block merge.\n\n[Delete this plan's workspace — the record now lives in git]\n\nDone! Using superpowers:finishing-a-development-branch.\n```\n",{"name":5,"description":7},"mine","1e7390741dffd3d5041fca4ebc056071ee3ba137","archives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development",5,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub","https:\u002F\u002Fgithub.com\u002FEthanYoQ","www.orz.md","Part Marketer, Part AI Explorer.","2026-11-07 14:52:29",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add EthanYoQ\u002FSkill-hub --skill subagent-driven-development",{"tool":55,"command":56},"bunx","bunx skills add EthanYoQ\u002FSkill-hub --skill subagent-driven-development",{"tool":58,"command":59},"pnpm","pnpm dlx skills add EthanYoQ\u002FSkill-hub --skill subagent-driven-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002FSKILL.md",true,[63,69,73,79,83,87],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"implementer-prompt.md","REFERENCE","参考文档",5717,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002Fimplementer-prompt.md",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"re-review-prompt.md",4300,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002Fre-review-prompt.md",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002Freview-package","SCRIPT","脚本",1469,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002Fscripts\u002Freview-package",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fsdd-workspace",1586,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002Fscripts\u002Fsdd-workspace",{"path":84,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Ftask-brief",1158,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002Fscripts\u002Ftask-brief",{"path":88,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":89,"sourceHtmlUrl":90},"task-reviewer-prompt.md",7816,"https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Farchives\u002Fuser-installed-skills\u002Fsubagent-driven-development\u002F94fb9fd2eafd8961\u002Fsubagent-driven-development\u002Ftask-reviewer-prompt.md",[92,119,150,173,190,205],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":99,"publishedAt":35},"01M713CBDSYARG4PXFXK2R2NNN","xhs-pharma-social-listening","Run evidence-disciplined Xiaohongshu social listening for foreign pharma employee pain points. Use when the user asks to collect and analyze notes\u002Fcomments about pharma companies, aliases, roles, compliance, medical affairs, or AI topics, then produce a cited and scored sampled-insight report. Includes independent-evidence counting, MediaCrawler batch collection, and CAPTCHA\u002F461 fallback to Agent Reach\u002FOpenCLI.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fxhs-pharma-social-listening\u002FSKILL.md",[98],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[100,101,102,103,104,105,31,106,107,108,109,110,111,112,113,114,115,116,117,118],"social","xhs pharma social listening","social listening","xhs","medical","counting","collection","batch","analyze","notes","run","opencli","fallback","captcha","agent reach","evidence","for","collect","produce",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":131,"publishedAt":35},"01M713C8Q76ZP0WXXBRAFKS6EE","healthcare-phi-compliance","Protected Health Information (PHI) and Personally Identifiable Information (PII) compliance patterns for healthcare applications. Covers data classification, access control, audit trails, encryption, and common leak vectors. Use when code touches PHI or PII in a healthcare system, or when auditing access control, audit trails, or leak vectors.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-phi-compliance\u002FSKILL.md",[125,126],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[132,133,134,135,136,137,138,139,31,140,141,142,143,144,145,146,116,147,148,149],"healthcare","phi","compliance","healthcare phi compliance","pii","compliance patterns","information","access","encryption","code","common","audit","data","patterns","Access Control","system","applications","Auditing Access Control",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":157,"publishedAt":35},"01M713C5R2GE43X45T2K75TB76","healthcare-eval-harness","Patient safety evaluation harness for healthcare application deployments. Automated test suites for CDSS accuracy, PHI exposure, clinical workflow integrity, and integration compliance. Blocks deployments on safety failures. Use when a healthcare deployment must be gated on patient-safety tests for CDSS accuracy, PHI exposure, and workflow integrity.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-eval-harness\u002FSKILL.md",[156],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[132,158,159,160,161,162,163,31,164,165,166,167,133,116,168,169,170,171,30,172],"eval","harness","healthcare eval harness","eval harness","clinical","patient","workflow","Evaluation","Safety","integrity","deployment","accuracy","tests","deployments","super",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":180,"publishedAt":35},"01M713C2J17S91VYR7A8M696VR","healthcare-emr-patterns","EMR\u002FEHR development patterns for healthcare applications. Clinical safety, encounter workflows, prescription generation, clinical decision support integration, and accessibility-first UI for medical data entry. Use when building EMR or EHR features such as encounter workflows, prescription generation, or clinical data entry UI.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-emr-patterns\u002FSKILL.md",[179],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[132,181,145,182,183,104,162,184,31,185,186,187,166,144,188,189,24,116,148,30],"EMR","healthcare emr patterns","decision","workflows","support","clinical decision support","features","ui","as",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":197,"publishedAt":35},"01M713BZERTXV0N8X6SW9DDVWZ","healthcare-cdss-patterns","Clinical Decision Support System (CDSS) development patterns. Drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), alert severity classification, and integration into EMR workflows. Use when building clinical decision support — drug interaction checks, dose validation, clinical scoring, or alert severity.","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fhealthcare-cdss-patterns\u002FSKILL.md",[196],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[132,145,198,183,162,181,184,31,199,200,185,186,201,24,147,202,30,203,172,204],"healthcare cdss patterns","scoring","interaction","severity","classification","alert","decision support",{"skillNo":206,"name":207,"nameZh":6,"description":208,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":209,"categories":210,"keywords":212,"publishedAt":35},"01M713BVK3PQR7V4ZKYGMWMXJD","dxy-task-clarify","用户的请求含糊、缺背景、缺资料说明、缺读者或用途时使用。先用少量带选项的追问把任务问清楚，写成任务卡，用户确认后再执行。尤其适用于医生、科研人员和药企各岗位的工作，例如「帮我分析一下这些数据」「帮我准备明天的拜访」「写个总结」「做个 PPT」「回一下这封邮件」「整理一下会议纪要」「整理一下这些文献」「帮我准备下周的讲课」「写个病例汇报」「帮我写个提示词」。用户说「先问我」「帮我理清需求」「我不知道怎么描述」「我不会问 AI」时也使用。用途、资料、读者都已说清的请求，纯翻译，以及写代码、改代码，不使用。","https:\u002F\u002Fgithub.com\u002FEthanYoQ\u002FSkill-hub\u002Fblob\u002Fmine\u002Fskills\u002F10-business-industry\u002Fdxy-task-clarify\u002FSKILL.md",[211],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[213,214,215,216,217,218,219,220],"clarify","dxy task clarify","task","pptx","整理","翻译","数据","总结"]