@undeemed/get-shit-done-codex 1.6.12 → 1.20.3

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 (114) hide show
  1. package/README.md +40 -7
  2. package/agents/gsd-codebase-mapper.md +761 -0
  3. package/agents/gsd-debugger.md +1198 -0
  4. package/agents/gsd-executor.md +419 -0
  5. package/agents/gsd-integration-checker.md +423 -0
  6. package/agents/gsd-phase-researcher.md +469 -0
  7. package/agents/gsd-plan-checker.md +622 -0
  8. package/agents/gsd-planner.md +1159 -0
  9. package/agents/gsd-project-researcher.md +618 -0
  10. package/agents/gsd-research-synthesizer.md +236 -0
  11. package/agents/gsd-roadmapper.md +639 -0
  12. package/agents/gsd-verifier.md +541 -0
  13. package/bin/install.js +108 -102
  14. package/commands/gsd/add-phase.md +17 -185
  15. package/commands/gsd/add-todo.md +23 -163
  16. package/commands/gsd/audit-milestone.md +3 -219
  17. package/commands/gsd/check-todos.md +20 -196
  18. package/commands/gsd/cleanup.md +18 -0
  19. package/commands/gsd/complete-milestone.md +2 -2
  20. package/commands/gsd/debug.md +13 -0
  21. package/commands/gsd/discuss-phase.md +13 -6
  22. package/commands/gsd/execute-phase.md +4 -266
  23. package/commands/gsd/health.md +22 -0
  24. package/commands/gsd/help.md +8 -369
  25. package/commands/gsd/insert-phase.md +9 -203
  26. package/commands/gsd/join-discord.md +18 -0
  27. package/commands/gsd/list-phase-assumptions.md +4 -4
  28. package/commands/gsd/map-codebase.md +1 -1
  29. package/commands/gsd/new-milestone.md +16 -682
  30. package/commands/gsd/new-project.md +12 -866
  31. package/commands/gsd/new-project.md.bak +1041 -0
  32. package/commands/gsd/pause-work.md +17 -105
  33. package/commands/gsd/plan-milestone-gaps.md +3 -247
  34. package/commands/gsd/plan-phase.md +13 -444
  35. package/commands/gsd/progress.md +5 -337
  36. package/commands/gsd/quick.md +40 -0
  37. package/commands/gsd/reapply-patches.md +110 -0
  38. package/commands/gsd/remove-phase.md +9 -315
  39. package/commands/gsd/research-phase.md +27 -20
  40. package/commands/gsd/resume-work.md +2 -2
  41. package/commands/gsd/set-profile.md +34 -0
  42. package/commands/gsd/settings.md +36 -0
  43. package/commands/gsd/update.md +25 -160
  44. package/commands/gsd/verify-work.md +6 -186
  45. package/get-shit-done/bin/gsd-tools.cjs +5243 -0
  46. package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
  47. package/get-shit-done/references/checkpoints.md +270 -283
  48. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  49. package/get-shit-done/references/git-integration.md +7 -13
  50. package/get-shit-done/references/git-planning-commit.md +38 -0
  51. package/get-shit-done/references/model-profile-resolution.md +34 -0
  52. package/get-shit-done/references/model-profiles.md +92 -0
  53. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  54. package/get-shit-done/references/planning-config.md +196 -0
  55. package/get-shit-done/references/questioning.md +5 -1
  56. package/get-shit-done/references/verification-patterns.md +17 -0
  57. package/get-shit-done/templates/DEBUG.md +4 -4
  58. package/get-shit-done/templates/UAT.md +1 -1
  59. package/get-shit-done/templates/codebase/architecture.md +1 -1
  60. package/get-shit-done/templates/codebase/concerns.md +1 -1
  61. package/get-shit-done/templates/codebase/conventions.md +1 -1
  62. package/get-shit-done/templates/codebase/structure.md +9 -9
  63. package/get-shit-done/templates/config.json +10 -0
  64. package/get-shit-done/templates/context.md +7 -15
  65. package/get-shit-done/templates/continue-here.md +1 -1
  66. package/get-shit-done/templates/phase-prompt.md +32 -41
  67. package/get-shit-done/templates/planner-subagent-prompt.md +4 -4
  68. package/get-shit-done/templates/project.md +1 -1
  69. package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
  70. package/get-shit-done/templates/research.md +27 -4
  71. package/get-shit-done/templates/state.md +1 -31
  72. package/get-shit-done/templates/summary-complex.md +59 -0
  73. package/get-shit-done/templates/summary-minimal.md +41 -0
  74. package/get-shit-done/templates/summary-standard.md +48 -0
  75. package/get-shit-done/templates/summary.md +5 -28
  76. package/get-shit-done/templates/user-setup.md +8 -20
  77. package/get-shit-done/templates/verification-report.md +3 -3
  78. package/get-shit-done/workflows/add-phase.md +111 -0
  79. package/get-shit-done/workflows/add-todo.md +157 -0
  80. package/get-shit-done/workflows/audit-milestone.md +242 -0
  81. package/get-shit-done/workflows/check-todos.md +176 -0
  82. package/get-shit-done/workflows/cleanup.md +152 -0
  83. package/get-shit-done/workflows/complete-milestone.md +225 -301
  84. package/get-shit-done/workflows/diagnose-issues.md +3 -17
  85. package/get-shit-done/workflows/discovery-phase.md +11 -15
  86. package/get-shit-done/workflows/discuss-phase.md +105 -42
  87. package/get-shit-done/workflows/execute-phase.md +205 -349
  88. package/get-shit-done/workflows/execute-plan.md +179 -1569
  89. package/get-shit-done/workflows/health.md +156 -0
  90. package/get-shit-done/workflows/help.md +486 -0
  91. package/get-shit-done/workflows/insert-phase.md +129 -0
  92. package/get-shit-done/workflows/list-phase-assumptions.md +9 -9
  93. package/get-shit-done/workflows/map-codebase.md +56 -18
  94. package/get-shit-done/workflows/new-milestone.md +373 -0
  95. package/get-shit-done/workflows/new-project.md +1113 -0
  96. package/get-shit-done/workflows/pause-work.md +122 -0
  97. package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
  98. package/get-shit-done/workflows/plan-phase.md +448 -0
  99. package/get-shit-done/workflows/progress.md +393 -0
  100. package/get-shit-done/workflows/quick.md +444 -0
  101. package/get-shit-done/workflows/remove-phase.md +154 -0
  102. package/get-shit-done/workflows/research-phase.md +74 -0
  103. package/get-shit-done/workflows/resume-project.md +18 -23
  104. package/get-shit-done/workflows/set-profile.md +80 -0
  105. package/get-shit-done/workflows/settings.md +200 -0
  106. package/get-shit-done/workflows/transition.md +78 -103
  107. package/get-shit-done/workflows/update.md +214 -0
  108. package/get-shit-done/workflows/verify-phase.md +109 -496
  109. package/get-shit-done/workflows/verify-work.md +22 -15
  110. package/hooks/dist/gsd-check-update.js +66 -0
  111. package/hooks/dist/gsd-statusline.js +91 -0
  112. package/package.json +19 -3
  113. package/scripts/build-hooks.js +42 -0
  114. package/commands/gsd/whats-new.md +0 -124
