feat: add gsd-verifier subagent for phase goal verification

- gsd-verifier.md: dedicated verification subagent with all logic baked in
- Goal-backward verification: checks codebase, not SUMMARY claims
- Creates VERIFICATION.md, returns status to orchestrator
- execute-phase spawns gsd-verifier instead of general-purpose

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-01-15 09:51:14 -06:00
parent 82c522b8c3
commit f3f6707cbe
3 changed files with 711 additions and 20 deletions

View File

@@ -355,28 +355,25 @@ After all waves complete, aggregate results:
This step catches the common failure: tasks done but goal not met (stubs, placeholders, unwired code).
**1. Spawn verification subagent:**
Use the subagent-verify-prompt template:
**1. Spawn gsd-verifier subagent:**
```
Task(
prompt: filled_subagent_verify_prompt,
subagent_type: "general-purpose",
description: "Verify phase {X} goal achievement"
prompt="Verify phase {phase_number} goal achievement
Phase: {phase_number} - {phase_name}
Phase goal: {phase_goal_from_roadmap}
Phase directory: @.planning/phases/{phase_dir}/
Project context:
@.planning/ROADMAP.md
@.planning/REQUIREMENTS.md (if exists)",
subagent_type="gsd-verifier",
description="Verify phase {phase_number}"
)
```
Template variables:
- `{phase_number}`: Current phase
- `{phase_name}`: From ROADMAP.md
- `{phase_goal_from_roadmap}`: Phase description
- `{phase_dir}`: Filesystem directory
- `{must_haves_yaml}`: From PLAN.md frontmatter (or "derive from goal")
**2. Verification subagent runs:**
The subagent loads `workflows/verify-phase.md` and:
The `gsd-verifier` subagent has all verification logic baked in:
- Establishes must-haves (from frontmatter or derived)
- Verifies observable truths against codebase
- Checks artifacts exist and are substantive (not stubs)
@@ -385,6 +382,8 @@ The subagent loads `workflows/verify-phase.md` and:
- Creates VERIFICATION.md report
- Returns status to orchestrator
**2. Verification subagent returns** with status and report path.
**3. Handle verification result:**
**If status = "passed":**