Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions get-shit-done/bin/lib/init.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,38 @@ function cmdInitProgress(cwd, raw) {
}
} catch {}

// Check ROADMAP.md for phases that may not be scaffolded to disk yet.
// Without this, progress routing sees completed_count === phase_count and
// routes to "Milestone Complete" even when unscaffolded phases remain.
let roadmapPhaseCount = phases.length;
const roadmapPath = path.join(cwd, '.planning', 'ROADMAP.md');
try {
const roadmapContent = fs.readFileSync(roadmapPath, 'utf-8');
const roadmapPhases = [];
const phasePattern = /#{2,4}\s*Phase\s+(\d+(?:\.\d+)*)\s*:\s*([^\n]+)/gi;
let pm;
while ((pm = phasePattern.exec(roadmapContent)) !== null) {
roadmapPhases.push({ number: pm[1], name: pm[2].trim() });
}
if (roadmapPhases.length > 0) {
roadmapPhaseCount = roadmapPhases.length;
// If all disk phases are complete and no next phase found on disk,
// find the first roadmap phase without a directory
if (!nextPhase && phases.every(p => p.status === 'complete') && phases.length > 0) {
const diskNumbers = new Set(phases.map(p => p.number));
const unscaffolded = roadmapPhases.find(rp => !diskNumbers.has(rp.number));
if (unscaffolded) {
nextPhase = {
number: unscaffolded.number,
name: unscaffolded.name.toLowerCase().replace(/\s+/g, '-'),
status: 'not_scaffolded',
roadmap_only: true,
};
}
}
}
} catch {}

// Check for paused work
let pausedAt = null;
try {
Expand All @@ -671,6 +703,7 @@ function cmdInitProgress(cwd, raw) {
// Phase overview
phases,
phase_count: phases.length,
roadmap_phase_count: roadmapPhaseCount,
completed_count: phases.filter(p => p.status === 'complete').length,
in_progress_count: phases.filter(p => p.status === 'in_progress').length,

Expand Down
24 changes: 16 additions & 8 deletions get-shit-done/workflows/execute-phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,23 @@ grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
| `gaps_found` | Present gap summary, offer `/gsd:plan-phase {phase} --gaps` |

**If human_needed:**
```
## ✓ Phase {X}: {Name} — Human Verification Required

All automated checks passed. {N} items need human testing:

{From VERIFICATION.md human_verification section}

"approved" → continue | Report issues → gap closure
```
Display the human verification items from VERIFICATION.md, then offer clear next-step routing:

Use AskUserQuestion:
- header: "Verification"
- question: "All automated checks passed for Phase {X}: {Name}. {N} items need human testing. How would you like to proceed?"
- options:
- label: "Start /gsd:verify-work {X}"
description: "Run the interactive UAT workflow to test each item (/clear recommended for fresh context)"
- label: "Mark all approved"
description: "Skip manual testing — mark verification as passed and continue to roadmap update"
- label: "Review verification report"
description: "Show the full VERIFICATION.md before deciding"

**If "Start /gsd:verify-work"** → Display: `/clear` then `/gsd:verify-work {X}` for fresh context, or run inline if context allows.
**If "Mark all approved"** → Proceed to update_roadmap.
**If "Review verification report"** → Display `cat {phase_dir}/{phase_num}-VERIFICATION.md`, then re-present the question.

**If gaps_found:**
```
Expand Down
27 changes: 15 additions & 12 deletions get-shit-done/workflows/plan-phase.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,19 +507,22 @@ Verification: {Passed | Passed with override | Skipped}

───────────────────────────────────────────────────────────────

## ▶ Next Up
Then offer the user a choice for next steps:

**Execute Phase {X}** — run all {N} plans

/gsd:execute-phase {X}

<sub>/clear first → fresh context window</sub>

───────────────────────────────────────────────────────────────

**Also available:**
- cat .planning/phases/{phase-dir}/*-PLAN.md — review plans
- /gsd:plan-phase {X} --research — re-research first
Use AskUserQuestion:
- header: "Next Step"
- question: "Phase {X} planning is complete with {N} plan(s). Ready to execute?"
- options:
- label: "Execute Phase {X} (Recommended)"
description: "Run all {N} plans now — /clear first for fresh context is suggested"
- label: "Review plans first"
description: "Display plan file paths so you can inspect before executing"
- label: "Clear context first"
description: "Suggest /clear then /gsd:execute-phase {X} for a fresh context window"

**If "Execute Phase {X}"** → Display: `/clear` then `/gsd:execute-phase {X}` for best results, or invoke directly if context allows.
**If "Review plans first"** → Display: `cat .planning/phases/{phase-dir}/*-PLAN.md`, then re-present the question.
**If "Clear context first"** → Display: `/clear` then `/gsd:execute-phase {X}`.

───────────────────────────────────────────────────────────────
</offer_next>
Expand Down