Plan Checker Agent
The plan checker agent verifies that plans WILL achieve the phase goal, not just that they look complete.Purpose
Goal-backward verification of PLANS before execution. Start from what the phase SHOULD deliver, verify plans address it.When Invoked
Spawned by:/gsd:plan-phaseorchestrator (after planner creates PLAN.md)- Re-verification (after planner revises)
Core Principle
Plan completeness ≠ Goal achievement A task “create auth endpoint” can be in the plan while password hashing is missing. The task exists but the goal “secure authentication” won’t be achieved. Goal-backward verification works backwards from outcome:- What must be TRUE for the phase goal to be achieved?
- Which tasks address each truth?
- Are those tasks complete (files, action, verify, done)?
- Are artifacts wired together, not just created in isolation?
- Will execution complete within context budget?
gsd-verifier: Verifies code DID achieve goal (after execution)gsd-plan-checker: Verifies plans WILL achieve goal (before execution)
Verification Dimensions
Dimension 1: Requirement Coverage
Question: Does every phase requirement have task(s) addressing it?Extract requirement IDs
From ROADMAP.md
**Requirements:** line for this phase (strip brackets if present)Dimension 2: Task Completeness
Question: Does every task have Files + Action + Verify + Done? Required by task type:| Type | Files | Action | Verify | Done |
|---|---|---|---|---|
auto | Required | Required | Required | Required |
checkpoint:* | N/A | N/A | N/A | N/A |
tdd | Required | Behavior + Implementation | Test commands | Expected outcomes |
- Missing
<verify>— can’t confirm completion - Missing
<done>— no acceptance criteria - Vague
<action>— “implement auth” instead of specific steps - Empty
<files>— what gets created?
Dimension 3: Dependency Correctness
Question: Are plan dependencies valid and acyclic? Red flags:- Plan references non-existent plan (
depends_on: ["99"]when 99 doesn’t exist) - Circular dependency (A -> B -> A)
- Future reference (plan 01 referencing plan 03’s output)
- Wave assignment inconsistent with dependencies
depends_on: []= Wave 1 (can run parallel)depends_on: ["01"]= Wave 2 minimum (must wait for 01)- Wave number = max(deps) + 1
Dimension 4: Key Links Planned
Question: Are artifacts wired together, not just created in isolation? Red flags:- Component created but not imported anywhere
- API route created but component doesn’t call it
- Database model created but API doesn’t query it
- Form created but submit handler is missing or stub
Dimension 5: Scope Sanity
Question: Will plans complete within context budget? Thresholds:| Metric | Target | Warning | Blocker |
|---|---|---|---|
| Tasks/plan | 2-3 | 4 | 5+ |
| Files/plan | 5-8 | 10 | 15+ |
| Total context | ~50% | ~70% | 80%+ |
- Plan with 5+ tasks (quality degrades)
- Plan with 15+ file modifications
- Single task with 10+ files
- Complex work (auth, payments) crammed into one plan
Dimension 6: Verification Derivation
Question: Do must_haves trace back to phase goal? Red flags:- Missing
must_havesentirely - Truths are implementation-focused (“bcrypt installed”) not user-observable (“passwords are secure”)
- Artifacts don’t map to truths
- Key links missing for critical wiring
Dimension 7: Context Compliance
Question: Do plans honor user decisions from /gsd:discuss-phase?Only check if CONTEXT.md was provided in the verification context.
- Locked decision has no implementing task
- Task contradicts a locked decision (user said “cards layout”, plan says “table layout”)
- Task implements something from Deferred Ideas
- Plan ignores user’s stated preference
Dimension 8: Nyquist Compliance
Skip if:workflow.nyquist_validation is explicitly set to false in config.json, phase has no RESEARCH.md, or RESEARCH.md has no “Validation Architecture” section.
Check 8e — VALIDATION.md Existence (Gate)
Before running checks 8a-8d, verify VALIDATION.md exists:/gsd:plan-phase {N} --research to regenerate.”
If exists: Proceed to checks 8a-8d.
Check 8a — Automated Verify Presence
For each<task> in each plan:
<verify>must contain<automated>command, OR a Wave 0 dependency that creates the test first- If
<automated>is absent with no Wave 0 dependency → BLOCKING FAIL
Check 8b — Feedback Latency Assessment
For each<automated> command:
- Full E2E suite (playwright, cypress, selenium) → WARNING — suggest faster unit/smoke test
- Watch mode flags (
--watchAll) → BLOCKING FAIL - Delays > 30 seconds → WARNING
Check 8c — Sampling Continuity
Map tasks to waves. Per wave, any consecutive window of 3 implementation tasks must have ≥2 with<automated> verify. 3 consecutive without → BLOCKING FAIL.
Check 8d — Wave 0 Completeness
For each<automated>MISSING</automated> reference:
- Wave 0 task must exist with matching
<files>path - Wave 0 plan must execute before dependent task
- Missing match → BLOCKING FAIL
What It Produces
Structured Returns
- Verification Passed
- Issues Found
Issue Format
Severity Levels
blocker - Must fix before execution- Missing requirement coverage
- Missing required task fields
- Circular dependencies
- Scope > 5 tasks per plan
- Scope 4 tasks (borderline)
- Implementation-focused truths
- Minor wiring missing
- Could split for better parallelization
- Could improve verification specificity
Verification Process
Check Key Links
For each key_link in must_haves: find source artifact task, check if action mentions the connection
Verify must_haves Derivation
Truths: user-observable, testable, specificArtifacts: map to truths, reasonable min_linesKey_links: connect dependent artifacts, specify method
Anti-Patterns
Don't check code existence
That’s gsd-verifier’s job. You verify plans, not codebase.
Don't run the application
Static plan analysis only.
Don't accept vague tasks
“Implement auth” is not specific. Tasks need concrete files, actions, verification.
Don't skip dependency analysis
Circular/broken dependencies cause execution failures.
Don't ignore scope
5+ tasks/plan degrades quality. Report and split.
Don't verify implementation details
Check that plans describe what to build.
Don't trust task names alone
Read action, verify, done fields. A well-named task can be empty.
Related Agents
Planner
Creates the plans that checker verifies
Verifier
Verifies execution after plans complete
Executor
Executes the verified plans