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,567 @@
1
+ # Phase Prompt Template
2
+
3
+ > **Note:** Planning methodology is in `agents/grd-planner.md`.
4
+ > This template defines the PLAN.md output format that the agent produces.
5
+
6
+ Template for `.planning/phases/XX-name/{phase}-{plan}-PLAN.md` - executable phase plans optimized for parallel execution.
7
+
8
+ **Naming:** Use `{phase}-{plan}-PLAN.md` format (e.g., `01-02-PLAN.md` for Phase 1, Plan 2)
9
+
10
+ ---
11
+
12
+ ## File Template
13
+
14
+ ```markdown
15
+ ---
16
+ phase: XX-name
17
+ plan: NN
18
+ type: execute
19
+ wave: N # Execution wave (1, 2, 3...). Pre-computed at plan time.
20
+ depends_on: [] # Plan IDs this plan requires (e.g., ["01-01"]).
21
+ files_modified: [] # Files this plan modifies.
22
+ autonomous: true # false if plan has checkpoints requiring user interaction
23
+ user_setup: [] # Human-required setup Claude cannot automate (see below)
24
+
25
+ # Goal-backward verification (derived during planning, verified after execution)
26
+ must_haves:
27
+ truths: [] # Observable behaviors that must be true for goal achievement
28
+ artifacts: [] # Files that must exist with real implementation
29
+ key_links: [] # Critical connections between artifacts
30
+ ---
31
+
32
+ <objective>
33
+ [What this plan accomplishes]
34
+
35
+ Purpose: [Why this matters for the project]
36
+ Output: [What artifacts will be created]
37
+ </objective>
38
+
39
+ <execution_context>
40
+ @~/.claude/get-research-done/workflows/execute-plan.md
41
+ @~/.claude/get-research-done/templates/summary.md
42
+ [If plan contains checkpoint tasks (type="checkpoint:*"), add:]
43
+ @~/.claude/get-research-done/references/checkpoints.md
44
+ </execution_context>
45
+
46
+ <context>
47
+ @.planning/PROJECT.md
48
+ @.planning/ROADMAP.md
49
+ @.planning/STATE.md
50
+
51
+ # Only reference prior plan SUMMARYs if genuinely needed:
52
+ # - This plan uses types/exports from prior plan
53
+ # - Prior plan made decision that affects this plan
54
+ # Do NOT reflexively chain: Plan 02 refs 01, Plan 03 refs 02...
55
+
56
+ [Relevant source files:]
57
+ @src/path/to/relevant.ts
58
+ </context>
59
+
60
+ <tasks>
61
+
62
+ <task type="auto">
63
+ <name>Task 1: [Action-oriented name]</name>
64
+ <files>path/to/file.ext, another/file.ext</files>
65
+ <action>[Specific implementation - what to do, how to do it, what to avoid and WHY]</action>
66
+ <verify>[Command or check to prove it worked]</verify>
67
+ <done>[Measurable acceptance criteria]</done>
68
+ </task>
69
+
70
+ <task type="auto">
71
+ <name>Task 2: [Action-oriented name]</name>
72
+ <files>path/to/file.ext</files>
73
+ <action>[Specific implementation]</action>
74
+ <verify>[Command or check]</verify>
75
+ <done>[Acceptance criteria]</done>
76
+ </task>
77
+
78
+ <!-- For checkpoint task examples and patterns, see @~/.claude/get-research-done/references/checkpoints.md -->
79
+ <!-- Key rule: Claude starts dev server BEFORE human-verify checkpoints. User only visits URLs. -->
80
+
81
+ <task type="checkpoint:decision" gate="blocking">
82
+ <decision>[What needs deciding]</decision>
83
+ <context>[Why this decision matters]</context>
84
+ <options>
85
+ <option id="option-a"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
86
+ <option id="option-b"><name>[Name]</name><pros>[Benefits]</pros><cons>[Tradeoffs]</cons></option>
87
+ </options>
88
+ <resume-signal>Select: option-a or option-b</resume-signal>
89
+ </task>
90
+
91
+ <task type="checkpoint:human-verify" gate="blocking">
92
+ <what-built>[What Claude built] - server running at [URL]</what-built>
93
+ <how-to-verify>Visit [URL] and verify: [visual checks only, NO CLI commands]</how-to-verify>
94
+ <resume-signal>Type "approved" or describe issues</resume-signal>
95
+ </task>
96
+
97
+ </tasks>
98
+
99
+ <verification>
100
+ Before declaring plan complete:
101
+ - [ ] [Specific test command]
102
+ - [ ] [Build/type check passes]
103
+ - [ ] [Behavior verification]
104
+ </verification>
105
+
106
+ <success_criteria>
107
+
108
+ - All tasks completed
109
+ - All verification checks pass
110
+ - No errors or warnings introduced
111
+ - [Plan-specific criteria]
112
+ </success_criteria>
113
+
114
+ <output>
115
+ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
116
+ </output>
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Frontmatter Fields
122
+
123
+ | Field | Required | Purpose |
124
+ |-------|----------|---------|
125
+ | `phase` | Yes | Phase identifier (e.g., `01-foundation`) |
126
+ | `plan` | Yes | Plan number within phase (e.g., `01`, `02`) |
127
+ | `type` | Yes | Always `execute` for standard plans, `tdd` for TDD plans |
128
+ | `wave` | Yes | Execution wave number (1, 2, 3...). Pre-computed at plan time. |
129
+ | `depends_on` | Yes | Array of plan IDs this plan requires. |
130
+ | `files_modified` | Yes | Files this plan touches. |
131
+ | `autonomous` | Yes | `true` if no checkpoints, `false` if has checkpoints |
132
+ | `user_setup` | No | Array of human-required setup items (external services) |
133
+ | `must_haves` | Yes | Goal-backward verification criteria (see below) |
134
+
135
+ **Wave is pre-computed:** Wave numbers are assigned during `/grd:plan-phase`. Execute-phase reads `wave` directly from frontmatter and groups plans by wave number. No runtime dependency analysis needed.
136
+
137
+ **Must-haves enable verification:** The `must_haves` field carries goal-backward requirements from planning to execution. After all plans complete, execute-phase spawns a verification subagent that checks these criteria against the actual codebase.
138
+
139
+ ---
140
+
141
+ ## Parallel vs Sequential
142
+
143
+ <parallel_examples>
144
+
145
+ **Wave 1 candidates (parallel):**
146
+
147
+ ```yaml
148
+ # Plan 01 - User feature
149
+ wave: 1
150
+ depends_on: []
151
+ files_modified: [src/models/user.ts, src/api/users.ts]
152
+ autonomous: true
153
+
154
+ # Plan 02 - Product feature (no overlap with Plan 01)
155
+ wave: 1
156
+ depends_on: []
157
+ files_modified: [src/models/product.ts, src/api/products.ts]
158
+ autonomous: true
159
+
160
+ # Plan 03 - Order feature (no overlap)
161
+ wave: 1
162
+ depends_on: []
163
+ files_modified: [src/models/order.ts, src/api/orders.ts]
164
+ autonomous: true
165
+ ```
166
+
167
+ All three run in parallel (Wave 1) - no dependencies, no file conflicts.
168
+
169
+ **Sequential (genuine dependency):**
170
+
171
+ ```yaml
172
+ # Plan 01 - Auth foundation
173
+ wave: 1
174
+ depends_on: []
175
+ files_modified: [src/lib/auth.ts, src/middleware/auth.ts]
176
+ autonomous: true
177
+
178
+ # Plan 02 - Protected features (needs auth)
179
+ wave: 2
180
+ depends_on: ["01"]
181
+ files_modified: [src/features/dashboard.ts]
182
+ autonomous: true
183
+ ```
184
+
185
+ Plan 02 in Wave 2 waits for Plan 01 in Wave 1 - genuine dependency on auth types/middleware.
186
+
187
+ **Checkpoint plan:**
188
+
189
+ ```yaml
190
+ # Plan 03 - UI with verification
191
+ wave: 3
192
+ depends_on: ["01", "02"]
193
+ files_modified: [src/components/Dashboard.tsx]
194
+ autonomous: false # Has checkpoint:human-verify
195
+ ```
196
+
197
+ Wave 3 runs after Waves 1 and 2. Pauses at checkpoint, orchestrator presents to user, resumes on approval.
198
+
199
+ </parallel_examples>
200
+
201
+ ---
202
+
203
+ ## Context Section
204
+
205
+ **Parallel-aware context:**
206
+
207
+ ```markdown
208
+ <context>
209
+ @.planning/PROJECT.md
210
+ @.planning/ROADMAP.md
211
+ @.planning/STATE.md
212
+
213
+ # Only include SUMMARY refs if genuinely needed:
214
+ # - This plan imports types from prior plan
215
+ # - Prior plan made decision affecting this plan
216
+ # - Prior plan's output is input to this plan
217
+ #
218
+ # Independent plans need NO prior SUMMARY references.
219
+ # Do NOT reflexively chain: 02 refs 01, 03 refs 02...
220
+
221
+ @src/relevant/source.ts
222
+ </context>
223
+ ```
224
+
225
+ **Bad pattern (creates false dependencies):**
226
+ ```markdown
227
+ <context>
228
+ @.planning/phases/03-features/03-01-SUMMARY.md # Just because it's earlier
229
+ @.planning/phases/03-features/03-02-SUMMARY.md # Reflexive chaining
230
+ </context>
231
+ ```
232
+
233
+ ---
234
+
235
+ ## Scope Guidance
236
+
237
+ **Plan sizing:**
238
+
239
+ - 2-3 tasks per plan
240
+ - ~50% context usage maximum
241
+ - Complex phases: Multiple focused plans, not one large plan
242
+
243
+ **When to split:**
244
+
245
+ - Different subsystems (auth vs API vs UI)
246
+ - >3 tasks
247
+ - Risk of context overflow
248
+ - TDD candidates - separate plans
249
+
250
+ **Vertical slices preferred:**
251
+
252
+ ```
253
+ PREFER: Plan 01 = User (model + API + UI)
254
+ Plan 02 = Product (model + API + UI)
255
+
256
+ AVOID: Plan 01 = All models
257
+ Plan 02 = All APIs
258
+ Plan 03 = All UIs
259
+ ```
260
+
261
+ ---
262
+
263
+ ## TDD Plans
264
+
265
+ TDD features get dedicated plans with `type: tdd`.
266
+
267
+ **Heuristic:** Can you write `expect(fn(input)).toBe(output)` before writing `fn`?
268
+ → Yes: Create a TDD plan
269
+ → No: Standard task in standard plan
270
+
271
+ See `~/.claude/get-research-done/references/tdd.md` for TDD plan structure.
272
+
273
+ ---
274
+
275
+ ## Task Types
276
+
277
+ | Type | Use For | Autonomy |
278
+ |------|---------|----------|
279
+ | `auto` | Everything Claude can do independently | Fully autonomous |
280
+ | `checkpoint:human-verify` | Visual/functional verification | Pauses, returns to orchestrator |
281
+ | `checkpoint:decision` | Implementation choices | Pauses, returns to orchestrator |
282
+ | `checkpoint:human-action` | Truly unavoidable manual steps (rare) | Pauses, returns to orchestrator |
283
+
284
+ **Checkpoint behavior in parallel execution:**
285
+ - Plan runs until checkpoint
286
+ - Agent returns with checkpoint details + agent_id
287
+ - Orchestrator presents to user
288
+ - User responds
289
+ - Orchestrator resumes agent with `resume: agent_id`
290
+
291
+ ---
292
+
293
+ ## Examples
294
+
295
+ **Autonomous parallel plan:**
296
+
297
+ ```markdown
298
+ ---
299
+ phase: 03-features
300
+ plan: 01
301
+ type: execute
302
+ wave: 1
303
+ depends_on: []
304
+ files_modified: [src/features/user/model.ts, src/features/user/api.ts, src/features/user/UserList.tsx]
305
+ autonomous: true
306
+ ---
307
+
308
+ <objective>
309
+ Implement complete User feature as vertical slice.
310
+
311
+ Purpose: Self-contained user management that can run parallel to other features.
312
+ Output: User model, API endpoints, and UI components.
313
+ </objective>
314
+
315
+ <context>
316
+ @.planning/PROJECT.md
317
+ @.planning/ROADMAP.md
318
+ @.planning/STATE.md
319
+ </context>
320
+
321
+ <tasks>
322
+ <task type="auto">
323
+ <name>Task 1: Create User model</name>
324
+ <files>src/features/user/model.ts</files>
325
+ <action>Define User type with id, email, name, createdAt. Export TypeScript interface.</action>
326
+ <verify>tsc --noEmit passes</verify>
327
+ <done>User type exported and usable</done>
328
+ </task>
329
+
330
+ <task type="auto">
331
+ <name>Task 2: Create User API endpoints</name>
332
+ <files>src/features/user/api.ts</files>
333
+ <action>GET /users (list), GET /users/:id (single), POST /users (create). Use User type from model.</action>
334
+ <verify>curl tests pass for all endpoints</verify>
335
+ <done>All CRUD operations work</done>
336
+ </task>
337
+ </tasks>
338
+
339
+ <verification>
340
+ - [ ] npm run build succeeds
341
+ - [ ] API endpoints respond correctly
342
+ </verification>
343
+
344
+ <success_criteria>
345
+ - All tasks completed
346
+ - User feature works end-to-end
347
+ </success_criteria>
348
+
349
+ <output>
350
+ After completion, create `.planning/phases/03-features/03-01-SUMMARY.md`
351
+ </output>
352
+ ```
353
+
354
+ **Plan with checkpoint (non-autonomous):**
355
+
356
+ ```markdown
357
+ ---
358
+ phase: 03-features
359
+ plan: 03
360
+ type: execute
361
+ wave: 2
362
+ depends_on: ["03-01", "03-02"]
363
+ files_modified: [src/components/Dashboard.tsx]
364
+ autonomous: false
365
+ ---
366
+
367
+ <objective>
368
+ Build dashboard with visual verification.
369
+
370
+ Purpose: Integrate user and product features into unified view.
371
+ Output: Working dashboard component.
372
+ </objective>
373
+
374
+ <execution_context>
375
+ @~/.claude/get-research-done/workflows/execute-plan.md
376
+ @~/.claude/get-research-done/templates/summary.md
377
+ @~/.claude/get-research-done/references/checkpoints.md
378
+ </execution_context>
379
+
380
+ <context>
381
+ @.planning/PROJECT.md
382
+ @.planning/ROADMAP.md
383
+ @.planning/phases/03-features/03-01-SUMMARY.md
384
+ @.planning/phases/03-features/03-02-SUMMARY.md
385
+ </context>
386
+
387
+ <tasks>
388
+ <task type="auto">
389
+ <name>Task 1: Build Dashboard layout</name>
390
+ <files>src/components/Dashboard.tsx</files>
391
+ <action>Create responsive grid with UserList and ProductList components. Use Tailwind for styling.</action>
392
+ <verify>npm run build succeeds</verify>
393
+ <done>Dashboard renders without errors</done>
394
+ </task>
395
+
396
+ <!-- Checkpoint pattern: Claude starts server, user visits URL. See checkpoints.md for full patterns. -->
397
+ <task type="auto">
398
+ <name>Start dev server</name>
399
+ <action>Run `npm run dev` in background, wait for ready</action>
400
+ <verify>curl localhost:3000 returns 200</verify>
401
+ </task>
402
+
403
+ <task type="checkpoint:human-verify" gate="blocking">
404
+ <what-built>Dashboard - server at http://localhost:3000</what-built>
405
+ <how-to-verify>Visit localhost:3000/dashboard. Check: desktop grid, mobile stack, no scroll issues.</how-to-verify>
406
+ <resume-signal>Type "approved" or describe issues</resume-signal>
407
+ </task>
408
+ </tasks>
409
+
410
+ <verification>
411
+ - [ ] npm run build succeeds
412
+ - [ ] Visual verification passed
413
+ </verification>
414
+
415
+ <success_criteria>
416
+ - All tasks completed
417
+ - User approved visual layout
418
+ </success_criteria>
419
+
420
+ <output>
421
+ After completion, create `.planning/phases/03-features/03-03-SUMMARY.md`
422
+ </output>
423
+ ```
424
+
425
+ ---
426
+
427
+ ## Anti-Patterns
428
+
429
+ **Bad: Reflexive dependency chaining**
430
+ ```yaml
431
+ depends_on: ["03-01"] # Just because 01 comes before 02
432
+ ```
433
+
434
+ **Bad: Horizontal layer grouping**
435
+ ```
436
+ Plan 01: All models
437
+ Plan 02: All APIs (depends on 01)
438
+ Plan 03: All UIs (depends on 02)
439
+ ```
440
+
441
+ **Bad: Missing autonomy flag**
442
+ ```yaml
443
+ # Has checkpoint but no autonomous: false
444
+ depends_on: []
445
+ files_modified: [...]
446
+ # autonomous: ??? <- Missing!
447
+ ```
448
+
449
+ **Bad: Vague tasks**
450
+ ```xml
451
+ <task type="auto">
452
+ <name>Set up authentication</name>
453
+ <action>Add auth to the app</action>
454
+ </task>
455
+ ```
456
+
457
+ ---
458
+
459
+ ## Guidelines
460
+
461
+ - Always use XML structure for Claude parsing
462
+ - Include `wave`, `depends_on`, `files_modified`, `autonomous` in every plan
463
+ - Prefer vertical slices over horizontal layers
464
+ - Only reference prior SUMMARYs when genuinely needed
465
+ - Group checkpoints with related auto tasks in same plan
466
+ - 2-3 tasks per plan, ~50% context max
467
+
468
+ ---
469
+
470
+ ## User Setup (External Services)
471
+
472
+ When a plan introduces external services requiring human configuration, declare in frontmatter:
473
+
474
+ ```yaml
475
+ user_setup:
476
+ - service: stripe
477
+ why: "Payment processing requires API keys"
478
+ env_vars:
479
+ - name: STRIPE_SECRET_KEY
480
+ source: "Stripe Dashboard → Developers → API keys → Secret key"
481
+ - name: STRIPE_WEBHOOK_SECRET
482
+ source: "Stripe Dashboard → Developers → Webhooks → Signing secret"
483
+ dashboard_config:
484
+ - task: "Create webhook endpoint"
485
+ location: "Stripe Dashboard → Developers → Webhooks → Add endpoint"
486
+ details: "URL: https://[your-domain]/api/webhooks/stripe"
487
+ local_dev:
488
+ - "stripe listen --forward-to localhost:3000/api/webhooks/stripe"
489
+ ```
490
+
491
+ **The automation-first rule:** `user_setup` contains ONLY what Claude literally cannot do:
492
+ - Account creation (requires human signup)
493
+ - Secret retrieval (requires dashboard access)
494
+ - Dashboard configuration (requires human in browser)
495
+
496
+ **NOT included:** Package installs, code changes, file creation, CLI commands Claude can run.
497
+
498
+ **Result:** Execute-plan generates `{phase}-USER-SETUP.md` with checklist for the user.
499
+
500
+ See `~/.claude/get-research-done/templates/user-setup.md` for full schema and examples
501
+
502
+ ---
503
+
504
+ ## Must-Haves (Goal-Backward Verification)
505
+
506
+ The `must_haves` field defines what must be TRUE for the phase goal to be achieved. Derived during planning, verified after execution.
507
+
508
+ **Structure:**
509
+
510
+ ```yaml
511
+ must_haves:
512
+ truths:
513
+ - "User can see existing messages"
514
+ - "User can send a message"
515
+ - "Messages persist across refresh"
516
+ artifacts:
517
+ - path: "src/components/Chat.tsx"
518
+ provides: "Message list rendering"
519
+ min_lines: 30
520
+ - path: "src/app/api/chat/route.ts"
521
+ provides: "Message CRUD operations"
522
+ exports: ["GET", "POST"]
523
+ - path: "prisma/schema.prisma"
524
+ provides: "Message model"
525
+ contains: "model Message"
526
+ key_links:
527
+ - from: "src/components/Chat.tsx"
528
+ to: "/api/chat"
529
+ via: "fetch in useEffect"
530
+ pattern: "fetch.*api/chat"
531
+ - from: "src/app/api/chat/route.ts"
532
+ to: "prisma.message"
533
+ via: "database query"
534
+ pattern: "prisma\\.message\\.(find|create)"
535
+ ```
536
+
537
+ **Field descriptions:**
538
+
539
+ | Field | Purpose |
540
+ |-------|---------|
541
+ | `truths` | Observable behaviors from user perspective. Each must be testable. |
542
+ | `artifacts` | Files that must exist with real implementation. |
543
+ | `artifacts[].path` | File path relative to project root. |
544
+ | `artifacts[].provides` | What this artifact delivers. |
545
+ | `artifacts[].min_lines` | Optional. Minimum lines to be considered substantive. |
546
+ | `artifacts[].exports` | Optional. Expected exports to verify. |
547
+ | `artifacts[].contains` | Optional. Pattern that must exist in file. |
548
+ | `key_links` | Critical connections between artifacts. |
549
+ | `key_links[].from` | Source artifact. |
550
+ | `key_links[].to` | Target artifact or endpoint. |
551
+ | `key_links[].via` | How they connect (description). |
552
+ | `key_links[].pattern` | Optional. Regex to verify connection exists. |
553
+
554
+ **Why this matters:**
555
+
556
+ Task completion ≠ Goal achievement. A task "create chat component" can complete by creating a placeholder. The `must_haves` field captures what must actually work, enabling verification to catch gaps before they compound.
557
+
558
+ **Verification flow:**
559
+
560
+ 1. Plan-phase derives must_haves from phase goal (goal-backward)
561
+ 2. Must_haves written to PLAN.md frontmatter
562
+ 3. Execute-phase runs all plans
563
+ 4. Verification subagent checks must_haves against codebase
564
+ 5. Gaps found → fix plans created → execute → re-verify
565
+ 6. All must_haves pass → phase complete
566
+
567
+ See `~/.claude/get-research-done/workflows/verify-phase.md` for verification logic.
@@ -0,0 +1,117 @@
1
+ # Planner Subagent Prompt Template
2
+
3
+ Template for spawning grd-planner agent. The agent contains all planning expertise - this template provides planning context only.
4
+
5
+ ---
6
+
7
+ ## Template
8
+
9
+ ```markdown
10
+ <planning_context>
11
+
12
+ **Phase:** {phase_number}
13
+ **Mode:** {standard | gap_closure}
14
+
15
+ **Project State:**
16
+ @.planning/STATE.md
17
+
18
+ **Roadmap:**
19
+ @.planning/ROADMAP.md
20
+
21
+ **Requirements (if exists):**
22
+ @.planning/REQUIREMENTS.md
23
+
24
+ **Phase Context (if exists):**
25
+ @.planning/phases/{phase_dir}/{phase}-CONTEXT.md
26
+
27
+ **Research (if exists):**
28
+ @.planning/phases/{phase_dir}/{phase}-RESEARCH.md
29
+
30
+ **Gap Closure (if --gaps mode):**
31
+ @.planning/phases/{phase_dir}/{phase}-VERIFICATION.md
32
+ @.planning/phases/{phase_dir}/{phase}-UAT.md
33
+
34
+ </planning_context>
35
+
36
+ <downstream_consumer>
37
+ Output consumed by /grd:execute-phase
38
+ Plans must be executable prompts with:
39
+ - Frontmatter (wave, depends_on, files_modified, autonomous)
40
+ - Tasks in XML format
41
+ - Verification criteria
42
+ - must_haves for goal-backward verification
43
+ </downstream_consumer>
44
+
45
+ <quality_gate>
46
+ Before returning PLANNING COMPLETE:
47
+ - [ ] PLAN.md files created in phase directory
48
+ - [ ] Each plan has valid frontmatter
49
+ - [ ] Tasks are specific and actionable
50
+ - [ ] Dependencies correctly identified
51
+ - [ ] Waves assigned for parallel execution
52
+ - [ ] must_haves derived from phase goal
53
+ </quality_gate>
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Placeholders
59
+
60
+ | Placeholder | Source | Example |
61
+ |-------------|--------|---------|
62
+ | `{phase_number}` | From roadmap/arguments | `5` or `2.1` |
63
+ | `{phase_dir}` | Phase directory name | `05-user-profiles` |
64
+ | `{phase}` | Phase prefix | `05` |
65
+ | `{standard \| gap_closure}` | Mode flag | `standard` |
66
+
67
+ ---
68
+
69
+ ## Usage
70
+
71
+ **From /grd:plan-phase (standard mode):**
72
+ ```python
73
+ Task(
74
+ prompt=filled_template,
75
+ subagent_type="grd-planner",
76
+ description="Plan Phase {phase}"
77
+ )
78
+ ```
79
+
80
+ **From /grd:plan-phase --gaps (gap closure mode):**
81
+ ```python
82
+ Task(
83
+ prompt=filled_template, # with mode: gap_closure
84
+ subagent_type="grd-planner",
85
+ description="Plan gaps for Phase {phase}"
86
+ )
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Continuation
92
+
93
+ For checkpoints, spawn fresh agent with:
94
+
95
+ ```markdown
96
+ <objective>
97
+ Continue planning for Phase {phase_number}: {phase_name}
98
+ </objective>
99
+
100
+ <prior_state>
101
+ Phase directory: @.planning/phases/{phase_dir}/
102
+ Existing plans: @.planning/phases/{phase_dir}/*-PLAN.md
103
+ </prior_state>
104
+
105
+ <checkpoint_response>
106
+ **Type:** {checkpoint_type}
107
+ **Response:** {user_response}
108
+ </checkpoint_response>
109
+
110
+ <mode>
111
+ Continue: {standard | gap_closure}
112
+ </mode>
113
+ ```
114
+
115
+ ---
116
+
117
+ **Note:** Planning methodology, task breakdown, dependency analysis, wave assignment, TDD detection, and goal-backward derivation are baked into the grd-planner agent. This template only passes context.