get-shit-done-cc 1.7.1 → 1.9.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 (44) hide show
  1. package/README.md +104 -0
  2. package/agents/gsd-debugger.md +20 -1
  3. package/agents/gsd-executor.md +30 -0
  4. package/agents/gsd-phase-researcher.md +9 -0
  5. package/agents/gsd-planner.md +41 -0
  6. package/agents/gsd-research-synthesizer.md +9 -0
  7. package/bin/install.js +78 -7
  8. package/commands/gsd/add-todo.md +11 -0
  9. package/commands/gsd/analyze-codebase.md +363 -0
  10. package/commands/gsd/audit-milestone.md +20 -1
  11. package/commands/gsd/check-todos.md +11 -0
  12. package/commands/gsd/debug.md +20 -0
  13. package/commands/gsd/execute-phase.md +40 -5
  14. package/commands/gsd/help.md +118 -0
  15. package/commands/gsd/new-milestone.md +267 -263
  16. package/commands/gsd/new-project.md +116 -10
  17. package/commands/gsd/pause-work.md +11 -0
  18. package/commands/gsd/plan-milestone-gaps.md +11 -0
  19. package/commands/gsd/plan-phase.md +84 -26
  20. package/commands/gsd/progress.md +8 -0
  21. package/commands/gsd/query-intel.md +128 -0
  22. package/commands/gsd/quick.md +23 -0
  23. package/commands/gsd/remove-phase.md +11 -0
  24. package/commands/gsd/research-phase.md +20 -0
  25. package/commands/gsd/set-profile.md +106 -0
  26. package/commands/gsd/settings.md +136 -0
  27. package/get-shit-done/references/model-profiles.md +73 -0
  28. package/get-shit-done/references/planning-config.md +94 -0
  29. package/get-shit-done/templates/config.json +9 -0
  30. package/get-shit-done/templates/entity.md +173 -0
  31. package/get-shit-done/workflows/complete-milestone.md +11 -0
  32. package/get-shit-done/workflows/diagnose-issues.md +11 -0
  33. package/get-shit-done/workflows/discuss-phase.md +11 -0
  34. package/get-shit-done/workflows/execute-phase.md +68 -9
  35. package/get-shit-done/workflows/execute-plan.md +188 -4
  36. package/get-shit-done/workflows/map-codebase.md +35 -2
  37. package/get-shit-done/workflows/verify-work.md +33 -0
  38. package/hooks/dist/gsd-intel-index.js +97 -0
  39. package/hooks/dist/gsd-intel-prune.js +78 -0
  40. package/hooks/dist/gsd-intel-session.js +39 -0
  41. package/package.json +12 -2
  42. package/scripts/build-hooks.js +95 -0
  43. /package/hooks/{gsd-check-update.js → dist/gsd-check-update.js} +0 -0
  44. /package/hooks/{statusline.js → dist/statusline.js} +0 -0
package/README.md CHANGED
@@ -324,6 +324,50 @@ Use for: bug fixes, small features, config changes, one-off tasks.
324
324
 
325
325
  ## Why It Works
326
326
 
327
+ ### Codebase Intelligence
328
+
329
+ GSD learns your codebase patterns automatically. As Claude writes code, a PostToolUse hook indexes exports and imports, detects naming conventions, and builds a semantic understanding of your codebase.
330
+
331
+ **How it works:**
332
+
333
+ 1. **Automatic learning** — Every time Claude writes or edits a JS/TS file, the hook extracts exports/imports and updates `.planning/intel/index.json`
334
+ 2. **Convention detection** — Analyzes exports for naming patterns (camelCase, PascalCase, etc.), identifies directory purposes, detects file suffixes
335
+ 3. **Graph database** — Stores entity relationships in SQLite for dependency analysis
336
+ 4. **Context injection** — At session start, injects a summary into Claude's context so it knows your codebase structure and conventions
337
+
338
+ **For existing codebases:**
339
+
340
+ ```
341
+ /gsd:analyze-codebase
342
+ ```
343
+
344
+ Performs a bulk scan of your codebase to bootstrap the intelligence layer. Works standalone — no `/gsd:new-project` required. After initial analysis, hooks continue incremental learning.
345
+
346
+ **Query the graph:**
347
+
348
+ ```
349
+ /gsd:query-intel dependents src/lib/db.ts # What depends on this file?
350
+ /gsd:query-intel hotspots # Most-depended-on files
351
+ ```
352
+
353
+ **Files created:**
354
+
355
+ | File | Purpose |
356
+ |------|---------|
357
+ | `.planning/intel/index.json` | File exports and imports index |
358
+ | `.planning/intel/conventions.json` | Detected patterns (naming, directories, suffixes) |
359
+ | `.planning/intel/graph.db` | SQLite database with entity relationships |
360
+ | `.planning/intel/summary.md` | Concise context for session injection |
361
+
362
+ **Benefits:**
363
+
364
+ - Claude follows your naming conventions automatically
365
+ - New files go in the right directories
366
+ - Consistency maintained across sessions
367
+ - Query blast radius before refactoring
368
+ - Identify high-impact hotspot files
369
+ - No manual documentation of patterns needed
370
+
327
371
  ### Context Engineering
