get-shit-done-cc 1.8.0 → 1.9.1

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 (34) hide show
  1. package/README.md +104 -0
  2. package/agents/gsd-entity-generator.md +237 -0
  3. package/agents/gsd-executor.md +15 -0
  4. package/agents/gsd-planner.md +22 -0
  5. package/bin/install.js +78 -7
  6. package/commands/gsd/analyze-codebase.md +410 -0
  7. package/commands/gsd/audit-milestone.md +20 -1
  8. package/commands/gsd/debug.md +20 -0
  9. package/commands/gsd/execute-phase.md +37 -4
  10. package/commands/gsd/help.md +91 -0
  11. package/commands/gsd/new-milestone.md +27 -7
  12. package/commands/gsd/new-project.md +104 -11
  13. package/commands/gsd/plan-phase.md +84 -26
  14. package/commands/gsd/progress.md +2 -0
  15. package/commands/gsd/query-intel.md +128 -0
  16. package/commands/gsd/quick.md +23 -0
  17. package/commands/gsd/research-phase.md +20 -0
  18. package/commands/gsd/set-profile.md +106 -0
  19. package/commands/gsd/settings.md +136 -0
  20. package/get-shit-done/references/model-profiles.md +73 -0
  21. package/get-shit-done/templates/config.json +5 -0
  22. package/get-shit-done/templates/entity.md +173 -0
  23. package/get-shit-done/workflows/execute-phase.md +45 -9
  24. package/get-shit-done/workflows/execute-plan.md +165 -4
  25. package/get-shit-done/workflows/map-codebase.md +24 -2
  26. package/get-shit-done/workflows/verify-work.md +22 -0
  27. package/hooks/dist/gsd-intel-index.js +97 -0
  28. package/hooks/dist/gsd-intel-prune.js +78 -0
  29. package/hooks/dist/gsd-intel-session.js +39 -0
  30. package/hooks/dist/statusline.js +84 -0
  31. package/package.json +12 -2
  32. package/scripts/build-hooks.js +95 -0
  33. /package/hooks/{gsd-check-update.js → dist/gsd-check-update.js} +0 -0
  34. /package/hooks/{statusline.js → dist/gsd-statusline.js} +0 -0
@@ -122,6 +122,26 @@ git add .planning/PROJECT.md .planning/STATE.md
122
122
  git commit -m "docs: start milestone v[X.Y] [Name]"
123
123
  ```
124
124
 
125
+ ## Phase 6.5: Resolve Model Profile
126
+
127
+ Read model profile for agent spawning:
128
+
129
+ ```bash
130
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
131
+ ```
132
+
133
+ Default to "balanced" if not set.
134
+
135
+ **Model lookup table:**
136
+
137
+ | Agent | quality | balanced | budget |
138
+ |-------|---------|----------|--------|
139
+ | gsd-project-researcher | opus | sonnet | haiku |
140
+ | gsd-research-synthesizer | sonnet | sonnet | haiku |
141
+ | gsd-roadmapper | opus | sonnet | sonnet |
142
+
143
+ Store resolved models for use in Task calls below.
144
+
125
145
  ## Phase 7: Research Decision
126
146
 
127
147
  Use AskUserQuestion:
@@ -198,7 +218,7 @@ Your STACK.md feeds into roadmap creation. Be prescriptive:
198
218
  Write to: .planning/research/STACK.md
199
219
  Use template: ~/.claude/get-shit-done/templates/research-project/STACK.md
200
220
  </output>
201
- ", subagent_type="gsd-project-researcher", description="Stack research")
221
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
202
222
 
203
223
  Task(prompt="
204
224
  <research_type>
@@ -239,7 +259,7 @@ Your FEATURES.md feeds into requirements definition. Categorize clearly:
239
259
  Write to: .planning/research/FEATURES.md
240
260
  Use template: ~/.claude/get-shit-done/templates/research-project/FEATURES.md
241
261
  </output>
242
- ", subagent_type="gsd-project-researcher", description="Features research")
262
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
243
263
 
244
264
  Task(prompt="
245
265
  <research_type>
@@ -281,7 +301,7 @@ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
281
301
  Write to: .planning/research/ARCHITECTURE.md
282
302
  Use template: ~/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md
283
303
  </output>
284
- ", subagent_type="gsd-project-researcher", description="Architecture research")
304
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
285
305
 
286
306
  Task(prompt="
287
307
  <research_type>
@@ -319,7 +339,7 @@ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
319
339
  Write to: .planning/research/PITFALLS.md
320
340
  Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md
321
341
  </output>
322
- ", subagent_type="gsd-project-researcher", description="Pitfalls research")
342
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
323
343
  ```
