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,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,34 +37,54 @@ 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 ~/.config/opencode/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%.
50
+
51
+ **Requirements completion check (REQUIRED before presenting):**
52
+
53
+ Parse REQUIREMENTS.md traceability table:
54
+ - Count total v1 requirements vs checked-off (`[x]`) requirements
55
+ - Identify any non-Complete rows in the traceability table
70
56
 
71
57
  Present:
72
58
 
73
59
  ```
74
- Milestone: [Name from user, e.g., "v1.0 MVP"]
60
+ Milestone: [Name, e.g., "v1.0 MVP"]
75
61
 
76
- Appears to include:
62
+ Includes:
77
63
  - Phase 1: Foundation (2/2 plans complete)
78
64
  - Phase 2: Authentication (2/2 plans complete)
79
65
  - Phase 3: Core Features (3/3 plans complete)
80
66
  - Phase 4: Polish (1/1 plan complete)
81
67
 
82
- Total: 4 phases, 8 plans, all complete
68
+ Total: {phase_count} phases, {total_plans} plans, all complete
69
+ Requirements: {N}/{M} v1 requirements checked off
70
+ ```
71
+
72
+ **If requirements incomplete** (N < M):
73
+
74
+ ```
75
+ ⚠ Unchecked Requirements:
76
+
77
+ - [ ] {REQ-ID}: {description} (Phase {X})
78
+ - [ ] {REQ-ID}: {description} (Phase {Y})
83
79
  ```
84
80
 
81
+ MUST present 3 options:
82
+ 1. **Proceed anyway** — mark milestone complete with known gaps
83
+ 2. **Run audit first** — `/gsd-audit-milestone` to assess gap severity
84
+ 3. **Abort** — return to development
85
+
86
+ If user selects "Proceed anyway": note incomplete requirements in MILESTONES.md under `### Known Gaps` with REQ-IDs and descriptions.
87
+
85
88
  <config-check>
86
89
 
87
90
  ```bash
@@ -94,13 +97,11 @@ cat .planning/config.json 2>/dev/null
94
97
 
95
98
  ```
96
99
  ⚡ Auto-approved: Milestone scope verification
97
-
98
100
  [Show breakdown summary without prompting]
99
-
100
101
  Proceeding to stats gathering...
101
102
  ```
102
103
 
103
- Proceed directly to gather_stats step.
104
+ Proceed to gather_stats.
104
105
 
105
106
  </if>
106
107
 
@@ -112,9 +113,8 @@ Ready to mark this milestone as shipped?
112
113
  ```
113
114
 
114
115
  Wait for confirmation.
115
-
116
- If "adjust scope": Ask which phases should be included.
117
- If "wait": Stop, user will return when ready.
116
+ - "adjust scope": Ask which phases to include.
117
+ - "wait": Stop, user returns when ready.
118
118
 
119
119
  </if>
120
120
 
@@ -125,30 +125,20 @@ If "wait": Stop, user will return when ready.
125
125
  Calculate milestone statistics:
126
126
 
127
127
  ```bash
128
- # Count phases and plans in milestone
129
- # (user specified or detected from roadmap)
130
-
131
- # Find git range
132
128
  git log --oneline --grep="feat(" | head -20
133
-
134
- # Count files modified in range
135
129
  git diff --stat FIRST_COMMIT..LAST_COMMIT | tail -1
136
-
137
- # Count LOC (adapt to language)
138
130
  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
131
+ git log --format="%ai" FIRST_COMMIT | tail -1
132
+ git log --format="%ai" LAST_COMMIT | head -1
143
133
  ```
144
134
 
145
- Present summary:
135
+ Present:
146
136
 
147
137
  ```
148
138
  Milestone Stats:
149
139
  - Phases: [X-Y]
150
140
  - Plans: [Z] total
151
- - Tasks: [N] total (estimated from phase summaries)
141
+ - Tasks: [N] total (from phase summaries)
152
142
  - Files modified: [M]
153
143
  - Lines of code: [LOC] [language]
154
144
  - Timeline: [Days] days ([Start] → [End])
@@ -159,17 +149,16 @@ Milestone Stats:
159
149
 
160
150
  <step name="extract_accomplishments">
161
151
 
162
- read all phase SUMMARY.md files in milestone range:
152
+ Extract one-liners from SUMMARY.md files using summary-extract:
163
153
 
164
154
  ```bash
