@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,896 @@
1
+ ---
2
+ name: gsd:new-project
3
+ description: Initialize a new project with deep context gathering and PROJECT.md
4
+ allowed-tools:
5
+ - Read
6
+ - Bash
7
+ - Write
8
+ - Task
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ <objective>
13
+
14
+ Initialize a new project through unified flow: questioning → research (optional) → requirements → roadmap.
15
+
16
+ This is the most leveraged moment in any project. Deep questioning here means better plans, better execution, better outcomes. One command takes you from idea to ready-for-planning.
17
+
18
+ **Creates:**
19
+ - `.planning/PROJECT.md` — project context
20
+ - `.planning/config.json` — workflow preferences
21
+ - `.planning/research/` — domain research (optional)
22
+ - `.planning/REQUIREMENTS.md` — scoped requirements
23
+ - `.planning/ROADMAP.md` — phase structure
24
+ - `.planning/STATE.md` — project memory
25
+
26
+ **After this command:** Run `/gsd:plan-phase 1` to start execution.
27
+
28
+ </objective>
29
+
30
+ <execution_context>
31
+
32
+ @~/.claude/get-shit-done/references/questioning.md
33
+ @~/.claude/get-shit-done/references/ui-brand.md
34
+ @~/.claude/get-shit-done/templates/project.md
35
+ @~/.claude/get-shit-done/templates/requirements.md
36
+
37
+ </execution_context>
38
+
39
+ <process>
40
+
41
+ ## Phase 1: Setup
42
+
43
+ **MANDATORY FIRST STEP — Execute these checks before ANY user interaction:**
44
+
45
+ 1. **Abort if project exists:**
46
+ ```bash
47
+ [ -f .planning/PROJECT.md ] && echo "ERROR: Project already initialized. Use /gsd:progress" && exit 1
48
+ ```
49
+
50
+ 2. **Initialize git repo in THIS directory** (required even if inside a parent repo):
51
+ ```bash
52
+ if [ -d .git ] || [ -f .git ]; then
53
+ echo "Git repo exists in current directory"
54
+ else
55
+ git init
56
+ echo "Initialized new git repo"
57
+ fi
58
+ ```
59
+
60
+ 3. **Detect existing code (brownfield detection):**
61
+ ```bash
62
+ CODE_FILES=$(find . -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.swift" -o -name "*.java" 2>/dev/null | grep -v node_modules | grep -v .git | head -20)
63
+ HAS_PACKAGE=$([ -f package.json ] || [ -f requirements.txt ] || [ -f Cargo.toml ] || [ -f go.mod ] || [ -f Package.swift ] && echo "yes")
64
+ HAS_CODEBASE_MAP=$([ -d .planning/codebase ] && echo "yes")
65
+ ```
66
+
67
+ **You MUST run all bash commands above using the Bash tool before proceeding.**
68
+
69
+ ## Phase 2: Brownfield Offer
70
+
71
+ **If existing code detected and .planning/codebase/ doesn't exist:**
72
+
73
+ Check the results from setup step:
74
+ - If `CODE_FILES` is non-empty OR `HAS_PACKAGE` is "yes"
75
+ - AND `HAS_CODEBASE_MAP` is NOT "yes"
76
+
77
+ Use AskUserQuestion:
78
+ - header: "Existing Code"
79
+ - question: "I detected existing code in this directory. Would you like to map the codebase first?"
80
+ - options:
81
+ - "Map codebase first" — Run /gsd:map-codebase to understand existing architecture (Recommended)
82
+ - "Skip mapping" — Proceed with project initialization
83
+
84
+ **If "Map codebase first":**
85
+ ```
86
+ Run `/gsd:map-codebase` first, then return to `/gsd:new-project`
87
+ ```
88
+ Exit command.
89
+
90
+ **If "Skip mapping":** Continue to Phase 3.
91
+
92
+ **If no existing code detected OR codebase already mapped:** Continue to Phase 3.
93
+
94
+ ## Phase 3: Deep Questioning
95
+
96
+ **Display stage banner:**
97
+
98
+ ```
99
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
100
+ GSD ► QUESTIONING
101
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
102
+ ```
103
+
104
+ **Open the conversation:**
105
+
106
+ Ask inline (freeform, NOT AskUserQuestion):
107
+
108
+ "What do you want to build?"
109
+
110
+ Wait for their response. This gives you the context needed to ask intelligent follow-up questions.
111
+
112
+ **Follow the thread:**
113
+
114
+ Based on what they said, ask follow-up questions that dig into their response. Use AskUserQuestion with options that probe what they mentioned — interpretations, clarifications, concrete examples.
115
+
116
+ Keep following threads. Each answer opens new threads to explore. Ask about:
117
+ - What excited them
118
+ - What problem sparked this
119
+ - What they mean by vague terms
120
+ - What it would actually look like
121
+ - What's already decided
122
+
123
+ Consult `questioning.md` for techniques:
124
+ - Challenge vagueness
125
+ - Make abstract concrete
126
+ - Surface assumptions
127
+ - Find edges
128
+ - Reveal motivation
129
+
130
+ **Check context (background, not out loud):**
131
+
132
+ As you go, mentally check the context checklist from `questioning.md`. If gaps remain, weave questions naturally. Don't suddenly switch to checklist mode.
133
+
134
+ **Decision gate:**
135
+
136
+ When you could write a clear PROJECT.md, use AskUserQuestion:
137
+
138
+ - header: "Ready?"
139
+ - question: "I think I understand what you're after. Ready to create PROJECT.md?"
140
+ - options:
141
+ - "Create PROJECT.md" — Let's move forward
142
+ - "Keep exploring" — I want to share more / ask me more
143
+
144
+ If "Keep exploring" — ask what they want to add, or identify gaps and probe naturally.
145
+
146
+ Loop until "Create PROJECT.md" selected.
147
+
148
+ ## Phase 4: Write PROJECT.md
149
+
150
+ Synthesize all context into `.planning/PROJECT.md` using the template from `templates/project.md`.
151
+
152
+ **For greenfield projects:**
153
+
154
+ Initialize requirements as hypotheses:
155
+
156
+ ```markdown
157
+ ## Requirements
158
+
159
+ ### Validated
160
+
161
+ (None yet — ship to validate)
162
+
163
+ ### Active
164
+
165
+ - [ ] [Requirement 1]
166
+ - [ ] [Requirement 2]
167
+ - [ ] [Requirement 3]
168
+
169
+ ### Out of Scope
170
+
171
+ - [Exclusion 1] — [why]
172
+ - [Exclusion 2] — [why]
173
+ ```
174
+
175
+ All Active requirements are hypotheses until shipped and validated.
176
+
177
+ **For brownfield projects (codebase map exists):**
178
+
179
+ Infer Validated requirements from existing code:
180
+
181
+ 1. Read `.planning/codebase/ARCHITECTURE.md` and `STACK.md`
182
+ 2. Identify what the codebase already does
183
+ 3. These become the initial Validated set
184
+
185
+ ```markdown
186
+ ## Requirements
187
+
188
+ ### Validated
189
+
190
+ - ✓ [Existing capability 1] — existing
191
+ - ✓ [Existing capability 2] — existing
192
+ - ✓ [Existing capability 3] — existing
193
+
194
+ ### Active
195
+
196
+ - [ ] [New requirement 1]
197
+ - [ ] [New requirement 2]
198
+
199
+ ### Out of Scope
200
+
201
+ - [Exclusion 1] — [why]
202
+ ```
203
+
204
+ **Key Decisions:**
205
+
206
+ Initialize with any decisions made during questioning:
207
+
208
+ ```markdown
209
+ ## Key Decisions
210
+
211
+ | Decision | Rationale | Outcome |
212
+ |----------|-----------|---------|
213
+ | [Choice from questioning] | [Why] | — Pending |
214
+ ```
215
+
216
+ **Last updated footer:**
217
+
218
+ ```markdown
219
+ ---
220
+ *Last updated: [date] after initialization*
221
+ ```
222
+
223
+ Do not compress. Capture everything gathered.
224
+
225
+ **Commit PROJECT.md:**
226
+
227
+ ```bash
228
+ mkdir -p .planning
229
+ git add .planning/PROJECT.md
230
+ git commit -m "$(cat <<'EOF'
231
+ docs: initialize project
232
+
233
+ [One-liner from PROJECT.md What This Is section]
234
+ EOF
235
+ )"
236
+ ```
237
+
238
+ ## Phase 5: Workflow Preferences
239
+
240
+ Ask all workflow preferences in a single AskUserQuestion call (3 questions):
241
+
242
+ ```
243
+ questions: [
244
+ {
245
+ header: "Mode",
246
+ question: "How do you want to work?",
247
+ multiSelect: false,
248
+ options: [
249
+ { label: "YOLO (Recommended)", description: "Auto-approve, just execute" },
250
+ { label: "Interactive", description: "Confirm at each step" }
251
+ ]
252
+ },
253
+ {
254
+ header: "Depth",
255
+ question: "How thorough should planning be?",
256
+ multiSelect: false,
257
+ options: [
258
+ { label: "Quick", description: "Ship fast (3-5 phases, 1-3 plans each)" },
259
+ { label: "Standard", description: "Balanced scope and speed (5-8 phases, 3-5 plans each)" },
260
+ { label: "Comprehensive", description: "Thorough coverage (8-12 phases, 5-10 plans each)" }
261
+ ]
262
+ },
263
+ {
264
+ header: "Execution",
265
+ question: "Run plans in parallel?",
266
+ multiSelect: false,
267
+ options: [
268
+ { label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
269
+ { label: "Sequential", description: "One plan at a time" }
270
+ ]
271
+ }
272
+ ]
273
+ ```
274
+
275
+ Create `.planning/config.json` with chosen mode, depth, and parallelization.
276
+
277
+ **Commit config.json:**
278
+
279
+ ```bash
280
+ git add .planning/config.json
281
+ git commit -m "$(cat <<'EOF'
282
+ chore: add project config
283
+
284
+ Mode: [chosen mode]
285
+ Depth: [chosen depth]
286
+ Parallelization: [enabled/disabled]
287
+ EOF
288
+ )"
289
+ ```
290
+
291
+ ## Phase 6: Research Decision
292
+
293
+ Use AskUserQuestion:
294
+ - header: "Research"
295
+ - question: "Research the domain ecosystem before defining requirements?"
296
+ - options:
297
+ - "Research first (Recommended)" — Discover standard stacks, expected features, architecture patterns
298
+ - "Skip research" — I know this domain well, go straight to requirements
299
+
300
+ **If "Research first":**
301
+
302
+ Display stage banner:
303
+ ```
304
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
305
+ GSD ► RESEARCHING
306
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
307
+
308
+ Researching [domain] ecosystem...
309
+ ```
310
+
311
+ Create research directory:
312
+ ```bash
313
+ mkdir -p .planning/research
314
+ ```
315
+
316
+ **Determine milestone context:**
317
+
318
+ Check if this is greenfield or subsequent milestone:
319
+ - If no "Validated" requirements in PROJECT.md → Greenfield (building from scratch)
320
+ - If "Validated" requirements exist → Subsequent milestone (adding to existing app)
321
+
322
+ Display spawning indicator:
323
+ ```
324
+ ◆ Spawning 4 researchers in parallel...
325
+ → Stack research
326
+ → Features research
327
+ → Architecture research
328
+ → Pitfalls research
329
+ ```
330
+
331
+ Spawn 4 parallel gsd-project-researcher agents with rich context:
332
+
333
+ ```
334
+ Task(prompt="
335
+ <research_type>
336
+ Project Research — Stack dimension for [domain].
337
+ </research_type>
338
+
339
+ <milestone_context>
340
+ [greenfield OR subsequent]
341
+
342
+ Greenfield: Research the standard stack for building [domain] from scratch.
343
+ Subsequent: Research what's needed to add [target features] to an existing [domain] app. Don't re-research the existing system.
344
+ </milestone_context>
345
+
346
+ <question>
347
+ What's the standard 2025 stack for [domain]?
348
+ </question>
349
+
350
+ <project_context>
351
+ [PROJECT.md summary - core value, constraints, what they're building]
352
+ </project_context>
353
+
354
+ <downstream_consumer>
355
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
356
+ - Specific libraries with versions
357
+ - Clear rationale for each choice
358
+ - What NOT to use and why
359
+ </downstream_consumer>
360
+
361
+ <quality_gate>
362
+ - [ ] Versions are current (verify with Context7/official docs, not training data)
363
+ - [ ] Rationale explains WHY, not just WHAT
364
+ - [ ] Confidence levels assigned to each recommendation
365
+ </quality_gate>
366
+
367
+ <output>
368
+ Write to: .planning/research/STACK.md
369
+ Use template: ~/.claude/get-shit-done/templates/research-project/STACK.md
370
+ </output>
371
+ ", subagent_type="gsd-project-researcher", description="Stack research")
372
+
373
+ Task(prompt="
374
+ <research_type>
375
+ Project Research — Features dimension for [domain].
376
+ </research_type>
377
+
378
+ <milestone_context>
379
+ [greenfield OR subsequent]
380
+
381
+ Greenfield: What features do [domain] products have? What's table stakes vs differentiating?
382
+ Subsequent: How do [target features] typically work? What's expected behavior?
383
+ </milestone_context>
384
+
385
+ <question>
386
+ What features do [domain] products have? What's table stakes vs differentiating?
387
+ </question>
388
+
389
+ <project_context>
390
+ [PROJECT.md summary]
391
+ </project_context>
392
+
393
+ <downstream_consumer>
394
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
395
+ - Table stakes (must have or users leave)
396
+ - Differentiators (competitive advantage)
397
+ - Anti-features (things to deliberately NOT build)
398
+ </downstream_consumer>
399
+
400
+ <quality_gate>
401
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
402
+ - [ ] Complexity noted for each feature
403
+ - [ ] Dependencies between features identified
404
+ </quality_gate>
405
+
406
+ <output>
407
+ Write to: .planning/research/FEATURES.md
408
+ Use template: ~/.claude/get-shit-done/templates/research-project/FEATURES.md
409
+ </output>
410
+ ", subagent_type="gsd-project-researcher", description="Features research")
411
+
412
+ Task(prompt="
413
+ <research_type>
414
+ Project Research — Architecture dimension for [domain].
415
+ </research_type>
416
+
417
+ <milestone_context>
418
+ [greenfield OR subsequent]
419
+
420
+ Greenfield: How are [domain] systems typically structured? What are major components?
421
+ Subsequent: How do [target features] integrate with existing [domain] architecture?
422
+ </milestone_context>
423
+
424
+ <question>
425
+ How are [domain] systems typically structured? What are major components?
426
+ </question>
427
+
428
+ <project_context>
429
+ [PROJECT.md summary]
430
+ </project_context>
431
+
432
+ <downstream_consumer>
433
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
434
+ - Component boundaries (what talks to what)
435
+ - Data flow (how information moves)
436
+ - Suggested build order (dependencies between components)
437
+ </downstream_consumer>
438
+
439
+ <quality_gate>
440
+ - [ ] Components clearly defined with boundaries
441
+ - [ ] Data flow direction explicit
442
+ - [ ] Build order implications noted
443
+ </quality_gate>
444
+
445
+ <output>
446
+ Write to: .planning/research/ARCHITECTURE.md
447
+ Use template: ~/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md
448
+ </output>
449
+ ", subagent_type="gsd-project-researcher", description="Architecture research")
450
+
451
+ Task(prompt="
452
+ <research_type>
453
+ Project Research — Pitfalls dimension for [domain].
454
+ </research_type>
455
+
456
+ <milestone_context>
457
+ [greenfield OR subsequent]
458
+
459
+ Greenfield: What do [domain] projects commonly get wrong? Critical mistakes?
460
+ Subsequent: What are common mistakes when adding [target features] to [domain]?
461
+ </milestone_context>
462
+
463
+ <question>
464
+ What do [domain] projects commonly get wrong? Critical mistakes?
465
+ </question>
466
+
467
+ <project_context>
468
+ [PROJECT.md summary]
469
+ </project_context>
470
+
471
+ <downstream_consumer>
472
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
473
+ - Warning signs (how to detect early)
474
+ - Prevention strategy (how to avoid)
475
+ - Which phase should address it
476
+ </downstream_consumer>
477
+
478
+ <quality_gate>
479
+ - [ ] Pitfalls are specific to this domain (not generic advice)
480
+ - [ ] Prevention strategies are actionable
481
+ - [ ] Phase mapping included where relevant
482
+ </quality_gate>
483
+
484
+ <output>
485
+ Write to: .planning/research/PITFALLS.md
486
+ Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md
487
+ </output>
488
+ ", subagent_type="gsd-project-researcher", description="Pitfalls research")
489
+ ```
490
+
491
+ After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
492
+
493
+ ```
494
+ Task(prompt="
495
+ <task>
496
+ Synthesize research outputs into SUMMARY.md.
497
+ </task>
498
+
499
+ <research_files>
500
+ Read these files:
501
+ - .planning/research/STACK.md
502
+ - .planning/research/FEATURES.md
503
+ - .planning/research/ARCHITECTURE.md
504
+ - .planning/research/PITFALLS.md
505
+ </research_files>
506
+
507
+ <output>
508
+ Write to: .planning/research/SUMMARY.md
509
+ Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
510
+ Commit after writing.
511
+ </output>
512
+ ", subagent_type="gsd-research-synthesizer", description="Synthesize research")
513
+ ```
514
+
515
+ Display research complete banner and key findings:
516
+ ```
517
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
518
+ GSD ► RESEARCH COMPLETE ✓
519
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
520
+
521
+ ## Key Findings
522
+
523
+ **Stack:** [from SUMMARY.md]
524
+ **Table Stakes:** [from SUMMARY.md]
525
+ **Watch Out For:** [from SUMMARY.md]
526
+
527
+ Files: `.planning/research/`
528
+ ```
529
+
530
+ **If "Skip research":** Continue to Phase 7.
531
+
532
+ ## Phase 7: Define Requirements
533
+
534
+ Display stage banner:
535
+ ```
536
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
537
+ GSD ► DEFINING REQUIREMENTS
538
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
539
+ ```
540
+
541
+ **Load context:**
542
+
543
+ Read PROJECT.md and extract:
544
+ - Core value (the ONE thing that must work)
545
+ - Stated constraints (budget, timeline, tech limitations)
546
+ - Any explicit scope boundaries
547
+
548
+ **If research exists:** Read research/FEATURES.md and extract feature categories.
549
+
550
+ **Present features by category:**
551
+
552
+ ```
553
+ Here are the features for [domain]:
554
+
555
+ ## Authentication
556
+ **Table stakes:**
557
+ - Sign up with email/password
558
+ - Email verification
559
+ - Password reset
560
+ - Session management
561
+
562
+ **Differentiators:**
563
+ - Magic link login
564
+ - OAuth (Google, GitHub)
565
+ - 2FA
566
+
567
+ **Research notes:** [any relevant notes]
568
+
569
+ ---
570
+
571
+ ## [Next Category]
572
+ ...
573
+ ```
574
+
575
+ **If no research:** Gather requirements through conversation instead.
576
+
577
+ Ask: "What are the main things users need to be able to do?"
578
+
579
+ For each capability mentioned:
580
+ - Ask clarifying questions to make it specific
581
+ - Probe for related capabilities
582
+ - Group into categories
583
+
584
+ **Scope each category:**
585
+
586
+ For each category, use AskUserQuestion:
587
+
588
+ - header: "[Category name]"
589
+ - question: "Which [category] features are in v1?"
590
+ - multiSelect: true
591
+ - options:
592
+ - "[Feature 1]" — [brief description]
593
+ - "[Feature 2]" — [brief description]
594
+ - "[Feature 3]" — [brief description]
595
+ - "None for v1" — Defer entire category
596
+
597
+ Track responses:
598
+ - Selected features → v1 requirements
599
+ - Unselected table stakes → v2 (users expect these)
600
+ - Unselected differentiators → out of scope
601
+
602
+ **Identify gaps:**
603
+
604
+ Use AskUserQuestion:
605
+ - header: "Additions"
606
+ - question: "Any requirements research missed? (Features specific to your vision)"
607
+ - options:
608
+ - "No, research covered it" — Proceed
609
+ - "Yes, let me add some" — Capture additions
610
+
611
+ **Validate core value:**
612
+
613
+ Cross-check requirements against Core Value from PROJECT.md. If gaps detected, surface them.
614
+
615
+ **Generate REQUIREMENTS.md:**
616
+
617
+ Create `.planning/REQUIREMENTS.md` with:
618
+ - v1 Requirements grouped by category (checkboxes, REQ-IDs)
619
+ - v2 Requirements (deferred)
620
+ - Out of Scope (explicit exclusions with reasoning)
621
+ - Traceability section (empty, filled by roadmap)
622
+
623
+ **REQ-ID format:** `[CATEGORY]-[NUMBER]` (AUTH-01, CONTENT-02)
624
+
625
+ **Requirement quality criteria:**
626
+
627
+ Good requirements are:
628
+ - **Specific and testable:** "User can reset password via email link" (not "Handle password reset")
629
+ - **User-centric:** "User can X" (not "System does Y")
630
+ - **Atomic:** One capability per requirement (not "User can login and manage profile")
631
+ - **Independent:** Minimal dependencies on other requirements
632
+
633
+ Reject vague requirements. Push for specificity:
634
+ - "Handle authentication" → "User can log in with email/password and stay logged in across sessions"
635
+ - "Support sharing" → "User can share post via link that opens in recipient's browser"
636
+
637
+ **Present full requirements list:**
638
+
639
+ Show every requirement (not counts) for user confirmation:
640
+
641
+ ```
642
+ ## v1 Requirements
643
+
644
+ ### Authentication
645
+ - [ ] **AUTH-01**: User can create account with email/password
646
+ - [ ] **AUTH-02**: User can log in and stay logged in across sessions
647
+ - [ ] **AUTH-03**: User can log out from any page
648
+
649
+ ### Content
650
+ - [ ] **CONT-01**: User can create posts with text
651
+ - [ ] **CONT-02**: User can edit their own posts
652
+
653
+ [... full list ...]
654
+
655
+ ---
656
+
657
+ Does this capture what you're building? (yes / adjust)
658
+ ```
659
+
660
+ If "adjust": Return to scoping.
661
+
662
+ **Commit requirements:**
663
+
664
+ ```bash
665
+ git add .planning/REQUIREMENTS.md
666
+ git commit -m "$(cat <<'EOF'
667
+ docs: define v1 requirements
668
+
669
+ [X] requirements across [N] categories
670
+ [Y] requirements deferred to v2
671
+ EOF
672
+ )"
673
+ ```
674
+
675
+ ## Phase 8: Create Roadmap
676
+
677
+ Display stage banner:
678
+ ```
679
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
680
+ GSD ► CREATING ROADMAP
681
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
682
+
683
+ ◆ Spawning roadmapper...
684
+ ```
685
+
686
+ Spawn gsd-roadmapper agent with context:
687
+
688
+ ```
689
+ Task(prompt="
690
+ <planning_context>
691
+
692
+ **Project:**
693
+ @.planning/PROJECT.md
694
+
695
+ **Requirements:**
696
+ @.planning/REQUIREMENTS.md
697
+
698
+ **Research (if exists):**
699
+ @.planning/research/SUMMARY.md
700
+
701
+ **Config:**
702
+ @.planning/config.json
703
+
704
+ </planning_context>
705
+
706
+ <instructions>
707
+ Create roadmap:
708
+ 1. Derive phases from requirements (don't impose structure)
709
+ 2. Map every v1 requirement to exactly one phase
710
+ 3. Derive 2-5 success criteria per phase (observable user behaviors)
711
+ 4. Validate 100% coverage
712
+ 5. Write files immediately (ROADMAP.md, STATE.md, update REQUIREMENTS.md traceability)
713
+ 6. Return ROADMAP CREATED with summary
714
+
715
+ Write files first, then return. This ensures artifacts persist even if context is lost.
716
+ </instructions>
717
+ ", subagent_type="gsd-roadmapper", description="Create roadmap")
718
+ ```
719
+
720
+ **Handle roadmapper return:**
721
+
722
+ **If `## ROADMAP BLOCKED`:**
723
+ - Present blocker information
724
+ - Work with user to resolve
725
+ - Re-spawn when resolved
726
+
727
+ **If `## ROADMAP CREATED`:**
728
+
729
+ Read the created ROADMAP.md and present it nicely inline:
730
+
731
+ ```
732
+ ---
733
+
734
+ ## Proposed Roadmap
735
+
736
+ **[N] phases** | **[X] requirements mapped** | All v1 requirements covered ✓
737
+
738
+ | # | Phase | Goal | Requirements | Success Criteria |
739
+ |---|-------|------|--------------|------------------|
740
+ | 1 | [Name] | [Goal] | [REQ-IDs] | [count] |
741
+ | 2 | [Name] | [Goal] | [REQ-IDs] | [count] |
742
+ | 3 | [Name] | [Goal] | [REQ-IDs] | [count] |
743
+ ...
744
+
745
+ ### Phase Details
746
+
747
+ **Phase 1: [Name]**
748
+ Goal: [goal]
749
+ Requirements: [REQ-IDs]
750
+ Success criteria:
751
+ 1. [criterion]
752
+ 2. [criterion]
753
+ 3. [criterion]
754
+
755
+ **Phase 2: [Name]**
756
+ Goal: [goal]
757
+ Requirements: [REQ-IDs]
758
+ Success criteria:
759
+ 1. [criterion]
760
+ 2. [criterion]
761
+
762
+ [... continue for all phases ...]
763
+
764
+ ---
765
+ ```
766
+
767
+ **CRITICAL: Ask for approval before committing:**
768
+
769
+ Use AskUserQuestion:
770
+ - header: "Roadmap"
771
+ - question: "Does this roadmap structure work for you?"
772
+ - options:
773
+ - "Approve" — Commit and continue
774
+ - "Adjust phases" — Tell me what to change
775
+ - "Review full file" — Show raw ROADMAP.md
776
+
777
+ **If "Approve":** Continue to commit.
778
+
779
+ **If "Adjust phases":**
780
+ - Get user's adjustment notes
781
+ - Re-spawn roadmapper with revision context:
782
+ ```
783
+ Task(prompt="
784
+ <revision>
785
+ User feedback on roadmap:
786
+ [user's notes]
787
+
788
+ Current ROADMAP.md: @.planning/ROADMAP.md
789
+
790
+ Update the roadmap based on feedback. Edit files in place.
791
+ Return ROADMAP REVISED with changes made.
792
+ </revision>
793
+ ", subagent_type="gsd-roadmapper", description="Revise roadmap")
794
+ ```
795
+ - Present revised roadmap
796
+ - Loop until user approves
797
+
798
+ **If "Review full file":** Display raw `cat .planning/ROADMAP.md`, then re-ask.
799
+
800
+ **Commit roadmap (after approval):**
801
+
802
+ ```bash
803
+ git add .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
804
+ git commit -m "$(cat <<'EOF'
805
+ docs: create roadmap ([N] phases)
806
+
807
+ Phases:
808
+ 1. [phase-name]: [requirements covered]
809
+ 2. [phase-name]: [requirements covered]
810
+ ...
811
+
812
+ All v1 requirements mapped to phases.
813
+ EOF
814
+ )"
815
+ ```
816
+
817
+ ## Phase 10: Done
818
+
819
+ Present completion with next steps:
820
+
821
+ ```
822
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
823
+ GSD ► PROJECT INITIALIZED ✓
824
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
825
+
826
+ **[Project Name]**
827
+
828
+ | Artifact | Location |
829
+ |----------------|-----------------------------|
830
+ | Project | `.planning/PROJECT.md` |
831
+ | Config | `.planning/config.json` |
832
+ | Research | `.planning/research/` |
833
+ | Requirements | `.planning/REQUIREMENTS.md` |
834
+ | Roadmap | `.planning/ROADMAP.md` |
835
+
836
+ **[N] phases** | **[X] requirements** | Ready to build ✓
837
+
838
+ ───────────────────────────────────────────────────────────────
839
+
840
+ ## ▶ Next Up
841
+
842
+ **Phase 1: [Phase Name]** — [Goal from ROADMAP.md]
843
+
844
+ `/gsd:discuss-phase 1` — gather context and clarify approach
845
+
846
+ <sub>`/clear` first → fresh context window</sub>
847
+
848
+ ---
849
+
850
+ **Also available:**
851
+ - `/gsd:plan-phase 1` — skip discussion, plan directly
852
+
853
+ ───────────────────────────────────────────────────────────────
854
+ ```
855
+
856
+ </process>
857
+
858
+ <output>
859
+
860
+ - `.planning/PROJECT.md`
861
+ - `.planning/config.json`
862
+ - `.planning/research/` (if research selected)
863
+ - `STACK.md`
864
+ - `FEATURES.md`
865
+ - `ARCHITECTURE.md`
866
+ - `PITFALLS.md`
867
+ - `SUMMARY.md`
868
+ - `.planning/REQUIREMENTS.md`
869
+ - `.planning/ROADMAP.md`
870
+ - `.planning/STATE.md`
871
+
872
+ </output>
873
+
874
+ <success_criteria>
875
+
876
+ - [ ] .planning/ directory created
877
+ - [ ] Git repo initialized
878
+ - [ ] Brownfield detection completed
879
+ - [ ] Deep questioning completed (threads followed, not rushed)
880
+ - [ ] PROJECT.md captures full context → **committed**
881
+ - [ ] config.json has workflow mode, depth, parallelization → **committed**
882
+ - [ ] Research completed (if selected) — 4 parallel agents spawned → **committed**
883
+ - [ ] Requirements gathered (from research or conversation)
884
+ - [ ] User scoped each category (v1/v2/out of scope)
885
+ - [ ] REQUIREMENTS.md created with REQ-IDs → **committed**
886
+ - [ ] gsd-roadmapper spawned with context
887
+ - [ ] Roadmap files written immediately (not draft)
888
+ - [ ] User feedback incorporated (if any)
889
+ - [ ] ROADMAP.md created with phases, requirement mappings, success criteria
890
+ - [ ] STATE.md initialized
891
+ - [ ] REQUIREMENTS.md traceability updated
892
+ - [ ] User knows next step is `/gsd:discuss-phase 1`
893
+
894
+ **Atomic commits:** Each phase commits its artifacts immediately. If context is lost, artifacts persist.
895
+
896
+ </success_criteria>