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,486 @@
1
+ <purpose>
2
+
3
+ Start a new milestone cycle for an existing project. Loads project context, gathers milestone goals (from MILESTONE-CONTEXT.md or conversation), updates PROJECT.md and STATE.md, optionally runs parallel research, defines scoped requirements with REQ-IDs, spawns the roadmapper to create phased execution plan, and commits all artifacts. Brownfield equivalent of new-project.
4
+
5
+ </purpose>
6
+
7
+ <required_reading>
8
+
9
+ Read all files referenced by the invoking prompt's execution_context before starting.
10
+
11
+ </required_reading>
12
+
13
+ <available_agent_types>
14
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
15
+ - gsd-project-researcher — Researches project-level technical decisions
16
+ - gsd-research-synthesizer — Synthesizes findings from parallel research agents
17
+ - gsd-roadmapper — Creates phased execution roadmaps
18
+ </available_agent_types>
19
+
20
+ <process>
21
+
22
+ ## 1. Load Context
23
+
24
+ Parse `$ARGUMENTS` before doing anything else:
25
+ - `--reset-phase-numbers` flag → opt into restarting roadmap phase numbering at `1`
26
+ - remaining text → use as milestone name if present
27
+
28
+ If the flag is absent, keep the current behavior of continuing phase numbering from the previous milestone.
29
+
30
+ - Read PROJECT.md (existing project, validated requirements, decisions)
31
+ - Read MILESTONES.md (what shipped previously)
32
+ - Read STATE.md (pending todos, blockers)
33
+ - Check for MILESTONE-CONTEXT.md (from /gsd:discuss-milestone)
34
+
35
+ ## 2. Gather Milestone Goals
36
+
37
+ **If MILESTONE-CONTEXT.md exists:**
38
+ - Use features and scope from discuss-milestone
39
+ - Present summary for confirmation
40
+
41
+ **If no context file:**
42
+ - Present what shipped in last milestone
43
+ - Ask inline (freeform, NOT AskUserQuestion): "What do you want to build next?"
44
+ - Wait for their response, then use AskUserQuestion to probe specifics
45
+ - If user selects "Other" at any point to provide freeform input, ask follow-up as plain text — not another AskUserQuestion
46
+
47
+ ## 3. Determine Milestone Version
48
+
49
+ - Parse last version from MILESTONES.md
50
+ - Suggest next version (v1.0 → v1.1, or v2.0 for major)
51
+ - Confirm with user
52
+
53
+ ## 3.5. Verify Milestone Understanding
54
+
55
+ Before writing any files, present a summary of what was gathered and ask for confirmation.
56
+
57
+ ```
58
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
59
+ GSD ► MILESTONE SUMMARY
60
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
61
+
62
+ **Milestone v[X.Y]: [Name]**
63
+
64
+ **Goal:** [One sentence]
65
+
66
+ **Target features:**
67
+ - [Feature 1]
68
+ - [Feature 2]
69
+ - [Feature 3]
70
+
71
+ **Key context:** [Any important constraints, decisions, or notes from questioning]
72
+ ```
73
+
74
+ AskUserQuestion:
75
+ - header: "Confirm?"
76
+ - question: "Does this capture what you want to build in this milestone?"
77
+ - options:
78
+ - "Looks good" — Proceed to write PROJECT.md
79
+ - "Adjust" — Let me correct or add details
80
+
81
+ **If "Adjust":** Ask what needs changing (plain text, NOT AskUserQuestion). Incorporate changes, re-present the summary. Loop until "Looks good" is selected.
82
+
83
+ **If "Looks good":** Proceed to Step 4.
84
+
85
+ ## 4. Update PROJECT.md
86
+
87
+ Add/update:
88
+
89
+ ```markdown
90
+ ## Current Milestone: v[X.Y] [Name]
91
+
92
+ **Goal:** [One sentence describing milestone focus]
93
+
94
+ **Target features:**
95
+ - [Feature 1]
96
+ - [Feature 2]
97
+ - [Feature 3]
98
+ ```
99
+
100
+ Update Active requirements section and "Last updated" footer.
101
+
102
+ Ensure the `## Evolution` section exists in PROJECT.md. If missing (projects created before this feature), add it before the footer:
103
+
104
+ ```markdown
105
+ ## Evolution
106
+
107
+ This document evolves at phase transitions and milestone boundaries.
108
+
109
+ **After each phase transition** (via `/gsd:transition`):
110
+ 1. Requirements invalidated? → Move to Out of Scope with reason
111
+ 2. Requirements validated? → Move to Validated with phase reference
112
+ 3. New requirements emerged? → Add to Active
113
+ 4. Decisions to log? → Add to Key Decisions
114
+ 5. "What This Is" still accurate? → Update if drifted
115
+
116
+ **After each milestone** (via `/gsd:complete-milestone`):
117
+ 1. Full review of all sections
118
+ 2. Core Value check — still the right priority?
119
+ 3. Audit Out of Scope — reasons still valid?
120
+ 4. Update Context with current state
121
+ ```
122
+
123
+ ## 5. Update STATE.md
124
+
125
+ ```markdown
126
+ ## Current Position
127
+
128
+ Phase: Not started (defining requirements)
129
+ Plan: —
130
+ Status: Defining requirements
131
+ Last activity: [today] — Milestone v[X.Y] started
132
+ ```
133
+
134
+ Keep Accumulated Context section from previous milestone.
135
+
136
+ ## 6. Cleanup and Commit
137
+
138
+ Delete MILESTONE-CONTEXT.md if exists (consumed).
139
+
140
+ ```bash
141
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: start milestone v[X.Y] [Name]" --files .planning/PROJECT.md .planning/STATE.md
142
+ ```
143
+
144
+ ## 7. Load Context and Resolve Models
145
+
146
+ ```bash
147
+ INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init new-milestone)
148
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
149
+ AGENT_SKILLS_RESEARCHER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-project-researcher 2>/dev/null)
150
+ AGENT_SKILLS_SYNTHESIZER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-synthesizer 2>/dev/null)
151
+ AGENT_SKILLS_ROADMAPPER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-roadmapper 2>/dev/null)
152
+ ```
153
+
154
+ Extract from init JSON: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `research_enabled`, `current_milestone`, `project_exists`, `roadmap_exists`, `latest_completed_milestone`, `phase_dir_count`, `phase_archive_path`.
155
+
156
+ ## 7.5 Reset-phase safety (only when `--reset-phase-numbers`)
157
+
158
+ If `--reset-phase-numbers` is active:
159
+
160
+ 1. Set starting phase number to `1` for the upcoming roadmap.
161
+ 2. If `phase_dir_count > 0`, archive the old phase directories before roadmapping so new `01-*` / `02-*` directories cannot collide with stale milestone directories.
162
+
163
+ If `phase_dir_count > 0` and `phase_archive_path` is available:
164
+
165
+ ```bash
166
+ mkdir -p "${phase_archive_path}"
167
+ find .planning/phases -mindepth 1 -maxdepth 1 -type d -exec mv {} "${phase_archive_path}/" \;
168
+ ```
169
+
170
+ Then verify `.planning/phases/` no longer contains old milestone directories before continuing.
171
+
172
+ If `phase_dir_count > 0` but `phase_archive_path` is missing:
173
+ - Stop and explain that reset numbering is unsafe without a completed milestone archive target.
174
+ - Tell the user to complete/archive the previous milestone first, then rerun `/gsd:new-milestone --reset-phase-numbers ${GSD_WS}`.
175
+
176
+ ## 8. Research Decision
177
+
178
+ Check `research_enabled` from init JSON (loaded from config).
179
+
180
+ **If `research_enabled` is `true`:**
181
+
182
+ AskUserQuestion: "Research the domain ecosystem for new features before defining requirements?"
183
+ - "Research first (Recommended)" — Discover patterns, features, architecture for NEW capabilities
184
+ - "Skip research for this milestone" — Go straight to requirements (does not change your default)
185
+
186
+ **If `research_enabled` is `false`:**
187
+
188
+ AskUserQuestion: "Research the domain ecosystem for new features before defining requirements?"
189
+ - "Skip research (current default)" — Go straight to requirements
190
+ - "Research first" — Discover patterns, features, architecture for NEW capabilities
191
+
192
+ **IMPORTANT:** Do NOT persist this choice to config.json. The `workflow.research` setting is a persistent user preference that controls plan-phase behavior across the project. Changing it here would silently alter future `/gsd:plan-phase` behavior. To change the default, use `/gsd:settings`.
193
+
194
+ **If user chose "Research first":**
195
+
196
+ ```
197
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
198
+ GSD ► RESEARCHING
199
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
200
+
201
+ ◆ Spawning 4 researchers in parallel...
202
+ → Stack, Features, Architecture, Pitfalls
203
+ ```
204
+
205
+ ```bash
206
+ mkdir -p .planning/research
207
+ ```
208
+
209
+ Spawn 4 parallel gsd-project-researcher agents. Each uses this template with dimension-specific fields:
210
+
211
+ **Common structure for all 4 researchers:**
212
+ ```
213
+ Task(prompt="
214
+ <research_type>Project Research — {DIMENSION} for [new features].</research_type>
215
+
216
+ <milestone_context>
217
+ SUBSEQUENT MILESTONE — Adding [target features] to existing app.
218
+ {EXISTING_CONTEXT}
219
+ Focus ONLY on what's needed for the NEW features.
220
+ </milestone_context>
221
+
222
+ <question>{QUESTION}</question>
223
+
224
+ <files_to_read>
225
+ - .planning/PROJECT.md (Project context)
226
+ </files_to_read>
227
+
228
+ ${AGENT_SKILLS_RESEARCHER}
229
+
230
+ <downstream_consumer>{CONSUMER}</downstream_consumer>
231
+
232
+ <quality_gate>{GATES}</quality_gate>
233
+
234
+ <output>
235
+ Write to: .planning/research/{FILE}
236
+ Use template: ~/.claude/get-shit-done/templates/research-project/{FILE}
237
+ </output>
238
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="{DIMENSION} research")
239
+ ```
240
+
241
+ **Dimension-specific fields:**
242
+
243
+ | Field | Stack | Features | Architecture | Pitfalls |
244
+ |-------|-------|----------|-------------|----------|
245
+ | EXISTING_CONTEXT | Existing validated capabilities (DO NOT re-research): [from PROJECT.md] | Existing features (already built): [from PROJECT.md] | Existing architecture: [from PROJECT.md or codebase map] | Focus on common mistakes when ADDING these features to existing system |
246
+ | QUESTION | What stack additions/changes are needed for [new features]? | How do [target features] typically work? Expected behavior? | How do [target features] integrate with existing architecture? | Common mistakes when adding [target features] to [domain]? |
247
+ | CONSUMER | Specific libraries with versions for NEW capabilities, integration points, what NOT to add | Table stakes vs differentiators vs anti-features, complexity noted, dependencies on existing | Integration points, new components, data flow changes, suggested build order | Warning signs, prevention strategy, which phase should address it |
248
+ | GATES | Versions current (verify with Context7), rationale explains WHY, integration considered | Categories clear, complexity noted, dependencies identified | Integration points identified, new vs modified explicit, build order considers deps | Pitfalls specific to adding these features, integration pitfalls covered, prevention actionable |
249
+ | FILE | STACK.md | FEATURES.md | ARCHITECTURE.md | PITFALLS.md |
250
+
251
+ After all 4 complete, spawn synthesizer:
252
+
253
+ ```
254
+ Task(prompt="
255
+ Synthesize research outputs into SUMMARY.md.
256
+
257
+ <files_to_read>
258
+ - .planning/research/STACK.md
259
+ - .planning/research/FEATURES.md
260
+ - .planning/research/ARCHITECTURE.md
261
+ - .planning/research/PITFALLS.md
262
+ </files_to_read>
263
+
264
+ ${AGENT_SKILLS_SYNTHESIZER}
265
+
266
+ Write to: .planning/research/SUMMARY.md
267
+ Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
268
+ Commit after writing.
269
+ ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
270
+ ```
271
+
272
+ Display key findings from SUMMARY.md:
273
+ ```
274
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
275
+ GSD ► RESEARCH COMPLETE ✓
276
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
277
+
278
+ **Stack additions:** [from SUMMARY.md]
279
+ **Feature table stakes:** [from SUMMARY.md]
280
+ **Watch Out For:** [from SUMMARY.md]
281
+ ```
282
+
283
+ **If "Skip research":** Continue to Step 9.
284
+
285
+ ## 9. Define Requirements
286
+
287
+ ```
288
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
289
+ GSD ► DEFINING REQUIREMENTS
290
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
291
+ ```
292
+
293
+ Read PROJECT.md: core value, current milestone goals, validated requirements (what exists).
294
+
295
+ **If research exists:** Read FEATURES.md, extract feature categories.
296
+
297
+ Present features by category:
298
+ ```
299
+ ## [Category 1]
300
+ **Table stakes:** Feature A, Feature B
301
+ **Differentiators:** Feature C, Feature D
302
+ **Research notes:** [any relevant notes]
303
+ ```
304
+
305
+ **If no research:** Gather requirements through conversation. Ask: "What are the main things users need to do with [new features]?" Clarify, probe for related capabilities, group into categories.
306
+
307
+ **Scope each category** via AskUserQuestion (multiSelect: true, header max 12 chars):
308
+ - "[Feature 1]" — [brief description]
309
+ - "[Feature 2]" — [brief description]
310
+ - "None for this milestone" — Defer entire category
311
+
312
+ Track: Selected → this milestone. Unselected table stakes → future. Unselected differentiators → out of scope.
313
+
314
+ **Identify gaps** via AskUserQuestion:
315
+ - "No, research covered it" — Proceed
316
+ - "Yes, let me add some" — Capture additions
317
+
318
+ **Generate REQUIREMENTS.md:**
319
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
320
+ - Future Requirements (deferred)
321
+ - Out of Scope (explicit exclusions with reasoning)
322
+ - Traceability section (empty, filled by roadmap)
323
+
324
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, NOTIF-02). Continue numbering from existing.
325
+
326
+ **Requirement quality criteria:**
327
+
328
+ Good requirements are:
329
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
330
+ - **User-centric:** "User can X" (not "System does Y")
331
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
332
+ - **Independent:** Minimal dependencies on other requirements
333
+
334
+ Present FULL requirements list for confirmation:
335
+
336
+ ```
337
+ ## Milestone v[X.Y] Requirements
338
+
339
+ ### [Category 1]
340
+ - [ ] **CAT1-01**: User can do X
341
+ - [ ] **CAT1-02**: User can do Y
342
+
343
+ ### [Category 2]
344
+ - [ ] **CAT2-01**: User can do Z
345
+
346
+ Does this capture what you're building? (yes / adjust)
347
+ ```
348
+
349
+ If "adjust": Return to scoping.
350
+
351
+ **Commit requirements:**
352
+ ```bash
353
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: define milestone v[X.Y] requirements" --files .planning/REQUIREMENTS.md
354
+ ```
355
+
356
+ ## 10. Create Roadmap
357
+
358
+ ```
359
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
360
+ GSD ► CREATING ROADMAP
361
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
362
+
363
+ ◆ Spawning roadmapper...
364
+ ```
365
+
366
+ **Starting phase number:**
367
+ - If `--reset-phase-numbers` is active, start at **Phase 1**
368
+ - Otherwise, continue from the previous milestone's last phase number (v1.0 ended at phase 5 → v1.1 starts at phase 6)
369
+
370
+ ```
371
+ Task(prompt="
372
+ <planning_context>
373
+ <files_to_read>
374
+ - .planning/PROJECT.md
375
+ - .planning/REQUIREMENTS.md
376
+ - .planning/research/SUMMARY.md (if exists)
377
+ - .planning/config.json
378
+ - .planning/MILESTONES.md
379
+ </files_to_read>
380
+
381
+ ${AGENT_SKILLS_ROADMAPPER}
382
+
383
+ </planning_context>
384
+
385
+ <instructions>
386
+ Create roadmap for milestone v[X.Y]:
387
+ 1. Respect the selected numbering mode:
388
+ - `--reset-phase-numbers` → start at Phase 1
389
+ - default behavior → continue from the previous milestone's last phase number
390
+ 2. Derive phases from THIS MILESTONE's requirements only
391
+ 3. Map every requirement to exactly one phase
392
+ 4. Derive 2-5 success criteria per phase (observable user behaviors)
393
+ 5. Validate 100% coverage
394
+ 6. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
395
+ 7. Return ROADMAP CREATED with summary
396
+
397
+ Write files first, then return.
398
+ </instructions>
399
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
400
+ ```
401
+
402
+ **Handle return:**
403
+
404
+ **If `## ROADMAP BLOCKED`:** Present blocker, work with user, re-spawn.
405
+
406
+ **If `## ROADMAP CREATED`:** Read ROADMAP.md, present inline:
407
+
408
+ ```
409
+ ## Proposed Roadmap
410
+
411
+ **[N] phases** | **[X] requirements mapped** | All covered ✓
412
+
413
+ | # | Phase | Goal | Requirements | Success Criteria |
414
+ |---|-------|------|--------------|------------------|
415
+ | [N] | [Name] | [Goal] | [REQ-IDs] | [count] |
416
+
417
+ ### Phase Details
418
+
419
+ **Phase [N]: [Name]**
420
+ Goal: [goal]
421
+ Requirements: [REQ-IDs]
422
+ Success criteria:
423
+ 1. [criterion]
424
+ 2. [criterion]
425
+ ```
426
+
427
+ **Ask for approval** via AskUserQuestion:
428
+ - "Approve" — Commit and continue
429
+ - "Adjust phases" — Tell me what to change
430
+ - "Review full file" — Show raw ROADMAP.md
431
+
432
+ **If "Adjust":** Get notes, re-spawn roadmapper with revision context, loop until approved.
433
+ **If "Review":** Display raw ROADMAP.md, re-ask.
434
+
435
+ **Commit roadmap** (after approval):
436
+ ```bash
437
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
438
+ ```
439
+
440
+ ## 11. Done
441
+
442
+ ```
443
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
444
+ GSD ► MILESTONE INITIALIZED ✓
445
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
446
+
447
+ **Milestone v[X.Y]: [Name]**
448
+
449
+ | Artifact | Location |
450
+ |----------------|-----------------------------|
451
+ | Project | `.planning/PROJECT.md` |
452
+ | Research | `.planning/research/` |
453
+ | Requirements | `.planning/REQUIREMENTS.md` |
454
+ | Roadmap | `.planning/ROADMAP.md` |
455
+
456
+ **[N] phases** | **[X] requirements** | Ready to build ✓
457
+
458
+ ## ▶ Next Up
459
+
460
+ **Phase [N]: [Phase Name]** — [Goal]
461
+
462
+ `/gsd:discuss-phase [N] ${GSD_WS}` — gather context and clarify approach
463
+
464
+ <sub>`/clear` first → fresh context window</sub>
465
+
466
+ Also: `/gsd:plan-phase [N] ${GSD_WS}` — skip discussion, plan directly
467
+ ```
468
+
469
+ </process>
470
+
471
+ <success_criteria>
472
+ - [ ] PROJECT.md updated with Current Milestone section
473
+ - [ ] STATE.md reset for new milestone
474
+ - [ ] MILESTONE-CONTEXT.md consumed and deleted (if existed)
475
+ - [ ] Research completed (if selected) — 4 parallel agents, milestone-aware
476
+ - [ ] Requirements gathered and scoped per category
477
+ - [ ] REQUIREMENTS.md created with REQ-IDs
478
+ - [ ] gsd-roadmapper spawned with phase numbering context
479
+ - [ ] Roadmap files written immediately (not draft)
480
+ - [ ] User feedback incorporated (if any)
481
+ - [ ] Phase numbering mode respected (continued or reset)
482
+ - [ ] All commits made (if planning docs committed)
483
+ - [ ] User knows next step: `/gsd:discuss-phase [N] ${GSD_WS}`
484
+
485
+ **Atomic commits:** Each phase commits its artifacts immediately.
486
+ </success_criteria>