@@ -1,15 +1,11 @@
1
1
  <purpose>
2
2
 
3
- Mark a shipped version (v1.0, v1.1, v2.0) as complete. This creates a historical record in MILESTONES.md, performs full PROJECT.md evolution review, reorganizes ROADMAP.md with milestone groupings, and tags the release in git.
4
-
5
- This is the ritual that separates "development" from "shipped."
3
+ Mark a shipped version (v1.0, v1.1, v2.0) as complete. Creates historical record in MILESTONES.md, performs full PROJECT.md evolution review, reorganizes ROADMAP.md with milestone groupings, and tags the release in git.
6
4
 
7
5
  </purpose>
8
6
 
9
7
  <required_reading>
10
8
 
11
- **Read these files NOW:**
12
-
13
9
  1. templates/milestone.md
14
10
  2. templates/milestone-archive.md
15
11
  3. `.planning/ROADMAP.md`
@@ -20,33 +16,20 @@ This is the ritual that separates "development" from "shipped."
20
16
 
21
17
  <archival_behavior>
22
18
 
23
- When a milestone completes, this workflow:
24
-
25
- 1. Extracts full milestone details to `.planning/milestones/v[X.Y]-ROADMAP.md`
26
- 2. Archives requirements to `.planning/milestones/v[X.Y]-REQUIREMENTS.md`
27
- 3. Updates ROADMAP.md to replace milestone details with one-line summary
28
- 4. Deletes REQUIREMENTS.md (fresh one created for next milestone)
29
- 5. Performs full PROJECT.md evolution review
30
- 6. Offers to create next milestone inline
31
-
32
- **Context Efficiency:**
19
+ When a milestone completes:
33
20
 
34
- - Completed milestones: One line each (~50 tokens)
35
- - Full details: In archive files (loaded only when needed)
36
- - Result: ROADMAP.md stays constant size forever
37
- - Result: REQUIREMENTS.md is always milestone-scoped (not cumulative)
21
+ 1. Extract full milestone details to `.planning/milestones/v[X.Y]-ROADMAP.md`
22
+ 2. Archive requirements to `.planning/milestones/v[X.Y]-REQUIREMENTS.md`
23
+ 3. Update ROADMAP.md replace milestone details with one-line summary
24
+ 4. Delete REQUIREMENTS.md (fresh one for next milestone)
25
+ 5. Perform full PROJECT.md evolution review
26
+ 6. Offer to create next milestone inline
38
27
 
39
- **Archive Format:**
28
+ **Context Efficiency:** Archives keep ROADMAP.md constant-size and REQUIREMENTS.md milestone-scoped.
40
29
 
41
- **ROADMAP archive** uses `templates/milestone-archive.md` template with:
42
- - Milestone header (status, phases, date)
43
- - Full phase details from roadmap
44
- - Milestone summary (decisions, issues, technical debt)
30
+ **ROADMAP archive** uses `templates/milestone-archive.md` includes milestone header (status, phases, date), full phase details, milestone summary (decisions, issues, tech debt).
45
31
 