165
- cat .planning/phases/01-*/01-*-SUMMARY.md
166
- cat .planning/phases/02-*/02-*-SUMMARY.md
167
- # ... for each phase in milestone
155
+ # For each phase in milestone, extract one-liner
156
+ for summary in .planning/phases/*-*/*-SUMMARY.md; do
157
+ node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs summary-extract "$summary" --fields one_liner | jq -r '.one_liner'
158
+ done
168
159
  ```
169
160
 
170
- From summaries, extract 4-6 key accomplishments.
171
-
172
- Present:
161
+ Extract 4-6 key accomplishments. Present:
173
162
 
174
163
  ```
175
164
  Key accomplishments for this milestone:
@@ -184,52 +173,17 @@ Key accomplishments for this milestone:
184
173
 
185
174
  <step name="create_milestone_entry">
186
175
 
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`:
176
+ **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.
200
177
 
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]
211
-
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
- ```
178
+ 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
179
 
226
180
  </step>
227
181
 
228
182
  <step name="evolve_project_full_review">
229
183
 
230
- Perform full PROJECT.md evolution review at milestone completion.
184
+ Full PROJECT.md evolution review at milestone completion.
231
185
 
232
- **read all phase summaries in this milestone:**
186
+ read all phase summaries:
233
187
 
234
188
  ```bash
235
189
  cat .planning/phases/*-*/*-SUMMARY.md
@@ -238,48 +192,43 @@ cat .planning/phases/*-*/*-SUMMARY.md
238
192
  **Full review checklist:**
239
193
 
240
194
  1. **"What This Is" accuracy:**
241
- - read current description
242
- - Compare to what was actually built
243
- - Update if the product has meaningfully changed
195
+ - Compare current description to what was built
196
+ - Update if product has meaningfully changed
244
197
 
245
198
  2. **Core Value check:**
246
- - Is the stated core value still the right priority?
247
- - Did shipping reveal a different core value?
199
+ - Still the right priority? Did shipping reveal a different core value?
248
200
  - Update if the ONE thing has shifted
249
201
 
250
202
  3. **Requirements audit:**
251
203
 
252
204
  **Validated section:**
253
- - All Active requirements shipped in this milestone → Move to Validated
205
+ - All Active requirements shipped this milestone → Move to Validated
254
206
  - Format: `- ✓ [Requirement] — v[X.Y]`
255
207
 
256
208
  **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
209
+ - Remove requirements moved to Validated
210
+ - Add new requirements for next milestone
211
+ - Keep unaddressed requirements
260
212
 
261
213
  **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
214
+ - Review each item — reasoning still valid?
215
+ - Remove irrelevant items
216
+ - Add requirements invalidated during milestone
265
217
 
266
218
  4. **Context update:**
267
219
  - Current codebase state (LOC, tech stack)
268
220
  - User feedback themes (if any)
269
- - Known issues or technical debt to address
221
+ - Known issues or technical debt
270
222
 
271
223
  5. **Key Decisions audit:**
272
224
  - 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
225
+ - Add to Key Decisions table with outcomes
226
+ - Mark ✓ Good, ⚠️ Revisit, or — Pending
275
227
 
276
228
  6. **Constraints check:**
277
- - Any constraints that changed during development?
278
- - Update as needed
229
+ - Any constraints changed during development? Update as needed
279
230
 
280
- **Update PROJECT.md:**
281
-
282
- Make all edits inline. Update "Last updated" footer:
231
+ Update PROJECT.md inline. Update "Last updated" footer:
283
232
 
284
233
  ```markdown
285
234
  ---
@@ -371,9 +320,7 @@ Initial user testing showed demand for shape tools.
371
320
 
372
321
  <step name="reorganize_roadmap">
373
322
 
374
- Update `.planning/ROADMAP.md` to group completed milestone phases.
375
-
376
- Add milestone headers and collapse completed work:
323
+ Update `.planning/ROADMAP.md` group completed milestone phases:
377
324
 
