@undeemed/get-shit-done-codex 1.6.5

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 (79) hide show
  1. package/AGENTS.md +183 -0
  2. package/LICENSE +21 -0
  3. package/README.md +179 -0
  4. package/bin/install.js +214 -0
  5. package/commands/gsd/add-phase.md +207 -0
  6. package/commands/gsd/add-todo.md +182 -0
  7. package/commands/gsd/audit-milestone.md +258 -0
  8. package/commands/gsd/check-todos.md +217 -0
  9. package/commands/gsd/complete-milestone.md +136 -0
  10. package/commands/gsd/debug.md +149 -0
  11. package/commands/gsd/discuss-phase.md +80 -0
  12. package/commands/gsd/execute-phase.md +304 -0
  13. package/commands/gsd/help.md +383 -0
  14. package/commands/gsd/insert-phase.md +227 -0
  15. package/commands/gsd/list-phase-assumptions.md +50 -0
  16. package/commands/gsd/map-codebase.md +71 -0
  17. package/commands/gsd/new-milestone.md +717 -0
  18. package/commands/gsd/new-project.md +896 -0
  19. package/commands/gsd/pause-work.md +123 -0
  20. package/commands/gsd/plan-milestone-gaps.md +284 -0
  21. package/commands/gsd/plan-phase.md +475 -0
  22. package/commands/gsd/progress.md +356 -0
  23. package/commands/gsd/remove-phase.md +338 -0
  24. package/commands/gsd/research-phase.md +180 -0
  25. package/commands/gsd/resume-work.md +40 -0
  26. package/commands/gsd/update.md +172 -0
  27. package/commands/gsd/verify-work.md +219 -0
  28. package/commands/gsd/whats-new.md +124 -0
  29. package/get-shit-done/references/checkpoints.md +788 -0
  30. package/get-shit-done/references/continuation-format.md +249 -0
  31. package/get-shit-done/references/git-integration.md +254 -0
  32. package/get-shit-done/references/questioning.md +141 -0
  33. package/get-shit-done/references/tdd.md +263 -0
  34. package/get-shit-done/references/ui-brand.md +160 -0
  35. package/get-shit-done/references/verification-patterns.md +595 -0
  36. package/get-shit-done/templates/DEBUG.md +159 -0
  37. package/get-shit-done/templates/UAT.md +247 -0
  38. package/get-shit-done/templates/codebase/architecture.md +255 -0
  39. package/get-shit-done/templates/codebase/concerns.md +310 -0
  40. package/get-shit-done/templates/codebase/conventions.md +307 -0
  41. package/get-shit-done/templates/codebase/integrations.md +280 -0
  42. package/get-shit-done/templates/codebase/stack.md +186 -0
  43. package/get-shit-done/templates/codebase/structure.md +285 -0
  44. package/get-shit-done/templates/codebase/testing.md +480 -0
  45. package/get-shit-done/templates/config.json +26 -0
  46. package/get-shit-done/templates/context.md +291 -0
  47. package/get-shit-done/templates/continue-here.md +78 -0
  48. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  49. package/get-shit-done/templates/discovery.md +146 -0
  50. package/get-shit-done/templates/milestone-archive.md +123 -0
  51. package/get-shit-done/templates/milestone.md +115 -0
  52. package/get-shit-done/templates/phase-prompt.md +576 -0
  53. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  54. package/get-shit-done/templates/project.md +184 -0
  55. package/get-shit-done/templates/requirements.md +231 -0
  56. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  57. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  58. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  59. package/get-shit-done/templates/research-project/STACK.md +120 -0
  60. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  61. package/get-shit-done/templates/research.md +529 -0
  62. package/get-shit-done/templates/roadmap.md +202 -0
  63. package/get-shit-done/templates/state.md +206 -0
  64. package/get-shit-done/templates/summary.md +269 -0
  65. package/get-shit-done/templates/user-setup.md +323 -0
  66. package/get-shit-done/templates/verification-report.md +322 -0
  67. package/get-shit-done/workflows/complete-milestone.md +750 -0
  68. package/get-shit-done/workflows/diagnose-issues.md +233 -0
  69. package/get-shit-done/workflows/discovery-phase.md +293 -0
  70. package/get-shit-done/workflows/discuss-phase.md +422 -0
  71. package/get-shit-done/workflows/execute-phase.md +552 -0
  72. package/get-shit-done/workflows/execute-plan.md +1831 -0
  73. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  74. package/get-shit-done/workflows/map-codebase.md +289 -0
  75. package/get-shit-done/workflows/resume-project.md +311 -0
  76. package/get-shit-done/workflows/transition.md +564 -0
  77. package/get-shit-done/workflows/verify-phase.md +629 -0
  78. package/get-shit-done/workflows/verify-work.md +563 -0
  79. package/package.json +39 -0
