diff --git a/commands/gsd/execute-phase.md b/commands/gsd/execute-phase.md index 8d8faafb8..086714ac3 100644 --- a/commands/gsd/execute-phase.md +++ b/commands/gsd/execute-phase.md @@ -64,10 +64,83 @@ Phase: $ARGUMENTS - Update ROADMAP.md 6. **Offer next steps** - - More phases → `/gsd:plan-phase {next}` - - Milestone complete → `/gsd:complete-milestone` + - Route to next action (see ``) + +**MANDATORY: Present copy/paste-ready next command.** + +After phase completes, determine what's next: + +**Step 1: Check milestone status** + +Read ROADMAP.md. Find current phase number and highest phase in milestone. + +| Condition | Action | +|-----------|--------| +| current < highest | More phases → Route A | +| current = highest | Milestone complete → Route B | + +--- + +**Route A: More phases remain in milestone** + +``` +## ✓ Phase {Z}: {Name} Complete + +All {Y} plans finished. + +--- + +## ▶ Next Up + +**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md} + +`/gsd:plan-phase {Z+1}` + +`/clear` first → fresh context window + +--- + +**Also available:** +- `/gsd:verify-work {Z}` — manual acceptance testing before continuing +- `/gsd:discuss-phase {Z+1}` — gather context first +- `/gsd:research-phase {Z+1}` — investigate unknowns + +--- +``` + +--- + +**Route B: Milestone complete** + +``` +🎉 MILESTONE COMPLETE! + +## ✓ Phase {Z}: {Name} Complete + +All {N} phases finished. + +--- + +## ▶ Next Up + +**Complete Milestone** — archive and prepare for next + +`/gsd:complete-milestone` + +`/clear` first → fresh context window + +--- + +**Also available:** +- `/gsd:verify-work` — manual acceptance testing before completing milestone +- `/gsd:add-phase ` — add another phase before completing + +--- +``` + + **Parallel spawning:** diff --git a/commands/gsd/execute-plan.md b/commands/gsd/execute-plan.md index 581c9096f..19a58079a 100644 --- a/commands/gsd/execute-plan.md +++ b/commands/gsd/execute-plan.md @@ -85,12 +85,111 @@ Plan path: $ARGUMENTS - If contains "## CHECKPOINT REACHED": Execute checkpoint_handling - If contains "## PLAN COMPLETE": Verify SUMMARY exists, report success -7. **Report completion** +7. **Report completion and offer next steps** - Show SUMMARY path - Show commits from subagent return - - Offer next steps + - Route to next action (see ``) + +**MANDATORY: Present copy/paste-ready next command.** + +After plan completes, determine what's next: + +**Step 1: Count plans vs summaries in current phase** +```bash +ls -1 .planning/phases/[phase-dir]/*-PLAN.md 2>/dev/null | wc -l +ls -1 .planning/phases/[phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l +``` + +**Step 2: Route based on counts** + +| Condition | Action | +|-----------|--------| +| summaries < plans | More plans remain → Route A | +| summaries = plans | Phase complete → Check milestone (Step 3) | + +--- + +**Route A: More plans remain in phase** + +Find next PLAN.md without matching SUMMARY.md. Present: + +``` +Plan {phase}-{plan} complete. +Summary: .planning/phases/{phase-dir}/{phase}-{plan}-SUMMARY.md + +{Y} of {X} plans complete for Phase {Z}. + +--- + +## ▶ Next Up + +**{phase}-{next-plan}: [Plan Name]** — [objective from PLAN.md] + +`/gsd:execute-plan .planning/phases/{phase-dir}/{phase}-{next-plan}-PLAN.md` + +`/clear` first → fresh context window + +--- +``` + +--- + +**Step 3: Check milestone status (only when phase complete)** + +Read ROADMAP.md. Find current phase number and highest phase in milestone. + +| Condition | Action | +|-----------|--------| +| current < highest | More phases → Route B | +| current = highest | Milestone complete → Route C | + +--- + +**Route B: Phase complete, more phases remain** + +``` +## ✓ Phase {Z}: {Name} Complete + +All {Y} plans finished. + +--- + +## ▶ Next Up + +**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md} + +`/gsd:plan-phase {Z+1}` + +`/clear` first → fresh context window + +--- +``` + +--- + +**Route C: Milestone complete** + +``` +🎉 MILESTONE COMPLETE! + +## ✓ Phase {Z}: {Name} Complete + +All {N} phases finished. + +--- + +## ▶ Next Up + +`/gsd:complete-milestone` + +`/clear` first → fresh context window + +--- +``` + + When subagent returns with checkpoint: