gsd-opencode 1.10.2 → 1.20.1

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