46
- **REQUIREMENTS archive** contains:
47
- - All v1 requirements marked complete with outcomes
48
- - Traceability table with final status
49
- - Notes on any requirements that changed during milestone
32
+ **REQUIREMENTS archive** contains all requirements marked complete with outcomes, traceability table with final status, notes on changed requirements.
50
33
 
51
34
  </archival_behavior>
52
35
 
@@ -54,32 +37,29 @@ When a milestone completes, this workflow:
54
37
 
55
38
  <step name="verify_readiness">
56
39
 
57
- Check if milestone is truly complete:
40
+ **Use `roadmap analyze` for comprehensive readiness check:**
58
41
 
59
42
  ```bash
60
- cat .planning/ROADMAP.md
61
- ls .planning/phases/*/SUMMARY.md 2>/dev/null | wc -l
43
+ ROADMAP=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs roadmap analyze)
62
44
  ```
63
45
 
64
- **Questions to ask:**
65
-
46
+ This returns all phases with plan/summary counts and disk status. Use this to verify:
66
47
  - Which phases belong to this milestone?
67
- - Are all those phases complete (all plans have summaries)?
68
- - Has the work been tested/validated?
69
- - Is this ready to ship/tag?
48
+ - All phases complete (all plans have summaries)? Check `disk_status === 'complete'` for each.
49
+ - `progress_percent` should be 100%.
70
50
 
71
51
  Present:
72
52
 
73
53
  ```
74
- Milestone: [Name from user, e.g., "v1.0 MVP"]
54
+ Milestone: [Name, e.g., "v1.0 MVP"]
75
55
 
76
- Appears to include:
56
+ Includes:
77
57
  - Phase 1: Foundation (2/2 plans complete)
78
58
  - Phase 2: Authentication (2/2 plans complete)
79
59
  - Phase 3: Core Features (3/3 plans complete)
80
60
  - Phase 4: Polish (1/1 plan complete)
81
61
 
82
- Total: 4 phases, 8 plans, all complete
62
+ Total: {phase_count} phases, {total_plans} plans, all complete
83
63
  ```
84
64
 
85
65
  <config-check>
@@ -94,13 +74,11 @@ cat .planning/config.json 2>/dev/null
94
74
 
95
75
  ```
96
76
  ⚡ Auto-approved: Milestone scope verification
97
-
98
77
  [Show breakdown summary without prompting]
99
-
100
78
  Proceeding to stats gathering...
101
79
  ```
102
80
 
103
- Proceed directly to gather_stats step.
81
+ Proceed to gather_stats.
104
82
 
105
83
  </if>
106
84
 
@@ -112,9 +90,8 @@ Ready to mark this milestone as shipped?
112
90
  ```
113
91
 
114
92
  Wait for confirmation.
115
-
116
- If "adjust scope": Ask which phases should be included.
117
- If "wait": Stop, user will return when ready.
93
+ - "adjust scope": Ask which phases to include.
94
+ - "wait": Stop, user returns when ready.
118
95
 
119
96
  </if>
120
97
 
@@ -125,30 +102,20 @@ If "wait": Stop, user will return when ready.
125
102
  Calculate milestone statistics:
126
103
 
127
104
  ```bash
128
- # Count phases and plans in milestone
129
- # (user specified or detected from roadmap)
130
-
131
- # Find git range
132
105
  git log --oneline --grep="feat(" | head -20
133
-
134
- # Count files modified in range
135
106
  git diff --stat FIRST_COMMIT..LAST_COMMIT | tail -1
136
-
137
- # Count LOC (adapt to language)
138
107
  find . -name "*.swift" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null
139
-
140
- # Calculate timeline
141
- git log --format="%ai" FIRST_COMMIT | tail -1 # Start date
142
- git log --format="%ai" LAST_COMMIT | head -1 # End date
108
+ git log --format="%ai" FIRST_COMMIT | tail -1
109
+ git log --format="%ai" LAST_COMMIT | head -1
143
110
  ```
144
111
 
145
- Present summary:
112
+ Present:
146
113
 
147
114
  ```
148
115
  Milestone Stats:
149
116
  - Phases: [X-Y]
150
117
  - Plans: [Z] total
151
- - Tasks: [N] total (estimated from phase summaries)
118
+ - Tasks: [N] total (from phase summaries)
152
119
  - Files modified: [M]
153
120
  - Lines of code: [LOC] [language]
154
121
  - Timeline: [Days] days ([Start] → [End])
@@ -159,17 +126,16 @@ Milestone Stats:
159
126
 
160
127
  <step name="extract_accomplishments">
161
128
 
162
- Read all phase SUMMARY.md files in milestone range:
129
+ Extract one-liners from SUMMARY.md files using summary-extract:
163
130
 
164
131
  ```bash
165
- cat .planning/phases/01-*/01-*-SUMMARY.md
166
- cat .planning/phases/02-*/02-*-SUMMARY.md
167
- # ... for each phase in milestone
132
+ # For each phase in milestone, extract one-liner
133
+ for summary in .planning/phases/*-*/*-SUMMARY.md; do
134
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs summary-extract "$summary" --fields one_liner | jq -r '.one_liner'
135
+ done
168
136
  ```
