@undeemed/get-shit-done-codex 1.6.5

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