gsd-code-first 1.0.0

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 (238) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja-JP.md +834 -0
  3. package/README.ko-KR.md +823 -0
  4. package/README.md +937 -0
  5. package/README.pt-BR.md +452 -0
  6. package/README.zh-CN.md +800 -0
  7. package/agents/gsd-advisor-researcher.md +104 -0
  8. package/agents/gsd-annotator.md +148 -0
  9. package/agents/gsd-arc-executor.md +537 -0
  10. package/agents/gsd-arc-planner.md +374 -0
  11. package/agents/gsd-assumptions-analyzer.md +105 -0
  12. package/agents/gsd-code-planner.md +155 -0
  13. package/agents/gsd-codebase-mapper.md +770 -0
  14. package/agents/gsd-debugger.md +1373 -0
  15. package/agents/gsd-executor.md +509 -0
  16. package/agents/gsd-integration-checker.md +443 -0
  17. package/agents/gsd-nyquist-auditor.md +176 -0
  18. package/agents/gsd-phase-researcher.md +698 -0
  19. package/agents/gsd-plan-checker.md +773 -0
  20. package/agents/gsd-planner.md +1354 -0
  21. package/agents/gsd-project-researcher.md +654 -0
  22. package/agents/gsd-prototyper.md +161 -0
  23. package/agents/gsd-research-synthesizer.md +247 -0
  24. package/agents/gsd-roadmapper.md +679 -0
  25. package/agents/gsd-ui-auditor.md +439 -0
  26. package/agents/gsd-ui-checker.md +300 -0
  27. package/agents/gsd-ui-researcher.md +357 -0
  28. package/agents/gsd-user-profiler.md +171 -0
  29. package/agents/gsd-verifier.md +700 -0
  30. package/bin/install.js +5009 -0
  31. package/commands/gsd/add-backlog.md +76 -0
  32. package/commands/gsd/add-phase.md +43 -0
  33. package/commands/gsd/add-tests.md +41 -0
  34. package/commands/gsd/add-todo.md +47 -0
  35. package/commands/gsd/annotate.md +54 -0
  36. package/commands/gsd/audit-milestone.md +36 -0
  37. package/commands/gsd/audit-uat.md +24 -0
  38. package/commands/gsd/autonomous.md +41 -0
  39. package/commands/gsd/check-todos.md +45 -0
  40. package/commands/gsd/cleanup.md +18 -0
  41. package/commands/gsd/complete-milestone.md +136 -0
  42. package/commands/gsd/debug.md +173 -0
  43. package/commands/gsd/deep-plan.md +52 -0
  44. package/commands/gsd/discuss-phase.md +64 -0
  45. package/commands/gsd/do.md +30 -0
  46. package/commands/gsd/execute-phase.md +59 -0
  47. package/commands/gsd/extract-plan.md +35 -0
  48. package/commands/gsd/fast.md +30 -0
  49. package/commands/gsd/forensics.md +56 -0
  50. package/commands/gsd/health.md +22 -0
  51. package/commands/gsd/help.md +22 -0
  52. package/commands/gsd/insert-phase.md +32 -0
  53. package/commands/gsd/iterate.md +124 -0
  54. package/commands/gsd/join-discord.md +18 -0
  55. package/commands/gsd/list-phase-assumptions.md +46 -0
  56. package/commands/gsd/list-workspaces.md +19 -0
  57. package/commands/gsd/manager.md +39 -0
  58. package/commands/gsd/map-codebase.md +71 -0
  59. package/commands/gsd/milestone-summary.md +51 -0
  60. package/commands/gsd/new-milestone.md +44 -0
  61. package/commands/gsd/new-project.md +42 -0
  62. package/commands/gsd/new-workspace.md +44 -0
  63. package/commands/gsd/next.md +24 -0
  64. package/commands/gsd/note.md +34 -0
  65. package/commands/gsd/pause-work.md +38 -0
  66. package/commands/gsd/plan-milestone-gaps.md +34 -0
  67. package/commands/gsd/plan-phase.md +47 -0
  68. package/commands/gsd/plant-seed.md +28 -0
  69. package/commands/gsd/pr-branch.md +25 -0
  70. package/commands/gsd/profile-user.md +46 -0
  71. package/commands/gsd/progress.md +24 -0
  72. package/commands/gsd/prototype.md +56 -0
  73. package/commands/gsd/quick.md +47 -0
  74. package/commands/gsd/reapply-patches.md +123 -0
  75. package/commands/gsd/remove-phase.md +31 -0
  76. package/commands/gsd/remove-workspace.md +26 -0
  77. package/commands/gsd/research-phase.md +195 -0
  78. package/commands/gsd/resume-work.md +40 -0
  79. package/commands/gsd/review-backlog.md +61 -0
  80. package/commands/gsd/review.md +37 -0
  81. package/commands/gsd/session-report.md +19 -0
  82. package/commands/gsd/set-mode.md +41 -0
  83. package/commands/gsd/set-profile.md +12 -0
  84. package/commands/gsd/settings.md +36 -0
  85. package/commands/gsd/ship.md +23 -0
  86. package/commands/gsd/stats.md +18 -0
  87. package/commands/gsd/thread.md +127 -0
  88. package/commands/gsd/ui-phase.md +34 -0
  89. package/commands/gsd/ui-review.md +32 -0
  90. package/commands/gsd/update.md +37 -0
  91. package/commands/gsd/validate-phase.md +35 -0
  92. package/commands/gsd/verify-work.md +38 -0
  93. package/commands/gsd/workstreams.md +63 -0
  94. package/get-shit-done/bin/gsd-tools.cjs +946 -0
  95. package/get-shit-done/bin/lib/arc-scanner.cjs +341 -0
  96. package/get-shit-done/bin/lib/commands.cjs +959 -0
  97. package/get-shit-done/bin/lib/config.cjs +466 -0
  98. package/get-shit-done/bin/lib/core.cjs +1230 -0
  99. package/get-shit-done/bin/lib/frontmatter.cjs +336 -0
  100. package/get-shit-done/bin/lib/init.cjs +1442 -0
  101. package/get-shit-done/bin/lib/milestone.cjs +252 -0
  102. package/get-shit-done/bin/lib/model-profiles.cjs +68 -0
  103. package/get-shit-done/bin/lib/phase.cjs +888 -0
  104. package/get-shit-done/bin/lib/profile-output.cjs +952 -0
  105. package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
  106. package/get-shit-done/bin/lib/roadmap.cjs +329 -0
  107. package/get-shit-done/bin/lib/security.cjs +382 -0
  108. package/get-shit-done/bin/lib/state.cjs +1031 -0
  109. package/get-shit-done/bin/lib/template.cjs +222 -0
  110. package/get-shit-done/bin/lib/uat.cjs +282 -0
  111. package/get-shit-done/bin/lib/verify.cjs +888 -0
  112. package/get-shit-done/bin/lib/workstream.cjs +491 -0
  113. package/get-shit-done/commands/gsd/workstreams.md +63 -0
  114. package/get-shit-done/references/arc-standard.md +315 -0
  115. package/get-shit-done/references/checkpoints.md +778 -0
  116. package/get-shit-done/references/continuation-format.md +249 -0
  117. package/get-shit-done/references/decimal-phase-calculation.md +64 -0
  118. package/get-shit-done/references/git-integration.md +295 -0
  119. package/get-shit-done/references/git-planning-commit.md +38 -0
  120. package/get-shit-done/references/model-profile-resolution.md +36 -0
  121. package/get-shit-done/references/model-profiles.md +139 -0
  122. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  123. package/get-shit-done/references/planning-config.md +202 -0
  124. package/get-shit-done/references/questioning.md +162 -0
  125. package/get-shit-done/references/tdd.md +263 -0
  126. package/get-shit-done/references/ui-brand.md +160 -0
  127. package/get-shit-done/references/user-profiling.md +681 -0
  128. package/get-shit-done/references/verification-patterns.md +612 -0
  129. package/get-shit-done/references/workstream-flag.md +58 -0
  130. package/get-shit-done/templates/DEBUG.md +164 -0
  131. package/get-shit-done/templates/UAT.md +265 -0
  132. package/get-shit-done/templates/UI-SPEC.md +100 -0
  133. package/get-shit-done/templates/VALIDATION.md +76 -0
  134. package/get-shit-done/templates/claude-md.md +122 -0
  135. package/get-shit-done/templates/codebase/architecture.md +255 -0
  136. package/get-shit-done/templates/codebase/concerns.md +310 -0
  137. package/get-shit-done/templates/codebase/conventions.md +307 -0
  138. package/get-shit-done/templates/codebase/integrations.md +280 -0
  139. package/get-shit-done/templates/codebase/stack.md +186 -0
  140. package/get-shit-done/templates/codebase/structure.md +285 -0
  141. package/get-shit-done/templates/codebase/testing.md +480 -0
  142. package/get-shit-done/templates/config.json +44 -0
  143. package/get-shit-done/templates/context.md +352 -0
  144. package/get-shit-done/templates/continue-here.md +78 -0
  145. package/get-shit-done/templates/copilot-instructions.md +7 -0
  146. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  147. package/get-shit-done/templates/dev-preferences.md +21 -0
  148. package/get-shit-done/templates/discovery.md +146 -0
  149. package/get-shit-done/templates/discussion-log.md +63 -0
  150. package/get-shit-done/templates/milestone-archive.md +123 -0
  151. package/get-shit-done/templates/milestone.md +115 -0
  152. package/get-shit-done/templates/phase-prompt.md +610 -0
  153. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  154. package/get-shit-done/templates/project.md +186 -0
  155. package/get-shit-done/templates/requirements.md +231 -0
  156. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  157. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  158. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  159. package/get-shit-done/templates/research-project/STACK.md +120 -0
  160. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  161. package/get-shit-done/templates/research.md +552 -0
  162. package/get-shit-done/templates/retrospective.md +54 -0
  163. package/get-shit-done/templates/roadmap.md +202 -0
  164. package/get-shit-done/templates/state.md +176 -0
  165. package/get-shit-done/templates/summary-complex.md +59 -0
  166. package/get-shit-done/templates/summary-minimal.md +41 -0
  167. package/get-shit-done/templates/summary-standard.md +48 -0
  168. package/get-shit-done/templates/summary.md +248 -0
  169. package/get-shit-done/templates/user-profile.md +146 -0
  170. package/get-shit-done/templates/user-setup.md +311 -0
  171. package/get-shit-done/templates/verification-report.md +322 -0
  172. package/get-shit-done/workflows/add-phase.md +112 -0
  173. package/get-shit-done/workflows/add-tests.md +351 -0
  174. package/get-shit-done/workflows/add-todo.md +158 -0
  175. package/get-shit-done/workflows/audit-milestone.md +340 -0
  176. package/get-shit-done/workflows/audit-uat.md +109 -0
  177. package/get-shit-done/workflows/autonomous.md +891 -0
  178. package/get-shit-done/workflows/check-todos.md +177 -0
  179. package/get-shit-done/workflows/cleanup.md +152 -0
  180. package/get-shit-done/workflows/complete-milestone.md +767 -0
  181. package/get-shit-done/workflows/diagnose-issues.md +231 -0
  182. package/get-shit-done/workflows/discovery-phase.md +289 -0
  183. package/get-shit-done/workflows/discuss-phase-assumptions.md +653 -0
  184. package/get-shit-done/workflows/discuss-phase.md +1049 -0
  185. package/get-shit-done/workflows/do.md +104 -0
  186. package/get-shit-done/workflows/execute-phase.md +846 -0
  187. package/get-shit-done/workflows/execute-plan.md +514 -0
  188. package/get-shit-done/workflows/fast.md +105 -0
  189. package/get-shit-done/workflows/forensics.md +265 -0
  190. package/get-shit-done/workflows/health.md +181 -0
  191. package/get-shit-done/workflows/help.md +634 -0
  192. package/get-shit-done/workflows/insert-phase.md +130 -0
  193. package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
  194. package/get-shit-done/workflows/list-workspaces.md +56 -0
  195. package/get-shit-done/workflows/manager.md +362 -0
  196. package/get-shit-done/workflows/map-codebase.md +377 -0
  197. package/get-shit-done/workflows/milestone-summary.md +223 -0
  198. package/get-shit-done/workflows/new-milestone.md +486 -0
  199. package/get-shit-done/workflows/new-project.md +1250 -0
  200. package/get-shit-done/workflows/new-workspace.md +237 -0
  201. package/get-shit-done/workflows/next.md +97 -0
  202. package/get-shit-done/workflows/node-repair.md +92 -0
  203. package/get-shit-done/workflows/note.md +156 -0
  204. package/get-shit-done/workflows/pause-work.md +176 -0
  205. package/get-shit-done/workflows/plan-milestone-gaps.md +273 -0
  206. package/get-shit-done/workflows/plan-phase.md +859 -0
  207. package/get-shit-done/workflows/plant-seed.md +169 -0
  208. package/get-shit-done/workflows/pr-branch.md +129 -0
  209. package/get-shit-done/workflows/profile-user.md +450 -0
  210. package/get-shit-done/workflows/progress.md +507 -0
  211. package/get-shit-done/workflows/quick.md +757 -0
  212. package/get-shit-done/workflows/remove-phase.md +155 -0
  213. package/get-shit-done/workflows/remove-workspace.md +90 -0
  214. package/get-shit-done/workflows/research-phase.md +82 -0
  215. package/get-shit-done/workflows/resume-project.md +326 -0
  216. package/get-shit-done/workflows/review.md +228 -0
  217. package/get-shit-done/workflows/session-report.md +146 -0
  218. package/get-shit-done/workflows/settings.md +283 -0
  219. package/get-shit-done/workflows/ship.md +228 -0
  220. package/get-shit-done/workflows/stats.md +60 -0
  221. package/get-shit-done/workflows/transition.md +671 -0
  222. package/get-shit-done/workflows/ui-phase.md +302 -0
  223. package/get-shit-done/workflows/ui-review.md +165 -0
  224. package/get-shit-done/workflows/update.md +323 -0
  225. package/get-shit-done/workflows/validate-phase.md +174 -0
  226. package/get-shit-done/workflows/verify-phase.md +254 -0
  227. package/get-shit-done/workflows/verify-work.md +637 -0
  228. package/hooks/dist/gsd-check-update.js +114 -0
  229. package/hooks/dist/gsd-context-monitor.js +156 -0
  230. package/hooks/dist/gsd-prompt-guard.js +96 -0
  231. package/hooks/dist/gsd-statusline.js +119 -0
  232. package/hooks/dist/gsd-workflow-guard.js +94 -0
  233. package/package.json +52 -0
  234. package/scripts/base64-scan.sh +262 -0
  235. package/scripts/build-hooks.js +82 -0
  236. package/scripts/prompt-injection-scan.sh +198 -0
  237. package/scripts/run-tests.cjs +29 -0
  238. package/scripts/secret-scan.sh +227 -0