169
137
 
170
- From summaries, extract 4-6 key accomplishments.
171
-
172
- Present:
138
+ Extract 4-6 key accomplishments. Present:
173
139
 
174
140
  ```
175
141
  Key accomplishments for this milestone:
@@ -184,52 +150,17 @@ Key accomplishments for this milestone:
184
150
 
185
151
  <step name="create_milestone_entry">
186
152
 
187
- Create or update `.planning/MILESTONES.md`.
188
-
189
- If file doesn't exist:
190
-
191
- ```markdown
192
- # Project Milestones: [Project Name from PROJECT.md]
193
-
194
- [New entry]
195
- ```
196
-
197
- If exists, prepend new entry (reverse chronological order).
198
-
199
- Use template from `templates/milestone.md`:
200
-
201
- ```markdown
202
- ## v[Version] [Name] (Shipped: YYYY-MM-DD)
203
-
204
- **Delivered:** [One sentence from user]
205
-
206
- **Phases completed:** [X-Y] ([Z] plans total)
207
-
208
- **Key accomplishments:**
209
-
210
- - [List from previous step]
153
+ **Note:** MILESTONES.md entry is now created automatically by `gsd-tools milestone complete` in the archive_milestone step. The entry includes version, date, phase/plan/task counts, and accomplishments extracted from SUMMARY.md files.
211
154
 
212
- **Stats:**
213
-
214
- - [Files] files created/modified
215
- - [LOC] lines of [language]
216
- - [Phases] phases, [Plans] plans, [Tasks] tasks
217
- - [Days] days from [start milestone or start project] to ship
218
-
219
- **Git range:** `feat(XX-XX)` → `feat(YY-YY)`
220
-
221
- **What's next:** [Ask user: what's the next goal?]
222
-
223
- ---
224
- ```
155
+ If additional details are needed (e.g., user-provided "Delivered" summary, git range, LOC stats), add them manually after the CLI creates the base entry.
225
156
 
226
157
  </step>
227
158
 
228
159
  <step name="evolve_project_full_review">
229
160
 
230
- Perform full PROJECT.md evolution review at milestone completion.
161
+ Full PROJECT.md evolution review at milestone completion.
231
162
 
232
- **Read all phase summaries in this milestone:**
163
+ Read all phase summaries:
233
164
 
234
165
  ```bash
235
166
  cat .planning/phases/*-*/*-SUMMARY.md
@@ -238,48 +169,43 @@ cat .planning/phases/*-*/*-SUMMARY.md
238
169
  **Full review checklist:**
239
170
 
240
171
  1. **"What This Is" accuracy:**
241
- - Read current description
242
- - Compare to what was actually built
243
- - Update if the product has meaningfully changed
172
+ - Compare current description to what was built
173
+ - Update if product has meaningfully changed
244
174
 
245
175
  2. **Core Value check:**
246
- - Is the stated core value still the right priority?
247
- - Did shipping reveal a different core value?
176
+ - Still the right priority? Did shipping reveal a different core value?
248
177
  - Update if the ONE thing has shifted
249
178
 
250
179
  3. **Requirements audit:**
251
180
 
252
181
  **Validated section:**
253
- - All Active requirements shipped in this milestone → Move to Validated
182
+ - All Active requirements shipped this milestone → Move to Validated
254
183
  - Format: `- ✓ [Requirement] — v[X.Y]`
255
184
 
256
185
  **Active section:**
257
- - Remove requirements that moved to Validated
258
- - Add any new requirements for next milestone
259
- - Keep requirements that weren't addressed yet
186
+ - Remove requirements moved to Validated
187
+ - Add new requirements for next milestone
188
+ - Keep unaddressed requirements
260
189
 
261
190
  **Out of Scope audit:**
262
- - Review each item — is the reasoning still valid?
263
- - Remove items that are no longer relevant
264
- - Add any requirements invalidated during this milestone
191
+ - Review each item — reasoning still valid?
192
+ - Remove irrelevant items
193
+ - Add requirements invalidated during milestone
265
194
 
266
195
  4. **Context update:**
267
196
  - Current codebase state (LOC, tech stack)
268
197
  - User feedback themes (if any)
269
- - Known issues or technical debt to address
198
+ - Known issues or technical debt
270
199
 
271
200
  5. **Key Decisions audit:**
272
201
  - Extract all decisions from milestone phase summaries
273
- - Add to Key Decisions table with outcomes where known
274
- - Mark ✓ Good, ⚠️ Revisit, or — Pending for each
202
+ - Add to Key Decisions table with outcomes
203
+ - Mark ✓ Good, ⚠️ Revisit, or — Pending
275
204
 
276
205
  6. **Constraints check:**
277
- - Any constraints that changed during development?
278
- - Update as needed
279
-
280
- **Update PROJECT.md:**
206
+ - Any constraints changed during development? Update as needed
281
207
 
282
- Make all edits inline. Update "Last updated" footer:
208
+ Update PROJECT.md inline. Update "Last updated" footer:
283
209
 
