gsd-opencode 1.5.2 → 1.6.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 (108) hide show
  1. package/agents/gsd-codebase-mapper.md +743 -0
  2. package/agents/gsd-debugger.md +1191 -0
  3. package/agents/gsd-executor.md +759 -0
  4. package/agents/gsd-integration-checker.md +427 -0
  5. package/agents/gsd-phase-researcher.md +637 -0
  6. package/agents/gsd-plan-checker.md +749 -0
  7. package/agents/gsd-planner.md +1373 -0
  8. package/agents/gsd-project-researcher.md +877 -0
  9. package/agents/gsd-research-synthesizer.md +250 -0
  10. package/agents/gsd-roadmapper.md +610 -0
  11. package/agents/gsd-verifier.md +782 -0
  12. package/bin/install.js +11 -1
  13. package/command/gsd/add-phase.md +5 -7
  14. package/command/gsd/add-todo.md +4 -6
  15. package/command/gsd/audit-milestone.md +257 -0
  16. package/command/gsd/check-todos.md +2 -4
  17. package/command/gsd/complete-milestone.md +53 -23
  18. package/command/gsd/debug.md +120 -30
  19. package/command/gsd/discuss-phase.md +51 -30
  20. package/command/gsd/execute-phase.md +192 -26
  21. package/command/gsd/help.md +66 -75
  22. package/command/gsd/insert-phase.md +6 -6
  23. package/command/gsd/list-phase-assumptions.md +1 -1
  24. package/command/gsd/map-codebase.md +15 -28
  25. package/command/gsd/new-milestone.md +693 -36
  26. package/command/gsd/new-project.md +668 -108
  27. package/command/gsd/pause-work.md +2 -2
  28. package/command/gsd/plan-milestone-gaps.md +284 -0
  29. package/command/gsd/plan-phase.md +449 -42
  30. package/command/gsd/progress.md +66 -36
  31. package/command/gsd/remove-phase.md +17 -19
  32. package/command/gsd/research-phase.md +155 -67
  33. package/command/gsd/resume-work.md +3 -3
  34. package/command/gsd/update.md +172 -0
  35. package/command/gsd/verify-work.md +186 -38
  36. package/command/gsd/whats-new.md +124 -0
  37. package/get-shit-done/references/checkpoints.md +599 -98
  38. package/get-shit-done/references/continuation-format.md +5 -11
  39. package/get-shit-done/references/questioning.md +87 -108
  40. package/get-shit-done/references/tdd.md +3 -3
  41. package/get-shit-done/references/ui-brand.md +160 -0
  42. package/get-shit-done/references/verification-patterns.md +595 -0
  43. package/get-shit-done/templates/DEBUG.md +3 -3
  44. package/get-shit-done/templates/UAT.md +247 -0
  45. package/get-shit-done/templates/codebase/architecture.md +5 -5
  46. package/get-shit-done/templates/codebase/concerns.md +1 -1
  47. package/get-shit-done/templates/codebase/conventions.md +1 -1
  48. package/get-shit-done/templates/codebase/structure.md +8 -8
  49. package/get-shit-done/templates/codebase/testing.md +2 -2
  50. package/get-shit-done/templates/context.md +221 -70
  51. package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
  52. package/get-shit-done/templates/discovery.md +5 -5
  53. package/get-shit-done/templates/phase-prompt.md +115 -2
  54. package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
  55. package/get-shit-done/templates/requirements.md +231 -0
  56. package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
  57. package/get-shit-done/templates/research-project/FEATURES.md +147 -0
  58. package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
  59. package/get-shit-done/templates/research-project/STACK.md +120 -0
  60. package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
  61. package/get-shit-done/templates/research.md +2 -2
  62. package/get-shit-done/templates/roadmap.md +26 -20
  63. package/get-shit-done/templates/state.md +2 -17
  64. package/get-shit-done/templates/summary.md +13 -17
  65. package/get-shit-done/templates/user-setup.md +323 -0
  66. package/get-shit-done/templates/verification-report.md +322 -0
  67. package/get-shit-done/workflows/complete-milestone.md +152 -45
  68. package/get-shit-done/workflows/diagnose-issues.md +233 -0
  69. package/get-shit-done/workflows/discovery-phase.md +12 -17
  70. package/get-shit-done/workflows/discuss-phase.md +309 -124
  71. package/get-shit-done/workflows/execute-phase.md +177 -18
  72. package/get-shit-done/workflows/execute-plan.md +163 -145
  73. package/get-shit-done/workflows/map-codebase.md +86 -231
  74. package/get-shit-done/workflows/resume-project.md +18 -20
  75. package/get-shit-done/workflows/transition.md +7 -23
  76. package/get-shit-done/workflows/verify-phase.md +629 -0
  77. package/get-shit-done/workflows/verify-work.md +495 -134
  78. package/package.json +2 -1
  79. package/command/gsd/consider-issues.md +0 -201
  80. package/command/gsd/create-roadmap.md +0 -115
  81. package/command/gsd/discuss-milestone.md +0 -47
  82. package/command/gsd/execute-plan.md +0 -103
  83. package/command/gsd/plan-fix.md +0 -205
  84. package/command/gsd/status.md +0 -127
  85. package/get-shit-done/references/debugging/debugging-mindset.md +0 -253
  86. package/get-shit-done/references/debugging/hypothesis-testing.md +0 -373
  87. package/get-shit-done/references/debugging/investigation-techniques.md +0 -337
  88. package/get-shit-done/references/debugging/verification-patterns.md +0 -425
  89. package/get-shit-done/references/debugging/when-to-research.md +0 -361
  90. package/get-shit-done/references/plan-format.md +0 -475
  91. package/get-shit-done/references/principles.md +0 -157
  92. package/get-shit-done/references/research-pitfalls.md +0 -215
  93. package/get-shit-done/references/scope-estimation.md +0 -256
  94. package/get-shit-done/templates/agent-history.md +0 -263
  95. package/get-shit-done/templates/checkpoint-return.md +0 -204
  96. package/get-shit-done/templates/config.json +0 -26
  97. package/get-shit-done/templates/continuation-prompt.md +0 -235
  98. package/get-shit-done/templates/issues.md +0 -32
  99. package/get-shit-done/templates/milestone-context.md +0 -93
  100. package/get-shit-done/templates/subagent-task-prompt.md +0 -95
  101. package/get-shit-done/templates/uat-issues.md +0 -143
  102. package/get-shit-done/workflows/_archive/execute-phase.md +0 -899
  103. package/get-shit-done/workflows/create-milestone.md +0 -416
  104. package/get-shit-done/workflows/create-roadmap.md +0 -481
  105. package/get-shit-done/workflows/debug.md +0 -426
  106. package/get-shit-done/workflows/discuss-milestone.md +0 -236
  107. package/get-shit-done/workflows/plan-phase.md +0 -701
  108. package/get-shit-done/workflows/research-phase.md +0 -436