378
325
  ```markdown
379
326
  # Roadmap: [Project Name]
@@ -417,180 +364,230 @@ Add milestone headers and collapse completed work:
417
364
 
418
365
  <step name="archive_milestone">
419
366
 
420
- Extract completed milestone details and create archive file.
367
+ **Delegate archival to gsd-tools:**
421
368
 
422
- **Process:**
423
-
424
- 1. Create archive file path: `.planning/milestones/v[X.Y]-ROADMAP.md`
369
+ ```bash
370
+ ARCHIVE=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs milestone complete "v[X.Y]" --name "[Milestone Name]")
371
+ ```
425
372
 
426
- 2. read `~/.config/opencode/get-shit-done/templates/milestone-archive.md` template
373
+ The CLI handles:
374
+ - Creating `.planning/milestones/` directory
375
+ - Archiving ROADMAP.md to `milestones/v[X.Y]-ROADMAP.md`
376
+ - Archiving REQUIREMENTS.md to `milestones/v[X.Y]-REQUIREMENTS.md` with archive header
377
+ - Moving audit file to milestones if it exists
378
+ - Creating/appending MILESTONES.md entry with accomplishments from SUMMARY.md files
379
+ - Updating STATE.md (status, last activity)
427
380
 
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
381
+ Extract from result: `version`, `date`, `phases`, `plans`, `tasks`, `accomplishments`, `archived`.
432
382
 
433
- 4. Extract data from PROJECT.md:
434
- - Key decisions made during this milestone
435
- - Requirements that were validated
383
+ Verify: `✅ Milestone archived to .planning/milestones/`
436
384
 
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
385
+ **Phase archival (optional):** After archival completes, ask the user:
448
386
 
449
- 6. write filled template to `.planning/milestones/v[X.Y]-ROADMAP.md`
387
+ question(header="Archive Phases", question="Archive phase directories to milestones/?", options: "Yes — move to milestones/v[X.Y]-phases/" | "Skip — keep phases in place")
450
388
 
451
- 7. Delete ROADMAP.md (fresh one created for next milestone):
452
- ```bash
453
- rm .planning/ROADMAP.md
454
- ```
389
+ If "Yes": move phase directories to the milestone archive:
390
+ ```bash
391
+ mkdir -p .planning/milestones/v[X.Y]-phases
392
+ # For each phase directory in .planning/phases/:
393
+ mv .planning/phases/{phase-dir} .planning/milestones/v[X.Y]-phases/
394
+ ```
395
+ Verify: `✅ Phase directories archived to .planning/milestones/v[X.Y]-phases/`
455
396
 
456
- 8. Verify archive exists:
457
- ```bash
458
- ls .planning/milestones/v[X.Y]-ROADMAP.md
459
- ```
397
+ If "Skip": Phase directories remain in `.planning/phases/` as raw execution history. Use `/gsd-cleanup` later to archive retroactively.
460
398
 
461
- 9. Confirm roadmap archive complete:
399
+ After archival, the AI still handles:
400
+ - Reorganizing ROADMAP.md with milestone grouping (requires judgment)
401
+ - Full PROJECT.md evolution review (requires understanding)
402
+ - Deleting original ROADMAP.md and REQUIREMENTS.md
403
+ - These are NOT fully delegated because they require AI interpretation of content
462
404
 
463
- ```
464
- ✅ v[X.Y] roadmap archived to milestones/v[X.Y]-ROADMAP.md
465
- ✅ ROADMAP.md deleted (fresh one for next milestone)
466
- ```
405
+ </step>
467
406
 
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.).
407
+ <step name="reorganize_roadmap_and_delete_originals">
469
408
 
470
- </step>
409
+ After `milestone complete` has archived, reorganize ROADMAP.md with milestone groupings, then delete originals:
471
410
 
472
- <step name="archive_requirements">
411
+ **Reorganize ROADMAP.md** — group completed milestone phases:
473
412
 
474
- Archive requirements and prepare for fresh requirements in next milestone.
413
+ ```markdown
414
+ # Roadmap: [Project Name]
475
415
 
476
- **Process:**
416
+ ## Milestones
477
417
 
478
- 1. read current REQUIREMENTS.md:
479
- ```bash
480
- cat .planning/REQUIREMENTS.md
481
- ```
418
+ - ✅ **v1.0 MVP** Phases 1-4 (shipped YYYY-MM-DD)
419
+ - 🚧 **v1.1 Security** — Phases 5-6 (in progress)
482
420
 
483
- 2. Create archive file: `.planning/milestones/v[X.Y]-REQUIREMENTS.md`
421
+ ## Phases
484
422
 
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
423
+ <details>
424
+ <summary>✅ v1.0 MVP (Phases 1-4) SHIPPED YYYY-MM-DD</summary>
493
425
 
