@undeemed/get-shit-done-codex 1.6.11 → 1.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -3
- package/agents/gsd-codebase-mapper.md +761 -0
- package/agents/gsd-debugger.md +1198 -0
- package/agents/gsd-executor.md +419 -0
- package/agents/gsd-integration-checker.md +423 -0
- package/agents/gsd-phase-researcher.md +469 -0
- package/agents/gsd-plan-checker.md +622 -0
- package/agents/gsd-planner.md +1159 -0
- package/agents/gsd-project-researcher.md +618 -0
- package/agents/gsd-research-synthesizer.md +236 -0
- package/agents/gsd-roadmapper.md +639 -0
- package/agents/gsd-verifier.md +541 -0
- package/bin/install.js +106 -100
- package/commands/gsd/add-phase.md +17 -185
- package/commands/gsd/add-todo.md +23 -163
- package/commands/gsd/audit-milestone.md +3 -219
- package/commands/gsd/check-todos.md +20 -196
- package/commands/gsd/cleanup.md +18 -0
- package/commands/gsd/debug.md +13 -0
- package/commands/gsd/discuss-phase.md +10 -3
- package/commands/gsd/execute-phase.md +3 -265
- package/commands/gsd/health.md +22 -0
- package/commands/gsd/help.md +8 -369
- package/commands/gsd/insert-phase.md +9 -203
- package/commands/gsd/join-discord.md +18 -0
- package/commands/gsd/new-milestone.md +12 -678
- package/commands/gsd/new-project.md +8 -862
- package/commands/gsd/new-project.md.bak +1041 -0
- package/commands/gsd/pause-work.md +17 -105
- package/commands/gsd/plan-milestone-gaps.md +3 -247
- package/commands/gsd/plan-phase.md +13 -444
- package/commands/gsd/progress.md +5 -337
- package/commands/gsd/quick.md +40 -0
- package/commands/gsd/reapply-patches.md +110 -0
- package/commands/gsd/remove-phase.md +9 -315
- package/commands/gsd/research-phase.md +26 -19
- package/commands/gsd/set-profile.md +34 -0
- package/commands/gsd/settings.md +36 -0
- package/commands/gsd/update.md +25 -160
- package/commands/gsd/verify-work.md +3 -183
- package/get-shit-done/bin/gsd-tools.cjs +5243 -0
- package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
- package/get-shit-done/references/checkpoints.md +254 -267
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +3 -9
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +34 -0
- package/get-shit-done/references/model-profiles.md +92 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +196 -0
- package/get-shit-done/references/questioning.md +4 -0
- package/get-shit-done/references/verification-patterns.md +17 -0
- package/get-shit-done/templates/UAT.md +1 -1
- package/get-shit-done/templates/codebase/structure.md +3 -3
- package/get-shit-done/templates/config.json +10 -0
- package/get-shit-done/templates/context.md +2 -10
- package/get-shit-done/templates/phase-prompt.md +18 -27
- package/get-shit-done/templates/planner-subagent-prompt.md +4 -4
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
- package/get-shit-done/templates/research.md +25 -2
- package/get-shit-done/templates/state.md +0 -30
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +5 -28
- package/get-shit-done/templates/user-setup.md +1 -13
- package/get-shit-done/templates/verification-report.md +1 -1
- package/get-shit-done/workflows/add-phase.md +111 -0
- package/get-shit-done/workflows/add-todo.md +157 -0
- package/get-shit-done/workflows/audit-milestone.md +242 -0
- package/get-shit-done/workflows/check-todos.md +176 -0
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +225 -301
- package/get-shit-done/workflows/diagnose-issues.md +3 -17
- package/get-shit-done/workflows/discovery-phase.md +6 -10
- package/get-shit-done/workflows/discuss-phase.md +99 -36
- package/get-shit-done/workflows/execute-phase.md +205 -349
- package/get-shit-done/workflows/execute-plan.md +179 -1569
- package/get-shit-done/workflows/health.md +156 -0
- package/get-shit-done/workflows/help.md +486 -0
- package/get-shit-done/workflows/insert-phase.md +129 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
- package/get-shit-done/workflows/map-codebase.md +55 -17
- package/get-shit-done/workflows/new-milestone.md +373 -0
- package/get-shit-done/workflows/new-project.md +1113 -0
- package/get-shit-done/workflows/pause-work.md +122 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
- package/get-shit-done/workflows/plan-phase.md +448 -0
- package/get-shit-done/workflows/progress.md +393 -0
- package/get-shit-done/workflows/quick.md +444 -0
- package/get-shit-done/workflows/remove-phase.md +154 -0
- package/get-shit-done/workflows/research-phase.md +74 -0
- package/get-shit-done/workflows/resume-project.md +18 -23
- package/get-shit-done/workflows/set-profile.md +80 -0
- package/get-shit-done/workflows/settings.md +200 -0
- package/get-shit-done/workflows/transition.md +78 -103
- package/get-shit-done/workflows/update.md +214 -0
- package/get-shit-done/workflows/verify-phase.md +107 -494
- package/get-shit-done/workflows/verify-work.md +18 -11
- package/hooks/dist/gsd-check-update.js +66 -0
- package/hooks/dist/gsd-statusline.js +91 -0
- package/package.json +19 -3
- package/scripts/build-hooks.js +42 -0
- package/commands/gsd/whats-new.md +0 -124
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
Execute all plans in a phase using wave-based parallel execution. Orchestrator stays lean
|
|
2
|
+
Execute all plans in a phase using wave-based parallel execution. Orchestrator stays lean — delegates plan execution to subagents.
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<core_principle>
|
|
6
|
-
|
|
6
|
+
Orchestrator coordinates, not executes. Each subagent loads the full execute-plan context. Orchestrator: discover plans → analyze deps → group waves → spawn agents → handle checkpoints → collect results.
|
|
7
7
|
</core_principle>
|
|
8
8
|
|
|
9
9
|
<required_reading>
|
|
@@ -12,106 +12,53 @@ Read STATE.md before any operation to load project context.
|
|
|
12
12
|
|
|
13
13
|
<process>
|
|
14
14
|
|
|
15
|
-
<step name="
|
|
16
|
-
|
|
15
|
+
<step name="initialize" priority="first">
|
|
16
|
+
Load all context in one call:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE_ARG}")
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
- Current position (phase, plan, status)
|
|
24
|
-
- Accumulated decisions (constraints on this execution)
|
|
25
|
-
- Blockers/concerns (things to watch for)
|
|
22
|
+
Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`.
|
|
26
23
|
|
|
27
|
-
**If
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Options:
|
|
31
|
-
1. Reconstruct from existing artifacts
|
|
32
|
-
2. Continue without project state (may lose accumulated context)
|
|
33
|
-
```
|
|
24
|
+
**If `phase_found` is false:** Error — phase directory not found.
|
|
25
|
+
**If `plan_count` is 0:** Error — no plans found in phase.
|
|
26
|
+
**If `state_exists` is false but `.planning/` exists:** Offer reconstruct or continue.
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
When `parallelization` is false, plans within a wave execute sequentially.
|
|
36
29
|
</step>
|
|
37
30
|
|
|
38
|
-
<step name="
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# Match both zero-padded (05-*) and unpadded (5-*) folders
|
|
43
|
-
PADDED_PHASE=$(printf "%02d" ${PHASE_ARG} 2>/dev/null || echo "${PHASE_ARG}")
|
|
44
|
-
PHASE_DIR=$(ls -d .planning/phases/${PADDED_PHASE}-* .planning/phases/${PHASE_ARG}-* 2>/dev/null | head -1)
|
|
45
|
-
if [ -z "$PHASE_DIR" ]; then
|
|
46
|
-
echo "ERROR: No phase directory matching '${PHASE_ARG}'"
|
|
47
|
-
exit 1
|
|
48
|
-
fi
|
|
49
|
-
|
|
50
|
-
PLAN_COUNT=$(ls -1 "$PHASE_DIR"/*-PLAN.md 2>/dev/null | wc -l | tr -d ' ')
|
|
51
|
-
if [ "$PLAN_COUNT" -eq 0 ]; then
|
|
52
|
-
echo "ERROR: No plans found in $PHASE_DIR"
|
|
53
|
-
exit 1
|
|
54
|
-
fi
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Report: "Found {N} plans in {phase_dir}"
|
|
58
|
-
</step>
|
|
31
|
+
<step name="handle_branching">
|
|
32
|
+
Check `branching_strategy` from init:
|
|
59
33
|
|
|
60
|
-
|
|
61
|
-
List all plans and extract metadata:
|
|
34
|
+
**"none":** Skip, continue on current branch.
|
|
62
35
|
|
|
36
|
+
**"phase" or "milestone":** Use pre-computed `branch_name` from init:
|
|
63
37
|
```bash
|
|
64
|
-
|
|
65
|
-
ls -1 "$PHASE_DIR"/*-PLAN.md 2>/dev/null | sort
|
|
66
|
-
|
|
67
|
-
# Get completed plans (have SUMMARY.md)
|
|
68
|
-
ls -1 "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null | sort
|
|
38
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
|
|
69
39
|
```
|
|
70
40
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- `autonomous: true/false` - Whether plan has checkpoints
|
|
74
|
-
- `gap_closure: true/false` - Whether plan closes gaps from verification/UAT
|
|
75
|
-
|
|
76
|
-
Build plan inventory:
|
|
77
|
-
- Plan path
|
|
78
|
-
- Plan ID (e.g., "03-01")
|
|
79
|
-
- Wave number
|
|
80
|
-
- Autonomous flag
|
|
81
|
-
- Gap closure flag
|
|
82
|
-
- Completion status (SUMMARY exists = complete)
|
|
41
|
+
All subsequent commits go to this branch. User handles merging.
|
|
42
|
+
</step>
|
|
83
43
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- If `--gaps-only` flag: also skip plans where `gap_closure` is not `true`
|
|
44
|
+
<step name="validate_phase">
|
|
45
|
+
From init JSON: `phase_dir`, `plan_count`, `incomplete_count`.
|
|
87
46
|
|
|
88
|
-
|
|
47
|
+
Report: "Found {plan_count} plans in {phase_dir} ({incomplete_count} incomplete)"
|
|
89
48
|
</step>
|
|
90
49
|
|
|
91
|
-
<step name="
|
|
92
|
-
|
|
50
|
+
<step name="discover_and_group_plans">
|
|
51
|
+
Load plan inventory with wave grouping in one call:
|
|
93
52
|
|
|
94
53
|
```bash
|
|
95
|
-
|
|
96
|
-
for plan in $PHASE_DIR/*-PLAN.md; do
|
|
97
|
-
wave=$(grep "^wave:" "$plan" | cut -d: -f2 | tr -d ' ')
|
|
98
|
-
autonomous=$(grep "^autonomous:" "$plan" | cut -d: -f2 | tr -d ' ')
|
|
99
|
-
echo "$plan:$wave:$autonomous"
|
|
100
|
-
done
|
|
54
|
+
PLAN_INDEX=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs phase-plan-index "${PHASE_NUMBER}")
|
|
101
55
|
```
|
|
102
56
|
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
waves = {
|
|
106
|
-
1: [plan-01, plan-02],
|
|
107
|
-
2: [plan-03, plan-04],
|
|
108
|
-
3: [plan-05]
|
|
109
|
-
}
|
|
110
|
-
```
|
|
57
|
+
Parse JSON for: `phase`, `plans[]` (each with `id`, `wave`, `autonomous`, `objective`, `files_modified`, `task_count`, `has_summary`), `waves` (map of wave number → plan IDs), `incomplete`, `has_checkpoints`.
|
|
111
58
|
|
|
112
|
-
**
|
|
59
|
+
**Filtering:** Skip plans where `has_summary: true`. If `--gaps-only`: also skip non-gap_closure plans. If all filtered: "No matching incomplete plans" → exit.
|
|
113
60
|
|
|
114
|
-
Report
|
|
61
|
+
Report:
|
|
115
62
|
```
|
|
116
63
|
## Execution Plan
|
|
117
64
|
|
|
@@ -119,434 +66,343 @@ Report wave structure with context:
|
|
|
119
66
|
|
|
120
67
|
| Wave | Plans | What it builds |
|
|
121
68
|
|------|-------|----------------|
|
|
122
|
-
| 1 | 01-01, 01-02 | {from plan objectives} |
|
|
123
|
-
| 2 | 01-03 |
|
|
124
|
-
| 3 | 01-04 [checkpoint] | {from plan objectives} |
|
|
125
|
-
|
|
69
|
+
| 1 | 01-01, 01-02 | {from plan objectives, 3-8 words} |
|
|
70
|
+
| 2 | 01-03 | ... |
|
|
126
71
|
```
|
|
127
|
-
|
|
128
|
-
The "What it builds" column comes from skimming plan names/objectives. Keep it brief (3-8 words).
|
|
129
72
|
</step>
|
|
130
73
|
|
|
131
74
|
<step name="execute_waves">
|
|
132
|
-
Execute each wave in sequence.
|
|
75
|
+
Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`, sequential if `false`.
|
|
133
76
|
|
|
134
77
|
**For each wave:**
|
|
135
78
|
|
|
136
79
|
1. **Describe what's being built (BEFORE spawning):**
|
|
137
80
|
|
|
138
|
-
Read each plan's `<objective
|
|
81
|
+
Read each plan's `<objective>`. Extract what's being built and why.
|
|
139
82
|
|
|
140
|
-
**Output:**
|
|
141
83
|
```
|
|
142
84
|
---
|
|
143
|
-
|
|
144
85
|
## Wave {N}
|
|
145
86
|
|
|
146
87
|
**{Plan ID}: {Plan Name}**
|
|
147
|
-
{2-3 sentences: what this builds,
|
|
148
|
-
|
|
149
|
-
**{Plan ID}: {Plan Name}** (if parallel)
|
|
150
|
-
{same format}
|
|
88
|
+
{2-3 sentences: what this builds, technical approach, why it matters}
|
|
151
89
|
|
|
152
90
|
Spawning {count} agent(s)...
|
|
153
|
-
|
|
154
91
|
---
|
|
155
92
|
```
|
|
156
93
|
|
|
157
|
-
**Examples:**
|
|
158
94
|
- Bad: "Executing terrain generation plan"
|
|
159
95
|
- Good: "Procedural terrain generator using Perlin noise — creates height maps, biome zones, and collision meshes. Required before vehicle physics can interact with ground."
|
|
160
96
|
|
|
161
|
-
2. **Spawn
|
|
97
|
+
2. **Spawn executor agents:**
|
|
162
98
|
|
|
163
|
-
|
|
99
|
+
Pass paths only — executors read files themselves with their fresh 200k context.
|
|
100
|
+
This keeps orchestrator context lean (~10-15%).
|
|
164
101
|
|
|
165
102
|
```
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
103
|
+
Task(
|
|
104
|
+
subagent_type="gsd-executor",
|
|
105
|
+
model="{executor_model}",
|
|
106
|
+
prompt="
|
|
107
|
+
<objective>
|
|
108
|
+
Execute plan {plan_number} of phase {phase_number}-{phase_name}.
|
|
109
|
+
Commit each task atomically. Create SUMMARY.md. Update STATE.md.
|
|
110
|
+
</objective>
|
|
111
|
+
|
|
112
|
+
<execution_context>
|
|
113
|
+
@~/.claude/get-shit-done/workflows/execute-plan.md
|
|
114
|
+
@~/.claude/get-shit-done/templates/summary.md
|
|
115
|
+
@~/.claude/get-shit-done/references/checkpoints.md
|
|
116
|
+
@~/.claude/get-shit-done/references/tdd.md
|
|
117
|
+
</execution_context>
|
|
118
|
+
|
|
119
|
+
<files_to_read>
|
|
120
|
+
Read these files at execution start using the Read tool:
|
|
121
|
+
- Plan: {phase_dir}/{plan_file}
|
|
122
|
+
- State: .planning/STATE.md
|
|
123
|
+
- Config: .planning/config.json (if exists)
|
|
124
|
+
</files_to_read>
|
|
125
|
+
|
|
126
|
+
<success_criteria>
|
|
127
|
+
- [ ] All tasks executed
|
|
128
|
+
- [ ] Each task committed individually
|
|
129
|
+
- [ ] SUMMARY.md created in plan directory
|
|
130
|
+
- [ ] STATE.md updated with position and decisions
|
|
131
|
+
</success_criteria>
|
|
132
|
+
"
|
|
133
|
+
)
|
|
191
134
|
```
|
|
192
135
|
|
|
193
|
-
|
|
136
|
+
3. **Wait for all agents in wave to complete.**
|
|
194
137
|
|
|
195
|
-
|
|
138
|
+
4. **Report completion — spot-check claims first:**
|
|
196
139
|
|
|
197
|
-
|
|
140
|
+
For each SUMMARY.md:
|
|
141
|
+
- Verify first 2 files from `key-files.created` exist on disk
|
|
142
|
+
- Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
|
|
143
|
+
- Check for `## Self-Check: FAILED` marker
|
|
198
144
|
|
|
199
|
-
|
|
200
|
-
- Verify SUMMARY.md exists at expected path
|
|
201
|
-
- Read SUMMARY.md to extract what was built
|
|
202
|
-
- Note any issues or deviations
|
|
145
|
+
If ANY spot-check fails: report which plan failed, route to failure handler — ask "Retry plan?" or "Continue with remaining waves?"
|
|
203
146
|
|
|
204
|
-
|
|
147
|
+
If pass:
|
|
205
148
|
```
|
|
206
149
|
---
|
|
207
|
-
|
|
208
150
|
## Wave {N} Complete
|
|
209
151
|
|
|
210
152
|
**{Plan ID}: {Plan Name}**
|
|
211
|
-
{What was built — from SUMMARY.md
|
|
212
|
-
{Notable deviations
|
|
213
|
-
|
|
214
|
-
**{Plan ID}: {Plan Name}** (if parallel)
|
|
215
|
-
{same format}
|
|
216
|
-
|
|
217
|
-
{If more waves: brief note on what this enables for next wave}
|
|
153
|
+
{What was built — from SUMMARY.md}
|
|
154
|
+
{Notable deviations, if any}
|
|
218
155
|
|
|
156
|
+
{If more waves: what this enables for next wave}
|
|
219
157
|
---
|
|
220
158
|
```
|
|
221
159
|
|
|
222
|
-
**Examples:**
|
|
223
160
|
- Bad: "Wave 2 complete. Proceeding to Wave 3."
|
|
224
161
|
- Good: "Terrain system complete — 3 biome types, height-based texturing, physics collision meshes. Vehicle physics (Wave 3) can now reference ground surfaces."
|
|
225
162
|
|
|
226
|
-
|
|
163
|
+
5. **Handle failures:**
|
|
227
164
|
|
|
228
|
-
If
|
|
229
|
-
- Report which plan failed and why
|
|
230
|
-
- Ask user: "Continue with remaining waves?" or "Stop execution?"
|
|
231
|
-
- If continue: proceed to next wave (dependent plans may also fail)
|
|
232
|
-
- If stop: exit with partial completion report
|
|
165
|
+
**Known Claude Code bug (classifyHandoffIfNeeded):** If an agent reports "failed" with error containing `classifyHandoffIfNeeded is not defined`, this is a Claude Code runtime bug — not a GSD or agent issue. The error fires in the completion handler AFTER all tool calls finish. In this case: run the same spot-checks as step 4 (SUMMARY.md exists, git commits present, no Self-Check: FAILED). If spot-checks PASS → treat as **successful**. If spot-checks FAIL → treat as real failure below.
|
|
233
166
|
|
|
234
|
-
|
|
167
|
+
For real failures: report which plan failed → ask "Continue?" or "Stop?" → if continue, dependent plans may also fail. If stop, partial completion report.
|
|
235
168
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
6. **Proceed to next wave**
|
|
169
|
+
6. **Execute checkpoint plans between waves** — see `<checkpoint_handling>`.
|
|
239
170
|
|
|
171
|
+
7. **Proceed to next wave.**
|
|
240
172
|
</step>
|
|
241
173
|
|
|
242
174
|
<step name="checkpoint_handling">
|
|
243
175
|
Plans with `autonomous: false` require user interaction.
|
|
244
176
|
|
|
245
|
-
**
|
|
246
|
-
|
|
247
|
-
**Execution flow for checkpoint plans:**
|
|
248
|
-
|
|
249
|
-
1. **Spawn agent for checkpoint plan:**
|
|
250
|
-
```
|
|
251
|
-
Task(prompt="{subagent-task-prompt}", subagent_type="general-purpose")
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
2. **Agent runs until checkpoint:**
|
|
255
|
-
- Executes auto tasks normally
|
|
256
|
-
- Reaches checkpoint task (e.g., `type="checkpoint:human-verify"`) or auth gate
|
|
257
|
-
- Agent returns with structured checkpoint (see checkpoint-return.md template)
|
|
258
|
-
|
|
259
|
-
3. **Agent return includes (structured format):**
|
|
260
|
-
- Completed Tasks table with commit hashes and files
|
|
261
|
-
- Current task name and blocker
|
|
262
|
-
- Checkpoint type and details for user
|
|
263
|
-
- What's awaited from user
|
|
177
|
+
**Flow:**
|
|
264
178
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
179
|
+
1. Spawn agent for checkpoint plan
|
|
180
|
+
2. Agent runs until checkpoint task or auth gate → returns structured state
|
|
181
|
+
3. Agent return includes: completed tasks table, current task + blocker, checkpoint type/details, what's awaited
|
|
182
|
+
4. **Present to user:**
|
|
268
183
|
```
|
|
269
184
|
## Checkpoint: [Type]
|
|
270
185
|
|
|
271
186
|
**Plan:** 03-03 Dashboard Layout
|
|
272
187
|
**Progress:** 2/3 tasks complete
|
|
273
188
|
|
|
274
|
-
[Checkpoint Details
|
|
275
|
-
|
|
189
|
+
[Checkpoint Details from agent return]
|
|
276
190
|
[Awaiting section from agent return]
|
|
277
191
|
```
|
|
192
|
+
5. User responds: "approved"/"done" | issue description | decision selection
|
|
193
|
+
6. **Spawn continuation agent (NOT resume)** using continuation-prompt.md template:
|
|
194
|
+
- `{completed_tasks_table}`: From checkpoint return
|
|
195
|
+
- `{resume_task_number}` + `{resume_task_name}`: Current task
|
|
196
|
+
- `{user_response}`: What user provided
|
|
197
|
+
- `{resume_instructions}`: Based on checkpoint type
|
|
198
|
+
7. Continuation agent verifies previous commits, continues from resume point
|
|
199
|
+
8. Repeat until plan completes or user stops
|
|
278
200
|
|
|
279
|
-
|
|
280
|
-
- "approved" / "done" → spawn continuation agent
|
|
281
|
-
- Description of issues → spawn continuation agent with feedback
|
|
282
|
-
- Decision selection → spawn continuation agent with choice
|
|
283
|
-
|
|
284
|
-
6. **Spawn continuation agent (NOT resume):**
|
|
201
|
+
**Why fresh agent, not resume:** Resume relies on internal serialization that breaks with parallel tool calls. Fresh agents with explicit state are more reliable.
|
|
285
202
|
|
|
286
|
-
|
|
287
|
-
```
|
|
288
|
-
Task(
|
|
289
|
-
prompt=filled_continuation_template,
|
|
290
|
-
subagent_type="general-purpose"
|
|
291
|
-
)
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
Fill template with:
|
|
295
|
-
- `{completed_tasks_table}`: From agent's checkpoint return
|
|
296
|
-
- `{resume_task_number}`: Current task from checkpoint
|
|
297
|
-
- `{resume_task_name}`: Current task name from checkpoint
|
|
298
|
-
- `{user_response}`: What user provided
|
|
299
|
-
- `{resume_instructions}`: Based on checkpoint type (see continuation-prompt.md)
|
|
300
|
-
|
|
301
|
-
7. **Continuation agent executes:**
|
|
302
|
-
- Verifies previous commits exist
|
|
303
|
-
- Continues from resume point
|
|
304
|
-
- May hit another checkpoint (repeat from step 4)
|
|
305
|
-
- Or completes plan
|
|
306
|
-
|
|
307
|
-
8. **Repeat until plan completes or user stops**
|
|
308
|
-
|
|
309
|
-
**Why fresh agent instead of resume:**
|
|
310
|
-
Resume relies on Claude Code's internal serialization which breaks with parallel tool calls.
|
|
311
|
-
Fresh agents with explicit state are more reliable and maintain full context.
|
|
312
|
-
|
|
313
|
-
**Checkpoint in parallel context:**
|
|
314
|
-
If a plan in a parallel wave has a checkpoint:
|
|
315
|
-
- Spawn as normal
|
|
316
|
-
- Agent pauses at checkpoint and returns with structured state
|
|
317
|
-
- Other parallel agents may complete while waiting
|
|
318
|
-
- Present checkpoint to user
|
|
319
|
-
- Spawn continuation agent with user response
|
|
320
|
-
- Wait for all agents to finish before next wave
|
|
203
|
+
**Checkpoints in parallel waves:** Agent pauses and returns while other parallel agents may complete. Present checkpoint, spawn continuation, wait for all before next wave.
|
|
321
204
|
</step>
|
|
322
205
|
|
|
323
206
|
<step name="aggregate_results">
|
|
324
|
-
After all waves
|
|
207
|
+
After all waves:
|
|
325
208
|
|
|
326
209
|
```markdown
|
|
327
210
|
## Phase {X}: {Name} Execution Complete
|
|
328
211
|
|
|
329
|
-
**Waves
|
|
330
|
-
**Plans completed:** {M} of {total}
|
|
331
|
-
|
|
332
|
-
### Wave Summary
|
|
212
|
+
**Waves:** {N} | **Plans:** {M}/{total} complete
|
|
333
213
|
|
|
334
214
|
| Wave | Plans | Status |
|
|
335
215
|
|------|-------|--------|
|
|
336
216
|
| 1 | plan-01, plan-02 | ✓ Complete |
|
|
337
217
|
| CP | plan-03 | ✓ Verified |
|
|
338
218
|
| 2 | plan-04 | ✓ Complete |
|
|
339
|
-
| 3 | plan-05 | ✓ Complete |
|
|
340
219
|
|
|
341
220
|
### Plan Details
|
|
342
|
-
|
|
343
221
|
1. **03-01**: [one-liner from SUMMARY.md]
|
|
344
222
|
2. **03-02**: [one-liner from SUMMARY.md]
|
|
345
|
-
...
|
|
346
223
|
|
|
347
224
|
### Issues Encountered
|
|
348
|
-
[Aggregate from
|
|
225
|
+
[Aggregate from SUMMARYs, or "None"]
|
|
349
226
|
```
|
|
350
227
|
</step>
|
|
351
228
|
|
|
352
|
-
<step name="
|
|
353
|
-
|
|
229
|
+
<step name="close_parent_artifacts">
|
|
230
|
+
**For decimal/polish phases only (X.Y pattern):** Close the feedback loop by resolving parent UAT and debug artifacts.
|
|
354
231
|
|
|
355
|
-
**
|
|
232
|
+
**Skip if** phase number has no decimal (e.g., `3`, `04`) — only applies to gap-closure phases like `4.1`, `03.1`.
|
|
233
|
+
|
|
234
|
+
**1. Detect decimal phase and derive parent:**
|
|
235
|
+
```bash
|
|
236
|
+
# Check if phase_number contains a decimal
|
|
237
|
+
if [[ "$PHASE_NUMBER" == *.* ]]; then
|
|
238
|
+
PARENT_PHASE="${PHASE_NUMBER%%.*}"
|
|
239
|
+
fi
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**2. Find parent UAT file:**
|
|
243
|
+
```bash
|
|
244
|
+
PARENT_INFO=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs find-phase "${PARENT_PHASE}" --raw)
|
|
245
|
+
# Extract directory from PARENT_INFO JSON, then find UAT file in that directory
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**If no parent UAT found:** Skip this step (gap-closure may have been triggered by VERIFICATION.md instead).
|
|
249
|
+
|
|
250
|
+
**3. Update UAT gap statuses:**
|
|
251
|
+
|
|
252
|
+
Read the parent UAT file's `## Gaps` section. For each gap entry with `status: failed`:
|
|
253
|
+
- Update to `status: resolved`
|
|
254
|
+
|
|
255
|
+
**4. Update UAT frontmatter:**
|
|
256
|
+
|
|
257
|
+
If all gaps now have `status: resolved`:
|
|
258
|
+
- Update frontmatter `status: diagnosed` → `status: resolved`
|
|
259
|
+
- Update frontmatter `updated:` timestamp
|
|
260
|
+
|
|
261
|
+
**5. Resolve referenced debug sessions:**
|
|
262
|
+
|
|
263
|
+
For each gap that has a `debug_session:` field:
|
|
264
|
+
- Read the debug session file
|
|
265
|
+
- Update frontmatter `status:` → `resolved`
|
|
266
|
+
- Update frontmatter `updated:` timestamp
|
|
267
|
+
- Move to resolved directory:
|
|
268
|
+
```bash
|
|
269
|
+
mkdir -p .planning/debug/resolved
|
|
270
|
+
mv .planning/debug/{slug}.md .planning/debug/resolved/
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**6. Commit updated artifacts:**
|
|
274
|
+
```bash
|
|
275
|
+
node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-${PARENT_PHASE}): resolve UAT gaps and debug sessions after ${PHASE_NUMBER} gap closure" --files .planning/phases/*${PARENT_PHASE}*/*-UAT.md .planning/debug/resolved/*.md
|
|
276
|
+
```
|
|
277
|
+
</step>
|
|
278
|
+
|
|
279
|
+
<step name="verify_phase_goal">
|
|
280
|
+
Verify phase achieved its GOAL, not just completed tasks.
|
|
356
281
|
|
|
357
282
|
```
|
|
358
283
|
Task(
|
|
359
284
|
prompt="Verify phase {phase_number} goal achievement.
|
|
360
|
-
|
|
361
285
|
Phase directory: {phase_dir}
|
|
362
286
|
Phase goal: {goal from ROADMAP.md}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
subagent_type="gsd-verifier"
|
|
287
|
+
Check must_haves against actual codebase. Create VERIFICATION.md.",
|
|
288
|
+
subagent_type="gsd-verifier",
|
|
289
|
+
model="{verifier_model}"
|
|
367
290
|
)
|
|
368
291
|
```
|
|
369
292
|
|
|
370
|
-
|
|
371
|
-
|
|
293
|
+
Read status:
|
|
372
294
|
```bash
|
|
373
295
|
grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
|
|
374
296
|
```
|
|
375
297
|
|
|
376
|
-
**Route by status:**
|
|
377
|
-
|
|
378
298
|
| Status | Action |
|
|
379
299
|
|--------|--------|
|
|
380
|
-
| `passed` |
|
|
381
|
-
| `human_needed` | Present items
|
|
300
|
+
| `passed` | → update_roadmap |
|
|
301
|
+
| `human_needed` | Present items for human testing, get approval or feedback |
|
|
382
302
|
| `gaps_found` | Present gap summary, offer `/gsd:plan-phase {phase} --gaps` |
|
|
383
303
|
|
|
384
|
-
**If passed:**
|
|
385
|
-
|
|
386
|
-
Phase goal verified. Proceed to update_roadmap.
|
|
387
|
-
|
|
388
304
|
**If human_needed:**
|
|
389
|
-
|
|
390
|
-
```markdown
|
|
305
|
+
```
|
|
391
306
|
## ✓ Phase {X}: {Name} — Human Verification Required
|
|
392
307
|
|
|
393
308
|
All automated checks passed. {N} items need human testing:
|
|
394
309
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
{Extract from VERIFICATION.md human_verification section}
|
|
398
|
-
|
|
399
|
-
---
|
|
310
|
+
{From VERIFICATION.md human_verification section}
|
|
400
311
|
|
|
401
|
-
|
|
402
|
-
- "approved" → continue to update_roadmap
|
|
403
|
-
- Report issues → will route to gap closure planning
|
|
312
|
+
"approved" → continue | Report issues → gap closure
|
|
404
313
|
```
|
|
405
314
|
|
|
406
|
-
If user approves → continue to update_roadmap.
|
|
407
|
-
If user reports issues → treat as gaps_found.
|
|
408
|
-
|
|
409
315
|
**If gaps_found:**
|
|
410
|
-
|
|
411
|
-
Present gaps and offer next command:
|
|
412
|
-
|
|
413
|
-
```markdown
|
|
316
|
+
```
|
|
414
317
|
## ⚠ Phase {X}: {Name} — Gaps Found
|
|
415
318
|
|
|
416
319
|
**Score:** {N}/{M} must-haves verified
|
|
417
|
-
**Report:** {phase_dir}/{
|
|
320
|
+
**Report:** {phase_dir}/{phase_num}-VERIFICATION.md
|
|
418
321
|
|
|
419
322
|
### What's Missing
|
|
420
|
-
|
|
421
|
-
{Extract gap summaries from VERIFICATION.md gaps section}
|
|
323
|
+
{Gap summaries from VERIFICATION.md}
|
|
422
324
|
|
|
423
325
|
---
|
|
424
|
-
|
|
425
326
|
## ▶ Next Up
|
|
426
327
|
|
|
427
|
-
**Plan gap closure** — create additional plans to complete the phase
|
|
428
|
-
|
|
429
328
|
`/gsd:plan-phase {X} --gaps`
|
|
430
329
|
|
|
431
330
|
<sub>`/clear` first → fresh context window</sub>
|
|
432
331
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
**Also available:**
|
|
436
|
-
- `cat {phase_dir}/{phase}-VERIFICATION.md` — see full report
|
|
437
|
-
- `/gsd:verify-work {X}` — manual testing before planning
|
|
332
|
+
Also: `cat {phase_dir}/{phase_num}-VERIFICATION.md` — full report
|
|
333
|
+
Also: `/gsd:verify-work {X}` — manual testing first
|
|
438
334
|
```
|
|
439
335
|
|
|
440
|
-
|
|
441
|
-
1. Reads VERIFICATION.md gaps
|
|
442
|
-
2. Creates additional plans (04, 05, etc.) with `gap_closure: true` to close gaps
|
|
443
|
-
3. User then runs `/gsd:execute-phase {X} --gaps-only`
|
|
444
|
-
4. Execute-phase runs only gap closure plans (04-05)
|
|
445
|
-
5. Verifier runs again after new plans complete
|
|
446
|
-
|
|
447
|
-
User stays in control at each decision point.
|
|
336
|
+
Gap closure cycle: `/gsd:plan-phase {X} --gaps` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/gsd:execute-phase {X} --gaps-only` → verifier re-runs.
|
|
448
337
|
</step>
|
|
449
338
|
|
|
450
339
|
<step name="update_roadmap">
|
|
451
|
-
|
|
340
|
+
**Mark phase complete and update all tracking files:**
|
|
452
341
|
|
|
453
342
|
```bash
|
|
454
|
-
|
|
455
|
-
# Update completion date
|
|
456
|
-
# Update status
|
|
343
|
+
COMPLETION=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs phase complete "${PHASE_NUMBER}")
|
|
457
344
|
```
|
|
458
345
|
|
|
459
|
-
|
|
346
|
+
The CLI handles:
|
|
347
|
+
- Marking phase checkbox `[x]` with completion date
|
|
348
|
+
- Updating Progress table (Status → Complete, date)
|
|
349
|
+
- Updating plan count to final
|
|
350
|
+
- Advancing STATE.md to next phase
|
|
351
|
+
- Updating REQUIREMENTS.md traceability
|
|
352
|
+
|
|
353
|
+
Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
|
|
354
|
+
|
|
460
355
|
```bash
|
|
461
|
-
|
|
462
|
-
git add .planning/REQUIREMENTS.md # if updated
|
|
463
|
-
git commit -m "docs(phase-{X}): complete phase execution"
|
|
356
|
+
node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md .planning/phases/{phase_dir}/*-VERIFICATION.md
|
|
464
357
|
```
|
|
465
358
|
</step>
|
|
466
359
|
|
|
467
360
|
<step name="offer_next">
|
|
468
|
-
Present next steps based on milestone status:
|
|
469
361
|
|
|
470
|
-
**If
|
|
471
|
-
```
|
|
472
|
-
## Next Up
|
|
362
|
+
**Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`/gsd:plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
|
|
473
363
|
|
|
474
|
-
**
|
|
364
|
+
**Auto-advance detection:**
|
|
475
365
|
|
|
476
|
-
|
|
366
|
+
1. Parse `--auto` flag from $ARGUMENTS
|
|
367
|
+
2. Read `workflow.auto_advance` from config:
|
|
368
|
+
```bash
|
|
369
|
+
AUTO_CFG=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
370
|
+
```
|
|
477
371
|
|
|
478
|
-
|
|
479
|
-
```
|
|
372
|
+
**If `--auto` flag present OR `AUTO_CFG` is true (AND verification passed with no gaps):**
|
|
480
373
|
|
|
481
|
-
**If milestone complete:**
|
|
482
374
|
```
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
`/gsd:complete-milestone`
|
|
375
|
+
╔══════════════════════════════════════════╗
|
|
376
|
+
║ AUTO-ADVANCING → TRANSITION ║
|
|
377
|
+
║ Phase {X} verified, continuing chain ║
|
|
378
|
+
╚══════════════════════════════════════════╝
|
|
488
379
|
```
|
|
489
|
-
</step>
|
|
490
380
|
|
|
491
|
-
|
|
381
|
+
Execute the transition workflow inline (do NOT use Task — orchestrator context is ~10-15%, transition needs phase completion data already in context):
|
|
492
382
|
|
|
493
|
-
|
|
494
|
-
**Why this works:**
|
|
383
|
+
Read and follow `~/.claude/get-shit-done/workflows/transition.md`, passing through the `--auto` flag so it propagates to the next phase invocation.
|
|
495
384
|
|
|
496
|
-
|
|
497
|
-
- Read plan frontmatter (small)
|
|
498
|
-
- Analyze dependencies (logic, no heavy reads)
|
|
499
|
-
- Fill template strings
|
|
500
|
-
- Spawn Task calls
|
|
501
|
-
- Collect results
|
|
385
|
+
**If neither `--auto` nor `AUTO_CFG` is true:**
|
|
502
386
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
- Loads templates, references
|
|
506
|
-
- Executes plan with full capacity
|
|
507
|
-
- Creates SUMMARY, commits
|
|
387
|
+
The workflow ends. The user runs `/gsd:progress` or invokes the transition workflow manually.
|
|
388
|
+
</step>
|
|
508
389
|
|
|
509
|
-
|
|
390
|
+
</process>
|
|
510
391
|
|
|
511
|
-
|
|
392
|
+
<context_efficiency>
|
|
393
|
+
Orchestrator: ~10-15% context. Subagents: fresh 200k each. No polling (Task blocks). No context bleed.
|
|
512
394
|
</context_efficiency>
|
|
513
395
|
|
|
514
396
|
<failure_handling>
|
|
515
|
-
**
|
|
516
|
-
- SUMMARY.md
|
|
517
|
-
-
|
|
518
|
-
-
|
|
519
|
-
|
|
520
|
-
**Dependency chain breaks:**
|
|
521
|
-
- Wave 1 plan fails
|
|
522
|
-
- Wave 2 plans depending on it will likely fail
|
|
523
|
-
- Orchestrator can still attempt them (user choice)
|
|
524
|
-
- Or skip dependent plans entirely
|
|
525
|
-
|
|
526
|
-
**All agents in wave fail:**
|
|
527
|
-
- Something systemic (git issues, permissions, etc.)
|
|
528
|
-
- Stop execution
|
|
529
|
-
- Report for manual investigation
|
|
530
|
-
|
|
531
|
-
**Checkpoint fails to resolve:**
|
|
532
|
-
- User can't approve or provides repeated issues
|
|
533
|
-
- Ask: "Skip this plan?" or "Abort phase execution?"
|
|
534
|
-
- Record partial progress in STATE.md
|
|
397
|
+
- **classifyHandoffIfNeeded false failure:** Agent reports "failed" but error is `classifyHandoffIfNeeded is not defined` → Claude Code bug, not GSD. Spot-check (SUMMARY exists, commits present) → if pass, treat as success
|
|
398
|
+
- **Agent fails mid-plan:** Missing SUMMARY.md → report, ask user how to proceed
|
|
399
|
+
- **Dependency chain breaks:** Wave 1 fails → Wave 2 dependents likely fail → user chooses attempt or skip
|
|
400
|
+
- **All agents in wave fail:** Systemic issue → stop, report for investigation
|
|
401
|
+
- **Checkpoint unresolvable:** "Skip this plan?" or "Abort phase execution?" → record partial progress in STATE.md
|
|
535
402
|
</failure_handling>
|
|
536
403
|
|
|
537
404
|
<resumption>
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
If phase execution was interrupted (context limit, user exit, error):
|
|
541
|
-
|
|
542
|
-
1. Run `/gsd:execute-phase {phase}` again
|
|
543
|
-
2. discover_plans finds completed SUMMARYs
|
|
544
|
-
3. Skips completed plans
|
|
545
|
-
4. Resumes from first incomplete plan
|
|
546
|
-
5. Continues wave-based execution
|
|
405
|
+
Re-run `/gsd:execute-phase {phase}` → discover_plans finds completed SUMMARYs → skips them → resumes from first incomplete plan → continues wave execution.
|
|
547
406
|
|
|
548
|
-
|
|
549
|
-
- Last completed plan
|
|
550
|
-
- Current wave
|
|
551
|
-
- Any pending checkpoints
|
|
407
|
+
STATE.md tracks: last completed plan, current wave, pending checkpoints.
|
|
552
408
|
</resumption>
|