324
344
 
325
345
  After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
@@ -343,7 +363,7 @@ Write to: .planning/research/SUMMARY.md
343
363
  Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
344
364
  Commit after writing.
345
365
  </output>
346
- ", subagent_type="gsd-research-synthesizer", description="Synthesize research")
366
+ ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
347
367
  ```
348
368
 
349
369
  Display research complete banner and key findings:
@@ -548,7 +568,7 @@ Create roadmap for milestone v[X.Y]:
548
568
 
549
569
  Write files first, then return. This ensures artifacts persist even if context is lost.
550
570
  </instructions>
551
- ", subagent_type="gsd-roadmapper", description="Create roadmap")
571
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
552
572
  ```
553
573
 
554
574
  **Handle roadmapper return:**
@@ -615,7 +635,7 @@ Use AskUserQuestion:
615
635
  Update the roadmap based on feedback. Edit files in place.
616
636
  Return ROADMAP REVISED with changes made.
617
637
  </revision>
618
- ", subagent_type="gsd-roadmapper", description="Revise roadmap")
638
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
619
639
  ```
620
640
  - Present revised roadmap
621
641
  - Loop until user approves
@@ -19,6 +19,7 @@ This is the most leveraged moment in any project. Deep questioning here means be
19
19
  - `.planning/PROJECT.md` — project context
20
20
  - `.planning/config.json` — workflow preferences
21
21
  - `.planning/research/` — domain research (optional)
22
+ - `.planning/intel/` — codebase intelligence (auto-populated by hooks)
22
23
  - `.planning/REQUIREMENTS.md` — scoped requirements
23
24
  - `.planning/ROADMAP.md` — phase structure
24
25
  - `.planning/STATE.md` — project memory
@@ -57,7 +58,14 @@ This is the most leveraged moment in any project. Deep questioning here means be
57
58
  fi
58
59
  ```
59
60
 
60
- 3. **Detect existing code (brownfield detection):**
61
+ 3. **Create intel directory for codebase intelligence:**
62
+ ```bash
63
+ mkdir -p .planning/intel
64
+ ```
65
+
66
+ This prepares the directory for the PostToolUse hook to populate with index.json, conventions.json, and summary.md as Claude writes code.
67
+
68
+ 4. **Detect existing code (brownfield detection):**
61
69
  ```bash
62
70
  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
71
  HAS_PACKAGE=$([ -f package.json ] || [ -f requirements.txt ] || [ -f Cargo.toml ] || [ -f go.mod ] || [ -f Package.swift ] && echo "yes")
@@ -237,7 +245,7 @@ EOF
237
245
 
238
246
  ## Phase 5: Workflow Preferences
239
247
 
240
- Ask all workflow preferences in a single AskUserQuestion call (4 questions):
248
+ **Round 1 Core workflow settings (4 questions):**
241
249
 
242
250
  ```