@@ -1,59 +1,716 @@
1
1
  ---
2
2
  name: gsd-new-milestone
3
- description: Create a new milestone with phases for an existing project
4
- argument-hint: "[milestone name, e.g., 'v2.0 Features']"
3
+ description: Start a new milestone cycle update PROJECT.md and route to requirements
4
+ argument-hint: "[milestone name, e.g., 'v1.1 Notifications']"
5
+ tools:
6
+ - read
7
+ - write
8
+ - bash
9
+ - question
10
+ - glob
5
11
  ---
6
12
 
7
13
  <objective>
8
- Create a new milestone for an existing project with defined phases.
9
14
 
10
- Purpose: After completing a milestone (or when ready to define next chunk of work), creates the milestone structure in ROADMAP.md with phases, updates STATE.md, and creates phase directories.
11
- Output: New milestone in ROADMAP.md, updated STATE.md, phase directories created
15
+ Start a new milestone through unified flow: questioning research (optional) requirements roadmap.
16
+
17
+ This is the brownfield equivalent of new-project. The project exists, PROJECT.md has history. This command gathers "what's next" and takes you through the full cycle.
18
+
19
+ **Creates/Updates:**
20
+ - `.planning/PROJECT.md` — updated with new milestone goals
21
+ - `.planning/research/` — domain research (optional)
22
+ - `.planning/REQUIREMENTS.md` — scoped requirements
23
+ - `.planning/ROADMAP.md` — phase structure
24
+ - `.planning/STATE.md` — updated project memory
25
+
26
+ **After this command:** Run `/gsd-plan-phase [N]` to start execution.
27
+
12
28
  </objective>
