plugins/spectre/skills/plan_review/SKILL.md
👻 | Independent multi-lens review of plan.md and/or tasks.md — finds overengineering, missing verification, hallucinated deps, weak references
npx skillsauth add codename-inc/spectre plan_reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
plan.md, tasks.md, and optional task_context.md) from four specialized lenses, dispatched in parallelA single reviewer biases toward the issues it notices first. Published practice (Cognition, Anthropic, Osmani) converges on four high-yield review angles for AI-agent-authored plans. We dispatch each as a parallel subagent so coverage is structurally guaranteed, not dependent on a single reviewer remembering everything.
| Lens | Subagent | Finds |
|------|----------|-------|
| YAGNI / familiar-shape bias | @reviewer | Mature-system patterns that crept in unprompted (auth → rate-limit, CRUD → soft-delete, etc.). Forces ONE "delete this" recommendation. |
| Verifiability | @analyst | Acceptance criteria that aren't executable; verification gaps between plan and tasks. |
| Existence / hallucination | @finder | File paths, packages, APIs, or symbols referenced that don't actually exist. The slopsquatting fence. |
| Canonical reference quality | @patterns | "Follow existing pattern" claims without a real file:line anchor; missed reuse opportunities. |
Action — DetermineTaskDir:
branch_name=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown)TASK_DIR={that value}TASK_DIR=docs/tasks/{branch_name}Action — ResolveArtifacts: Locate the available review inputs.
PLAN=${TASK_DIR}/specs/plan.md (or scoped name)TASKS=${TASK_DIR}/specs/tasks.md (or scoped name)CONTEXT=${TASK_DIR}/task_context.mdplan.md and tasks.md are independently reviewable. It is valid to review only plan.md, only tasks.md, or both.task_context.md is helpful context but is not required. If it is missing, continue and note that requirements traceability is limited.plan.md and tasks.md are missing, stop and suggest the user run /spectre:plan or /spectre:create_tasks first.plan.md or tasks.md is missing, list it as absent context and continue. Do not decline, stop, or ask the user to create the missing artifact.Action — ReadAvailable: Read each available file completely into context before dispatching reviewers. Reviewers receive curated excerpts plus an artifact manifest that says which files are present and absent. Every reviewer must review the artifacts that exist and must not treat absent artifacts as a blocker.
Spawn all four subagents in a single message (parallel). Each receives the same available artifact excerpts, the artifact manifest, and a different review brief.
Missing-artifact rule for every lens: review what exists. If a finding depends on a missing artifact, phrase it as "not reviewable because <artifact> is absent" only when that context is necessary; do not fail the review or ask for the missing artifact.
@reviewer)Review the available plan and/or task list for unrequested complexity. Agents have a documented "familiar-shape bias": shown a feature, they reproduce the mature-system shape from their training data (auth → adds rate-limiting; CRUD → adds soft-delete; form → adds optimistic UI; service → adds telemetry; module → adds feature flags). Your job is to find that bias here.
Find:
- When
plan.mdis present: anything in Technical Approach that isn't traceable to a requirement in available context (task_context.md/ scope / PRD). If context is absent, use the plan's own requirements and boundaries.- When
tasks.mdis present: tasks that implement something the available requirements don't ask for. If requirements context is absent, use the task list's stated goals and boundaries.- Abstractions, interfaces, or layers introduced for a single concrete caller.
- Generality (config files, plugin points, factories) where the actual need is one specific behavior.
- Overlap with the
Out-of-Bounds — DO NOT addlist (if anything violates that list, it's a hard fail).Required output: nominate the SINGLE highest-leverage thing to delete and justify it. You must pick one. Then list other simplifications ranked by impact. For each finding, cite the exact file:line or section header it lives in.
@analyst)Review the available plan and/or task list for verification quality. The single highest-correlate of successful AI-agent execution is the ability to self-verify. Find every place where verification is missing, prose-only, or disconnected.
Find:
- When
plan.mdis present: items in "Verification — How We Know This Works" that are prose ("works correctly", "is consistent") rather than executable (test name / observable behavior / state condition).- When
plan.mdis present: phases that don't declare a verification signal.- When
tasks.mdis present: sub-tasks whose acceptance criteria aren't one of the three executable types (test passes / observable behavior / state condition).- When both
plan.mdandtasks.mdare present: verification signals inplan.mdwith no matching acceptance criterion intasks.md.- When
tasks.mdis present: behavior-changing sub-tasks that lack a preceding RED test sub-task.Required output: list every non-executable criterion with a proposed rewrite in one of the three types. Cite file:line for each.
@finder)Review the available plan and/or task list for references to things that may not exist. AI-generated plans hallucinate file paths, package names, function signatures, and API endpoints at measurable rates (~20% for packages per Snyk analysis). Your job is to verify every reference is real.
Verify:
- Every file path mentioned in available artifacts, including
plan.md"Critical Files for Implementation" andtasks.mdContext blocks when present — does the file exist in the repo today? Use Glob/Read to confirm.- Every package in
plan.md"External Dependencies" whenplan.mdis present — does it exist at the named version? (Note: actual install/registry check is the executor's Phase 0 job; your job is to flag suspicious names — typos, near-misses to well-known packages, lookalikes.)- Every function, class, or symbol named in available plan/tasks — grep the repo, confirm it exists where claimed.
- Every API endpoint, env var, or CLI flag referenced — confirm it's defined in the codebase.
Required output: list every reference that fails verification, with
expected: <plan claim>andactual: <repo state>. If everything checks out, say so explicitly — don't pad.
@patterns)Review the available plan and/or task list for the quality of "follow existing pattern" references. Anthropic's own guidance is to anchor plans with concrete examples (e.g., "HotDogWidget.php is a good example"). Vague "follow existing patterns" without a file:line anchor is a documented failure mode.
Find:
- When
plan.mdis present: places in Technical Approach that reference "existing patterns" or "similar features" without a specific file:line.- When
tasks.mdis present: sub-tasks whose Context block lacks a canonical reference pointer.- Better canonical references that the plan missed — actual files in the codebase that more closely match the intended shape.
- Reuse opportunities the plan ignored: utilities, hooks, helpers, or types already in the repo that the plan re-implements.
Required output: for each weak/missing reference, propose a specific file:line that should be the anchor. For each missed reuse, cite the existing utility and which task should use it.
Action — CollectFindings: Wait for all four reviewers to return. Read every finding.
Action — DeduplicateAndPrioritize: Merge findings that overlap (e.g., a missing canonical reference may surface from both Lens 4 and Lens 2). Assign severity:
Action — RenderFindingsTable: Output a single structured table. Schema is fixed.
## Review Findings — {feature name}
### Must-Delete (Lens 1 — YAGNI)
> {The single nominated highest-leverage cut, with rationale.}
### Findings
| # | Severity | Lens | Location | Finding | Suggested Edit |
|---|----------|------|----------|---------|----------------|
| 1 | Blocker | Existence | plan.md `## External Dependencies` | `[email protected]` doesn't exist on npm | Remove; the plan can use `useReducer` from React stdlib (see `src/hooks/useFormState.ts:18`) |
| 2 | High | Verifiability | tasks.md `1.2.1` | "Component renders correctly" is prose | Replace with: Test passes `<ProductCard /> renders product.title and product.price` |
| 3 | High | YAGNI | plan.md `## Technical Approach` | Adds retry-with-backoff for a sync internal call | Delete; not in requirements; Out-of-Bounds list already forbids retry logic |
| … | | | | | |
### Summary
- Blockers: {N} — must resolve before /execute
- High: {N}
- Medium: {N}
- Low: {N}
Action — PresentFindings: Render the findings table inline.
Action — OfferWriteBack: After the table, prompt:
Reply with which findings to apply:
all— apply every suggested editblockers— apply Blocker + High severity only1,3,5— apply specific finding numbersskip— leave artifacts unchangedFor findings I apply, I'll edit the relevant available artifact(s) inline and re-run a fast self-check.
Wait — User selects.
Action — ApplyEdits: For each selected finding:
plan.md or tasks.md)Action — SelfCheck: After edits, run a fast pass over the modified sections:
Action — ReportApplied:
Applied: {list of finding numbers}. Skipped: {list}. {Path to updated artifact(s)}.
@skill-spectre:spectre-guide skill for Next Steps footer.plan.md or tasks.md exists, review that artifact. Only route the user to /spectre:plan or /spectre:create_tasks when neither reviewable artifact exists.testing
👻 | Independent multi-lens review of plan.md and/or tasks.md — finds overengineering, missing verification, hallucinated deps, weak references
data-ai
👻 | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
data-ai
👻 | Transform requirements into executable tasks - primary agent
testing
👻 | Independent multi-lens review of plan.md and/or tasks.md — finds overengineering, missing verification, hallucinated deps, weak references