284
210
  ```markdown
285
211
  ---
@@ -371,9 +297,7 @@ Initial user testing showed demand for shape tools.
371
297
 
372
298
  <step name="reorganize_roadmap">
373
299
 
374
- Update `.planning/ROADMAP.md` to group completed milestone phases.
375
-
376
- Add milestone headers and collapse completed work:
300
+ Update `.planning/ROADMAP.md` group completed milestone phases:
377
301
 
378
302
  ```markdown
379
303
  # Roadmap: [Project Name]
@@ -417,180 +341,230 @@ Add milestone headers and collapse completed work:
417
341
 
418
342
  <step name="archive_milestone">
419
343
 
420
- Extract completed milestone details and create archive file.
421
-
422
- **Process:**
344
+ **Delegate archival to gsd-tools:**
423
345
 
424
- 1. Create archive file path: `.planning/milestones/v[X.Y]-ROADMAP.md`
346
+ ```bash
347
+ ARCHIVE=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs milestone complete "v[X.Y]" --name "[Milestone Name]")
348
+ ```
425
349
 
426
- 2. Read `~/.claude/get-shit-done/templates/milestone-archive.md` template
350
+ The CLI handles:
351
+ - Creating `.planning/milestones/` directory
352
+ - Archiving ROADMAP.md to `milestones/v[X.Y]-ROADMAP.md`
353
+ - Archiving REQUIREMENTS.md to `milestones/v[X.Y]-REQUIREMENTS.md` with archive header
354
+ - Moving audit file to milestones if it exists
355
+ - Creating/appending MILESTONES.md entry with accomplishments from SUMMARY.md files
356
+ - Updating STATE.md (status, last activity)
427
357
 
428
- 3. Extract data from current ROADMAP.md:
429
- - All phases belonging to this milestone (by phase number range)
430
- - Full phase details (goals, plans, dependencies, status)
431
- - Phase plan lists with completion checkmarks
358
+ Extract from result: `version`, `date`, `phases`, `plans`, `tasks`, `accomplishments`, `archived`.
432
359
 
433
- 4. Extract data from PROJECT.md:
434
- - Key decisions made during this milestone
435
- - Requirements that were validated
360
+ Verify: `✅ Milestone archived to .planning/milestones/`
436
361
 
437
- 5. Fill template {{PLACEHOLDERS}}:
438
- - {{VERSION}} — Milestone version (e.g., "1.0")
439
- - {{MILESTONE_NAME}} — From ROADMAP.md milestone header
440
- - {{DATE}} — Today's date
441
- - {{PHASE_START}} — First phase number in milestone
442
- - {{PHASE_END}} — Last phase number in milestone
443
- - {{TOTAL_PLANS}} — Count of all plans in milestone
444
- - {{MILESTONE_DESCRIPTION}} — From ROADMAP.md overview
445
- - {{PHASES_SECTION}} — Full phase details extracted
446
- - {{DECISIONS_FROM_PROJECT}} — Key decisions from PROJECT.md
447
- - {{ISSUES_RESOLVED_DURING_MILESTONE}} — From summaries
362
+ **Phase archival (optional):** After archival completes, ask the user:
448
363
 
449
- 6. Write filled template to `.planning/milestones/v[X.Y]-ROADMAP.md`
364
+ AskUserQuestion(header="Archive Phases", question="Archive phase directories to milestones/?", options: "Yes — move to milestones/v[X.Y]-phases/" | "Skip — keep phases in place")
450
365
 
451
- 7. Delete ROADMAP.md (fresh one created for next milestone):
452
- ```bash
453
- rm .planning/ROADMAP.md
454
- ```
366
+ If "Yes": move phase directories to the milestone archive:
367
+ ```bash
368
+ mkdir -p .planning/milestones/v[X.Y]-phases
369
+ # For each phase directory in .planning/phases/:
370
+ mv .planning/phases/{phase-dir} .planning/milestones/v[X.Y]-phases/
371
+ ```
372
+ Verify: `✅ Phase directories archived to .planning/milestones/v[X.Y]-phases/`
455
373
 
456
- 8. Verify archive exists:
457
- ```bash
458
- ls .planning/milestones/v[X.Y]-ROADMAP.md
459
- ```
374
+ If "Skip": Phase directories remain in `.planning/phases/` as raw execution history. Use `/gsd:cleanup` later to archive retroactively.
460
375
 
461
- 9. Confirm roadmap archive complete:
376
+ After archival, the AI still handles:
377
+ - Reorganizing ROADMAP.md with milestone grouping (requires judgment)
378
+ - Full PROJECT.md evolution review (requires understanding)
379
+ - Deleting original ROADMAP.md and REQUIREMENTS.md
380
+ - These are NOT fully delegated because they require AI interpretation of content
462
381
 
463
- ```
464
- ✅ v[X.Y] roadmap archived to milestones/v[X.Y]-ROADMAP.md
465
- ✅ ROADMAP.md deleted (fresh one for next milestone)
466
- ```
382
+ </step>
467
383
 