13
29
 
14
30
  <execution_context>
15
- @~/.config/opencode/get-shit-done/workflows/create-milestone.md
16
- @~/.config/opencode/get-shit-done/templates/roadmap.md
31
+
32
+ @~/.config/opencode/get-shit-done/references/questioning.md
33
+ @~/.config/opencode/get-shit-done/references/ui-brand.md
34
+ @~/.config/opencode/get-shit-done/templates/project.md
35
+ @~/.config/opencode/get-shit-done/templates/requirements.md
36
+
17
37
  </execution_context>
18
38
 
19
39
  <context>
40
+
20
41
  Milestone name: $ARGUMENTS (optional - will prompt if not provided)
21
42
 
22
- **Load project state first:**
43
+ **Load project context:**
44
+ @.planning/PROJECT.md
23
45
  @.planning/STATE.md
24
-
25
- **Load roadmap:**
26
- @.planning/ROADMAP.md
27
-
28
- **Load milestones (if exists):**
29
46
  @.planning/MILESTONES.md
47
+ @.planning/config.json
48
+
30
49
  </context>
31
50
 
32
51
  <process>
33
- 1. Load project context (STATE.md, ROADMAP.md, MILESTONES.md)
34
- 2. Calculate next milestone version and starting phase number
35
- 3. If milestone name provided in arguments, use it; otherwise prompt
36
- 4. Gather phases (per depth setting: quick 3-5, standard 5-8, comprehensive 8-12):
37
- - If called from /gsd-discuss-milestone, use provided context
38
- - Otherwise, prompt for phase breakdown
39
- 5. Detect research needs for each phase
40
- 6. Confirm phases (respect config.json gate settings)
41
- 7. Follow create-milestone.md workflow:
42
- - Update ROADMAP.md with new milestone section
43
- - Create phase directories
44
- - Update STATE.md for new milestone
45
- - Git commit milestone creation
46
- 8. Offer next steps (discuss first phase, plan first phase, review)
52
+
53
+ ## Phase 1: Validate
54
+
55
+ **MANDATORY FIRST STEP Execute these checks before ANY user interaction:**
56
+
57
+ 1. **Verify project exists:**
58
+ ```bash
59
+ [ -f .planning/PROJECT.md ] || { echo "ERROR: No PROJECT.md. Run /gsd-new-project first."; exit 1; }
60
+ ```
61
+
62
+ 2. **Check for active milestone (ROADMAP.md exists):**
63
+ ```bash
64
+ [ -f .planning/ROADMAP.md ] && echo "ACTIVE_MILESTONE" || echo "READY_FOR_NEW"
65
+ ```
66
+
67
+ **If ACTIVE_MILESTONE:**
68
+ Use question:
69
+ - header: "Active Milestone"
70
+ - question: "A milestone is in progress. What would you like to do?"
71
+ - options:
72
+ - "Complete current first" — Run /gsd-complete-milestone
73
+ - "Continue anyway" — Start new milestone (will archive current)
74
+
75
+ If "Complete current first": Exit with routing to `/gsd-complete-milestone`
76
+ If "Continue anyway": Continue to Phase 2
77
+
78
+ 3. **Load previous milestone context:**
79
+ ```bash
80
+ cat .planning/MILESTONES.md 2>/dev/null || echo "NO_MILESTONES"
81
+ cat .planning/STATE.md
82
+ ```
83
+
84
+ ## Phase 2: Present Context
85
+
86
+ **Display stage banner:**
87
+
88
+ ```
89
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
90
+ GSD ► NEW MILESTONE
91
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
92
+ ```
93
+
94
+ **Present what shipped:**
95
+
96
+ ```
97
+ Last milestone: v[X.Y] [Name] (shipped [DATE])
98
+
99
+ Key accomplishments:
100
+ - [From MILESTONES.md]
101
+ - [From MILESTONES.md]
102
+ - [From MILESTONES.md]
103
+
104
+ Validated requirements:
105
+ - [From PROJECT.md Validated section]
106
+
107
+ Pending todos:
108
+ - [From STATE.md if any]
109
+ ```
110
+
111
+ ## Phase 3: Deep Questioning
112
+
113
+ **Display stage banner:**
114
+
115
+ ```
116
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
117
+ GSD ► QUESTIONING
118
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
119
+ ```
120
+
121
+ **Open the conversation:**
122
+
123
+ Ask inline (freeform, NOT question):
124
+
125
+ "What do you want to build next?"
126
+
127
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
128
+
129
+ **Follow the thread:**
130
+
131
+ Based on what they said, ask follow-up questions that dig into their response. Use question with options that probe what they mentioned — interpretations, clarifications, concrete examples.
132
+
133
+ Keep following threads. Each answer opens new threads to explore. Ask about:
134
+ - What excited them
135
+ - What problem sparked this
136
+ - What they mean by vague terms
137
+ - What it would actually look like
138
+ - What's already decided
139
+
140
+ Consult `questioning.md` for techniques:
141
+ - Challenge vagueness
142
+ - Make abstract concrete
143
+ - Surface assumptions
144
+ - Find edges
145
+ - Reveal motivation
146
+
147
+ **Decision gate:**
148
+
149
+ When you could update PROJECT.md with clear new goals, use question:
150
+
151
+ - header: "Ready?"
152
+ - question: "I think I understand what you're after. Ready to update PROJECT.md?"
153
+ - options:
154
+ - "Update PROJECT.md" — Let's move forward
155
+ - "Keep exploring" — I want to share more / ask me more
156
+
157
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
158
+
159
+ Loop until "Update PROJECT.md" selected.
160
+
161
+ ## Phase 4: Determine Milestone Version
162
+
163
+ Parse last version from MILESTONES.md and suggest next:
164
+
165
+ Use question:
166
+ - header: "Version"
167
+ - question: "What version is this milestone?"
168
+ - options:
169
+ - "v[X.Y+0.1] (patch)" — Minor update: [suggested name]
170
+ - "v[X+1].0 (major)" — Major release
171
+ - "Custom" — I'll specify
172
+
173
+ ## Phase 5: Update PROJECT.md
174
+
175
+ Update `.planning/PROJECT.md` with new milestone section:
176
+
177
+ ```markdown
178
+ ## Current Milestone: v[X.Y] [Name]
179
+
180
+ **Goal:** [One sentence describing milestone focus]
181
+
182
+ **Target features:**
183
+ - [Feature 1]
184
+ - [Feature 2]
185
+ - [Feature 3]
186
+ ```
187
+
188
+ Update Active requirements section with new goals (keep Validated section intact).
189
+
190
+ Update "Last updated" footer.
191
+
192
+ **Commit PROJECT.md:**
193
+
194
+ ```bash
195
+ git add .planning/PROJECT.md
196
+ git commit -m "$(cat <<'EOF'
197
+ docs: start milestone v[X.Y] [Name]
198
+
199
+ [One-liner describing milestone focus]
200
+ EOF
201
+ )"
202
+ ```
203
+
204
+ ## Phase 6: Research Decision
205
+
206
+ Use question:
207
+ - header: "Research"
208
+ - question: "Research the domain ecosystem before defining requirements?"
209
+ - options:
210
+ - "Research first (Recommended)" — Discover patterns, expected features, architecture
211
+ - "Skip research" — I know this domain well, go straight to requirements
212
+
213
+ **If "Research first":**
214
+
215
+ Display stage banner:
216
+ ```
217
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
218
+ GSD ► RESEARCHING
219
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
220
+
221
+ Researching [domain] ecosystem...
222
+ ```
223
+
224
+ Create research directory:
225
+ ```bash
226
+ mkdir -p .planning/research
227
+ ```
228
+
229
+ **Milestone context is "subsequent"** — Research focuses on new features, not re-researching validated requirements.
230
+
231
+ Display spawning indicator:
232
+ ```
233
+ ◆ Spawning 4 researchers in parallel...
234
+ → Stack research
235
+ → Features research
236
+ → Architecture research
237
+ → Pitfalls research
238
+ ```
239
+
240
+ Spawn 4 parallel gsd-project-researcher agents with context:
241
+
242
+ ```
243
+ Task(prompt="
244
+ <research_type>
245
+ Project Research — Stack dimension for [domain].
246
+ </research_type>
247
+
248
+ <milestone_context>
249
+ Subsequent milestone (v[X.Y]).
250
+
251
+ Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
252
+ </milestone_context>
253
+
254
+ <question>
255
+ What's needed to add [target features] to [domain]?
256
+ </question>
257
+
258
+ <project_context>
259
+ [PROJECT.md summary - core value, validated requirements, new goals]
260
+ </project_context>
261
+
262
+ <downstream_consumer>
263
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
264
+ - Specific libraries with versions
265
+ - Clear rationale for each choice
266
+ - What NOT to use and why
267
+ </downstream_consumer>
268
+
269
+ <output>
270
+ write to: .planning/research/STACK.md
271
+ Use template: ~/.config/opencode/get-shit-done/templates/research-project/STACK.md
272
+ </output>
273
+ ", subagent_type="gsd-project-researcher", description="Stack research")
274
+
275
+ Task(prompt="
276
+ <research_type>
277
+ Project Research — Features dimension for [domain].
278
+ </research_type>
279
+
280
+ <milestone_context>
281
+ Subsequent milestone (v[X.Y]).
282
+
283
+ How do [target features] typically work? What's expected behavior?
284
+ </milestone_context>
285
+
286
+ <question>
287
+ What features are expected for [target features]?
288
+ </question>
289
+
290
+ <project_context>
291
+ [PROJECT.md summary]
292
+ </project_context>
293
+
294
+ <downstream_consumer>
295
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
296
+ - Table stakes (must have)
297
+ - Differentiators (competitive advantage)
298
+ - Anti-features (things to deliberately NOT build)
299
+ </downstream_consumer>
300
+
301
+ <output>
302
+ write to: .planning/research/FEATURES.md
303
+ Use template: ~/.config/opencode/get-shit-done/templates/research-project/FEATURES.md
304
+ </output>
305
+ ", subagent_type="gsd-project-researcher", description="Features research")
306
+
307
+ Task(prompt="
308
+ <research_type>
309
+ Project Research — Architecture dimension for [domain].
310
+ </research_type>
311
+
312
+ <milestone_context>
313
+ Subsequent milestone (v[X.Y]).
314
+
315
+ How do [target features] integrate with existing [domain] architecture?
316
+ </milestone_context>
317
+
318
+ <question>
319
+ How should [target features] integrate with the existing system?
320
+ </question>
321
+
322
+ <project_context>
323
+ [PROJECT.md summary]
324
+ </project_context>
325
+
326
+ <downstream_consumer>
327
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
328
+ - Component boundaries (what talks to what)
329
+ - Data flow (how information moves)
330
+ - Suggested build order (dependencies between components)
331
+ </downstream_consumer>
332
+
333
+ <output>
334
+ write to: .planning/research/ARCHITECTURE.md
335
+ Use template: ~/.config/opencode/get-shit-done/templates/research-project/ARCHITECTURE.md
336
+ </output>
337
+ ", subagent_type="gsd-project-researcher", description="Architecture research")
338
+
339
+ Task(prompt="
340
+ <research_type>
341
+ Project Research — Pitfalls dimension for [domain].
342
+ </research_type>
343
+
344
+ <milestone_context>
345
+ Subsequent milestone (v[X.Y]).
346
+
347
+ What are common mistakes when adding [target features] to [domain]?
348
+ </milestone_context>
349
+
350
+ <question>
351
+ What pitfalls should we avoid when adding [target features]?
352
+ </question>
353
+
354
+ <project_context>
355
+ [PROJECT.md summary]
356
+ </project_context>
357
+
358
+ <downstream_consumer>
359
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
360
+ - Warning signs (how to detect early)
361
+ - Prevention strategy (how to avoid)
362
+ - Which phase should address it
363
+ </downstream_consumer>
364
+
365
+ <output>
366
+ write to: .planning/research/PITFALLS.md
367
+ Use template: ~/.config/opencode/get-shit-done/templates/research-project/PITFALLS.md
368
+ </output>
369
+ ", subagent_type="gsd-project-researcher", description="Pitfalls research")
370
+ ```
371
+
372
+ After all 4 agents complete, spawn synthesizer:
373
+
374
+ ```
375
+ Task(prompt="
376
+ <task>
377
+ Synthesize research outputs into SUMMARY.md.
378
+ </task>
379
+
380
+ <research_files>
381
+ read these files:
382
+ - .planning/research/STACK.md
383
+ - .planning/research/FEATURES.md
384
+ - .planning/research/ARCHITECTURE.md
385
+ - .planning/research/PITFALLS.md
386
+ </research_files>
387
+
388
+ <output>
389
+ write to: .planning/research/SUMMARY.md
390
+ Use template: ~/.config/opencode/get-shit-done/templates/research-project/SUMMARY.md
391
+ Commit after writing.
392
+ </output>
393
+ ", subagent_type="gsd-research-synthesizer", description="Synthesize research")
394
+ ```
395
+
396
+ Display research complete:
397
+ ```
398
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
399
+ GSD ► RESEARCH COMPLETE ✓
400
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
401
+
402
+ ## Key Findings
403
+
404
+ **Stack:** [from SUMMARY.md]
405
+ **Table Stakes:** [from SUMMARY.md]
406
+ **Watch Out For:** [from SUMMARY.md]
407
+
408
+ Files: `.planning/research/`
409
+ ```
410
+
411
+ **If "Skip research":** Continue to Phase 7.
412
+
413
+ ## Phase 7: Define Requirements
414
+
415
+ Display stage banner:
416
+ ```
417
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
418
+ GSD ► DEFINING REQUIREMENTS
419
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
420
+ ```
421
+
422
+ **Load context:**
423
+
424
+ read PROJECT.md and extract:
425
+ - Core value (the ONE thing that must work)
426
+ - New milestone goals
427
+ - Validated requirements (what already works)
428
+ - Stated constraints
429
+
430
+ **If research exists:** read research/FEATURES.md and extract feature categories.
431
+
432
+ **Present features by category:**
433
+
434
+ ```
435
+ Here are the features for [milestone focus]:
436
+
437
+ ## [Category 1]
438
+ **Table stakes:**
439
+ - [Feature]
440
+ - [Feature]
441
+
442
+ **Differentiators:**
443
+ - [Feature]
444
+
445
+ **Research notes:** [any relevant notes]
446
+
447
+ ---
448
+
449
+ ## [Next Category]
450
+ ...
451
+ ```
452
+
453
+ **If no research:** Gather requirements through conversation instead.
454
+
455
+ Ask: "What are the main things users need to be able to do in this milestone?"
456
+
457
+ For each capability mentioned:
458
+ - Ask clarifying questions to make it specific
459
+ - Probe for related capabilities
460
+ - Group into categories
461
+
462
+ **Scope each category:**
463
+
464
+ For each category, use question:
465
+
466
+ - header: "[Category name]"
467
+ - question: "Which [category] features are in this milestone?"
468
+ - multiSelect: true
469
+ - options:
470
+ - "[Feature 1]" — [brief description]
471
+ - "[Feature 2]" — [brief description]
472
+ - "None for this milestone" — Defer
473
+
474
+ Track responses:
475
+ - Selected features → v1 requirements
476
+ - Unselected table stakes → v2 (users expect these)
477
+ - Unselected differentiators → out of scope
478
+
479
+ **Identify gaps:**
480
+
481
+ Use question:
482
+ - header: "Additions"
483
+ - question: "Any requirements research missed? (Features specific to your vision)"
484
+ - options:
485
+ - "No, research covered it" — Proceed
486
+ - "Yes, let me add some" — Capture additions
487
+
488
+ **Validate core value:**
489
+
490
+ Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
491
+
492
+ **Generate REQUIREMENTS.md:**
493
+
494
+ Create `.planning/REQUIREMENTS.md` with:
495
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
496
+ - v2 Requirements (deferred)
497
+ - Out of Scope (explicit exclusions with reasoning)
498
+ - Traceability section (empty, filled by roadmap)
499
+
500
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
501
+
502
+ **Requirement quality criteria:**
503
+
504
+ Good requirements are:
505
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
506
+ - **User-centric:** "User can X" (not "System does Y")
507
+ - **Atomic:** One capability per requirement
508
+ - **Independent:** Minimal dependencies on other requirements
509
+
510
+ **Present full requirements list for confirmation:**
511
+
512
+ Show every requirement (not counts) for user confirmation:
513
+
514
+ ```
515
+ ## v1 Requirements
516
+
517
+ ### [Category]
518
+ - [ ] **[CAT]-01**: [Requirement description]
519
+ - [ ] **[CAT]-02**: [Requirement description]
520
+
521
+ [... full list ...]
522
+
523
+ ---
524
+
525
+ Does this capture what you're building? (yes / adjust)
526
+ ```
527
+
528
+ If "adjust": Return to scoping.
529
+
530
+ **Commit requirements:**
531
+
532
+ ```bash
533
+ git add .planning/REQUIREMENTS.md
534
+ git commit -m "$(cat <<'EOF'
535
+ docs: define v[X.Y] requirements
536
+
537
+ [X] requirements across [N] categories
538
+ [Y] requirements deferred to v2
539
+ EOF
540
+ )"
541
+ ```
542
+
543
+ ## Phase 8: Create Roadmap
544
+
545
+ Display stage banner:
546
+ ```
547
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
548
+ GSD ► CREATING ROADMAP
549
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
550
+
551
+ ◆ Spawning roadmapper...
552
+ ```
553
+
554
+ **Calculate starting phase number:**
555
+
556
+ ```bash
557
+ # Find highest existing phase number
558
+ ls -d .planning/phases/[0-9]*-* 2>/dev/null | sort -V | tail -1 | grep -oE '[0-9]+' | head -1
559
+ ```
560
+
561
+ If phases exist: New phases start at last + 1
562
+ If no phases: Start at Phase 1
563
+
564
+ Spawn gsd-roadmapper agent with context:
565
+
566
+ ```
567
+ Task(prompt="
568
+ <planning_context>
569
+
570
+ **Project:**
571
+ @.planning/PROJECT.md
572
+
573
+ **Requirements:**
574
+ @.planning/REQUIREMENTS.md
575
+
576
+ **Research (if exists):**
577
+ @.planning/research/SUMMARY.md
578
+
579
+ **Config:**
580
+ @.planning/config.json
581
+
582
+ **Starting phase number:** [N]
583
+
584
+ </planning_context>
585
+
586
+ <instructions>
587
+ Create roadmap:
588
+ 1. Derive phases from requirements (don't impose structure)
589
+ 2. Map every v1 requirement to exactly one phase
590
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
591
+ 4. Validate 100% coverage
592
+ 5. write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
593
+ 6. Return ROADMAP CREATED with summary
594
+
595
+ write files first, then return.
596
+ </instructions>
597
+ ", subagent_type="gsd-roadmapper", description="Create roadmap")
598
+ ```
599
+
600
+ **Handle roadmapper return:**
601
+
602
+ **If `## ROADMAP BLOCKED`:**
603
+ - Present blocker information
604
+ - Work with user to resolve
605
+ - Re-spawn when resolved
606
+
607
+ **If `## ROADMAP CREATED`:**
608
+
609
+ read the created ROADMAP.md and present it inline.
610
+
611
+ **Ask for approval:**
612
+
613
+ Use question:
614
+ - header: "Roadmap"
615
+ - question: "Does this roadmap structure work for you?"
616
+ - options:
617
+ - "Approve" — Commit and continue
618
+ - "Adjust phases" — Tell me what to change
619
+ - "Review full file" — Show raw ROADMAP.md
620
+
621
+ **If "Approve":** Continue to commit.
622
+
623
+ **If "Adjust phases":**
624
+ - Get user's adjustment notes
625
+ - Re-spawn roadmapper with revision context
626
+ - Loop until approved
627
+
628
+ **Commit roadmap:**
629
+
630
+ ```bash
631
+ git add .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
632
+ git commit -m "$(cat <<'EOF'
633
+ docs: create v[X.Y] roadmap ([N] phases)
634
+
635
+ Phases:
636
+ 1. [phase-name]: [requirements covered]
637
+ 2. [phase-name]: [requirements covered]
638
+ ...
639
+
640
+ All v1 requirements mapped to phases.
641
+ EOF
642
+ )"
643
+ ```
644
+
645
+ ## Phase 9: Done
646
+
647
+ Present completion with next steps:
648
+
649
+ ```
650
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
651
+ GSD ► MILESTONE INITIALIZED ✓
652
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
653
+
654
+ **v[X.Y] [Name]**
655
+
656
+ | Artifact | Location |
657
+ |----------------|-----------------------------
658
+ | Project | `.planning/PROJECT.md` |
659
+ | Research | `.planning/research/` |
660
+ | Requirements | `.planning/REQUIREMENTS.md` |
661
+ | Roadmap | `.planning/ROADMAP.md` |
662
+
663
+ **[N] phases** | **[X] requirements** | Ready to build ✓
664
+
665
+ ───────────────────────────────────────────────────────────────
666
+
667
+ ## ▶ Next Up
668
+
669
+ **Phase [N]: [Phase Name]** — [Goal from ROADMAP.md]
670
+
671
+ `/gsd-discuss-phase [N]` — gather context and clarify approach
672
+
673
+ *`/new` first → fresh context window*
674
+
675
+ ---
676
+
677
+ **Also available:**
678
+ - `/gsd-plan-phase [N]` — skip discussion, plan directly
679
+
680
+ ───────────────────────────────────────────────────────────────
681
+ ```
682
+
47
683
  </process>