494
- 4. write archive file with header:
495
- ```markdown
496
- # Requirements Archive: v[X.Y] [Milestone Name]
426
+ - [x] Phase 1: Foundation (2/2 plans) — completed YYYY-MM-DD
427
+ - [x] Phase 2: Authentication (2/2 plans) — completed YYYY-MM-DD
497
428
 
498
- **Archived:** [DATE]
499
- **Status:** ✅ SHIPPED
429
+ </details>
430
+ ```
500
431
 
501
- This is the archived requirements specification for v[X.Y].
502
- For current requirements, see `.planning/REQUIREMENTS.md` (created for next milestone).
432
+ **Then delete originals:**
503
433
 
504
- ---
434
+ ```bash
435
+ rm .planning/ROADMAP.md
436
+ rm .planning/REQUIREMENTS.md
437
+ ```
505
438
 
506
- [Full REQUIREMENTS.md content with checkboxes marked complete]
439
+ </step>
507
440
 
508
- ---
441
+ <step name="update_state">
509
442
 
510
- ## Milestone Summary
443
+ Most STATE.md updates were handled by `milestone complete`, but verify and update remaining fields:
511
444
 
512
- **Shipped:** [X] of [Y] v1 requirements
513
- **Adjusted:** [list any requirements that changed during implementation]
514
- **Dropped:** [list any requirements removed and why]
445
+ **Project Reference:**
515
446
 
516
- ---
517
- *Archived: [DATE] as part of v[X.Y] milestone completion*
518
- ```
447
+ ```markdown
448
+ ## Project Reference
519
449
 
520
- 5. Delete original REQUIREMENTS.md:
521
- ```bash
522
- rm .planning/REQUIREMENTS.md
523
- ```
450
+ See: .planning/PROJECT.md (updated [today])
524
451
 
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
- ```
452
+ **Core value:** [Current core value from PROJECT.md]
453
+ **Current focus:** [Next milestone or "Planning next milestone"]
454
+ ```
530
455
 
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.
456
+ **Accumulated Context:**
457
+ - Clear decisions summary (full log in PROJECT.md)
458
+ - Clear resolved blockers
459
+ - Keep open blockers for next milestone
532
460
 
533
461
  </step>
534
462
 
535
- <step name="archive_audit">
463
+ <step name="handle_branches">
464
+
465
+ Check branching strategy and offer merge options.
536
466
 
537
- Move the milestone audit file to the archive (if it exists):
467
+ Use `init milestone-op` for context, or load config directly:
538
468
 
539
469
  ```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/
470
+ INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init execute-phase "1")
542
471
  ```
543
472
 
544
- Confirm:
473
+ Extract `branching_strategy`, `phase_branch_template`, `milestone_branch_template`, and `commit_docs` from init JSON.
474
+
475
+ **If "none":** Skip to git_tag.
476
+
477
+ **For "phase" strategy:**
478
+
479
+ ```bash
480
+ BRANCH_PREFIX=$(echo "$PHASE_BRANCH_TEMPLATE" | sed 's/{.*//')
481
+ PHASE_BRANCHES=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ')
545
482
  ```
546
- ✅ Audit archived to milestones/v[X.Y]-MILESTONE-AUDIT.md
483
+
484
+ **For "milestone" strategy:**
485
+
486
+ ```bash
487
+ BRANCH_PREFIX=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed 's/{.*//')
488
+ MILESTONE_BRANCH=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ' | head -1)
547
489
  ```
548
490
 
549
- (Skip silently if no audit file exists audit is optional)
491
+ **If no branches found:** Skip to git_tag.
550
492
 
551
- </step>
493
+ **If branches exist:**
552
494
 
553
- <step name="update_state">
495
+ ```
496
+ ## Git Branches Detected
554
497
 
555
- Update STATE.md to reflect milestone completion.
498
+ Branching strategy: {phase/milestone}
499
+ Branches: {list}
556
500
 
557
- **Project Reference:**
501
+ Options:
502
+ 1. **Merge to main** — Merge branch(es) to main
503
+ 2. **Delete without merging** — Already merged or not needed
504
+ 3. **Keep branches** — Leave for manual handling
505
+ ```
558
506
 
