feat: delegate deterministic workflow operations to gsd-tools CLI
Add 10 new CLI commands that replace manual AI orchestration of mechanical, deterministic operations — saving tokens and reducing errors on the most complex GSD workflows. New commands: - phase add <desc> — append phase to roadmap + create directory - phase insert <after> <desc> — insert decimal phase - phase remove <N> [--force] — remove phase with full renumbering - phase complete <N> — mark done, update state + roadmap, detect milestone end - roadmap analyze — unified roadmap parser with disk status - milestone complete <ver> [--name] — archive roadmap/requirements/audit - validate consistency — check phase numbering and disk/roadmap sync - progress [json|table|bar] — render progress in various formats - todo complete <file> — move todo from pending to completed - scaffold [context|uat|verification|phase-dir] — template generation Updated workflows to use new CLI commands: - remove-phase.md: 13 manual steps → 1 CLI call + confirm + commit - add-phase.md: 6 manual steps → 1 CLI call + state update - insert-phase.md: 7 manual steps → 1 CLI call + state update - transition.md: roadmap/state updates delegated to phase complete - progress.md: roadmap parsing delegated to roadmap analyze - complete-milestone.md: archival delegated to milestone complete 75 tests passing (33 new). https://claude.ai/code/session_01UhMGMrNGGn2bfeAi7MBphs
This commit is contained in:
@@ -50,42 +50,68 @@ All file contents are already loaded via `--include` in init_context step:
|
||||
No additional file reads needed.
|
||||
</step>
|
||||
|
||||
<step name="analyze_roadmap">
|
||||
**Get comprehensive roadmap analysis (replaces manual parsing):**
|
||||
|
||||
```bash
|
||||
ROADMAP=$(node ~/.claude/get-shit-done/bin/gsd-tools.js roadmap analyze)
|
||||
```
|
||||
|
||||
This returns structured JSON with:
|
||||
- All phases with disk status (complete/partial/planned/empty/no_directory)
|
||||
- Goal and dependencies per phase
|
||||
- Plan and summary counts per phase
|
||||
- Aggregated stats: total plans, summaries, progress percent
|
||||
- Current and next phase identification
|
||||
|
||||
Use this instead of manually reading/parsing ROADMAP.md.
|
||||
</step>
|
||||
|
||||
<step name="recent">
|
||||
**Gather recent work context:**
|
||||
|
||||
- Find the 2-3 most recent SUMMARY.md files
|
||||
- Extract from each: what was accomplished, key decisions, any issues logged
|
||||
- Use `summary-extract` for efficient parsing:
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js summary-extract <path> --fields one_liner
|
||||
```
|
||||
- This shows "what we've been working on"
|
||||
</step>
|
||||
|
||||
<step name="position">
|
||||
**Parse current position from init context:**
|
||||
**Parse current position from init context and roadmap analysis:**
|
||||
|
||||
- Use `current_phase` and `next_phase` from init for position
|
||||
- Use `phases` array for plan counts per phase
|
||||
- Note `paused_at` if work was paused
|
||||
- Check for CONTEXT.md: For phases without PLAN.md files, check if `{phase}-CONTEXT.md` exists in phase directory
|
||||
- Use `current_phase` and `next_phase` from roadmap analyze
|
||||
- Use phase-level `has_context` and `has_research` flags from analyze
|
||||
- Note `paused_at` if work was paused (from init context)
|
||||
- Count pending todos: use `init todos` or `list-todos`
|
||||
- Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
|
||||
</step>
|
||||
|
||||
<step name="report">
|
||||
**Present rich status report:**
|
||||
**Generate progress bar from gsd-tools, then present rich status report:**
|
||||
|
||||
```bash
|
||||
# Get formatted progress bar
|
||||
PROGRESS_BAR=$(node ~/.claude/get-shit-done/bin/gsd-tools.js progress bar --raw)
|
||||
```
|
||||
|
||||
Present:
|
||||
|
||||
```
|
||||
# [Project Name]
|
||||
|
||||
**Progress:** [████████░░] 8/10 plans complete
|
||||
**Progress:** {PROGRESS_BAR}
|
||||
**Profile:** [quality/balanced/budget]
|
||||
|
||||
## Recent Work
|
||||
- [Phase X, Plan Y]: [what was accomplished - 1 line]
|
||||
- [Phase X, Plan Z]: [what was accomplished - 1 line]
|
||||
- [Phase X, Plan Y]: [what was accomplished - 1 line from summary-extract]
|
||||
- [Phase X, Plan Z]: [what was accomplished - 1 line from summary-extract]
|
||||
|
||||
## Current Position
|
||||
Phase [N] of [total]: [phase-name]
|
||||
Plan [M] of [phase-total]: [status]
|
||||
CONTEXT: [✓ if CONTEXT.md exists | - if not]
|
||||
CONTEXT: [✓ if has_context | - if not]
|
||||
|
||||
## Key Decisions Made
|
||||
- [decision 1 from STATE.md]
|
||||
@@ -102,7 +128,7 @@ CONTEXT: [✓ if CONTEXT.md exists | - if not]
|
||||
(Only show this section if count > 0)
|
||||
|
||||
## What's Next
|
||||
[Next phase/plan objective from ROADMAP]
|
||||
[Next phase/plan objective from roadmap analyze]
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
Reference in New Issue
Block a user