328
372
 
329
373
  Claude Code is incredibly powerful *if* you give it the context it needs. Most people don't.
@@ -416,6 +460,7 @@ You're never locked in. The system adapts.
416
460
  | `/gsd:plan-phase [N]` | Research + plan + verify for a phase |
417
461
  | `/gsd:execute-phase <N>` | Execute all plans in parallel waves, verify when complete |
418
462
  | `/gsd:verify-work [N]` | Manual user acceptance testing ¹ |
463
+ | `/gsd:audit-milestone` | Verify milestone achieved its definition of done |
419
464
  | `/gsd:complete-milestone` | Archive milestone, tag release |
420
465
  | `/gsd:new-milestone [name]` | Start next version: questions → research → requirements → roadmap |
421
466
 
@@ -425,12 +470,16 @@ You're never locked in. The system adapts.
425
470
  |---------|--------------|
426
471
  | `/gsd:progress` | Where am I? What's next? |
427
472
  | `/gsd:help` | Show all commands and usage guide |
473
+ | `/gsd:whats-new` | See what changed since your installed version |
474
+ | `/gsd:update` | Update GSD with changelog preview |
428
475
 
429
476
  ### Brownfield
430
477
 
431
478
  | Command | What it does |
432
479
  |---------|--------------|
433
480
  | `/gsd:map-codebase` | Analyze existing codebase before new-project |
481
+ | `/gsd:analyze-codebase` | Bootstrap codebase intelligence for existing projects |
482
+ | `/gsd:query-intel <type>` | Query dependency graph (dependents, hotspots) |
434
483
 
435
484
  ### Phase Management
436
485
 
@@ -439,6 +488,8 @@ You're never locked in. The system adapts.
439
488
  | `/gsd:add-phase` | Append phase to roadmap |
440
489
  | `/gsd:insert-phase [N]` | Insert urgent work between phases |
441
490
  | `/gsd:remove-phase [N]` | Remove future phase, renumber |
491
+ | `/gsd:list-phase-assumptions [N]` | See Claude's intended approach before planning |
492
+ | `/gsd:plan-milestone-gaps` | Create phases to close gaps from audit |
442
493
 
443
494
  ### Session
444
495
 
@@ -451,6 +502,8 @@ You're never locked in. The system adapts.
451
502
 
452
503
  | Command | What it does |
453
504
  |---------|--------------|
505
+ | `/gsd:settings` | Configure model profile and workflow agents |
506
+ | `/gsd:set-profile <profile>` | Switch model profile (quality/balanced/budget) |
454
507
  | `/gsd:add-todo [desc]` | Capture idea for later |
455
508
  | `/gsd:check-todos` | List pending todos |
456
509
  | `/gsd:debug [desc]` | Systematic debugging with persistent state |
@@ -460,6 +513,57 @@ You're never locked in. The system adapts.
460
513
 
461
514
  ---
462
515
 
