fix(workflow): consistent phase transition routing through discuss-phase (#530)

Three routing fixes:
- transition.md checks for CONTEXT.md before routing — discuss-phase when
  missing, plan-phase when present (matches progress.md behavior)
- execute-phase.md offer_next delegates to transition.md instead of emitting
  duplicate "Next Up" blocks
- discuss-phase.md adds explicit handling for "Other" free-text responses

Closes #530

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-15 10:00:40 -06:00
parent c8827fede1
commit 91e4ef77f4
3 changed files with 67 additions and 24 deletions

View File

@@ -252,6 +252,7 @@ Ask 4 questions per area before offering to continue or move on. Each answer oft
If "More questions" → ask 4 more, then check again If "More questions" → ask 4 more, then check again
If "Next area" → proceed to next selected area If "Next area" → proceed to next selected area
If "Other" (free text) → interpret intent: continuation phrases ("chat more", "keep going", "yes", "more") map to "More questions"; advancement phrases ("done", "move on", "next", "skip") map to "Next area". If ambiguous, ask: "Continue with more questions about [area], or move to the next area?"
4. **After all areas complete:** 4. **After all areas complete:**
- header: "Done" - header: "Done"

View File

@@ -336,37 +336,33 @@ Gap closure cycle: `/gsd:plan-phase {X} --gaps` reads VERIFICATION.md → create
</step> </step>
<step name="update_roadmap"> <step name="update_roadmap">
```bash **Mark phase complete and update all tracking files:**
node ~/.claude/get-shit-done/bin/gsd-tools.js roadmap update-plan-progress "${PHASE_NUMBER}"
```
Counts PLAN vs SUMMARY files on disk. Updates progress table row with correct count and status.
```bash ```bash
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/phases/{phase_dir}/*-VERIFICATION.md .planning/REQUIREMENTS.md COMPLETION=$(node ~/.claude/get-shit-done/bin/gsd-tools.js phase complete "${PHASE_NUMBER}")
```
The CLI handles:
- Marking phase checkbox `[x]` with completion date
- Updating Progress table (Status → Complete, date)
- Updating plan count to final
- Advancing STATE.md to next phase
- Updating REQUIREMENTS.md traceability
Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
```bash
node ~/.claude/get-shit-done/bin/gsd-tools.js commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md .planning/phases/{phase_dir}/*-VERIFICATION.md
``` ```
</step> </step>
<step name="offer_next"> <step name="offer_next">
**If more phases:** **Routing is handled by `transition.md`** — do NOT emit a separate "Next Up" block here.
```
## Next Up
**Phase {X+1}: {Name}** — {Goal} After `verify_phase_goal` passes (or human approves), the workflow ends. The user runs `/gsd:progress` or the transition workflow handles next-step routing.
`/gsd:plan-phase {X+1}` **Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd:plan-phase {X} --gaps`). No additional routing needed.
<sub>`/clear` first for fresh context</sub>
```
**If milestone complete:**
```
MILESTONE COMPLETE!
All {N} phases executed.
`/gsd:complete-milestone`
```
</step> </step>
</process> </process>

View File

@@ -358,10 +358,18 @@ This returns all phases with goals, disk status, and completion info.
Read ROADMAP.md to get the next phase's name and goal. Read ROADMAP.md to get the next phase's name and goal.
**Check if next phase has CONTEXT.md:**
```bash
ls .planning/phases/*[X+1]*/*-CONTEXT.md 2>/dev/null
```
**If next phase exists:** **If next phase exists:**
<if mode="yolo"> <if mode="yolo">
**If CONTEXT.md exists:**
``` ```
Phase [X] marked complete. Phase [X] marked complete.
@@ -372,10 +380,24 @@ Next: Phase [X+1] — [Name]
Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]") Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]")
**If CONTEXT.md does NOT exist:**
```
Phase [X] marked complete.
Next: Phase [X+1] — [Name]
⚡ Auto-continuing: Discuss Phase [X+1] first
```
Exit skill and invoke SlashCommand("/gsd:discuss-phase [X+1]")
</if> </if>
<if mode="interactive" OR="custom with gates.confirm_transition true"> <if mode="interactive" OR="custom with gates.confirm_transition true">
**If CONTEXT.md does NOT exist:**
``` ```
## ✓ Phase [X] Complete ## ✓ Phase [X] Complete
@@ -385,6 +407,31 @@ Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]")
**Phase [X+1]: [Name]** — [Goal from ROADMAP.md] **Phase [X+1]: [Name]** — [Goal from ROADMAP.md]
`/gsd:discuss-phase [X+1]` — gather context and clarify approach
<sub>`/clear` first → fresh context window</sub>
---
**Also available:**
- `/gsd:plan-phase [X+1]` — skip discussion, plan directly
- `/gsd:research-phase [X+1]` — investigate unknowns
---
```
**If CONTEXT.md exists:**
```
## ✓ Phase [X] Complete
---
## ▶ Next Up
**Phase [X+1]: [Name]** — [Goal from ROADMAP.md]
<sub>✓ Context gathered, ready to plan</sub>
`/gsd:plan-phase [X+1]` `/gsd:plan-phase [X+1]`
<sub>`/clear` first → fresh context window</sub> <sub>`/clear` first → fresh context window</sub>
@@ -392,9 +439,8 @@ Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]")
--- ---
**Also available:** **Also available:**
- `/gsd:discuss-phase [X+1]` — gather context first - `/gsd:discuss-phase [X+1]` — revisit context
- `/gsd:research-phase [X+1]` — investigate unknowns - `/gsd:research-phase [X+1]` — investigate unknowns
- Review roadmap
--- ---
``` ```