468
- **Note:** Phase directories (`.planning/phases/`) are NOT deleted. They accumulate across milestones as the raw execution history. Phase numbering continues (v1.0 phases 1-4, v1.1 phases 5-8, etc.).
384
+ <step name="reorganize_roadmap_and_delete_originals">
469
385
 
470
- </step>
386
+ After `milestone complete` has archived, reorganize ROADMAP.md with milestone groupings, then delete originals:
471
387
 
472
- <step name="archive_requirements">
388
+ **Reorganize ROADMAP.md** — group completed milestone phases:
473
389
 
474
- Archive requirements and prepare for fresh requirements in next milestone.
390
+ ```markdown
391
+ # Roadmap: [Project Name]
475
392
 
476
- **Process:**
393
+ ## Milestones
477
394
 
478
- 1. Read current REQUIREMENTS.md:
479
- ```bash
480
- cat .planning/REQUIREMENTS.md
481
- ```
395
+ - ✅ **v1.0 MVP** Phases 1-4 (shipped YYYY-MM-DD)
396
+ - 🚧 **v1.1 Security** — Phases 5-6 (in progress)
482
397
 
483
- 2. Create archive file: `.planning/milestones/v[X.Y]-REQUIREMENTS.md`
398
+ ## Phases
484
399
 
485
- 3. Transform requirements for archive:
486
- - Mark all v1 requirements as `[x]` complete
487
- - Add outcome notes where relevant (validated, adjusted, dropped)
488
- - Update traceability table status to "Complete" for all shipped requirements
489
- - Add "Milestone Summary" section with:
490
- - Total requirements shipped
491
- - Any requirements that changed scope during milestone
492
- - Any requirements dropped and why
400
+ <details>
401
+ <summary>✅ v1.0 MVP (Phases 1-4) SHIPPED YYYY-MM-DD</summary>
493
402
 
494
- 4. Write archive file with header:
495
- ```markdown
496
- # Requirements Archive: v[X.Y] [Milestone Name]
403
+ - [x] Phase 1: Foundation (2/2 plans) — completed YYYY-MM-DD
404
+ - [x] Phase 2: Authentication (2/2 plans) — completed YYYY-MM-DD
497
405
 
498
- **Archived:** [DATE]
499
- **Status:** ✅ SHIPPED
406
+ </details>
407
+ ```
500
408
 
501
- This is the archived requirements specification for v[X.Y].
502
- For current requirements, see `.planning/REQUIREMENTS.md` (created for next milestone).
409
+ **Then delete originals:**
503
410
 
504
- ---
411
+ ```bash
412
+ rm .planning/ROADMAP.md
413
+ rm .planning/REQUIREMENTS.md
414
+ ```
505
415
 
506
- [Full REQUIREMENTS.md content with checkboxes marked complete]
416
+ </step>
507
417
 
508
- ---
418
+ <step name="update_state">
509
419
 
510
- ## Milestone Summary
420
+ Most STATE.md updates were handled by `milestone complete`, but verify and update remaining fields:
511
421
 
512
- **Shipped:** [X] of [Y] v1 requirements
513
- **Adjusted:** [list any requirements that changed during implementation]
514
- **Dropped:** [list any requirements removed and why]
422
+ **Project Reference:**
515
423
 
516
- ---
517
- *Archived: [DATE] as part of v[X.Y] milestone completion*
518
- ```
424
+ ```markdown
425
+ ## Project Reference
519
426
 
520
- 5. Delete original REQUIREMENTS.md:
521
- ```bash
522
- rm .planning/REQUIREMENTS.md
523
- ```
427
+ See: .planning/PROJECT.md (updated [today])
524
428
 
525
- 6. Confirm:
526
- ```
527
- ✅ Requirements archived to milestones/v[X.Y]-REQUIREMENTS.md
528
- ✅ REQUIREMENTS.md deleted (fresh one needed for next milestone)
529
- ```
429
+ **Core value:** [Current core value from PROJECT.md]
430
+ **Current focus:** [Next milestone or "Planning next milestone"]
431
+ ```
530
432
 
531
- **Important:** The next milestone workflow starts with `/gsd:new-milestone` which includes requirements definition. PROJECT.md's Validated section carries the cumulative record across milestones.
433
+ **Accumulated Context:**
434
+ - Clear decisions summary (full log in PROJECT.md)
435
+ - Clear resolved blockers
436
+ - Keep open blockers for next milestone
532
437
 
533
438
  </step>
534
439
 
535
- <step name="archive_audit">
440
+ <step name="handle_branches">
536
441
 
537
- Move the milestone audit file to the archive (if it exists):
442
+ Check branching strategy and offer merge options.
443
+
444
+ Use `init milestone-op` for context, or load config directly:
538
445
 
539
446
  ```bash
540
- # Move audit to milestones folder (if exists)
541
- [ -f .planning/v[X.Y]-MILESTONE-AUDIT.md ] && mv .planning/v[X.Y]-MILESTONE-AUDIT.md .planning/milestones/
447
+ INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init execute-phase "1")
542
448
  ```
543
449
 