516
+ ## Configuration
517
+
518
+ GSD stores project settings in `.planning/config.json`. Configure during `/gsd:new-project` or update later with `/gsd:settings`.
519
+
520
+ ### Core Settings
521
+
522
+ | Setting | Options | Default | What it controls |
523
+ |---------|---------|---------|------------------|
524
+ | `mode` | `yolo`, `interactive` | `interactive` | Auto-approve vs confirm at each step |
525
+ | `depth` | `quick`, `standard`, `comprehensive` | `standard` | Planning thoroughness (phases × plans) |
526
+
527
+ ### Model Profiles
528
+
529
+ Control which Claude model each agent uses. Balance quality vs token spend.
530
+
531
+ | Profile | Planning | Execution | Verification |
532
+ |---------|----------|-----------|--------------|
533
+ | `quality` | Opus | Opus | Sonnet |
534
+ | `balanced` (default) | Opus | Sonnet | Sonnet |
535
+ | `budget` | Sonnet | Sonnet | Haiku |
536
+
537
+ Switch profiles:
538
+ ```
539
+ /gsd:set-profile budget
540
+ ```
541
+
542
+ Or configure via `/gsd:settings`.
543
+
544
+ ### Workflow Agents
545
+
546
+ These spawn additional agents during planning/execution. They improve quality but add tokens and time.
547
+
548
+ | Setting | Default | What it does |
549
+ |---------|---------|--------------|
550
+ | `workflow.research` | `true` | Researches domain before planning each phase |
551
+ | `workflow.plan_check` | `true` | Verifies plans achieve phase goals before execution |
552
+ | `workflow.verifier` | `true` | Confirms must-haves were delivered after execution |
553
+
554
+ Use `/gsd:settings` to toggle these, or override per-invocation:
555
+ - `/gsd:plan-phase --skip-research`
556
+ - `/gsd:plan-phase --skip-verify`
557
+
558
+ ### Execution
559
+
560
+ | Setting | Default | What it controls |
561
+ |---------|---------|------------------|
562
+ | `parallelization.enabled` | `true` | Run independent plans simultaneously |
563
+ | `planning.commit_docs` | `true` | Track `.planning/` in git |
564
+
565
+ ---
566
+
463
567
  ## Troubleshooting
464
568
 
465
569
  **Commands not found after install?**
@@ -979,7 +979,16 @@ mkdir -p .planning/debug/resolved
979
979
  mv .planning/debug/{slug}.md .planning/debug/resolved/
980
980
  ```
981
981
 
982
- Commit:
982
+ **Check planning config:**
983
+
984
+ ```bash
985
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
986
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
987
+ ```
988
+
989
+ **Commit the fix:**
990
+
991
+ If `COMMIT_PLANNING_DOCS=true` (default):
983
992
  ```bash
984
993
  git add -A
985
994
  git commit -m "fix: {brief description}
@@ -988,6 +997,16 @@ Root cause: {root_cause}
988
997
  Debug session: .planning/debug/resolved/{slug}.md"
989
998
  ```
990
999
 
1000
+ If `COMMIT_PLANNING_DOCS=false`:
1001
+ ```bash
1002
+ # Only commit code changes, exclude .planning/
1003
+ git add -A
1004
+ git reset .planning/
1005
+ git commit -m "fix: {brief description}
1006
+
1007
+ Root cause: {root_cause}"
1008
+ ```
1009
+
991
1010
  Report completion and offer next steps.
992
1011
  </step>
993
1012
 
@@ -39,6 +39,32 @@ Options:
39
39
  ```
40
40
 
41
41
  **If .planning/ doesn't exist:** Error - project not initialized.
42
+
43
+ **Load planning config:**
44
+
45
+ ```bash
46
+ # Check if planning docs should be committed (default: true)
47
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
48
+ # Auto-detect gitignored (overrides config)
49
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
50
+ ```
51
+
52
+ Store `COMMIT_PLANNING_DOCS` for use in git operations.
53
+ </step>
54
+
55
+ <step name="load_codebase_intelligence">
56
+ Check for codebase intelligence:
57
+
58
+ ```bash
59
+ cat .planning/intel/summary.md 2>/dev/null
60
+ ```
61
+
62
+ If exists:
63
+ - Follow detected naming conventions when writing code
64
+ - Place new files in directories that match their purpose
65
+ - Use established patterns (camelCase, PascalCase, etc.)
66
+
67
+ This context helps maintain codebase consistency during execution.
42
68
  </step>
