From c7fbb8159953941dedd92f42527ae3958316c22f Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Thu, 15 Jan 2026 10:19:26 -0600 Subject: [PATCH] feat(execute-plan): add phase verification when phase completes When execute-plan completes the last plan in a phase (summaries = plans), it now spawns gsd-verifier to verify phase goal achievement before proceeding to next phase. Same verification flow as execute-phase, ensuring consistent behavior regardless of which command is used. Co-Authored-By: Claude --- commands/gsd/execute-plan.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/commands/gsd/execute-plan.md b/commands/gsd/execute-plan.md index 53205a4ed..8c827f4cf 100644 --- a/commands/gsd/execute-plan.md +++ b/commands/gsd/execute-plan.md @@ -124,9 +124,34 @@ ls -1 .planning/phases/[phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l | Condition | Action | |-----------|--------| | summaries < plans | More plans remain → Route A | -| summaries = plans | Phase complete → Update requirements, then Step 3 | +| summaries = plans | Phase complete → Step 2.5 (verify phase goal) | -**Step 2.5: Update requirements (only when phase complete)** +**Step 2.5: Verify phase goal (only when phase complete)** + +When summaries = plans, verify the phase achieved its GOAL before proceeding: + +``` +Task( + 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}" +) +``` + +Handle verification result: +- **If passed:** Continue to Step 2.6 (update requirements) +- **If gaps_found:** Create fix plans, execute them, re-verify (max 3 cycles) +- **If human_needed:** Present items to user, collect response + +**Step 2.6: Update requirements (only when verification passes)** When summaries = plans, update REQUIREMENTS.md before presenting completion: @@ -359,6 +384,7 @@ Continue handling returns until "## PLAN COMPLETE" or user stops. - [ ] Plan executed (SUMMARY.md created) - [ ] All checkpoints handled +- [ ] If phase complete: Phase goal verified (gsd-verifier spawned, VERIFICATION.md created) - [ ] If phase complete: REQUIREMENTS.md updated (phase requirements marked Complete) - [ ] User informed of completion and next steps