refactor: update commands, workflows, agents for gsd-tools integration
Commands (15): audit-milestone, complete-milestone, debug, execute-phase, help, insert-phase, new-milestone, new-project, plan-milestone-gaps, plan-phase, progress, quick, remove-phase, research-phase, verify-work Workflows (22): execute-plan (69% reduction), verify-phase (55%), others Agents (14): All updated for new workflow structure Total token savings: ~22k chars (75.6% in affected sections) Ported from: get-shit-done-v2@d1fb2d5, 7f79a9b
This commit is contained in:
@@ -10,7 +10,6 @@ allowed-tools:
|
||||
- Task
|
||||
- Write
|
||||
---
|
||||
|
||||
<objective>
|
||||
Verify milestone achieved its definition of done. Check requirements coverage, cross-phase integration, and end-to-end flows.
|
||||
|
||||
@@ -18,7 +17,7 @@ Verify milestone achieved its definition of done. Check requirements coverage, c
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
<!-- Spawns gsd-integration-checker agent which has all audit expertise baked in -->
|
||||
@~/.claude/get-shit-done/workflows/audit-milestone.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@@ -38,240 +37,6 @@ Glob: .planning/phases/*/*-VERIFICATION.md
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
## 0. Resolve Model Profile
|
||||
|
||||
Read model profile for agent spawning:
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-integration-checker | sonnet | sonnet | haiku |
|
||||
|
||||
Store resolved model for use in Task call below.
|
||||
|
||||
## 1. Determine Milestone Scope
|
||||
|
||||
```bash
|
||||
# Get phases in milestone
|
||||
ls -d .planning/phases/*/ | sort -V
|
||||
```
|
||||
|
||||
- Parse version from arguments or detect current from ROADMAP.md
|
||||
- Identify all phase directories in scope
|
||||
- Extract milestone definition of done from ROADMAP.md
|
||||
- Extract requirements mapped to this milestone from REQUIREMENTS.md
|
||||
|
||||
## 2. Read All Phase Verifications
|
||||
|
||||
For each phase directory, read the VERIFICATION.md:
|
||||
|
||||
```bash
|
||||
cat .planning/phases/01-*/*-VERIFICATION.md
|
||||
cat .planning/phases/02-*/*-VERIFICATION.md
|
||||
# etc.
|
||||
```
|
||||
|
||||
From each VERIFICATION.md, extract:
|
||||
- **Status:** passed | gaps_found
|
||||
- **Critical gaps:** (if any — these are blockers)
|
||||
- **Non-critical gaps:** tech debt, deferred items, warnings
|
||||
- **Anti-patterns found:** TODOs, stubs, placeholders
|
||||
- **Requirements coverage:** which requirements satisfied/blocked
|
||||
|
||||
If a phase is missing VERIFICATION.md, flag it as "unverified phase" — this is a blocker.
|
||||
|
||||
## 3. Spawn Integration Checker
|
||||
|
||||
With phase context collected:
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="Check cross-phase integration and E2E flows.
|
||||
|
||||
Phases: {phase_dirs}
|
||||
Phase exports: {from SUMMARYs}
|
||||
API routes: {routes created}
|
||||
|
||||
Verify cross-phase wiring and E2E user flows.",
|
||||
subagent_type="gsd-integration-checker",
|
||||
model="{integration_checker_model}"
|
||||
)
|
||||
```
|
||||
|
||||
## 4. Collect Results
|
||||
|
||||
Combine:
|
||||
- Phase-level gaps and tech debt (from step 2)
|
||||
- Integration checker's report (wiring gaps, broken flows)
|
||||
|
||||
## 5. Check Requirements Coverage
|
||||
|
||||
For each requirement in REQUIREMENTS.md mapped to this milestone:
|
||||
- Find owning phase
|
||||
- Check phase verification status
|
||||
- Determine: satisfied | partial | unsatisfied
|
||||
|
||||
## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
Create `.planning/v{version}-v{version}-MILESTONE-AUDIT.md` with:
|
||||
|
||||
```yaml
|
||||
---
|
||||
milestone: {version}
|
||||
audited: {timestamp}
|
||||
status: passed | gaps_found | tech_debt
|
||||
scores:
|
||||
requirements: N/M
|
||||
phases: N/M
|
||||
integration: N/M
|
||||
flows: N/M
|
||||
gaps: # Critical blockers
|
||||
requirements: [...]
|
||||
integration: [...]
|
||||
flows: [...]
|
||||
tech_debt: # Non-critical, deferred
|
||||
- phase: 01-auth
|
||||
items:
|
||||
- "TODO: add rate limiting"
|
||||
- "Warning: no password strength validation"
|
||||
- phase: 03-dashboard
|
||||
items:
|
||||
- "Deferred: mobile responsive layout"
|
||||
---
|
||||
```
|
||||
|
||||
Plus full markdown report with tables for requirements, phases, integration, tech debt.
|
||||
|
||||
**Status values:**
|
||||
- `passed` — all requirements met, no critical gaps, minimal tech debt
|
||||
- `gaps_found` — critical blockers exist
|
||||
- `tech_debt` — no blockers but accumulated deferred items need review
|
||||
|
||||
## 7. Present Results
|
||||
|
||||
Route by status (see `<offer_next>`).
|
||||
|
||||
Execute the audit-milestone workflow from @~/.claude/get-shit-done/workflows/audit-milestone.md end-to-end.
|
||||
Preserve all workflow gates (scope determination, verification reading, integration check, requirements coverage, routing).
|
||||
</process>
|
||||
|
||||
<offer_next>
|
||||
Output this markdown directly (not as a code block). Route based on status:
|
||||
|
||||
---
|
||||
|
||||
**If passed:**
|
||||
|
||||
## ✓ Milestone {version} — Audit Passed
|
||||
|
||||
**Score:** {N}/{M} requirements satisfied
|
||||
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
All requirements covered. Cross-phase integration verified. E2E flows complete.
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Complete milestone** — archive and tag
|
||||
|
||||
/gsd:complete-milestone {version}
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**If gaps_found:**
|
||||
|
||||
## ⚠ Milestone {version} — Gaps Found
|
||||
|
||||
**Score:** {N}/{M} requirements satisfied
|
||||
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
### Unsatisfied Requirements
|
||||
|
||||
{For each unsatisfied requirement:}
|
||||
- **{REQ-ID}: {description}** (Phase {X})
|
||||
- {reason}
|
||||
|
||||
### Cross-Phase Issues
|
||||
|
||||
{For each integration gap:}
|
||||
- **{from} → {to}:** {issue}
|
||||
|
||||
### Broken Flows
|
||||
|
||||
{For each flow gap:}
|
||||
- **{flow name}:** breaks at {step}
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Plan gap closure** — create phases to complete milestone
|
||||
|
||||
/gsd:plan-milestone-gaps
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- cat .planning/v{version}-MILESTONE-AUDIT.md — see full report
|
||||
- /gsd:complete-milestone {version} — proceed anyway (accept tech debt)
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**If tech_debt (no blockers but accumulated debt):**
|
||||
|
||||
## ⚡ Milestone {version} — Tech Debt Review
|
||||
|
||||
**Score:** {N}/{M} requirements satisfied
|
||||
**Report:** .planning/v{version}-MILESTONE-AUDIT.md
|
||||
|
||||
All requirements met. No critical blockers. Accumulated tech debt needs review.
|
||||
|
||||
### Tech Debt by Phase
|
||||
|
||||
{For each phase with debt:}
|
||||
**Phase {X}: {name}**
|
||||
- {item 1}
|
||||
- {item 2}
|
||||
|
||||
### Total: {N} items across {M} phases
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Options
|
||||
|
||||
**A. Complete milestone** — accept debt, track in backlog
|
||||
|
||||
/gsd:complete-milestone {version}
|
||||
|
||||
**B. Plan cleanup phase** — address debt before completing
|
||||
|
||||
/gsd:plan-milestone-gaps
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
</offer_next>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] Milestone scope identified
|
||||
- [ ] All phase VERIFICATION.md files read
|
||||
- [ ] Tech debt and deferred gaps aggregated
|
||||
- [ ] Integration checker spawned for cross-phase wiring
|
||||
- [ ] v{version}-MILESTONE-AUDIT.md created
|
||||
- [ ] Results presented with actionable next steps
|
||||
</success_criteria>
|
||||
|
||||
@@ -30,22 +30,10 @@ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
|
||||
|
||||
## 0. Resolve Model Profile
|
||||
|
||||
Read model profile for agent spawning:
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
DEBUGGER_MODEL=$(node ~/.claude/get-shit-done/bin/gsd-tools.js resolve-model gsd-debugger --raw)
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-debugger | opus | sonnet | sonnet |
|
||||
|
||||
Store resolved model for use in Task calls below.
|
||||
|
||||
## 1. Check Active Sessions
|
||||
|
||||
If active sessions exist AND no $ARGUMENTS:
|
||||
|
||||
@@ -13,7 +13,6 @@ allowed-tools:
|
||||
- TodoWrite
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Execute all plans in a phase using wave-based parallel execution.
|
||||
|
||||
@@ -23,8 +22,8 @@ Context budget: ~15% orchestrator, 100% fresh per subagent.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
@~/.claude/get-shit-done/workflows/execute-phase.md
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@@ -38,306 +37,6 @@ Phase: $ARGUMENTS
|
||||
</context>
|
||||
|
||||
<process>
|
||||
0. **Resolve Model Profile**
|
||||
|
||||
Read model profile for agent spawning:
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-executor | opus | sonnet | sonnet |
|
||||
| gsd-verifier | sonnet | sonnet | haiku |
|
||||
|
||||
Store resolved models for use in Task calls below.
|
||||
|
||||
1. **Validate phase exists**
|
||||
- Find phase directory matching argument
|
||||
- Count PLAN.md files
|
||||
- Error if no plans found
|
||||
|
||||
2. **Discover plans**
|
||||
- List all *-PLAN.md files in phase directory
|
||||
- Check which have *-SUMMARY.md (already complete)
|
||||
- If `--gaps-only`: filter to only plans with `gap_closure: true`
|
||||
- Build list of incomplete plans
|
||||
|
||||
3. **Group by wave**
|
||||
- Read `wave` from each plan's frontmatter
|
||||
- Group plans by wave number
|
||||
- Report wave structure to user
|
||||
|
||||
4. **Execute waves**
|
||||
For each wave in order:
|
||||
- Spawn `gsd-executor` for each plan in wave (parallel Task calls)
|
||||
- Wait for completion (Task blocks)
|
||||
- Verify SUMMARYs created and spot-check claims
|
||||
- Proceed to next wave
|
||||
|
||||
5. **Aggregate results**
|
||||
- Collect summaries from all plans
|
||||
- Report phase completion status
|
||||
|
||||
6. **Commit any orchestrator corrections**
|
||||
Check for uncommitted changes before verification:
|
||||
```bash
|
||||
git status --porcelain
|
||||
```
|
||||
|
||||
**If changes exist:** Orchestrator made corrections between executor completions. Stage and commit them individually:
|
||||
```bash
|
||||
# Stage each modified file individually (never use git add -u, git add ., or git add -A)
|
||||
git status --porcelain | grep '^ M' | cut -c4- | while read file; do
|
||||
git add "$file"
|
||||
done
|
||||
git commit -m "fix({phase}): orchestrator corrections"
|
||||
```
|
||||
|
||||
**If clean:** Continue to verification.
|
||||
|
||||
7. **Verify phase goal**
|
||||
Check config: `WORKFLOW_VERIFIER=$(cat .planning/config.json 2>/dev/null | grep -o '"verifier"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
|
||||
|
||||
**If `workflow.verifier` is `false`:** Skip to step 8 (treat as passed).
|
||||
|
||||
**Otherwise:**
|
||||
- Spawn `gsd-verifier` subagent with phase directory and goal
|
||||
- Verifier checks must_haves against actual codebase (not SUMMARY claims)
|
||||
- Creates VERIFICATION.md with detailed report
|
||||
- Route by status:
|
||||
- `passed` → continue to step 8
|
||||
- `human_needed` → present items, get approval or feedback
|
||||
- `gaps_found` → present gaps, offer `/gsd:plan-phase {X} --gaps`
|
||||
|
||||
8. **Update roadmap and state**
|
||||
- Update ROADMAP.md, STATE.md
|
||||
|
||||
9. **Update requirements**
|
||||
Mark phase requirements as Complete:
|
||||
- Read ROADMAP.md, find this phase's `Requirements:` line (e.g., "AUTH-01, AUTH-02")
|
||||
- Read REQUIREMENTS.md traceability table
|
||||
- For each REQ-ID in this phase: change Status from "Pending" to "Complete"
|
||||
- Write updated REQUIREMENTS.md
|
||||
- Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
|
||||
|
||||
10. **Commit phase completion**
|
||||
Check `COMMIT_PLANNING_DOCS` from config.json (default: true).
|
||||
If false: Skip git operations for .planning/ files.
|
||||
If true: Bundle all phase metadata updates in one commit:
|
||||
- Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
|
||||
- Stage REQUIREMENTS.md if updated: `git add .planning/REQUIREMENTS.md`
|
||||
- Commit: `docs({phase}): complete {phase-name} phase`
|
||||
|
||||
11. **Offer next steps**
|
||||
- Route to next action (see `<offer_next>`)
|
||||
Execute the execute-phase workflow from @~/.claude/get-shit-done/workflows/execute-phase.md end-to-end.
|
||||
Preserve all workflow gates (wave execution, checkpoint handling, verification, state updates, routing).
|
||||
</process>
|
||||
|
||||
<offer_next>
|
||||
Output this markdown directly (not as a code block). Route based on status:
|
||||
|
||||
| Status | Route |
|
||||
|--------|-------|
|
||||
| `gaps_found` | Route C (gap closure) |
|
||||
| `human_needed` | Present checklist, then re-route based on approval |
|
||||
| `passed` + more phases | Route A (next phase) |
|
||||
| `passed` + last phase | Route B (milestone complete) |
|
||||
|
||||
---
|
||||
|
||||
**Route A: Phase verified, more phases remain**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {Z} COMPLETE ✓
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {Z}: {Name}**
|
||||
|
||||
{Y} plans executed
|
||||
Goal verified ✓
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
|
||||
|
||||
/gsd:discuss-phase {Z+1} — gather context and clarify approach
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- /gsd:plan-phase {Z+1} — skip discussion, plan directly
|
||||
- /gsd:verify-work {Z} — manual acceptance testing before continuing
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**Route B: Phase verified, milestone complete**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► MILESTONE COMPLETE 🎉
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**v1.0**
|
||||
|
||||
{N} phases completed
|
||||
All phase goals verified ✓
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Audit milestone** — verify requirements, cross-phase integration, E2E flows
|
||||
|
||||
/gsd:audit-milestone
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- /gsd:verify-work — manual acceptance testing
|
||||
- /gsd:complete-milestone — skip audit, archive directly
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**Route C: Gaps found — need additional planning**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {Z} GAPS FOUND ⚠
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {Z}: {Name}**
|
||||
|
||||
Score: {N}/{M} must-haves verified
|
||||
Report: .planning/phases/{phase_dir}/{phase}-VERIFICATION.md
|
||||
|
||||
### What's Missing
|
||||
|
||||
{Extract gap summaries from VERIFICATION.md}
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Plan gap closure** — create additional plans to complete the phase
|
||||
|
||||
/gsd:plan-phase {Z} --gaps
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- cat .planning/phases/{phase_dir}/{phase}-VERIFICATION.md — see full report
|
||||
- /gsd:verify-work {Z} — manual testing before planning
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
After user runs /gsd:plan-phase {Z} --gaps:
|
||||
1. Planner reads VERIFICATION.md gaps
|
||||
2. Creates plans 04, 05, etc. to close gaps
|
||||
3. User runs /gsd:execute-phase {Z} again
|
||||
4. Execute-phase runs incomplete plans (04, 05...)
|
||||
5. Verifier runs again → loop until passed
|
||||
</offer_next>
|
||||
|
||||
<wave_execution>
|
||||
**Parallel spawning:**
|
||||
|
||||
Before spawning, read file contents. The `@` syntax does not work across Task() boundaries.
|
||||
|
||||
```bash
|
||||
# Read each plan and STATE.md
|
||||
PLAN_01_CONTENT=$(cat "{plan_01_path}")
|
||||
PLAN_02_CONTENT=$(cat "{plan_02_path}")
|
||||
PLAN_03_CONTENT=$(cat "{plan_03_path}")
|
||||
STATE_CONTENT=$(cat .planning/STATE.md)
|
||||
```
|
||||
|
||||
Spawn all plans in a wave with a single message containing multiple Task calls, with inlined content:
|
||||
|
||||
```
|
||||
Task(prompt="Execute plan at {plan_01_path}\n\nPlan:\n{plan_01_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
|
||||
Task(prompt="Execute plan at {plan_02_path}\n\nPlan:\n{plan_02_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
|
||||
Task(prompt="Execute plan at {plan_03_path}\n\nPlan:\n{plan_03_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
|
||||
```
|
||||
|
||||
All three run in parallel. Task tool blocks until all complete.
|
||||
|
||||
**No polling.** No background agents. No TaskOutput loops.
|
||||
</wave_execution>
|
||||
|
||||
<checkpoint_handling>
|
||||
Plans with `autonomous: false` have checkpoints. The execute-phase.md workflow handles the full checkpoint flow:
|
||||
- Subagent pauses at checkpoint, returns structured state
|
||||
- Orchestrator presents to user, collects response
|
||||
- Spawns fresh continuation agent (not resume)
|
||||
|
||||
See `@~/.claude/get-shit-done/workflows/execute-phase.md` step `checkpoint_handling` for complete details.
|
||||
</checkpoint_handling>
|
||||
|
||||
<deviation_rules>
|
||||
During execution, handle discoveries automatically:
|
||||
|
||||
1. **Auto-fix bugs** - Fix immediately, document in Summary
|
||||
2. **Auto-add critical** - Security/correctness gaps, add and document
|
||||
3. **Auto-fix blockers** - Can't proceed without fix, do it and document
|
||||
4. **Ask about architectural** - Major structural changes, stop and ask user
|
||||
|
||||
Only rule 4 requires user intervention.
|
||||
</deviation_rules>
|
||||
|
||||
<commit_rules>
|
||||
**Per-Task Commits:**
|
||||
|
||||
After each task completes:
|
||||
1. Stage only files modified by that task
|
||||
2. Commit with format: `{type}({phase}-{plan}): {task-name}`
|
||||
3. Types: feat, fix, test, refactor, perf, chore
|
||||
4. Record commit hash for SUMMARY.md
|
||||
|
||||
**Plan Metadata Commit:**
|
||||
|
||||
After all tasks in a plan complete:
|
||||
1. Stage plan artifacts only: PLAN.md, SUMMARY.md
|
||||
2. Commit with format: `docs({phase}-{plan}): complete [plan-name] plan`
|
||||
3. NO code files (already committed per-task)
|
||||
|
||||
**Phase Completion Commit:**
|
||||
|
||||
After all plans in phase complete (step 7):
|
||||
1. Stage: ROADMAP.md, STATE.md, REQUIREMENTS.md (if updated), VERIFICATION.md
|
||||
2. Commit with format: `docs({phase}): complete {phase-name} phase`
|
||||
3. Bundles all phase-level state updates in one commit
|
||||
|
||||
**NEVER use:**
|
||||
- `git add .`
|
||||
- `git add -A`
|
||||
- `git add src/` or any broad directory
|
||||
|
||||
**Always stage files individually.**
|
||||
</commit_rules>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] All incomplete plans in phase executed
|
||||
- [ ] Each plan has SUMMARY.md
|
||||
- [ ] Phase goal verified (must_haves checked against codebase)
|
||||
- [ ] VERIFICATION.md created in phase directory
|
||||
- [ ] STATE.md reflects phase completion
|
||||
- [ ] ROADMAP.md updated
|
||||
- [ ] REQUIREMENTS.md updated (phase requirements marked Complete)
|
||||
- [ ] User informed of next steps
|
||||
</success_criteria>
|
||||
|
||||
@@ -2,481 +2,21 @@
|
||||
name: gsd:help
|
||||
description: Show available GSD commands and usage guide
|
||||
---
|
||||
|
||||
<objective>
|
||||
Display the complete GSD command reference.
|
||||
|
||||
Output ONLY the reference content below. Do NOT add:
|
||||
|
||||
- Project-specific analysis
|
||||
- Git status or file context
|
||||
- Next-step suggestions
|
||||
- Any commentary beyond the reference
|
||||
</objective>
|
||||
</objective>
|
||||
|
||||
<reference>
|
||||
# GSD Command Reference
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/help.md
|
||||
</execution_context>
|
||||
|
||||
**GSD** (Get Shit Done) creates hierarchical project plans optimized for solo agentic development with Claude Code.
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. `/gsd:new-project` - Initialize project (includes research, requirements, roadmap)
|
||||
2. `/gsd:plan-phase 1` - Create detailed plan for first phase
|
||||
3. `/gsd:execute-phase 1` - Execute the phase
|
||||
|
||||
## Staying Updated
|
||||
|
||||
GSD evolves fast. Update periodically:
|
||||
|
||||
```bash
|
||||
npx get-shit-done-cc@latest
|
||||
```
|
||||
|
||||
## Core Workflow
|
||||
|
||||
```
|
||||
/gsd:new-project → /gsd:plan-phase → /gsd:execute-phase → repeat
|
||||
```
|
||||
|
||||
### Project Initialization
|
||||
|
||||
**`/gsd:new-project`**
|
||||
Initialize new project through unified flow.
|
||||
|
||||
One command takes you from idea to ready-for-planning:
|
||||
- Deep questioning to understand what you're building
|
||||
- Optional domain research (spawns 4 parallel researcher agents)
|
||||
- Requirements definition with v1/v2/out-of-scope scoping
|
||||
- Roadmap creation with phase breakdown and success criteria
|
||||
|
||||
Creates all `.planning/` artifacts:
|
||||
- `PROJECT.md` — vision and requirements
|
||||
- `config.json` — workflow mode (interactive/yolo)
|
||||
- `research/` — domain research (if selected)
|
||||
- `REQUIREMENTS.md` — scoped requirements with REQ-IDs
|
||||
- `ROADMAP.md` — phases mapped to requirements
|
||||
- `STATE.md` — project memory
|
||||
|
||||
Usage: `/gsd:new-project`
|
||||
|
||||
**`/gsd:map-codebase`**
|
||||
Map an existing codebase for brownfield projects.
|
||||
|
||||
- Analyzes codebase with parallel Explore agents
|
||||
- Creates `.planning/codebase/` with 7 focused documents
|
||||
- Covers stack, architecture, structure, conventions, testing, integrations, concerns
|
||||
- Use before `/gsd:new-project` on existing codebases
|
||||
|
||||
Usage: `/gsd:map-codebase`
|
||||
|
||||
### Phase Planning
|
||||
|
||||
**`/gsd:discuss-phase <number>`**
|
||||
Help articulate your vision for a phase before planning.
|
||||
|
||||
- Captures how you imagine this phase working
|
||||
- Creates CONTEXT.md with your vision, essentials, and boundaries
|
||||
- Use when you have ideas about how something should look/feel
|
||||
|
||||
Usage: `/gsd:discuss-phase 2`
|
||||
|
||||
**`/gsd:research-phase <number>`**
|
||||
Comprehensive ecosystem research for niche/complex domains.
|
||||
|
||||
- Discovers standard stack, architecture patterns, pitfalls
|
||||
- Creates RESEARCH.md with "how experts build this" knowledge
|
||||
- Use for 3D, games, audio, shaders, ML, and other specialized domains
|
||||
- Goes beyond "which library" to ecosystem knowledge
|
||||
|
||||
Usage: `/gsd:research-phase 3`
|
||||
|
||||
**`/gsd:list-phase-assumptions <number>`**
|
||||
See what Claude is planning to do before it starts.
|
||||
|
||||
- Shows Claude's intended approach for a phase
|
||||
- Lets you course-correct if Claude misunderstood your vision
|
||||
- No files created - conversational output only
|
||||
|
||||
Usage: `/gsd:list-phase-assumptions 3`
|
||||
|
||||
**`/gsd:plan-phase <number>`**
|
||||
Create detailed execution plan for a specific phase.
|
||||
|
||||
- Generates `.planning/phases/XX-phase-name/XX-YY-PLAN.md`
|
||||
- Breaks phase into concrete, actionable tasks
|
||||
- Includes verification criteria and success measures
|
||||
- Multiple plans per phase supported (XX-01, XX-02, etc.)
|
||||
|
||||
Usage: `/gsd:plan-phase 1`
|
||||
Result: Creates `.planning/phases/01-foundation/01-01-PLAN.md`
|
||||
|
||||
### Execution
|
||||
|
||||
**`/gsd:execute-phase <phase-number>`**
|
||||
Execute all plans in a phase.
|
||||
|
||||
- Groups plans by wave (from frontmatter), executes waves sequentially
|
||||
- Plans within each wave run in parallel via Task tool
|
||||
- Verifies phase goal after all plans complete
|
||||
- Updates REQUIREMENTS.md, ROADMAP.md, STATE.md
|
||||
|
||||
Usage: `/gsd:execute-phase 5`
|
||||
|
||||
### Quick Mode
|
||||
|
||||
**`/gsd:quick`**
|
||||
Execute small, ad-hoc tasks with GSD guarantees but skip optional agents.
|
||||
|
||||
Quick mode uses the same system with a shorter path:
|
||||
- Spawns planner + executor (skips researcher, checker, verifier)
|
||||
- Quick tasks live in `.planning/quick/` separate from planned phases
|
||||
- Updates STATE.md tracking (not ROADMAP.md)
|
||||
|
||||
Use when you know exactly what to do and the task is small enough to not need research or verification.
|
||||
|
||||
Usage: `/gsd:quick`
|
||||
Result: Creates `.planning/quick/NNN-slug/PLAN.md`, `.planning/quick/NNN-slug/SUMMARY.md`
|
||||
|
||||
### Roadmap Management
|
||||
|
||||
**`/gsd:add-phase <description>`**
|
||||
Add new phase to end of current milestone.
|
||||
|
||||
- Appends to ROADMAP.md
|
||||
- Uses next sequential number
|
||||
- Updates phase directory structure
|
||||
|
||||
Usage: `/gsd:add-phase "Add admin dashboard"`
|
||||
|
||||
**`/gsd:insert-phase <after> <description>`**
|
||||
Insert urgent work as decimal phase between existing phases.
|
||||
|
||||
- Creates intermediate phase (e.g., 7.1 between 7 and 8)
|
||||
- Useful for discovered work that must happen mid-milestone
|
||||
- Maintains phase ordering
|
||||
|
||||
Usage: `/gsd:insert-phase 7 "Fix critical auth bug"`
|
||||
Result: Creates Phase 7.1
|
||||
|
||||
**`/gsd:remove-phase <number>`**
|
||||
Remove a future phase and renumber subsequent phases.
|
||||
|
||||
- Deletes phase directory and all references
|
||||
- Renumbers all subsequent phases to close the gap
|
||||
- Only works on future (unstarted) phases
|
||||
- Git commit preserves historical record
|
||||
|
||||
Usage: `/gsd:remove-phase 17`
|
||||
Result: Phase 17 deleted, phases 18-20 become 17-19
|
||||
|
||||
### Milestone Management
|
||||
|
||||
**`/gsd:new-milestone <name>`**
|
||||
Start a new milestone through unified flow.
|
||||
|
||||
- Deep questioning to understand what you're building next
|
||||
- Optional domain research (spawns 4 parallel researcher agents)
|
||||
- Requirements definition with scoping
|
||||
- Roadmap creation with phase breakdown
|
||||
|
||||
Mirrors `/gsd:new-project` flow for brownfield projects (existing PROJECT.md).
|
||||
|
||||
Usage: `/gsd:new-milestone "v2.0 Features"`
|
||||
|
||||
**`/gsd:complete-milestone <version>`**
|
||||
Archive completed milestone and prepare for next version.
|
||||
|
||||
- Creates MILESTONES.md entry with stats
|
||||
- Archives full details to milestones/ directory
|
||||
- Creates git tag for the release
|
||||
- Prepares workspace for next version
|
||||
|
||||
Usage: `/gsd:complete-milestone 1.0.0`
|
||||
|
||||
### Progress Tracking
|
||||
|
||||
**`/gsd:progress`**
|
||||
Check project status and intelligently route to next action.
|
||||
|
||||
- Shows visual progress bar and completion percentage
|
||||
- Summarizes recent work from SUMMARY files
|
||||
- Displays current position and what's next
|
||||
- Lists key decisions and open issues
|
||||
- Offers to execute next plan or create it if missing
|
||||
- Detects 100% milestone completion
|
||||
|
||||
Usage: `/gsd:progress`
|
||||
|
||||
### Session Management
|
||||
|
||||
**`/gsd:resume-work`**
|
||||
Resume work from previous session with full context restoration.
|
||||
|
||||
- Reads STATE.md for project context
|
||||
- Shows current position and recent progress
|
||||
- Offers next actions based on project state
|
||||
|
||||
Usage: `/gsd:resume-work`
|
||||
|
||||
**`/gsd:pause-work`**
|
||||
Create context handoff when pausing work mid-phase.
|
||||
|
||||
- Creates .continue-here file with current state
|
||||
- Updates STATE.md session continuity section
|
||||
- Captures in-progress work context
|
||||
|
||||
Usage: `/gsd:pause-work`
|
||||
|
||||
### Debugging
|
||||
|
||||
**`/gsd:debug [issue description]`**
|
||||
Systematic debugging with persistent state across context resets.
|
||||
|
||||
- Gathers symptoms through adaptive questioning
|
||||
- Creates `.planning/debug/[slug].md` to track investigation
|
||||
- Investigates using scientific method (evidence → hypothesis → test)
|
||||
- Survives `/clear` — run `/gsd:debug` with no args to resume
|
||||
- Archives resolved issues to `.planning/debug/resolved/`
|
||||
|
||||
Usage: `/gsd:debug "login button doesn't work"`
|
||||
Usage: `/gsd:debug` (resume active session)
|
||||
|
||||
### Todo Management
|
||||
|
||||
**`/gsd:add-todo [description]`**
|
||||
Capture idea or task as todo from current conversation.
|
||||
|
||||
- Extracts context from conversation (or uses provided description)
|
||||
- Creates structured todo file in `.planning/todos/pending/`
|
||||
- Infers area from file paths for grouping
|
||||
- Checks for duplicates before creating
|
||||
- Updates STATE.md todo count
|
||||
|
||||
Usage: `/gsd:add-todo` (infers from conversation)
|
||||
Usage: `/gsd:add-todo Add auth token refresh`
|
||||
|
||||
**`/gsd:check-todos [area]`**
|
||||
List pending todos and select one to work on.
|
||||
|
||||
- Lists all pending todos with title, area, age
|
||||
- Optional area filter (e.g., `/gsd:check-todos api`)
|
||||
- Loads full context for selected todo
|
||||
- Routes to appropriate action (work now, add to phase, brainstorm)
|
||||
- Moves todo to done/ when work begins
|
||||
|
||||
Usage: `/gsd:check-todos`
|
||||
Usage: `/gsd:check-todos api`
|
||||
|
||||
### User Acceptance Testing
|
||||
|
||||
**`/gsd:verify-work [phase]`**
|
||||
Validate built features through conversational UAT.
|
||||
|
||||
- Extracts testable deliverables from SUMMARY.md files
|
||||
- Presents tests one at a time (yes/no responses)
|
||||
- Automatically diagnoses failures and creates fix plans
|
||||
- Ready for re-execution if issues found
|
||||
|
||||
Usage: `/gsd:verify-work 3`
|
||||
|
||||
### Milestone Auditing
|
||||
|
||||
**`/gsd:audit-milestone [version]`**
|
||||
Audit milestone completion against original intent.
|
||||
|
||||
- Reads all phase VERIFICATION.md files
|
||||
- Checks requirements coverage
|
||||
- Spawns integration checker for cross-phase wiring
|
||||
- Creates MILESTONE-AUDIT.md with gaps and tech debt
|
||||
|
||||
Usage: `/gsd:audit-milestone`
|
||||
|
||||
**`/gsd:plan-milestone-gaps`**
|
||||
Create phases to close gaps identified by audit.
|
||||
|
||||
- Reads MILESTONE-AUDIT.md and groups gaps into phases
|
||||
- Prioritizes by requirement priority (must/should/nice)
|
||||
- Adds gap closure phases to ROADMAP.md
|
||||
- Ready for `/gsd:plan-phase` on new phases
|
||||
|
||||
Usage: `/gsd:plan-milestone-gaps`
|
||||
|
||||
### Configuration
|
||||
|
||||
**`/gsd:settings`**
|
||||
Configure workflow toggles and model profile interactively.
|
||||
|
||||
- Toggle researcher, plan checker, verifier agents
|
||||
- Select model profile (quality/balanced/budget)
|
||||
- Updates `.planning/config.json`
|
||||
|
||||
Usage: `/gsd:settings`
|
||||
|
||||
**`/gsd:set-profile <profile>`**
|
||||
Quick switch model profile for GSD agents.
|
||||
|
||||
- `quality` — Opus everywhere except verification
|
||||
- `balanced` — Opus for planning, Sonnet for execution (default)
|
||||
- `budget` — Sonnet for writing, Haiku for research/verification
|
||||
|
||||
Usage: `/gsd:set-profile budget`
|
||||
|
||||
### Utility Commands
|
||||
|
||||
**`/gsd:help`**
|
||||
Show this command reference.
|
||||
|
||||
**`/gsd:update`**
|
||||
Update GSD to latest version with changelog preview.
|
||||
|
||||
- Shows installed vs latest version comparison
|
||||
- Displays changelog entries for versions you've missed
|
||||
- Highlights breaking changes
|
||||
- Confirms before running install
|
||||
- Better than raw `npx get-shit-done-cc`
|
||||
|
||||
Usage: `/gsd:update`
|
||||
|
||||
**`/gsd:join-discord`**
|
||||
Join the GSD Discord community.
|
||||
|
||||
- Get help, share what you're building, stay updated
|
||||
- Connect with other GSD users
|
||||
|
||||
Usage: `/gsd:join-discord`
|
||||
|
||||
## Files & Structure
|
||||
|
||||
```
|
||||
.planning/
|
||||
├── PROJECT.md # Project vision
|
||||
├── ROADMAP.md # Current phase breakdown
|
||||
├── STATE.md # Project memory & context
|
||||
├── config.json # Workflow mode & gates
|
||||
├── todos/ # Captured ideas and tasks
|
||||
│ ├── pending/ # Todos waiting to be worked on
|
||||
│ └── done/ # Completed todos
|
||||
├── debug/ # Active debug sessions
|
||||
│ └── resolved/ # Archived resolved issues
|
||||
├── codebase/ # Codebase map (brownfield projects)
|
||||
│ ├── STACK.md # Languages, frameworks, dependencies
|
||||
│ ├── ARCHITECTURE.md # Patterns, layers, data flow
|
||||
│ ├── STRUCTURE.md # Directory layout, key files
|
||||
│ ├── CONVENTIONS.md # Coding standards, naming
|
||||
│ ├── TESTING.md # Test setup, patterns
|
||||
│ ├── INTEGRATIONS.md # External services, APIs
|
||||
│ └── CONCERNS.md # Tech debt, known issues
|
||||
└── phases/
|
||||
├── 01-foundation/
|
||||
│ ├── 01-01-PLAN.md
|
||||
│ └── 01-01-SUMMARY.md
|
||||
└── 02-core-features/
|
||||
├── 02-01-PLAN.md
|
||||
└── 02-01-SUMMARY.md
|
||||
```
|
||||
|
||||
## Workflow Modes
|
||||
|
||||
Set during `/gsd:new-project`:
|
||||
|
||||
**Interactive Mode**
|
||||
|
||||
- Confirms each major decision
|
||||
- Pauses at checkpoints for approval
|
||||
- More guidance throughout
|
||||
|
||||
**YOLO Mode**
|
||||
|
||||
- Auto-approves most decisions
|
||||
- Executes plans without confirmation
|
||||
- Only stops for critical checkpoints
|
||||
|
||||
Change anytime by editing `.planning/config.json`
|
||||
|
||||
## Planning Configuration
|
||||
|
||||
Configure how planning artifacts are managed in `.planning/config.json`:
|
||||
|
||||
**`planning.commit_docs`** (default: `true`)
|
||||
- `true`: Planning artifacts committed to git (standard workflow)
|
||||
- `false`: Planning artifacts kept local-only, not committed
|
||||
|
||||
When `commit_docs: false`:
|
||||
- Add `.planning/` to your `.gitignore`
|
||||
- Useful for OSS contributions, client projects, or keeping planning private
|
||||
- All planning files still work normally, just not tracked in git
|
||||
|
||||
**`planning.search_gitignored`** (default: `false`)
|
||||
- `true`: Add `--no-ignore` to broad ripgrep searches
|
||||
- Only needed when `.planning/` is gitignored and you want project-wide searches to include it
|
||||
|
||||
Example config:
|
||||
```json
|
||||
{
|
||||
"planning": {
|
||||
"commit_docs": false,
|
||||
"search_gitignored": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Common Workflows
|
||||
|
||||
**Starting a new project:**
|
||||
|
||||
```
|
||||
/gsd:new-project # Unified flow: questioning → research → requirements → roadmap
|
||||
/clear
|
||||
/gsd:plan-phase 1 # Create plans for first phase
|
||||
/clear
|
||||
/gsd:execute-phase 1 # Execute all plans in phase
|
||||
```
|
||||
|
||||
**Resuming work after a break:**
|
||||
|
||||
```
|
||||
/gsd:progress # See where you left off and continue
|
||||
```
|
||||
|
||||
**Adding urgent mid-milestone work:**
|
||||
|
||||
```
|
||||
/gsd:insert-phase 5 "Critical security fix"
|
||||
/gsd:plan-phase 5.1
|
||||
/gsd:execute-phase 5.1
|
||||
```
|
||||
|
||||
**Completing a milestone:**
|
||||
|
||||
```
|
||||
/gsd:complete-milestone 1.0.0
|
||||
/clear
|
||||
/gsd:new-milestone # Start next milestone (questioning → research → requirements → roadmap)
|
||||
```
|
||||
|
||||
**Capturing ideas during work:**
|
||||
|
||||
```
|
||||
/gsd:add-todo # Capture from conversation context
|
||||
/gsd:add-todo Fix modal z-index # Capture with explicit description
|
||||
/gsd:check-todos # Review and work on todos
|
||||
/gsd:check-todos api # Filter by area
|
||||
```
|
||||
|
||||
**Debugging an issue:**
|
||||
|
||||
```
|
||||
/gsd:debug "form submission fails silently" # Start debug session
|
||||
# ... investigation happens, context fills up ...
|
||||
/clear
|
||||
/gsd:debug # Resume from where you left off
|
||||
```
|
||||
|
||||
## Getting Help
|
||||
|
||||
- Read `.planning/PROJECT.md` for project vision
|
||||
- Read `.planning/STATE.md` for current context
|
||||
- Check `.planning/ROADMAP.md` for phase status
|
||||
- Run `/gsd:progress` to check where you're up to
|
||||
</reference>
|
||||
<process>
|
||||
Output the complete GSD command reference from @~/.claude/get-shit-done/workflows/help.md.
|
||||
Display the reference content directly — no additions or modifications.
|
||||
</process>
|
||||
|
||||
@@ -17,211 +17,17 @@ Purpose: Handle urgent work discovered during execution without renumbering enti
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
@~/.claude/get-shit-done/workflows/insert-phase.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
Arguments: $ARGUMENTS (format: <after-phase-number> <description>)
|
||||
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="parse_arguments">
|
||||
Parse the command arguments:
|
||||
- First argument: integer phase number to insert after
|
||||
- Remaining arguments: phase description
|
||||
|
||||
Example: `/gsd:insert-phase 72 Fix critical auth bug`
|
||||
→ after = 72
|
||||
→ description = "Fix critical auth bug"
|
||||
|
||||
Validation:
|
||||
|
||||
```bash
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "ERROR: Both phase number and description required"
|
||||
echo "Usage: /gsd:insert-phase <after> <description>"
|
||||
echo "Example: /gsd:insert-phase 72 Fix critical auth bug"
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
Parse first argument as integer:
|
||||
|
||||
```bash
|
||||
after_phase=$1
|
||||
shift
|
||||
description="$*"
|
||||
|
||||
# Validate after_phase is an integer
|
||||
if ! [[ "$after_phase" =~ ^[0-9]+$ ]]; then
|
||||
echo "ERROR: Phase number must be an integer"
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="load_roadmap">
|
||||
Load the roadmap file:
|
||||
|
||||
```bash
|
||||
if [ -f .planning/ROADMAP.md ]; then
|
||||
ROADMAP=".planning/ROADMAP.md"
|
||||
else
|
||||
echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
Read roadmap content for parsing.
|
||||
</step>
|
||||
|
||||
<step name="verify_target_phase">
|
||||
Verify that the target phase exists in the roadmap:
|
||||
|
||||
1. Search for "### Phase {after_phase}:" heading
|
||||
2. If not found:
|
||||
|
||||
```
|
||||
ERROR: Phase {after_phase} not found in roadmap
|
||||
Available phases: [list phase numbers]
|
||||
```
|
||||
|
||||
Exit.
|
||||
|
||||
3. Verify phase is in current milestone (not completed/archived)
|
||||
</step>
|
||||
|
||||
<step name="find_existing_decimals">
|
||||
Find existing decimal phases after the target phase:
|
||||
|
||||
1. Search for all "### Phase {after_phase}.N:" headings
|
||||
2. Extract decimal suffixes (e.g., for Phase 72: find 72.1, 72.2, 72.3)
|
||||
3. Find the highest decimal suffix
|
||||
4. Calculate next decimal: max + 1
|
||||
|
||||
Examples:
|
||||
|
||||
- Phase 72 with no decimals → next is 72.1
|
||||
- Phase 72 with 72.1 → next is 72.2
|
||||
- Phase 72 with 72.1, 72.2 → next is 72.3
|
||||
|
||||
Store as: `decimal_phase="$(printf "%02d" $after_phase).${next_decimal}"`
|
||||
</step>
|
||||
|
||||
<step name="generate_slug">
|
||||
Convert the phase description to a kebab-case slug:
|
||||
|
||||
```bash
|
||||
slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
||||
```
|
||||
|
||||
Phase directory name: `{decimal-phase}-{slug}`
|
||||
Example: `06.1-fix-critical-auth-bug` (phase 6 insertion)
|
||||
</step>
|
||||
|
||||
<step name="create_phase_directory">
|
||||
Create the phase directory structure:
|
||||
|
||||
```bash
|
||||
phase_dir=".planning/phases/${decimal_phase}-${slug}"
|
||||
mkdir -p "$phase_dir"
|
||||
```
|
||||
|
||||
Confirm: "Created directory: $phase_dir"
|
||||
</step>
|
||||
|
||||
<step name="update_roadmap">
|
||||
Insert the new phase entry into the roadmap:
|
||||
|
||||
1. Find insertion point: immediately after Phase {after_phase}'s content (before next phase heading or "---")
|
||||
2. Insert new phase heading with (INSERTED) marker:
|
||||
|
||||
```
|
||||
### Phase {decimal_phase}: {Description} (INSERTED)
|
||||
|
||||
**Goal:** [Urgent work - to be planned]
|
||||
**Depends on:** Phase {after_phase}
|
||||
**Plans:** 0 plans
|
||||
|
||||
Plans:
|
||||
- [ ] TBD (run /gsd:plan-phase {decimal_phase} to break down)
|
||||
|
||||
**Details:**
|
||||
[To be added during planning]
|
||||
```
|
||||
|
||||
3. Write updated roadmap back to file
|
||||
|
||||
The "(INSERTED)" marker helps identify decimal phases as urgent insertions.
|
||||
|
||||
Preserve all other content exactly (formatting, spacing, other phases).
|
||||
</step>
|
||||
|
||||
<step name="update_project_state">
|
||||
Update STATE.md to reflect the inserted phase:
|
||||
|
||||
1. Read `.planning/STATE.md`
|
||||
2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
|
||||
```
|
||||
- Phase {decimal_phase} inserted after Phase {after_phase}: {description} (URGENT)
|
||||
```
|
||||
|
||||
If "Roadmap Evolution" section doesn't exist, create it.
|
||||
|
||||
Add note about insertion reason if appropriate.
|
||||
</step>
|
||||
|
||||
<step name="completion">
|
||||
Present completion summary:
|
||||
|
||||
```
|
||||
Phase {decimal_phase} inserted after Phase {after_phase}:
|
||||
- Description: {description}
|
||||
- Directory: .planning/phases/{decimal-phase}-{slug}/
|
||||
- Status: Not planned yet
|
||||
- Marker: (INSERTED) - indicates urgent work
|
||||
|
||||
Roadmap updated: {roadmap-path}
|
||||
Project state updated: .planning/STATE.md
|
||||
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase {decimal_phase}: {description}** — urgent insertion
|
||||
|
||||
`/gsd:plan-phase {decimal_phase}`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- Review insertion impact: Check if Phase {next_integer} dependencies still make sense
|
||||
- Review roadmap
|
||||
|
||||
---
|
||||
```
|
||||
</step>
|
||||
|
||||
Execute the insert-phase workflow from @~/.claude/get-shit-done/workflows/insert-phase.md end-to-end.
|
||||
Preserve all validation gates (argument parsing, phase verification, decimal calculation, roadmap updates).
|
||||
</process>
|
||||
|
||||
<anti_patterns>
|
||||
|
||||
- Don't use this for planned work at end of milestone (use /gsd:add-phase)
|
||||
- Don't insert before Phase 1 (decimal 0.1 makes no sense)
|
||||
- Don't renumber existing phases
|
||||
- Don't modify the target phase content
|
||||
- Don't create plans yet (that's /gsd:plan-phase)
|
||||
- Don't commit changes (user decides when to commit)
|
||||
</anti_patterns>
|
||||
|
||||
<success_criteria>
|
||||
Phase insertion is complete when:
|
||||
|
||||
- [ ] Phase directory created: `.planning/phases/{N.M}-{slug}/`
|
||||
- [ ] Roadmap updated with new phase entry (includes "(INSERTED)" marker)
|
||||
- [ ] Phase inserted in correct position (after target phase, before next integer phase)
|
||||
- [ ] STATE.md updated with roadmap evolution note
|
||||
- [ ] Decimal number calculated correctly (based on existing decimals)
|
||||
- [ ] User informed of next steps and dependency implications
|
||||
</success_criteria>
|
||||
|
||||
@@ -9,23 +9,23 @@ allowed-tools:
|
||||
- Task
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Start a new milestone through unified flow: questioning → research (optional) → requirements → roadmap.
|
||||
Start a new milestone: questioning → research (optional) → requirements → roadmap.
|
||||
|
||||
This is the brownfield equivalent of new-project. The project exists, PROJECT.md has history. This command gathers "what's next", updates PROJECT.md, then continues through the full requirements → roadmap cycle.
|
||||
Brownfield equivalent of new-project. Project exists, PROJECT.md has history. Gathers "what's next", updates PROJECT.md, then runs requirements → roadmap cycle.
|
||||
|
||||
**Creates/Updates:**
|
||||
- `.planning/PROJECT.md` — updated with new milestone goals
|
||||
- `.planning/research/` — domain research (optional, focuses on NEW features)
|
||||
- `.planning/research/` — domain research (optional, NEW features only)
|
||||
- `.planning/REQUIREMENTS.md` — scoped requirements for this milestone
|
||||
- `.planning/ROADMAP.md` — phase structure (continues numbering)
|
||||
- `.planning/STATE.md` — reset for new milestone
|
||||
|
||||
**After this command:** Run `/gsd:plan-phase [N]` to start execution.
|
||||
**After:** `/gsd:plan-phase [N]` to start execution.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/new-milestone.md
|
||||
@~/.claude/get-shit-done/references/questioning.md
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
@~/.claude/get-shit-done/templates/project.md
|
||||
@@ -46,676 +46,6 @@ Milestone name: $ARGUMENTS (optional - will prompt if not provided)
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
## Phase 1: Load Context
|
||||
|
||||
- Read PROJECT.md (existing project, Validated requirements, decisions)
|
||||
- Read MILESTONES.md (what shipped previously)
|
||||
- Read STATE.md (pending todos, blockers)
|
||||
- Check for MILESTONE-CONTEXT.md (from /gsd:discuss-milestone)
|
||||
|
||||
## Phase 2: Gather Milestone Goals
|
||||
|
||||
**If MILESTONE-CONTEXT.md exists:**
|
||||
- Use features and scope from discuss-milestone
|
||||
- Present summary for confirmation
|
||||
|
||||
**If no context file:**
|
||||
- Present what shipped in last milestone
|
||||
- Ask: "What do you want to build next?"
|
||||
- Use AskUserQuestion to explore features
|
||||
- Probe for priorities, constraints, scope
|
||||
|
||||
## Phase 3: Determine Milestone Version
|
||||
|
||||
- Parse last version from MILESTONES.md
|
||||
- Suggest next version (v1.0 → v1.1, or v2.0 for major)
|
||||
- Confirm with user
|
||||
|
||||
## Phase 4: Update PROJECT.md
|
||||
|
||||
Add/update these sections:
|
||||
|
||||
```markdown
|
||||
## Current Milestone: v[X.Y] [Name]
|
||||
|
||||
**Goal:** [One sentence describing milestone focus]
|
||||
|
||||
**Target features:**
|
||||
- [Feature 1]
|
||||
- [Feature 2]
|
||||
- [Feature 3]
|
||||
```
|
||||
|
||||
Update Active requirements section with new goals.
|
||||
|
||||
Update "Last updated" footer.
|
||||
|
||||
## Phase 5: Update STATE.md
|
||||
|
||||
```markdown
|
||||
## Current Position
|
||||
|
||||
Phase: Not started (defining requirements)
|
||||
Plan: —
|
||||
Status: Defining requirements
|
||||
Last activity: [today] — Milestone v[X.Y] started
|
||||
```
|
||||
|
||||
Keep Accumulated Context section (decisions, blockers) from previous milestone.
|
||||
|
||||
## Phase 6: Cleanup and Commit
|
||||
|
||||
Delete MILESTONE-CONTEXT.md if exists (consumed).
|
||||
|
||||
Check planning config:
|
||||
```bash
|
||||
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
||||
```
|
||||
|
||||
If `COMMIT_PLANNING_DOCS=false`: Skip git operations
|
||||
|
||||
If `COMMIT_PLANNING_DOCS=true` (default):
|
||||
```bash
|
||||
git add .planning/PROJECT.md .planning/STATE.md
|
||||
git commit -m "docs: start milestone v[X.Y] [Name]"
|
||||
```
|
||||
|
||||
## Phase 6.5: Resolve Model Profile
|
||||
|
||||
Read model profile for agent spawning:
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-project-researcher | opus | sonnet | haiku |
|
||||
| gsd-research-synthesizer | sonnet | sonnet | haiku |
|
||||
| gsd-roadmapper | opus | sonnet | sonnet |
|
||||
|
||||
Store resolved models for use in Task calls below.
|
||||
|
||||
## Phase 7: Research Decision
|
||||
|
||||
Use AskUserQuestion:
|
||||
- header: "Research"
|
||||
- question: "Research the domain ecosystem for new features before defining requirements?"
|
||||
- options:
|
||||
- "Research first (Recommended)" — Discover patterns, expected features, architecture for NEW capabilities
|
||||
- "Skip research" — I know what I need, go straight to requirements
|
||||
|
||||
**If "Research first":**
|
||||
|
||||
Display stage banner:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► RESEARCHING
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Researching [new features] ecosystem...
|
||||
```
|
||||
|
||||
Create research directory:
|
||||
```bash
|
||||
mkdir -p .planning/research
|
||||
```
|
||||
|
||||
Display spawning indicator:
|
||||
```
|
||||
◆ Spawning 4 researchers in parallel...
|
||||
→ Stack research (for new features)
|
||||
→ Features research
|
||||
→ Architecture research (integration)
|
||||
→ Pitfalls research
|
||||
```
|
||||
|
||||
Spawn 4 parallel gsd-project-researcher agents with milestone-aware context:
|
||||
|
||||
```
|
||||
Task(prompt="
|
||||
<research_type>
|
||||
Project Research — Stack dimension for [new features].
|
||||
</research_type>
|
||||
|
||||
<milestone_context>
|
||||
SUBSEQUENT MILESTONE — Adding [target features] to existing app.
|
||||
|
||||
Existing validated capabilities (DO NOT re-research):
|
||||
[List from PROJECT.md Validated requirements]
|
||||
|
||||
Focus ONLY on what's needed for the NEW features.
|
||||
</milestone_context>
|
||||
|
||||
<question>
|
||||
What stack additions/changes are needed for [new features]?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary - current state, new milestone goals]
|
||||
</project_context>
|
||||
|
||||
<downstream_consumer>
|
||||
Your STACK.md feeds into roadmap creation. Be prescriptive:
|
||||
- Specific libraries with versions for NEW capabilities
|
||||
- Integration points with existing stack
|
||||
- What NOT to add and why
|
||||
</downstream_consumer>
|
||||
|
||||
<quality_gate>
|
||||
- [ ] Versions are current (verify with Context7/official docs, not training data)
|
||||
- [ ] Rationale explains WHY, not just WHAT
|
||||
- [ ] Integration with existing stack considered
|
||||
</quality_gate>
|
||||
|
||||
<output>
|
||||
Write to: .planning/research/STACK.md
|
||||
Use template: ~/.claude/get-shit-done/templates/research-project/STACK.md
|
||||
</output>
|
||||
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
|
||||
|
||||
Task(prompt="
|
||||
<research_type>
|
||||
Project Research — Features dimension for [new features].
|
||||
</research_type>
|
||||
|
||||
<milestone_context>
|
||||
SUBSEQUENT MILESTONE — Adding [target features] to existing app.
|
||||
|
||||
Existing features (already built):
|
||||
[List from PROJECT.md Validated requirements]
|
||||
|
||||
Focus on how [new features] typically work, expected behavior.
|
||||
</milestone_context>
|
||||
|
||||
<question>
|
||||
How do [target features] typically work? What's expected behavior?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary - new milestone goals]
|
||||
</project_context>
|
||||
|
||||
<downstream_consumer>
|
||||
Your FEATURES.md feeds into requirements definition. Categorize clearly:
|
||||
- Table stakes (must have for these features)
|
||||
- Differentiators (competitive advantage)
|
||||
- Anti-features (things to deliberately NOT build)
|
||||
</downstream_consumer>
|
||||
|
||||
<quality_gate>
|
||||
- [ ] Categories are clear (table stakes vs differentiators vs anti-features)
|
||||
- [ ] Complexity noted for each feature
|
||||
- [ ] Dependencies on existing features identified
|
||||
</quality_gate>
|
||||
|
||||
<output>
|
||||
Write to: .planning/research/FEATURES.md
|
||||
Use template: ~/.claude/get-shit-done/templates/research-project/FEATURES.md
|
||||
</output>
|
||||
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
|
||||
|
||||
Task(prompt="
|
||||
<research_type>
|
||||
Project Research — Architecture dimension for [new features].
|
||||
</research_type>
|
||||
|
||||
<milestone_context>
|
||||
SUBSEQUENT MILESTONE — Adding [target features] to existing app.
|
||||
|
||||
Existing architecture:
|
||||
[Summary from PROJECT.md or codebase map]
|
||||
|
||||
Focus on how [new features] integrate with existing architecture.
|
||||
</milestone_context>
|
||||
|
||||
<question>
|
||||
How do [target features] integrate with existing [domain] architecture?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary - current architecture, new features]
|
||||
</project_context>
|
||||
|
||||
<downstream_consumer>
|
||||
Your ARCHITECTURE.md informs phase structure in roadmap. Include:
|
||||
- Integration points with existing components
|
||||
- New components needed
|
||||
- Data flow changes
|
||||
- Suggested build order
|
||||
</downstream_consumer>
|
||||
|
||||
<quality_gate>
|
||||
- [ ] Integration points clearly identified
|
||||
- [ ] New vs modified components explicit
|
||||
- [ ] Build order considers existing dependencies
|
||||
</quality_gate>
|
||||
|
||||
<output>
|
||||
Write to: .planning/research/ARCHITECTURE.md
|
||||
Use template: ~/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md
|
||||
</output>
|
||||
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
|
||||
|
||||
Task(prompt="
|
||||
<research_type>
|
||||
Project Research — Pitfalls dimension for [new features].
|
||||
</research_type>
|
||||
|
||||
<milestone_context>
|
||||
SUBSEQUENT MILESTONE — Adding [target features] to existing app.
|
||||
|
||||
Focus on common mistakes when ADDING these features to an existing system.
|
||||
</milestone_context>
|
||||
|
||||
<question>
|
||||
What are common mistakes when adding [target features] to [domain]?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary - current state, new features]
|
||||
</project_context>
|
||||
|
||||
<downstream_consumer>
|
||||
Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
|
||||
- Warning signs (how to detect early)
|
||||
- Prevention strategy (how to avoid)
|
||||
- Which phase should address it
|
||||
</downstream_consumer>
|
||||
|
||||
<quality_gate>
|
||||
- [ ] Pitfalls are specific to adding these features (not generic)
|
||||
- [ ] Integration pitfalls with existing system covered
|
||||
- [ ] Prevention strategies are actionable
|
||||
</quality_gate>
|
||||
|
||||
<output>
|
||||
Write to: .planning/research/PITFALLS.md
|
||||
Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md
|
||||
</output>
|
||||
", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
|
||||
```
|
||||
|
||||
After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
|
||||
|
||||
```
|
||||
Task(prompt="
|
||||
<task>
|
||||
Synthesize research outputs into SUMMARY.md.
|
||||
</task>
|
||||
|
||||
<research_files>
|
||||
Read these files:
|
||||
- .planning/research/STACK.md
|
||||
- .planning/research/FEATURES.md
|
||||
- .planning/research/ARCHITECTURE.md
|
||||
- .planning/research/PITFALLS.md
|
||||
</research_files>
|
||||
|
||||
<output>
|
||||
Write to: .planning/research/SUMMARY.md
|
||||
Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
|
||||
Commit after writing.
|
||||
</output>
|
||||
", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
|
||||
```
|
||||
|
||||
Display research complete banner and key findings:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► RESEARCH COMPLETE ✓
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
## Key Findings
|
||||
|
||||
**Stack additions:** [from SUMMARY.md]
|
||||
**New feature table stakes:** [from SUMMARY.md]
|
||||
**Watch Out For:** [from SUMMARY.md]
|
||||
|
||||
Files: `.planning/research/`
|
||||
```
|
||||
|
||||
**If "Skip research":** Continue to Phase 8.
|
||||
|
||||
## Phase 8: Define Requirements
|
||||
|
||||
Display stage banner:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► DEFINING REQUIREMENTS
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
```
|
||||
|
||||
**Load context:**
|
||||
|
||||
Read PROJECT.md and extract:
|
||||
- Core value (the ONE thing that must work)
|
||||
- Current milestone goals
|
||||
- Validated requirements (what already exists)
|
||||
|
||||
**If research exists:** Read research/FEATURES.md and extract feature categories.
|
||||
|
||||
**Present features by category:**
|
||||
|
||||
```
|
||||
Here are the features for [new capabilities]:
|
||||
|
||||
## [Category 1]
|
||||
**Table stakes:**
|
||||
- Feature A
|
||||
- Feature B
|
||||
|
||||
**Differentiators:**
|
||||
- Feature C
|
||||
- Feature D
|
||||
|
||||
**Research notes:** [any relevant notes]
|
||||
|
||||
---
|
||||
|
||||
## [Next Category]
|
||||
...
|
||||
```
|
||||
|
||||
**If no research:** Gather requirements through conversation instead.
|
||||
|
||||
Ask: "What are the main things users need to be able to do with [new features]?"
|
||||
|
||||
For each capability mentioned:
|
||||
- Ask clarifying questions to make it specific
|
||||
- Probe for related capabilities
|
||||
- Group into categories
|
||||
|
||||
**Scope each category:**
|
||||
|
||||
For each category, use AskUserQuestion:
|
||||
|
||||
- header: "[Category name]"
|
||||
- question: "Which [category] features are in this milestone?"
|
||||
- multiSelect: true
|
||||
- options:
|
||||
- "[Feature 1]" — [brief description]
|
||||
- "[Feature 2]" — [brief description]
|
||||
- "[Feature 3]" — [brief description]
|
||||
- "None for this milestone" — Defer entire category
|
||||
|
||||
Track responses:
|
||||
- Selected features → this milestone's requirements
|
||||
- Unselected table stakes → future milestone
|
||||
- Unselected differentiators → out of scope
|
||||
|
||||
**Identify gaps:**
|
||||
|
||||
Use AskUserQuestion:
|
||||
- header: "Additions"
|
||||
- question: "Any requirements research missed? (Features specific to your vision)"
|
||||
- options:
|
||||
- "No, research covered it" — Proceed
|
||||
- "Yes, let me add some" — Capture additions
|
||||
|
||||
**Generate REQUIREMENTS.md:**
|
||||
|
||||
Create `.planning/REQUIREMENTS.md` with:
|
||||
- v1 Requirements for THIS milestone grouped by category (checkboxes, REQ-IDs)
|
||||
- Future Requirements (deferred to later milestones)
|
||||
- Out of Scope (explicit exclusions with reasoning)
|
||||
- Traceability section (empty, filled by roadmap)
|
||||
|
||||
**REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, NOTIF-02)
|
||||
|
||||
Continue numbering from existing requirements if applicable.
|
||||
|
||||
**Requirement quality criteria:**
|
||||
|
||||
Good requirements are:
|
||||
- **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
|
||||
- **User-centric:** "User can X" (not "System does Y")
|
||||
- **Atomic:** One capability per requirement (not "User can login and manage profile")
|
||||
- **Independent:** Minimal dependencies on other requirements
|
||||
|
||||
**Present full requirements list:**
|
||||
|
||||
Show every requirement (not counts) for user confirmation:
|
||||
|
||||
```
|
||||
## Milestone v[X.Y] Requirements
|
||||
|
||||
### [Category 1]
|
||||
- [ ] **CAT1-01**: User can do X
|
||||
- [ ] **CAT1-02**: User can do Y
|
||||
|
||||
### [Category 2]
|
||||
- [ ] **CAT2-01**: User can do Z
|
||||
|
||||
[... full list ...]
|
||||
|
||||
---
|
||||
|
||||
Does this capture what you're building? (yes / adjust)
|
||||
```
|
||||
|
||||
If "adjust": Return to scoping.
|
||||
|
||||
**Commit requirements:**
|
||||
|
||||
Check planning config (same pattern as Phase 6).
|
||||
|
||||
If committing:
|
||||
```bash
|
||||
git add .planning/REQUIREMENTS.md
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: define milestone v[X.Y] requirements
|
||||
|
||||
[X] requirements across [N] categories
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
## Phase 9: Create Roadmap
|
||||
|
||||
Display stage banner:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► CREATING ROADMAP
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
◆ Spawning roadmapper...
|
||||
```
|
||||
|
||||
**Determine starting phase number:**
|
||||
|
||||
Read MILESTONES.md to find the last phase number from previous milestone.
|
||||
New phases continue from there (e.g., if v1.0 ended at phase 5, v1.1 starts at phase 6).
|
||||
|
||||
Spawn gsd-roadmapper agent with context:
|
||||
|
||||
```
|
||||
Task(prompt="
|
||||
<planning_context>
|
||||
|
||||
**Project:**
|
||||
@.planning/PROJECT.md
|
||||
|
||||
**Requirements:**
|
||||
@.planning/REQUIREMENTS.md
|
||||
|
||||
**Research (if exists):**
|
||||
@.planning/research/SUMMARY.md
|
||||
|
||||
**Config:**
|
||||
@.planning/config.json
|
||||
|
||||
**Previous milestone (for phase numbering):**
|
||||
@.planning/MILESTONES.md
|
||||
|
||||
</planning_context>
|
||||
|
||||
<instructions>
|
||||
Create roadmap for milestone v[X.Y]:
|
||||
1. Start phase numbering from [N] (continues from previous milestone)
|
||||
2. Derive phases from THIS MILESTONE's requirements (don't include validated/existing)
|
||||
3. Map every requirement to exactly one phase
|
||||
4. Derive 2-5 success criteria per phase (observable user behaviors)
|
||||
5. Validate 100% coverage of new requirements
|
||||
6. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
|
||||
7. Return ROADMAP CREATED with summary
|
||||
|
||||
Write files first, then return. This ensures artifacts persist even if context is lost.
|
||||
</instructions>
|
||||
", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
|
||||
```
|
||||
|
||||
**Handle roadmapper return:**
|
||||
|
||||
**If `## ROADMAP BLOCKED`:**
|
||||
- Present blocker information
|
||||
- Work with user to resolve
|
||||
- Re-spawn when resolved
|
||||
|
||||
**If `## ROADMAP CREATED`:**
|
||||
|
||||
Read the created ROADMAP.md and present it nicely inline:
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## Proposed Roadmap
|
||||
|
||||
**[N] phases** | **[X] requirements mapped** | All milestone requirements covered ✓
|
||||
|
||||
| # | Phase | Goal | Requirements | Success Criteria |
|
||||
|---|-------|------|--------------|------------------|
|
||||
| [N] | [Name] | [Goal] | [REQ-IDs] | [count] |
|
||||
| [N+1] | [Name] | [Goal] | [REQ-IDs] | [count] |
|
||||
...
|
||||
|
||||
### Phase Details
|
||||
|
||||
**Phase [N]: [Name]**
|
||||
Goal: [goal]
|
||||
Requirements: [REQ-IDs]
|
||||
Success criteria:
|
||||
1. [criterion]
|
||||
2. [criterion]
|
||||
|
||||
[... continue for all phases ...]
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
**CRITICAL: Ask for approval before committing:**
|
||||
|
||||
Use AskUserQuestion:
|
||||
- header: "Roadmap"
|
||||
- question: "Does this roadmap structure work for you?"
|
||||
- options:
|
||||
- "Approve" — Commit and continue
|
||||
- "Adjust phases" — Tell me what to change
|
||||
- "Review full file" — Show raw ROADMAP.md
|
||||
|
||||
**If "Approve":** Continue to commit.
|
||||
|
||||
**If "Adjust phases":**
|
||||
- Get user's adjustment notes
|
||||
- Re-spawn roadmapper with revision context:
|
||||
```
|
||||
Task(prompt="
|
||||
<revision>
|
||||
User feedback on roadmap:
|
||||
[user's notes]
|
||||
|
||||
Current ROADMAP.md: @.planning/ROADMAP.md
|
||||
|
||||
Update the roadmap based on feedback. Edit files in place.
|
||||
Return ROADMAP REVISED with changes made.
|
||||
</revision>
|
||||
", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
|
||||
```
|
||||
- Present revised roadmap
|
||||
- Loop until user approves
|
||||
|
||||
**If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
|
||||
|
||||
**Commit roadmap (after approval):**
|
||||
|
||||
Check planning config (same pattern as Phase 6).
|
||||
|
||||
If committing:
|
||||
```bash
|
||||
git add .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: create milestone v[X.Y] roadmap ([N] phases)
|
||||
|
||||
Phases:
|
||||
[N]. [phase-name]: [requirements covered]
|
||||
[N+1]. [phase-name]: [requirements covered]
|
||||
...
|
||||
|
||||
All milestone requirements mapped to phases.
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
## Phase 10: Done
|
||||
|
||||
Present completion with next steps:
|
||||
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► MILESTONE INITIALIZED ✓
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Milestone v[X.Y]: [Name]**
|
||||
|
||||
| Artifact | Location |
|
||||
|----------------|-----------------------------|
|
||||
| Project | `.planning/PROJECT.md` |
|
||||
| Research | `.planning/research/` |
|
||||
| Requirements | `.planning/REQUIREMENTS.md` |
|
||||
| Roadmap | `.planning/ROADMAP.md` |
|
||||
|
||||
**[N] phases** | **[X] requirements** | Ready to build ✓
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase [N]: [Phase Name]** — [Goal from ROADMAP.md]
|
||||
|
||||
`/gsd:discuss-phase [N]` — gather context and clarify approach
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:plan-phase [N]` — skip discussion, plan directly
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
```
|
||||
|
||||
Execute the new-milestone workflow from @~/.claude/get-shit-done/workflows/new-milestone.md end-to-end.
|
||||
Preserve all workflow gates (validation, questioning, research, requirements, roadmap approval, commits).
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] PROJECT.md updated with Current Milestone section
|
||||
- [ ] STATE.md reset for new milestone
|
||||
- [ ] MILESTONE-CONTEXT.md consumed and deleted (if existed)
|
||||
- [ ] Research completed (if selected) — 4 parallel agents spawned, milestone-aware
|
||||
- [ ] Requirements gathered (from research or conversation)
|
||||
- [ ] User scoped each category
|
||||
- [ ] REQUIREMENTS.md created with REQ-IDs
|
||||
- [ ] gsd-roadmapper spawned with phase numbering context
|
||||
- [ ] Roadmap files written immediately (not draft)
|
||||
- [ ] User feedback incorporated (if any)
|
||||
- [ ] ROADMAP.md created with phases continuing from previous milestone
|
||||
- [ ] All commits made (if planning docs committed)
|
||||
- [ ] User knows next step is `/gsd:discuss-phase [N]`
|
||||
|
||||
**Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
|
||||
</success_criteria>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,6 @@ allowed-tools:
|
||||
- Grep
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Create all phases necessary to close gaps identified by `/gsd:audit-milestone`.
|
||||
|
||||
@@ -19,7 +18,7 @@ One command creates all fix phases — no manual `/gsd:add-phase` per gap.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
<!-- Spawns gsd-planner agent which has all planning expertise baked in -->
|
||||
@~/.claude/get-shit-done/workflows/plan-milestone-gaps.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@@ -36,260 +35,6 @@ Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
## 1. Load Audit Results
|
||||
|
||||
```bash
|
||||
# Find the most recent audit file
|
||||
ls -t .planning/v*-MILESTONE-AUDIT.md 2>/dev/null | head -1
|
||||
```
|
||||
|
||||
Parse YAML frontmatter to extract structured gaps:
|
||||
- `gaps.requirements` — unsatisfied requirements
|
||||
- `gaps.integration` — missing cross-phase connections
|
||||
- `gaps.flows` — broken E2E flows
|
||||
|
||||
If no audit file exists or has no gaps, error:
|
||||
```
|
||||
No audit gaps found. Run `/gsd:audit-milestone` first.
|
||||
```
|
||||
|
||||
## 2. Prioritize Gaps
|
||||
|
||||
Group gaps by priority from REQUIREMENTS.md:
|
||||
|
||||
| Priority | Action |
|
||||
|----------|--------|
|
||||
| `must` | Create phase, blocks milestone |
|
||||
| `should` | Create phase, recommended |
|
||||
| `nice` | Ask user: include or defer? |
|
||||
|
||||
For integration/flow gaps, infer priority from affected requirements.
|
||||
|
||||
## 3. Group Gaps into Phases
|
||||
|
||||
Cluster related gaps into logical phases:
|
||||
|
||||
**Grouping rules:**
|
||||
- Same affected phase → combine into one fix phase
|
||||
- Same subsystem (auth, API, UI) → combine
|
||||
- Dependency order (fix stubs before wiring)
|
||||
- Keep phases focused: 2-4 tasks each
|
||||
|
||||
**Example grouping:**
|
||||
```
|
||||
Gap: DASH-01 unsatisfied (Dashboard doesn't fetch)
|
||||
Gap: Integration Phase 1→3 (Auth not passed to API calls)
|
||||
Gap: Flow "View dashboard" broken at data fetch
|
||||
|
||||
→ Phase 6: "Wire Dashboard to API"
|
||||
- Add fetch to Dashboard.tsx
|
||||
- Include auth header in fetch
|
||||
- Handle response, update state
|
||||
- Render user data
|
||||
```
|
||||
|
||||
## 4. Determine Phase Numbers
|
||||
|
||||
Find highest existing phase:
|
||||
```bash
|
||||
ls -d .planning/phases/*/ | sort -V | tail -1
|
||||
```
|
||||
|
||||
New phases continue from there:
|
||||
- If Phase 5 is highest, gaps become Phase 6, 7, 8...
|
||||
|
||||
## 5. Present Gap Closure Plan
|
||||
|
||||
```markdown
|
||||
## Gap Closure Plan
|
||||
|
||||
**Milestone:** {version}
|
||||
**Gaps to close:** {N} requirements, {M} integration, {K} flows
|
||||
|
||||
### Proposed Phases
|
||||
|
||||
**Phase {N}: {Name}**
|
||||
Closes:
|
||||
- {REQ-ID}: {description}
|
||||
- Integration: {from} → {to}
|
||||
Tasks: {count}
|
||||
|
||||
**Phase {N+1}: {Name}**
|
||||
Closes:
|
||||
- {REQ-ID}: {description}
|
||||
- Flow: {flow name}
|
||||
Tasks: {count}
|
||||
|
||||
{If nice-to-have gaps exist:}
|
||||
|
||||
### Deferred (nice-to-have)
|
||||
|
||||
These gaps are optional. Include them?
|
||||
- {gap description}
|
||||
- {gap description}
|
||||
|
||||
---
|
||||
|
||||
Create these {X} phases? (yes / adjust / defer all optional)
|
||||
```
|
||||
|
||||
Wait for user confirmation.
|
||||
|
||||
## 6. Update ROADMAP.md
|
||||
|
||||
Add new phases to current milestone:
|
||||
|
||||
```markdown
|
||||
### Phase {N}: {Name}
|
||||
**Goal:** {derived from gaps being closed}
|
||||
**Requirements:** {REQ-IDs being satisfied}
|
||||
**Gap Closure:** Closes gaps from audit
|
||||
|
||||
### Phase {N+1}: {Name}
|
||||
...
|
||||
```
|
||||
|
||||
## 7. Create Phase Directories
|
||||
|
||||
```bash
|
||||
mkdir -p ".planning/phases/{NN}-{name}"
|
||||
```
|
||||
|
||||
## 8. Commit Roadmap Update
|
||||
|
||||
**Check planning config:**
|
||||
|
||||
```bash
|
||||
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
||||
```
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
||||
|
||||
```bash
|
||||
git add .planning/ROADMAP.md
|
||||
git commit -m "docs(roadmap): add gap closure phases {N}-{M}"
|
||||
```
|
||||
|
||||
## 9. Offer Next Steps
|
||||
|
||||
```markdown
|
||||
## ✓ Gap Closure Phases Created
|
||||
|
||||
**Phases added:** {N} - {M}
|
||||
**Gaps addressed:** {count} requirements, {count} integration, {count} flows
|
||||
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Plan first gap closure phase**
|
||||
|
||||
`/gsd:plan-phase {N}`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:execute-phase {N}` — if plans already exist
|
||||
- `cat .planning/ROADMAP.md` — see updated roadmap
|
||||
|
||||
---
|
||||
|
||||
**After all gap phases complete:**
|
||||
|
||||
`/gsd:audit-milestone` — re-audit to verify gaps closed
|
||||
`/gsd:complete-milestone {version}` — archive when audit passes
|
||||
```
|
||||
|
||||
Execute the plan-milestone-gaps workflow from @~/.claude/get-shit-done/workflows/plan-milestone-gaps.md end-to-end.
|
||||
Preserve all workflow gates (audit loading, prioritization, phase grouping, user confirmation, roadmap updates).
|
||||
</process>
|
||||
|
||||
<gap_to_phase_mapping>
|
||||
|
||||
## How Gaps Become Tasks
|
||||
|
||||
**Requirement gap → Tasks:**
|
||||
```yaml
|
||||
gap:
|
||||
id: DASH-01
|
||||
description: "User sees their data"
|
||||
reason: "Dashboard exists but doesn't fetch from API"
|
||||
missing:
|
||||
- "useEffect with fetch to /api/user/data"
|
||||
- "State for user data"
|
||||
- "Render user data in JSX"
|
||||
|
||||
becomes:
|
||||
|
||||
phase: "Wire Dashboard Data"
|
||||
tasks:
|
||||
- name: "Add data fetching"
|
||||
files: [src/components/Dashboard.tsx]
|
||||
action: "Add useEffect that fetches /api/user/data on mount"
|
||||
|
||||
- name: "Add state management"
|
||||
files: [src/components/Dashboard.tsx]
|
||||
action: "Add useState for userData, loading, error states"
|
||||
|
||||
- name: "Render user data"
|
||||
files: [src/components/Dashboard.tsx]
|
||||
action: "Replace placeholder with userData.map rendering"
|
||||
```
|
||||
|
||||
**Integration gap → Tasks:**
|
||||
```yaml
|
||||
gap:
|
||||
from_phase: 1
|
||||
to_phase: 3
|
||||
connection: "Auth token → API calls"
|
||||
reason: "Dashboard API calls don't include auth header"
|
||||
missing:
|
||||
- "Auth header in fetch calls"
|
||||
- "Token refresh on 401"
|
||||
|
||||
becomes:
|
||||
|
||||
phase: "Add Auth to Dashboard API Calls"
|
||||
tasks:
|
||||
- name: "Add auth header to fetches"
|
||||
files: [src/components/Dashboard.tsx, src/lib/api.ts]
|
||||
action: "Include Authorization header with token in all API calls"
|
||||
|
||||
- name: "Handle 401 responses"
|
||||
files: [src/lib/api.ts]
|
||||
action: "Add interceptor to refresh token or redirect to login on 401"
|
||||
```
|
||||
|
||||
**Flow gap → Tasks:**
|
||||
```yaml
|
||||
gap:
|
||||
name: "User views dashboard after login"
|
||||
broken_at: "Dashboard data load"
|
||||
reason: "No fetch call"
|
||||
missing:
|
||||
- "Fetch user data on mount"
|
||||
- "Display loading state"
|
||||
- "Render user data"
|
||||
|
||||
becomes:
|
||||
|
||||
# Usually same phase as requirement/integration gap
|
||||
# Flow gaps often overlap with other gap types
|
||||
```
|
||||
|
||||
</gap_to_phase_mapping>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] MILESTONE-AUDIT.md loaded and gaps parsed
|
||||
- [ ] Gaps prioritized (must/should/nice)
|
||||
- [ ] Gaps grouped into logical phases
|
||||
- [ ] User confirmed phase plan
|
||||
- [ ] ROADMAP.md updated with new phases
|
||||
- [ ] Phase directories created
|
||||
- [ ] Changes committed
|
||||
- [ ] User knows to run `/gsd:plan-phase` next
|
||||
</success_criteria>
|
||||
|
||||
@@ -13,556 +13,32 @@ allowed-tools:
|
||||
- WebFetch
|
||||
- mcp__context7__*
|
||||
---
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
</execution_context>
|
||||
|
||||
<objective>
|
||||
Create executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification.
|
||||
|
||||
**Default flow:** Research (if needed) → Plan → Verify → Done
|
||||
|
||||
**Orchestrator role:** Parse arguments, validate phase, research domain (unless skipped or exists), spawn gsd-planner agent, verify plans with gsd-plan-checker, iterate until plans pass or max iterations reached, present results.
|
||||
|
||||
**Why subagents:** Research and planning burn context fast. Verification uses fresh context. User sees the flow between agents in main context.
|
||||
**Orchestrator role:** Parse arguments, validate phase, research domain (unless skipped), spawn gsd-planner, verify with gsd-plan-checker, iterate until pass or max iterations, present results.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/plan-phase.md
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
Phase number: $ARGUMENTS (optional - auto-detects next unplanned phase if not provided)
|
||||
Phase number: $ARGUMENTS (optional — auto-detects next unplanned phase if omitted)
|
||||
|
||||
**Flags:**
|
||||
- `--research` — Force re-research even if RESEARCH.md exists
|
||||
- `--skip-research` — Skip research entirely, go straight to planning
|
||||
- `--skip-research` — Skip research, go straight to planning
|
||||
- `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)
|
||||
- `--skip-verify` — Skip planner → checker verification loop
|
||||
- `--skip-verify` — Skip verification loop
|
||||
|
||||
Normalize phase input in step 2 before any directory lookups.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
## 1. Validate Environment and Resolve Model Profile
|
||||
|
||||
```bash
|
||||
ls .planning/ 2>/dev/null
|
||||
```
|
||||
|
||||
**If not found:** Error - user should run `/gsd:new-project` first.
|
||||
|
||||
**Resolve model profile for agent spawning:**
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-phase-researcher | opus | sonnet | haiku |
|
||||
| gsd-planner | opus | opus | sonnet |
|
||||
| gsd-plan-checker | sonnet | sonnet | haiku |
|
||||
|
||||
Store resolved models for use in Task calls below.
|
||||
|
||||
## 2. Parse and Normalize Arguments
|
||||
|
||||
Extract from $ARGUMENTS:
|
||||
|
||||
- Phase number (integer or decimal like `2.1`)
|
||||
- `--research` flag to force re-research
|
||||
- `--skip-research` flag to skip research
|
||||
- `--gaps` flag for gap closure mode
|
||||
- `--skip-verify` flag to bypass verification loop
|
||||
|
||||
**If no phase number:** Detect next unplanned phase from roadmap.
|
||||
|
||||
**Normalize phase to zero-padded format:**
|
||||
|
||||
```bash
|
||||
# Normalize phase number (8 → 08, but preserve decimals like 2.1 → 02.1)
|
||||
if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
|
||||
PHASE=$(printf "%02d" "$PHASE")
|
||||
elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
|
||||
PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
|
||||
fi
|
||||
```
|
||||
|
||||
**Check for existing research and plans:**
|
||||
|
||||
```bash
|
||||
ls .planning/phases/${PHASE}-*/*-RESEARCH.md 2>/dev/null
|
||||
ls .planning/phases/${PHASE}-*/*-PLAN.md 2>/dev/null
|
||||
```
|
||||
|
||||
## 3. Validate Phase
|
||||
|
||||
```bash
|
||||
grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
|
||||
```
|
||||
|
||||
**If not found:** Error with available phases. **If found:** Extract phase number, name, description.
|
||||
|
||||
## 4. Ensure Phase Directory Exists and Load CONTEXT.md
|
||||
|
||||
```bash
|
||||
# PHASE is already normalized (08, 02.1, etc.) from step 2
|
||||
PHASE_DIR=$(ls -d .planning/phases/${PHASE}-* 2>/dev/null | head -1)
|
||||
if [ -z "$PHASE_DIR" ]; then
|
||||
# Create phase directory from roadmap name
|
||||
PHASE_NAME=$(grep "Phase ${PHASE}:" .planning/ROADMAP.md | sed 's/.*Phase [0-9]*: //' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
|
||||
mkdir -p ".planning/phases/${PHASE}-${PHASE_NAME}"
|
||||
PHASE_DIR=".planning/phases/${PHASE}-${PHASE_NAME}"
|
||||
fi
|
||||
|
||||
# Load CONTEXT.md immediately - this informs ALL downstream agents
|
||||
CONTEXT_CONTENT=$(cat "${PHASE_DIR}"/*-CONTEXT.md 2>/dev/null)
|
||||
```
|
||||
|
||||
**CRITICAL:** Store `CONTEXT_CONTENT` now. It must be passed to:
|
||||
- **Researcher** — constrains what to research (locked decisions vs Claude's discretion)
|
||||
- **Planner** — locked decisions must be honored, not revisited
|
||||
- **Checker** — verifies plans respect user's stated vision
|
||||
- **Revision** — context for targeted fixes
|
||||
|
||||
If CONTEXT.md exists, display: `Using phase context from: ${PHASE_DIR}/*-CONTEXT.md`
|
||||
|
||||
## 5. Handle Research
|
||||
|
||||
**If `--gaps` flag:** Skip research (gap closure uses VERIFICATION.md instead).
|
||||
|
||||
**If `--skip-research` flag:** Skip to step 6.
|
||||
|
||||
**Check config for research setting:**
|
||||
|
||||
```bash
|
||||
WORKFLOW_RESEARCH=$(cat .planning/config.json 2>/dev/null | grep -o '"research"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
```
|
||||
|
||||
**If `workflow.research` is `false` AND `--research` flag NOT set:** Skip to step 6.
|
||||
|
||||
**Otherwise:**
|
||||
|
||||
Check for existing research:
|
||||
|
||||
```bash
|
||||
ls "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null
|
||||
```
|
||||
|
||||
**If RESEARCH.md exists AND `--research` flag NOT set:**
|
||||
- Display: `Using existing research: ${PHASE_DIR}/${PHASE}-RESEARCH.md`
|
||||
- Skip to step 6
|
||||
|
||||
**If RESEARCH.md missing OR `--research` flag set:**
|
||||
|
||||
Display stage banner:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► RESEARCHING PHASE {X}
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
◆ Spawning researcher...
|
||||
```
|
||||
|
||||
Proceed to spawn researcher
|
||||
|
||||
### Spawn gsd-phase-researcher
|
||||
|
||||
Gather additional context for research prompt:
|
||||
|
||||
```bash
|
||||
# Get phase description from roadmap
|
||||
PHASE_DESC=$(grep -A3 "Phase ${PHASE}:" .planning/ROADMAP.md)
|
||||
|
||||
# Get requirements if they exist
|
||||
REQUIREMENTS=$(cat .planning/REQUIREMENTS.md 2>/dev/null | grep -A100 "## Requirements" | head -50)
|
||||
|
||||
# Get prior decisions from STATE.md
|
||||
DECISIONS=$(grep -A20 "### Decisions Made" .planning/STATE.md 2>/dev/null)
|
||||
|
||||
# CONTEXT_CONTENT already loaded in step 4
|
||||
```
|
||||
|
||||
Fill research prompt and spawn:
|
||||
|
||||
```markdown
|
||||
<objective>
|
||||
Research how to implement Phase {phase_number}: {phase_name}
|
||||
|
||||
Answer: "What do I need to know to PLAN this phase well?"
|
||||
</objective>
|
||||
|
||||
<phase_context>
|
||||
**IMPORTANT:** If CONTEXT.md exists below, it contains user decisions from /gsd:discuss-phase.
|
||||
|
||||
- **Decisions section** = Locked choices — research THESE deeply, don't explore alternatives
|
||||
- **Claude's Discretion section** = Your freedom areas — research options, make recommendations
|
||||
- **Deferred Ideas section** = Out of scope — ignore completely
|
||||
|
||||
{context_content}
|
||||
</phase_context>
|
||||
|
||||
<additional_context>
|
||||
**Phase description:**
|
||||
{phase_description}
|
||||
|
||||
**Requirements (if any):**
|
||||
{requirements}
|
||||
|
||||
**Prior decisions from STATE.md:**
|
||||
{decisions}
|
||||
</additional_context>
|
||||
|
||||
<output>
|
||||
Write research findings to: {phase_dir}/{phase}-RESEARCH.md
|
||||
</output>
|
||||
```
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="First, read ~/.claude/agents/gsd-phase-researcher.md for your role and instructions.\n\n" + research_prompt,
|
||||
subagent_type="general-purpose",
|
||||
model="{researcher_model}",
|
||||
description="Research Phase {phase}"
|
||||
)
|
||||
```
|
||||
|
||||
### Handle Researcher Return
|
||||
|
||||
**`## RESEARCH COMPLETE`:**
|
||||
- Display: `Research complete. Proceeding to planning...`
|
||||
- Continue to step 6
|
||||
|
||||
**`## RESEARCH BLOCKED`:**
|
||||
- Display blocker information
|
||||
- Offer: 1) Provide more context, 2) Skip research and plan anyway, 3) Abort
|
||||
- Wait for user response
|
||||
|
||||
## 6. Check Existing Plans
|
||||
|
||||
```bash
|
||||
ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
|
||||
```
|
||||
|
||||
**If exists:** Offer: 1) Continue planning (add more plans), 2) View existing, 3) Replan from scratch. Wait for response.
|
||||
|
||||
## 7. Read Context Files
|
||||
|
||||
Read and store context file contents for the planner agent. The `@` syntax does not work across Task() boundaries - content must be inlined.
|
||||
|
||||
```bash
|
||||
# Read required files
|
||||
STATE_CONTENT=$(cat .planning/STATE.md)
|
||||
ROADMAP_CONTENT=$(cat .planning/ROADMAP.md)
|
||||
|
||||
# Read optional files (empty string if missing)
|
||||
REQUIREMENTS_CONTENT=$(cat .planning/REQUIREMENTS.md 2>/dev/null)
|
||||
# CONTEXT_CONTENT already loaded in step 4
|
||||
RESEARCH_CONTENT=$(cat "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null)
|
||||
|
||||
# Gap closure files (only if --gaps mode)
|
||||
VERIFICATION_CONTENT=$(cat "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null)
|
||||
UAT_CONTENT=$(cat "${PHASE_DIR}"/*-UAT.md 2>/dev/null)
|
||||
```
|
||||
|
||||
## 8. Spawn gsd-planner Agent
|
||||
|
||||
Display stage banner:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PLANNING PHASE {X}
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
◆ Spawning planner...
|
||||
```
|
||||
|
||||
Fill prompt with inlined content and spawn:
|
||||
|
||||
```markdown
|
||||
<planning_context>
|
||||
|
||||
**Phase:** {phase_number}
|
||||
**Mode:** {standard | gap_closure}
|
||||
|
||||
**Project State:**
|
||||
{state_content}
|
||||
|
||||
**Roadmap:**
|
||||
{roadmap_content}
|
||||
|
||||
**Requirements (if exists):**
|
||||
{requirements_content}
|
||||
|
||||
**Phase Context (if exists):**
|
||||
|
||||
IMPORTANT: If phase context exists below, it contains USER DECISIONS from /gsd:discuss-phase.
|
||||
- **Decisions** = LOCKED — honor these exactly, do not revisit or suggest alternatives
|
||||
- **Claude's Discretion** = Your freedom — make implementation choices here
|
||||
- **Deferred Ideas** = Out of scope — do NOT include in this phase
|
||||
|
||||
{context_content}
|
||||
|
||||
**Research (if exists):**
|
||||
{research_content}
|
||||
|
||||
**Gap Closure (if --gaps mode):**
|
||||
{verification_content}
|
||||
{uat_content}
|
||||
|
||||
</planning_context>
|
||||
|
||||
<downstream_consumer>
|
||||
Output consumed by /gsd:execute-phase
|
||||
Plans must be executable prompts with:
|
||||
|
||||
- Frontmatter (wave, depends_on, files_modified, autonomous)
|
||||
- Tasks in XML format
|
||||
- Verification criteria
|
||||
- must_haves for goal-backward verification
|
||||
</downstream_consumer>
|
||||
|
||||
<quality_gate>
|
||||
Before returning PLANNING COMPLETE:
|
||||
|
||||
- [ ] PLAN.md files created in phase directory
|
||||
- [ ] Each plan has valid frontmatter
|
||||
- [ ] Tasks are specific and actionable
|
||||
- [ ] Dependencies correctly identified
|
||||
- [ ] Waves assigned for parallel execution
|
||||
- [ ] must_haves derived from phase goal
|
||||
</quality_gate>
|
||||
```
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="First, read ~/.claude/agents/gsd-planner.md for your role and instructions.\n\n" + filled_prompt,
|
||||
subagent_type="general-purpose",
|
||||
model="{planner_model}",
|
||||
description="Plan Phase {phase}"
|
||||
)
|
||||
```
|
||||
|
||||
## 9. Handle Planner Return
|
||||
|
||||
Parse planner output:
|
||||
|
||||
**`## PLANNING COMPLETE`:**
|
||||
- Display: `Planner created {N} plan(s). Files on disk.`
|
||||
- If `--skip-verify`: Skip to step 13
|
||||
- Check config: `WORKFLOW_PLAN_CHECK=$(cat .planning/config.json 2>/dev/null | grep -o '"plan_check"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
|
||||
- If `workflow.plan_check` is `false`: Skip to step 13
|
||||
- Otherwise: Proceed to step 10
|
||||
|
||||
**`## CHECKPOINT REACHED`:**
|
||||
- Present to user, get response, spawn continuation (see step 12)
|
||||
|
||||
**`## PLANNING INCONCLUSIVE`:**
|
||||
- Show what was attempted
|
||||
- Offer: Add context, Retry, Manual
|
||||
- Wait for user response
|
||||
|
||||
## 10. Spawn gsd-plan-checker Agent
|
||||
|
||||
Display:
|
||||
```
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► VERIFYING PLANS
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
◆ Spawning plan checker...
|
||||
```
|
||||
|
||||
Read plans for the checker:
|
||||
|
||||
```bash
|
||||
# Read all plans in phase directory
|
||||
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
|
||||
|
||||
# CONTEXT_CONTENT already loaded in step 4
|
||||
# REQUIREMENTS_CONTENT already loaded in step 7
|
||||
```
|
||||
|
||||
Fill checker prompt with inlined content and spawn:
|
||||
|
||||
```markdown
|
||||
<verification_context>
|
||||
|
||||
**Phase:** {phase_number}
|
||||
**Phase Goal:** {goal from ROADMAP}
|
||||
|
||||
**Plans to verify:**
|
||||
{plans_content}
|
||||
|
||||
**Requirements (if exists):**
|
||||
{requirements_content}
|
||||
|
||||
**Phase Context (if exists):**
|
||||
|
||||
IMPORTANT: If phase context exists below, it contains USER DECISIONS from /gsd:discuss-phase.
|
||||
Plans MUST honor these decisions. Flag as issue if plans contradict user's stated vision.
|
||||
|
||||
- **Decisions** = LOCKED — plans must implement these exactly
|
||||
- **Claude's Discretion** = Freedom areas — plans can choose approach
|
||||
- **Deferred Ideas** = Out of scope — plans must NOT include these
|
||||
|
||||
{context_content}
|
||||
|
||||
</verification_context>
|
||||
|
||||
<expected_output>
|
||||
Return one of:
|
||||
- ## VERIFICATION PASSED — all checks pass
|
||||
- ## ISSUES FOUND — structured issue list
|
||||
</expected_output>
|
||||
```
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt=checker_prompt,
|
||||
subagent_type="gsd-plan-checker",
|
||||
model="{checker_model}",
|
||||
description="Verify Phase {phase} plans"
|
||||
)
|
||||
```
|
||||
|
||||
## 11. Handle Checker Return
|
||||
|
||||
**If `## VERIFICATION PASSED`:**
|
||||
- Display: `Plans verified. Ready for execution.`
|
||||
- Proceed to step 13
|
||||
|
||||
**If `## ISSUES FOUND`:**
|
||||
- Display: `Checker found issues:`
|
||||
- List issues from checker output
|
||||
- Check iteration count
|
||||
- Proceed to step 12
|
||||
|
||||
## 12. Revision Loop (Max 3 Iterations)
|
||||
|
||||
Track: `iteration_count` (starts at 1 after initial plan + check)
|
||||
|
||||
**If iteration_count < 3:**
|
||||
|
||||
Display: `Sending back to planner for revision... (iteration {N}/3)`
|
||||
|
||||
Read current plans for revision context:
|
||||
|
||||
```bash
|
||||
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
|
||||
# CONTEXT_CONTENT already loaded in step 4
|
||||
```
|
||||
|
||||
Spawn gsd-planner with revision prompt:
|
||||
|
||||
```markdown
|
||||
<revision_context>
|
||||
|
||||
**Phase:** {phase_number}
|
||||
**Mode:** revision
|
||||
|
||||
**Existing plans:**
|
||||
{plans_content}
|
||||
|
||||
**Checker issues:**
|
||||
{structured_issues_from_checker}
|
||||
|
||||
**Phase Context (if exists):**
|
||||
|
||||
IMPORTANT: If phase context exists, revisions MUST still honor user decisions.
|
||||
|
||||
{context_content}
|
||||
|
||||
</revision_context>
|
||||
|
||||
<instructions>
|
||||
Make targeted updates to address checker issues.
|
||||
Do NOT replan from scratch unless issues are fundamental.
|
||||
Revisions must still honor all locked decisions from Phase Context.
|
||||
Return what changed.
|
||||
</instructions>
|
||||
```
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="First, read ~/.claude/agents/gsd-planner.md for your role and instructions.\n\n" + revision_prompt,
|
||||
subagent_type="general-purpose",
|
||||
model="{planner_model}",
|
||||
description="Revise Phase {phase} plans"
|
||||
)
|
||||
```
|
||||
|
||||
- After planner returns → spawn checker again (step 10)
|
||||
- Increment iteration_count
|
||||
|
||||
**If iteration_count >= 3:**
|
||||
|
||||
Display: `Max iterations reached. {N} issues remain:`
|
||||
- List remaining issues
|
||||
|
||||
Offer options:
|
||||
1. Force proceed (execute despite issues)
|
||||
2. Provide guidance (user gives direction, retry)
|
||||
3. Abandon (exit planning)
|
||||
|
||||
Wait for user response.
|
||||
|
||||
## 13. Present Final Status
|
||||
|
||||
Route to `<offer_next>`.
|
||||
|
||||
Execute the plan-phase workflow from @~/.claude/get-shit-done/workflows/plan-phase.md end-to-end.
|
||||
Preserve all workflow gates (validation, research, planning, verification loop, routing).
|
||||
</process>
|
||||
|
||||
<offer_next>
|
||||
Output this markdown directly (not as a code block):
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {X} PLANNED ✓
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {X}: {Name}** — {N} plan(s) in {M} wave(s)
|
||||
|
||||
| Wave | Plans | What it builds |
|
||||
|------|-------|----------------|
|
||||
| 1 | 01, 02 | [objectives] |
|
||||
| 2 | 03 | [objective] |
|
||||
|
||||
Research: {Completed | Used existing | Skipped}
|
||||
Verification: {Passed | Passed with override | Skipped}
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**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
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
</offer_next>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] .planning/ directory validated
|
||||
- [ ] Phase validated against roadmap
|
||||
- [ ] Phase directory created if needed
|
||||
- [ ] CONTEXT.md loaded early (step 4) and passed to ALL agents
|
||||
- [ ] Research completed (unless --skip-research or --gaps or exists)
|
||||
- [ ] gsd-phase-researcher spawned with CONTEXT.md (constrains research scope)
|
||||
- [ ] Existing plans checked
|
||||
- [ ] gsd-planner spawned with context (CONTEXT.md + RESEARCH.md)
|
||||
- [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
|
||||
- [ ] gsd-plan-checker spawned with CONTEXT.md (verifies context compliance)
|
||||
- [ ] Verification passed OR user override OR max iterations with user decision
|
||||
- [ ] User sees status between agent spawns
|
||||
- [ ] User knows next steps (execute or review)
|
||||
</success_criteria>
|
||||
|
||||
@@ -8,357 +8,17 @@ allowed-tools:
|
||||
- Glob
|
||||
- SlashCommand
|
||||
---
|
||||
|
||||
<objective>
|
||||
Check project progress, summarize recent work and what's ahead, then intelligently route to the next action - either executing an existing plan or creating the next one.
|
||||
|
||||
Provides situational awareness before continuing work.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/progress.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="verify">
|
||||
**Verify planning structure exists:**
|
||||
|
||||
Use Bash (not Glob) to check—Glob respects .gitignore but .planning/ is often gitignored:
|
||||
|
||||
```bash
|
||||
test -d .planning && echo "exists" || echo "missing"
|
||||
```
|
||||
|
||||
If no `.planning/` directory:
|
||||
|
||||
```
|
||||
No planning structure found.
|
||||
|
||||
Run /gsd:new-project to start a new project.
|
||||
```
|
||||
|
||||
Exit.
|
||||
|
||||
If missing STATE.md: suggest `/gsd:new-project`.
|
||||
|
||||
**If ROADMAP.md missing but PROJECT.md exists:**
|
||||
|
||||
This means a milestone was completed and archived. Go to **Route F** (between milestones).
|
||||
|
||||
If missing both ROADMAP.md and PROJECT.md: suggest `/gsd:new-project`.
|
||||
</step>
|
||||
|
||||
<step name="load">
|
||||
**Load full project context:**
|
||||
|
||||
- Read `.planning/STATE.md` for living memory (position, decisions, issues)
|
||||
- Read `.planning/ROADMAP.md` for phase structure and objectives
|
||||
- Read `.planning/PROJECT.md` for current state (What This Is, Core Value, Requirements)
|
||||
- Read `.planning/config.json` for settings (model_profile, workflow toggles)
|
||||
</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
|
||||
- This shows "what we've been working on"
|
||||
</step>
|
||||
|
||||
<step name="position">
|
||||
**Parse current position:**
|
||||
|
||||
- From STATE.md: current phase, plan number, status
|
||||
- Calculate: total plans, completed plans, remaining plans
|
||||
- Note any blockers or concerns
|
||||
- Check for CONTEXT.md: For phases without PLAN.md files, check if `{phase}-CONTEXT.md` exists in phase directory
|
||||
- Count pending todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
|
||||
- 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:**
|
||||
|
||||
```
|
||||
# [Project Name]
|
||||
|
||||
**Progress:** [████████░░] 8/10 plans complete
|
||||
**Profile:** [quality/balanced/budget]
|
||||
|
||||
## Recent Work
|
||||
- [Phase X, Plan Y]: [what was accomplished - 1 line]
|
||||
- [Phase X, Plan Z]: [what was accomplished - 1 line]
|
||||
|
||||
## Current Position
|
||||
Phase [N] of [total]: [phase-name]
|
||||
Plan [M] of [phase-total]: [status]
|
||||
CONTEXT: [✓ if CONTEXT.md exists | - if not]
|
||||
|
||||
## Key Decisions Made
|
||||
- [decision 1 from STATE.md]
|
||||
- [decision 2]
|
||||
|
||||
## Blockers/Concerns
|
||||
- [any blockers or concerns from STATE.md]
|
||||
|
||||
## Pending Todos
|
||||
- [count] pending — /gsd:check-todos to review
|
||||
|
||||
## Active Debug Sessions
|
||||
- [count] active — /gsd:debug to continue
|
||||
(Only show this section if count > 0)
|
||||
|
||||
## What's Next
|
||||
[Next phase/plan objective from ROADMAP]
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="route">
|
||||
**Determine next action based on verified counts.**
|
||||
|
||||
**Step 1: Count plans, summaries, and issues in current phase**
|
||||
|
||||
List files in the current phase directory:
|
||||
|
||||
```bash
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null | wc -l
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
|
||||
ls -1 .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null | wc -l
|
||||
```
|
||||
|
||||
State: "This phase has {X} plans, {Y} summaries."
|
||||
|
||||
**Step 1.5: Check for unaddressed UAT gaps**
|
||||
|
||||
Check for UAT.md files with status "diagnosed" (has gaps needing fixes).
|
||||
|
||||
```bash
|
||||
# Check for diagnosed UAT with gaps
|
||||
grep -l "status: diagnosed" .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null
|
||||
```
|
||||
|
||||
Track:
|
||||
- `uat_with_gaps`: UAT.md files with status "diagnosed" (gaps need fixing)
|
||||
|
||||
**Step 2: Route based on counts**
|
||||
|
||||
| Condition | Meaning | Action |
|
||||
|-----------|---------|--------|
|
||||
| uat_with_gaps > 0 | UAT gaps need fix plans | Go to **Route E** |
|
||||
| summaries < plans | Unexecuted plans exist | Go to **Route A** |
|
||||
| summaries = plans AND plans > 0 | Phase complete | Go to Step 3 |
|
||||
| plans = 0 | Phase not yet planned | Go to **Route B** |
|
||||
|
||||
---
|
||||
|
||||
**Route A: Unexecuted plan exists**
|
||||
|
||||
Find the first PLAN.md without matching SUMMARY.md.
|
||||
Read its `<objective>` section.
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**{phase}-{plan}: [Plan Name]** — [objective summary from PLAN.md]
|
||||
|
||||
`/gsd:execute-phase {phase}`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Route B: Phase needs planning**
|
||||
|
||||
Check if `{phase}-CONTEXT.md` exists in phase directory.
|
||||
|
||||
**If CONTEXT.md exists:**
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase {N}: {Name}** — {Goal from ROADMAP.md}
|
||||
<sub>✓ Context gathered, ready to plan</sub>
|
||||
|
||||
`/gsd:plan-phase {phase-number}`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
**If CONTEXT.md does NOT exist:**
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase {N}: {Name}** — {Goal from ROADMAP.md}
|
||||
|
||||
`/gsd:discuss-phase {phase}` — gather context and clarify approach
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:plan-phase {phase}` — skip discussion, plan directly
|
||||
- `/gsd:list-phase-assumptions {phase}` — see Claude's assumptions
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Route E: UAT gaps need fix plans**
|
||||
|
||||
UAT.md exists with gaps (diagnosed issues). User needs to plan fixes.
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## ⚠ UAT Gaps Found
|
||||
|
||||
**{phase}-UAT.md** has {N} gaps requiring fixes.
|
||||
|
||||
`/gsd:plan-phase {phase} --gaps`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:execute-phase {phase}` — execute phase plans
|
||||
- `/gsd:verify-work {phase}` — run more UAT testing
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Step 3: Check milestone status (only when phase complete)**
|
||||
|
||||
Read ROADMAP.md and identify:
|
||||
1. Current phase number
|
||||
2. All phase numbers in the current milestone section
|
||||
|
||||
Count total phases and identify the highest phase number.
|
||||
|
||||
State: "Current phase is {X}. Milestone has {N} phases (highest: {Y})."
|
||||
|
||||
**Route based on milestone status:**
|
||||
|
||||
| Condition | Meaning | Action |
|
||||
|-----------|---------|--------|
|
||||
| current phase < highest phase | More phases remain | Go to **Route C** |
|
||||
| current phase = highest phase | Milestone complete | Go to **Route D** |
|
||||
|
||||
---
|
||||
|
||||
**Route C: Phase complete, more phases remain**
|
||||
|
||||
Read ROADMAP.md to get the next phase's name and goal.
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## ✓ Phase {Z} Complete
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
|
||||
|
||||
`/gsd:discuss-phase {Z+1}` — gather context and clarify approach
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:plan-phase {Z+1}` — skip discussion, plan directly
|
||||
- `/gsd:verify-work {Z}` — user acceptance test before continuing
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Route D: Milestone complete**
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## 🎉 Milestone Complete
|
||||
|
||||
All {N} phases finished!
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Complete Milestone** — archive and prepare for next
|
||||
|
||||
`/gsd:complete-milestone`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
|
||||
**Also available:**
|
||||
- `/gsd:verify-work` — user acceptance test before completing milestone
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Route F: Between milestones (ROADMAP.md missing, PROJECT.md exists)**
|
||||
|
||||
A milestone was completed and archived. Ready to start the next milestone cycle.
|
||||
|
||||
Read MILESTONES.md to find the last completed milestone version.
|
||||
|
||||
```
|
||||
---
|
||||
|
||||
## ✓ Milestone v{X.Y} Complete
|
||||
|
||||
Ready to plan the next milestone.
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Start Next Milestone** — questioning → research → requirements → roadmap
|
||||
|
||||
`/gsd:new-milestone`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="edge_cases">
|
||||
**Handle edge cases:**
|
||||
|
||||
- Phase complete but next phase not planned → offer `/gsd:plan-phase [next]`
|
||||
- All work complete → offer milestone completion
|
||||
- Blockers present → highlight before offering to continue
|
||||
- Handoff file exists → mention it, offer `/gsd:resume-work`
|
||||
</step>
|
||||
|
||||
Execute the progress workflow from @~/.claude/get-shit-done/workflows/progress.md end-to-end.
|
||||
Preserve all routing logic (Routes A through F) and edge case handling.
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- [ ] Rich context provided (recent work, decisions, issues)
|
||||
- [ ] Current position clear with visual progress
|
||||
- [ ] What's next clearly explained
|
||||
- [ ] Smart routing: /gsd:execute-phase if plans exist, /gsd:plan-phase if not
|
||||
- [ ] User confirms before any action
|
||||
- [ ] Seamless handoff to appropriate gsd command
|
||||
</success_criteria>
|
||||
|
||||
@@ -12,7 +12,6 @@ allowed-tools:
|
||||
- Task
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Execute small, ad-hoc tasks with GSD guarantees (atomic commits, STATE.md tracking) while skipping optional agents (research, plan-checker, verifier).
|
||||
|
||||
@@ -26,7 +25,7 @@ Use when: You know exactly what to do and the task is small enough to not need r
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
Orchestration is inline - no separate workflow file. Quick mode is deliberately simpler than full GSD.
|
||||
@~/.claude/get-shit-done/workflows/quick.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@@ -34,276 +33,6 @@ Orchestration is inline - no separate workflow file. Quick mode is deliberately
|
||||
</context>
|
||||
|
||||
<process>
|
||||
**Step 0: Resolve Model Profile**
|
||||
|
||||
Read model profile for agent spawning:
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-planner | opus | opus | sonnet |
|
||||
| gsd-executor | opus | sonnet | sonnet |
|
||||
|
||||
Store resolved models for use in Task calls below.
|
||||
|
||||
---
|
||||
|
||||
**Step 1: Pre-flight validation**
|
||||
|
||||
Check that an active GSD project exists:
|
||||
|
||||
```bash
|
||||
if [ ! -f .planning/ROADMAP.md ]; then
|
||||
echo "Quick mode requires an active project with ROADMAP.md."
|
||||
echo "Run /gsd:new-project first."
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
If validation fails, stop immediately with the error message.
|
||||
|
||||
Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.
|
||||
|
||||
---
|
||||
|
||||
**Step 2: Get task description**
|
||||
|
||||
Prompt user interactively for the task description:
|
||||
|
||||
```
|
||||
AskUserQuestion(
|
||||
header: "Quick Task",
|
||||
question: "What do you want to do?",
|
||||
followUp: null
|
||||
)
|
||||
```
|
||||
|
||||
Store response as `$DESCRIPTION`.
|
||||
|
||||
If empty, re-prompt: "Please provide a task description."
|
||||
|
||||
Generate slug from description:
|
||||
```bash
|
||||
slug=$(echo "$DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//' | cut -c1-40)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Step 3: Calculate next quick task number**
|
||||
|
||||
Ensure `.planning/quick/` directory exists and find the next sequential number:
|
||||
|
||||
```bash
|
||||
# Ensure .planning/quick/ exists
|
||||
mkdir -p .planning/quick
|
||||
|
||||
# Find highest existing number and increment
|
||||
last=$(ls -1d .planning/quick/[0-9][0-9][0-9]-* 2>/dev/null | sort -r | head -1 | xargs -I{} basename {} | grep -oE '^[0-9]+')
|
||||
|
||||
if [ -z "$last" ]; then
|
||||
next_num="001"
|
||||
else
|
||||
next_num=$(printf "%03d" $((10#$last + 1)))
|
||||
fi
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Step 4: Create quick task directory**
|
||||
|
||||
Create the directory for this quick task:
|
||||
|
||||
```bash
|
||||
QUICK_DIR=".planning/quick/${next_num}-${slug}"
|
||||
mkdir -p "$QUICK_DIR"
|
||||
```
|
||||
|
||||
Report to user:
|
||||
```
|
||||
Creating quick task ${next_num}: ${DESCRIPTION}
|
||||
Directory: ${QUICK_DIR}
|
||||
```
|
||||
|
||||
Store `$QUICK_DIR` for use in orchestration.
|
||||
|
||||
---
|
||||
|
||||
**Step 5: Spawn planner (quick mode)**
|
||||
|
||||
Spawn gsd-planner with quick mode context:
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="
|
||||
<planning_context>
|
||||
|
||||
**Mode:** quick
|
||||
**Directory:** ${QUICK_DIR}
|
||||
**Description:** ${DESCRIPTION}
|
||||
|
||||
**Project State:**
|
||||
@.planning/STATE.md
|
||||
|
||||
</planning_context>
|
||||
|
||||
<constraints>
|
||||
- Create a SINGLE plan with 1-3 focused tasks
|
||||
- Quick tasks should be atomic and self-contained
|
||||
- No research phase, no checker phase
|
||||
- Target ~30% context usage (simple, focused)
|
||||
</constraints>
|
||||
|
||||
<output>
|
||||
Write plan to: ${QUICK_DIR}/${next_num}-PLAN.md
|
||||
Return: ## PLANNING COMPLETE with plan path
|
||||
</output>
|
||||
",
|
||||
subagent_type="gsd-planner",
|
||||
model="{planner_model}",
|
||||
description="Quick plan: ${DESCRIPTION}"
|
||||
)
|
||||
```
|
||||
|
||||
After planner returns:
|
||||
1. Verify plan exists at `${QUICK_DIR}/${next_num}-PLAN.md`
|
||||
2. Extract plan count (typically 1 for quick tasks)
|
||||
3. Report: "Plan created: ${QUICK_DIR}/${next_num}-PLAN.md"
|
||||
|
||||
If plan not found, error: "Planner failed to create ${next_num}-PLAN.md"
|
||||
|
||||
---
|
||||
|
||||
**Step 6: Spawn executor**
|
||||
|
||||
Spawn gsd-executor with plan reference:
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="
|
||||
Execute quick task ${next_num}.
|
||||
|
||||
Plan: @${QUICK_DIR}/${next_num}-PLAN.md
|
||||
Project state: @.planning/STATE.md
|
||||
|
||||
<constraints>
|
||||
- Execute all tasks in the plan
|
||||
- Commit each task atomically
|
||||
- Create summary at: ${QUICK_DIR}/${next_num}-SUMMARY.md
|
||||
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
|
||||
</constraints>
|
||||
",
|
||||
subagent_type="gsd-executor",
|
||||
model="{executor_model}",
|
||||
description="Execute: ${DESCRIPTION}"
|
||||
)
|
||||
```
|
||||
|
||||
After executor returns:
|
||||
1. Verify summary exists at `${QUICK_DIR}/${next_num}-SUMMARY.md`
|
||||
2. Extract commit hash from executor output
|
||||
3. Report completion status
|
||||
|
||||
If summary not found, error: "Executor failed to create ${next_num}-SUMMARY.md"
|
||||
|
||||
Note: For quick tasks producing multiple plans (rare), spawn executors in parallel waves per execute-phase patterns.
|
||||
|
||||
---
|
||||
|
||||
**Step 7: Update STATE.md**
|
||||
|
||||
Update STATE.md with quick task completion record.
|
||||
|
||||
**7a. Check if "Quick Tasks Completed" section exists:**
|
||||
|
||||
Read STATE.md and check for `### Quick Tasks Completed` section.
|
||||
|
||||
**7b. If section doesn't exist, create it:**
|
||||
|
||||
Insert after `### Blockers/Concerns` section:
|
||||
|
||||
```markdown
|
||||
### Quick Tasks Completed
|
||||
|
||||
| # | Description | Date | Commit | Directory |
|
||||
|---|-------------|------|--------|-----------|
|
||||
```
|
||||
|
||||
**7c. Append new row to table:**
|
||||
|
||||
```markdown
|
||||
| ${next_num} | ${DESCRIPTION} | $(date +%Y-%m-%d) | ${commit_hash} | [${next_num}-${slug}](./quick/${next_num}-${slug}/) |
|
||||
```
|
||||
|
||||
**7d. Update "Last activity" line:**
|
||||
|
||||
Find and update the line:
|
||||
```
|
||||
Last activity: $(date +%Y-%m-%d) - Completed quick task ${next_num}: ${DESCRIPTION}
|
||||
```
|
||||
|
||||
Use Edit tool to make these changes atomically
|
||||
|
||||
---
|
||||
|
||||
**Step 8: Final commit and completion**
|
||||
|
||||
Stage and commit quick task artifacts:
|
||||
|
||||
```bash
|
||||
# Stage quick task artifacts
|
||||
git add ${QUICK_DIR}/${next_num}-PLAN.md
|
||||
git add ${QUICK_DIR}/${next_num}-SUMMARY.md
|
||||
git add .planning/STATE.md
|
||||
|
||||
# Commit with quick task format
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs(quick-${next_num}): ${DESCRIPTION}
|
||||
|
||||
Quick task completed.
|
||||
|
||||
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Get final commit hash:
|
||||
```bash
|
||||
commit_hash=$(git rev-parse --short HEAD)
|
||||
```
|
||||
|
||||
Display completion output:
|
||||
```
|
||||
---
|
||||
|
||||
GSD > QUICK TASK COMPLETE
|
||||
|
||||
Quick Task ${next_num}: ${DESCRIPTION}
|
||||
|
||||
Summary: ${QUICK_DIR}/${next_num}-SUMMARY.md
|
||||
Commit: ${commit_hash}
|
||||
|
||||
---
|
||||
|
||||
Ready for next task: /gsd:quick
|
||||
```
|
||||
|
||||
Execute the quick workflow from @~/.claude/get-shit-done/workflows/quick.md end-to-end.
|
||||
Preserve all workflow gates (validation, task description, planning, execution, state updates, commits).
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] ROADMAP.md validation passes
|
||||
- [ ] User provides task description
|
||||
- [ ] Slug generated (lowercase, hyphens, max 40 chars)
|
||||
- [ ] Next number calculated (001, 002, 003...)
|
||||
- [ ] Directory created at `.planning/quick/NNN-slug/`
|
||||
- [ ] `${next_num}-PLAN.md` created by planner
|
||||
- [ ] `${next_num}-SUMMARY.md` created by executor
|
||||
- [ ] STATE.md updated with quick task row
|
||||
- [ ] Artifacts committed
|
||||
</success_criteria>
|
||||
|
||||
@@ -8,7 +8,6 @@ allowed-tools:
|
||||
- Bash
|
||||
- Glob
|
||||
---
|
||||
|
||||
<objective>
|
||||
Remove an unstarted future phase from the roadmap and renumber all subsequent phases to maintain a clean, linear sequence.
|
||||
|
||||
@@ -17,333 +16,17 @@ Output: Phase deleted, all subsequent phases renumbered, git commit as historica
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
@~/.claude/get-shit-done/workflows/remove-phase.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
Phase: $ARGUMENTS
|
||||
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="parse_arguments">
|
||||
Parse the command arguments:
|
||||
- Argument is the phase number to remove (integer or decimal)
|
||||
- Example: `/gsd:remove-phase 17` → phase = 17
|
||||
- Example: `/gsd:remove-phase 16.1` → phase = 16.1
|
||||
|
||||
If no argument provided:
|
||||
|
||||
```
|
||||
ERROR: Phase number required
|
||||
Usage: /gsd:remove-phase <phase-number>
|
||||
Example: /gsd:remove-phase 17
|
||||
```
|
||||
|
||||
Exit.
|
||||
</step>
|
||||
|
||||
<step name="load_state">
|
||||
Load project state:
|
||||
|
||||
```bash
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
cat .planning/ROADMAP.md 2>/dev/null
|
||||
```
|
||||
|
||||
Parse current phase number from STATE.md "Current Position" section.
|
||||
</step>
|
||||
|
||||
<step name="validate_phase_exists">
|
||||
Verify the target phase exists in ROADMAP.md:
|
||||
|
||||
1. Search for `### Phase {target}:` heading
|
||||
2. If not found:
|
||||
|
||||
```
|
||||
ERROR: Phase {target} not found in roadmap
|
||||
Available phases: [list phase numbers]
|
||||
```
|
||||
|
||||
Exit.
|
||||
</step>
|
||||
|
||||
<step name="validate_future_phase">
|
||||
Verify the phase is a future phase (not started):
|
||||
|
||||
1. Compare target phase to current phase from STATE.md
|
||||
2. Target must be > current phase number
|
||||
|
||||
If target <= current phase:
|
||||
|
||||
```
|
||||
ERROR: Cannot remove Phase {target}
|
||||
|
||||
Only future phases can be removed:
|
||||
- Current phase: {current}
|
||||
- Phase {target} is current or completed
|
||||
|
||||
To abandon current work, use /gsd:pause-work instead.
|
||||
```
|
||||
|
||||
Exit.
|
||||
|
||||
3. Check for SUMMARY.md files in phase directory:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/{target}-*/*-SUMMARY.md 2>/dev/null
|
||||
```
|
||||
|
||||
If any SUMMARY.md files exist:
|
||||
|
||||
```
|
||||
ERROR: Phase {target} has completed work
|
||||
|
||||
Found executed plans:
|
||||
- {list of SUMMARY.md files}
|
||||
|
||||
Cannot remove phases with completed work.
|
||||
```
|
||||
|
||||
Exit.
|
||||
</step>
|
||||
|
||||
<step name="gather_phase_info">
|
||||
Collect information about the phase being removed:
|
||||
|
||||
1. Extract phase name from ROADMAP.md heading: `### Phase {target}: {Name}`
|
||||
2. Find phase directory: `.planning/phases/{target}-{slug}/`
|
||||
3. Find all subsequent phases (integer and decimal) that need renumbering
|
||||
|
||||
**Subsequent phase detection:**
|
||||
|
||||
For integer phase removal (e.g., 17):
|
||||
- Find all phases > 17 (integers: 18, 19, 20...)
|
||||
- Find all decimal phases >= 17.0 and < 18.0 (17.1, 17.2...) → these become 16.x
|
||||
- Find all decimal phases for subsequent integers (18.1, 19.1...) → renumber with their parent
|
||||
|
||||
For decimal phase removal (e.g., 17.1):
|
||||
- Find all decimal phases > 17.1 and < 18 (17.2, 17.3...) → renumber down
|
||||
- Integer phases unchanged
|
||||
|
||||
List all phases that will be renumbered.
|
||||
</step>
|
||||
|
||||
<step name="confirm_removal">
|
||||
Present removal summary and confirm:
|
||||
|
||||
```
|
||||
Removing Phase {target}: {Name}
|
||||
|
||||
This will:
|
||||
- Delete: .planning/phases/{target}-{slug}/
|
||||
- Renumber {N} subsequent phases:
|
||||
- Phase 18 → Phase 17
|
||||
- Phase 18.1 → Phase 17.1
|
||||
- Phase 19 → Phase 18
|
||||
[etc.]
|
||||
|
||||
Proceed? (y/n)
|
||||
```
|
||||
|
||||
Wait for confirmation.
|
||||
</step>
|
||||
|
||||
<step name="delete_phase_directory">
|
||||
Delete the target phase directory if it exists:
|
||||
|
||||
```bash
|
||||
if [ -d ".planning/phases/{target}-{slug}" ]; then
|
||||
rm -rf ".planning/phases/{target}-{slug}"
|
||||
echo "Deleted: .planning/phases/{target}-{slug}/"
|
||||
fi
|
||||
```
|
||||
|
||||
If directory doesn't exist, note: "No directory to delete (phase not yet created)"
|
||||
</step>
|
||||
|
||||
<step name="renumber_directories">
|
||||
Rename all subsequent phase directories:
|
||||
|
||||
For each phase directory that needs renumbering (in reverse order to avoid conflicts):
|
||||
|
||||
```bash
|
||||
# Example: renaming 18-dashboard to 17-dashboard
|
||||
mv ".planning/phases/18-dashboard" ".planning/phases/17-dashboard"
|
||||
```
|
||||
|
||||
Process in descending order (20→19, then 19→18, then 18→17) to avoid overwriting.
|
||||
|
||||
Also rename decimal phase directories:
|
||||
- `17.1-fix-bug` → `16.1-fix-bug` (if removing integer 17)
|
||||
- `17.2-hotfix` → `17.1-hotfix` (if removing decimal 17.1)
|
||||
</step>
|
||||
|
||||
<step name="rename_files_in_directories">
|
||||
Rename plan files inside renumbered directories:
|
||||
|
||||
For each renumbered directory, rename files that contain the phase number:
|
||||
|
||||
```bash
|
||||
# Inside 17-dashboard (was 18-dashboard):
|
||||
mv "18-01-PLAN.md" "17-01-PLAN.md"
|
||||
mv "18-02-PLAN.md" "17-02-PLAN.md"
|
||||
mv "18-01-SUMMARY.md" "17-01-SUMMARY.md" # if exists
|
||||
# etc.
|
||||
```
|
||||
|
||||
Also handle CONTEXT.md and DISCOVERY.md (these don't have phase prefixes, so no rename needed).
|
||||
</step>
|
||||
|
||||
<step name="update_roadmap">
|
||||
Update ROADMAP.md:
|
||||
|
||||
1. **Remove the phase section entirely:**
|
||||
- Delete from `### Phase {target}:` to the next phase heading (or section end)
|
||||
|
||||
2. **Remove from phase list:**
|
||||
- Delete line `- [ ] **Phase {target}: {Name}**` or similar
|
||||
|
||||
3. **Remove from Progress table:**
|
||||
- Delete the row for Phase {target}
|
||||
|
||||
4. **Renumber all subsequent phases:**
|
||||
- `### Phase 18:` → `### Phase 17:`
|
||||
- `- [ ] **Phase 18:` → `- [ ] **Phase 17:`
|
||||
- Table rows: `| 18. Dashboard |` → `| 17. Dashboard |`
|
||||
- Plan references: `18-01:` → `17-01:`
|
||||
|
||||
5. **Update dependency references:**
|
||||
- `**Depends on:** Phase 18` → `**Depends on:** Phase 17`
|
||||
- For the phase that depended on the removed phase:
|
||||
- `**Depends on:** Phase 17` (removed) → `**Depends on:** Phase 16`
|
||||
|
||||
6. **Renumber decimal phases:**
|
||||
- `### Phase 17.1:` → `### Phase 16.1:` (if integer 17 removed)
|
||||
- Update all references consistently
|
||||
|
||||
Write updated ROADMAP.md.
|
||||
</step>
|
||||
|
||||
<step name="update_state">
|
||||
Update STATE.md:
|
||||
|
||||
1. **Update total phase count:**
|
||||
- `Phase: 16 of 20` → `Phase: 16 of 19`
|
||||
|
||||
2. **Recalculate progress percentage:**
|
||||
- New percentage based on completed plans / new total plans
|
||||
|
||||
Do NOT add a "Roadmap Evolution" note - the git commit is the record.
|
||||
|
||||
Write updated STATE.md.
|
||||
</step>
|
||||
|
||||
<step name="update_file_contents">
|
||||
Search for and update phase references inside plan files:
|
||||
|
||||
```bash
|
||||
# Find files that reference the old phase numbers
|
||||
grep -r "Phase 18" .planning/phases/17-*/ 2>/dev/null
|
||||
grep -r "Phase 19" .planning/phases/18-*/ 2>/dev/null
|
||||
# etc.
|
||||
```
|
||||
|
||||
Update any internal references to reflect new numbering.
|
||||
</step>
|
||||
|
||||
<step name="commit">
|
||||
Stage and commit the removal:
|
||||
|
||||
**Check planning config:**
|
||||
|
||||
```bash
|
||||
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
||||
```
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
||||
|
||||
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
||||
|
||||
```bash
|
||||
git add .planning/
|
||||
git commit -m "chore: remove phase {target} ({original-phase-name})"
|
||||
```
|
||||
|
||||
The commit message preserves the historical record of what was removed.
|
||||
</step>
|
||||
|
||||
<step name="completion">
|
||||
Present completion summary:
|
||||
|
||||
```
|
||||
Phase {target} ({original-name}) removed.
|
||||
|
||||
Changes:
|
||||
- Deleted: .planning/phases/{target}-{slug}/
|
||||
- Renumbered: Phases {first-renumbered}-{last-old} → {first-renumbered-1}-{last-new}
|
||||
- Updated: ROADMAP.md, STATE.md
|
||||
- Committed: chore: remove phase {target} ({original-name})
|
||||
|
||||
Current roadmap: {total-remaining} phases
|
||||
Current position: Phase {current} of {new-total}
|
||||
|
||||
---
|
||||
|
||||
## What's Next
|
||||
|
||||
Would you like to:
|
||||
- `/gsd:progress` — see updated roadmap status
|
||||
- Continue with current phase
|
||||
- Review roadmap
|
||||
|
||||
---
|
||||
```
|
||||
</step>
|
||||
|
||||
Execute the remove-phase workflow from @~/.claude/get-shit-done/workflows/remove-phase.md end-to-end.
|
||||
Preserve all validation gates (future phase check, work check), renumbering logic, and commit.
|
||||
</process>
|
||||
|
||||
<anti_patterns>
|
||||
|
||||
- Don't remove completed phases (have SUMMARY.md files)
|
||||
- Don't remove current or past phases
|
||||
- Don't leave gaps in numbering - always renumber
|
||||
- Don't add "removed phase" notes to STATE.md - git commit is the record
|
||||
- Don't ask about each decimal phase - just renumber them
|
||||
- Don't modify completed phase directories
|
||||
</anti_patterns>
|
||||
|
||||
<edge_cases>
|
||||
|
||||
**Removing a decimal phase (e.g., 17.1):**
|
||||
- Only affects other decimals in same series (17.2 → 17.1, 17.3 → 17.2)
|
||||
- Integer phases unchanged
|
||||
- Simpler operation
|
||||
|
||||
**No subsequent phases to renumber:**
|
||||
- Removing the last phase (e.g., Phase 20 when that's the end)
|
||||
- Just delete and update ROADMAP.md, no renumbering needed
|
||||
|
||||
**Phase directory doesn't exist:**
|
||||
- Phase may be in ROADMAP.md but directory not created yet
|
||||
- Skip directory deletion, proceed with ROADMAP.md updates
|
||||
|
||||
**Decimal phases under removed integer:**
|
||||
- Removing Phase 17 when 17.1, 17.2 exist
|
||||
- 17.1 → 16.1, 17.2 → 16.2
|
||||
- They maintain their position in execution order (after current last integer)
|
||||
|
||||
</edge_cases>
|
||||
|
||||
<success_criteria>
|
||||
Phase removal is complete when:
|
||||
|
||||
- [ ] Target phase validated as future/unstarted
|
||||
- [ ] Phase directory deleted (if existed)
|
||||
- [ ] All subsequent phase directories renumbered
|
||||
- [ ] Files inside directories renamed ({old}-01-PLAN.md → {new}-01-PLAN.md)
|
||||
- [ ] ROADMAP.md updated (section removed, all references renumbered)
|
||||
- [ ] STATE.md updated (phase count, progress percentage)
|
||||
- [ ] Dependency references updated in subsequent phases
|
||||
- [ ] Changes committed with descriptive message
|
||||
- [ ] No gaps in phase numbering
|
||||
- [ ] User informed of changes
|
||||
</success_criteria>
|
||||
|
||||
@@ -33,33 +33,16 @@ Normalize phase input in step 1 before any directory lookups.
|
||||
|
||||
## 0. Resolve Model Profile
|
||||
|
||||
Read model profile for agent spawning:
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
RESEARCHER_MODEL=$(node ~/.claude/get-shit-done/bin/gsd-tools.js resolve-model gsd-phase-researcher --raw)
|
||||
```
|
||||
|
||||
Default to "balanced" if not set.
|
||||
|
||||
**Model lookup table:**
|
||||
|
||||
| Agent | quality | balanced | budget |
|
||||
|-------|---------|----------|--------|
|
||||
| gsd-phase-researcher | opus | sonnet | haiku |
|
||||
|
||||
Store resolved model for use in Task calls below.
|
||||
|
||||
## 1. Normalize and Validate Phase
|
||||
|
||||
```bash
|
||||
# Normalize phase number (8 → 08, but preserve decimals like 2.1 → 02.1)
|
||||
if [[ "$ARGUMENTS" =~ ^[0-9]+$ ]]; then
|
||||
PHASE=$(printf "%02d" "$ARGUMENTS")
|
||||
elif [[ "$ARGUMENTS" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
|
||||
PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
|
||||
else
|
||||
PHASE="$ARGUMENTS"
|
||||
fi
|
||||
PHASE_INFO=$(node ~/.claude/get-shit-done/bin/gsd-tools.js find-phase "$ARGUMENTS")
|
||||
PHASE_DIR=$(echo "$PHASE_INFO" | grep -o '"directory":"[^"]*"' | cut -d'"' -f4)
|
||||
PHASE=$(echo "$PHASE_INFO" | grep -o '"phase_number":"[^"]*"' | cut -d'"' -f4)
|
||||
|
||||
grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
|
||||
```
|
||||
|
||||
@@ -11,7 +11,6 @@ allowed-tools:
|
||||
- Write
|
||||
- Task
|
||||
---
|
||||
|
||||
<objective>
|
||||
Validate built features through conversational testing with persistent state.
|
||||
|
||||
@@ -35,185 +34,6 @@ Phase: $ARGUMENTS (optional)
|
||||
</context>
|
||||
|
||||
<process>
|
||||
1. Check for active UAT sessions (resume or start new)
|
||||
2. Find SUMMARY.md files for the phase
|
||||
3. Extract testable deliverables (user-observable outcomes)
|
||||
4. Create {phase}-UAT.md with test list
|
||||
5. Present tests one at a time:
|
||||
- Show expected behavior
|
||||
- Wait for plain text response
|
||||
- "yes/y/next" = pass, anything else = issue (severity inferred)
|
||||
6. Update UAT.md after each response
|
||||
7. On completion: commit, present summary
|
||||
8. If issues found:
|
||||
- Spawn parallel debug agents to diagnose root causes
|
||||
- Spawn gsd-planner in --gaps mode to create fix plans
|
||||
- Spawn gsd-plan-checker to verify fix plans
|
||||
- Iterate planner ↔ checker until plans pass (max 3)
|
||||
- Present ready status with `/clear` then `/gsd:execute-phase`
|
||||
Execute the verify-work workflow from @~/.claude/get-shit-done/workflows/verify-work.md end-to-end.
|
||||
Preserve all workflow gates (session management, test presentation, diagnosis, fix planning, routing).
|
||||
</process>
|
||||
|
||||
<anti_patterns>
|
||||
- Don't use AskUserQuestion for test responses — plain text conversation
|
||||
- Don't ask severity — infer from description
|
||||
- Don't present full checklist upfront — one test at a time
|
||||
- Don't run automated tests — this is manual user validation
|
||||
- Don't fix issues during testing — log as gaps, diagnose after all tests complete
|
||||
</anti_patterns>
|
||||
|
||||
<offer_next>
|
||||
Output this markdown directly (not as a code block). Route based on UAT results:
|
||||
|
||||
| Status | Route |
|
||||
|--------|-------|
|
||||
| All tests pass + more phases | Route A (next phase) |
|
||||
| All tests pass + last phase | Route B (milestone complete) |
|
||||
| Issues found + fix plans ready | Route C (execute fixes) |
|
||||
| Issues found + planning blocked | Route D (manual intervention) |
|
||||
|
||||
---
|
||||
|
||||
**Route A: All tests pass, more phases remain**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {Z} VERIFIED ✓
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {Z}: {Name}**
|
||||
|
||||
{N}/{N} tests passed
|
||||
UAT complete ✓
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
|
||||
|
||||
/gsd:discuss-phase {Z+1} — gather context and clarify approach
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- /gsd:plan-phase {Z+1} — skip discussion, plan directly
|
||||
- /gsd:execute-phase {Z+1} — skip to execution (if already planned)
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**Route B: All tests pass, milestone complete**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {Z} VERIFIED ✓
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {Z}: {Name}**
|
||||
|
||||
{N}/{N} tests passed
|
||||
Final phase verified ✓
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Audit milestone** — verify requirements, cross-phase integration, E2E flows
|
||||
|
||||
/gsd:audit-milestone
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- /gsd:complete-milestone — skip audit, archive directly
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**Route C: Issues found, fix plans ready**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {Z} ISSUES FOUND ⚠
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {Z}: {Name}**
|
||||
|
||||
{N}/{M} tests passed
|
||||
{X} issues diagnosed
|
||||
Fix plans verified ✓
|
||||
|
||||
### Issues Found
|
||||
|
||||
{List issues with severity from UAT.md}
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Execute fix plans** — run diagnosed fixes
|
||||
|
||||
/gsd:execute-phase {Z} --gaps-only
|
||||
|
||||
<sub>/clear first → fresh context window</sub>
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Also available:**
|
||||
- cat .planning/phases/{phase_dir}/*-PLAN.md — review fix plans
|
||||
- /gsd:plan-phase {Z} --gaps — regenerate fix plans
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
---
|
||||
|
||||
**Route D: Issues found, planning blocked**
|
||||
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
GSD ► PHASE {Z} BLOCKED ✗
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
**Phase {Z}: {Name}**
|
||||
|
||||
{N}/{M} tests passed
|
||||
Fix planning blocked after {X} iterations
|
||||
|
||||
### Unresolved Issues
|
||||
|
||||
{List blocking issues from planner/checker output}
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Manual intervention required**
|
||||
|
||||
Review the issues above and either:
|
||||
1. Provide guidance for fix planning
|
||||
2. Manually address blockers
|
||||
3. Accept current state and continue
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
|
||||
**Options:**
|
||||
- /gsd:plan-phase {Z} --gaps — retry fix planning with guidance
|
||||
- /gsd:discuss-phase {Z} — gather more context before replanning
|
||||
|
||||
───────────────────────────────────────────────────────────────
|
||||
</offer_next>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] UAT.md created with tests from SUMMARY.md
|
||||
- [ ] Tests presented one at a time with expected behavior
|
||||
- [ ] Plain text responses (no structured forms)
|
||||
- [ ] Severity inferred, never asked
|
||||
- [ ] Batched writes: on issue, every 5 passes, or completion
|
||||
- [ ] Committed on completion
|
||||
- [ ] If issues: parallel debug agents diagnose root causes
|
||||
- [ ] If issues: gsd-planner creates fix plans from diagnosed gaps
|
||||
- [ ] If issues: gsd-plan-checker verifies fix plans (max 3 iterations)
|
||||
- [ ] Ready for `/gsd:execute-phase` when complete
|
||||
</success_criteria>
|
||||
|
||||
Reference in New Issue
Block a user