43
69
 
44
70
  <step name="load_plan">
@@ -692,6 +718,10 @@ Resume file: [path to .continue-here if exists, else "None"]
692
718
  <final_commit>
693
719
  After SUMMARY.md and STATE.md updates:
694
720
 
721
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations for planning files, log "Skipping planning docs commit (commit_docs: false)"
722
+
723
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
724
+
695
725
  **1. Stage execution artifacts:**
696
726
 
697
727
  ```bash
@@ -450,6 +450,11 @@ PHASE_DIR=$(ls -d .planning/phases/${PADDED_PHASE}-* .planning/phases/${PHASE}-*
450
450
 
451
451
  # Read CONTEXT.md if exists (from /gsd:discuss-phase)
452
452
  cat "${PHASE_DIR}"/*-CONTEXT.md 2>/dev/null
453
+
454
+ # Check if planning docs should be committed (default: true)
455
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
456
+ # Auto-detect gitignored (overrides config)
457
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
453
458
  ```
454
459
 
455
460
  **If CONTEXT.md exists**, it contains user decisions that MUST constrain your research:
@@ -526,6 +531,10 @@ Where `PHASE_DIR` is the full path (e.g., `.planning/phases/01-foundation`)
526
531
 
527
532
  ## Step 6: Commit Research
528
533
 
534
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Skipping planning docs commit (commit_docs: false)"
535
+
536
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
537
+
529
538
  ```bash
530
539
  git add "${PHASE_DIR}/${PADDED_PHASE}-RESEARCH.md"
531
540
  git commit -m "docs(${PHASE}): research phase domain
@@ -416,6 +416,9 @@ Output: [What artifacts will be created]
416
416
  @.planning/ROADMAP.md
417
417
  @.planning/STATE.md
418
418
 
419
+ # Codebase intelligence (if exists)
420
+ @.planning/intel/summary.md
421
+
419
422
  # Only reference prior plan SUMMARYs if genuinely needed
420
423
  @path/to/relevant/source.ts
421
424
  </context>
@@ -953,6 +956,10 @@ After making edits, self-check:
953
956
 
954
957
  ### Step 6: Commit Revised Plans
955
958
 
959
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Skipping planning docs commit (commit_docs: false)"
960
+
961
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
962
+
956
963
  ```bash
957
964
  git add .planning/phases/${PHASE}-*/${PHASE}-*-PLAN.md
958
965
  git commit -m "fix(${PHASE}): revise plans based on checker feedback"
@@ -998,6 +1005,17 @@ Read `.planning/STATE.md` and parse:
998
1005
  - Blockers/concerns (things this phase may address)
999
1006
 
1000
1007
  If STATE.md missing but .planning/ exists, offer to reconstruct or continue without.
1008
+
1009
+ **Load planning config:**
1010
+
1011
+ ```bash
1012
+ # Check if planning docs should be committed (default: true)
1013
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
1014
+ # Auto-detect gitignored (overrides config)
1015
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
1016
+ ```
1017
+
1018
+ Store `COMMIT_PLANNING_DOCS` for use in git operations.
1001
1019
  </step>
1002
1020
 
1003
1021
  <step name="load_codebase_context">
@@ -1021,6 +1039,25 @@ If exists, load relevant documents based on phase type:
1021
1039
  | (default) | STACK.md, ARCHITECTURE.md |
1022
1040
  </step>
1023
1041
 
1042
+ <step name="load_codebase_intelligence">
1043
+ Check for codebase intelligence:
1044
+
1045
+ ```bash
1046
+ cat .planning/intel/summary.md 2>/dev/null
1047
+ ```
1048
+
1049
+ If exists, this provides:
1050
+ - File count and structure overview
1051
+ - Detected naming conventions (use these when creating new files)
1052
+ - Key directories and their purposes
1053
+ - Export patterns
1054
+
1055
+ **How to use:**
1056
+ - Follow detected naming conventions when planning new exports
1057
+ - Place new files in directories that match their purpose
1058
+ - Reference existing patterns when describing implementation
1059
+ </step>
1060
+
1024
1061
  <step name="identify_phase">
