plan_review
Purpose
Produce the smallest correct plan through one evidence wave, correctness review, then subtraction-first simplification.
Inputs
$ARGUMENTS: feature root/name or descendantplan.md; optional--auto-apply scope-safe,--orchestrated.- Require
{FEATURE_ROOT}/specs/plan.mdor route tospectre-create_plan. Authority:concepts/scope.md,specs/prd.md,specs/ux.md, then explicittask_context.mdrequirements. Reuse existing research.
Working Set
- Resolve one managed
FEATURE_ROOTfor this work from explicit/current-thread evidence only (physical directory wins; never branch/recency/lifecycle/scans). If none is confirmed, including when the candidate path is occupied, standalone MUST first load and followSkill(spectre-feature-root)through DONE; orchestrated calls escalate. Keep writes beneath it and pass it unchanged. - Reports:
reviews/plan_correctness.mdandreviews/plan_review.md. Resume a sole correctness report only when its post-edit hash matchesplan.md; otherwise use absent canonical paths or timestamped siblings.
Outputs + DONE
plan_correctness.md: route/model metadata and hashes; evidence/unknowns; findings; retained constraints/tests; dispositions and resulting edits.plan_review.md: correctness path/hash; deletions, collapses, reuse, deferrals, retained exceptions, test reductions, findings/dispositions, and structural Before → After.- Reports are deltas; never restate the plan.
DONE when both stages complete; research ran once at most; every mechanism traces to a current requirement, constraint, prerequisite, or verified fact; every new complexity boundary has a valid exception; the plan is smaller in mechanisms, surfaces, process, or tests—or proves no safe reduction; behavior and constraints survive; no correctness Blocker/High remains; scope changes are withheld; findings are disposed; hashes/write bounds pass; and direct-mode Verification is executable.
Method / guardrails
Canonical Scope Invariant: correct and simplify implementation means without narrowing, expanding, or reinterpreting Scope. Mark boundary changes Scope Change Required; never auto-apply them.
Evidence. Identify unsupported material claims. If needed, use at most one each
@spectre_finder,@spectre_analyst, and@spectre_patterns, in parallel, for citation-first evidence/unknowns only (≤1,000 tokens total).Correctness. Read
references/correctness-review.mdand send it verbatim to a fresh reviewer with: plan, Scope, task-context, and report paths/hashes; compiled evidence/unknowns; edit mode and write bounds; route metadata.Simplification. After correctness writeback, read
references/simplification-review.mdand send it verbatim to a second fresh reviewer with: corrected plan, Scope, correctness-report, and output-report paths/hashes; edit mode and write bounds; route metadata. Supply existing evidence; allow one cited anchor spot-check.Writeback. Reviewers write only their report and
plan.md, with the report written before plan edits; scope/context/tasks/code remain immutable.--auto-apply scope-safepermits Blocker/High and unambiguous Medium edits; otherwise askall|blockers|IDs|skip, then continue on the same route. Recordaddressed|skipped|unresolved|scope-change. Stop on unresolved correctness Blocker/High, scope change, unavailable writeback, or failed schema/hash/scope/Out-of-Bounds checks. The primary may normalize mechanics, never semantics.Route. Run each stage fresh at high effort (20-minute limit): Codex → Claude Code
opus; Claude Code → Codexgpt-5.6-sol. Record stage/runtime/model/effort/route. If unusable, use one clean-context native@spectre_reviewerwith the same template and context. A usable review is terminal.
Handoff
Return routes, correctness status, deletions/retained exceptions, structural delta, dispositions, reports, withheld scope changes, and updated plan in ≤1,000 tokens. Orchestrated calls return; standalone success recommends spectre-create_tasks or direct spectre-execute.
Escalate-If
Plan missing; a material claim remains unknowable; scope change is required; correctness Blocker/High remains; writeback is unavailable; or schema/hash/scope/Out-of-Bounds checks fail.