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,1250 @@
1
+ <purpose>
2
+ Initialize a new project through unified flow: questioning, research (optional), requirements, roadmap. This is the most leveraged moment in any project — deep questioning here means better plans, better execution, better outcomes. One workflow takes you from idea to ready-for-planning.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <available_agent_types>
10
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
11
+ - gsd-project-researcher — Researches project-level technical decisions
12
+ - gsd-research-synthesizer — Synthesizes findings from parallel research agents
13
+ - gsd-roadmapper — Creates phased execution roadmaps
14
+ </available_agent_types>
15
+
16
+ <auto_mode>
17
+
18
+ ## Auto Mode Detection
19
+
20
+ Check if `--auto` flag is present in $ARGUMENTS.
21
+
22
+ **If auto mode:**
23
+
24
+ - Skip brownfield mapping offer (assume greenfield)
25
+ - Skip deep questioning (extract context from provided document)
26
+ - Config: YOLO mode is implicit (skip that question), but ask granularity/git/agents FIRST (Step 2a)
27
+ - After config: run Steps 6-9 automatically with smart defaults:
28
+ - Research: Always yes
29
+ - Requirements: Include all table stakes + features from provided document
30
+ - Requirements approval: Auto-approve
31
+ - Roadmap approval: Auto-approve
32
+
33
+ **Document requirement:**
34
+ Auto mode requires an idea document — either:
35
+
36
+ - File reference: `/gsd:new-project --auto @prd.md`
37
+ - Pasted/written text in the prompt
38
+
39
+ If no document content provided, error:
40
+
41
+ ```
42
+ Error: --auto requires an idea document.
43
+
44
+ Usage:
45
+ /gsd:new-project --auto @your-idea.md
46
+ /gsd:new-project --auto [paste or write your idea here]
47
+
48
+ The document should describe what you want to build.
49
+ ```
50
+
51
+ </auto_mode>
52
+
53
+ <process>
54
+
55
+ ## 1. Setup
56
+
57
+ **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
58
+
59
+ ```bash
60
+ INIT=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" init new-project)
61
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
62
+ AGENT_SKILLS_RESEARCHER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-project-researcher 2>/dev/null)
63
+ AGENT_SKILLS_SYNTHESIZER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-synthesizer 2>/dev/null)
64
+ AGENT_SKILLS_ROADMAPPER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-roadmapper 2>/dev/null)
65
+ ```
66
+
67
+ Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
68
+
69
+ **If `project_exists` is true:** Error — project already initialized. Use `/gsd:progress`.
70
+
71
+ **If `has_git` is false:** Initialize git:
72
+
73
+ ```bash
74
+ git init
75
+ ```
76
+
77
+ ## 2. Brownfield Offer
78
+
79
+ **If auto mode:** Skip to Step 4 (assume greenfield, synthesize PROJECT.md from provided document).
80
+
81
+ **If `needs_codebase_map` is true** (from init — existing code detected but no codebase map):
82
+
83
+ Use AskUserQuestion:
84
+
85
+ - header: "Codebase"
86
+ - question: "I detected existing code in this directory. Would you like to map the codebase first?"
87
+ - options:
88
+ - "Map codebase first" — Run /gsd:map-codebase to understand existing architecture (Recommended)
89
+ - "Skip mapping" — Proceed with project initialization
90
+
91
+ **If "Map codebase first":**
92
+
93
+ ```
94
+ Run `/gsd:map-codebase` first, then return to `/gsd:new-project`
95
+ ```
96
+
97
+ Exit command.
98
+
99
+ **If "Skip mapping" OR `needs_codebase_map` is false:** Continue to Step 3.
100
+
101
+ ## 2a. Auto Mode Config (auto mode only)
102
+
103
+ **If auto mode:** Collect config settings upfront before processing the idea document.
104
+
105
+ YOLO mode is implicit (auto = YOLO). Ask remaining config questions:
106
+
107
+ **Round 1 — Core settings (3 questions, no Mode question):**
108
+
109
+ ```
110
+ AskUserQuestion([
111
+ {
112
+ header: "Granularity",
113
+ question: "How finely should scope be sliced into phases?",
114
+ multiSelect: false,
115
+ options: [
116
+ { label: "Coarse (Recommended)", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
117
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
118
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
119
+ ]
120
+ },
121
+ {
122
+ header: "Execution",
123
+ question: "Run plans in parallel?",
124
+ multiSelect: false,
125
+ options: [
126
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
127
+ { label: "Sequential", description: "One plan at a time" }
128
+ ]
129
+ },
130
+ {
131
+ header: "Git Tracking",
132
+ question: "Commit planning docs to git?",
133
+ multiSelect: false,
134
+ options: [
135
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
136
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
137
+ ]
138
+ }
139
+ ])
140
+ ```
141
+
142
+ **Round 2 — Workflow agents (same as Step 5):**
143
+
144
+ ```
145
+ AskUserQuestion([
146
+ {
147
+ header: "Research",
148
+ question: "Research before planning each phase? (adds tokens/time)",
149
+ multiSelect: false,
150
+ options: [
151
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
152
+ { label: "No", description: "Plan directly from requirements" }
153
+ ]
154
+ },
155
+ {
156
+ header: "Plan Check",
157
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
158
+ multiSelect: false,
159
+ options: [
160
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
161
+ { label: "No", description: "Execute plans without verification" }
162
+ ]
163
+ },
164
+ {
165
+ header: "Verifier",
166
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
167
+ multiSelect: false,
168
+ options: [
169
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
170
+ { label: "No", description: "Trust execution, skip verification" }
171
+ ]
172
+ },
173
+ {
174
+ header: "AI Models",
175
+ question: "Which AI models for planning agents?",
176
+ multiSelect: false,
177
+ options: [
178
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
179
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
180
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" },
181
+ { label: "Inherit", description: "Use the current session model for all agents (OpenCode /model)" }
182
+ ]
183
+ }
184
+ ])
185
+ ```
186
+
187
+ Create `.planning/config.json` with all settings (CLI fills in remaining defaults automatically):
188
+
189
+ ```bash
190
+ mkdir -p .planning
191
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-new-project '{"mode":"yolo","granularity":"[selected]","parallelization":true|false,"commit_docs":true|false,"model_profile":"quality|balanced|budget|inherit","workflow":{"research":true|false,"plan_check":true|false,"verifier":true|false,"nyquist_validation":true|false,"auto_advance":true}}'
192
+ ```
193
+
194
+ **If commit_docs = No:** Add `.planning/` to `.gitignore`.
195
+
196
+ **Commit config.json:**
197
+
198
+ ```bash
199
+ mkdir -p .planning
200
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "chore: add project config" --files .planning/config.json
201
+ ```
202
+
203
+ **Persist auto-advance chain flag to config (survives context compaction):**
204
+
205
+ ```bash
206
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-set workflow._auto_chain_active true
207
+ ```
208
+
209
+ Proceed to Step 4 (skip Steps 3 and 5).
210
+
211
+ ## 3. Deep Questioning
212
+
213
+ **If auto mode:** Skip (already handled in Step 2a). Extract project context from provided document instead and proceed to Step 4.
214
+
215
+ **Display stage banner:**
216
+
217
+ ```
218
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
219
+ GSD ► QUESTIONING
220
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
221
+ ```
222
+
223
+ **Open the conversation:**
224
+
225
+ Ask inline (freeform, NOT AskUserQuestion):
226
+
227
+ "What do you want to build?"
228
+
229
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
230
+
231
+ **Research-before-questions mode:** Check if `workflow.research_before_questions` is enabled in `.planning/config.json` (or the config from init context). When enabled, before asking follow-up questions about a topic area:
232
+
233
+ 1. Do a brief web search for best practices related to what the user described
234
+ 2. Mention key findings naturally as you ask questions (e.g., "Most projects like this use X — is that what you're thinking, or something different?")
235
+ 3. This makes questions more informed without changing the conversational flow
236
+
237
+ When disabled (default), ask questions directly as before.
238
+
239
+ **Follow the thread:**
240
+
241
+ Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
242
+
243
+ Keep following threads. Each answer opens new threads to explore. Ask about:
244
+
245
+ - What excited them
246
+ - What problem sparked this
247
+ - What they mean by vague terms
248
+ - What it would actually look like
249
+ - What's already decided
250
+
251
+ Consult `questioning.md` for techniques:
252
+
253
+ - Challenge vagueness
254
+ - Make abstract concrete
255
+ - Surface assumptions
256
+ - Find edges
257
+ - Reveal motivation
258
+
259
+ **Check context (background, not out loud):**
260
+
261
+ As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
262
+
263
+ **Decision gate:**
264
+
265
+ When you could write a clear PROJECT.md, use AskUserQuestion:
266
+
267
+ - header: "Ready?"
268
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
269
+ - options:
270
+ - "Create PROJECT.md" — Let's move forward
271
+ - "Keep exploring" — I want to share more / ask me more
272
+
273
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
274
+
275
+ Loop until "Create PROJECT.md" selected.
276
+
277
+ ## 4. Write PROJECT.md
278
+
279
+ **If auto mode:** Synthesize from provided document. No "Ready?" gate was shown — proceed directly to commit.
280
+
281
+ Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
282
+
283
+ **For greenfield projects:**
284
+
285
+ Initialize requirements as hypotheses:
286
+
287
+ ```markdown
288
+ ## Requirements
289
+
290
+ ### Validated
291
+
292
+ (None yet — ship to validate)
293
+
294
+ ### Active
295
+
296
+ - [ ] [Requirement 1]
297
+ - [ ] [Requirement 2]
298
+ - [ ] [Requirement 3]
299
+
300
+ ### Out of Scope
301
+
302
+ - [Exclusion 1] — [why]
303
+ - [Exclusion 2] — [why]
304
+ ```
305
+
306
+ All Active requirements are hypotheses until shipped and validated.
307
+
308
+ **For brownfield projects (codebase map exists):**
309
+
310
+ Infer Validated requirements from existing code:
311
+
312
+ 1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
313
+ 2. Identify what the codebase already does
314
+ 3. These become the initial Validated set
315
+
316
+ ```markdown
317
+ ## Requirements
318
+
319
+ ### Validated
320
+
321
+ - ✓ [Existing capability 1] — existing
322
+ - ✓ [Existing capability 2] — existing
323
+ - ✓ [Existing capability 3] — existing
324
+
325
+ ### Active
326
+
327
+ - [ ] [New requirement 1]
328
+ - [ ] [New requirement 2]
329
+
330
+ ### Out of Scope
331
+
332
+ - [Exclusion 1] — [why]
333
+ ```
334
+
335
+ **Key Decisions:**
336
+
337
+ Initialize with any decisions made during questioning:
338
+
339
+ ```markdown
340
+ ## Key Decisions
341
+
342
+ | Decision | Rationale | Outcome |
343
+ |----------|-----------|---------|
344
+ | [Choice from questioning] | [Why] | — Pending |
345
+ ```
346
+
347
+ **Last updated footer:**
348
+
349
+ ```markdown
350
+ ---
351
+ *Last updated: [date] after initialization*
352
+ ```
353
+
354
+ **Evolution section** (include at the end of PROJECT.md, before the footer):
355
+
356
+ ```markdown
357
+ ## Evolution
358
+
359
+ This document evolves at phase transitions and milestone boundaries.
360
+
361
+ **After each phase transition** (via `/gsd:transition`):
362
+ 1. Requirements invalidated? → Move to Out of Scope with reason
363
+ 2. Requirements validated? → Move to Validated with phase reference
364
+ 3. New requirements emerged? → Add to Active
365
+ 4. Decisions to log? → Add to Key Decisions
366
+ 5. "What This Is" still accurate? → Update if drifted
367
+
368
+ **After each milestone** (via `/gsd:complete-milestone`):
369
+ 1. Full review of all sections
370
+ 2. Core Value check — still the right priority?
371
+ 3. Audit Out of Scope — reasons still valid?
372
+ 4. Update Context with current state
373
+ ```
374
+
375
+ Do not compress. Capture everything gathered.
376
+
377
+ **Commit PROJECT.md:**
378
+
379
+ ```bash
380
+ mkdir -p .planning
381
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: initialize project" --files .planning/PROJECT.md
382
+ ```
383
+
384
+ ## 5. Workflow Preferences
385
+
386
+ **If auto mode:** Skip — config was collected in Step 2a. Proceed to Step 5.5.
387
+
388
+ **Check for global defaults** at `~/.gsd/defaults.json`. If the file exists, offer to use saved defaults:
389
+
390
+ ```
391
+ AskUserQuestion([
392
+ {
393
+ question: "Use your saved default settings? (from ~/.gsd/defaults.json)",
394
+ header: "Defaults",
395
+ multiSelect: false,
396
+ options: [
397
+ { label: "Yes (Recommended)", description: "Use saved defaults, skip settings questions" },
398
+ { label: "No", description: "Configure settings manually" }
399
+ ]
400
+ }
401
+ ])
402
+ ```
403
+
404
+ If "Yes": read `~/.gsd/defaults.json`, use those values for config.json, and skip directly to **Commit config.json** below.
405
+
406
+ If "No" or `~/.gsd/defaults.json` doesn't exist: proceed with the questions below.
407
+
408
+ **Round 1 — Core workflow settings (4 questions):**
409
+
410
+ ```
411
+ questions: [
412
+ {
413
+ header: "Mode",
414
+ question: "How do you want to work?",
415
+ multiSelect: false,
416
+ options: [
417
+ { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
418
+ { label: "Interactive", description: "Confirm at each step" }
419
+ ]
420
+ },
421
+ {
422
+ header: "Granularity",
423
+ question: "How finely should scope be sliced into phases?",
424
+ multiSelect: false,
425
+ options: [
426
+ { label: "Coarse", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
427
+ { label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
428
+ { label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
429
+ ]
430
+ },
431
+ {
432
+ header: "Execution",
433
+ question: "Run plans in parallel?",
434
+ multiSelect: false,
435
+ options: [
436
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
437
+ { label: "Sequential", description: "One plan at a time" }
438
+ ]
439
+ },
440
+ {
441
+ header: "Git Tracking",
442
+ question: "Commit planning docs to git?",
443
+ multiSelect: false,
444
+ options: [
445
+ { label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
446
+ { label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
447
+ ]
448
+ }
449
+ ]
450
+ ```
451
+
452
+ **Round 2 — Workflow agents:**
453
+
454
+ These spawn additional agents during planning/execution. They add tokens and time but improve quality.
455
+
456
+ | Agent | When it runs | What it does |
457
+ |-------|--------------|--------------|
458
+ | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
459
+ | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
460
+ | **Verifier** | After phase execution | Confirms must-haves were delivered |
461
+
462
+ All recommended for important projects. Skip for quick experiments.
463
+
464
+ ```
465
+ questions: [
466
+ {
467
+ header: "Research",
468
+ question: "Research before planning each phase? (adds tokens/time)",
469
+ multiSelect: false,
470
+ options: [
471
+ { label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
472
+ { label: "No", description: "Plan directly from requirements" }
473
+ ]
474
+ },
475
+ {
476
+ header: "Plan Check",
477
+ question: "Verify plans will achieve their goals? (adds tokens/time)",
478
+ multiSelect: false,
479
+ options: [
480
+ { label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
481
+ { label: "No", description: "Execute plans without verification" }
482
+ ]
483
+ },
484
+ {
485
+ header: "Verifier",
486
+ question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
487
+ multiSelect: false,
488
+ options: [
489
+ { label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
490
+ { label: "No", description: "Trust execution, skip verification" }
491
+ ]
492
+ },
493
+ {
494
+ header: "AI Models",
495
+ question: "Which AI models for planning agents?",
496
+ multiSelect: false,
497
+ options: [
498
+ { label: "Balanced (Recommended)", description: "Sonnet for most agents — good quality/cost ratio" },
499
+ { label: "Quality", description: "Opus for research/roadmap — higher cost, deeper analysis" },
500
+ { label: "Budget", description: "Haiku where possible — fastest, lowest cost" },
501
+ { label: "Inherit", description: "Use the current session model for all agents (OpenCode /model)" }
502
+ ]
503
+ }
504
+ ]
505
+ ```
506
+
507
+ Create `.planning/config.json` with all settings (CLI fills in remaining defaults automatically):
508
+
509
+ ```bash
510
+ mkdir -p .planning
511
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-new-project '{"mode":"[yolo|interactive]","granularity":"[selected]","parallelization":true|false,"commit_docs":true|false,"model_profile":"quality|balanced|budget|inherit","workflow":{"research":true|false,"plan_check":true|false,"verifier":true|false,"nyquist_validation":[false if granularity=coarse, true otherwise]}}'
512
+ ```
513
+
514
+ **Note:** Run `/gsd:settings` anytime to update model profile, workflow agents, branching strategy, and other preferences.
515
+
516
+ **If commit_docs = No:**
517
+
518
+ - Set `commit_docs: false` in config.json
519
+ - Add `.planning/` to `.gitignore` (create if needed)
520
+
521
+ **If commit_docs = Yes:**
522
+
523
+ - No additional gitignore entries needed
524
+
525
+ **Commit config.json:**
526
+
527
+ ```bash
528
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "chore: add project config" --files .planning/config.json
529
+ ```
530
+
531
+ ## 5.1. Sub-Repo Detection
532
+
533
+ **Detect multi-repo workspace:**
534
+
535
+ Check for directories with their own `.git` folders (separate repos within the workspace):
536
+
537
+ ```bash
538
+ find . -maxdepth 1 -type d -not -name ".*" -not -name "node_modules" -exec test -d "{}/.git" \; -print
539
+ ```
540
+
541
+ **If sub-repos found:**
542
+
543
+ Strip the `./` prefix to get directory names (e.g., `./backend` → `backend`).
544
+
545
+ Use AskUserQuestion:
546
+
547
+ - header: "Multi-Repo Workspace"
548
+ - question: "I detected separate git repos in this workspace. Which directories contain code that GSD should commit to?"
549
+ - multiSelect: true
550
+ - options: one option per detected directory
551
+ - "[directory name]" — Separate git repo
552
+
553
+ **If user selects one or more directories:**
554
+
555
+ - Set `planning.sub_repos` in config.json to the selected directory names array (e.g., `["backend", "frontend"]`)
556
+ - Auto-set `planning.commit_docs` to `false` (planning docs stay local in multi-repo workspaces)
557
+ - Add `.planning/` to `.gitignore` if not already present
558
+
559
+ Config changes are saved locally — no commit needed since `commit_docs` is `false` in multi-repo mode.
560
+
561
+ **If no sub-repos found or user selects none:** Continue with no changes to config.
562
+
563
+ ## 5.5. Resolve Model Profile
564
+
565
+ Use models from init: `researcher_model`, `synthesizer_model`, `roadmapper_model`.
566
+
567
+ ## 6. Research Decision
568
+
569
+ **If auto mode:** Default to "Research first" without asking.
570
+
571
+ Use AskUserQuestion:
572
+
573
+ - header: "Research"
574
+ - question: "Research the domain ecosystem before defining requirements?"
575
+ - options:
576
+ - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
577
+ - "Skip research" — I know this domain well, go straight to requirements
578
+
579
+ **If "Research first":**
580
+
581
+ Display stage banner:
582
+
583
+ ```
584
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
585
+ GSD ► RESEARCHING
586
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
587
+
588
+ Researching [domain] ecosystem...
589
+ ```
590
+
591
+ Create research directory:
592
+
593
+ ```bash
594
+ mkdir -p .planning/research
595
+ ```
596
+
597
+ **Determine milestone context:**
598
+
599
+ Check if this is greenfield or subsequent milestone:
600
+
601
+ - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
602
+ - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
603
+
604
+ Display spawning indicator:
605
+
606
+ ```
607
+ ◆ Spawning 4 researchers in parallel...
608
+ → Stack research
609
+ → Features research
610
+ → Architecture research
611
+ → Pitfalls research
612
+ ```
613
+
614
+ Spawn 4 parallel gsd-project-researcher agents with path references:
615
+
616
+ ```
617
+ Task(prompt="<research_type>
618
+ Project Research — Stack dimension for [domain].
619
+ </research_type>
620
+
621
+ <milestone_context>
622
+ [greenfield OR subsequent]
623
+
624
+ Greenfield: Research the standard stack for building [domain] from scratch.
625
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
626
+ </milestone_context>
627
+
628
+ <question>
629
+ What's the standard 2025 stack for [domain]?
630
+ </question>
631
+
632
+ <files_to_read>
633
+ - {project_path} (Project context and goals)
634
+ </files_to_read>
635
+
636
+ ${AGENT_SKILLS_RESEARCHER}
637
+
638
+ <downstream_consumer>
639
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
640
+ - Specific libraries with versions
641
+ - Clear rationale for each choice
642
+ - What NOT to use and why
643
+ </downstream_consumer>
644
+
645
+ <quality_gate>
646
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
647
+ - [ ] Rationale explains WHY, not just WHAT
648
+ - [ ] Confidence levels assigned to each recommendation
649
+ </quality_gate>
650
+
651
+ <output>
652
+ Write to: .planning/research/STACK.md
653
+ Use template: ~/.claude/get-shit-done/templates/research-project/STACK.md
654
+ </output>
655
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
656
+
657
+ Task(prompt="<research_type>
658
+ Project Research — Features dimension for [domain].
659
+ </research_type>
660
+
661
+ <milestone_context>
662
+ [greenfield OR subsequent]
663
+
664
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
665
+ Subsequent: How do [target features] typically work? What's expected behavior?
666
+ </milestone_context>
667
+
668
+ <question>
669
+ What features do [domain] products have? What's table stakes vs differentiating?
670
+ </question>
671
+
672
+ <files_to_read>
673
+ - {project_path} (Project context)
674
+ </files_to_read>
675
+
676
+ ${AGENT_SKILLS_RESEARCHER}
677
+
678
+ <downstream_consumer>
679
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
680
+ - Table stakes (must have or users leave)
681
+ - Differentiators (competitive advantage)
682
+ - Anti-features (things to deliberately NOT build)
683
+ </downstream_consumer>
684
+
685
+ <quality_gate>
686
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
687
+ - [ ] Complexity noted for each feature
688
+ - [ ] Dependencies between features identified
689
+ </quality_gate>
690
+
691
+ <output>
692
+ Write to: .planning/research/FEATURES.md
693
+ Use template: ~/.claude/get-shit-done/templates/research-project/FEATURES.md
694
+ </output>
695
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
696
+
697
+ Task(prompt="<research_type>
698
+ Project Research — Architecture dimension for [domain].
699
+ </research_type>
700
+
701
+ <milestone_context>
702
+ [greenfield OR subsequent]
703
+
704
+ Greenfield: How are [domain] systems typically structured? What are major components?
705
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
706
+ </milestone_context>
707
+
708
+ <question>
709
+ How are [domain] systems typically structured? What are major components?
710
+ </question>
711
+
712
+ <files_to_read>
713
+ - {project_path} (Project context)
714
+ </files_to_read>
715
+
716
+ ${AGENT_SKILLS_RESEARCHER}
717
+
718
+ <downstream_consumer>
719
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
720
+ - Component boundaries (what talks to what)
721
+ - Data flow (how information moves)
722
+ - Suggested build order (dependencies between components)
723
+ </downstream_consumer>
724
+
725
+ <quality_gate>
726
+ - [ ] Components clearly defined with boundaries
727
+ - [ ] Data flow direction explicit
728
+ - [ ] Build order implications noted
729
+ </quality_gate>
730
+
731
+ <output>
732
+ Write to: .planning/research/ARCHITECTURE.md
733
+ Use template: ~/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md
734
+ </output>
735
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
736
+
737
+ Task(prompt="<research_type>
738
+ Project Research — Pitfalls dimension for [domain].
739
+ </research_type>
740
+
741
+ <milestone_context>
742
+ [greenfield OR subsequent]
743
+
744
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
745
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
746
+ </milestone_context>
747
+
748
+ <question>
749
+ What do [domain] projects commonly get wrong? Critical mistakes?
750
+ </question>
751
+
752
+ <files_to_read>
753
+ - {project_path} (Project context)
754
+ </files_to_read>
755
+
756
+ ${AGENT_SKILLS_RESEARCHER}
757
+
758
+ <downstream_consumer>
759
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
760
+ - Warning signs (how to detect early)
761
+ - Prevention strategy (how to avoid)
762
+ - Which phase should address it
763
+ </downstream_consumer>
764
+
765
+ <quality_gate>
766
+ - [ ] Pitfalls are specific to this domain (not generic advice)
767
+ - [ ] Prevention strategies are actionable
768
+ - [ ] Phase mapping included where relevant
769
+ </quality_gate>
770
+
771
+ <output>
772
+ Write to: .planning/research/PITFALLS.md
773
+ Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md
774
+ </output>
775
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
776
+ ```
777
+
778
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
779
+
780
+ ```
781
+ Task(prompt="
782
+ <task>
783
+ Synthesize research outputs into SUMMARY.md.
784
+ </task>
785
+
786
+ <files_to_read>
787
+ - .planning/research/STACK.md
788
+ - .planning/research/FEATURES.md
789
+ - .planning/research/ARCHITECTURE.md
790
+ - .planning/research/PITFALLS.md
791
+ </files_to_read>
792
+
793
+ ${AGENT_SKILLS_SYNTHESIZER}
794
+
795
+ <output>
796
+ Write to: .planning/research/SUMMARY.md
797
+ Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
798
+ Commit after writing.
799
+ </output>
800
+ ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
801
+ ```
802
+
803
+ Display research complete banner and key findings:
804
+
805
+ ```
806
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
807
+ GSD ► RESEARCH COMPLETE ✓
808
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
809
+
810
+ ## Key Findings
811
+
812
+ **Stack:** [from SUMMARY.md]
813
+ **Table Stakes:** [from SUMMARY.md]
814
+ **Watch Out For:** [from SUMMARY.md]
815
+
816
+ Files: `.planning/research/`
817
+ ```
818
+
819
+ **If "Skip research":** Continue to Step 7.
820
+
821
+ ## 7. Define Requirements
822
+
823
+ Display stage banner:
824
+
825
+ ```
826
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
827
+ GSD ► DEFINING REQUIREMENTS
828
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
829
+ ```
830
+
831
+ **Load context:**
832
+
833
+ Read PROJECT.md and extract:
834
+
835
+ - Core value (the ONE thing that must work)
836
+ - Stated constraints (budget, timeline, tech limitations)
837
+ - Any explicit scope boundaries
838
+
839
+ **If research exists:** Read research/FEATURES.md and extract feature categories.
840
+
841
+ **If auto mode:**
842
+
843
+ - Auto-include all table stakes features (users expect these)
844
+ - Include features explicitly mentioned in provided document
845
+ - Auto-defer differentiators not mentioned in document
846
+ - Skip per-category AskUserQuestion loops
847
+ - Skip "Any additions?" question
848
+ - Skip requirements approval gate
849
+ - Generate REQUIREMENTS.md and commit directly
850
+
851
+ **Present features by category (interactive mode only):**
852
+
853
+ ```
854
+ Here are the features for [domain]:
855
+
856
+ ## Authentication
857
+ **Table stakes:**
858
+ - Sign up with email/password
859
+ - Email verification
860
+ - Password reset
861
+ - Session management
862
+
863
+ **Differentiators:**
864
+ - Magic link login
865
+ - OAuth (Google, GitHub)
866
+ - 2FA
867
+
868
+ **Research notes:** [any relevant notes]
869
+
870
+ ---
871
+
872
+ ## [Next Category]
873
+ ...
874
+ ```
875
+
876
+ **If no research:** Gather requirements through conversation instead.
877
+
878
+ Ask: "What are the main things users need to be able to do?"
879
+
880
+ For each capability mentioned:
881
+
882
+ - Ask clarifying questions to make it specific
883
+ - Probe for related capabilities
884
+ - Group into categories
885
+
886
+ **Scope each category:**
887
+
888
+ For each category, use AskUserQuestion:
889
+
890
+ - header: "[Category]" (max 12 chars)
891
+ - question: "Which [category] features are in v1?"
892
+ - multiSelect: true
893
+ - options:
894
+ - "[Feature 1]" — [brief description]
895
+ - "[Feature 2]" — [brief description]
896
+ - "[Feature 3]" — [brief description]
897
+ - "None for v1" — Defer entire category
898
+
899
+ Track responses:
900
+
901
+ - Selected features → v1 requirements
902
+ - Unselected table stakes → v2 (users expect these)
903
+ - Unselected differentiators → out of scope
904
+
905
+ **Identify gaps:**
906
+
907
+ Use AskUserQuestion:
908
+
909
+ - header: "Additions"
910
+ - question: "Any requirements research missed? (Features specific to your vision)"
911
+ - options:
912
+ - "No, research covered it" — Proceed
913
+ - "Yes, let me add some" — Capture additions
914
+
915
+ **Validate core value:**
916
+
917
+ Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
918
+
919
+ **Generate REQUIREMENTS.md:**
920
+
921
+ Create `.planning/REQUIREMENTS.md` with:
922
+
923
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
924
+ - v2 Requirements (deferred)
925
+ - Out of Scope (explicit exclusions with reasoning)
926
+ - Traceability section (empty, filled by roadmap)
927
+
928
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
929
+
930
+ **Requirement quality criteria:**
931
+
932
+ Good requirements are:
933
+
934
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
935
+ - **User-centric:** "User can X" (not "System does Y")
936
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
937
+ - **Independent:** Minimal dependencies on other requirements
938
+
939
+ Reject vague requirements. Push for specificity:
940
+
941
+ - "Handle authentication" → "User can log in with email/password and stay logged in across sessions"
942
+ - "Support sharing" → "User can share post via link that opens in recipient's browser"
943
+
944
+ **Present full requirements list (interactive mode only):**
945
+
946
+ Show every requirement (not counts) for user confirmation:
947
+
948
+ ```
949
+ ## v1 Requirements
950
+
951
+ ### Authentication
952
+ - [ ] **AUTH-01**: User can create account with email/password
953
+ - [ ] **AUTH-02**: User can log in and stay logged in across sessions
954
+ - [ ] **AUTH-03**: User can log out from any page
955
+
956
+ ### Content
957
+ - [ ] **CONT-01**: User can create posts with text
958
+ - [ ] **CONT-02**: User can edit their own posts
959
+
960
+ [... full list ...]
961
+
962
+ ---
963
+
964
+ Does this capture what you're building? (yes / adjust)
965
+ ```
966
+
967
+ If "adjust": Return to scoping.
968
+
969
+ **Commit requirements:**
970
+
971
+ ```bash
972
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: define v1 requirements" --files .planning/REQUIREMENTS.md
973
+ ```
974
+
975
+ ## 8. Create Roadmap
976
+
977
+ Display stage banner:
978
+
979
+ ```
980
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
981
+ GSD ► CREATING ROADMAP
982
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
983
+
984
+ ◆ Spawning roadmapper...
985
+ ```
986
+
987
+ Spawn gsd-roadmapper agent with path references:
988
+
989
+ ```
990
+ Task(prompt="
991
+ <planning_context>
992
+
993
+ <files_to_read>
994
+ - .planning/PROJECT.md (Project context)
995
+ - .planning/REQUIREMENTS.md (v1 Requirements)
996
+ - .planning/research/SUMMARY.md (Research findings - if exists)
997
+ - .planning/config.json (Granularity and mode settings)
998
+ </files_to_read>
999
+
1000
+ ${AGENT_SKILLS_ROADMAPPER}
1001
+
1002
+ </planning_context>
1003
+
1004
+ <instructions>
1005
+ Create roadmap:
1006
+ 1. Derive phases from requirements (don't impose structure)
1007
+ 2. Map every v1 requirement to exactly one phase
1008
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
1009
+ 4. Validate 100% coverage
1010
+ 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
1011
+ 6. Return ROADMAP CREATED with summary
1012
+
1013
+ Write files first, then return. This ensures artifacts persist even if context is lost.
1014
+ </instructions>
1015
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
1016
+ ```
1017
+
1018
+ **Handle roadmapper return:**
1019
+
1020
+ **If `## ROADMAP BLOCKED`:**
1021
+
1022
+ - Present blocker information
1023
+ - Work with user to resolve
1024
+ - Re-spawn when resolved
1025
+
1026
+ **If `## ROADMAP CREATED`:**
1027
+
1028
+ Read the created ROADMAP.md and present it nicely inline:
1029
+
1030
+ ```
1031
+ ---
1032
+
1033
+ ## Proposed Roadmap
1034
+
1035
+ **[N] phases** | **[X] requirements mapped** | All v1 requirements covered ✓
1036
+
1037
+ | # | Phase | Goal | Requirements | Success Criteria |
1038
+ |---|-------|------|--------------|------------------|
1039
+ | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
1040
+ | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
1041
+ | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
1042
+ ...
1043
+
1044
+ ### Phase Details
1045
+
1046
+ **Phase 1: [Name]**
1047
+ Goal: [goal]
1048
+ Requirements: [REQ-IDs]
1049
+ Success criteria:
1050
+ 1. [criterion]
1051
+ 2. [criterion]
1052
+ 3. [criterion]
1053
+
1054
+ **Phase 2: [Name]**
1055
+ Goal: [goal]
1056
+ Requirements: [REQ-IDs]
1057
+ Success criteria:
1058
+ 1. [criterion]
1059
+ 2. [criterion]
1060
+
1061
+ [... continue for all phases ...]
1062
+
1063
+ ---
1064
+ ```
1065
+
1066
+ **If auto mode:** Skip approval gate — auto-approve and commit directly.
1067
+
1068
+ **CRITICAL: Ask for approval before committing (interactive mode only):**
1069
+
1070
+ Use AskUserQuestion:
1071
+
1072
+ - header: "Roadmap"
1073
+ - question: "Does this roadmap structure work for you?"
1074
+ - options:
1075
+ - "Approve" — Commit and continue
1076
+ - "Adjust phases" — Tell me what to change
1077
+ - "Review full file" — Show raw ROADMAP.md
1078
+
1079
+ **If "Approve":** Continue to commit.
1080
+
1081
+ **If "Adjust phases":**
1082
+
1083
+ - Get user's adjustment notes
1084
+ - Re-spawn roadmapper with revision context:
1085
+
1086
+ ```
1087
+ Task(prompt="
1088
+ <revision>
1089
+ User feedback on roadmap:
1090
+ [user's notes]
1091
+
1092
+ <files_to_read>
1093
+ - .planning/ROADMAP.md (Current roadmap to revise)
1094
+ </files_to_read>
1095
+
1096
+ ${AGENT_SKILLS_ROADMAPPER}
1097
+
1098
+ Update the roadmap based on feedback. Edit files in place.
1099
+ Return ROADMAP REVISED with changes made.
1100
+ </revision>
1101
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
1102
+ ```
1103
+
1104
+ - Present revised roadmap
1105
+ - Loop until user approves
1106
+
1107
+ **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
1108
+
1109
+ **Generate or refresh project CLAUDE.md before final commit:**
1110
+
1111
+ ```bash
1112
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" generate-claude-md
1113
+ ```
1114
+
1115
+ This ensures new projects get the default GSD workflow-enforcement guidance and current project context in `CLAUDE.md`.
1116
+
1117
+ **Commit roadmap (after approval or auto mode):**
1118
+
1119
+ ```bash
1120
+ node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs: create roadmap ([N] phases)" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md CLAUDE.md
1121
+ ```
1122
+
1123
+ ## 9. Done
1124
+
1125
+ Present completion summary:
1126
+
1127
+ ```
1128
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1129
+ GSD ► PROJECT INITIALIZED ✓
1130
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1131
+
1132
+ **[Project Name]**
1133
+
1134
+ | Artifact | Location |
1135
+ |----------------|-----------------------------|
1136
+ | Project | `.planning/PROJECT.md` |
1137
+ | Config | `.planning/config.json` |
1138
+ | Research | `.planning/research/` |
1139
+ | Requirements | `.planning/REQUIREMENTS.md` |
1140
+ | Roadmap | `.planning/ROADMAP.md` |
1141
+ | Project guide | `CLAUDE.md` |
1142
+
1143
+ **[N] phases** | **[X] requirements** | Ready to build ✓
1144
+ ```
1145
+
1146
+ **If auto mode:**
1147
+
1148
+ ```
1149
+ ╔══════════════════════════════════════════╗
1150
+ ║ AUTO-ADVANCING → DISCUSS PHASE 1 ║
1151
+ ╚══════════════════════════════════════════╝
1152
+ ```
1153
+
1154
+ Exit skill and invoke SlashCommand("/gsd:discuss-phase 1 --auto")
1155
+
1156
+ **If interactive mode:**
1157
+
1158
+ Check if Phase 1 has UI indicators (look for `**UI hint**: yes` in Phase 1 detail section of ROADMAP.md):
1159
+
1160
+ ```bash
1161
+ PHASE1_SECTION=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" roadmap get-phase 1 2>/dev/null)
1162
+ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true" || echo "false")
1163
+ ```
1164
+
1165
+ **If Phase 1 has UI (`PHASE1_HAS_UI` is `true`):**
1166
+
1167
+ ```
1168
+ ───────────────────────────────────────────────────────────────
1169
+
1170
+ ## ▶ Next Up
1171
+
1172
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1173
+
1174
+ /gsd:discuss-phase 1 — gather context and clarify approach
1175
+
1176
+ <sub>/clear first → fresh context window</sub>
1177
+
1178
+ ---
1179
+
1180
+ **Also available:**
1181
+ - /gsd:ui-phase 1 — generate UI design contract (recommended for frontend phases)
1182
+ - /gsd:plan-phase 1 — skip discussion, plan directly
1183
+
1184
+ ───────────────────────────────────────────────────────────────
1185
+ ```
1186
+
1187
+ **If Phase 1 has no UI:**
1188
+
1189
+ ```
1190
+ ───────────────────────────────────────────────────────────────
1191
+
1192
+ ## ▶ Next Up
1193
+
1194
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
1195
+
1196
+ /gsd:discuss-phase 1 — gather context and clarify approach
1197
+
1198
+ <sub>/clear first → fresh context window</sub>
1199
+
1200
+ ---
1201
+
1202
+ **Also available:**
1203
+ - /gsd:plan-phase 1 — skip discussion, plan directly
1204
+
1205
+ ───────────────────────────────────────────────────────────────
1206
+ ```
1207
+
1208
+ </process>
1209
+
1210
+ <output>
1211
+
1212
+ - `.planning/PROJECT.md`
1213
+ - `.planning/config.json`
1214
+ - `.planning/research/` (if research selected)
1215
+ - `STACK.md`
1216
+ - `FEATURES.md`
1217
+ - `ARCHITECTURE.md`
1218
+ - `PITFALLS.md`
1219
+ - `SUMMARY.md`
1220
+ - `.planning/REQUIREMENTS.md`
1221
+ - `.planning/ROADMAP.md`
1222
+ - `.planning/STATE.md`
1223
+ - `CLAUDE.md`
1224
+
1225
+ </output>
1226
+
1227
+ <success_criteria>
1228
+
1229
+ - [ ] .planning/ directory created
1230
+ - [ ] Git repo initialized
1231
+ - [ ] Brownfield detection completed
1232
+ - [ ] Deep questioning completed (threads followed, not rushed)
1233
+ - [ ] PROJECT.md captures full context → **committed**
1234
+ - [ ] config.json has workflow mode, granularity, parallelization → **committed**
1235
+ - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
1236
+ - [ ] Requirements gathered (from research or conversation)
1237
+ - [ ] User scoped each category (v1/v2/out of scope)
1238
+ - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
1239
+ - [ ] gsd-roadmapper spawned with context
1240
+ - [ ] Roadmap files written immediately (not draft)
1241
+ - [ ] User feedback incorporated (if any)
1242
+ - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
1243
+ - [ ] STATE.md initialized
1244
+ - [ ] REQUIREMENTS.md traceability updated
1245
+ - [ ] CLAUDE.md generated with GSD workflow guidance
1246
+ - [ ] User knows next step is `/gsd:discuss-phase 1`
1247
+
1248
+ **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
1249
+
1250
+ </success_criteria>