1025
1062
  Check roadmap and existing phases:
1026
1063
 
@@ -1209,6 +1246,10 @@ Update ROADMAP.md to finalize phase placeholders created by add-phase or insert-
1209
1246
  <step name="git_commit">
1210
1247
  Commit phase plan(s) and updated roadmap:
1211
1248
 
1249
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Skipping planning docs commit (commit_docs: false)"
1250
+
1251
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
1252
+
1212
1253
  ```bash
1213
1254
  git add .planning/phases/${PHASE}-*/${PHASE}-*-PLAN.md .planning/ROADMAP.md
1214
1255
  git commit -m "docs(${PHASE}): create phase plan
@@ -48,6 +48,11 @@ cat .planning/research/STACK.md
48
48
  cat .planning/research/FEATURES.md
49
49
  cat .planning/research/ARCHITECTURE.md
50
50
  cat .planning/research/PITFALLS.md
51
+
52
+ # Check if planning docs should be committed (default: true)
53
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
54
+ # Auto-detect gitignored (overrides config)
55
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
51
56
  ```
52
57
 
53
58
  Parse each file to extract:
@@ -125,6 +130,10 @@ Write to `.planning/research/SUMMARY.md`
125
130
 
126
131
  The 4 parallel researcher agents write files but do NOT commit. You commit everything together.
127
132
 