@@ -0,0 +1,767 @@
1
+ <purpose>
2
+
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.
4
+
5
+ </purpose>
6
+
7
+ <required_reading>
8
+
9
+ 1. templates/milestone.md
10
+ 2. templates/milestone-archive.md
11
+ 3. `.planning/ROADMAP.md`
12
+ 4. `.planning/REQUIREMENTS.md`
13
+ 5. `.planning/PROJECT.md`
14
+
15
+ </required_reading>
16
+
17
+ <archival_behavior>
18
+
19
+ When a milestone completes:
20
+
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
27
+ 7. Archive UI artifacts (`*-UI-SPEC.md`, `*-UI-REVIEW.md`) alongside other phase documents
28
+ 8. Clean up `.planning/ui-reviews/` screenshot files (binary assets, never archived)
29
+
30
+ **Context Efficiency:** Archives keep ROADMAP.md constant-size and REQUIREMENTS.md milestone-scoped.
31
+
32
+ **ROADMAP archive** uses `templates/milestone-archive.md` — includes milestone header (status, phases, date), full phase details, milestone summary (decisions, issues, tech debt).
33
+
34
+ **REQUIREMENTS archive** contains all requirements marked complete with outcomes, traceability table with final status, notes on changed requirements.
35
+
36
+ </archival_behavior>
37
+
38
+ <process>
39
+
40
+ <step name="verify_readiness">
41
+
42
+ **Use `roadmap analyze` for comprehensive readiness check:**
43
+
44
+ ```bash
45
+ ROADMAP=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap analyze)
46
+ ```
47
+
48
+ This returns all phases with plan/summary counts and disk status. Use this to verify:
49
+ - Which phases belong to this milestone?
50
+ - All phases complete (all plans have summaries)? Check `disk_status === 'complete'` for each.
51
+ - `progress_percent` should be 100%.
52
+
53
+ **Requirements completion check (REQUIRED before presenting):**
54
+
55
+ Parse REQUIREMENTS.md traceability table:
56
+ - Count total v1 requirements vs checked-off (`[x]`) requirements
57
+ - Identify any non-Complete rows in the traceability table
58
+
59
+ Present:
60
+
61
+ ```
62
+ Milestone: [Name, e.g., "v1.0 MVP"]
63
+
64
+ Includes:
65
+ - Phase 1: Foundation (2/2 plans complete)
66
+ - Phase 2: Authentication (2/2 plans complete)
67
+ - Phase 3: Core Features (3/3 plans complete)
68
+ - Phase 4: Polish (1/1 plan complete)
69
+
70
+ Total: {phase_count} phases, {total_plans} plans, all complete
71
+ Requirements: {N}/{M} v1 requirements checked off
72
+ ```
73
+
74
+ **If requirements incomplete** (N < M):
75
+
76
+ ```
77
+ ⚠ Unchecked Requirements:
78
+
79
+ - [ ] {REQ-ID}: {description} (Phase {X})
80
+ - [ ] {REQ-ID}: {description} (Phase {Y})
81
+ ```
82
+
83
+ MUST present 3 options:
84
+ 1. **Proceed anyway** — mark milestone complete with known gaps
85
+ 2. **Run audit first** — `/gsd:audit-milestone` to assess gap severity
86
+ 3. **Abort** — return to development
87
+
88
+ If user selects "Proceed anyway": note incomplete requirements in MILESTONES.md under `### Known Gaps` with REQ-IDs and descriptions.
89
+
90
+ <config-check>
91
+
92
+ ```bash
93
+ cat .planning/config.json 2>/dev/null || true
94
+ ```
95
+
96
+ </config-check>
97
+
98
+ <if mode="yolo">
99
+
100
+ ```
101
+ ⚡ Auto-approved: Milestone scope verification
102
+ [Show breakdown summary without prompting]
103
+ Proceeding to stats gathering...
104
+ ```
105
+
106
+ Proceed to gather_stats.
107
+
108
+ </if>
109
+
110
+ <if mode="interactive" OR="custom with gates.confirm_milestone_scope true">
111
+
112
+ ```
113
+ Ready to mark this milestone as shipped?
114
+ (yes / wait / adjust scope)
115
+ ```
116
+
117
+ Wait for confirmation.
118
+ - "adjust scope": Ask which phases to include.
119
+ - "wait": Stop, user returns when ready.
120
+
121
+ </if>
122
+
123
+ </step>
124
+
125
+ <step name="gather_stats">
126
+
127
+ Calculate milestone statistics:
128
+
129
+ ```bash
130
+ git log --oneline --grep="feat(" | head -20
131
+ git diff --stat FIRST_COMMIT..LAST_COMMIT | tail -1
132
+ find . -name "*.swift" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null || true
133
+ git log --format="%ai" FIRST_COMMIT | tail -1
134
+ git log --format="%ai" LAST_COMMIT | head -1
135
+ ```
136
+
137
+ Present:
138
+
139
+ ```
140
+ Milestone Stats:
141
+ - Phases: [X-Y]
142
+ - Plans: [Z] total
143
+ - Tasks: [N] total (from phase summaries)
144
+ - Files modified: [M]
145
+ - Lines of code: [LOC] [language]
146
+ - Timeline: [Days] days ([Start] → [End])
147
+ - Git range: feat(XX-XX) → feat(YY-YY)
148
+ ```
149
+
150
+ </step>
151
+
152
+ <step name="extract_accomplishments">
153
+
154
+ Extract one-liners from SUMMARY.md files using summary-extract:
155
+
156
+ ```bash
157
+ # For each phase in milestone, extract one-liner
158
+ for summary in .planning/phases/*-*/*-SUMMARY.md; do
159
+ [ -e "$summary" ] || continue
160
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" summary-extract "$summary" --fields one_liner --pick one_liner
161
+ done
162
+ ```
163
+
164
+ Extract 4-6 key accomplishments. Present:
165
+
166
+ ```
167
+ Key accomplishments for this milestone:
168
+ 1. [Achievement from phase 1]
169
+ 2. [Achievement from phase 2]
170
+ 3. [Achievement from phase 3]
171
+ 4. [Achievement from phase 4]
172
+ 5. [Achievement from phase 5]
173
+ ```
174
+
175
+ </step>
176
+
177
+ <step name="create_milestone_entry">
178
+
179
+ **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.
180
+
181
+ 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.
182
+
183
+ </step>
184
+
185
+ <step name="evolve_project_full_review">
186
+
187
+ Full PROJECT.md evolution review at milestone completion.
188
+
189
+ Read all phase summaries:
190
+
191
+ ```bash
192
+ cat .planning/phases/*-*/*-SUMMARY.md
193
+ ```
194
+
195
+ **Full review checklist:**
196
+
197
+ 1. **"What This Is" accuracy:**
198
+ - Compare current description to what was built
199
+ - Update if product has meaningfully changed
200
+
201
+ 2. **Core Value check:**
202
+ - Still the right priority? Did shipping reveal a different core value?
203
+ - Update if the ONE thing has shifted
204
+
205
+ 3. **Requirements audit:**
206
+
207
+ **Validated section:**
208
+ - All Active requirements shipped this milestone → Move to Validated
209
+ - Format: `- ✓ [Requirement] — v[X.Y]`
210
+
211
+ **Active section:**
212
+ - Remove requirements moved to Validated
213
+ - Add new requirements for next milestone
214
+ - Keep unaddressed requirements
215
+
216
+ **Out of Scope audit:**
217
+ - Review each item — reasoning still valid?
218
+ - Remove irrelevant items
219
+ - Add requirements invalidated during milestone
220
+
221
+ 4. **Context update:**
222
+ - Current codebase state (LOC, tech stack)
223
+ - User feedback themes (if any)
224
+ - Known issues or technical debt
225
+
226
+ 5. **Key Decisions audit:**
227
+ - Extract all decisions from milestone phase summaries
228
+ - Add to Key Decisions table with outcomes
229
+ - Mark ✓ Good, ⚠️ Revisit, or — Pending
230
+
231
+ 6. **Constraints check:**
232
+ - Any constraints changed during development? Update as needed
233
+
234
+ Update PROJECT.md inline. Update "Last updated" footer:
235
+
236
+ ```markdown
237
+ ---
238
+ *Last updated: [date] after v[X.Y] milestone*
239
+ ```
240
+
241
+ **Example full evolution (v1.0 → v1.1 prep):**
242
+
243
+ Before:
244
+
245
+ ```markdown
246
+ ## What This Is
247
+
248
+ A real-time collaborative whiteboard for remote teams.
249
+
250
+ ## Core Value
251
+
252
+ Real-time sync that feels instant.
253
+
254
+ ## Requirements
255
+
256
+ ### Validated
257
+
258
+ (None yet — ship to validate)
259
+
260
+ ### Active
261
+
262
+ - [ ] Canvas drawing tools
263
+ - [ ] Real-time sync < 500ms
264
+ - [ ] User authentication
265
+ - [ ] Export to PNG
266
+
267
+ ### Out of Scope
268
+
269
+ - Mobile app — web-first approach
270
+ - Video chat — use external tools
271
+ ```
272
+
273
+ After v1.0:
274
+
275
+ ```markdown
276
+ ## What This Is
277
+
278
+ A real-time collaborative whiteboard for remote teams with instant sync and drawing tools.
279
+
280
+ ## Core Value
281
+
282
+ Real-time sync that feels instant.
283
+
284
+ ## Requirements
285
+
286
+ ### Validated
287
+
288
+ - ✓ Canvas drawing tools — v1.0
289
+ - ✓ Real-time sync < 500ms — v1.0 (achieved 200ms avg)
290
+ - ✓ User authentication — v1.0
291
+
292
+ ### Active
293
+
294
+ - [ ] Export to PNG
295
+ - [ ] Undo/redo history
296
+ - [ ] Shape tools (rectangles, circles)
297
+
298
+ ### Out of Scope
299
+
300
+ - Mobile app — web-first approach, PWA works well
301
+ - Video chat — use external tools
302
+ - Offline mode — real-time is core value
303
+
304
+ ## Context
305
+
306
+ Shipped v1.0 with 2,400 LOC TypeScript.
307
+ Tech stack: Next.js, Supabase, Canvas API.
308
+ Initial user testing showed demand for shape tools.
309
+ ```
310
+
311
+ **Step complete when:**
312
+
313
+ - [ ] "What This Is" reviewed and updated if needed
314
+ - [ ] Core Value verified as still correct
315
+ - [ ] All shipped requirements moved to Validated
316
+ - [ ] New requirements added to Active for next milestone
317
+ - [ ] Out of Scope reasoning audited
318
+ - [ ] Context updated with current state
319
+ - [ ] All milestone decisions added to Key Decisions
320
+ - [ ] "Last updated" footer reflects milestone completion
321
+
322
+ </step>
323
+
324
+ <step name="reorganize_roadmap">
325
+
326
+ Update `.planning/ROADMAP.md` — group completed milestone phases:
327
+
328
+ ```markdown
329
+ # Roadmap: [Project Name]
330
+
331
+ ## Milestones
332
+
333
+ - ✅ **v1.0 MVP** — Phases 1-4 (shipped YYYY-MM-DD)
334
+ - 🚧 **v1.1 Security** — Phases 5-6 (in progress)
335
+ - 📋 **v2.0 Redesign** — Phases 7-10 (planned)
336
+
337
+ ## Phases
338
+
339
+ <details>
340
+ <summary>✅ v1.0 MVP (Phases 1-4) — SHIPPED YYYY-MM-DD</summary>
341
+
342
+ - [x] Phase 1: Foundation (2/2 plans) — completed YYYY-MM-DD
343
+ - [x] Phase 2: Authentication (2/2 plans) — completed YYYY-MM-DD
344
+ - [x] Phase 3: Core Features (3/3 plans) — completed YYYY-MM-DD
345
+ - [x] Phase 4: Polish (1/1 plan) — completed YYYY-MM-DD
346
+
347
+ </details>
348
+
349
+ ### 🚧 v[Next] [Name] (In Progress / Planned)
350
+
351
+ - [ ] Phase 5: [Name] ([N] plans)
352
+ - [ ] Phase 6: [Name] ([N] plans)
353
+
354
+ ## Progress
355
+
356
+ | Phase | Milestone | Plans Complete | Status | Completed |
357
+ | ----------------- | --------- | -------------- | ----------- | ---------- |
358
+ | 1. Foundation | v1.0 | 2/2 | Complete | YYYY-MM-DD |
359
+ | 2. Authentication | v1.0 | 2/2 | Complete | YYYY-MM-DD |
360
+ | 3. Core Features | v1.0 | 3/3 | Complete | YYYY-MM-DD |
361
+ | 4. Polish | v1.0 | 1/1 | Complete | YYYY-MM-DD |
362
+ | 5. Security Audit | v1.1 | 0/1 | Not started | - |
363
+ | 6. Hardening | v1.1 | 0/2 | Not started | - |
364
+ ```
365
+
366
+ </step>
367
+
368
+ <step name="archive_milestone">
369
+
370
+ **Delegate archival to gsd-tools:**
371
+
372
+ ```bash
373
+ ARCHIVE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" milestone complete "v[X.Y]" --name "[Milestone Name]")
374
+ ```
375
+
376
+ The CLI handles:
377
+ - Creating `.planning/milestones/` directory
378
+ - Archiving ROADMAP.md to `milestones/v[X.Y]-ROADMAP.md`
379
+ - Archiving REQUIREMENTS.md to `milestones/v[X.Y]-REQUIREMENTS.md` with archive header
380
+ - Moving audit file to milestones if it exists
381
+ - Creating/appending MILESTONES.md entry with accomplishments from SUMMARY.md files
382
+ - Updating STATE.md (status, last activity)
383
+
384
+ Extract from result: `version`, `date`, `phases`, `plans`, `tasks`, `accomplishments`, `archived`.
385
+
386
+ Verify: `✅ Milestone archived to .planning/milestones/`
387
+
388
+ **Phase archival (optional):** After archival completes, ask the user:
389
+
390
+ AskUserQuestion(header="Archive Phases", question="Archive phase directories to milestones/?", options: "Yes — move to milestones/v[X.Y]-phases/" | "Skip — keep phases in place")
391
+
392
+ If "Yes": move phase directories to the milestone archive:
393
+ ```bash
394
+ mkdir -p .planning/milestones/v[X.Y]-phases
395
+ # For each phase directory in .planning/phases/:
396
+ mv .planning/phases/{phase-dir} .planning/milestones/v[X.Y]-phases/
397
+ ```
398
+ Verify: `✅ Phase directories archived to .planning/milestones/v[X.Y]-phases/`
399
+
400
+ If "Skip": Phase directories remain in `.planning/phases/` as raw execution history. Use `/gsd:cleanup` later to archive retroactively.
401
+
402
+ After archival, the AI still handles:
403
+ - Reorganizing ROADMAP.md with milestone grouping (requires judgment)
404
+ - Full PROJECT.md evolution review (requires understanding)
405
+ - Deleting original ROADMAP.md and REQUIREMENTS.md
406
+ - These are NOT fully delegated because they require AI interpretation of content
407
+
408
+ </step>
409
+
410
+ <step name="reorganize_roadmap_and_delete_originals">
411
+
412
+ After `milestone complete` has archived, reorganize ROADMAP.md with milestone groupings, then delete originals:
413
+
414
+ **Reorganize ROADMAP.md** — group completed milestone phases:
415
+
416
+ ```markdown
417
+ # Roadmap: [Project Name]
418
+
419
+ ## Milestones
420
+
421
+ - ✅ **v1.0 MVP** — Phases 1-4 (shipped YYYY-MM-DD)
422
+ - 🚧 **v1.1 Security** — Phases 5-6 (in progress)
423
+
424
+ ## Phases
425
+
426
+ <details>
427
+ <summary>✅ v1.0 MVP (Phases 1-4) — SHIPPED YYYY-MM-DD</summary>
428
+
429
+ - [x] Phase 1: Foundation (2/2 plans) — completed YYYY-MM-DD
430
+ - [x] Phase 2: Authentication (2/2 plans) — completed YYYY-MM-DD
431
+
432
+ </details>
433
+ ```
434
+
435
+ **Then delete originals:**
436
+
437
+ ```bash
438
+ rm .planning/ROADMAP.md
439
+ rm .planning/REQUIREMENTS.md
440
+ ```
441
+
442
+ </step>
443
+
444
+ <step name="write_retrospective">
445
+
446
+ **Append to living retrospective:**
447
+
448
+ Check for existing retrospective:
449
+ ```bash
450
+ ls .planning/RETROSPECTIVE.md 2>/dev/null || true
451
+ ```
452
+
453
+ **If exists:** Read the file, append new milestone section before the "## Cross-Milestone Trends" section.
454
+
455
+ **If doesn't exist:** Create from template at `~/.claude/get-shit-done/templates/retrospective.md`.
456
+
457
+ **Gather retrospective data:**
458
+
459
+ 1. From SUMMARY.md files: Extract key deliverables, one-liners, tech decisions
460
+ 2. From VERIFICATION.md files: Extract verification scores, gaps found
461
+ 3. From UAT.md files: Extract test results, issues found
462
+ 4. From git log: Count commits, calculate timeline
463
+ 5. From the milestone work: Reflect on what worked and what didn't
464
+
465
+ **Write the milestone section:**
466
+
467
+ ```markdown
468
+ ## Milestone: v{version} — {name}
469
+
470
+ **Shipped:** {date}
471
+ **Phases:** {phase_count} | **Plans:** {plan_count}
472
+
473
+ ### What Was Built
474
+ {Extract from SUMMARY.md one-liners}
475
+
476
+ ### What Worked
477
+ {Patterns that led to smooth execution}
478
+
479
+ ### What Was Inefficient
480
+ {Missed opportunities, rework, bottlenecks}
481
+
482
+ ### Patterns Established
483
+ {New conventions discovered during this milestone}
484
+
485
+ ### Key Lessons
486
+ {Specific, actionable takeaways}
487
+
488
+ ### Cost Observations
489
+ - Model mix: {X}% opus, {Y}% sonnet, {Z}% haiku
490
+ - Sessions: {count}
491
+ - Notable: {efficiency observation}
492
+ ```
493
+
494
+ **Update cross-milestone trends:**
495
+
496
+ If the "## Cross-Milestone Trends" section exists, update the tables with new data from this milestone.
497
+
498
+ **Commit:**
499
+ ```bash
500
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: update retrospective for v${VERSION}" --files .planning/RETROSPECTIVE.md
501
+ ```
502
+
503
+ </step>
504
+
505
+ <step name="update_state">
506
+
507
+ Most STATE.md updates were handled by `milestone complete`, but verify and update remaining fields:
508
+
509
+ **Project Reference:**
510
+
511
+ ```markdown
512
+ ## Project Reference
513
+
514
+ See: .planning/PROJECT.md (updated [today])
515
+
516
+ **Core value:** [Current core value from PROJECT.md]
517
+ **Current focus:** [Next milestone or "Planning next milestone"]
518
+ ```
519
+
520
+ **Accumulated Context:**
521
+ - Clear decisions summary (full log in PROJECT.md)
522
+ - Clear resolved blockers
523
+ - Keep open blockers for next milestone
524
+
525
+ </step>
526
+
527
+ <step name="handle_branches">
528
+
529
+ Check branching strategy and offer merge options.
530
+
531
+ Use `init milestone-op` for context, or load config directly:
532
+
533
+ ```bash
534
+ INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init execute-phase "1")
535
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
536
+ ```
537
+
538
+ Extract `branching_strategy`, `phase_branch_template`, `milestone_branch_template`, and `commit_docs` from init JSON.
539
+
540
+ **If "none":** Skip to git_tag.
541
+
542
+ **For "phase" strategy:**
543
+
544
+ ```bash
545
+ BRANCH_PREFIX=$(echo "$PHASE_BRANCH_TEMPLATE" | sed 's/{.*//')
546
+ PHASE_BRANCHES=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ')
547
+ ```
548
+
549
+ **For "milestone" strategy:**
550
+
551
+ ```bash
552
+ BRANCH_PREFIX=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed 's/{.*//')
553
+ MILESTONE_BRANCH=$(git branch --list "${BRANCH_PREFIX}*" 2>/dev/null | sed 's/^\*//' | tr -d ' ' | head -1)
554
+ ```
555
+
556
+ **If no branches found:** Skip to git_tag.
557
+
558
+ **If branches exist:**
559
+
560
+ ```
561
+ ## Git Branches Detected
562
+
563
+ Branching strategy: {phase/milestone}
564
+ Branches: {list}
565
+
566
+ Options:
567
+ 1. **Merge to main** — Merge branch(es) to main
568
+ 2. **Delete without merging** — Already merged or not needed
569
+ 3. **Keep branches** — Leave for manual handling
570
+ ```
571
+
572
+ AskUserQuestion with options: Squash merge (Recommended), Merge with history, Delete without merging, Keep branches.
573
+
574
+ **Squash merge:**
575
+
576
+ ```bash
577
+ CURRENT_BRANCH=$(git branch --show-current)
578
+ git checkout main
579
+
580
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
581
+ for branch in $PHASE_BRANCHES; do
582
+ git merge --squash "$branch"
583
+ # Strip .planning/ from staging if commit_docs is false
584
+ if [ "$COMMIT_DOCS" = "false" ]; then
585
+ git reset HEAD .planning/ 2>/dev/null || true
586
+ fi
587
+ git commit -m "feat: $branch for v[X.Y]"
588
+ done
589
+ fi
590
+
591
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
592
+ git merge --squash "$MILESTONE_BRANCH"
593
+ # Strip .planning/ from staging if commit_docs is false
594
+ if [ "$COMMIT_DOCS" = "false" ]; then
595
+ git reset HEAD .planning/ 2>/dev/null || true
596
+ fi
597
+ git commit -m "feat: $MILESTONE_BRANCH for v[X.Y]"
598
+ fi
599
+
600
+ git checkout "$CURRENT_BRANCH"
601
+ ```
602
+
603
+ **Merge with history:**
604
+
605
+ ```bash
606
+ CURRENT_BRANCH=$(git branch --show-current)
607
+ git checkout main
608
+
609
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
610
+ for branch in $PHASE_BRANCHES; do
611
+ git merge --no-ff --no-commit "$branch"
612
+ # Strip .planning/ from staging if commit_docs is false
613
+ if [ "$COMMIT_DOCS" = "false" ]; then
614
+ git reset HEAD .planning/ 2>/dev/null || true
615
+ fi
616
+ git commit -m "Merge branch '$branch' for v[X.Y]"
617
+ done
618
+ fi
619
+
620
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
621
+ git merge --no-ff --no-commit "$MILESTONE_BRANCH"
622
+ # Strip .planning/ from staging if commit_docs is false
623
+ if [ "$COMMIT_DOCS" = "false" ]; then
624
+ git reset HEAD .planning/ 2>/dev/null || true
625
+ fi
626
+ git commit -m "Merge branch '$MILESTONE_BRANCH' for v[X.Y]"
627
+ fi
628
+
629
+ git checkout "$CURRENT_BRANCH"
630
+ ```
631
+
632
+ **Delete without merging:**
633
+
634
+ ```bash
635
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
636
+ for branch in $PHASE_BRANCHES; do
637
+ git branch -d "$branch" 2>/dev/null || git branch -D "$branch"
638
+ done
639
+ fi
640
+
641
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
642
+ git branch -d "$MILESTONE_BRANCH" 2>/dev/null || git branch -D "$MILESTONE_BRANCH"
643
+ fi
644
+ ```
645
+
646
+ **Keep branches:** Report "Branches preserved for manual handling"
647
+
648
+ </step>
649
+
650
+ <step name="git_tag">
651
+
652
+ Create git tag:
653
+
654
+ ```bash
655
+ git tag -a v[X.Y] -m "v[X.Y] [Name]
656
+
657
+ Delivered: [One sentence]
658
+
659
+ Key accomplishments:
660
+ - [Item 1]
661
+ - [Item 2]
662
+ - [Item 3]
663
+
664
+ See .planning/MILESTONES.md for full details."
665
+ ```
666
+
667
+ Confirm: "Tagged: v[X.Y]"
668
+
669
+ Ask: "Push tag to remote? (y/n)"
670
+
671
+ If yes:
672
+ ```bash
673
+ git push origin v[X.Y]
674
+ ```
675
+
676
+ </step>
677
+
678
+ <step name="git_commit_milestone">
679
+
680
+ Commit milestone completion.
681
+
682
+ ```bash
683
+ node "$HOME/.claude/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
684
+ ```
685
+ ```
686
+
687
+ Confirm: "Committed: chore: complete v[X.Y] milestone"
688
+
689
+ </step>
690
+
691
+ <step name="offer_next">
692
+
693
+ ```
694
+ ✅ Milestone v[X.Y] [Name] complete
695
+
696
+ Shipped:
697
+ - [N] phases ([M] plans, [P] tasks)
698
+ - [One sentence of what shipped]
699
+
700
+ Archived:
701
+ - milestones/v[X.Y]-ROADMAP.md
702
+ - milestones/v[X.Y]-REQUIREMENTS.md
703
+
704
+ Summary: .planning/MILESTONES.md
705
+ Tag: v[X.Y]
706
+
707
+ ---
708
+
709
+ ## ▶ Next Up
710
+
711
+ **Start Next Milestone** — questioning → research → requirements → roadmap
712
+
713
+ `/gsd:new-milestone`
714
+
715
+ <sub>`/clear` first → fresh context window</sub>
716
+
717
+ ---
718
+ ```
719
+
720
+ </step>
721
+
722
+ </process>
723
+
724
+ <milestone_naming>
725
+
726
+ **Version conventions:**
727
+ - **v1.0** — Initial MVP
728
+ - **v1.1, v1.2** — Minor updates, new features, fixes
729
+ - **v2.0, v3.0** — Major rewrites, breaking changes, new direction
730
+
731
+ **Names:** Short 1-2 words (v1.0 MVP, v1.1 Security, v1.2 Performance, v2.0 Redesign).
732
+
733
+ </milestone_naming>
734
+
735
+ <what_qualifies>
736
+
737
+ **Create milestones for:** Initial release, public releases, major feature sets shipped, before archiving planning.
738
+
739
+ **Don't create milestones for:** Every phase completion (too granular), work in progress, internal dev iterations (unless truly shipped).
740
+
741
+ Heuristic: "Is this deployed/usable/shipped?" If yes → milestone. If no → keep working.
742
+
743
+ </what_qualifies>
744
+
745
+ <success_criteria>
746
+
747
+ Milestone completion is successful when:
748
+
749
+ - [ ] MILESTONES.md entry created with stats and accomplishments
750
+ - [ ] PROJECT.md full evolution review completed
751
+ - [ ] All shipped requirements moved to Validated in PROJECT.md
752
+ - [ ] Key Decisions updated with outcomes
753
+ - [ ] ROADMAP.md reorganized with milestone grouping
754
+ - [ ] Roadmap archive created (milestones/v[X.Y]-ROADMAP.md)
755
+ - [ ] Requirements archive created (milestones/v[X.Y]-REQUIREMENTS.md)
756
+ - [ ] REQUIREMENTS.md deleted (fresh for next milestone)
757
+ - [ ] STATE.md updated with fresh project reference
758
+ - [ ] Git tag created (v[X.Y])
759
+ - [ ] Milestone commit made (includes archive files and deletion)
760
+ - [ ] Requirements completion checked against REQUIREMENTS.md traceability table
761
+ - [ ] Incomplete requirements surfaced with proceed/audit/abort options
762
+ - [ ] Known gaps recorded in MILESTONES.md if user proceeded with incomplete requirements
763
+ - [ ] RETROSPECTIVE.md updated with milestone section
764
+ - [ ] Cross-milestone trends updated
765
+ - [ ] User knows next step (/gsd:new-milestone)
766
+
767
+ </success_criteria>