get-research-done 1.1.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 (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +560 -0
  3. package/agents/grd-architect.md +789 -0
  4. package/agents/grd-codebase-mapper.md +738 -0
  5. package/agents/grd-critic.md +1065 -0
  6. package/agents/grd-debugger.md +1203 -0
  7. package/agents/grd-evaluator.md +948 -0
  8. package/agents/grd-executor.md +784 -0
  9. package/agents/grd-explorer.md +2063 -0
  10. package/agents/grd-graduator.md +484 -0
  11. package/agents/grd-integration-checker.md +423 -0
  12. package/agents/grd-phase-researcher.md +641 -0
  13. package/agents/grd-plan-checker.md +745 -0
  14. package/agents/grd-planner.md +1386 -0
  15. package/agents/grd-project-researcher.md +865 -0
  16. package/agents/grd-research-synthesizer.md +256 -0
  17. package/agents/grd-researcher.md +2361 -0
  18. package/agents/grd-roadmapper.md +605 -0
  19. package/agents/grd-verifier.md +778 -0
  20. package/bin/install.js +1294 -0
  21. package/commands/grd/add-phase.md +207 -0
  22. package/commands/grd/add-todo.md +193 -0
  23. package/commands/grd/architect.md +283 -0
  24. package/commands/grd/audit-milestone.md +277 -0
  25. package/commands/grd/check-todos.md +228 -0
  26. package/commands/grd/complete-milestone.md +136 -0
  27. package/commands/grd/debug.md +169 -0
  28. package/commands/grd/discuss-phase.md +86 -0
  29. package/commands/grd/evaluate.md +1095 -0
  30. package/commands/grd/execute-phase.md +339 -0
  31. package/commands/grd/explore.md +258 -0
  32. package/commands/grd/graduate.md +323 -0
  33. package/commands/grd/help.md +482 -0
  34. package/commands/grd/insert-phase.md +227 -0
  35. package/commands/grd/insights.md +231 -0
  36. package/commands/grd/join-discord.md +18 -0
  37. package/commands/grd/list-phase-assumptions.md +50 -0
  38. package/commands/grd/map-codebase.md +71 -0
  39. package/commands/grd/new-milestone.md +721 -0
  40. package/commands/grd/new-project.md +1008 -0
  41. package/commands/grd/pause-work.md +134 -0
  42. package/commands/grd/plan-milestone-gaps.md +295 -0
  43. package/commands/grd/plan-phase.md +525 -0
  44. package/commands/grd/progress.md +364 -0
  45. package/commands/grd/quick-explore.md +236 -0
  46. package/commands/grd/quick.md +309 -0
  47. package/commands/grd/remove-phase.md +349 -0
  48. package/commands/grd/research-phase.md +200 -0
  49. package/commands/grd/research.md +681 -0
  50. package/commands/grd/resume-work.md +40 -0
  51. package/commands/grd/set-profile.md +106 -0
  52. package/commands/grd/settings.md +136 -0
  53. package/commands/grd/update.md +172 -0
  54. package/commands/grd/verify-work.md +219 -0
  55. package/get-research-done/config/default.json +15 -0
  56. package/get-research-done/references/checkpoints.md +1078 -0
  57. package/get-research-done/references/continuation-format.md +249 -0
  58. package/get-research-done/references/git-integration.md +254 -0
  59. package/get-research-done/references/model-profiles.md +73 -0
  60. package/get-research-done/references/planning-config.md +94 -0
  61. package/get-research-done/references/questioning.md +141 -0
  62. package/get-research-done/references/tdd.md +263 -0
  63. package/get-research-done/references/ui-brand.md +160 -0
  64. package/get-research-done/references/verification-patterns.md +612 -0
  65. package/get-research-done/templates/DEBUG.md +159 -0
  66. package/get-research-done/templates/UAT.md +247 -0
  67. package/get-research-done/templates/archive-reason.md +195 -0
  68. package/get-research-done/templates/codebase/architecture.md +255 -0
  69. package/get-research-done/templates/codebase/concerns.md +310 -0
  70. package/get-research-done/templates/codebase/conventions.md +307 -0
  71. package/get-research-done/templates/codebase/integrations.md +280 -0
  72. package/get-research-done/templates/codebase/stack.md +186 -0
  73. package/get-research-done/templates/codebase/structure.md +285 -0
  74. package/get-research-done/templates/codebase/testing.md +480 -0
  75. package/get-research-done/templates/config.json +35 -0
  76. package/get-research-done/templates/context.md +283 -0
  77. package/get-research-done/templates/continue-here.md +78 -0
  78. package/get-research-done/templates/critic-log.md +288 -0
  79. package/get-research-done/templates/data-report.md +173 -0
  80. package/get-research-done/templates/debug-subagent-prompt.md +91 -0
  81. package/get-research-done/templates/decision-log.md +58 -0
  82. package/get-research-done/templates/decision.md +138 -0
  83. package/get-research-done/templates/discovery.md +146 -0
  84. package/get-research-done/templates/experiment-readme.md +104 -0
  85. package/get-research-done/templates/graduated-script.md +180 -0
  86. package/get-research-done/templates/iteration-summary.md +234 -0
  87. package/get-research-done/templates/milestone-archive.md +123 -0
  88. package/get-research-done/templates/milestone.md +115 -0
  89. package/get-research-done/templates/objective.md +271 -0
  90. package/get-research-done/templates/phase-prompt.md +567 -0
  91. package/get-research-done/templates/planner-subagent-prompt.md +117 -0
  92. package/get-research-done/templates/project.md +184 -0
  93. package/get-research-done/templates/requirements.md +231 -0
  94. package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
  95. package/get-research-done/templates/research-project/FEATURES.md +147 -0
  96. package/get-research-done/templates/research-project/PITFALLS.md +200 -0
  97. package/get-research-done/templates/research-project/STACK.md +120 -0
  98. package/get-research-done/templates/research-project/SUMMARY.md +170 -0
  99. package/get-research-done/templates/research.md +529 -0
  100. package/get-research-done/templates/roadmap.md +202 -0
  101. package/get-research-done/templates/scorecard.json +113 -0
  102. package/get-research-done/templates/state.md +287 -0
  103. package/get-research-done/templates/summary.md +246 -0
  104. package/get-research-done/templates/user-setup.md +311 -0
  105. package/get-research-done/templates/verification-report.md +322 -0
  106. package/get-research-done/workflows/complete-milestone.md +756 -0
  107. package/get-research-done/workflows/diagnose-issues.md +231 -0
  108. package/get-research-done/workflows/discovery-phase.md +289 -0
  109. package/get-research-done/workflows/discuss-phase.md +433 -0
  110. package/get-research-done/workflows/execute-phase.md +657 -0
  111. package/get-research-done/workflows/execute-plan.md +1844 -0
  112. package/get-research-done/workflows/list-phase-assumptions.md +178 -0
  113. package/get-research-done/workflows/map-codebase.md +322 -0
  114. package/get-research-done/workflows/resume-project.md +307 -0
  115. package/get-research-done/workflows/transition.md +556 -0
  116. package/get-research-done/workflows/verify-phase.md +628 -0
  117. package/get-research-done/workflows/verify-work.md +596 -0
  118. package/hooks/dist/grd-check-update.js +61 -0
  119. package/hooks/dist/grd-statusline.js +84 -0
  120. package/package.json +47 -0
  121. package/scripts/audit-help-commands.sh +115 -0
  122. package/scripts/build-hooks.js +42 -0
  123. package/scripts/verify-all-commands.sh +246 -0
  124. package/scripts/verify-architect-warning.sh +35 -0
  125. package/scripts/verify-insights-mode.sh +40 -0
  126. package/scripts/verify-quick-mode.sh +20 -0
  127. package/scripts/verify-revise-data-routing.sh +139 -0
@@ -0,0 +1,721 @@
1
+ ---
2
+ name: grd: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
+ ---
12
+
13
+ <objective>
14
+ Start a new milestone through unified flow: questioning → research (optional) → requirements → roadmap.
15
+
16
+ This is the brownfield equivalent of new-project. The project exists, PROJECT.md has history. This command gathers "what's next", updates PROJECT.md, then continues through the full requirements → roadmap cycle.
17
+
18
+ **Creates/Updates:**
19
+ - `.planning/PROJECT.md` — updated with new milestone goals
20
+ - `.planning/research/` — domain research (optional, focuses on NEW features)
21
+ - `.planning/REQUIREMENTS.md` — scoped requirements for this milestone
22
+ - `.planning/ROADMAP.md` — phase structure (continues numbering)
23
+ - `.planning/STATE.md` — reset for new milestone
24
+
25
+ **After this command:** Run `/grd:plan-phase [N]` to start execution.
26
+ </objective>
27
+
28
+ <execution_context>
29
+ @~/.claude/get-research-done/references/questioning.md
30
+ @~/.claude/get-research-done/references/ui-brand.md
31
+ @~/.claude/get-research-done/templates/project.md
32
+ @~/.claude/get-research-done/templates/requirements.md
33
+ </execution_context>
34
+
35
+ <context>
36
+ Milestone name: $ARGUMENTS (optional - will prompt if not provided)
37
+
38
+ **Load project context:**
39
+ @.planning/PROJECT.md
40
+ @.planning/STATE.md
41
+ @.planning/MILESTONES.md
42
+ @.planning/config.json
43
+
44
+ **Load milestone context (if exists, from /grd:discuss-milestone):**
45
+ @.planning/MILESTONE-CONTEXT.md
46
+ </context>
47
+
48
+ <process>
49
+
50
+ ## Phase 1: Load Context
51
+
52
+ - Read PROJECT.md (existing project, Validated requirements, decisions)
53
+ - Read MILESTONES.md (what shipped previously)
54
+ - Read STATE.md (pending todos, blockers)
55
+ - Check for MILESTONE-CONTEXT.md (from /grd:discuss-milestone)
56
+
57
+ ## Phase 2: Gather Milestone Goals
58
+
59
+ **If MILESTONE-CONTEXT.md exists:**
60
+ - Use features and scope from discuss-milestone
61
+ - Present summary for confirmation
62
+
63
+ **If no context file:**
64
+ - Present what shipped in last milestone
65
+ - Ask: "What do you want to build next?"
66
+ - Use AskUserQuestion to explore features
67
+ - Probe for priorities, constraints, scope
68
+
69
+ ## Phase 3: Determine Milestone Version
70
+
71
+ - Parse last version from MILESTONES.md
72
+ - Suggest next version (v1.0 → v1.1, or v2.0 for major)
73
+ - Confirm with user
74
+
75
+ ## Phase 4: Update PROJECT.md
76
+
77
+ Add/update these sections:
78
+
79
+ ```markdown
80
+ ## Current Milestone: v[X.Y] [Name]
81
+
82
+ **Goal:** [One sentence describing milestone focus]
83
+
84
+ **Target features:**
85
+ - [Feature 1]
86
+ - [Feature 2]
87
+ - [Feature 3]
88
+ ```
89
+
90
+ Update Active requirements section with new goals.
91
+
92
+ Update "Last updated" footer.
93
+
94
+ ## Phase 5: Update STATE.md
95
+
96
+ ```markdown
97
+ ## Current Position
98
+
99
+ Phase: Not started (defining requirements)
100
+ Plan: —
101
+ Status: Defining requirements
102
+ Last activity: [today] — Milestone v[X.Y] started
103
+ ```
104
+
105
+ Keep Accumulated Context section (decisions, blockers) from previous milestone.
106
+
107
+ ## Phase 6: Cleanup and Commit
108
+
109
+ Delete MILESTONE-CONTEXT.md if exists (consumed).
110
+
111
+ Check planning config:
112
+ ```bash
113
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
114
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
115
+ ```
116
+
117
+ If `COMMIT_PLANNING_DOCS=false`: Skip git operations
118
+
119
+ If `COMMIT_PLANNING_DOCS=true` (default):
120
+ ```bash
121
+ git add .planning/PROJECT.md .planning/STATE.md
122
+ git commit -m "docs: start milestone v[X.Y] [Name]"
123
+ ```
124
+
125
+ ## Phase 6.5: Resolve Model Profile
126
+
127
+ Read model profile for agent spawning:
128
+
129
+ ```bash
130
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
131
+ ```
132
+
133
+ Default to "balanced" if not set.
134
+
135
+ **Model lookup table:**
136
+
137
+ | Agent | quality | balanced | budget |
138
+ |-------|---------|----------|--------|
139
+ | grd-project-researcher | opus | sonnet | haiku |
140
+ | grd-research-synthesizer | sonnet | sonnet | haiku |
141
+ | grd-roadmapper | opus | sonnet | sonnet |
142
+
143
+ Store resolved models for use in Task calls below.
144
+
145
+ ## Phase 7: Research Decision
146
+
147
+ Use AskUserQuestion:
148
+ - header: "Research"
149
+ - question: "Research the domain ecosystem for new features before defining requirements?"
150
+ - options:
151
+ - "Research first (Recommended)" — Discover patterns, expected features, architecture for NEW capabilities
152
+ - "Skip research" — I know what I need, go straight to requirements
153
+
154
+ **If "Research first":**
155
+
156
+ Display stage banner:
157
+ ```
158
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
159
+ GRD ► RESEARCHING
160
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
161
+
162
+ Researching [new features] ecosystem...
163
+ ```
164
+
165
+ Create research directory:
166
+ ```bash
167
+ mkdir -p .planning/research
168
+ ```
169
+
170
+ Display spawning indicator:
171
+ ```
172
+ ◆ Spawning 4 researchers in parallel...
173
+ → Stack research (for new features)
174
+ → Features research
175
+ → Architecture research (integration)
176
+ → Pitfalls research
177
+ ```
178
+
179
+ Spawn 4 parallel grd-project-researcher agents with milestone-aware context:
180
+
181
+ ```
182
+ Task(prompt="
183
+ <research_type>
184
+ Project Research — Stack dimension for [new features].
185
+ </research_type>
186
+
187
+ <milestone_context>
188
+ SUBSEQUENT MILESTONE — Adding [target features] to existing app.
189
+
190
+ Existing validated capabilities (DO NOT re-research):
191
+ [List from PROJECT.md Validated requirements]
192
+
193
+ Focus ONLY on what's needed for the NEW features.
194
+ </milestone_context>
195
+
196
+ <question>
197
+ What stack additions/changes are needed for [new features]?
198
+ </question>
199
+
200
+ <project_context>
201
+ [PROJECT.md summary - current state, new milestone goals]
202
+ </project_context>
203
+
204
+ <downstream_consumer>
205
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
206
+ - Specific libraries with versions for NEW capabilities
207
+ - Integration points with existing stack
208
+ - What NOT to add and why
209
+ </downstream_consumer>
210
+
211
+ <quality_gate>
212
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
213
+ - [ ] Rationale explains WHY, not just WHAT
214
+ - [ ] Integration with existing stack considered
215
+ </quality_gate>
216
+
217
+ <output>
218
+ Write to: .planning/research/STACK.md
219
+ Use template: ~/.claude/get-research-done/templates/research-project/STACK.md
220
+ </output>
221
+ ", subagent_type="grd-project-researcher", model="{researcher_model}", description="Stack research")
222
+
223
+ Task(prompt="
224
+ <research_type>
225
+ Project Research — Features dimension for [new features].
226
+ </research_type>
227
+
228
+ <milestone_context>
229
+ SUBSEQUENT MILESTONE — Adding [target features] to existing app.
230
+
231
+ Existing features (already built):
232
+ [List from PROJECT.md Validated requirements]
233
+
234
+ Focus on how [new features] typically work, expected behavior.
235
+ </milestone_context>
236
+
237
+ <question>
238
+ How do [target features] typically work? What's expected behavior?
239
+ </question>
240
+
241
+ <project_context>
242
+ [PROJECT.md summary - new milestone goals]
243
+ </project_context>
244
+
245
+ <downstream_consumer>
246
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
247
+ - Table stakes (must have for these features)
248
+ - Differentiators (competitive advantage)
249
+ - Anti-features (things to deliberately NOT build)
250
+ </downstream_consumer>
251
+
252
+ <quality_gate>
253
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
254
+ - [ ] Complexity noted for each feature
255
+ - [ ] Dependencies on existing features identified
256
+ </quality_gate>
257
+
258
+ <output>
259
+ Write to: .planning/research/FEATURES.md
260
+ Use template: ~/.claude/get-research-done/templates/research-project/FEATURES.md
261
+ </output>
262
+ ", subagent_type="grd-project-researcher", model="{researcher_model}", description="Features research")
263
+
264
+ Task(prompt="
265
+ <research_type>
266
+ Project Research — Architecture dimension for [new features].
267
+ </research_type>
268
+
269
+ <milestone_context>
270
+ SUBSEQUENT MILESTONE — Adding [target features] to existing app.
271
+
272
+ Existing architecture:
273
+ [Summary from PROJECT.md or codebase map]
274
+
275
+ Focus on how [new features] integrate with existing architecture.
276
+ </milestone_context>
277
+
278
+ <question>
279
+ How do [target features] integrate with existing [domain] architecture?
280
+ </question>
281
+
282
+ <project_context>
283
+ [PROJECT.md summary - current architecture, new features]
284
+ </project_context>
285
+
286
+ <downstream_consumer>
287
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
288
+ - Integration points with existing components
289
+ - New components needed
290
+ - Data flow changes
291
+ - Suggested build order
292
+ </downstream_consumer>
293
+
294
+ <quality_gate>
295
+ - [ ] Integration points clearly identified
296
+ - [ ] New vs modified components explicit
297
+ - [ ] Build order considers existing dependencies
298
+ </quality_gate>
299
+
300
+ <output>
301
+ Write to: .planning/research/ARCHITECTURE.md
302
+ Use template: ~/.claude/get-research-done/templates/research-project/ARCHITECTURE.md
303
+ </output>
304
+ ", subagent_type="grd-project-researcher", model="{researcher_model}", description="Architecture research")
305
+
306
+ Task(prompt="
307
+ <research_type>
308
+ Project Research — Pitfalls dimension for [new features].
309
+ </research_type>
310
+
311
+ <milestone_context>
312
+ SUBSEQUENT MILESTONE — Adding [target features] to existing app.
313
+
314
+ Focus on common mistakes when ADDING these features to an existing system.
315
+ </milestone_context>
316
+
317
+ <question>
318
+ What are common mistakes when adding [target features] to [domain]?
319
+ </question>
320
+
321
+ <project_context>
322
+ [PROJECT.md summary - current state, new features]
323
+ </project_context>
324
+
325
+ <downstream_consumer>
326
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
327
+ - Warning signs (how to detect early)
328
+ - Prevention strategy (how to avoid)
329
+ - Which phase should address it
330
+ </downstream_consumer>
331
+
332
+ <quality_gate>
333
+ - [ ] Pitfalls are specific to adding these features (not generic)
334
+ - [ ] Integration pitfalls with existing system covered
335
+ - [ ] Prevention strategies are actionable
336
+ </quality_gate>
337
+
338
+ <output>
339
+ Write to: .planning/research/PITFALLS.md
340
+ Use template: ~/.claude/get-research-done/templates/research-project/PITFALLS.md
341
+ </output>
342
+ ", subagent_type="grd-project-researcher", model="{researcher_model}", description="Pitfalls research")
343
+ ```
344
+
345
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
346
+
347
+ ```
348
+ Task(prompt="
349
+ <task>
350
+ Synthesize research outputs into SUMMARY.md.
351
+ </task>
352
+
353
+ <research_files>
354
+ Read these files:
355
+ - .planning/research/STACK.md
356
+ - .planning/research/FEATURES.md
357
+ - .planning/research/ARCHITECTURE.md
358
+ - .planning/research/PITFALLS.md
359
+ </research_files>
360
+
361
+ <output>
362
+ Write to: .planning/research/SUMMARY.md
363
+ Use template: ~/.claude/get-research-done/templates/research-project/SUMMARY.md
364
+ Commit after writing.
365
+ </output>
366
+ ", subagent_type="grd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
367
+ ```
368
+
369
+ Display research complete banner and key findings:
370
+ ```
371
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
372
+ GRD ► RESEARCH COMPLETE ✓
373
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
374
+
375
+ ## Key Findings
376
+
377
+ **Stack additions:** [from SUMMARY.md]
378
+ **New feature table stakes:** [from SUMMARY.md]
379
+ **Watch Out For:** [from SUMMARY.md]
380
+
381
+ Files: `.planning/research/`
382
+ ```
383
+
384
+ **If "Skip research":** Continue to Phase 8.
385
+
386
+ ## Phase 8: Define Requirements
387
+
388
+ Display stage banner:
389
+ ```
390
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
391
+ GRD ► DEFINING REQUIREMENTS
392
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
393
+ ```
394
+
395
+ **Load context:**
396
+
397
+ Read PROJECT.md and extract:
398
+ - Core value (the ONE thing that must work)
399
+ - Current milestone goals
400
+ - Validated requirements (what already exists)
401
+
402
+ **If research exists:** Read research/FEATURES.md and extract feature categories.
403
+
404
+ **Present features by category:**
405
+
406
+ ```
407
+ Here are the features for [new capabilities]:
408
+
409
+ ## [Category 1]
410
+ **Table stakes:**
411
+ - Feature A
412
+ - Feature B
413
+
414
+ **Differentiators:**
415
+ - Feature C
416
+ - Feature D
417
+
418
+ **Research notes:** [any relevant notes]
419
+
420
+ ---
421
+
422
+ ## [Next Category]
423
+ ...
424
+ ```
425
+
426
+ **If no research:** Gather requirements through conversation instead.
427
+
428
+ Ask: "What are the main things users need to be able to do with [new features]?"
429
+
430
+ For each capability mentioned:
431
+ - Ask clarifying questions to make it specific
432
+ - Probe for related capabilities
433
+ - Group into categories
434
+
435
+ **Scope each category:**
436
+
437
+ For each category, use AskUserQuestion:
438
+
439
+ - header: "[Category name]"
440
+ - question: "Which [category] features are in this milestone?"
441
+ - multiSelect: true
442
+ - options:
443
+ - "[Feature 1]" — [brief description]
444
+ - "[Feature 2]" — [brief description]
445
+ - "[Feature 3]" — [brief description]
446
+ - "None for this milestone" — Defer entire category
447
+
448
+ Track responses:
449
+ - Selected features → this milestone's requirements
450
+ - Unselected table stakes → future milestone
451
+ - Unselected differentiators → out of scope
452
+
453
+ **Identify gaps:**
454
+
455
+ Use AskUserQuestion:
456
+ - header: "Additions"
457
+ - question: "Any requirements research missed? (Features specific to your vision)"
458
+ - options:
459
+ - "No, research covered it" — Proceed
460
+ - "Yes, let me add some" — Capture additions
461
+
462
+ **Generate REQUIREMENTS.md:**
463
+
464
+ Create `.planning/REQUIREMENTS.md` with:
465
+ - v1 Requirements for THIS milestone grouped by category (checkboxes, REQ-IDs)
466
+ - Future Requirements (deferred to later milestones)
467
+ - Out of Scope (explicit exclusions with reasoning)
468
+ - Traceability section (empty, filled by roadmap)
469
+
470
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, NOTIF-02)
471
+
472
+ Continue numbering from existing requirements if applicable.
473
+
474
+ **Requirement quality criteria:**
475
+
476
+ Good requirements are:
477
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
478
+ - **User-centric:** "User can X" (not "System does Y")
479
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
480
+ - **Independent:** Minimal dependencies on other requirements
481
+
482
+ **Present full requirements list:**
483
+
484
+ Show every requirement (not counts) for user confirmation:
485
+
486
+ ```
487
+ ## Milestone v[X.Y] Requirements
488
+
489
+ ### [Category 1]
490
+ - [ ] **CAT1-01**: User can do X
491
+ - [ ] **CAT1-02**: User can do Y
492
+
493
+ ### [Category 2]
494
+ - [ ] **CAT2-01**: User can do Z
495
+
496
+ [... full list ...]
497
+
498
+ ---
499
+
500
+ Does this capture what you're building? (yes / adjust)
501
+ ```
502
+
503
+ If "adjust": Return to scoping.
504
+
505
+ **Commit requirements:**
506
+
507
+ Check planning config (same pattern as Phase 6).
508
+
509
+ If committing:
510
+ ```bash
511
+ git add .planning/REQUIREMENTS.md
512
+ git commit -m "$(cat <<'EOF'
513
+ docs: define milestone v[X.Y] requirements
514
+
515
+ [X] requirements across [N] categories
516
+ EOF
517
+ )"
518
+ ```
519
+
520
+ ## Phase 9: Create Roadmap
521
+
522
+ Display stage banner:
523
+ ```
524
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
525
+ GRD ► CREATING ROADMAP
526
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
527
+
528
+ ◆ Spawning roadmapper...
529
+ ```
530
+
531
+ **Determine starting phase number:**
532
+
533
+ Read MILESTONES.md to find the last phase number from previous milestone.
534
+ New phases continue from there (e.g., if v1.0 ended at phase 5, v1.1 starts at phase 6).
535
+
536
+ Spawn grd-roadmapper agent with context:
537
+
538
+ ```
539
+ Task(prompt="
540
+ <planning_context>
541
+
542
+ **Project:**
543
+ @.planning/PROJECT.md
544
+
545
+ **Requirements:**
546
+ @.planning/REQUIREMENTS.md
547
+
548
+ **Research (if exists):**
549
+ @.planning/research/SUMMARY.md
550
+
551
+ **Config:**
552
+ @.planning/config.json
553
+
554
+ **Previous milestone (for phase numbering):**
555
+ @.planning/MILESTONES.md
556
+
557
+ </planning_context>
558
+
559
+ <instructions>
560
+ Create roadmap for milestone v[X.Y]:
561
+ 1. Start phase numbering from [N] (continues from previous milestone)
562
+ 2. Derive phases from THIS MILESTONE's requirements (don't include validated/existing)
563
+ 3. Map every requirement to exactly one phase
564
+ 4. Derive 2-5 success criteria per phase (observable user behaviors)
565
+ 5. Validate 100% coverage of new requirements
566
+ 6. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
567
+ 7. Return ROADMAP CREATED with summary
568
+
569
+ Write files first, then return. This ensures artifacts persist even if context is lost.
570
+ </instructions>
571
+ ", subagent_type="grd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
572
+ ```
573
+
574
+ **Handle roadmapper return:**
575
+
576
+ **If `## ROADMAP BLOCKED`:**
577
+ - Present blocker information
578
+ - Work with user to resolve
579
+ - Re-spawn when resolved
580
+
581
+ **If `## ROADMAP CREATED`:**
582
+
583
+ Read the created ROADMAP.md and present it nicely inline:
584
+
585
+ ```
586
+ ---
587
+
588
+ ## Proposed Roadmap
589
+
590
+ **[N] phases** | **[X] requirements mapped** | All milestone requirements covered ✓
591
+
592
+ | # | Phase | Goal | Requirements | Success Criteria |
593
+ |---|-------|------|--------------|------------------|
594
+ | [N] | [Name] | [Goal] | [REQ-IDs] | [count] |
595
+ | [N+1] | [Name] | [Goal] | [REQ-IDs] | [count] |
596
+ ...
597
+
598
+ ### Phase Details
599
+
600
+ **Phase [N]: [Name]**
601
+ Goal: [goal]
602
+ Requirements: [REQ-IDs]
603
+ Success criteria:
604
+ 1. [criterion]
605
+ 2. [criterion]
606
+
607
+ [... continue for all phases ...]
608
+
609
+ ---
610
+ ```
611
+
612
+ **CRITICAL: Ask for approval before committing:**
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
+ ```
628
+ Task(prompt="
629
+ <revision>
630
+ User feedback on roadmap:
631
+ [user's notes]
632
+
633
+ Current ROADMAP.md: @.planning/ROADMAP.md
634
+
635
+ Update the roadmap based on feedback. Edit files in place.
636
+ Return ROADMAP REVISED with changes made.
637
+ </revision>
638
+ ", subagent_type="grd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
639
+ ```
640
+ - Present revised roadmap
641
+ - Loop until user approves
642
+
643
+ **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
644
+
645
+ **Commit roadmap (after approval):**
646
+
647
+ Check planning config (same pattern as Phase 6).
648
+
649
+ If committing:
650
+ ```bash
651
+ git add .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
652
+ git commit -m "$(cat <<'EOF'
653
+ docs: create milestone v[X.Y] roadmap ([N] phases)
654
+
655
+ Phases:
656
+ [N]. [phase-name]: [requirements covered]
657
+ [N+1]. [phase-name]: [requirements covered]
658
+ ...
659
+
660
+ All milestone requirements mapped to phases.
661
+ EOF
662
+ )"
663
+ ```
664
+
665
+ ## Phase 10: Done
666
+
667
+ Present completion with next steps:
668
+
669
+ ```
670
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
671
+ GRD ► MILESTONE INITIALIZED ✓
672
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
673
+
674
+ **Milestone v[X.Y]: [Name]**
675
+
676
+ | Artifact | Location |
677
+ |----------------|-----------------------------|
678
+ | Project | `.planning/PROJECT.md` |
679
+ | Research | `.planning/research/` |
680
+ | Requirements | `.planning/REQUIREMENTS.md` |
681
+ | Roadmap | `.planning/ROADMAP.md` |
682
+
683
+ **[N] phases** | **[X] requirements** | Ready to build ✓
684
+
685
+ ───────────────────────────────────────────────────────────────
686
+
687
+ ## ▶ Next Up
688
+
689
+ **Phase [N]: [Phase Name]** — [Goal from ROADMAP.md]
690
+
691
+ `/grd:discuss-phase [N]` — gather context and clarify approach
692
+
693
+ <sub>`/clear` first → fresh context window</sub>
694
+
695
+ ---
696
+
697
+ **Also available:**
698
+ - `/grd:plan-phase [N]` — skip discussion, plan directly
699
+
700
+ ───────────────────────────────────────────────────────────────
701
+ ```
702
+
703
+ </process>
704
+
705
+ <success_criteria>
706
+ - [ ] PROJECT.md updated with Current Milestone section
707
+ - [ ] STATE.md reset for new milestone
708
+ - [ ] MILESTONE-CONTEXT.md consumed and deleted (if existed)
709
+ - [ ] Research completed (if selected) — 4 parallel agents spawned, milestone-aware
710
+ - [ ] Requirements gathered (from research or conversation)
711
+ - [ ] User scoped each category
712
+ - [ ] REQUIREMENTS.md created with REQ-IDs
713
+ - [ ] grd-roadmapper spawned with phase numbering context
714
+ - [ ] Roadmap files written immediately (not draft)
715
+ - [ ] User feedback incorporated (if any)
716
+ - [ ] ROADMAP.md created with phases continuing from previous milestone
717
+ - [ ] All commits made (if planning docs committed)
718
+ - [ ] User knows next step is `/grd:discuss-phase [N]`
719
+
720
+ **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
721
+ </success_criteria>