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,482 @@
1
+ ---
2
+ name: grd:help
3
+ description: Show available GSD commands and usage guide
4
+ ---
5
+
6
+ <objective>
7
+ Display the complete GSD command reference.
8
+
9
+ Output ONLY the reference content below. Do NOT add:
10
+
11
+ - Project-specific analysis
12
+ - Git status or file context
13
+ - Next-step suggestions
14
+ - Any commentary beyond the reference
15
+ </objective>
16
+
17
+ <reference>
18
+ # GSD Command Reference
19
+
20
+ **GSD** (Get Shit Done) creates hierarchical project plans optimized for solo agentic development with Claude Code.
21
+
22
+ ## Quick Start
23
+
24
+ 1. `/grd:new-project` - Initialize project (includes research, requirements, roadmap)
25
+ 2. `/grd:plan-phase 1` - Create detailed plan for first phase
26
+ 3. `/grd:execute-phase 1` - Execute the phase
27
+
28
+ ## Staying Updated
29
+
30
+ GSD evolves fast. Update periodically:
31
+
32
+ ```bash
33
+ npx get-research-done-cc@latest
34
+ ```
35
+
36
+ ## Core Workflow
37
+
38
+ ```
39
+ /grd:new-project → /grd:plan-phase → /grd:execute-phase → repeat
40
+ ```
41
+
42
+ ### Project Initialization
43
+
44
+ **`/grd:new-project`**
45
+ Initialize new project through unified flow.
46
+
47
+ One command takes you from idea to ready-for-planning:
48
+ - Deep questioning to understand what you're building
49
+ - Optional domain research (spawns 4 parallel researcher agents)
50
+ - Requirements definition with v1/v2/out-of-scope scoping
51
+ - Roadmap creation with phase breakdown and success criteria
52
+
53
+ Creates all `.planning/` artifacts:
54
+ - `PROJECT.md` — vision and requirements
55
+ - `config.json` — workflow mode (interactive/yolo)
56
+ - `research/` — domain research (if selected)
57
+ - `REQUIREMENTS.md` — scoped requirements with REQ-IDs
58
+ - `ROADMAP.md` — phases mapped to requirements
59
+ - `STATE.md` — project memory
60
+
61
+ Usage: `/grd:new-project`
62
+
63
+ **`/grd:map-codebase`**
64
+ Map an existing codebase for brownfield projects.
65
+
66
+ - Analyzes codebase with parallel Explore agents
67
+ - Creates `.planning/codebase/` with 7 focused documents
68
+ - Covers stack, architecture, structure, conventions, testing, integrations, concerns
69
+ - Use before `/grd:new-project` on existing codebases
70
+
71
+ Usage: `/grd:map-codebase`
72
+
73
+ ### Phase Planning
74
+
75
+ **`/grd:discuss-phase <number>`**
76
+ Help articulate your vision for a phase before planning.
77
+
78
+ - Captures how you imagine this phase working
79
+ - Creates CONTEXT.md with your vision, essentials, and boundaries
80
+ - Use when you have ideas about how something should look/feel
81
+
82
+ Usage: `/grd:discuss-phase 2`
83
+
84
+ **`/grd:research-phase <number>`**
85
+ Comprehensive ecosystem research for niche/complex domains.
86
+
87
+ - Discovers standard stack, architecture patterns, pitfalls
88
+ - Creates RESEARCH.md with "how experts build this" knowledge
89
+ - Use for 3D, games, audio, shaders, ML, and other specialized domains
90
+ - Goes beyond "which library" to ecosystem knowledge
91
+
92
+ Usage: `/grd:research-phase 3`
93
+
94
+ **`/grd:list-phase-assumptions <number>`**
95
+ See what Claude is planning to do before it starts.
96
+
97
+ - Shows Claude's intended approach for a phase
98
+ - Lets you course-correct if Claude misunderstood your vision
99
+ - No files created - conversational output only
100
+
101
+ Usage: `/grd:list-phase-assumptions 3`
102
+
103
+ **`/grd:plan-phase <number>`**
104
+ Create detailed execution plan for a specific phase.
105
+
106
+ - Generates `.planning/phases/XX-phase-name/XX-YY-PLAN.md`
107
+ - Breaks phase into concrete, actionable tasks
108
+ - Includes verification criteria and success measures
109
+ - Multiple plans per phase supported (XX-01, XX-02, etc.)
110
+
111
+ Usage: `/grd:plan-phase 1`
112
+ Result: Creates `.planning/phases/01-foundation/01-01-PLAN.md`
113
+
114
+ ### Execution
115
+
116
+ **`/grd:execute-phase <phase-number>`**
117
+ Execute all plans in a phase.
118
+
119
+ - Groups plans by wave (from frontmatter), executes waves sequentially
120
+ - Plans within each wave run in parallel via Task tool
121
+ - Verifies phase goal after all plans complete
122
+ - Updates REQUIREMENTS.md, ROADMAP.md, STATE.md
123
+
124
+ Usage: `/grd:execute-phase 5`
125
+
126
+ ### Quick Mode
127
+
128
+ **`/grd:quick`**
129
+ Execute small, ad-hoc tasks with GSD guarantees but skip optional agents.
130
+
131
+ Quick mode uses the same system with a shorter path:
132
+ - Spawns planner + executor (skips researcher, checker, verifier)
133
+ - Quick tasks live in `.planning/quick/` separate from planned phases
134
+ - Updates STATE.md tracking (not ROADMAP.md)
135
+
136
+ Use when you know exactly what to do and the task is small enough to not need research or verification.
137
+
138
+ Usage: `/grd:quick`
139
+ Result: Creates `.planning/quick/NNN-slug/PLAN.md`, `.planning/quick/NNN-slug/SUMMARY.md`
140
+
141
+ ### Roadmap Management
142
+
143
+ **`/grd:add-phase <description>`**
144
+ Add new phase to end of current milestone.
145
+
146
+ - Appends to ROADMAP.md
147
+ - Uses next sequential number
148
+ - Updates phase directory structure
149
+
150
+ Usage: `/grd:add-phase "Add admin dashboard"`
151
+
152
+ **`/grd:insert-phase <after> <description>`**
153
+ Insert urgent work as decimal phase between existing phases.
154
+
155
+ - Creates intermediate phase (e.g., 7.1 between 7 and 8)
156
+ - Useful for discovered work that must happen mid-milestone
157
+ - Maintains phase ordering
158
+
159
+ Usage: `/grd:insert-phase 7 "Fix critical auth bug"`
160
+ Result: Creates Phase 7.1
161
+
162
+ **`/grd:remove-phase <number>`**
163
+ Remove a future phase and renumber subsequent phases.
164
+
165
+ - Deletes phase directory and all references
166
+ - Renumbers all subsequent phases to close the gap
167
+ - Only works on future (unstarted) phases
168
+ - Git commit preserves historical record
169
+
170
+ Usage: `/grd:remove-phase 17`
171
+ Result: Phase 17 deleted, phases 18-20 become 17-19
172
+
173
+ ### Milestone Management
174
+
175
+ **`/grd:new-milestone <name>`**
176
+ Start a new milestone through unified flow.
177
+
178
+ - Deep questioning to understand what you're building next
179
+ - Optional domain research (spawns 4 parallel researcher agents)
180
+ - Requirements definition with scoping
181
+ - Roadmap creation with phase breakdown
182
+
183
+ Mirrors `/grd:new-project` flow for brownfield projects (existing PROJECT.md).
184
+
185
+ Usage: `/grd:new-milestone "v2.0 Features"`
186
+
187
+ **`/grd:complete-milestone <version>`**
188
+ Archive completed milestone and prepare for next version.
189
+
190
+ - Creates MILESTONES.md entry with stats
191
+ - Archives full details to milestones/ directory
192
+ - Creates git tag for the release
193
+ - Prepares workspace for next version
194
+
195
+ Usage: `/grd:complete-milestone 1.0.0`
196
+
197
+ ### Progress Tracking
198
+
199
+ **`/grd:progress`**
200
+ Check project status and intelligently route to next action.
201
+
202
+ - Shows visual progress bar and completion percentage
203
+ - Summarizes recent work from SUMMARY files
204
+ - Displays current position and what's next
205
+ - Lists key decisions and open issues
206
+ - Offers to execute next plan or create it if missing
207
+ - Detects 100% milestone completion
208
+
209
+ Usage: `/grd:progress`
210
+
211
+ ### Session Management
212
+
213
+ **`/grd:resume-work`**
214
+ Resume work from previous session with full context restoration.
215
+
216
+ - Reads STATE.md for project context
217
+ - Shows current position and recent progress
218
+ - Offers next actions based on project state
219
+
220
+ Usage: `/grd:resume-work`
221
+
222
+ **`/grd:pause-work`**
223
+ Create context handoff when pausing work mid-phase.
224
+
225
+ - Creates .continue-here file with current state
226
+ - Updates STATE.md session continuity section
227
+ - Captures in-progress work context
228
+
229
+ Usage: `/grd:pause-work`
230
+
231
+ ### Debugging
232
+
233
+ **`/grd:debug [issue description]`**
234
+ Systematic debugging with persistent state across context resets.
235
+
236
+ - Gathers symptoms through adaptive questioning
237
+ - Creates `.planning/debug/[slug].md` to track investigation
238
+ - Investigates using scientific method (evidence → hypothesis → test)
239
+ - Survives `/clear` — run `/grd:debug` with no args to resume
240
+ - Archives resolved issues to `.planning/debug/resolved/`
241
+
242
+ Usage: `/grd:debug "login button doesn't work"`
243
+ Usage: `/grd:debug` (resume active session)
244
+
245
+ ### Todo Management
246
+
247
+ **`/grd:add-todo [description]`**
248
+ Capture idea or task as todo from current conversation.
249
+
250
+ - Extracts context from conversation (or uses provided description)
251
+ - Creates structured todo file in `.planning/todos/pending/`
252
+ - Infers area from file paths for grouping
253
+ - Checks for duplicates before creating
254
+ - Updates STATE.md todo count
255
+
256
+ Usage: `/grd:add-todo` (infers from conversation)
257
+ Usage: `/grd:add-todo Add auth token refresh`
258
+
259
+ **`/grd:check-todos [area]`**
260
+ List pending todos and select one to work on.
261
+
262
+ - Lists all pending todos with title, area, age
263
+ - Optional area filter (e.g., `/grd:check-todos api`)
264
+ - Loads full context for selected todo
265
+ - Routes to appropriate action (work now, add to phase, brainstorm)
266
+ - Moves todo to done/ when work begins
267
+
268
+ Usage: `/grd:check-todos`
269
+ Usage: `/grd:check-todos api`
270
+
271
+ ### User Acceptance Testing
272
+
273
+ **`/grd:verify-work [phase]`**
274
+ Validate built features through conversational UAT.
275
+
276
+ - Extracts testable deliverables from SUMMARY.md files
277
+ - Presents tests one at a time (yes/no responses)
278
+ - Automatically diagnoses failures and creates fix plans
279
+ - Ready for re-execution if issues found
280
+
281
+ Usage: `/grd:verify-work 3`
282
+
283
+ ### Milestone Auditing
284
+
285
+ **`/grd:audit-milestone [version]`**
286
+ Audit milestone completion against original intent.
287
+
288
+ - Reads all phase VERIFICATION.md files
289
+ - Checks requirements coverage
290
+ - Spawns integration checker for cross-phase wiring
291
+ - Creates MILESTONE-AUDIT.md with gaps and tech debt
292
+
293
+ Usage: `/grd:audit-milestone`
294
+
295
+ **`/grd:plan-milestone-gaps`**
296
+ Create phases to close gaps identified by audit.
297
+
298
+ - Reads MILESTONE-AUDIT.md and groups gaps into phases
299
+ - Prioritizes by requirement priority (must/should/nice)
300
+ - Adds gap closure phases to ROADMAP.md
301
+ - Ready for `/grd:plan-phase` on new phases
302
+
303
+ Usage: `/grd:plan-milestone-gaps`
304
+
305
+ ### Configuration
306
+
307
+ **`/grd:settings`**
308
+ Configure workflow toggles and model profile interactively.
309
+
310
+ - Toggle researcher, plan checker, verifier agents
311
+ - Select model profile (quality/balanced/budget)
312
+ - Updates `.planning/config.json`
313
+
314
+ Usage: `/grd:settings`
315
+
316
+ **`/grd:set-profile <profile>`**
317
+ Quick switch model profile for GSD agents.
318
+
319
+ - `quality` — Opus everywhere except verification
320
+ - `balanced` — Opus for planning, Sonnet for execution (default)
321
+ - `budget` — Sonnet for writing, Haiku for research/verification
322
+
323
+ Usage: `/grd:set-profile budget`
324
+
325
+ ### Utility Commands
326
+
327
+ **`/grd:help`**
328
+ Show this command reference.
329
+
330
+ **`/grd:update`**
331
+ Update GSD to latest version with changelog preview.
332
+
333
+ - Shows installed vs latest version comparison
334
+ - Displays changelog entries for versions you've missed
335
+ - Highlights breaking changes
336
+ - Confirms before running install
337
+ - Better than raw `npx get-research-done-cc`
338
+
339
+ Usage: `/grd:update`
340
+
341
+ **`/grd:join-discord`**
342
+ Join the GSD Discord community.
343
+
344
+ - Get help, share what you're building, stay updated
345
+ - Connect with other GSD users
346
+
347
+ Usage: `/grd:join-discord`
348
+
349
+ ## Files & Structure
350
+
351
+ ```
352
+ .planning/
353
+ ├── PROJECT.md # Project vision
354
+ ├── ROADMAP.md # Current phase breakdown
355
+ ├── STATE.md # Project memory & context
356
+ ├── config.json # Workflow mode & gates
357
+ ├── todos/ # Captured ideas and tasks
358
+ │ ├── pending/ # Todos waiting to be worked on
359
+ │ └── done/ # Completed todos
360
+ ├── debug/ # Active debug sessions
361
+ │ └── resolved/ # Archived resolved issues
362
+ ├── codebase/ # Codebase map (brownfield projects)
363
+ │ ├── STACK.md # Languages, frameworks, dependencies
364
+ │ ├── ARCHITECTURE.md # Patterns, layers, data flow
365
+ │ ├── STRUCTURE.md # Directory layout, key files
366
+ │ ├── CONVENTIONS.md # Coding standards, naming
367
+ │ ├── TESTING.md # Test setup, patterns
368
+ │ ├── INTEGRATIONS.md # External services, APIs
369
+ │ └── CONCERNS.md # Tech debt, known issues
370
+ └── phases/
371
+ ├── 01-foundation/
372
+ │ ├── 01-01-PLAN.md
373
+ │ └── 01-01-SUMMARY.md
374
+ └── 02-core-features/
375
+ ├── 02-01-PLAN.md
376
+ └── 02-01-SUMMARY.md
377
+ ```
378
+
379
+ ## Workflow Modes
380
+
381
+ Set during `/grd:new-project`:
382
+
383
+ **Interactive Mode**
384
+
385
+ - Confirms each major decision
386
+ - Pauses at checkpoints for approval
387
+ - More guidance throughout
388
+
389
+ **YOLO Mode**
390
+
391
+ - Auto-approves most decisions
392
+ - Executes plans without confirmation
393
+ - Only stops for critical checkpoints
394
+
395
+ Change anytime by editing `.planning/config.json`
396
+
397
+ ## Planning Configuration
398
+
399
+ Configure how planning artifacts are managed in `.planning/config.json`:
400
+
401
+ **`planning.commit_docs`** (default: `true`)
402
+ - `true`: Planning artifacts committed to git (standard workflow)
403
+ - `false`: Planning artifacts kept local-only, not committed
404
+
405
+ When `commit_docs: false`:
406
+ - Add `.planning/` to your `.gitignore`
407
+ - Useful for OSS contributions, client projects, or keeping planning private
408
+ - All planning files still work normally, just not tracked in git
409
+
410
+ **`planning.search_gitignored`** (default: `false`)
411
+ - `true`: Add `--no-ignore` to broad ripgrep searches
412
+ - Only needed when `.planning/` is gitignored and you want project-wide searches to include it
413
+
414
+ Example config:
415
+ ```json
416
+ {
417
+ "planning": {
418
+ "commit_docs": false,
419
+ "search_gitignored": true
420
+ }
421
+ }
422
+ ```
423
+
424
+ ## Common Workflows
425
+
426
+ **Starting a new project:**
427
+
428
+ ```
429
+ /grd:new-project # Unified flow: questioning → research → requirements → roadmap
430
+ /clear
431
+ /grd:plan-phase 1 # Create plans for first phase
432
+ /clear
433
+ /grd:execute-phase 1 # Execute all plans in phase
434
+ ```
435
+
436
+ **Resuming work after a break:**
437
+
438
+ ```
439
+ /grd:progress # See where you left off and continue
440
+ ```
441
+
442
+ **Adding urgent mid-milestone work:**
443
+
444
+ ```
445
+ /grd:insert-phase 5 "Critical security fix"
446
+ /grd:plan-phase 5.1
447
+ /grd:execute-phase 5.1
448
+ ```
449
+
450
+ **Completing a milestone:**
451
+
452
+ ```
453
+ /grd:complete-milestone 1.0.0
454
+ /clear
455
+ /grd:new-milestone # Start next milestone (questioning → research → requirements → roadmap)
456
+ ```
457
+
458
+ **Capturing ideas during work:**
459
+
460
+ ```
461
+ /grd:add-todo # Capture from conversation context
462
+ /grd:add-todo Fix modal z-index # Capture with explicit description
463
+ /grd:check-todos # Review and work on todos
464
+ /grd:check-todos api # Filter by area
465
+ ```
466
+
467
+ **Debugging an issue:**
468
+
469
+ ```
470
+ /grd:debug "form submission fails silently" # Start debug session
471
+ # ... investigation happens, context fills up ...
472
+ /clear
473
+ /grd:debug # Resume from where you left off
474
+ ```
475
+
476
+ ## Getting Help
477
+
478
+ - Read `.planning/PROJECT.md` for project vision
479
+ - Read `.planning/STATE.md` for current context
480
+ - Check `.planning/ROADMAP.md` for phase status
481
+ - Run `/grd:progress` to check where you're up to
482
+ </reference>
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: grd:insert-phase
3
+ description: Insert urgent work as decimal phase (e.g., 72.1) between existing phases
4
+ argument-hint: <after> <description>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ Insert a decimal phase for urgent work discovered mid-milestone that must be completed between existing integer phases.
13
+
14
+ Uses decimal numbering (72.1, 72.2, etc.) to preserve the logical sequence of planned phases while accommodating urgent insertions.
15
+
16
+ Purpose: Handle urgent work discovered during execution without renumbering entire roadmap.
17
+ </objective>
18
+
19
+ <execution_context>
20
+ @.planning/ROADMAP.md
21
+ @.planning/STATE.md
22
+ </execution_context>
23
+
24
+ <process>
25
+
26
+ <step name="parse_arguments">
27
+ Parse the command arguments:
28
+ - First argument: integer phase number to insert after
29
+ - Remaining arguments: phase description
30
+
31
+ Example: `/grd:insert-phase 72 Fix critical auth bug`
32
+ → after = 72
33
+ → description = "Fix critical auth bug"
34
+
35
+ Validation:
36
+
37
+ ```bash
38
+ if [ $# -lt 2 ]; then
39
+ echo "ERROR: Both phase number and description required"
40
+ echo "Usage: /grd:insert-phase <after> <description>"
41
+ echo "Example: /grd:insert-phase 72 Fix critical auth bug"
42
+ exit 1
43
+ fi
44
+ ```
45
+
46
+ Parse first argument as integer:
47
+
48
+ ```bash
49
+ after_phase=$1
50
+ shift
51
+ description="$*"
52
+
53
+ # Validate after_phase is an integer
54
+ if ! [[ "$after_phase" =~ ^[0-9]+$ ]]; then
55
+ echo "ERROR: Phase number must be an integer"
56
+ exit 1
57
+ fi
58
+ ```
59
+
60
+ </step>
61
+
62
+ <step name="load_roadmap">
63
+ Load the roadmap file:
64
+
65
+ ```bash
66
+ if [ -f .planning/ROADMAP.md ]; then
67
+ ROADMAP=".planning/ROADMAP.md"
68
+ else
69
+ echo "ERROR: No roadmap found (.planning/ROADMAP.md)"
70
+ exit 1
71
+ fi
72
+ ```
73
+
74
+ Read roadmap content for parsing.
75
+ </step>
76
+
77
+ <step name="verify_target_phase">
78
+ Verify that the target phase exists in the roadmap:
79
+
80
+ 1. Search for "### Phase {after_phase}:" heading
81
+ 2. If not found:
82
+
83
+ ```
84
+ ERROR: Phase {after_phase} not found in roadmap
85
+ Available phases: [list phase numbers]
86
+ ```
87
+
88
+ Exit.
89
+
90
+ 3. Verify phase is in current milestone (not completed/archived)
91
+ </step>
92
+
93
+ <step name="find_existing_decimals">
94
+ Find existing decimal phases after the target phase:
95
+
96
+ 1. Search for all "### Phase {after_phase}.N:" headings
97
+ 2. Extract decimal suffixes (e.g., for Phase 72: find 72.1, 72.2, 72.3)
98
+ 3. Find the highest decimal suffix
99
+ 4. Calculate next decimal: max + 1
100
+
101
+ Examples:
102
+
103
+ - Phase 72 with no decimals → next is 72.1
104
+ - Phase 72 with 72.1 → next is 72.2
105
+ - Phase 72 with 72.1, 72.2 → next is 72.3
106
+
107
+ Store as: `decimal_phase="$(printf "%02d" $after_phase).${next_decimal}"`
108
+ </step>
109
+
110
+ <step name="generate_slug">
111
+ Convert the phase description to a kebab-case slug:
112
+
113
+ ```bash
114
+ slug=$(echo "$description" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
115
+ ```
116
+
117
+ Phase directory name: `{decimal-phase}-{slug}`
118
+ Example: `06.1-fix-critical-auth-bug` (phase 6 insertion)
119
+ </step>
120
+
121
+ <step name="create_phase_directory">
122
+ Create the phase directory structure:
123
+
124
+ ```bash
125
+ phase_dir=".planning/phases/${decimal_phase}-${slug}"
126
+ mkdir -p "$phase_dir"
127
+ ```
128
+
129
+ Confirm: "Created directory: $phase_dir"
130
+ </step>
131
+
132
+ <step name="update_roadmap">
133
+ Insert the new phase entry into the roadmap:
134
+
135
+ 1. Find insertion point: immediately after Phase {after_phase}'s content (before next phase heading or "---")
136
+ 2. Insert new phase heading with (INSERTED) marker:
137
+
138
+ ```
139
+ ### Phase {decimal_phase}: {Description} (INSERTED)
140
+
141
+ **Goal:** [Urgent work - to be planned]
142
+ **Depends on:** Phase {after_phase}
143
+ **Plans:** 0 plans
144
+
145
+ Plans:
146
+ - [ ] TBD (run /grd:plan-phase {decimal_phase} to break down)
147
+
148
+ **Details:**
149
+ [To be added during planning]
150
+ ```
151
+
152
+ 3. Write updated roadmap back to file
153
+
154
+ The "(INSERTED)" marker helps identify decimal phases as urgent insertions.
155
+
156
+ Preserve all other content exactly (formatting, spacing, other phases).
157
+ </step>
158
+
159
+ <step name="update_project_state">
160
+ Update STATE.md to reflect the inserted phase:
161
+
162
+ 1. Read `.planning/STATE.md`
163
+ 2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
164
+ ```
165
+ - Phase {decimal_phase} inserted after Phase {after_phase}: {description} (URGENT)
166
+ ```
167
+
168
+ If "Roadmap Evolution" section doesn't exist, create it.
169
+
170
+ Add note about insertion reason if appropriate.
171
+ </step>
172
+
173
+ <step name="completion">
174
+ Present completion summary:
175
+
176
+ ```
177
+ Phase {decimal_phase} inserted after Phase {after_phase}:
178
+ - Description: {description}
179
+ - Directory: .planning/phases/{decimal-phase}-{slug}/
180
+ - Status: Not planned yet
181
+ - Marker: (INSERTED) - indicates urgent work
182
+
183
+ Roadmap updated: {roadmap-path}
184
+ Project state updated: .planning/STATE.md
185
+
186
+ ---
187
+
188
+ ## ▶ Next Up
189
+
190
+ **Phase {decimal_phase}: {description}** — urgent insertion
191
+
192
+ `/grd:plan-phase {decimal_phase}`
193
+
194
+ <sub>`/clear` first → fresh context window</sub>
195
+
196
+ ---
197
+
198
+ **Also available:**
199
+ - Review insertion impact: Check if Phase {next_integer} dependencies still make sense
200
+ - Review roadmap
201
+
202
+ ---
203
+ ```
204
+ </step>
205
+
206
+ </process>
207
+
208
+ <anti_patterns>
209
+
210
+ - Don't use this for planned work at end of milestone (use /grd:add-phase)
211
+ - Don't insert before Phase 1 (decimal 0.1 makes no sense)
212
+ - Don't renumber existing phases
213
+ - Don't modify the target phase content
214
+ - Don't create plans yet (that's /grd:plan-phase)
215
+ - Don't commit changes (user decides when to commit)
216
+ </anti_patterns>
217
+
218
+ <success_criteria>
219
+ Phase insertion is complete when:
220
+
221
+ - [ ] Phase directory created: `.planning/phases/{N.M}-{slug}/`
222
+ - [ ] Roadmap updated with new phase entry (includes "(INSERTED)" marker)
223
+ - [ ] Phase inserted in correct position (after target phase, before next integer phase)
224
+ - [ ] STATE.md updated with roadmap evolution note
225
+ - [ ] Decimal number calculated correctly (based on existing decimals)
226
+ - [ ] User informed of next steps and dependency implications
227
+ </success_criteria>