133
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Skipping planning docs commit (commit_docs: false)"
134
+
135
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
136
+
128
137
  ```bash
129
138
  git add .planning/research/
130
139
  git commit -m "docs: complete project research
package/bin/install.js CHANGED
@@ -162,6 +162,7 @@ function copyWithPathReplacement(srcDir, destDir, pathPrefix) {
162
162
  function cleanupOrphanedFiles(claudeDir) {
163
163
  const orphanedFiles = [
164
164
  'hooks/gsd-notify.sh', // Removed in v1.6.x
165
+ 'hooks/statusline.js', // Renamed to gsd-statusline.js in v1.9.0
165
166
  ];
166
167
 
167
168
  for (const relPath of orphanedFiles) {
@@ -179,6 +180,7 @@ function cleanupOrphanedFiles(claudeDir) {
179
180
  function cleanupOrphanedHooks(settings) {
180
181
  const orphanedHookPatterns = [
181
182
  'gsd-notify.sh', // Removed in v1.6.x
183
+ 'hooks/statusline.js', // Renamed to gsd-statusline.js in v1.9.0
182
184
  ];
183
185
 
184
186
  let cleaned = false;
@@ -353,19 +355,22 @@ function install(isGlobal) {
353
355
  failures.push('VERSION');
354
356
  }
355
357
 
356
- // Copy hooks
357
- const hooksSrc = path.join(src, 'hooks');
358
+ // Copy hooks from dist/ (bundled with dependencies)
359
+ const hooksSrc = path.join(src, 'hooks', 'dist');
358
360
  if (fs.existsSync(hooksSrc)) {
359
361
  const hooksDest = path.join(claudeDir, 'hooks');
360
362
  fs.mkdirSync(hooksDest, { recursive: true });
361
363
  const hookEntries = fs.readdirSync(hooksSrc);
362
364
  for (const entry of hookEntries) {
363
365
  const srcFile = path.join(hooksSrc, entry);
364
- const destFile = path.join(hooksDest, entry);
365
- fs.copyFileSync(srcFile, destFile);
366
+ // Only copy files, not directories
367
+ if (fs.statSync(srcFile).isFile()) {
368
+ const destFile = path.join(hooksDest, entry);
369
+ fs.copyFileSync(srcFile, destFile);
370
+ }
366
371
  }
367
372
  if (verifyInstalled(hooksDest, 'hooks')) {
368
- console.log(` ${green}✓${reset} Installed hooks`);
373
+ console.log(` ${green}✓${reset} Installed hooks (bundled)`);
369
374
  } else {
370
375
  failures.push('hooks');
371
376
  }
@@ -382,8 +387,8 @@ function install(isGlobal) {
382
387
  const settingsPath = path.join(claudeDir, 'settings.json');
383
388
  const settings = cleanupOrphanedHooks(readSettings(settingsPath));
384
389
  const statuslineCommand = isGlobal
385
- ? 'node "$HOME/.claude/hooks/statusline.js"'
386
- : 'node .claude/hooks/statusline.js';
390
+ ? 'node "$HOME/.claude/hooks/gsd-statusline.js"'
391
+ : 'node .claude/hooks/gsd-statusline.js';
387
392
  const updateCheckCommand = isGlobal
388
393
  ? 'node "$HOME/.claude/hooks/gsd-check-update.js"'
389
394
  : 'node .claude/hooks/gsd-check-update.js';
@@ -413,6 +418,72 @@ function install(isGlobal) {
413
418
  console.log(` ${green}✓${reset} Configured update check hook`);
414
419
  }
415
420
 
421
+ // Register intel hooks for codebase intelligence
422
+ const intelIndexCommand = isGlobal
423
+ ? 'node "$HOME/.claude/hooks/gsd-intel-index.js"'
424
+ : 'node .claude/hooks/gsd-intel-index.js';
425
+
426
+ const intelSessionCommand = isGlobal
427
+ ? 'node "$HOME/.claude/hooks/gsd-intel-session.js"'
428
+ : 'node .claude/hooks/gsd-intel-session.js';
429
+
430
+ // PostToolUse hook for indexing
431
+ if (!settings.hooks.PostToolUse) {
432
+ settings.hooks.PostToolUse = [];
433
+ }
434
+
435
+ const hasIntelIndexHook = settings.hooks.PostToolUse.some(entry =>
436
+ entry.hooks && entry.hooks.some(h => h.command && h.command.includes('gsd-intel-index'))
437
+ );
438
+
439
+ if (!hasIntelIndexHook) {
440
+ settings.hooks.PostToolUse.push({
441
+ hooks: [{
442
+ type: 'command',
443
+ command: intelIndexCommand
444
+ }]
445
+ });
446
+ console.log(` ${green}✓${reset} Configured intel indexing hook`);
447
+ }
448
+
449
+ // SessionStart hook for context injection
450
+ const hasIntelSessionHook = settings.hooks.SessionStart.some(entry =>
451
+ entry.hooks && entry.hooks.some(h => h.command && h.command.includes('gsd-intel-session'))
452
+ );
453
+
454
+ if (!hasIntelSessionHook) {
455
+ settings.hooks.SessionStart.push({
456
+ hooks: [{
457
+ type: 'command',
458
+ command: intelSessionCommand
459
+ }]
460
+ });
461
+ console.log(` ${green}✓${reset} Configured intel session hook`);
462
+ }
463
+
464
+ // Stop hook for pruning deleted files
465
+ const intelPruneCommand = isGlobal
466
+ ? 'node "$HOME/.claude/hooks/gsd-intel-prune.js"'
467
+ : 'node .claude/hooks/gsd-intel-prune.js';
468
+
469
+ if (!settings.hooks.Stop) {
470
+ settings.hooks.Stop = [];
471
+ }
472
+
473
+ const hasIntelPruneHook = settings.hooks.Stop.some(entry =>
474
+ entry.hooks && entry.hooks.some(h => h.command && h.command.includes('gsd-intel-prune'))
475
+ );
476
+
477
+ if (!hasIntelPruneHook) {
478
+ settings.hooks.Stop.push({
479
+ hooks: [{
480
+ type: 'command',
481
+ command: intelPruneCommand
482
+ }]
483
+ });
484
+ console.log(` ${green}✓${reset} Configured intel prune hook`);
485
+ }
486
+
416
487
  return { settingsPath, settings, statuslineCommand };
417
488
  }
418
489
 
@@ -126,6 +126,17 @@ If `.planning/STATE.md` exists:
126
126
  <step name="git_commit">
127
127
  Commit the todo and any updated state:
128
128
 
129
+ **Check planning config:**
130
+
131
+ ```bash
132
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
133
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
134
+ ```
135
+
136
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Todo saved (not committed - commit_docs: false)"
137
+
138
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
139
+
129
140
  ```bash
130
141
  git add .planning/todos/pending/[filename]
131
142
  [ -f .planning/STATE.md ] && git add .planning/STATE.md