planning · diff

git:20260823.e97a3b3 to git:20260901.a877ac0

106 added, 124 removed. Audit A to A.

---
name: planning
description: >-
- Builds and stress-tests implementation plans in two modes. Create mode scans
- code and docs, asks one question at a time with a recommended answer, runs a
- blindspot pass when the user is new to the area, then writes a plan file.
- Review mode scores completeness, feasibility, scope,
- testability, risk, and assumptions, verifies checkable claims, and writes
- resolutions back until every dimension reaches 5/5. Use when asked to "create
- a plan", "plan this feature", "I want to build X", "grill me", "think this
- through", "blindspot pass", "unknown unknowns", "this is new to me", "review
- my plan", "rubber duck this", "stress test this plan", "is
- this plan ready", "get this plan to 5/5", "what am I missing", "verify this
- claim", "prove this plan", "fact-check this plan", "split this into
- tickets", "break this down into slices", "this is too big for one plan", or
- when the user explicitly wants a plan artifact before implementation. For
- code review use pr-reviewer; for architecture briefs use
- codebase-architecture.
+ Builds and stress-tests implementation plans before any code. Create mode
+ scans code and docs, asks one grounded question at a time with a recommended
+ answer, challenges scope, and writes a plan file a fresh session can
+ execute. Review mode scores completeness, feasibility, scope, testability,
+ risk, and assumptions, verifies checkable claims against the repo, and
+ writes resolutions back until every dimension reaches 5/5. Splits big work
+ into vertical-slice tickets. Works inside Claude Code plan mode. Use when
+ asked to "create a plan", "plan this feature", "write a spec", "grill me",
+ "interview me", "think this through", "blindspot pass", "unknown unknowns",
+ "review my plan", "rubber duck this", "stress test this plan", "get this
+ plan to 5/5", "what am I missing", "verify this claim", "write a brief
+ another agent can execute", or "split this into tickets". For code review
+ use pr-reviewer; for architecture briefs use codebase-architecture; for a
+ new repo use scaffold-nextjs or scaffold-cli.
---
# Planning
- Build a plan by collaborative interrogation, then stress-test it adversarially, before coding. The deliverable is a plan file, or the tickets that plan splits into when the work is too big for one pass. Never code.
+ Build the plan by interrogation, then stress-test it adversarially, before coding. The deliverable is a plan file, or the tickets it splits into when the work is too big for one pass. Never code.
- - **IS:** building a plan from intent through one-question-at-a-time interrogation (Create), and strengthening an existing plan by scoring six dimensions to 5/5 with claim verification (Review). Both write to the plan file. When the work exceeds one plan, both exit through the split in `references/splitting.md`, which publishes vertical-slice tickets.
- - **IS NOT:** implementing or generating code, authoring a PR (use `pr-creator`), reviewing a code diff (use `pr-reviewer`), or writing an architecture brief (use `codebase-architecture`).
+ - **IS:** building a plan from intent through one-question-at-a-time interrogation (Create), strengthening an existing plan by scoring six dimensions to 5/5 with claim verification (Review), and splitting oversized work into vertical-slice tickets (`references/splitting.md`). Both modes write to the plan file.
+ - **IS NOT:** implementing or generating code, authoring a PR (`pr-creator`), reviewing a code diff (`pr-reviewer`), simplifying a diff (`tidy`), writing an architecture brief or ADR (`codebase-architecture`), or scaffolding a repo (`scaffold-nextjs`, `scaffold-cli`).
- Pipeline position: `planning` (create then review) -> implementation -> `pr-reviewer` -> `pr-creator` -> `pr-babysitter`.
+ Pipeline position: `planning` (create, then review) -> implementation -> `pr-reviewer` -> `pr-creator` -> `pr-babysitter`.
+ ## Fit inside plan mode, not beside it
+
+ Claude Code's plan mode (`Shift+Tab`, a `/plan` prefix, or `claude --permission-mode plan`) already blocks source edits, writes the plan to `~/.claude/plans/<name>.md` (or `plansDirectory`), lets the user edit it with `Ctrl+G`, and presents it for approval through `ExitPlanMode`. This skill supplies what plan mode does not: the questions, the scope challenge, the scoring, and the file's contents.
+
+ - The plan file is the one plan mode opened. Write a second copy only when the plan must outlive the session or be read by another checkout, at the path project instructions name (default `docs/plans/<slug>.md`), and say so in the chat.
+ - Run Review before `ExitPlanMode`, so the approval screen shows the reviewed plan. The harness prompt is the approval gate; add none of your own.
+ - Approval can clear the planning context (`showClearContextOnPlanAccept`) or start a fresh session, so every plan is read by an executor who never saw this conversation. Write for that reader.
+ - Ask Create-mode questions through `AskUserQuestion`: the recommended answer is the first option, labelled as recommended, with the evidence (file, function, precedent) in its description. Review questions quote plan text and take free-text answers in chat. Auto mode honors questions a skill relies on.
+ - Outside Claude Code (Codex, Cursor, an API session) the protocol is the same; the plan goes where the user or project instructions say.
+
+ Skip the plan when the diff fits in one sentence (a typo, a log line, a rename): say so and let the user proceed.
+
## Mode dispatch
Auto-detect; ask only if genuinely ambiguous:
- - **No plan file in scope**, or verbs like "create a plan", "plan this", "grill me", "think this through" -> **Create mode**.
- - **Existing plan in scope** (a path, pasted plan, or recent file in the active agent's native plan directory), or verbs like "review my plan", "stress test", "is this ready", "get this to 5/5", "verify this claim", "fact-check this plan" -> **Review mode**.
- - **No plan in scope but the user asks to verify or fact-check a standalone claim** -> answer directly with local evidence; create no plan artifact.
- - If the input is code or a diff rather than a plan, stop and route to `pr-reviewer`.
+ - **No plan in scope**, or verbs like "create a plan", "plan this", "grill me", "think this through" -> **Create mode**.
+ - **Existing plan in scope** (a path, pasted text, or the most recent file in the plans directory), or verbs like "review my plan", "stress test", "is this ready", "get this to 5/5", "fact-check this plan" -> **Review mode**.
+ - **A standalone claim to verify**, no plan -> answer with local evidence per `references/claim-verification.md`; create no plan file.
+ - **Code or a diff** rather than a plan -> stop and route to `pr-reviewer`.
Create hands off to Review; a plan is not ready for implementation until Review passes.
## Decision principles
- Use these to cut scope, sequence work, and challenge the plan. Turn each into a plan edit; never cite slogans.
+ Use these to cut scope, sequence work, and challenge the plan. Each one becomes a plan edit, never a slogan in the text.
- 1. **KISS:** fewest moving parts that satisfy the current requirement. Delete layers, modes, config, or coordination that do not change the first shippable outcome.
- 2. **As simple as possible, no simpler:** never cut correctness, permissions, observability, rollback, migration safety, or required edge states. A smaller plan that drops a current requirement is too small.
- 3. **YAGNI:** defer extension points, future providers, generic frameworks, and speculative settings until a named current requirement needs them.
- 4. **Proven practice:** when the ecosystem or repo has a proven pattern for this exact problem, use it and name the precedent. Invent a local pattern only when a concrete constraint makes the standard one fail.
- 5. **Easier to change:** make the next likely requirement local. Name what file, module, table, or API boundary changes later, and what stays untouched.
- 6. **Tracer bullet:** prove the approach with one minimum viable vertical slice across the real boundary before building horizontal layers.
- 7. **DRY:** deduplicate knowledge, invariants, protocols, and business rules, not coincidental shape.
- 8. **Duplication over wrong abstraction:** keep similar code duplicated when the shared abstraction would hide different business rules, lifecycles, owners, or failure modes.
- 9. **Ladder of least code:** for each piece of new code the plan calls for, take the first rung that holds: reuse what is already in the codebase, then stdlib, then a native platform feature, then an already-installed dependency, then the minimum new code. A plan step that adds a dependency, or new code a higher rung plausibly covers, must say why the higher rungs fail.
+ 1. **KISS:** the fewest moving parts that satisfy the current requirement.
+ 2. **As simple as possible, no simpler:** never cut correctness, permissions, observability, rollback, migration safety, or required edge states.
+ 3. **YAGNI:** defer extension points, future providers, and speculative settings until a named current requirement needs them.
+ 4. **Proven practice:** when the repo or ecosystem has a pattern for this exact problem, use it and name the precedent.
+ 5. **Easier to change:** name what file, module, table, or boundary the next likely requirement touches, and what stays untouched.
+ 6. **Tracer bullet:** one minimum vertical slice across the real boundary before any horizontal layer.
+ 7. **DRY:** deduplicate knowledge, invariants, and business rules, not coincidental shape.
+ 8. **Duplication over wrong abstraction:** keep similar code apart when a shared abstraction would hide different rules, lifecycles, owners, or failure modes.
+ 9. **Ladder of least code:** for each piece of new code, take the first rung that holds: existing code in the repo, stdlib, a native platform feature, an already-installed dependency, then minimum new code. A step that adds a dependency or new code a higher rung covers must say why the higher rungs fail.
- Conflict rule: current requirements win first. Then `as simple as possible, no simpler` bounds KISS and YAGNI; `duplication over wrong abstraction` bounds DRY; `tracer bullet` beats horizontal foundation work unless the project cannot run without that foundation.
+ Conflict rule: current requirements win. Then principle 2 bounds KISS and YAGNI; principle 8 bounds DRY; the tracer bullet beats foundation work unless the project cannot run without that foundation.
## Reference files
| File | Mode | Read when |
|------|------|-----------|
- | `references/interrogation-protocol.md` | Create | Create Step 2: question decision tree, blindspot pass, reference-as-spec, recommended-answer format, fuzzy-term patterns, anti-rationalization table |
- | `references/doc-grounding.md` | Create | Create Step 1, when design docs, RFCs, ADRs, or library/API docs are relevant: find them, extract the decisions they encode, grill the rationale |
- | `references/html-question-form.md` | Create | Create Step 2, optional: batched HTML question form for large or greenfield specs instead of one-at-a-time chat |
- | `references/plan-quality-rubric.md` | Review | Review Step 2 triage: 1-5 scoring criteria per dimension |
+ | `references/interrogation-protocol.md` | Create | Create Step 2: question decision tree, blindspot pass, reference-as-spec, recommended-answer format, fuzzy-term table, anti-rationalization table |
+ | `references/doc-grounding.md` | Create | Create Step 1, when design docs, RFCs, ADRs, or library docs bear on the work: find them, extract the decisions they encode, grill the rationale |
+ | `references/handoff-plans.md` | Create | Create Step 3, when a fresh session, subagent, or teammate will execute: inline context, STOP conditions, finish line, implementation-notes file |
+ | `references/plan-quality-rubric.md` | Review | Review Step 2: 1-5 scoring criteria per dimension |
| `references/questioning-framework.md` | Review | Review Step 3: question templates and pushback patterns per dimension |
- | `references/dialogue-examples.md` | Review | Before the Review dialogue: tone calibration, and the Verify move's claim/evidence/verdict block worked through |
- | `references/splitting.md` | Both | The work is too big for one plan: vertical slice rules, blocking edges, the expand-contract exception, granularity confirmation, and how to publish the tickets |
- | `references/claim-verification.md` | Review | When a claim is checkable against local code, docs, or specs, or the user asks to verify one |
+ | `references/claim-verification.md` | Both | A claim is checkable against local code, docs, or specs, or the user asks to verify one; includes the worked Verify move |
+ | `references/splitting.md` | Both | The work exceeds one plan: vertical-slice rules, blocking edges, expand-contract, granularity confirmation, publishing tickets |
## Create mode
```text
Create progress:
- [ ] Step 1: Understand intent (read the request, scan code and docs, state findings)
- - [ ] Step 2: Interrogate (one question at a time; end with the "radically simpler?" challenge)
+ - [ ] Step 2: Interrogate (one question at a time; end with the scope challenge)
- [ ] Step 3: Synthesize (write the plan file, format matched to scope)
- - [ ] Step 4: Validate (run the four checks, emit the validation block)
+ - [ ] Step 4: Validate (four checks, emit the validation block)
- [ ] Step 5: Hand off to Review mode
```
### Step 1: Understand intent
- Before asking, scan code and docs:
-
- - Identify modules, files, and patterns related to the request; note conventions, abstractions, boundaries, and prior art.
- - Read relevant design docs, RFCs, ADRs, READMEs, referenced library/API docs, and any spec the user points to. Load `references/doc-grounding.md` to find docs and extract their decisions and rationale.
-
- State findings in 2-3 sentences before the first question.
+ Before asking anything, scan: modules, files, and patterns related to the request; conventions, boundaries, and prior art; design docs, RFCs, ADRs, READMEs, and any spec the user points to (`references/doc-grounding.md`). Delegate a wide scan to the Plan subagent so file contents stay out of the main context. State findings in 2-3 sentences before the first question.
### Step 2: Interrogate
- Load `references/interrogation-protocol.md`. Ask ONE question at a time. Every question carries a **recommended answer** grounded in Step 1: name the file, function, approach.
-
- - **Diverge before converging (first move):** put 2-3 genuinely different framings of the work on the table, not variations on one, each with what it buys and what it forecloses, then recommend one. Every later question narrows, so this is the only turn where the frame itself is still open. It costs at most one question and catches the two scope errors nothing else does: too narrow (a one-line fix where the whole bug class needed handling) and too wide (a framework where one function held).
- - If code or docs can answer it, answer it yourself; never spend a user question on it.
- - Each answer shapes the next. Walk the decision tree: resolve intent and scope before approach, approach before risks.
- - Flag fuzzy terms ("handle auth", "make it fast"): propose a sharp version and ask if it is right.
- - Surface tensions with existing code: "The codebase does X. You're proposing Y. Which wins?"
- - **Grill the core decisions:** when docs reveal a decision, interrogate *why* it was made and whether the rationale still holds. Never re-ask what docs answer; pressure-test the reasoning.
- - **Probe for a reference-as-spec:** ask if existing code, a library, a design, or a site already does this the way the user wants. If so, read it and treat its semantics as the spec, interrogating only deviations.
- - **Blindspot pass (conditional):** when the user is unfamiliar with the area or asks for one ("blindspot pass", "unknown unknowns"), pause questions to surface what good looks like, prior work, and potholes, then teach it back before resuming. Detail in `references/interrogation-protocol.md`.
+ Load `references/interrogation-protocol.md`. One question at a time, each carrying a recommended answer grounded in Step 1 (file, function, approach).
- **Budget:** 5-10 questions, then synthesize. Needing more than 10 is evidence the scope is too big for one plan; propose a split instead of continuing to ask, and load `references/splitting.md` to run it. A split redirects Step 3: the deliverable becomes the approved tickets, indexed by a `## Slices` section in a lightweight plan file, rather than one plan no executor can finish in a pass. Steps 4 and 5 still run on that file.
+ - **Diverge first:** open with 2-3 genuinely different framings of the work, each with what it buys and forecloses, then recommend one. This is the only turn where the frame is still open, and it catches the two scope errors nothing later can: too narrow (a one-line fix where the bug class needed handling) and too wide (a framework where one function held).
+ - If code or docs can answer it, answer it yourself. A question the repo answers spends budget and returns what Step 1 read for free.
+ - Walk the decision tree: intent and scope before approach, approach before risks. Sharpen fuzzy terms by proposing the sharp version.
+ - Surface tensions with existing code: "The codebase does X. You're proposing Y. Which wins?" When docs reveal a decision, grill the rationale, not the choice.
+ - **Reference-as-spec:** ask whether existing code, a library, a design, or a site already does this the way the user wants. If so, read it, treat its semantics as the spec, and interrogate only deviations.
+ - **Blindspot pass** (when the user is new to the area or asks for one): pause to surface what good looks like, prior art, and potholes, teach it back in cited bullets, then resume.
+ - **Batch only independent questions:** several questions in one `AskUserQuestion` call when no answer changes the next question (greenfield specs). Default to one at a time whenever answers branch.
- **Mandatory scope challenge (before synthesizing):** ask "What can we cut without dropping a current requirement?" Carry a recommended cut list: removed extension points, setup collapsed into the first vertical slice, new code or dependencies a higher ladder rung already covers, abstractions kept only when they protect a shared invariant/owner/lifecycle, and safety gates preserved where "simpler" would drop correctness. Challenge the *sum* of the plan, not each piece.
+ **Budget:** 5-10 questions, then synthesize. Needing more than 10 means the scope exceeds one plan: propose a split via `references/splitting.md` instead of asking an eleventh. A split redirects Step 3: the deliverable becomes approved tickets indexed by a `## Slices` section in a lightweight plan file. Steps 4 and 5 still run on that file.
- **Batch mode (optional):** for large or greenfield specs with many independent questions, generate one local HTML form. Load `references/html-question-form.md` for the template and batch-vs-sequential table. Default to one-at-a-time when answers should shape later questions.
+ **Scope challenge (last question, always):** "What can we cut without dropping a current requirement?" Bring a recommended cut list: removed extension points, setup collapsed into the first vertical slice, code or dependencies a higher ladder rung covers, abstractions kept only where they protect a shared invariant or owner, and safety gates preserved where "simpler" would drop correctness. Challenge the sum of the plan, not each piece.
- **Escape hatch:** if the user says "just write the plan", push back once via the anti-rationalization table, then respect their call and skip to Step 3.
+ **Escape hatch:** if the user says "just write the plan", push back once with the anti-rationalization table, then respect the call and go to Step 3.
### Step 3: Synthesize
- Write the plan file to the active agent's native plan directory when one exists; otherwise to the user-specified path or the repo-local plan location set by project instructions. Match format to scope.
+ Write the plan file (see the plan-mode section for where). Match format to scope and drop any section the task does not need; a plan that restates the codebase or explains decisions the reader already made buries the parts that need a second look.
**Lightweight** (single file, clear approach): `# Title`, `## Context` (one paragraph), `## Approach`.
- **Standard** (multiple files, decisions made): `# Title`, `## Context` (problem, what prompted it, intended outcome), `## Approach` (recommended only), `## Key decisions` (brief rationale), `## Files to modify` (grouped by purpose), `## Out of scope` (related-looking things that must not change, each with a reason), `## Verification` (each item a command plus expected result).
-
- **Order volatile-first:** within Approach, Key decisions, and Files to modify, lead with the decisions the user is most likely to tweak (data model changes, new type interfaces, user-facing flows) and sink mechanical refactoring detail to the bottom. A reviewer should be able to stop reading once the tweakable decisions look right.
-
- Keep plans scannable yet executable without re-reading the conversation. Record only the chosen approach; rejected alternatives become one-line rationale under Key decisions.
-
- **Size the plan to the work, not to the template.** Pick the lightest format the task supports, and drop any section the task does not need rather than filling it. A plan that restates the codebase, enumerates every file when a pattern plus three representative paths would do, or explains decisions the reader already made costs review attention and buries the parts that need a second look.
-
- **Handoff plans:** when another agent or session will execute, the executor has not seen this conversation. Inline any code excerpts and conventions it needs (with `file:line` markers), and add a **STOP conditions** section: assumptions that, if false, mean stop and report back rather than improvise.
+ **Standard** (multiple files, decisions made): `# Title`, `## Context` (problem, trigger, intended outcome), `## Approach` (chosen only), `## Key decisions` (one-line rationale each; rejected alternatives live here), `## Files to modify` (grouped by purpose; a pattern plus three representative paths beats an exhaustive list), `## Out of scope` (related-looking things that must not change, each with a reason), `## Verification` (each item a command plus its expected result).
- Name an implementation-notes file next to the plan and instruct the executor to keep it: every deviation the code forced on the plan gets logged under a `## Deviations` heading as what the plan said, what the code required, and which option was taken. A deviation that is not a STOP condition never pauses the work; take the conservative option, log it, keep going. The notes file is what review reads afterwards, so a handoff without one loses every decision made during execution.
+ **Volatile first:** within Approach, Key decisions, and Files to modify, lead with what the user is most likely to tweak (data model, new interfaces, user-facing flows) and sink mechanical detail to the bottom, so a reviewer can stop reading once the tweakable decisions look right.
- A handoff plan also says what an acceptable finish looks like, not only what trips a STOP. STOP conditions name assumptions checkable in advance; an executor that never trips one and has no finish line keeps patching past the point the work stopped converging. The last entry in the implementation-notes file states how the run ended and the evidence for it: the capability works on the real path and the case that motivated the plan improved, or a genuine blocker was removed and the next one isolated, or the run stopped because finishing would need scope the plan does not cover.
+ **Handoff plans:** when a fresh session, subagent, or teammate executes, load `references/handoff-plans.md` and add its STOP conditions, finish line, and implementation-notes file. In plan mode with clear-context-on-accept, that is every plan.
### Step 4: Validate
- - Does the plan answer the user's original request?
+ - Does the plan answer the original request?
- Did every interrogation answer land in the plan? An answer that never made it in was a wasted question.
- - **Scope gate:** the plan fails if it violates any decision principle, especially an unneeded extension point, horizontal setup before the first tracer bullet, new code or a new dependency where a higher ladder rung holds, or a cut that drops required correctness, permissions, rollback, migration safety, or edge states.
- - Any unstated assumptions that should be explicit?
-
- Fix failures in the plan directly; don't reopen the interrogation.
+ - **Scope gate:** the plan fails on any decision-principle violation, especially an unneeded extension point, horizontal setup before the first tracer bullet, new code or a dependency where a higher ladder rung holds, or a cut that drops required correctness, permissions, rollback, migration safety, or edge states.
+ - Any unstated assumption that should be explicit?
- Then emit the validation block. Every row cites the plan section that satisfies its check, so a check with nothing to cite is a failure to fix before reporting rather than a claim to assert:
+ Fix failures in the file directly; don't reopen the interrogation. Then emit the block. Every row cites the plan section that satisfies it; a row with nothing to cite is a failure to fix, not a claim to assert:
```text
PLAN VALIDATION: <path>
Answers the request <section stating the intended outcome>
Answers landed <n of n interrogation answers; name any dropped>
Scope gate <section carrying the cut list; principles checked>
Assumptions explicit <section, or "none found">
Verification <the plan's Verification commands, copied>
```
- Lightweight plans have no Verification section; cite the one check that proves the approach instead.
+ Lightweight plans have no Verification section; cite the one check that proves the approach.
### Step 5: Hand off
- Offer Review: "Plan written to `<path>`. Stress-test it to 5/5 before implementation?"
+ "Plan written to `<path>`. Stress-test it to 5/5 before implementation?" In plan mode, run Review on yes and only then call `ExitPlanMode`.
## Review mode
- **Objective:** drive all six dimensions to **5/5**. Work each sub-5 dimension upward, re-scoring each round, until all are 5/5 or provably stalled on a decision only the user can make.
+ **Objective:** all six dimensions at **5/5**, or provably stalled on a decision only the user can make.
```text
Review progress:
- [ ] Step 1: Load the plan
- [ ] Step 2: Triage: verify checkable claims, score all six dimensions
- [ ] Step 3: Rubber duck loop: drive each dimension <5 to 5/5 (max 2 pushes per question)
- - [ ] Step 4: Re-score after each dimension; repeat the sweep until all 5/5 or stalled
- - [ ] Step 5: Gap summary (before/after scores + residual blockers)
- - [ ] Step 6: Confirm the plan file contains every resolution and unresolved annotation
+ - [ ] Step 4: Re-score after each dimension; repeat until all 5/5 or stalled
+ - [ ] Step 5: Gap summary (before/after scores plus residual blockers)
+ - [ ] Step 6: Confirm the plan file holds every resolution and unresolved annotation
```
### Step 1: Load the plan
- If the user gives a path, read it. Otherwise list the active agent's native plan directory by modification time, pick the most recent, and confirm. Read the full plan; note its goal, structure, length. If it is a diff or code, stop and route to `pr-reviewer`.
+ Read the path the user gives; otherwise list the plans directory by modification time, pick the most recent, and confirm. Note goal, structure, length. A diff or code routes to `pr-reviewer`.
### Step 2: Triage
- Load `references/plan-quality-rubric.md`. Silently score each of the six dimensions 1-5. While scoring, mark every claim checkable against local code, docs, or specs; verify the load-bearing ones now (load `references/claim-verification.md`) and fold the verdicts into the scores. Never spend a dialogue turn on what the codebase can answer.
-
- Output a triage table:
+ Load `references/plan-quality-rubric.md`. Score each dimension 1-5 silently. Mark every claim checkable against local code, docs, or specs; verify the load-bearing ones now (`references/claim-verification.md`) and fold verdicts into the scores. A NOT VERIFIED claim drops its dimension a point and becomes the first question.
```
PLAN TRIAGE:
Completeness ███░░ 3/5 Missing error handling, no rollback
Feasibility ████░ 4/5 One unproven dependency
Scope ██░░░ 2/5 Premature abstractions
Testability █░░░░ 1/5 No verification strategy
Risk ███░░ 3/5 Blast radius unclear
Assumptions ██░░░ 2/5 Three unstated assumptions
```
- State: "I'll work each dimension up to 5/5, starting with the weakest." If more than 3 dimensions start at 1-2, the plan needs rewriting, not review: switch to Create mode instead of grinding the loop. If Scope stays below 5 because the plan carries more than one shippable outcome, it is two plans and no amount of tightening fixes that: split it with `references/splitting.md`.
+ Then: "I'll work each dimension up to 5/5, starting with the weakest." More than 3 dimensions at 1-2 means the plan needs rewriting, not review: switch to Create mode. Scope stuck below 5 because the plan carries two shippable outcomes means two plans: split via `references/splitting.md`.
### Step 3: Rubber duck loop
- Load `references/questioning-framework.md` and `references/dialogue-examples.md`. Each round:
+ Load `references/questioning-framework.md`. Each round:
- 1. Pick the lowest-scoring dimension still below 5.
- 2. Ask ONE question that quotes or names a specific section, claim, or omission. Never bundle two questions.
+ 1. Pick the lowest dimension still below 5.
+ 2. Ask one question that quotes a specific section, claim, or omission.
3. On the answer, choose exactly one move:
- - **VERIFY:** the answer or the plan text it defends is checkable with local evidence. Load `references/claim-verification.md`, gather evidence, quote the authoritative doc, return VERIFIED / NOT VERIFIED / INCONCLUSIVE, then continue informed. Prefer VERIFY over asking when evidence can settle it.
- - **PUSH DEEPER:** the answer hand-waves complexity. Ask a sharper follow-up. Max 2 pushes per question.
- - **ACCEPT AND RECORD:** the answer closes the gap. Write the resolution into the plan file immediately, then re-score the dimension.
- - **REFRAME:** the concern does not apply as framed. Acknowledge what the user got right, then redirect to the actual gap.
-
- Stay on the same dimension until it reaches 5/5 or stalls, then move to the next-lowest below 5.
+ - **VERIFY:** the answer or the plan text is checkable locally. Gather evidence, quote the source, return VERIFIED / NOT VERIFIED / INCONCLUSIVE, continue informed. Prefer this over asking whenever evidence can settle it.
+ - **PUSH DEEPER:** the answer hand-waves. Ask a sharper follow-up. Max 2 pushes per question.
+ - **ACCEPT AND RECORD:** the gap closes. Write the resolution into the plan file immediately, re-score.
+ - **REFRAME:** the concern does not apply as framed. Acknowledge what the user got right, redirect to the actual gap.
- **Stall rule:** after 2 pushes without a 5/5 answer, propose a concrete fix to accept or reject. If accepted, write it in and re-score. If the user defers, record what blocks 5/5 and move on. Don't keep re-asking in different words.
+ **Stall rule:** after 2 pushes without a 5/5 answer, propose a concrete fix to accept or reject. Accepted: write it in, re-score. Deferred: record what blocks 5/5, move to the next dimension. Re-asking in different words never produces the answer.
### Step 4: Re-score and repeat
- After each dimension closes or stalls, re-render the triage table so the climb is visible. Sweep again over any dimension below 5. The loop ends when all six are 5/5, the user invokes the escape hatch, or a full sweep makes no progress (summarize what blocks 5/5 and stop).
+ After each dimension closes or stalls, re-render the triage table so the climb is visible. Sweep again over anything below 5. Stop when all six are 5/5, the user invokes the escape hatch, or a full sweep makes no progress.
### Step 5: Gap summary
- Lead with the final triage table (before and after). List residual gaps in three tiers; if every dimension reached 5/5, say so and leave "Must address" empty.
+ Lead with the before and after triage tables. Then residual gaps in three tiers; if every dimension reached 5/5, say so and leave "Must address" empty.
```markdown
## Plan Review
### Must address before implementation
- - [SCOPE] `## Data Migration`: no incremental path; what if migration fails halfway?
- Resolved: NO
+ - [SCOPE] `## Data Migration`: no incremental path; what if migration fails halfway? Resolved: NO
### Should address soon
- - [ASSUMPTION] Plan assumes API rate limits won't be hit at projected scale
- Resolved: YES (user confirmed 80/min is within the 100/min limit with headroom)
+ - [ASSUMPTION] Assumes API rate limits hold at projected scale. Resolved: YES (80/min confirmed against a 100/min limit)
### Noted for awareness
- - [RISK] Single dependency on third-party service with no fallback
- Resolved: NO
+ - [RISK] Single third-party dependency with no fallback. Resolved: NO
```
### Step 6: Confirm the plan file
- Plan edits happen incrementally during the loop; this final pass confirms the file is the deliverable: every resolution inline where its gap was identified; every stalled dimension carries a `<!-- UNRESOLVED: what blocks 5/5 -->` comment; a Review Notes section appended with before/after triage scores and the date. Do not ask permission to edit; updating the plan is the point. If the plan arrived as pasted text with no file, output the full updated plan in a code block and offer to write it to the active agent's native plan directory or a user-specified path.
+ Edits happened during the loop; this pass confirms the file is the deliverable: every resolution inline where its gap was found, every stalled dimension carrying a `<!-- UNRESOLVED: what blocks 5/5 -->` comment, and a `## Review notes` section with the before/after scores and date. Updating the plan is the point, so do not ask permission. A plan that arrived as pasted text has no file: output the full updated plan in a code block and offer to write it to the plans directory or a path the user names.
### Review dialogue protocol
- Quote the plan's words when challenging; paraphrase invites "that's not what I meant" detours.
- - No "great plan, but...": start with the triage table and go straight to gaps. Acknowledge strengths in one clause at most.
- - Direct but constructive; aim to strengthen, not criticize.
+ - Start with the triage table and go straight to gaps; acknowledge strengths in one clause at most.
- Name scope creep, unearned abstractions, and horizontal-layer plans explicitly. Push for the minimum executable slice that proves the approach end-to-end.
## Gotchas
- - A question the code or docs can answer spends one of the 5-10 budget and returns what Step 1 would have read for free.
- - Past 10 questions the scope is too big for one plan. Asking an eleventh buys detail on a plan that cannot be executed in one pass; propose a split.
+ - Approving a plan with the clear-context option leaves the executor holding only the file. "As discussed" or "the approach we agreed on" in the plan points at a conversation that no longer exists; every decision must be stated in the file.
+ - `~/.claude/plans/` is outside the repo: nothing there is committed, visible to a second worktree, or read by CI. A plan a teammate or a later session must pick up needs a copy at the repo path, and the chat must say which file is authoritative.
+ - In plan mode, commands outside the read-only set prompt or go to the classifier. A VERIFY move that reaches for `npm test` or a full build stalls on a permission prompt mid-dialogue; settle claims with `grep`, `git log`, and file reads first, and run the suite only for a load-bearing claim.
+ - A `## Verification` line of bare `npm test` passes green when the executor writes no tests. Each line names the test, command, or observation and its expected result, so a missing test is a visible failure.
+ - Driving Completeness to 5/5 by adding error handling for cases that cannot occur is the padding the review exists to catch. A Completeness point bought with a Scope point is a regression; the rubric's 5/5 is specifics, not coverage of hypotheticals.
- A split that names slices without publishing them leaves the work exactly where it was, in prose. The deliverable is tickets a human approved and an agent can pick up, each declaring its blockers.
- - Blocking edges declared only in a ticket's prose are invisible to whatever picks the tickets up. Use the tracker's native blocking relation, and only where the dependency is real: a false edge parks a ticket that could have started.
- - Re-asking a stalled question in different words never produces the 5/5 answer. Propose a concrete fix to accept or reject, or record what blocks 5/5 and move to the next dimension.
- - A handoff plan with no named implementation-notes file loses every deviation the code forced on the executor, so review afterwards has nothing to read.
- - A handoff plan that says what trips a STOP but never what an acceptable finish looks like leaves an executor that trips nothing patching indefinitely, with nothing in the notes file recording how the run ended.
- - A plan that arrived as pasted text has no file to write resolutions into, so the whole Review evaporates when the session ends. Output the full updated plan in a code block and offer a path.
+ - Blocking edges written only in a ticket's prose are invisible to whatever picks the tickets up. Use the tracker's native relation, and only for real dependencies: one decorative edge parks a ticket that could have started, silently.
## Related skills
- Pipeline: `planning` -> implementation -> `pr-reviewer` -> `pr-creator` -> `pr-babysitter`.
-
- - `pr-reviewer`: code review after implementation; route here the moment the input is code, not a plan.
+ - `pr-reviewer`: reviews the implemented diff, including against the plan file; route here the moment the input is code, not a plan.
+ - `tidy`: applies simplifications to a diff; the scope challenge is the same instinct applied before the code exists.
- `pr-creator`: opens the PR once the plan is implemented.
- - `codebase-architecture`: architectural decisions that feed into plans.
+ - `codebase-architecture`: architecture briefs and ADRs that a plan cites under Key decisions.