@undeemed/get-shit-done-codex 1.6.5

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