243
251
  questions: [
@@ -281,12 +289,73 @@ questions: [
281
289
  ]
282
290
  ```
283
291
 
284
- Create `.planning/config.json` with chosen mode, depth, parallelization, and commit_docs setting.
292
+ **Round 2 Workflow agents:**
293
+
294
+ These spawn additional agents during planning/execution. They add tokens and time but improve quality.
295
+
296
+ | Agent | When it runs | What it does |
297
+ |-------|--------------|--------------|
298
+ | **Researcher** | Before planning each phase | Investigates domain, finds patterns, surfaces gotchas |
299
+ | **Plan Checker** | After plan is created | Verifies plan actually achieves the phase goal |
300
+ | **Verifier** | After phase execution | Confirms must-haves were delivered |
301
+
302
+ All recommended for important projects. Skip for quick experiments.
303
+
304
+ ```
305
+ questions: [
306
+ {
307
+ header: "Research",
308
+ question: "Spawn Plan Researcher? (researches domain before planning — adds tokens/time)",
309
+ multiSelect: false,
310
+ options: [
311
+ { label: "Yes (Recommended)", description: "Research phase goals before planning" },
312
+ { label: "No", description: "Skip research, plan directly" }
313
+ ]
314
+ },
315
+ {
316
+ header: "Plan Check",
317
+ question: "Spawn Plan Checker? (verifies plans before execution — adds tokens/time)",
318
+ multiSelect: false,
319
+ options: [
320
+ { label: "Yes (Recommended)", description: "Verify plans meet phase goals" },
321
+ { label: "No", description: "Skip plan verification" }
322
+ ]
323
+ },
324
+ {
325
+ header: "Verifier",
326
+ question: "Spawn Execution Verifier? (verifies phase completion — adds tokens/time)",
327
+ multiSelect: false,
328
+ options: [
329
+ { label: "Yes (Recommended)", description: "Verify must-haves after execution" },
330
+ { label: "No", description: "Skip post-execution verification" }
331
+ ]
332
+ }
333
+ ]
334
+ ```
335
+
336
+ Create `.planning/config.json` with all settings:
337
+
338
+ ```json
339
+ {
340
+ "mode": "yolo|interactive",
341
+ "depth": "quick|standard|comprehensive",
342
+ "parallelization": true|false,
343
+ "commit_docs": true|false,
344
+ "workflow": {
345
+ "research": true|false,
346
+ "plan_check": true|false,
347
+ "verifier": true|false
348
+ }
349
+ }
350
+ ```
285
351
 
286
352
  **If commit_docs = No:**
287
- - Set `planning.commit_docs: false` in config.json
353
+ - Set `commit_docs: false` in config.json
288
354
  - Add `.planning/` to `.gitignore` (create if needed)
289
355
 
356
+ **If commit_docs = Yes:**
357
+ - Add `.planning/intel/` to `.gitignore` (intel is always local — changes constantly, can be regenerated)
358
+
290
359
  **Commit config.json:**
291
360
 
292
361
  ```bash
@@ -297,10 +366,33 @@ chore: add project config
297
366
  Mode: [chosen mode]
298
367
  Depth: [chosen depth]
299
368
  Parallelization: [enabled/disabled]
369
+ Workflow agents: research=[on/off], plan_check=[on/off], verifier=[on/off]
300
370
  EOF
301
371
  )"
302
372
  ```
303
373
 
374
+ **Note:** Run `/gsd:settings` anytime to update these preferences.
375
+
376
+ ## Phase 5.5: Resolve Model Profile
377
+
378
+ Read model profile for agent spawning:
379
+
380
+ ```bash
381
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
382
+ ```
383
+
384
+ Default to "balanced" if not set.
385
+
386
+ **Model lookup table:**
387
+
388
+ | Agent | quality | balanced | budget |
389
+ |-------|---------|----------|--------|
390
+ | gsd-project-researcher | opus | sonnet | haiku |
391
+ | gsd-research-synthesizer | sonnet | sonnet | haiku |
392
+ | gsd-roadmapper | opus | sonnet | sonnet |
393
+
394
+ Store resolved models for use in Task calls below.
395
+
304
396
  ## Phase 6: Research Decision
305
397
 
306
398
  Use AskUserQuestion:
@@ -381,7 +473,7 @@ Your STACK.md feeds into roadmap creation. Be prescriptive:
381
473
  Write to: .planning/research/STACK.md
382
474
  Use template: ~/.claude/get-shit-done/templates/research-project/STACK.md
383
475
  </output>
384
- ", subagent_type="gsd-project-researcher", description="Stack research")
476
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Stack research")
385
477
 
386
478
  Task(prompt="
387
479
  <research_type>
@@ -420,7 +512,7 @@ Your FEATURES.md feeds into requirements definition. Categorize clearly:
420
512
  Write to: .planning/research/FEATURES.md
421
513
  Use template: ~/.claude/get-shit-done/templates/research-project/FEATURES.md
422
514
  </output>
423
- ", subagent_type="gsd-project-researcher", description="Features research")
515
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Features research")
424
516
 
425
517
  Task(prompt="
426
518
  <research_type>
@@ -459,7 +551,7 @@ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
459
551
  Write to: .planning/research/ARCHITECTURE.md
460
552
  Use template: ~/.claude/get-shit-done/templates/research-project/ARCHITECTURE.md
461
553
  </output>
462
- ", subagent_type="gsd-project-researcher", description="Architecture research")
554
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Architecture research")
463
555
 
464
556
  Task(prompt="
465
557
  <research_type>
@@ -498,7 +590,7 @@ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
498
590
  Write to: .planning/research/PITFALLS.md
499
591
  Use template: ~/.claude/get-shit-done/templates/research-project/PITFALLS.md
500
592
  </output>
501
- ", subagent_type="gsd-project-researcher", description="Pitfalls research")
593
+ ", subagent_type="gsd-project-researcher", model="{researcher_model}", description="Pitfalls research")
502
594
  ```