544
- Confirm:
450
+ Extract `branching_strategy`, `phase_branch_template`, `milestone_branch_template`, and `commit_docs` from init JSON.
451
+
452
+ **If "none":** Skip to git_tag.
453
+
454
+ **For "phase" strategy:**
455
+
456
+ ```bash
457
+ BRANCH_PREFIX=$(echo "$PHASE_BRANCH_TEMPLATE" | sed 's/{.*//')
458
+ PHASE_BRANCHES=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ')
545
459
  ```
546
- ✅ Audit archived to milestones/v[X.Y]-MILESTONE-AUDIT.md
460
+
461
+ **For "milestone" strategy:**
462
+
463
+ ```bash
464
+ BRANCH_PREFIX=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed 's/{.*//')
465
+ MILESTONE_BRANCH=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ' | head -1)
547
466
  ```
548
467
 
549
- (Skip silently if no audit file exists audit is optional)
468
+ **If no branches found:** Skip to git_tag.
550
469
 
551
- </step>
470
+ **If branches exist:**
552
471
 
553
- <step name="update_state">
472
+ ```
473
+ ## Git Branches Detected
554
474
 
555
- Update STATE.md to reflect milestone completion.
475
+ Branching strategy: {phase/milestone}
476
+ Branches: {list}
556
477
 
557
- **Project Reference:**
478
+ Options:
479
+ 1. **Merge to main** — Merge branch(es) to main
480
+ 2. **Delete without merging** — Already merged or not needed
481
+ 3. **Keep branches** — Leave for manual handling
482
+ ```
558
483
 
559
- ```markdown
560
- ## Project Reference
484
+ AskUserQuestion with options: Squash merge (Recommended), Merge with history, Delete without merging, Keep branches.
561
485
 
562
- See: .planning/PROJECT.md (updated [today])
486
+ **Squash merge:**
563
487
 
564
- **Core value:** [Current core value from PROJECT.md]
565
- **Current focus:** [Next milestone or "Planning next milestone"]
488
+ ```bash
489
+ CURRENT_BRANCH=$(git branch --show-current)
490
+ git checkout main
491
+
492
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
493
+ for branch in $PHASE_BRANCHES; do
494
+ git merge --squash "$branch"
495
+ # Strip .planning/ from staging if commit_docs is false
496
+ if [ "$COMMIT_DOCS" = "false" ]; then
497
+ git reset HEAD .planning/ 2>/dev/null || true
498
+ fi
499
+ git commit -m "feat: $branch for v[X.Y]"
500
+ done
501
+ fi
502
+
503
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
504
+ git merge --squash "$MILESTONE_BRANCH"
505
+ # Strip .planning/ from staging if commit_docs is false
506
+ if [ "$COMMIT_DOCS" = "false" ]; then
507
+ git reset HEAD .planning/ 2>/dev/null || true
508
+ fi
509
+ git commit -m "feat: $MILESTONE_BRANCH for v[X.Y]"
510
+ fi
511
+
512
+ git checkout "$CURRENT_BRANCH"
566
513
  ```
567
514
 
568
- **Current Position:**
569
-
570
- ```markdown
571
- Phase: [Next phase] of [Total] ([Phase name])
572
- Plan: Not started
573
- Status: Ready to plan
574
- Last activity: [today] — v[X.Y] milestone complete
515
+ **Merge with history:**
575
516
 
576
- Progress: [updated progress bar]
517
+ ```bash
518
+ CURRENT_BRANCH=$(git branch --show-current)
519
+ git checkout main
520
+
521
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
522
+ for branch in $PHASE_BRANCHES; do
523
+ git merge --no-ff --no-commit "$branch"
524
+ # Strip .planning/ from staging if commit_docs is false
525
+ if [ "$COMMIT_DOCS" = "false" ]; then
526
+ git reset HEAD .planning/ 2>/dev/null || true
527
+ fi
528
+ git commit -m "Merge branch '$branch' for v[X.Y]"
529
+ done
530
+ fi
531
+
532
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
533
+ git merge --no-ff --no-commit "$MILESTONE_BRANCH"
534
+ # Strip .planning/ from staging if commit_docs is false
535
+ if [ "$COMMIT_DOCS" = "false" ]; then
536
+ git reset HEAD .planning/ 2>/dev/null || true
537
+ fi
538
+ git commit -m "Merge branch '$MILESTONE_BRANCH' for v[X.Y]"
539
+ fi
540
+
541
+ git checkout "$CURRENT_BRANCH"
577
542
  ```
578
543
 
579
- **Accumulated Context:**
544
+ **Delete without merging:**
580
545
 
581
- - Clear decisions summary (full log in PROJECT.md)
582
- - Clear resolved blockers
583
- - Keep open blockers for next milestone
546
+ ```bash
547
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
548
+ for branch in $PHASE_BRANCHES; do
549
+ git branch -d "$branch" 2>/dev/null || git branch -D "$branch"
550
+ done
551
+ fi
552
+
553
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
554
+ git branch -d "$MILESTONE_BRANCH" 2>/dev/null || git branch -D "$MILESTONE_BRANCH"
555
+ fi
556
+ ```
557
+
558
+ **Keep branches:** Report "Branches preserved for manual handling"
584
559
 