559
- ```markdown
560
- ## Project Reference
507
+ question with options: Squash merge (Recommended), Merge with history, Delete without merging, Keep branches.
561
508
 
562
- See: .planning/PROJECT.md (updated [today])
509
+ **Squash merge:**
563
510
 
564
- **Core value:** [Current core value from PROJECT.md]
565
- **Current focus:** [Next milestone or "Planning next milestone"]
566
- ```
511
+ ```bash
512
+ CURRENT_BRANCH=$(git branch --show-current)
513
+ git checkout main
514
+
515
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
516
+ for branch in $PHASE_BRANCHES; do
517
+ git merge --squash "$branch"
518
+ # Strip .planning/ from staging if commit_docs is false
519
+ if [ "$COMMIT_DOCS" = "false" ]; then
520
+ git reset HEAD .planning/ 2>/dev/null || true
521
+ fi
522
+ git commit -m "feat: $branch for v[X.Y]"
523
+ done
524
+ fi
525
+
526
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
527
+ git merge --squash "$MILESTONE_BRANCH"
528
+ # Strip .planning/ from staging if commit_docs is false
529
+ if [ "$COMMIT_DOCS" = "false" ]; then
530
+ git reset HEAD .planning/ 2>/dev/null || true
531
+ fi
532
+ git commit -m "feat: $MILESTONE_BRANCH for v[X.Y]"
533
+ fi
534
+
535
+ git checkout "$CURRENT_BRANCH"
536
+ ```
537
+
538
+ **Merge with history:**
567
539
 
568
- **Current Position:**
540
+ ```bash
541
+ CURRENT_BRANCH=$(git branch --show-current)
542
+ git checkout main
543
+
544
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
545
+ for branch in $PHASE_BRANCHES; do
546
+ git merge --no-ff --no-commit "$branch"
547
+ # Strip .planning/ from staging if commit_docs is false
548
+ if [ "$COMMIT_DOCS" = "false" ]; then
549
+ git reset HEAD .planning/ 2>/dev/null || true
550
+ fi
551
+ git commit -m "Merge branch '$branch' for v[X.Y]"
552
+ done
553
+ fi
554
+
555
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
556
+ git merge --no-ff --no-commit "$MILESTONE_BRANCH"
557
+ # Strip .planning/ from staging if commit_docs is false
558
+ if [ "$COMMIT_DOCS" = "false" ]; then
559
+ git reset HEAD .planning/ 2>/dev/null || true
560
+ fi
561
+ git commit -m "Merge branch '$MILESTONE_BRANCH' for v[X.Y]"
562
+ fi
563
+
564
+ git checkout "$CURRENT_BRANCH"
565
+ ```
566
+
567
+ **Delete without merging:**
569
568
 
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
569
+ ```bash
570
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
571
+ for branch in $PHASE_BRANCHES; do
572
+ git branch -d "$branch" 2>/dev/null || git branch -D "$branch"
573
+ done
574
+ fi
575
575
 
576
- Progress: [updated progress bar]
576
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
577
+ git branch -d "$MILESTONE_BRANCH" 2>/dev/null || git branch -D "$MILESTONE_BRANCH"
578
+ fi
577
579
  ```
578
580
 
579
- **Accumulated Context:**
580
-
581
- - Clear decisions summary (full log in PROJECT.md)
582
- - Clear resolved blockers
583
- - Keep open blockers for next milestone
581
+ **Keep branches:** Report "Branches preserved for manual handling"
584
582
 
585
583
  </step>
586
584
 
587
585
  <step name="git_tag">
588
586
 
589
- Create git tag for milestone:
587
+ Create git tag:
590
588
 
591
589
  ```bash
592
- git tag -a v[X.Y] -m "$(cat <<'EOF'
593
- v[X.Y] [Name]
590
+ git tag -a v[X.Y] -m "v[X.Y] [Name]
594
591
 
595
592
  Delivered: [One sentence]
596
593
 
@@ -599,9 +596,7 @@ Key accomplishments:
599
596
  - [Item 2]
600
597
  - [Item 3]
601
598
 
602
- See .planning/MILESTONES.md for full details.
603
- EOF
604
- )"
599
+ See .planning/MILESTONES.md for full details."
605
600
  ```
606
601
 
607
602
  Confirm: "Tagged: v[X.Y]"
@@ -609,7 +604,6 @@ Confirm: "Tagged: v[X.Y]"
609
604
  Ask: "Push tag to remote? (y/n)"
610
605
 
611
606
  If yes:
612
-
613
607
  ```bash
614
608
  git push origin v[X.Y]
615
609
  ```
@@ -618,54 +612,11 @@ git push origin v[X.Y]
618
612
 
619
613
  <step name="git_commit_milestone">
620
614
 