503
595
 
504
596
  After all 4 agents complete, spawn synthesizer to create SUMMARY.md:
@@ -522,7 +614,7 @@ Write to: .planning/research/SUMMARY.md
522
614
  Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
523
615
  Commit after writing.
524
616
  </output>
525
- ", subagent_type="gsd-research-synthesizer", description="Synthesize research")
617
+ ", subagent_type="gsd-research-synthesizer", model="{synthesizer_model}", description="Synthesize research")
526
618
  ```
527
619
 
528
620
  Display research complete banner and key findings:
@@ -727,7 +819,7 @@ Create roadmap:
727
819
 
728
820
  Write files first, then return. This ensures artifacts persist even if context is lost.
729
821
  </instructions>
730
- ", subagent_type="gsd-roadmapper", description="Create roadmap")
822
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Create roadmap")
731
823
  ```
732
824
 
733
825
  **Handle roadmapper return:**
@@ -803,7 +895,7 @@ Use AskUserQuestion:
803
895
  Update the roadmap based on feedback. Edit files in place.
804
896
  Return ROADMAP REVISED with changes made.
805
897
  </revision>
806
- ", subagent_type="gsd-roadmapper", description="Revise roadmap")
898
+ ", subagent_type="gsd-roadmapper", model="{roadmapper_model}", description="Revise roadmap")
807
899
  ```
808
900
  - Present revised roadmap
809
901
  - Loop until user approves
@@ -878,6 +970,7 @@ Present completion with next steps:
878
970
  - `ARCHITECTURE.md`
879
971
  - `PITFALLS.md`
880
972
  - `SUMMARY.md`
973
+ - `.planning/intel/` (created empty, populated by hooks during coding)
881
974
  - `.planning/REQUIREMENTS.md`
882
975
  - `.planning/ROADMAP.md`
883
976
  - `.planning/STATE.md`
@@ -42,7 +42,7 @@ Normalize phase input in step 2 before any directory lookups.
42
42
 
43
43
  <process>
44
44
 
45
- ## 1. Validate Environment
45
+ ## 1. Validate Environment and Resolve Model Profile
46
46
 
47
47
  ```bash
48
48
  ls .planning/ 2>/dev/null
@@ -50,6 +50,24 @@ ls .planning/ 2>/dev/null
50
50
 
51
51
  **If not found:** Error - user should run `/gsd:new-project` first.
52
52
 
53
+ **Resolve model profile for agent spawning:**
54
+
55
+ ```bash
56
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
57
+ ```
58
+
59
+ Default to "balanced" if not set.
60
+
61
+ **Model lookup table:**
62
+
63
+ | Agent | quality | balanced | budget |
64
+ |-------|---------|----------|--------|
65
+ | gsd-phase-researcher | opus | sonnet | haiku |
66
+ | gsd-planner | opus | opus | sonnet |
67
+ | gsd-plan-checker | sonnet | sonnet | haiku |
68
+
69
+ Store resolved models for use in Task calls below.
70
+
53
71
  ## 2. Parse and Normalize Arguments
54
72
 
55
73
  Extract from $ARGUMENTS:
@@ -107,6 +125,14 @@ fi
107
125
 
108
126
  **If `--skip-research` flag:** Skip to step 6.
109
127
 
128
+ **Check config for research setting:**
129
+
130
+ ```bash
131
+ WORKFLOW_RESEARCH=$(cat .planning/config.json 2>/dev/null | grep -o '"research"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
132
+ ```
133
+
134
+ **If `workflow.research` is `false` AND `--research` flag NOT set:** Skip to step 6.
135
+
110
136
  **Otherwise:**
111
137
 
112
138
  Check for existing research:
@@ -182,6 +208,7 @@ Write research findings to: {phase_dir}/{phase}-RESEARCH.md
182
208
  Task(
183
209
  prompt=research_prompt,
184
210
  subagent_type="gsd-phase-researcher",
211
+ model="{researcher_model}",
185
212
  description="Research Phase {phase}"
186
213
  )