48
684
 
685
+ <output>
686
+
687
+ - `.planning/PROJECT.md` (updated)
688
+ - `.planning/research/` (if research selected)
689
+ - `STACK.md`
690
+ - `FEATURES.md`
691
+ - `ARCHITECTURE.md`
692
+ - `PITFALLS.md`
693
+ - `SUMMARY.md`
694
+ - `.planning/REQUIREMENTS.md`
695
+ - `.planning/ROADMAP.md`
696
+ - `.planning/STATE.md`
697
+
698
+ </output>
699
+
49
700
  <success_criteria>
50
701
 
51
- - Next phase number calculated correctly (continues from previous milestone)
52
- - Phases defined per depth setting (quick: 3-5, standard: 5-8, comprehensive: 8-12)
53
- - Research flags assigned for each phase
54
- - ROADMAP.md updated with new milestone section
55
- - Phase directories created
56
- - STATE.md reset for new milestone
57
- - Git commit made
58
- - User knows next steps
59
- </success_criteria>
702
+ - [ ] Project validated (PROJECT.md exists)
703
+ - [ ] Previous milestone context presented
704
+ - [ ] Deep questioning completed (threads followed)
705
+ - [ ] Milestone version determined
706
+ - [ ] PROJECT.md updated with new milestone goals → **committed**
707
+ - [ ] Research completed (if selected) → **committed**
708
+ - [ ] Requirements gathered and scoped
709
+ - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
710
+ - [ ] gsd-roadmapper spawned with context
711
+ - [ ] Roadmap files written immediately
712
+ - [ ] User feedback incorporated (if any)
713
+ - [ ] ROADMAP.md, STATE.md → **committed**
714
+ - [ ] User knows next step is `/gsd-plan-phase [N]`
715
+
716
+ </success_criteria>