feat(gsd-tools): add compound init commands and update workflows (#468)
* feat(gsd-tools): add compound init commands for workflow setup Adds 8 compound commands that return all context a workflow needs in one JSON blob, replacing 5-10 atomic calls per workflow: - init execute-phase: models, config, phase info, plan inventory - init plan-phase: models, workflow flags, existing artifacts - init new-project: models, brownfield detection, state checks - init new-milestone: models, milestone info - init quick: models, next task number, timestamps - init resume: file existence, interrupted agent - init verify-work: models, phase info - init phase-op: generic phase context Updated 8 workflows to use compound commands: - execute-phase, plan-phase, new-project, quick - resume-project, verify-work, discuss-phase Token savings: ~200 lines of bash setup replaced with single init calls. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(gsd-tools): add 4 new init commands and update files to use compound commands Add new compound init commands: - init todos - context for todo workflows - init milestone-op - context for milestone operations - init map-codebase - context for codebase mapping - init progress - context for progress workflow Update 24 files to use compound init commands instead of atomic calls: - 4 phase operation workflows (add-phase, insert-phase, remove-phase, verify-phase) - 5 todo/milestone workflows (add-todo, check-todos, audit-milestone, complete-milestone, new-milestone) - 6 misc workflows (execute-plan, map-codebase, pause-work, progress, set-profile, settings) - 6 agent files (gsd-executor, gsd-planner, gsd-phase-researcher, gsd-plan-checker, gsd-debugger, gsd-research-synthesizer) - 2 command files (debug, research-phase) - 1 reference file (planning-config) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(gsd-tools): add init to help output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(verify-phase): correct expected init fields The workflow was referencing plans/summaries from init phase-op, but those fields come from ls command. Updated to reference has_plans and plan_count which are actually in phase-op output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,16 +8,16 @@ Read all files referenced by the invoking prompt's execution_context before star
|
||||
|
||||
<process>
|
||||
|
||||
<step name="verify">
|
||||
**Verify planning structure exists:**
|
||||
|
||||
Use Bash (not Glob) to check—Glob respects .gitignore but .planning/ is often gitignored:
|
||||
<step name="init_context">
|
||||
**Load progress context:**
|
||||
|
||||
```bash
|
||||
node ~/.claude/get-shit-done/bin/gsd-tools.js verify-path-exists .planning --raw
|
||||
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.js init progress)
|
||||
```
|
||||
|
||||
If no `.planning/` directory:
|
||||
Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`.
|
||||
|
||||
If `project_exists` is false (no `.planning/` directory):
|
||||
|
||||
```
|
||||
No planning structure found.
|
||||
@@ -54,13 +54,13 @@ If missing both ROADMAP.md and PROJECT.md: suggest `/gsd:new-project`.
|
||||
</step>
|
||||
|
||||
<step name="position">
|
||||
**Parse current position:**
|
||||
**Parse current position from init context:**
|
||||
|
||||
- From STATE.md: current phase, plan number, status
|
||||
- Calculate: total plans, completed plans, remaining plans
|
||||
- Note any blockers or concerns
|
||||
- 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
|
||||
- Count pending todos: `node ~/.claude/get-shit-done/bin/gsd-tools.js list-todos --raw`
|
||||
- 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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user