187
214
  ```
@@ -205,21 +232,26 @@ ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
205
232
 
206
233
  **If exists:** Offer: 1) Continue planning (add more plans), 2) View existing, 3) Replan from scratch. Wait for response.
207
234
 
208
- ## 7. Gather Context Paths
235
+ ## 7. Read Context Files
209
236
 
210
- Identify context files for the planner agent:
237
+ Read and store context file contents for the planner agent. The `@` syntax does not work across Task() boundaries - content must be inlined.
211
238
 
212
239
  ```bash
213
- # Required
214
- STATE=.planning/STATE.md
215
- ROADMAP=.planning/ROADMAP.md
216
- REQUIREMENTS=.planning/REQUIREMENTS.md
217
-
218
- # Optional (created by earlier steps or commands)
219
- CONTEXT="${PHASE_DIR}/${PHASE}-CONTEXT.md"
220
- RESEARCH="${PHASE_DIR}/${PHASE}-RESEARCH.md"
221
- VERIFICATION="${PHASE_DIR}/${PHASE}-VERIFICATION.md"
222
- UAT="${PHASE_DIR}/${PHASE}-UAT.md"
240
+ # Read required files
241
+ STATE_CONTENT=$(cat .planning/STATE.md)
242
+ ROADMAP_CONTENT=$(cat .planning/ROADMAP.md)
243
+
244
+ # Read optional files (empty string if missing)
245
+ REQUIREMENTS_CONTENT=$(cat .planning/REQUIREMENTS.md 2>/dev/null)
246
+ CONTEXT_CONTENT=$(cat "${PHASE_DIR}"/*-CONTEXT.md 2>/dev/null)
247
+ RESEARCH_CONTENT=$(cat "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null)
248
+
249
+ # Gap closure files (only if --gaps mode)
250
+ VERIFICATION_CONTENT=$(cat "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null)
251
+ UAT_CONTENT=$(cat "${PHASE_DIR}"/*-UAT.md 2>/dev/null)
252
+
253
+ # Codebase intelligence (if exists)
254
+ INTEL_CONTENT=$(cat .planning/intel/summary.md 2>/dev/null)
223
255
  ```
224
256
 
225
257
  ## 8. Spawn gsd-planner Agent
@@ -233,7 +265,7 @@ Display stage banner:
233
265
  ◆ Spawning planner...
234
266
  ```
235
267
 
236
- Fill prompt and spawn:
268
+ Fill prompt with inlined content and spawn:
237
269
 
238
270
  ```markdown
239
271
  <planning_context>
@@ -242,23 +274,28 @@ Fill prompt and spawn:
242
274
  **Mode:** {standard | gap_closure}
243
275
 
244
276
  **Project State:**
245
- @.planning/STATE.md
277
+ {state_content}
246
278
 
247
279
  **Roadmap:**
248
- @.planning/ROADMAP.md
280
+ {roadmap_content}
249
281
 
250
282
  **Requirements (if exists):**
251
- @.planning/REQUIREMENTS.md
283
+ {requirements_content}
252
284
 
253
285
  **Phase Context (if exists):**
254
- @.planning/phases/{phase_dir}/{phase}-CONTEXT.md
286
+ {context_content}
255
287
 
256
288
  **Research (if exists):**
257
- @.planning/phases/{phase_dir}/{phase}-RESEARCH.md
289
+ {research_content}
258
290
 
259
291
  **Gap Closure (if --gaps mode):**
260
- @.planning/phases/{phase_dir}/{phase}-VERIFICATION.md
261
- @.planning/phases/{phase_dir}/{phase}-UAT.md
292
+ {verification_content}
293
+ {uat_content}
294
+
295
+ **Codebase Intel (if exists):**
296
+ <codebase-intel>
297
+ {intel_content}
298
+ </codebase-intel>
262
299
 
263
300
  </planning_context>
264
301
 
@@ -288,6 +325,7 @@ Before returning PLANNING COMPLETE:
288
325
  Task(
289
326
  prompt=filled_prompt,
290
327
  subagent_type="gsd-planner",
328
+ model="{planner_model}",
291
329
  description="Plan Phase {phase}"
292
330
  )
293
331
  ```
@@ -299,6 +337,8 @@ Parse planner output:
299
337
  **`## PLANNING COMPLETE`:**
300
338
  - Display: `Planner created {N} plan(s). Files on disk.`
301
339
  - If `--skip-verify`: Skip to step 13
340
+ - Check config: `WORKFLOW_PLAN_CHECK=$(cat .planning/config.json 2>/dev/null | grep -o '"plan_check"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
341
+ - If `workflow.plan_check` is `false`: Skip to step 13
302
342
  - Otherwise: Proceed to step 10
303
343
 
304
344
  **`## CHECKPOINT REACHED`:**
@@ -320,7 +360,17 @@ Display:
320
360
  ◆ Spawning plan checker...
321
361
  ```
322
362
 
323
- Fill checker prompt and spawn:
363
+ Read plans and requirements for the checker:
364
+
365
+ ```bash
366
+ # Read all plans in phase directory
367
+ PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
368
+
369
+ # Read requirements (reuse from step 7 if available)
370
+ REQUIREMENTS_CONTENT=$(cat .planning/REQUIREMENTS.md 2>/dev/null)
371
+ ```
372
+
373
+ Fill checker prompt with inlined content and spawn:
324
374
 
325
375
  ```markdown
326
376
  <verification_context>
@@ -329,10 +379,10 @@ Fill checker prompt and spawn:
329
379
  **Phase Goal:** {goal from ROADMAP}
330
380
 
331
381
  **Plans to verify:**
332
- @.planning/phases/{phase_dir}/*-PLAN.md
382
+ {plans_content}
333
383
 
334
384
  **Requirements (if exists):**
335
- @.planning/REQUIREMENTS.md
385
+ {requirements_content}
336
386
 
337
387
  </verification_context>
338
388
 
@@ -347,6 +397,7 @@ Return one of:
347
397
  Task(
348
398
  prompt=checker_prompt,
349
399
  subagent_type="gsd-plan-checker",
400
+ model="{checker_model}",
350
401
  description="Verify Phase {phase} plans"
351
402
  )
352
403
  ```
@@ -371,6 +422,12 @@ Track: `iteration_count` (starts at 1 after initial plan + check)
371
422
 
372
423
  Display: `Sending back to planner for revision... (iteration {N}/3)`
373
424
 
425
+ Read current plans for revision context:
426
+
427
+ ```bash
428
+ PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
429
+ ```
430
+
374
431
  Spawn gsd-planner with revision prompt:
375
432
 
376
433
  ```markdown
@@ -380,7 +437,7 @@ Spawn gsd-planner with revision prompt:
380
437
  **Mode:** revision
381
438
 
382
439
  **Existing plans:**
383
- @.planning/phases/{phase_dir}/*-PLAN.md
440
+ {plans_content}
384
441
 
385
442
  **Checker issues:**
386
443
  {structured_issues_from_checker}
@@ -388,7 +445,7 @@ Spawn gsd-planner with revision prompt:
388
445
  </revision_context>
389
446
 
390
447
  <instructions>
391
- Read existing PLAN.md files. Make targeted updates to address checker issues.
448
+ Make targeted updates to address checker issues.
392
449
  Do NOT replan from scratch unless issues are fundamental.
393
450
  Return what changed.
394
451
  </instructions>
@@ -398,6 +455,7 @@ Return what changed.
398
455
  Task(
399
456
  prompt=revision_prompt,
400
457
  subagent_type="gsd-planner",
458
+ model="{planner_model}",
401
459
  description="Revise Phase {phase} plans"
402
460
  )
403
461
  ```
@@ -52,6 +52,7 @@ If missing both ROADMAP.md and PROJECT.md: suggest `/gsd:new-project`.
52
52
  - Read `.planning/STATE.md` for living memory (position, decisions, issues)
53
53
  - Read `.planning/ROADMAP.md` for phase structure and objectives
54
54
  - Read `.planning/PROJECT.md` for current state (What This Is, Core Value, Requirements)
55
+ - Read `.planning/config.json` for settings (model_profile, workflow toggles)
55
56
  </step>
56
57
 
57
58
  <step name="recent">
@@ -80,6 +81,7 @@ If missing both ROADMAP.md and PROJECT.md: suggest `/gsd:new-project`.
80
81
  # [Project Name]
81
82
 
82
83
  **Progress:** [████████░░] 8/10 plans complete
84
+ **Profile:** [quality/balanced/budget]
83
85
 
84
86
  ## Recent Work
85
87
  - [Phase X, Plan Y]: [what was accomplished - 1 line]
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: gsd:query-intel
3
+ description: Query codebase intelligence graph for dependencies and hotspots
4
+ argument-hint: "<dependents|hotspots> [file-path]"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+
9
+ <objective>
10
+ Query the codebase intelligence graph database for relationship information.
11
+
12
+ **Query types:**
13
+ - `dependents <file>` — What files depend on this file? (blast radius)
14
+ - `hotspots` — Which files have the most dependents? (change carefully)
15
+
16
+ Output: Formatted query results from graph.db
17
+ </objective>
18
+
19
+ <context>
20
+ This command exposes the graph query capabilities built by Phase 4 (Semantic Intelligence).
21
+
22
+ **Use for:**
23
+ - Checking blast radius before refactoring a core file
24
+ - Identifying high-impact files that need careful changes
25
+ - Understanding dependency relationships in the codebase
26
+
27
+ **Requires:** `.planning/intel/graph.db` (created by `/gsd:analyze-codebase` with entity generation)
28
+
29
+ If graph.db doesn't exist, the command will return an error suggesting to run analyze-codebase first.
30
+ </context>
31
+
32
+ <process>
33
+
34
+ ## Step 1: Parse arguments
35
+
36
+ Extract query type and optional file path from arguments.
37
+
38
+ **Arguments:** $ARGUMENTS
39
+
40
+ **Expected formats:**
41
+ - `dependents src/lib/db.ts` — query what depends on this file
42
+ - `hotspots` — query most-depended-on files
43
+ - `hotspots 10` — query top 10 hotspots (default: 5)
44
+
45
+ ## Step 2: Convert file path to entity ID
46
+
47
+ For `dependents` queries, convert the file path to entity ID format:
48
+ - `src/lib/db.ts` → `src-lib-db`
49
+ - Replace `/` with `-`, remove extension
50
+
51
+ ```bash
52
+ # Example conversion
53
+ FILE_PATH="src/lib/db.ts"
54
+ ENTITY_ID=$(echo "$FILE_PATH" | sed 's/\.[^.]*$//' | tr '/' '-')
55
+ ```
56
+
57
+ ## Step 3: Execute query
58
+
59
+ Run the appropriate query against the graph database:
60
+
61
+ **For dependents:**
62
+ ```bash
63
+ echo '{"action":"query","type":"dependents","target":"'$ENTITY_ID'","limit":20}' | node hooks/gsd-intel-index.js
64
+ ```
65
+
66
+ **For hotspots:**
67
+ ```bash
68
+ echo '{"action":"query","type":"hotspots","limit":5}' | node hooks/gsd-intel-index.js
69
+ ```
70
+
71
+ ## Step 4: Format and present results
72
+
73
+ Parse the JSON response and present in readable format.
74
+
75
+ **For dependents:**
76
+ ```
77
+ ## Files that depend on {file-path}
78
+
79
+ Found {count} dependents:
80
+
81
+ 1. src/api/users.ts
82
+ 2. src/api/auth.ts
83
+ 3. src/services/payment.ts
84
+ ...
85
+
86
+ **Blast radius:** {count} files would be affected by changes.
87
+ ```
88
+
89
+ **For hotspots:**
90
+ ```
91
+ ## Dependency Hotspots
92
+
93
+ These files have the most dependents — change carefully:
94
+
95
+ | Rank | File | Dependents |
96
+ |------|------|------------|
97
+ | 1 | src/lib/db.ts | 42 |
98
+ | 2 | src/types/user.ts | 35 |
99
+ | 3 | src/utils/format.ts | 28 |
100
+ ```
101
+
102
+ ## Step 5: Handle errors
103
+
104
+ **If graph.db doesn't exist:**
105
+ ```
106
+ No graph database found at .planning/intel/graph.db
107
+
108
+ Run /gsd:analyze-codebase first to build the dependency graph.
109
+ ```
110
+
111
+ **If entity not found:**
112
+ ```
113
+ No entity found for: {file-path}
114
+
115
+ The file may not be indexed yet. Try:
116
+ - /gsd:analyze-codebase to rebuild the index
117
+ - Check the file path is correct
118
+ ```
119
+
120
+ </process>
121
+
122
+ <success_criteria>
123
+ - [ ] Query type parsed from arguments
124
+ - [ ] File path converted to entity ID (for dependents)
125
+ - [ ] Query executed against graph.db
126
+ - [ ] Results formatted in readable markdown
127
+ - [ ] Errors handled gracefully with helpful messages
128
+ </success_criteria>