@@ -0,0 +1,356 @@
1
+ ---
2
+ name: gsd:progress
3
+ description: Check project progress, show context, and route to next action (execute or plan)
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Grep
8
+ - Glob
9
+ - SlashCommand
10
+ ---
11
+
12
+ <objective>
13
+ 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.
14
+
15
+ Provides situational awareness before continuing work.
16
+ </objective>
17
+
18
+
19
+ <process>
20
+
21
+ <step name="verify">
22
+ **Verify planning structure exists:**
23
+
24
+ If no `.planning/` directory:
25
+
26
+ ```
27
+ No planning structure found.
28
+
29
+ Run /gsd:new-project to start a new project.
30
+ ```
31
+
32
+ Exit.
33
+
34
+ If missing STATE.md: suggest `/gsd:new-project`.
35
+
36
+ **If ROADMAP.md missing but PROJECT.md exists:**
37
+
38
+ This means a milestone was completed and archived. Go to **Route F** (between milestones).
39
+
40
+ If missing both ROADMAP.md and PROJECT.md: suggest `/gsd:new-project`.
41
+ </step>
42
+
43
+ <step name="load">
44
+ **Load full project context:**
45
+
46
+ - Read `.planning/STATE.md` for living memory (position, decisions, issues)
47
+ - Read `.planning/ROADMAP.md` for phase structure and objectives
48
+ - Read `.planning/PROJECT.md` for current state (What This Is, Core Value, Requirements)
49
+ </step>
50
+
51
+ <step name="recent">
52
+ **Gather recent work context:**
53
+
54
+ - Find the 2-3 most recent SUMMARY.md files
55
+ - Extract from each: what was accomplished, key decisions, any issues logged
56
+ - This shows "what we've been working on"
57
+ </step>
58
+
59
+ <step name="position">
60
+ **Parse current position:**
61
+
62
+ - From STATE.md: current phase, plan number, status
63
+ - Calculate: total plans, completed plans, remaining plans
64
+ - Note any blockers or concerns
65
+ - Check for CONTEXT.md: For phases without PLAN.md files, check if `{phase}-CONTEXT.md` exists in phase directory
66
+ - Count pending todos: `ls .planning/todos/pending/*.md 2>/dev/null | wc -l`
67
+ - Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
68
+ </step>
69
+
70
+ <step name="report">
71
+ **Present rich status report:**
72
+
73
+ ```
74
+ # [Project Name]
75
+
76
+ **Progress:** [████████░░] 8/10 plans complete
77
+
78
+ ## Recent Work
79
+ - [Phase X, Plan Y]: [what was accomplished - 1 line]
80
+ - [Phase X, Plan Z]: [what was accomplished - 1 line]
81
+
82
+ ## Current Position
83
+ Phase [N] of [total]: [phase-name]
84
+ Plan [M] of [phase-total]: [status]
85
+ CONTEXT: [✓ if CONTEXT.md exists | - if not]
86
+
87
+ ## Key Decisions Made
88
+ - [decision 1 from STATE.md]
89
+ - [decision 2]
90
+
91
+ ## Blockers/Concerns
92
+ - [any blockers or concerns from STATE.md]
93
+
94
+ ## Pending Todos
95
+ - [count] pending — /gsd:check-todos to review
96
+
97
+ ## Active Debug Sessions
98
+ - [count] active — /gsd:debug to continue
99
+ (Only show this section if count > 0)
100
+
101
+ ## What's Next
102
+ [Next phase/plan objective from ROADMAP]
103
+ ```
104
+
105
+ </step>
106
+
107
+ <step name="route">
108
+ **Determine next action based on verified counts.**
109
+
110
+ **Step 1: Count plans, summaries, and issues in current phase**
111
+
112
+ List files in the current phase directory:
113
+
114
+ ```bash
115
+ ls -1 .planning/phases/[current-phase-dir]/*-PLAN.md 2>/dev/null | wc -l
116
+ ls -1 .planning/phases/[current-phase-dir]/*-SUMMARY.md 2>/dev/null | wc -l
117
+ ls -1 .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null | wc -l
118
+ ```
119
+
120
+ State: "This phase has {X} plans, {Y} summaries."
121
+
122
+ **Step 1.5: Check for unaddressed UAT gaps**
123
+
124
+ Check for UAT.md files with status "diagnosed" (has gaps needing fixes).
125
+
126
+ ```bash
127
+ # Check for diagnosed UAT with gaps
128
+ grep -l "status: diagnosed" .planning/phases/[current-phase-dir]/*-UAT.md 2>/dev/null
129
+ ```
130
+
131
+ Track:
132
+ - `uat_with_gaps`: UAT.md files with status "diagnosed" (gaps need fixing)
133
+
134
+ **Step 2: Route based on counts**
135
+
136
+ | Condition | Meaning | Action |
137
+ |-----------|---------|--------|
138
+ | uat_with_gaps > 0 | UAT gaps need fix plans | Go to **Route E** |
139
+ | summaries < plans | Unexecuted plans exist | Go to **Route A** |
140
+ | summaries = plans AND plans > 0 | Phase complete | Go to Step 3 |
141
+ | plans = 0 | Phase not yet planned | Go to **Route B** |
142
+
143
+ ---
144
+
145
+ **Route A: Unexecuted plan exists**
146
+
147
+ Find the first PLAN.md without matching SUMMARY.md.
148
+ Read its `<objective>` section.
149
+
150
+ ```
151
+ ---
152
+
153
+ ## ▶ Next Up
154
+
155
+ **{phase}-{plan}: [Plan Name]** — [objective summary from PLAN.md]
156
+
157
+ `/gsd:execute-phase {phase}`
158
+
159
+ <sub>`/clear` first → fresh context window</sub>
160
+
161
+ ---
162
+ ```
163
+
164
+ ---
165
+
166
+ **Route B: Phase needs planning**
167
+
168
+ Check if `{phase}-CONTEXT.md` exists in phase directory.
169
+
170
+ **If CONTEXT.md exists:**
171
+
172
+ ```
173
+ ---
174
+
175
+ ## ▶ Next Up
176
+
177
+ **Phase {N}: {Name}** — {Goal from ROADMAP.md}
178
+ <sub>✓ Context gathered, ready to plan</sub>
179
+
180
+ `/gsd:plan-phase {phase-number}`
181
+
182
+ <sub>`/clear` first → fresh context window</sub>
183
+
184
+ ---
185
+ ```
186
+
187
+ **If CONTEXT.md does NOT exist:**
188
+
189
+ ```
190
+ ---
191
+
192
+ ## ▶ Next Up
193
+
194
+ **Phase {N}: {Name}** — {Goal from ROADMAP.md}
195
+
196
+ `/gsd:discuss-phase {phase}` — gather context and clarify approach
197
+
198
+ <sub>`/clear` first → fresh context window</sub>
199
+
200
+ ---
201
+
202
+ **Also available:**
203
+ - `/gsd:plan-phase {phase}` — skip discussion, plan directly
204
+ - `/gsd:list-phase-assumptions {phase}` — see Claude's assumptions
205
+
206
+ ---
207
+ ```
208
+
209
+ ---
210
+
211
+ **Route E: UAT gaps need fix plans**
212
+
213
+ UAT.md exists with gaps (diagnosed issues). User needs to plan fixes.
214
+
215
+ ```
216
+ ---
217
+
218
+ ## ⚠ UAT Gaps Found
219
+
220
+ **{phase}-UAT.md** has {N} gaps requiring fixes.
221
+
222
+ `/gsd:plan-phase {phase} --gaps`
223
+
224
+ <sub>`/clear` first → fresh context window</sub>
225
+
226
+ ---
227
+
228
+ **Also available:**
229
+ - `/gsd:execute-phase {phase}` — execute phase plans
230
+ - `/gsd:verify-work {phase}` — run more UAT testing
231
+
232
+ ---
233
+ ```
234
+
235
+ ---
236
+
237
+ **Step 3: Check milestone status (only when phase complete)**
238
+
239
+ Read ROADMAP.md and identify:
240
+ 1. Current phase number
241
+ 2. All phase numbers in the current milestone section
242
+
243
+ Count total phases and identify the highest phase number.
244
+
245
+ State: "Current phase is {X}. Milestone has {N} phases (highest: {Y})."
246
+
247
+ **Route based on milestone status:**
248
+
249
+ | Condition | Meaning | Action |
250
+ |-----------|---------|--------|
251
+ | current phase < highest phase | More phases remain | Go to **Route C** |
252
+ | current phase = highest phase | Milestone complete | Go to **Route D** |
253
+
254
+ ---
255
+
256
+ **Route C: Phase complete, more phases remain**
257
+
258
+ Read ROADMAP.md to get the next phase's name and goal.
259
+
260
+ ```
261
+ ---
262
+
263
+ ## ✓ Phase {Z} Complete
264
+
265
+ ## ▶ Next Up
266
+
267
+ **Phase {Z+1}: {Name}** — {Goal from ROADMAP.md}
268
+
269
+ `/gsd:discuss-phase {Z+1}` — gather context and clarify approach
270
+
271
+ <sub>`/clear` first → fresh context window</sub>
272
+
273
+ ---
274
+
275
+ **Also available:**
276
+ - `/gsd:plan-phase {Z+1}` — skip discussion, plan directly
277
+ - `/gsd:verify-work {Z}` — user acceptance test before continuing
278
+
279
+ ---
280
+ ```
281
+
282
+ ---
283
+
284
+ **Route D: Milestone complete**
285
+
286
+ ```
287
+ ---
288
+
289
+ ## 🎉 Milestone Complete
290
+
291
+ All {N} phases finished!
292
+
293
+ ## ▶ Next Up
294
+
295
+ **Complete Milestone** — archive and prepare for next
296
+
297
+ `/gsd:complete-milestone`
298
+
299
+ <sub>`/clear` first → fresh context window</sub>
300
+
301
+ ---
302
+
303
+ **Also available:**
304
+ - `/gsd:verify-work` — user acceptance test before completing milestone
305
+
306
+ ---
307
+ ```
308
+
309
+ ---
310
+
311
+ **Route F: Between milestones (ROADMAP.md missing, PROJECT.md exists)**
312
+
313
+ A milestone was completed and archived. Ready to start the next milestone cycle.
314
+
315
+ Read MILESTONES.md to find the last completed milestone version.
316
+
317
+ ```
318
+ ---
319
+
320
+ ## ✓ Milestone v{X.Y} Complete
321
+
322
+ Ready to plan the next milestone.
323
+
324
+ ## ▶ Next Up
325
+
326
+ **Start Next Milestone** — questioning → research → requirements → roadmap
327
+
328
+ `/gsd:new-milestone`
329
+
330
+ <sub>`/clear` first → fresh context window</sub>
331
+
332
+ ---
333
+ ```
334
+
335
+ </step>
336
+
337
+ <step name="edge_cases">
338
+ **Handle edge cases:**
339
+
340
+ - Phase complete but next phase not planned → offer `/gsd:plan-phase [next]`
341
+ - All work complete → offer milestone completion
342
+ - Blockers present → highlight before offering to continue
343
+ - Handoff file exists → mention it, offer `/gsd:resume-work`
344
+ </step>
345
+
346
+ </process>
347
+
348
+ <success_criteria>
349
+
350
+ - [ ] Rich context provided (recent work, decisions, issues)
351
+ - [ ] Current position clear with visual progress
352
+ - [ ] What's next clearly explained
353
+ - [ ] Smart routing: /gsd:execute-phase if plans exist, /gsd:plan-phase if not
354
+ - [ ] User confirms before any action
355
+ - [ ] Seamless handoff to appropriate gsd command
356
+ </success_criteria>
@@ -0,0 +1,338 @@
1
+ ---
2
+ name: gsd:remove-phase
3
+ description: Remove a future phase from roadmap and renumber subsequent phases
4
+ argument-hint: <phase-number>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ ---
11
+
12
+ <objective>
13
+ Remove an unstarted future phase from the roadmap and renumber all subsequent phases to maintain a clean, linear sequence.
14
+
15
+ Purpose: Clean removal of work you've decided not to do, without polluting context with cancelled/deferred markers.
16
+ Output: Phase deleted, all subsequent phases renumbered, git commit as historical record.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @.planning/ROADMAP.md
21
+ @.planning/STATE.md
22
+ </execution_context>
23
+
24
+ <process>
25
+
26
+ <step name="parse_arguments">
27
+ Parse the command arguments:
28
+ - Argument is the phase number to remove (integer or decimal)
29
+ - Example: `/gsd:remove-phase 17` → phase = 17
30
+ - Example: `/gsd:remove-phase 16.1` → phase = 16.1
31
+
32
+ If no argument provided:
33
+
34
+ ```
35
+ ERROR: Phase number required
36
+ Usage: /gsd:remove-phase <phase-number>
37
+ Example: /gsd:remove-phase 17
38
+ ```
39
+
40
+ Exit.
41
+ </step>
42
+
43
+ <step name="load_state">
44
+ Load project state:
45
+
46
+ ```bash
47
+ cat .planning/STATE.md 2>/dev/null
48
+ cat .planning/ROADMAP.md 2>/dev/null
49
+ ```
50
+
51
+ Parse current phase number from STATE.md "Current Position" section.
52
+ </step>
53
+
54
+ <step name="validate_phase_exists">
55
+ Verify the target phase exists in ROADMAP.md:
56
+
57
+ 1. Search for `### Phase {target}:` heading
58
+ 2. If not found:
59
+
60
+ ```
61
+ ERROR: Phase {target} not found in roadmap
62
+ Available phases: [list phase numbers]
63
+ ```
64
+
65
+ Exit.
66
+ </step>
67
+
68
+ <step name="validate_future_phase">
69
+ Verify the phase is a future phase (not started):
70
+
71
+ 1. Compare target phase to current phase from STATE.md
72
+ 2. Target must be > current phase number
73
+
74
+ If target <= current phase:
75
+
76
+ ```
77
+ ERROR: Cannot remove Phase {target}
78
+
79
+ Only future phases can be removed:
80
+ - Current phase: {current}
81
+ - Phase {target} is current or completed
82
+
83
+ To abandon current work, use /gsd:pause-work instead.
84
+ ```
85
+
86
+ Exit.
87
+
88
+ 3. Check for SUMMARY.md files in phase directory:
89
+
90
+ ```bash
91
+ ls .planning/phases/{target}-*/*-SUMMARY.md 2>/dev/null
92
+ ```
93
+
94
+ If any SUMMARY.md files exist:
95
+
96
+ ```
97
+ ERROR: Phase {target} has completed work
98
+
99
+ Found executed plans:
100
+ - {list of SUMMARY.md files}
101
+
102
+ Cannot remove phases with completed work.
103
+ ```
104
+
105
+ Exit.
106
+ </step>
107
+
108
+ <step name="gather_phase_info">
109
+ Collect information about the phase being removed:
110
+
111
+ 1. Extract phase name from ROADMAP.md heading: `### Phase {target}: {Name}`
112
+ 2. Find phase directory: `.planning/phases/{target}-{slug}/`
113
+ 3. Find all subsequent phases (integer and decimal) that need renumbering
114
+
115
+ **Subsequent phase detection:**
116
+
117
+ For integer phase removal (e.g., 17):
118
+ - Find all phases > 17 (integers: 18, 19, 20...)
119
+ - Find all decimal phases >= 17.0 and < 18.0 (17.1, 17.2...) → these become 16.x
120
+ - Find all decimal phases for subsequent integers (18.1, 19.1...) → renumber with their parent
121
+
122
+ For decimal phase removal (e.g., 17.1):
123
+ - Find all decimal phases > 17.1 and < 18 (17.2, 17.3...) → renumber down
124
+ - Integer phases unchanged
125
+
126
+ List all phases that will be renumbered.
127
+ </step>
128
+
129
+ <step name="confirm_removal">
130
+ Present removal summary and confirm:
131
+
132
+ ```
133
+ Removing Phase {target}: {Name}
134
+
135
+ This will:
136
+ - Delete: .planning/phases/{target}-{slug}/
137
+ - Renumber {N} subsequent phases:
138
+ - Phase 18 → Phase 17
139
+ - Phase 18.1 → Phase 17.1
140
+ - Phase 19 → Phase 18
141
+ [etc.]
142
+
143
+ Proceed? (y/n)
144
+ ```
145
+
146
+ Wait for confirmation.
147
+ </step>
148
+
149
+ <step name="delete_phase_directory">
150
+ Delete the target phase directory if it exists:
151
+
152
+ ```bash
153
+ if [ -d ".planning/phases/{target}-{slug}" ]; then
154
+ rm -rf ".planning/phases/{target}-{slug}"
155
+ echo "Deleted: .planning/phases/{target}-{slug}/"
156
+ fi
157
+ ```
158
+
159
+ If directory doesn't exist, note: "No directory to delete (phase not yet created)"
160
+ </step>
161
+
162
+ <step name="renumber_directories">
163
+ Rename all subsequent phase directories:
164
+
165
+ For each phase directory that needs renumbering (in reverse order to avoid conflicts):
166
+
167
+ ```bash
168
+ # Example: renaming 18-dashboard to 17-dashboard
169
+ mv ".planning/phases/18-dashboard" ".planning/phases/17-dashboard"
170
+ ```
171
+
172
+ Process in descending order (20→19, then 19→18, then 18→17) to avoid overwriting.
173
+
174
+ Also rename decimal phase directories:
175
+ - `17.1-fix-bug` → `16.1-fix-bug` (if removing integer 17)
176
+ - `17.2-hotfix` → `17.1-hotfix` (if removing decimal 17.1)
177
+ </step>
178
+
179
+ <step name="rename_files_in_directories">
180
+ Rename plan files inside renumbered directories:
181
+
182
+ For each renumbered directory, rename files that contain the phase number:
183
+
184
+ ```bash
185
+ # Inside 17-dashboard (was 18-dashboard):
186
+ mv "18-01-PLAN.md" "17-01-PLAN.md"
187
+ mv "18-02-PLAN.md" "17-02-PLAN.md"
188
+ mv "18-01-SUMMARY.md" "17-01-SUMMARY.md" # if exists
189
+ # etc.
190
+ ```
191
+
192
+ Also handle CONTEXT.md and DISCOVERY.md (these don't have phase prefixes, so no rename needed).
193
+ </step>
194
+
195
+ <step name="update_roadmap">
196
+ Update ROADMAP.md:
197
+
198
+ 1. **Remove the phase section entirely:**
199
+ - Delete from `### Phase {target}:` to the next phase heading (or section end)
200
+
201
+ 2. **Remove from phase list:**
202
+ - Delete line `- [ ] **Phase {target}: {Name}**` or similar
203
+
204
+ 3. **Remove from Progress table:**
205
+ - Delete the row for Phase {target}
206
+
207
+ 4. **Renumber all subsequent phases:**
208
+ - `### Phase 18:` → `### Phase 17:`
209
+ - `- [ ] **Phase 18:` → `- [ ] **Phase 17:`
210
+ - Table rows: `| 18. Dashboard |` → `| 17. Dashboard |`
211
+ - Plan references: `18-01:` → `17-01:`
212
+
213
+ 5. **Update dependency references:**
214
+ - `**Depends on:** Phase 18` → `**Depends on:** Phase 17`
215
+ - For the phase that depended on the removed phase:
216
+ - `**Depends on:** Phase 17` (removed) → `**Depends on:** Phase 16`
217
+
218
+ 6. **Renumber decimal phases:**
219
+ - `### Phase 17.1:` → `### Phase 16.1:` (if integer 17 removed)
220
+ - Update all references consistently
221
+
222
+ Write updated ROADMAP.md.
223
+ </step>
224
+
225
+ <step name="update_state">
226
+ Update STATE.md:
227
+
228
+ 1. **Update total phase count:**
229
+ - `Phase: 16 of 20` → `Phase: 16 of 19`
230
+
231
+ 2. **Recalculate progress percentage:**
232
+ - New percentage based on completed plans / new total plans
233
+
234
+ Do NOT add a "Roadmap Evolution" note - the git commit is the record.
235
+
236
+ Write updated STATE.md.
237
+ </step>
238
+
239
+ <step name="update_file_contents">
240
+ Search for and update phase references inside plan files:
241
+
242
+ ```bash
243
+ # Find files that reference the old phase numbers
244
+ grep -r "Phase 18" .planning/phases/17-*/ 2>/dev/null
245
+ grep -r "Phase 19" .planning/phases/18-*/ 2>/dev/null
246
+ # etc.
247
+ ```
248
+
249
+ Update any internal references to reflect new numbering.
250
+ </step>
251
+
252
+ <step name="commit">
253
+ Stage and commit the removal:
254
+
255
+ ```bash
256
+ git add .planning/
257
+ git commit -m "chore: remove phase {target} ({original-phase-name})"
258
+ ```
259
+
260
+ The commit message preserves the historical record of what was removed.
261
+ </step>
262
+
263
+ <step name="completion">
264
+ Present completion summary:
265
+
266
+ ```
267
+ Phase {target} ({original-name}) removed.
268
+
269
+ Changes:
270
+ - Deleted: .planning/phases/{target}-{slug}/
271
+ - Renumbered: Phases {first-renumbered}-{last-old} → {first-renumbered-1}-{last-new}
272
+ - Updated: ROADMAP.md, STATE.md
273
+ - Committed: chore: remove phase {target} ({original-name})
274
+
275
+ Current roadmap: {total-remaining} phases
276
+ Current position: Phase {current} of {new-total}
277
+
278
+ ---
279
+
280
+ ## What's Next
281
+
282
+ Would you like to:
283
+ - `/gsd:progress` — see updated roadmap status
284
+ - Continue with current phase
285
+ - Review roadmap
286
+
287
+ ---
288
+ ```
289
+ </step>
290
+
291
+ </process>
292
+
293
+ <anti_patterns>
294
+
295
+ - Don't remove completed phases (have SUMMARY.md files)
296
+ - Don't remove current or past phases
297
+ - Don't leave gaps in numbering - always renumber
298
+ - Don't add "removed phase" notes to STATE.md - git commit is the record
299
+ - Don't ask about each decimal phase - just renumber them
300
+ - Don't modify completed phase directories
301
+ </anti_patterns>
302
+
303
+ <edge_cases>
304
+
305
+ **Removing a decimal phase (e.g., 17.1):**
306
+ - Only affects other decimals in same series (17.2 → 17.1, 17.3 → 17.2)
307
+ - Integer phases unchanged
308
+ - Simpler operation
309
+
310
+ **No subsequent phases to renumber:**
311
+ - Removing the last phase (e.g., Phase 20 when that's the end)
312
+ - Just delete and update ROADMAP.md, no renumbering needed
313
+
314
+ **Phase directory doesn't exist:**
315
+ - Phase may be in ROADMAP.md but directory not created yet
316
+ - Skip directory deletion, proceed with ROADMAP.md updates
317
+
318
+ **Decimal phases under removed integer:**
319
+ - Removing Phase 17 when 17.1, 17.2 exist
320
+ - 17.1 → 16.1, 17.2 → 16.2
321
+ - They maintain their position in execution order (after current last integer)
322
+
323
+ </edge_cases>
324
+
325
+ <success_criteria>
326
+ Phase removal is complete when:
327
+
328
+ - [ ] Target phase validated as future/unstarted
329
+ - [ ] Phase directory deleted (if existed)
330
+ - [ ] All subsequent phase directories renumbered
331
+ - [ ] Files inside directories renamed ({old}-01-PLAN.md → {new}-01-PLAN.md)
332
+ - [ ] ROADMAP.md updated (section removed, all references renumbered)
333
+ - [ ] STATE.md updated (phase count, progress percentage)
334
+ - [ ] Dependency references updated in subsequent phases
335
+ - [ ] Changes committed with descriptive message
336
+ - [ ] No gaps in phase numbering
337
+ - [ ] User informed of changes
338
+ </success_criteria>