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,249 @@
1
+ # Continuation Format
2
+
3
+ Standard format for presenting next steps after completing a command or workflow.
4
+
5
+ ## Core Structure
6
+
7
+ ```
8
+ ---
9
+
10
+ ## ▶ Next Up
11
+
12
+ **{identifier}: {name}** — {one-line description}
13
+
14
+ `{command to copy-paste}`
15
+
16
+ <sub>`/clear` first → fresh context window</sub>
17
+
18
+ ---
19
+
20
+ **Also available:**
21
+ - `{alternative option 1}` — description
22
+ - `{alternative option 2}` — description
23
+
24
+ ---
25
+ ```
26
+
27
+ ## Format Rules
28
+
29
+ 1. **Always show what it is** — name + description, never just a command path
30
+ 2. **Pull context from source** — ROADMAP.md for phases, PLAN.md `<objective>` for plans
31
+ 3. **Command in inline code** — backticks, easy to copy-paste, renders as clickable link
32
+ 4. **`/clear` explanation** — always include, keeps it concise but explains why
33
+ 5. **"Also available" not "Other options"** — sounds more app-like
34
+ 6. **Visual separators** — `---` above and below to make it stand out
35
+
36
+ ## Variants
37
+
38
+ ### Execute Next Plan
39
+
40
+ ```
41
+ ---
42
+
43
+ ## ▶ Next Up
44
+
45
+ **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
46
+
47
+ `/gsd:execute-phase 2`
48
+
49
+ <sub>`/clear` first → fresh context window</sub>
50
+
51
+ ---
52
+
53
+ **Also available:**
54
+ - Review plan before executing
55
+ - `/gsd:list-phase-assumptions 2` — check assumptions
56
+
57
+ ---
58
+ ```
59
+
60
+ ### Execute Final Plan in Phase
61
+
62
+ Add note that this is the last plan and what comes after:
63
+
64
+ ```
65
+ ---
66
+
67
+ ## ▶ Next Up
68
+
69
+ **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
70
+ <sub>Final plan in Phase 2</sub>
71
+
72
+ `/gsd:execute-phase 2`
73
+
74
+ <sub>`/clear` first → fresh context window</sub>
75
+
76
+ ---
77
+
78
+ **After this completes:**
79
+ - Phase 2 → Phase 3 transition
80
+ - Next: **Phase 3: Core Features** — User dashboard and settings
81
+
82
+ ---
83
+ ```
84
+
85
+ ### Plan a Phase
86
+
87
+ ```
88
+ ---
89
+
90
+ ## ▶ Next Up
91
+
92
+ **Phase 2: Authentication** — JWT login flow with refresh tokens
93
+
94
+ `/gsd:plan-phase 2`
95
+
96
+ <sub>`/clear` first → fresh context window</sub>
97
+
98
+ ---
99
+
100
+ **Also available:**
101
+ - `/gsd:discuss-phase 2` — gather context first
102
+ - `/gsd:research-phase 2` — investigate unknowns
103
+ - Review roadmap
104
+
105
+ ---
106
+ ```
107
+
108
+ ### Phase Complete, Ready for Next
109
+
110
+ Show completion status before next action:
111
+
112
+ ```
113
+ ---
114
+
115
+ ## ✓ Phase 2 Complete
116
+
117
+ 3/3 plans executed
118
+
119
+ ## ▶ Next Up
120
+
121
+ **Phase 3: Core Features** — User dashboard, settings, and data export
122
+
123
+ `/gsd:plan-phase 3`
124
+
125
+ <sub>`/clear` first → fresh context window</sub>
126
+
127
+ ---
128
+
129
+ **Also available:**
130
+ - `/gsd:discuss-phase 3` — gather context first
131
+ - `/gsd:research-phase 3` — investigate unknowns
132
+ - Review what Phase 2 built
133
+
134
+ ---
135
+ ```
136
+
137
+ ### Multiple Equal Options
138
+
139
+ When there's no clear primary action:
140
+
141
+ ```
142
+ ---
143
+
144
+ ## ▶ Next Up
145
+
146
+ **Phase 3: Core Features** — User dashboard, settings, and data export
147
+
148
+ **To plan directly:** `/gsd:plan-phase 3`
149
+
150
+ **To discuss context first:** `/gsd:discuss-phase 3`
151
+
152
+ **To research unknowns:** `/gsd:research-phase 3`
153
+
154
+ <sub>`/clear` first → fresh context window</sub>
155
+
156
+ ---
157
+ ```
158
+
159
+ ### Milestone Complete
160
+
161
+ ```
162
+ ---
163
+
164
+ ## 🎉 Milestone v1.0 Complete
165
+
166
+ All 4 phases shipped
167
+
168
+ ## ▶ Next Up
169
+
170
+ **Start v1.1** — questioning → research → requirements → roadmap
171
+
172
+ `/gsd:new-milestone`
173
+
174
+ <sub>`/clear` first → fresh context window</sub>
175
+
176
+ ---
177
+ ```
178
+
179
+ ## Pulling Context
180
+
181
+ ### For phases (from ROADMAP.md):
182
+
183
+ ```markdown
184
+ ### Phase 2: Authentication
185
+ **Goal**: JWT login flow with refresh tokens
186
+ ```
187
+
188
+ Extract: `**Phase 2: Authentication** — JWT login flow with refresh tokens`
189
+
190
+ ### For plans (from ROADMAP.md):
191
+
192
+ ```markdown
193
+ Plans:
194
+ - [ ] 02-03: Add refresh token rotation
195
+ ```
196
+
197
+ Or from PLAN.md `<objective>`:
198
+
199
+ ```xml
200
+ <objective>
201
+ Add refresh token rotation with sliding expiry window.
202
+
203
+ Purpose: Extend session lifetime without compromising security.
204
+ </objective>
205
+ ```
206
+
207
+ Extract: `**02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry`
208
+
209
+ ## Anti-Patterns
210
+
211
+ ### Don't: Command-only (no context)
212
+
213
+ ```
214
+ ## To Continue
215
+
216
+ Run `/clear`, then paste:
217
+ /gsd:execute-phase 2
218
+ ```
219
+
220
+ User has no idea what 02-03 is about.
221
+
222
+ ### Don't: Missing /clear explanation
223
+
224
+ ```
225
+ `/gsd:plan-phase 3`
226
+
227
+ Run /clear first.
228
+ ```
229
+
230
+ Doesn't explain why. User might skip it.
231
+
232
+ ### Don't: "Other options" language
233
+
234
+ ```
235
+ Other options:
236
+ - Review roadmap
237
+ ```
238
+
239
+ Sounds like an afterthought. Use "Also available:" instead.
240
+
241
+ ### Don't: Fenced code blocks for commands
242
+
243
+ ```
244
+ ```
245
+ /gsd:plan-phase 3
246
+ ```
247
+ ```
248
+
249
+ Fenced blocks inside templates create nesting ambiguity. Use inline backticks instead.
@@ -0,0 +1,64 @@
1
+ # Decimal Phase Calculation
2
+
3
+ Calculate the next decimal phase number for urgent insertions.
4
+
5
+ ## Using gsd-tools
6
+
7
+ ```bash
8
+ # Get next decimal phase after phase 6
9
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal 6
10
+ ```
11
+
12
+ Output:
13
+ ```json
14
+ {
15
+ "found": true,
16
+ "base_phase": "06",
17
+ "next": "06.1",
18
+ "existing": []
19
+ }
20
+ ```
21
+
22
+ With existing decimals:
23
+ ```json
24
+ {
25
+ "found": true,
26
+ "base_phase": "06",
27
+ "next": "06.3",
28
+ "existing": ["06.1", "06.2"]
29
+ }
30
+ ```
31
+
32
+ ## Extract Values
33
+
34
+ ```bash
35
+ DECIMAL_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --pick next)
36
+ BASE_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --pick base_phase)
37
+ ```
38
+
39
+ Or with --raw flag:
40
+ ```bash
41
+ DECIMAL_PHASE=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" phase next-decimal "${AFTER_PHASE}" --raw)
42
+ # Returns just: 06.1
43
+ ```
44
+
45
+ ## Examples
46
+
47
+ | Existing Phases | Next Phase |
48
+ |-----------------|------------|
49
+ | 06 only | 06.1 |
50
+ | 06, 06.1 | 06.2 |
51
+ | 06, 06.1, 06.2 | 06.3 |
52
+ | 06, 06.1, 06.3 (gap) | 06.4 |
53
+
54
+ ## Directory Naming
55
+
56
+ Decimal phase directories use the full decimal number:
57
+
58
+ ```bash
59
+ SLUG=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" generate-slug "$DESCRIPTION" --raw)
60
+ PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
61
+ mkdir -p "$PHASE_DIR"
62
+ ```
63
+
64
+ Example: `.planning/phases/06.1-fix-critical-auth-bug/`
@@ -0,0 +1,295 @@
1
+ <overview>
2
+ Git integration for GSD framework.
3
+ </overview>
4
+
5
+ <core_principle>
6
+
7
+ **Commit outcomes, not process.**
8
+
9
+ The git log should read like a changelog of what shipped, not a diary of planning activity.
10
+ </core_principle>
11
+
12
+ <commit_points>
13
+
14
+ | Event | Commit? | Why |
15
+ | ----------------------- | ------- | ------------------------------------------------ |
16
+ | BRIEF + ROADMAP created | YES | Project initialization |
17
+ | PLAN.md created | NO | Intermediate - commit with plan completion |
18
+ | RESEARCH.md created | NO | Intermediate |
19
+ | DISCOVERY.md created | NO | Intermediate |
20
+ | **Task completed** | YES | Atomic unit of work (1 commit per task) |
21
+ | **Plan completed** | YES | Metadata commit (SUMMARY + STATE + ROADMAP) |
22
+ | Handoff created | YES | WIP state preserved |
23
+
24
+ </commit_points>
25
+
26
+ <git_check>
27
+
28
+ ```bash
29
+ [ -d .git ] && echo "GIT_EXISTS" || echo "NO_GIT"
30
+ ```
31
+
32
+ If NO_GIT: Run `git init` silently. GSD projects always get their own repo.
33
+ </git_check>
34
+
35
+ <commit_formats>
36
+
37
+ <format name="initialization">
38
+ ## Project Initialization (brief + roadmap together)
39
+
40
+ ```
41
+ docs: initialize [project-name] ([N] phases)
42
+
43
+ [One-liner from PROJECT.md]
44
+
45
+ Phases:
46
+ 1. [phase-name]: [goal]
47
+ 2. [phase-name]: [goal]
48
+ 3. [phase-name]: [goal]
49
+ ```
50
+
51
+ What to commit:
52
+
53
+ ```bash
54
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: initialize [project-name] ([N] phases)" --files .planning/
55
+ ```
56
+
57
+ </format>
58
+
59
+ <format name="task-completion">
60
+ ## Task Completion (During Plan Execution)
61
+
62
+ Each task gets its own commit immediately after completion.
63
+
64
+ > **Parallel agents:** When running as a parallel executor (spawned by execute-phase),
65
+ > use `--no-verify` on all commits to avoid pre-commit hook lock contention.
66
+ > The orchestrator validates hooks once after all agents complete.
67
+
68
+ ```
69
+ {type}({phase}-{plan}): {task-name}
70
+
71
+ - [Key change 1]
72
+ - [Key change 2]
73
+ - [Key change 3]
74
+ ```
75
+
76
+ **Commit types:**
77
+ - `feat` - New feature/functionality
78
+ - `fix` - Bug fix
79
+ - `test` - Test-only (TDD RED phase)
80
+ - `refactor` - Code cleanup (TDD REFACTOR phase)
81
+ - `perf` - Performance improvement
82
+ - `chore` - Dependencies, config, tooling
83
+
84
+ **Examples:**
85
+
86
+ ```bash
87
+ # Standard task
88
+ git add src/api/auth.ts src/types/user.ts
89
+ git commit -m "feat(08-02): create user registration endpoint
90
+
91
+ - POST /auth/register validates email and password
92
+ - Checks for duplicate users
93
+ - Returns JWT token on success
94
+ "
95
+
96
+ # TDD task - RED phase
97
+ git add src/__tests__/jwt.test.ts
98
+ git commit -m "test(07-02): add failing test for JWT generation
99
+
100
+ - Tests token contains user ID claim
101
+ - Tests token expires in 1 hour
102
+ - Tests signature verification
103
+ "
104
+
105
+ # TDD task - GREEN phase
106
+ git add src/utils/jwt.ts
107
+ git commit -m "feat(07-02): implement JWT generation
108
+
109
+ - Uses jose library for signing
110
+ - Includes user ID and expiry claims
111
+ - Signs with HS256 algorithm
112
+ "
113
+ ```
114
+
115
+ </format>
116
+
117
+ <format name="plan-completion">
118
+ ## Plan Completion (After All Tasks Done)
119
+
120
+ After all tasks committed, one final metadata commit captures plan completion.
121
+
122
+ ```
123
+ docs({phase}-{plan}): complete [plan-name] plan
124
+
125
+ Tasks completed: [N]/[N]
126
+ - [Task 1 name]
127
+ - [Task 2 name]
128
+ - [Task 3 name]
129
+
130
+ SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
131
+ ```
132
+
133
+ What to commit:
134
+
135
+ ```bash
136
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
137
+ ```
138
+
139
+ **Note:** Code files NOT included - already committed per-task.
140
+
141
+ </format>
142
+
143
+ <format name="handoff">
144
+ ## Handoff (WIP)
145
+
146
+ ```
147
+ wip: [phase-name] paused at task [X]/[Y]
148
+
149
+ Current: [task name]
150
+ [If blocked:] Blocked: [reason]
151
+ ```
152
+
153
+ What to commit:
154
+
155
+ ```bash
156
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/
157
+ ```
158
+
159
+ </format>
160
+ </commit_formats>
161
+
162
+ <example_log>
163
+
164
+ **Old approach (per-plan commits):**
165
+ ```
166
+ a7f2d1 feat(checkout): Stripe payments with webhook verification
167
+ 3e9c4b feat(products): catalog with search, filters, and pagination
168
+ 8a1b2c feat(auth): JWT with refresh rotation using jose
169
+ 5c3d7e feat(foundation): Next.js 15 + Prisma + Tailwind scaffold
170
+ 2f4a8d docs: initialize ecommerce-app (5 phases)
171
+ ```
172
+
173
+ **New approach (per-task commits):**
174
+ ```
175
+ # Phase 04 - Checkout
176
+ 1a2b3c docs(04-01): complete checkout flow plan
177
+ 4d5e6f feat(04-01): add webhook signature verification
178
+ 7g8h9i feat(04-01): implement payment session creation
179
+ 0j1k2l feat(04-01): create checkout page component
180
+
181
+ # Phase 03 - Products
182
+ 3m4n5o docs(03-02): complete product listing plan
183
+ 6p7q8r feat(03-02): add pagination controls
184
+ 9s0t1u feat(03-02): implement search and filters
185
+ 2v3w4x feat(03-01): create product catalog schema
186
+
187
+ # Phase 02 - Auth
188
+ 5y6z7a docs(02-02): complete token refresh plan
189
+ 8b9c0d feat(02-02): implement refresh token rotation
190
+ 1e2f3g test(02-02): add failing test for token refresh
191
+ 4h5i6j docs(02-01): complete JWT setup plan
192
+ 7k8l9m feat(02-01): add JWT generation and validation
193
+ 0n1o2p chore(02-01): install jose library
194
+
195
+ # Phase 01 - Foundation
196
+ 3q4r5s docs(01-01): complete scaffold plan
197
+ 6t7u8v feat(01-01): configure Tailwind and globals
198
+ 9w0x1y feat(01-01): set up Prisma with database
199
+ 2z3a4b feat(01-01): create Next.js 15 project
200
+
201
+ # Initialization
202
+ 5c6d7e docs: initialize ecommerce-app (5 phases)
203
+ ```
204
+
205
+ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
206
+
207
+ </example_log>
208
+
209
+ <anti_patterns>
210
+
211
+ **Still don't commit (intermediate artifacts):**
212
+ - PLAN.md creation (commit with plan completion)
213
+ - RESEARCH.md (intermediate)
214
+ - DISCOVERY.md (intermediate)
215
+ - Minor planning tweaks
216
+ - "Fixed typo in roadmap"
217
+
218
+ **Do commit (outcomes):**
219
+ - Each task completion (feat/fix/test/refactor)
220
+ - Plan completion metadata (docs)
221
+ - Project initialization (docs)
222
+
223
+ **Key principle:** Commit working code and shipped outcomes, not planning process.
224
+
225
+ </anti_patterns>
226
+
227
+ <commit_strategy_rationale>
228
+
229
+ ## Why Per-Task Commits?
230
+
231
+ **Context engineering for AI:**
232
+ - Git history becomes primary context source for future Claude sessions
233
+ - `git log --grep="{phase}-{plan}"` shows all work for a plan
234
+ - `git diff <hash>^..<hash>` shows exact changes per task
235
+ - Less reliance on parsing SUMMARY.md = more context for actual work
236
+
237
+ **Failure recovery:**
238
+ - Task 1 committed ✅, Task 2 failed ❌
239
+ - Claude in next session: sees task 1 complete, can retry task 2
240
+ - Can `git reset --hard` to last successful task
241
+
242
+ **Debugging:**
243
+ - `git bisect` finds exact failing task, not just failing plan
244
+ - `git blame` traces line to specific task context
245
+ - Each commit is independently revertable
246
+
247
+ **Observability:**
248
+ - Solo developer + Claude workflow benefits from granular attribution
249
+ - Atomic commits are git best practice
250
+ - "Commit noise" irrelevant when consumer is Claude, not humans
251
+
252
+ </commit_strategy_rationale>
253
+
254
+ <sub_repos_support>
255
+
256
+ ## Multi-Repo Workspace Support (sub_repos)
257
+
258
+ For workspaces with separate git repos (e.g., `backend/`, `frontend/`, `shared/`), GSD routes commits to each repo independently.
259
+
260
+ ### Configuration
261
+
262
+ In `.planning/config.json`, list sub-repo directories under `planning.sub_repos`:
263
+
264
+ ```json
265
+ {
266
+ "planning": {
267
+ "commit_docs": false,
268
+ "sub_repos": ["backend", "frontend", "shared"]
269
+ }
270
+ }
271
+ ```
272
+
273
+ Set `commit_docs: false` so planning docs stay local and are not committed to any sub-repo.
274
+
275
+ ### How It Works
276
+
277
+ 1. **Auto-detection:** During `/gsd:new-project`, directories with their own `.git` folder are detected and offered for selection as sub-repos. On subsequent runs, `loadConfig` auto-syncs the `sub_repos` list with the filesystem — adding newly created repos and removing deleted ones. This means `config.json` may be rewritten automatically when repos change on disk.
278
+ 2. **File grouping:** Code files are grouped by their sub-repo prefix (e.g., `backend/src/api/users.ts` belongs to the `backend/` repo).
279
+ 3. **Independent commits:** Each sub-repo receives its own atomic commit via `gsd-tools.cjs commit-to-subrepo`. File paths are made relative to the sub-repo root before staging.
280
+ 4. **Planning stays local:** The `.planning/` directory is not committed; it acts as cross-repo coordination.
281
+
282
+ ### Commit Routing
283
+
284
+ Instead of the standard `commit` command, use `commit-to-subrepo` when `sub_repos` is configured:
285
+
286
+ ```bash
287
+ node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit-to-subrepo "feat(02-01): add user API" \
288
+ --files backend/src/api/users.ts backend/src/types/user.ts frontend/src/components/UserForm.tsx
289
+ ```
290
+
291
+ This stages `src/api/users.ts` and `src/types/user.ts` in the `backend/` repo, and `src/components/UserForm.tsx` in the `frontend/` repo, then commits each independently with the same message.
292
+
293
+ Files that don't match any configured sub-repo are reported as unmatched.
294
+
295
+ </sub_repos_support>
@@ -0,0 +1,38 @@
1
+ # Git Planning Commit
2
+
3
+ Commit planning artifacts using the gsd-tools CLI, which automatically checks `commit_docs` config and gitignore status.
4
+
5
+ ## Commit via CLI
6
+
7
+ Always use `gsd-tools.cjs commit` for `.planning/` files — it handles `commit_docs` and gitignore checks automatically:
8
+
9
+ ```bash
10
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs({scope}): {description}" --files .planning/STATE.md .planning/ROADMAP.md
11
+ ```
12
+
13
+ The CLI will return `skipped` (with reason) if `commit_docs` is `false` or `.planning/` is gitignored. No manual conditional checks needed.
14
+
15
+ ## Amend previous commit
16
+
17
+ To fold `.planning/` file changes into the previous commit:
18
+
19
+ ```bash
20
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "" --files .planning/codebase/*.md --amend
21
+ ```
22
+
23
+ ## Commit Message Patterns
24
+
25
+ | Command | Scope | Example |
26
+ |---------|-------|---------|
27
+ | plan-phase | phase | `docs(phase-03): create authentication plans` |
28
+ | execute-phase | phase | `docs(phase-03): complete authentication phase` |
29
+ | new-milestone | milestone | `docs: start milestone v1.1` |
30
+ | remove-phase | chore | `chore: remove phase 17 (dashboard)` |
31
+ | insert-phase | phase | `docs: insert phase 16.1 (critical fix)` |
32
+ | add-phase | phase | `docs: add phase 07 (settings page)` |
33
+
34
+ ## When to Skip
35
+
36
+ - `commit_docs: false` in config
37
+ - `.planning/` is gitignored
38
+ - No changes to commit (check with `git status --porcelain .planning/`)
@@ -0,0 +1,36 @@
1
+ # Model Profile Resolution
2
+
3
+ Resolve model profile once at the start of orchestration, then use it for all Task spawns.
4
+
5
+ ## Resolution Pattern
6
+
7
+ ```bash
8
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
9
+ ```
10
+
11
+ Default: `balanced` if not set or config missing.
12
+
13
+ ## Lookup Table
14
+
15
+ @~/.claude/get-shit-done/references/model-profiles.md
16
+
17
+ Look up the agent in the table for the resolved profile. Pass the model parameter to Task calls:
18
+
19
+ ```
20
+ Task(
21
+ prompt="...",
22
+ subagent_type="gsd-planner",
23
+ model="{resolved_model}" # "inherit", "sonnet", or "haiku"
24
+ )
25
+ ```
26
+
27
+ **Note:** Opus-tier agents resolve to `"inherit"` (not `"opus"`). This causes the agent to use the parent session's model, avoiding conflicts with organization policies that may block specific opus versions.
28
+
29
+ If `model_profile` is `"inherit"`, all agents resolve to `"inherit"` (useful for OpenCode `/model`).
30
+
31
+ ## Usage
32
+
33
+ 1. Resolve once at orchestration start
34
+ 2. Store the profile value
35
+ 3. Look up each agent's model from the table when spawning
36
+ 4. Pass model parameter to each Task call (values: `"inherit"`, `"sonnet"`, `"haiku"`)