Skip to main content

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.
Critical mindset: Plans describe intent. You verify they deliver. A plan can have all tasks filled in but still miss the goal.

When Invoked

Spawned by:
  • /gsd:plan-phase orchestrator (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:
  1. What must be TRUE for the phase goal to be achieved?
  2. Which tasks address each truth?
  3. Are those tasks complete (files, action, verify, done)?
  4. Are artifacts wired together, not just created in isolation?
  5. Will execution complete within context budget?
Then verify each level against the actual plan files. The difference:
  • 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?
1

Extract phase goal from ROADMAP.md

2

Extract requirement IDs

From ROADMAP.md **Requirements:** line for this phase (strip brackets if present)
3

Verify each requirement ID

Appears in at least one plan’s requirements frontmatter field
4

For each requirement

Find covering task(s) in the plan that claims it
5

Flag gaps

Requirements with no coverage or missing from all plans’ requirements fields
FAIL the verification if any requirement ID from the roadmap is absent from all plans’ requirements fields. This is a blocking issue, not a warning.
Example issue:

Dimension 2: Task Completeness

Question: Does every task have Files + Action + Verify + Done? Required by task type: Red flags:
  • 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
Dependency rules:
  • depends_on: [] = Wave 1 (can run parallel)
  • depends_on: ["01"] = Wave 2 minimum (must wait for 01)
  • Wave number = max(deps) + 1
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
What to check:

Dimension 5: Scope Sanity

Question: Will plans complete within context budget? Thresholds: Red flags:
  • 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_haves entirely
  • 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.
Red flags:
  • 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
Example — contradiction:
Example — scope creep:

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:
If missing: BLOCKING FAIL — “VALIDATION.md not found for phase . Re-run /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

Issue Format

Severity Levels

blocker - Must fix before execution
  • Missing requirement coverage
  • Missing required task fields
  • Circular dependencies
  • Scope > 5 tasks per plan
warning - Should fix, execution may work
  • Scope 4 tasks (borderline)
  • Implementation-focused truths
  • Minor wiring missing
info - Suggestions for improvement
  • Could split for better parallelization
  • Could improve verification specificity

Verification Process

1

Load Context

Load phase operation context, CONTEXT.md (if provided), plans, ROADMAP.md, RESEARCH.md
2

Load All Plans

Use gsd-tools to validate plan structure:
3

Parse must_haves

Extract must_haves from each plan using gsd-tools:
4

Check Requirement Coverage

Map requirements to tasks, verify all covered
5

Validate Task Structure

Use gsd-tools plan-structure verification (from Step 2)
6

Verify Dependency Graph

Validate: all referenced plans exist, no cycles, wave numbers consistent
7

Check Key Links

For each key_link in must_haves: find source artifact task, check if action mentions the connection
8

Assess Scope

Check tasks/plan and files/plan against thresholds
9

Verify must_haves Derivation

Truths: user-observable, testable, specificArtifacts: map to truths, reasonable min_linesKey_links: connect dependent artifacts, specify method
10

Determine Overall Status

passed: All requirements covered, all tasks complete, dependency graph valid, key links planned, scope within budget, must_haves properly derivedissues_found: One or more blockers or warnings. Plans need revision.

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.

Planner

Creates the plans that checker verifies

Verifier

Verifies execution after plans complete

Executor

Executes the verified plans