summaryrefslogtreecommitdiff
path: root/skills/subagent-driven-development/references
diff options
context:
space:
mode:
Diffstat (limited to 'skills/subagent-driven-development/references')
-rw-r--r--skills/subagent-driven-development/references/batching.md11
-rw-r--r--skills/subagent-driven-development/references/cannot-verify.md10
-rw-r--r--skills/subagent-driven-development/references/final-review.md47
-rw-r--r--skills/subagent-driven-development/references/fix-loop.md77
-rw-r--r--skills/subagent-driven-development/references/handling-reports.md15
-rw-r--r--skills/subagent-driven-development/references/preflight.md26
-rw-r--r--skills/subagent-driven-development/references/resuming.md12
7 files changed, 198 insertions, 0 deletions
diff --git a/skills/subagent-driven-development/references/batching.md b/skills/subagent-driven-development/references/batching.md
new file mode 100644
index 0000000..6224e4b
--- /dev/null
+++ b/skills/subagent-driven-development/references/batching.md
@@ -0,0 +1,11 @@
+# Batching Small Same-Shape Work
+
+Part of superpowers:subagent-driven-development.
+
+**Batch small same-shape work.** When the plan lists several tasks that are
+each a small, independent edit of the same kind — the same one-line fix,
+constant change, or field addition repeated across files — do not dispatch
+one subagent per task. Compose ONE dispatch brief listing every file and
+its change, send the whole batch to a single subagent, and review its diff
+as one unit. Reserve one-dispatch-per-task for work that needs its own
+judgment, its own tests, or its own review surface.
diff --git a/skills/subagent-driven-development/references/cannot-verify.md b/skills/subagent-driven-development/references/cannot-verify.md
new file mode 100644
index 0000000..e952f2d
--- /dev/null
+++ b/skills/subagent-driven-development/references/cannot-verify.md
@@ -0,0 +1,10 @@
+# "Cannot Verify From Diff" Items
+
+Part of superpowers:subagent-driven-development.
+
+The task reviewer may report "⚠️ Cannot verify from diff" items — requirements
+that live in unchanged code or span tasks. These do not block the rest of the
+review, but you must resolve each one yourself before marking the task
+complete: you hold the plan and cross-task context the reviewer
+lacks. If you confirm an item is a real gap, treat it as a failed spec
+review — it enters the fix loop with the other findings.
diff --git a/skills/subagent-driven-development/references/final-review.md b/skills/subagent-driven-development/references/final-review.md
new file mode 100644
index 0000000..851a5c5
--- /dev/null
+++ b/skills/subagent-driven-development/references/final-review.md
@@ -0,0 +1,47 @@
+# Final Review and Finish
+
+Part of superpowers:subagent-driven-development. Every task in the plan is
+complete.
+
+The final whole-branch review gets a package too: run
+`bash scripts/review-package PLAN_FILE MERGE_BASE HEAD` (MERGE_BASE = the commit the
+branch started from, e.g. `git merge-base main HEAD`) and include the
+printed path in the final review dispatch, so the final reviewer reads
+one file instead of re-deriving the branch diff with git commands. Dispatch
+on the most capable available model (see SKILL.md's Model Selection), using
+superpowers:requesting-code-review's
+[code-reviewer.md](../../requesting-code-review/code-reviewer.md). Point it at
+the ledger's deferred-minor and parked lines so it can triage which must be
+fixed before merge.
+
+If the final whole-branch review returns findings, dispatch ONE fix subagent
+with the complete findings list — not one fixer per finding.
+Per-finding fixers each rebuild context and re-run suites; a real
+session's final-review fix wave cost more than all its tasks combined.
+Then run exactly one scoped re-review of the fix wave
+(`bash scripts/review-package PLAN_FILE FIX_BASE HEAD` over the fix range,
+[re-review-prompt.md](../re-review-prompt.md)).
+Adjudicate any residual findings as in the fix loop's breaker
+(references/fix-loop.md): park with rulings, or rule on the load-bearing
+ones and ledger what you decided. Only the four things that stop a running
+plan (top of SKILL.md) stop you here. There is no second fix wave —
+residual load-bearing findings surface to your human partner when
+finishing-a-development-branch presents the options.
+
+### Finish
+
+Before you delete anything, collect every ledger line containing `Ruling:` —
+preflight rulings, parked findings, breaker adjudications, all of them — into
+your final message under "Rulings I made", in the order you made them, each
+with what it costs if wrong. The list is exhaustive: if the ledger holds a
+ruling, the list holds it. That list is the only place the decisions you
+took on your human partner's behalf reach them — they read it and rework
+whatever you got wrong. A ruling that dies with the workspace was a decision
+made in secret.
+
+When the final whole-branch review is clean and its fixes are merged,
+delete this plan's workspace (`rm -rf <workspace>`) — the git history is
+the record now. Sibling directories belong to other plans; leave them
+alone.
+
+Use superpowers:finishing-a-development-branch.
diff --git a/skills/subagent-driven-development/references/fix-loop.md b/skills/subagent-driven-development/references/fix-loop.md
new file mode 100644
index 0000000..0b476e9
--- /dev/null
+++ b/skills/subagent-driven-development/references/fix-loop.md
@@ -0,0 +1,77 @@
+# The Fix Loop
+
+Part of superpowers:subagent-driven-development. The task review reported
+spec ❌, a Critical or Important finding, or a ⚠️ item you confirmed as a real
+gap.
+
+Before the loop starts, two routes leave it immediately:
+
+- Record Minor findings in the progress ledger as you go
+ (`Task <N>: minor (deferred): <one-liner>`), and point the final
+ whole-branch review at that list so it can triage which must be fixed
+ before merge. A roll-up nobody reads is a silent discard. Minor findings
+ never enter the loop.
+- A finding labeled plan-mandated — or any finding that conflicts with
+ what the plan's text requires — is yours to rule on: weigh the finding
+ against the plan text, decide with the spec as the binding authority, and
+ ledger the ruling before you act on it. Do not dismiss the finding because
+ the plan mandates it, and do not dispatch a fix that contradicts the plan
+ without a recorded ruling.
+Everything else enters the loop. A fix round is one fix dispatch plus one
+scoped re-review. Five rounds maximum per task:
+
+**Rounds 1-3 — resume the original implementer.** Send it the open findings
+verbatim. Its context is intact: it knows the task, the code, and its own
+choices. If your harness cannot send another message to a live subagent,
+dispatch a fresh implementer carrying the brief path, the report-file path,
+and the findings — the report file is the persistent memory either way.
+
+**Rounds 4-5 — dispatch a fresh implementer on a more capable model** (per
+SKILL.md's Model Selection), with the brief path, the report-file path, the open
+findings, and this framing: "A prior implementer attempted this task
+[N] times; you own it now. Read the report file for what was tried." A loop
+that survives three resumes usually means the implementer cannot see its
+own problem — fresh eyes and a capability bump in one move.
+
+**Every round, either way:** the implementer fixes, re-runs the tests
+covering the amended code, appends its fix report to the same report file,
+and returns the short contract. Before re-dispatching the reviewer, confirm
+the fix report contains the covering tests, the command run, and the
+output; dispatch the re-review once all three are present. Name the
+covering test files in the fix message — a one-line fix does not need the
+whole suite.
+
+**The re-review is scoped.** Run `bash scripts/review-package PLAN_FILE FIX_BASE HEAD`
+where FIX_BASE is the head the previous review saw, and dispatch
+[re-review-prompt.md](../re-review-prompt.md) with the findings list, the
+brief, the report file, and the printed diff path. The re-reviewer verdicts
+each finding ADDRESSED or NOT ADDRESSED and flags new breakage in the fix
+diff only. New Critical/Important breakage in the fix diff joins the open
+findings list. Out-of-scope observations go to the ledger as deferred
+minors — they never extend the loop.
+
+**After each round,** append to the ledger:
+`Task <N>: fix round <R>/5 (<X> addressed, <Y> open — <finding one-liners>; commits <a7>..<b7>)`
+
+Never fix findings yourself in the controller session — your context stays
+clean for coordination, and controller fixes skip review.
+
+**The breaker.** When round 5's re-review still leaves findings open, stop
+dispatching. Adjudicate each open finding yourself — you hold the plan and
+the cross-task context the reviewer lacks:
+
+- **The reviewer is wrong, or the point is contestable:** park it —
+ `Task <N>: parked — <finding> — Ruling: <why the code stands>`. The final
+ review sees both sides.
+- **Real, but nothing downstream builds on it:** park it the same way, with
+ a ruling that says it's real and deferred.
+- **Real and load-bearing** — a later task builds on it, or it reveals a
+ plan defect: rule on the smallest change that unblocks the dependent work,
+ ledger it as `Task <N>: Ruling: <finding> — <what you decided and why>`,
+ and carry it into the next task's dispatch. Parking a structural failure
+ silently lets every dependent task build on it. Stop only when the defect
+ leaves every path forward a guess.
+
+Adjudicate only at the cap. Adjudicating earlier to end a loop is
+pre-judging with a different name. Every adjudication is a ledger entry —
+a silent discard is forbidden.
diff --git a/skills/subagent-driven-development/references/handling-reports.md b/skills/subagent-driven-development/references/handling-reports.md
new file mode 100644
index 0000000..cf91cdc
--- /dev/null
+++ b/skills/subagent-driven-development/references/handling-reports.md
@@ -0,0 +1,15 @@
+# Handling a Report That Isn't DONE
+
+Part of superpowers:subagent-driven-development.
+
+**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.
+
+**NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
+
+**BLOCKED:** The implementer cannot complete the task. Assess the blocker:
+1. If it's a context problem, provide more context and re-dispatch with the same model
+2. If the task requires more reasoning, re-dispatch with a more capable model
+3. If the task is too large, break it into smaller pieces
+4. If the plan itself is wrong, rule on the correction, ledger it, and re-dispatch with the ruling carried in the dispatch
+
+**Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
diff --git a/skills/subagent-driven-development/references/preflight.md b/skills/subagent-driven-development/references/preflight.md
new file mode 100644
index 0000000..1701648
--- /dev/null
+++ b/skills/subagent-driven-development/references/preflight.md
@@ -0,0 +1,26 @@
+# The Pre-flight Scan
+
+Part of superpowers:subagent-driven-development. Run it once, before
+dispatching Task 1.
+
+Before dispatching Task 1, scan the plan once for conflicts, writing down
+what you checked as you check it:
+
+- tasks that contradict each other or the plan's Global Constraints
+- anything the plan explicitly mandates that the review rubric treats as a
+ defect (a test that asserts nothing, verbatim duplication of a logic block)
+
+The scan's output is a table, not a verdict. One row for every pair of tasks
+that share a file or an interface: the two tasks, what one produces against
+what the other consumes, and what you found. One row for every task: whether
+its own text agrees with itself — the tests it specifies against the code it
+specifies, the files it creates against the files it later touches. "The scan
+is clean" without those rows is not a scan you ran.
+
+Write the table to the ledger. Rule on everything you find before execution
+begins — each finding against the plan text that mandates it — and record
+each ruling in the ledger. If the scan is clean, proceed without comment.
+Rule on each conflict it surfaces — the spec is the binding authority, the
+plan is its argument — record the ruling beside its row, and dispatch
+Task 1. The review loop remains the net for conflicts that only emerge from
+implementation.
diff --git a/skills/subagent-driven-development/references/resuming.md b/skills/subagent-driven-development/references/resuming.md
new file mode 100644
index 0000000..409b826
--- /dev/null
+++ b/skills/subagent-driven-development/references/resuming.md
@@ -0,0 +1,12 @@
+# Resuming From an Existing Ledger
+
+Part of superpowers:subagent-driven-development. This plan's workspace
+already has a ledger at `<workspace>/progress.md`.
+
+If the ledger's first line names your plan file, tasks with a `Task <N>:
+complete` line are DONE — do not re-dispatch them; resume at the first
+task without one. A task whose last line is a fix round is mid-loop:
+resume the loop at the next round. A ledger whose first line names a
+different plan file — or a stray ledger at the old flat path
+`.superpowers/sdd/progress.md` — is another plan's progress: leave it in
+place and start your own, fresh.