585
560
  </step>
586
561
 
587
562
  <step name="git_tag">
588
563
 
589
- Create git tag for milestone:
564
+ Create git tag:
590
565
 
591
566
  ```bash
592
- git tag -a v[X.Y] -m "$(cat <<'EOF'
593
- v[X.Y] [Name]
567
+ git tag -a v[X.Y] -m "v[X.Y] [Name]
594
568
 
595
569
  Delivered: [One sentence]
596
570
 
@@ -599,9 +573,7 @@ Key accomplishments:
599
573
  - [Item 2]
600
574
  - [Item 3]
601
575
 
602
- See .planning/MILESTONES.md for full details.
603
- EOF
604
- )"
576
+ See .planning/MILESTONES.md for full details."
605
577
  ```
606
578
 
607
579
  Confirm: "Tagged: v[X.Y]"
@@ -609,7 +581,6 @@ Confirm: "Tagged: v[X.Y]"
609
581
  Ask: "Push tag to remote? (y/n)"
610
582
 
611
583
  If yes:
612
-
613
584
  ```bash
614
585
  git push origin v[X.Y]
615
586
  ```
@@ -618,43 +589,11 @@ git push origin v[X.Y]
618
589
 
619
590
  <step name="git_commit_milestone">
620
591
 
621
- Commit milestone completion including archive files and deletions.
592
+ Commit milestone completion.
622
593
 
623
594
  ```bash
624
- # Stage archive files (new)
625
- git add .planning/milestones/v[X.Y]-ROADMAP.md
626
- git add .planning/milestones/v[X.Y]-REQUIREMENTS.md
627
- git add .planning/milestones/v[X.Y]-MILESTONE-AUDIT.md 2>/dev/null || true
628
-
629
- # Stage updated files
630
- git add .planning/MILESTONES.md
631
- git add .planning/PROJECT.md
632
- git add .planning/STATE.md
633
-
634
- # Stage deletions
635
- git add -u .planning/
636
-
637
- # Commit with descriptive message
638
- git commit -m "$(cat <<'EOF'
639
- chore: complete v[X.Y] milestone
640
-
641
- Archived:
642
- - milestones/v[X.Y]-ROADMAP.md
643
- - milestones/v[X.Y]-REQUIREMENTS.md
644
- - milestones/v[X.Y]-MILESTONE-AUDIT.md (if audit was run)
645
-
646
- Deleted (fresh for next milestone):
647
- - ROADMAP.md
648
- - REQUIREMENTS.md
649
-
650
- Updated:
651
- - MILESTONES.md (new entry)
652
- - PROJECT.md (requirements → Validated)
653
- - STATE.md (reset for next milestone)
654
-
655
- Tagged: v[X.Y]
656
- EOF
657
- )"
595
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "chore: complete v[X.Y] milestone" --files .planning/milestones/v[X.Y]-ROADMAP.md .planning/milestones/v[X.Y]-REQUIREMENTS.md .planning/milestones/v[X.Y]-MILESTONE-AUDIT.md .planning/MILESTONES.md .planning/PROJECT.md .planning/STATE.md
596
+ ```
658
597
  ```
659
598
 
660
599
  Confirm: "Committed: chore: complete v[X.Y] milestone"
@@ -698,35 +637,20 @@ Tag: v[X.Y]
698
637
 
699
638
  **Version conventions:**
700
639
  - **v1.0** — Initial MVP
701
- - **v1.1, v1.2, v1.3** — Minor updates, new features, fixes
702
- - **v2.0, v3.0** — Major rewrites, breaking changes, significant new direction
703
-
704
- **Name conventions:**
705
- - v1.0 MVP
706
- - v1.1 Security
707
- - v1.2 Performance
708
- - v2.0 Redesign
709
- - v2.0 iOS Launch
640
+ - **v1.1, v1.2** — Minor updates, new features, fixes
641
+ - **v2.0, v3.0** — Major rewrites, breaking changes, new direction
710
642
 
711
- Keep names short (1-2 words describing the focus).
643
+ **Names:** Short 1-2 words (v1.0 MVP, v1.1 Security, v1.2 Performance, v2.0 Redesign).
712
644
 
713
645
  </milestone_naming>
714
646
 
715
647
  <what_qualifies>
716
648
 
717
- **Create milestones for:**
718
- - Initial release (v1.0)
719
- - Public releases
720
- - Major feature sets shipped
721
- - Before archiving planning
649
+ **Create milestones for:** Initial release, public releases, major feature sets shipped, before archiving planning.
722
650
 
723
- **Don't create milestones for:**
724
- - Every phase completion (too granular)
725
- - Work in progress (wait until shipped)
726
- - Internal dev iterations (unless truly shipped internally)
651
+ **Don't create milestones for:** Every phase completion (too granular), work in progress, internal dev iterations (unless truly shipped).
727
652
 
728
- If uncertain, ask: "Is this deployed/usable/shipped in some form?"
729
- If yes → milestone. If no → keep working.
653
+ Heuristic: "Is this deployed/usable/shipped?" If yes → milestone. If no → keep working.
730
654
 
731
655
  </what_qualifies>
732
656