621
- Commit milestone completion including archive files and deletions.
622
-
623
- **Check planning config:**
615
+ Commit milestone completion.
624
616
 
625
617
  ```bash
626
- COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
627
- git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
618
+ node ~/.config/opencode/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
628
619
  ```
629
-
630
- **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
631
-
632
- **If `COMMIT_PLANNING_DOCS=true` (default):**
633
-
634
- ```bash
635
- # Stage archive files (new)
636
- git add .planning/milestones/v[X.Y]-ROADMAP.md
637
- git add .planning/milestones/v[X.Y]-REQUIREMENTS.md
638
- git add .planning/milestones/v[X.Y]-MILESTONE-AUDIT.md 2>/dev/null || true
639
-
640
- # Stage updated files
641
- git add .planning/MILESTONES.md
642
- git add .planning/PROJECT.md
643
- git add .planning/STATE.md
644
-
645
- # Stage deletions
646
- git add -u .planning/
647
-
648
- # Commit with descriptive message
649
- git commit -m "$(cat <<'EOF'
650
- chore: complete v[X.Y] milestone
651
-
652
- Archived:
653
- - milestones/v[X.Y]-ROADMAP.md
654
- - milestones/v[X.Y]-REQUIREMENTS.md
655
- - milestones/v[X.Y]-MILESTONE-AUDIT.md (if audit was run)
656
-
657
- Deleted (fresh for next milestone):
658
- - ROADMAP.md
659
- - REQUIREMENTS.md
660
-
661
- Updated:
662
- - MILESTONES.md (new entry)
663
- - PROJECT.md (requirements → Validated)
664
- - STATE.md (reset for next milestone)
665
-
666
- Tagged: v[X.Y]
667
- EOF
668
- )"
669
620
  ```
670
621
 
671
622
  Confirm: "Committed: chore: complete v[X.Y] milestone"
@@ -709,35 +660,20 @@ Tag: v[X.Y]
709
660
 
710
661
  **Version conventions:**
711
662
  - **v1.0** — Initial MVP
712
- - **v1.1, v1.2, v1.3** — Minor updates, new features, fixes
713
- - **v2.0, v3.0** — Major rewrites, breaking changes, significant new direction
714
-
715
- **Name conventions:**
716
- - v1.0 MVP
717
- - v1.1 Security
718
- - v1.2 Performance
719
- - v2.0 Redesign
720
- - v2.0 iOS Launch
663
+ - **v1.1, v1.2** — Minor updates, new features, fixes
664
+ - **v2.0, v3.0** — Major rewrites, breaking changes, new direction
721
665
 
722
- Keep names short (1-2 words describing the focus).
666
+ **Names:** Short 1-2 words (v1.0 MVP, v1.1 Security, v1.2 Performance, v2.0 Redesign).
723
667
 
724
668
  </milestone_naming>
725
669
 
726
670
  <what_qualifies>
727
671
 
728
- **Create milestones for:**
729
- - Initial release (v1.0)
730
- - Public releases
731
- - Major feature sets shipped
732
- - Before archiving planning
672
+ **Create milestones for:** Initial release, public releases, major feature sets shipped, before archiving planning.
733
673
 
734
- **Don't create milestones for:**
735
- - Every phase completion (too granular)
736
- - Work in progress (wait until shipped)
737
- - Internal dev iterations (unless truly shipped internally)
674
+ **Don't create milestones for:** Every phase completion (too granular), work in progress, internal dev iterations (unless truly shipped).
738
675
 
739
- If uncertain, ask: "Is this deployed/usable/shipped in some form?"
740
- If yes → milestone. If no → keep working.
676
+ Heuristic: "Is this deployed/usable/shipped?" If yes → milestone. If no → keep working.
741
677
 
742
678
  </what_qualifies>
743
679
 
@@ -756,6 +692,9 @@ Milestone completion is successful when:
756
692
  - [ ] STATE.md updated with fresh project reference
757
693
  - [ ] Git tag created (v[X.Y])
758
694
  - [ ] Milestone commit made (includes archive files and deletion)
695
+ - [ ] Requirements completion checked against REQUIREMENTS.md traceability table
696
+ - [ ] Incomplete requirements surfaced with proceed/audit/abort options
697
+ - [ ] Known gaps recorded in MILESTONES.md if user proceeded with incomplete requirements
759
698
  - [ ] User knows next step (/gsd-new-milestone)
760
699
 
761
700
  </success_criteria>