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,671 @@
1
+ <internal_workflow>
2
+
3
+ **This is an INTERNAL workflow β€” NOT a user-facing command.**
4
+
5
+ There is no `/gsd:transition` command. This workflow is invoked automatically by
6
+ `execute-phase` during auto-advance, or inline by the orchestrator after phase
7
+ verification. Users should never be told to run `/gsd:transition`.
8
+
9
+ **Valid user commands for phase progression:**
10
+ - `/gsd:discuss-phase {N}` β€” discuss a phase before planning
11
+ - `/gsd:plan-phase {N}` β€” plan a phase
12
+ - `/gsd:execute-phase {N}` β€” execute a phase
13
+ - `/gsd:progress` β€” see roadmap progress
14
+
15
+ </internal_workflow>
16
+
17
+ <required_reading>
18
+
19
+ **Read these files NOW:**
20
+
21
+ 1. `.planning/STATE.md`
22
+ 2. `.planning/PROJECT.md`
23
+ 3. `.planning/ROADMAP.md`
24
+ 4. Current phase's plan files (`*-PLAN.md`)
25
+ 5. Current phase's summary files (`*-SUMMARY.md`)
26
+
27
+ </required_reading>
28
+
29
+ <purpose>
30
+
31
+ Mark current phase complete and advance to next. This is the natural point where progress tracking and PROJECT.md evolution happen.
32
+
33
+ "Planning next phase" = "current phase is done"
34
+
35
+ </purpose>
36
+
37
+ <process>
38
+
39
+ <step name="load_project_state" priority="first">
40
+
41
+ Before transition, read project state:
42
+
43
+ ```bash
44
+ cat .planning/STATE.md 2>/dev/null || true
45
+ cat .planning/PROJECT.md 2>/dev/null || true
46
+ ```
47
+
48
+ Parse current position to verify we're transitioning the right phase.
49
+ Note accumulated context that may need updating after transition.
50
+
51
+ </step>
52
+
53
+ <step name="verify_completion">
54
+
55
+ Check current phase has all plan summaries:
56
+
57
+ ```bash
58
+ (ls .planning/phases/XX-current/*-PLAN.md 2>/dev/null || true) | sort
59
+ (ls .planning/phases/XX-current/*-SUMMARY.md 2>/dev/null || true) | sort
60
+ ```
61
+
62
+ **Verification logic:**
63
+
64
+ - Count PLAN files
65
+ - Count SUMMARY files
66
+ - If counts match: all plans complete
67
+ - If counts don't match: incomplete
68
+
69
+ <config-check>
70
+
71
+ ```bash
72
+ cat .planning/config.json 2>/dev/null || true
73
+ ```
74
+
75
+ </config-check>
76
+
77
+ **Check for verification debt in this phase:**
78
+
79
+ ```bash
80
+ # Count outstanding items in current phase
81
+ OUTSTANDING=""
82
+ for f in .planning/phases/XX-current/*-UAT.md .planning/phases/XX-current/*-VERIFICATION.md; do
83
+ [ -f "$f" ] || continue
84
+ grep -q "result: pending\|result: blocked\|status: partial\|status: human_needed\|status: diagnosed" "$f" && OUTSTANDING="$OUTSTANDING\n$(basename $f)"
85
+ done
86
+ ```
87
+
88
+ **If OUTSTANDING is not empty:**
89
+
90
+ Append to the completion confirmation message (regardless of mode):
91
+
92
+ ```
93
+ Outstanding verification items in this phase:
94
+ {list filenames}
95
+
96
+ These will carry forward as debt. Review: `/gsd:audit-uat`
97
+ ```
98
+
99
+ This does NOT block transition β€” it ensures the user sees the debt before confirming.
100
+
101
+ **If all plans complete:**
102
+
103
+ <if mode="yolo">
104
+
105
+ ```
106
+ ⚑ Auto-approved: Transition Phase [X] β†’ Phase [X+1]
107
+ Phase [X] complete β€” all [Y] plans finished.
108
+
109
+ Proceeding to mark done and advance...
110
+ ```
111
+
112
+ Proceed directly to cleanup_handoff step.
113
+
114
+ </if>
115
+
116
+ <if mode="interactive" OR="custom with gates.confirm_transition true">
117
+
118
+ Ask: "Phase [X] complete β€” all [Y] plans finished. Ready to mark done and move to Phase [X+1]?"
119
+
120
+ Wait for confirmation before proceeding.
121
+
122
+ </if>
123
+
124
+ **If plans incomplete:**
125
+
126
+ **SAFETY RAIL: always_confirm_destructive applies here.**
127
+ Skipping incomplete plans is destructive β€” ALWAYS prompt regardless of mode.
128
+
129
+ Present:
130
+
131
+ ```
132
+ Phase [X] has incomplete plans:
133
+ - {phase}-01-SUMMARY.md βœ“ Complete
134
+ - {phase}-02-SUMMARY.md βœ— Missing
135
+ - {phase}-03-SUMMARY.md βœ— Missing
136
+
137
+ ⚠️ Safety rail: Skipping plans requires confirmation (destructive action)
138
+
139
+ Options:
140
+ 1. Continue current phase (execute remaining plans)
141
+ 2. Mark complete anyway (skip remaining plans)
142
+ 3. Review what's left
143
+ ```
144
+
145
+ Wait for user decision.
146
+
147
+ </step>
148
+
149
+ <step name="cleanup_handoff">
150
+
151
+ Check for lingering handoffs:
152
+
153
+ ```bash
154
+ ls .planning/phases/XX-current/.continue-here*.md 2>/dev/null || true
155
+ ```
156
+
157
+ If found, delete them β€” phase is complete, handoffs are stale.
158
+
159
+ </step>
160
+
161
+ <step name="update_roadmap_and_state">
162
+
163
+ **Delegate ROADMAP.md and STATE.md updates to gsd-tools:**
164
+
165
+ ```bash
166
+ TRANSITION=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase complete "${current_phase}")
167
+ ```
168
+
169
+ The CLI handles:
170
+ - Marking the phase checkbox as `[x]` complete with today's date
171
+ - Updating plan count to final (e.g., "3/3 plans complete")
172
+ - Updating the Progress table (Status β†’ Complete, adding date)
173
+ - Advancing STATE.md to next phase (Current Phase, Status β†’ Ready to plan, Current Plan β†’ Not started)
174
+ - Detecting if this is the last phase in the milestone
175
+
176
+ Extract from result: `completed_phase`, `plans_executed`, `next_phase`, `next_phase_name`, `is_last_phase`.
177
+
178
+ </step>
179
+
180
+ <step name="archive_prompts">
181
+
182
+ If prompts were generated for the phase, they stay in place.
183
+ The `completed/` subfolder pattern from create-meta-prompts handles archival.
184
+
185
+ </step>
186
+
187
+ <step name="evolve_project">
188
+
189
+ Evolve PROJECT.md to reflect learnings from completed phase.
190
+
191
+ **Read phase summaries:**
192
+
193
+ ```bash
194
+ cat .planning/phases/XX-current/*-SUMMARY.md
195
+ ```
196
+
197
+ **Assess requirement changes:**
198
+
199
+ 1. **Requirements validated?**
200
+ - Any Active requirements shipped in this phase?
201
+ - Move to Validated with phase reference: `- βœ“ [Requirement] β€” Phase X`
202
+
203
+ 2. **Requirements invalidated?**
204
+ - Any Active requirements discovered to be unnecessary or wrong?
205
+ - Move to Out of Scope with reason: `- [Requirement] β€” [why invalidated]`
206
+
207
+ 3. **Requirements emerged?**
208
+ - Any new requirements discovered during building?
209
+ - Add to Active: `- [ ] [New requirement]`
210
+
211
+ 4. **Decisions to log?**
212
+ - Extract decisions from SUMMARY.md files
213
+ - Add to Key Decisions table with outcome if known
214
+
215
+ 5. **"What This Is" still accurate?**
216
+ - If the product has meaningfully changed, update the description
217
+ - Keep it current and accurate
218
+
219
+ **Update PROJECT.md:**
220
+
221
+ Make the edits inline. Update "Last updated" footer:
222
+
223
+ ```markdown
224
+ ---
225
+ *Last updated: [date] after Phase [X]*
226
+ ```
227
+
228
+ **Example evolution:**
229
+
230
+ Before:
231
+
232
+ ```markdown
233
+ ### Active
234
+
235
+ - [ ] JWT authentication
236
+ - [ ] Real-time sync < 500ms
237
+ - [ ] Offline mode
238
+
239
+ ### Out of Scope
240
+
241
+ - OAuth2 β€” complexity not needed for v1
242
+ ```
243
+
244
+ After (Phase 2 shipped JWT auth, discovered rate limiting needed):
245
+
246
+ ```markdown
247
+ ### Validated
248
+
249
+ - βœ“ JWT authentication β€” Phase 2
250
+
251
+ ### Active
252
+
253
+ - [ ] Real-time sync < 500ms
254
+ - [ ] Offline mode
255
+ - [ ] Rate limiting on sync endpoint
256
+
257
+ ### Out of Scope
258
+
259
+ - OAuth2 β€” complexity not needed for v1
260
+ ```
261
+
262
+ **Step complete when:**
263
+
264
+ - [ ] Phase summaries reviewed for learnings
265
+ - [ ] Validated requirements moved from Active
266
+ - [ ] Invalidated requirements moved to Out of Scope with reason
267
+ - [ ] Emerged requirements added to Active
268
+ - [ ] New decisions logged with rationale
269
+ - [ ] "What This Is" updated if product changed
270
+ - [ ] "Last updated" footer reflects this transition
271
+
272
+ </step>
273
+
274
+ <step name="update_current_position_after_transition">
275
+
276
+ **Note:** Basic position updates (Current Phase, Status, Current Plan, Last Activity) were already handled by `gsd-tools phase complete` in the update_roadmap_and_state step.
277
+
278
+ Verify the updates are correct by reading STATE.md. If the progress bar needs updating, use:
279
+
280
+ ```bash
281
+ PROGRESS=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" progress bar --raw)
282
+ ```
283
+
284
+ Update the progress bar line in STATE.md with the result.
285
+
286
+ **Step complete when:**
287
+
288
+ - [ ] Phase number incremented to next phase (done by phase complete)
289
+ - [ ] Plan status reset to "Not started" (done by phase complete)
290
+ - [ ] Status shows "Ready to plan" (done by phase complete)
291
+ - [ ] Progress bar reflects total completed plans
292
+
293
+ </step>
294
+
295
+ <step name="update_project_reference">
296
+
297
+ Update Project Reference section in STATE.md.
298
+
299
+ ```markdown
300
+ ## Project Reference
301
+
302
+ See: .planning/PROJECT.md (updated [today])
303
+
304
+ **Core value:** [Current core value from PROJECT.md]
305
+ **Current focus:** [Next phase name]
306
+ ```
307
+
308
+ Update the date and current focus to reflect the transition.
309
+
310
+ </step>
311
+
312
+ <step name="review_accumulated_context">
313
+
314
+ Review and update Accumulated Context section in STATE.md.
315
+
316
+ **Decisions:**
317
+
318
+ - Note recent decisions from this phase (3-5 max)
319
+ - Full log lives in PROJECT.md Key Decisions table
320
+
321
+ **Blockers/Concerns:**
322
+
323
+ - Review blockers from completed phase
324
+ - If addressed in this phase: Remove from list
325
+ - If still relevant for future: Keep with "Phase X" prefix
326
+ - Add any new concerns from completed phase's summaries
327
+
328
+ **Example:**
329
+
330
+ Before:
331
+
332
+ ```markdown
333
+ ### Blockers/Concerns
334
+
335
+ - ⚠️ [Phase 1] Database schema not indexed for common queries
336
+ - ⚠️ [Phase 2] WebSocket reconnection behavior on flaky networks unknown
337
+ ```
338
+
339
+ After (if database indexing was addressed in Phase 2):
340
+
341
+ ```markdown
342
+ ### Blockers/Concerns
343
+
344
+ - ⚠️ [Phase 2] WebSocket reconnection behavior on flaky networks unknown
345
+ ```
346
+
347
+ **Step complete when:**
348
+
349
+ - [ ] Recent decisions noted (full log in PROJECT.md)
350
+ - [ ] Resolved blockers removed from list
351
+ - [ ] Unresolved blockers kept with phase prefix
352
+ - [ ] New concerns from completed phase added
353
+
354
+ </step>
355
+
356
+ <step name="update_session_continuity_after_transition">
357
+
358
+ Update Session Continuity section in STATE.md to reflect transition completion.
359
+
360
+ **Format:**
361
+
362
+ ```markdown
363
+ Last session: [today]
364
+ Stopped at: Phase [X] complete, ready to plan Phase [X+1]
365
+ Resume file: None
366
+ ```
367
+
368
+ **Step complete when:**
369
+
370
+ - [ ] Last session timestamp updated to current date and time
371
+ - [ ] Stopped at describes phase completion and next phase
372
+ - [ ] Resume file confirmed as None (transitions don't use resume files)
373
+
374
+ </step>
375
+
376
+ <step name="offer_next_phase">
377
+
378
+ **MANDATORY: Verify milestone status before presenting next steps.**
379
+
380
+ **Use the transition result from `gsd-tools phase complete`:**
381
+
382
+ The `is_last_phase` field from the phase complete result tells you directly:
383
+ - `is_last_phase: false` β†’ More phases remain β†’ Go to **Route A**
384
+ - `is_last_phase: true` β†’ Last phase done β†’ **Check for workstream collisions first**
385
+
386
+ The `next_phase` and `next_phase_name` fields give you the next phase details.
387
+
388
+ If you need additional context, use:
389
+ ```bash
390
+ ROADMAP=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap analyze)
391
+ ```
392
+
393
+ This returns all phases with goals, disk status, and completion info.
394
+
395
+ ---
396
+
397
+ **Workstream collision check (when `is_last_phase: true`):**
398
+
399
+ Before routing to Route B, check whether other workstreams are still active.
400
+ This prevents one workstream from advancing or completing the milestone while
401
+ other workstreams are still working on their phases.
402
+
403
+ **Skip this check if NOT in workstream mode** (i.e., `GSD_WORKSTREAM` is not set / flat mode).
404
+ In flat mode, go directly to **Route B**.
405
+
406
+ ```bash
407
+ # Only check if we're in workstream mode
408
+ if [ -n "$GSD_WORKSTREAM" ]; then
409
+ WS_LIST=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" workstream list --raw)
410
+ fi
411
+ ```
412
+
413
+ Parse the JSON result. The output has `{ mode, workstreams: [...] }`.
414
+ Each workstream entry has: `name`, `status`, `current_phase`, `phase_count`, `completed_phases`.
415
+
416
+ Filter out the current workstream (`$GSD_WORKSTREAM`) and any workstreams with
417
+ status containing "milestone complete" or "archived" (case-insensitive).
418
+ The remaining entries are **other active workstreams**.
419
+
420
+ - **If other active workstreams exist** β†’ Go to **Route B1**
421
+ - **If NO other active workstreams** (or flat mode) β†’ Go to **Route B**
422
+
423
+ ---
424
+
425
+ **Route A: More phases remain in milestone**
426
+
427
+ Read ROADMAP.md to get the next phase's name and goal.
428
+
429
+ **Check if next phase has CONTEXT.md:**
430
+
431
+ ```bash
432
+ ls .planning/phases/*[X+1]*/*-CONTEXT.md 2>/dev/null || true
433
+ ```
434
+
435
+ **If next phase exists:**
436
+
437
+ <if mode="yolo">
438
+
439
+ **If CONTEXT.md exists:**
440
+
441
+ ```
442
+ Phase [X] marked complete.
443
+
444
+ Next: Phase [X+1] β€” [Name]
445
+
446
+ ⚑ Auto-continuing: Plan Phase [X+1] in detail
447
+ ```
448
+
449
+ Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1] --auto ${GSD_WS}")
450
+
451
+ **If CONTEXT.md does NOT exist:**
452
+
453
+ ```
454
+ Phase [X] marked complete.
455
+
456
+ Next: Phase [X+1] β€” [Name]
457
+
458
+ ⚑ Auto-continuing: Discuss Phase [X+1] first
459
+ ```
460
+
461
+ Exit skill and invoke SlashCommand("/gsd:discuss-phase [X+1] --auto ${GSD_WS}")
462
+
463
+ </if>
464
+
465
+ <if mode="interactive" OR="custom with gates.confirm_transition true">
466
+
467
+ **If CONTEXT.md does NOT exist:**
468
+
469
+ ```
470
+ ## βœ“ Phase [X] Complete
471
+
472
+ ---
473
+
474
+ ## β–Ά Next Up
475
+
476
+ **Phase [X+1]: [Name]** β€” [Goal from ROADMAP.md]
477
+
478
+ `/gsd:discuss-phase [X+1] ${GSD_WS}` β€” gather context and clarify approach
479
+
480
+ <sub>`/clear` first β†’ fresh context window</sub>
481
+
482
+ ---
483
+
484
+ **Also available:**
485
+ - `/gsd:plan-phase [X+1] ${GSD_WS}` β€” skip discussion, plan directly
486
+ - `/gsd:research-phase [X+1] ${GSD_WS}` β€” investigate unknowns
487
+
488
+ ---
489
+ ```
490
+
491
+ **If CONTEXT.md exists:**
492
+
493
+ ```
494
+ ## βœ“ Phase [X] Complete
495
+
496
+ ---
497
+
498
+ ## β–Ά Next Up
499
+
500
+ **Phase [X+1]: [Name]** β€” [Goal from ROADMAP.md]
501
+ <sub>βœ“ Context gathered, ready to plan</sub>
502
+
503
+ `/gsd:plan-phase [X+1] ${GSD_WS}`
504
+
505
+ <sub>`/clear` first β†’ fresh context window</sub>
506
+
507
+ ---
508
+
509
+ **Also available:**
510
+ - `/gsd:discuss-phase [X+1] ${GSD_WS}` β€” revisit context
511
+ - `/gsd:research-phase [X+1] ${GSD_WS}` β€” investigate unknowns
512
+
513
+ ---
514
+ ```
515
+
516
+ </if>
517
+
518
+ ---
519
+
520
+ **Route B1: Workstream done, other workstreams still active**
521
+
522
+ This route is reached when `is_last_phase: true` AND the collision check found
523
+ other active workstreams. Do NOT suggest completing the milestone or advancing
524
+ to the next milestone β€” other workstreams are still working.
525
+
526
+ **Clear auto-advance chain flag** β€” workstream boundary is the natural stopping point:
527
+
528
+ ```bash
529
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false
530
+ ```
531
+
532
+ <if mode="yolo">
533
+
534
+ Override auto-advance: do NOT auto-continue to milestone completion.
535
+ Present the blocking information and stop.
536
+
537
+ </if>
538
+
539
+ Present (all modes):
540
+
541
+ ```
542
+ ## βœ“ Phase {X}: {Phase Name} Complete
543
+
544
+ This workstream's phases are complete. Other workstreams are still active:
545
+
546
+ | Workstream | Status | Phase | Progress |
547
+ |------------|--------|-------|----------|
548
+ | {name} | {status} | {current_phase} | {completed_phases}/{phase_count} |
549
+ | ... | ... | ... | ... |
550
+
551
+ ---
552
+
553
+ ## Next Steps
554
+
555
+ Archive this workstream:
556
+
557
+ `/gsd:workstreams complete {current_ws_name} ${GSD_WS}`
558
+
559
+ See overall milestone progress:
560
+
561
+ `/gsd:workstreams progress ${GSD_WS}`
562
+
563
+ <sub>Milestone completion will be available once all workstreams finish.</sub>
564
+
565
+ ---
566
+ ```
567
+
568
+ Do NOT suggest `/gsd:complete-milestone` or `/gsd:new-milestone`.
569
+ Do NOT auto-invoke any further slash commands.
570
+
571
+ **Stop here.** The user must explicitly decide what to do next.
572
+
573
+ ---
574
+
575
+ **Route B: Milestone complete (all phases done)**
576
+
577
+ **This route is only reached when:**
578
+ - `is_last_phase: true` AND no other active workstreams exist (or flat mode)
579
+
580
+ **Clear auto-advance chain flag** β€” milestone boundary is the natural stopping point:
581
+
582
+ ```bash
583
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active false
584
+ ```
585
+
586
+ <if mode="yolo">
587
+
588
+ ```
589
+ Phase {X} marked complete.
590
+
591
+ πŸŽ‰ Milestone {version} is 100% complete β€” all {N} phases finished!
592
+
593
+ ⚑ Auto-continuing: Complete milestone and archive
594
+ ```
595
+
596
+ Exit skill and invoke SlashCommand("/gsd:complete-milestone {version} ${GSD_WS}")
597
+
598
+ </if>
599
+
600
+ <if mode="interactive" OR="custom with gates.confirm_transition true">
601
+
602
+ ```
603
+ ## βœ“ Phase {X}: {Phase Name} Complete
604
+
605
+ πŸŽ‰ Milestone {version} is 100% complete β€” all {N} phases finished!
606
+
607
+ ---
608
+
609
+ ## β–Ά Next Up
610
+
611
+ **Complete Milestone {version}** β€” archive and prepare for next
612
+
613
+ `/gsd:complete-milestone {version} ${GSD_WS}`
614
+
615
+ <sub>`/clear` first β†’ fresh context window</sub>
616
+
617
+ ---
618
+
619
+ **Also available:**
620
+ - Review accomplishments before archiving
621
+
622
+ ---
623
+ ```
624
+
625
+ </if>
626
+
627
+ </step>
628
+
629
+ </process>
630
+
631
+ <implicit_tracking>
632
+ Progress tracking is IMPLICIT: planning phase N implies phases 1-(N-1) complete. No separate progress stepβ€”forward motion IS progress.
633
+ </implicit_tracking>
634
+
635
+ <partial_completion>
636
+
637
+ If user wants to move on but phase isn't fully complete:
638
+
639
+ ```
640
+ Phase [X] has incomplete plans:
641
+ - {phase}-02-PLAN.md (not executed)
642
+ - {phase}-03-PLAN.md (not executed)
643
+
644
+ Options:
645
+ 1. Mark complete anyway (plans weren't needed)
646
+ 2. Defer work to later phase
647
+ 3. Stay and finish current phase
648
+ ```
649
+
650
+ Respect user judgment β€” they know if work matters.
651
+
652
+ **If marking complete with incomplete plans:**
653
+
654
+ - Update ROADMAP: "2/3 plans complete" (not "3/3")
655
+ - Note in transition message which plans were skipped
656
+
657
+ </partial_completion>
658
+
659
+ <success_criteria>
660
+
661
+ Transition is complete when:
662
+
663
+ - [ ] Current phase plan summaries verified (all exist or user chose to skip)
664
+ - [ ] Any stale handoffs deleted
665
+ - [ ] ROADMAP.md updated with completion status and plan count
666
+ - [ ] PROJECT.md evolved (requirements, decisions, description if needed)
667
+ - [ ] STATE.md updated (position, project reference, context, session)
668
+ - [ ] Progress table updated
669
+ - [ ] User knows next steps
670
+
671
+ </success_criteria>