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
@@ -0,0 +1,363 @@
1
+ ---
2
+ name: gsd:analyze-codebase
3
+ description: Scan existing codebase and populate .planning/intel/ with file index, conventions, and semantic entity files
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Write
10
+ - Task
11
+ ---
12
+
13
+ <objective>
14
+ Scan codebase to populate .planning/intel/ with file index, conventions, and semantic entity files.
15
+
16
+ Works standalone (without /gsd:new-project) for brownfield codebases. Creates summary.md for context injection at session start. Generates entity files that capture file PURPOSE (what it does, why it exists), not just syntax.
17
+
18
+ Output: .planning/intel/index.json, conventions.json, summary.md, entities/*.md
19
+ </objective>
20
+
21
+ <context>
22
+ This command performs bulk codebase scanning to bootstrap the Codebase Intelligence system.
23
+
24
+ **Use for:**
25
+ - Brownfield projects before /gsd:new-project
26
+ - Refreshing intel after major changes
27
+ - Standalone intel without full project setup
28
+
29
+ After initial scan, the PostToolUse hook (hooks/intel-index.js) maintains incremental updates.
30
+
31
+ **Execution model (Step 9 - Entity Generation):**
32
+ - Claude (executing this command) generates entity content directly
33
+ - No embedded JavaScript - Claude reads files and writes semantic documentation
34
+ - Task tool to spawn subagents for batch processing large codebases
35
+ - Each subagent processes 10 files, generating Purpose-focused entity markdown
36
+ - Users can skip Step 9 if they only want the index (faster, less context)
37
+ </context>
38
+
39
+ <process>
40
+
41
+ ## Step 1: Create directory structure
42
+
43
+ ```bash
44
+ mkdir -p .planning/intel
45
+ ```
46
+
47
+ ## Step 2: Find all indexable files
48
+
49
+ Use Glob tool with pattern: `**/*.{js,ts,jsx,tsx,mjs,cjs}`
50
+
51
+ Exclude directories (skip any path containing):
52
+ - node_modules
53
+ - dist
54
+ - build
55
+ - .git
56
+ - vendor
57
+ - coverage
58
+ - .next
59
+ - __pycache__
60
+
61
+ Filter results to remove excluded paths before processing.
62
+
63
+ ## Step 3: Process each file
64
+
65
+ Initialize the index structure:
66
+ ```javascript
67
+ {
68
+ version: 1,
69
+ updated: Date.now(),
70
+ files: {}
71
+ }
72
+ ```
73
+
74
+ For each file found:
75
+
76
+ 1. Read file content using Read tool
77
+
78
+ 2. Extract exports using these patterns:
79
+ - Named exports: `export\s*\{([^}]+)\}`
80
+ - Declaration exports: `export\s+(?:const|let|var|function\*?|async\s+function|class)\s+(\w+)`
81
+ - Default exports: `export\s+default\s+(?:function\s*\*?\s*|class\s+)?(\w+)?`
82
+ - CommonJS object: `module\.exports\s*=\s*\{([^}]+)\}`
83
+ - CommonJS single: `module\.exports\s*=\s*(\w+)\s*[;\n]`
84
+ - TypeScript: `export\s+(?:type|interface)\s+(\w+)`
85
+
86
+ 3. Extract imports using these patterns:
87
+ - ES6: `import\s+(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)\s+from\s+['"]([^'"]+)['"]`
88
+ - Side-effect: `import\s+['"]([^'"]+)['"]` (not preceded by 'from')
89
+ - CommonJS: `require\s*\(\s*['"]([^'"]+)['"]\s*\)`
90
+
91
+ 4. Store in index:
92
+ ```javascript
93
+ index.files[absolutePath] = {
94
+ exports: [], // Array of export names
95
+ imports: [], // Array of import sources
96
+ indexed: Date.now()
97
+ }
98
+ ```
99
+
100
+ ## Step 4: Detect conventions
101
+
102
+ Analyze the collected index for patterns.
103
+
104
+ **Naming conventions** (require 5+ exports, 70%+ match rate):
105
+ - camelCase: `^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]+)+$` or single lowercase `^[a-z][a-z0-9]*$`
106
+ - PascalCase: `^[A-Z][a-z0-9]+(?:[A-Z][a-z0-9]+)*$` or single `^[A-Z][a-z0-9]+$`
107
+ - snake_case: `^[a-z][a-z0-9]*(?:_[a-z0-9]+)+$`
108
+ - SCREAMING_SNAKE: `^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$` or single `^[A-Z][A-Z0-9]*$`
109
+ - Skip 'default' when counting (it's a keyword, not naming convention)
110
+
111
+ **Directory patterns** (use lookup table):
112
+ ```
113
+ components -> UI components
114
+ hooks -> React/custom hooks
115
+ utils, lib -> Utility functions
116
+ services -> Service layer
117
+ api, routes -> API endpoints
118
+ types -> TypeScript types
119
+ models -> Data models
120
+ tests, __tests__, test, spec -> Test files
121
+ controllers -> Controllers
122
+ middleware -> Middleware
123
+ config -> Configuration
124
+ constants -> Constants
125
+ pages -> Page components
126
+ views -> View templates
127
+ ```
128
+
129
+ **Suffix patterns** (require 5+ occurrences):
130
+ ```
131
+ .test.*, .spec.* -> Test files
132
+ .service.* -> Service layer
133
+ .controller.* -> Controllers
134
+ .model.* -> Data models
135
+ .util.*, .utils.* -> Utility functions
136
+ .helper.*, .helpers.* -> Helper functions
137
+ .config.* -> Configuration
138
+ .types.*, .type.* -> TypeScript types
139
+ .hook.*, .hooks.* -> React/custom hooks
140
+ .context.* -> React context
141
+ .store.* -> State store
142
+ .slice.* -> Redux slice
143
+ .reducer.* -> Redux reducer
144
+ .action.*, .actions.* -> Redux actions
145
+ .api.* -> API layer
146
+ .route.*, .routes.* -> Route definitions
147
+ .middleware.* -> Middleware
148
+ .schema.* -> Schema definitions
149
+ .mock.*, .mocks.* -> Mock data
150
+ .fixture.*, .fixtures.* -> Test fixtures
151
+ ```
152
+
153
+ ## Step 5: Write index.json
154
+
155
+ Write to `.planning/intel/index.json`:
156
+ ```javascript
157
+ {
158
+ "version": 1,
159
+ "updated": 1737360330000,
160
+ "files": {
161
+ "/absolute/path/to/file.js": {
162
+ "exports": ["functionA", "ClassB"],
163
+ "imports": ["react", "./utils"],
164
+ "indexed": 1737360330000
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ ## Step 6: Write conventions.json
171
+
172
+ Write to `.planning/intel/conventions.json`:
173
+ ```javascript
174
+ {
175
+ "version": 1,
176
+ "updated": 1737360330000,
177
+ "naming": {
178
+ "exports": {
179
+ "dominant": "camelCase",
180
+ "count": 42,
181
+ "percentage": 85
182
+ }
183
+ },
184
+ "directories": {
185
+ "components": { "purpose": "UI components", "files": 15 },
186
+ "hooks": { "purpose": "React/custom hooks", "files": 8 }
187
+ },
188
+ "suffixes": {
189
+ ".test.js": { "purpose": "Test files", "count": 12 }
190
+ }
191
+ }
192
+ ```
193
+
194
+ ## Step 7: Generate summary.md
195
+
196
+ Write to `.planning/intel/summary.md`:
197
+
198
+ ```markdown
199
+ # Codebase Intelligence Summary
200
+
201
+ Last updated: [ISO timestamp]
202
+ Indexed files: [N]
203
+
204
+ ## Naming Conventions
205
+
206
+ - Export naming: [case] ([percentage]% of [count] exports)
207
+
208
+ ## Key Directories
209
+
210
+ - `[dir]/`: [purpose] ([N] files)
211
+ - ... (top 5)
212
+
213
+ ## File Patterns
214
+
215
+ - `*[suffix]`: [purpose] ([count] files)
216
+ - ... (top 3)
217
+
218
+ Total exports: [N]
219
+ ```
220
+
221
+ Target: < 500 tokens. Keep concise for context injection.
222
+
223
+ ## Step 8: Report completion
224
+
225
+ Display summary statistics:
226
+
227
+ ```
228
+ Codebase Analysis Complete
229
+
230
+ Files indexed: [N]
231
+ Exports found: [N]
232
+ Imports found: [N]
233
+
234
+ Conventions detected:
235
+ - Naming: [dominant case] ([percentage]%)
236
+ - Directories: [list]
237
+ - Patterns: [list]
238
+
239
+ Files created:
240
+ - .planning/intel/index.json
241
+ - .planning/intel/conventions.json
242
+ - .planning/intel/summary.md
243
+ ```
244
+
245
+ ## Step 9: Generate semantic entities (optional)
246
+
247
+ Generate entity files that capture semantic understanding of key files. These provide PURPOSE, not just syntax.
248
+
249
+ **Skip this step if:** User only wants the index, or codebase has < 10 files.
250
+
251
+ ### 9.1 Create entities directory
252
+
253
+ ```bash
254
+ mkdir -p .planning/intel/entities
255
+ ```
256
+
257
+ ### 9.2 Select files for entity generation
258
+
259
+ Select up to 50 files based on these criteria (in priority order):
260
+
261
+ 1. **High-export files:** 3+ exports (likely core modules)
262
+ 2. **Hub files:** Referenced by 5+ other files (via imports analysis)
263
+ 3. **Key directories:** Entry points (index.js, main.js, app.js), config files
264
+ 4. **Structural files:** Files matching convention patterns (services, controllers, models)
265
+
266
+ From the index.json, identify candidates and limit to 50 files maximum per run.
267
+
268
+ ### 9.3 Generate entities via Task tool batching
269
+
270
+ Process selected files in **batches of 10** using the Task tool to spawn subagents.
271
+
272
+ For each batch, spawn a Task with this instruction:
273
+
274
+ ```
275
+ Generate semantic entity files for these source files:
276
+ [list of 10 absolute file paths]
277
+
278
+ For each file:
279
+ 1. Read the file content
280
+ 2. Write an entity markdown file to .planning/intel/entities/
281
+
282
+ Entity filename convention (slug):
283
+ - Take the relative path from project root
284
+ - Replace / with --
285
+ - Replace . with -
286
+ - Example: src/utils/auth.js -> src--utils--auth-js.md
287
+
288
+ Entity template:
289
+ ---
290
+ source: [absolute path]
291
+ indexed: [ISO timestamp]
292
+ ---
293
+
294
+ # [filename]
295
+
296
+ ## Purpose
297
+
298
+ [1-2 sentences: What does this file DO? Why does it exist? What problem does it solve?]
299
+
300
+ ## Exports
301
+
302
+ | Name | Type | Purpose |
303
+ |------|------|---------|
304
+ | [export] | [function/class/const/type] | [what it does] |
305
+
306
+ ## Dependencies
307
+
308
+ | Import | Purpose |
309
+ |--------|---------|
310
+ | [import source] | [why this file needs it] |
311
+
312
+ ## Used By
313
+
314
+ [If this file is imported by others in the codebase, list the key consumers and why they use it. Otherwise: "Entry point" or "Utility - used across codebase"]
315
+
316
+ ---
317
+
318
+ Focus on PURPOSE and semantic understanding, not just listing syntax.
319
+ ```
320
+
321
+ ### 9.4 Verify entity generation
322
+
323
+ After all batches complete:
324
+
325
+ ```bash
326
+ ls .planning/intel/entities/*.md | wc -l
327
+ ```
328
+
329
+ Confirm entity count matches expected file count.
330
+
331
+ ### 9.5 Report entity statistics
332
+
333
+ ```
334
+ Entity Generation Complete
335
+
336
+ Entity files created: [N]
337
+ Location: .planning/intel/entities/
338
+
339
+ Batches processed: [N]
340
+ Files per batch: 10
341
+
342
+ Next: Intel hooks will continue incremental learning as you code.
343
+ ```
344
+
345
+ </process>
346
+
347
+ <output>
348
+ - .planning/intel/index.json - File index with exports and imports
349
+ - .planning/intel/conventions.json - Detected naming and structural patterns
350
+ - .planning/intel/summary.md - Concise summary for context injection
351
+ - .planning/intel/entities/*.md - Semantic entity files (optional, Step 9)
352
+ </output>
353
+
354
+ <success_criteria>
355
+ - [ ] .planning/intel/ directory created
356
+ - [ ] All JS/TS files scanned (excluding node_modules, dist, build, .git, vendor, coverage)
357
+ - [ ] index.json populated with exports and imports for each file
358
+ - [ ] conventions.json has detected patterns (naming, directories, suffixes)
359
+ - [ ] summary.md is concise (< 500 tokens)
360
+ - [ ] Statistics reported to user
361
+ - [ ] Entity files generated for key files (if Step 9 executed)
362
+ - [ ] Entity files contain Purpose section with semantic understanding
363
+ </success_criteria>
@@ -39,6 +39,24 @@ Glob: .planning/phases/*/*-VERIFICATION.md
39
39
 
40
40
  <process>
41
41
 
42
+ ## 0. Resolve Model Profile
43
+
44
+ Read model profile for agent spawning:
45
+
46
+ ```bash
47
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
48
+ ```
49
+
50
+ Default to "balanced" if not set.
51
+
52
+ **Model lookup table:**
53
+
54
+ | Agent | quality | balanced | budget |
55
+ |-------|---------|----------|--------|
56
+ | gsd-integration-checker | sonnet | sonnet | haiku |
57
+
58
+ Store resolved model for use in Task call below.
59
+
42
60
  ## 1. Determine Milestone Scope
43
61
 
44
62
  ```bash
@@ -83,7 +101,8 @@ Phase exports: {from SUMMARYs}
83
101
  API routes: {routes created}
84
102
 
85
103
  Verify cross-phase wiring and E2E user flows.",
86
- subagent_type="gsd-integration-checker"
104
+ subagent_type="gsd-integration-checker",
105
+ model="{integration_checker_model}"
87
106
  )
88
107
  ```
89
108
 
@@ -177,6 +177,17 @@ Update STATE.md "### Pending Todos" section if exists.
177
177
  <step name="git_commit">
178
178
  If todo was moved to done/, commit the change:
179
179
 
180
+ **Check planning config:**
181
+
182
+ ```bash
183
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
184
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
185
+ ```
186
+
187
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations, log "Todo moved (not committed - commit_docs: false)"
188
+
189
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
190
+
180
191
  ```bash
181
192
  git add .planning/todos/done/[filename]
182
193
  git rm --cached .planning/todos/pending/[filename] 2>/dev/null || true
@@ -28,6 +28,24 @@ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
28
28
 
29
29
  <process>
30
30
 
31
+ ## 0. Resolve Model Profile
32
+
33
+ Read model profile for agent spawning:
34
+
35
+ ```bash
36
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
37
+ ```
38
+
39
+ Default to "balanced" if not set.
40
+
41
+ **Model lookup table:**
42
+
43
+ | Agent | quality | balanced | budget |
44
+ |-------|---------|----------|--------|
45
+ | gsd-debugger | opus | sonnet | sonnet |
46
+
47
+ Store resolved model for use in Task calls below.
48
+
31
49
  ## 1. Check Active Sessions
32
50
 
33
51
  If active sessions exist AND no $ARGUMENTS:
@@ -82,6 +100,7 @@ Create: .planning/debug/{slug}.md
82
100
  Task(
83
101
  prompt=filled_prompt,
84
102
  subagent_type="gsd-debugger",
103
+ model="{debugger_model}",
85
104
  description="Debug {slug}"
86
105
  )
87
106
  ```
@@ -134,6 +153,7 @@ goal: find_and_fix
134
153
  Task(
135
154
  prompt=continuation_prompt,
136
155
  subagent_type="gsd-debugger",
156
+ model="{debugger_model}",
137
157
  description="Continue debug {slug}"
138
158
  )
139
159
  ```
@@ -38,6 +38,24 @@ Phase: $ARGUMENTS
38
38
  </context>
39
39
 
40
40
  <process>
41
+ 0. **Resolve Model Profile**
42
+
43
+ Read model profile for agent spawning:
44
+ ```bash
45
+ MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
46
+ ```
47
+
48
+ Default to "balanced" if not set.
49
+
50
+ **Model lookup table:**
51
+
52
+ | Agent | quality | balanced | budget |
53
+ |-------|---------|----------|--------|
54
+ | gsd-executor | opus | sonnet | sonnet |
55
+ | gsd-verifier | sonnet | sonnet | haiku |
56
+
57
+ Store resolved models for use in Task calls below.
58
+
41
59
  1. **Validate phase exists**
42
60
  - Find phase directory matching argument
43
61
  - Count PLAN.md files
@@ -79,6 +97,11 @@ Phase: $ARGUMENTS
79
97
  **If clean:** Continue to verification.
80
98
 
81
99
  7. **Verify phase goal**
100
+ Check config: `WORKFLOW_VERIFIER=$(cat .planning/config.json 2>/dev/null | grep -o '"verifier"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")`
101
+
102
+ **If `workflow.verifier` is `false`:** Skip to step 8 (treat as passed).
103
+
104
+ **Otherwise:**
82
105
  - Spawn `gsd-verifier` subagent with phase directory and goal
83
106
  - Verifier checks must_haves against actual codebase (not SUMMARY claims)
84
107
  - Creates VERIFICATION.md with detailed report
@@ -99,7 +122,9 @@ Phase: $ARGUMENTS
99
122
  - Skip if: REQUIREMENTS.md doesn't exist, or phase has no Requirements line
100
123
 
101
124
  10. **Commit phase completion**
102
- Bundle all phase metadata updates in one commit:
125
+ Check `COMMIT_PLANNING_DOCS` from config.json (default: true).
126
+ If false: Skip git operations for .planning/ files.
127
+ If true: Bundle all phase metadata updates in one commit:
103
128
  - Stage: `git add .planning/ROADMAP.md .planning/STATE.md`
104
129
  - Stage REQUIREMENTS.md if updated: `git add .planning/REQUIREMENTS.md`
105
130
  - Commit: `docs({phase}): complete {phase-name} phase`
@@ -228,12 +253,22 @@ After user runs /gsd:plan-phase {Z} --gaps:
228
253
  <wave_execution>
229
254
  **Parallel spawning:**
230
255
 
231
- Spawn all plans in a wave with a single message containing multiple Task calls:
256
+ Before spawning, read file contents. The `@` syntax does not work across Task() boundaries.
257
+
258
+ ```bash
259
+ # Read each plan and STATE.md
260
+ PLAN_01_CONTENT=$(cat "{plan_01_path}")
261
+ PLAN_02_CONTENT=$(cat "{plan_02_path}")
262
+ PLAN_03_CONTENT=$(cat "{plan_03_path}")
263
+ STATE_CONTENT=$(cat .planning/STATE.md)
264
+ ```
265
+
266
+ Spawn all plans in a wave with a single message containing multiple Task calls, with inlined content:
232
267
 
233
268
  ```
234
- Task(prompt="Execute plan at {plan_01_path}\n\nPlan: @{plan_01_path}\nProject state: @.planning/STATE.md", subagent_type="gsd-executor")
235
- Task(prompt="Execute plan at {plan_02_path}\n\nPlan: @{plan_02_path}\nProject state: @.planning/STATE.md", subagent_type="gsd-executor")
236
- Task(prompt="Execute plan at {plan_03_path}\n\nPlan: @{plan_03_path}\nProject state: @.planning/STATE.md", subagent_type="gsd-executor")
269
+ Task(prompt="Execute plan at {plan_01_path}\n\nPlan:\n{plan_01_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
270
+ Task(prompt="Execute plan at {plan_02_path}\n\nPlan:\n{plan_02_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
271
+ Task(prompt="Execute plan at {plan_03_path}\n\nPlan:\n{plan_03_content}\n\nProject state:\n{state_content}", subagent_type="gsd-executor", model="{executor_model}")
237
272
  ```
238
273
 
239
274
  All three run in parallel. Task tool blocks until all complete.
@@ -76,6 +76,17 @@ Map an existing codebase for brownfield projects.
76
76
 
77
77
  Usage: `/gsd:map-codebase`
78
78
 
79
+ **`/gsd:analyze-codebase`**
80
+ Bootstrap codebase intelligence for existing projects.
81
+
82
+ - Scans all JS/TS files and extracts exports/imports
83
+ - Detects naming conventions, directory patterns, file suffixes
84
+ - Creates `.planning/intel/` with index, conventions, and summary
85
+ - Works standalone (no `/gsd:new-project` required)
86
+ - After initial scan, PostToolUse hook continues incremental learning
87
+
88
+ Usage: `/gsd:analyze-codebase`
89
+
79
90
  ### Phase Planning
80
91
 
81
92
  **`/gsd:discuss-phase <number>`**
@@ -274,6 +285,73 @@ List pending todos and select one to work on.
274
285
  Usage: `/gsd:check-todos`
275
286
  Usage: `/gsd:check-todos api`
276
287
 
288
+ ### User Acceptance Testing
289
+
290
+ **`/gsd:verify-work [phase]`**
291
+ Validate built features through conversational UAT.
292
+
293
+ - Extracts testable deliverables from SUMMARY.md files
294
+ - Presents tests one at a time (yes/no responses)
295
+ - Automatically diagnoses failures and creates fix plans
296
+ - Ready for re-execution if issues found
297
+
298
+ Usage: `/gsd:verify-work 3`
299
+
300
+ ### Milestone Auditing
301
+
302
+ **`/gsd:audit-milestone [version]`**
303
+ Audit milestone completion against original intent.
304
+
305
+ - Reads all phase VERIFICATION.md files
306
+ - Checks requirements coverage
307
+ - Spawns integration checker for cross-phase wiring
308
+ - Creates MILESTONE-AUDIT.md with gaps and tech debt
309
+
310
+ Usage: `/gsd:audit-milestone`
311
+
312
+ **`/gsd:plan-milestone-gaps`**
313
+ Create phases to close gaps identified by audit.
314
+
315
+ - Reads MILESTONE-AUDIT.md and groups gaps into phases
316
+ - Prioritizes by requirement priority (must/should/nice)
317
+ - Adds gap closure phases to ROADMAP.md
318
+ - Ready for `/gsd:plan-phase` on new phases
319
+
320
+ Usage: `/gsd:plan-milestone-gaps`
321
+
322
+ ### Configuration
323
+
324
+ **`/gsd:settings`**
325
+ Configure workflow toggles and model profile interactively.
326
+
327
+ - Toggle researcher, plan checker, verifier agents
328
+ - Select model profile (quality/balanced/budget)
329
+ - Updates `.planning/config.json`
330
+
331
+ Usage: `/gsd:settings`
332
+
333
+ **`/gsd:set-profile <profile>`**
334
+ Quick switch model profile for GSD agents.
335
+
336
+ - `quality` — Opus everywhere except verification
337
+ - `balanced` — Opus for planning, Sonnet for execution (default)
338
+ - `budget` — Sonnet for writing, Haiku for research/verification
339
+
340
+ Usage: `/gsd:set-profile budget`
341
+
342
+ ### Codebase Intelligence
343
+
344
+ **`/gsd:query-intel <type> [path]`**
345
+ Query the codebase intelligence graph database.
346
+
347
+ - `dependents <file>` — What files depend on this? (blast radius)
348
+ - `hotspots` — Which files have the most dependents?
349
+
350
+ Requires `/gsd:analyze-codebase` to build the graph first.
351
+
352
+ Usage: `/gsd:query-intel dependents src/lib/db.ts`
353
+ Usage: `/gsd:query-intel hotspots`
354
+
277
355
  ### Utility Commands
278
356
 
279
357
  **`/gsd:help`**
@@ -289,6 +367,15 @@ See what's changed since your installed version.
289
367
 
290
368
  Usage: `/gsd:whats-new`
291
369
 
370
+ **`/gsd:update`**
371
+ Update GSD to latest version with changelog preview.
372
+
373
+ - Shows what changed before updating
374
+ - Confirms before running install
375
+ - Better than raw `npx get-shit-done-cc`
376
+
377
+ Usage: `/gsd:update`
378
+
292
379
  ## Files & Structure
293
380
 
294
381
  ```
@@ -302,6 +389,10 @@ Usage: `/gsd:whats-new`
302
389
  │ └── done/ # Completed todos
303
390
  ├── debug/ # Active debug sessions
304
391
  │ └── resolved/ # Archived resolved issues
392
+ ├── intel/ # Codebase intelligence (auto-populated)
393
+ │ ├── index.json # File exports and imports
394
+ │ ├── conventions.json # Detected patterns
395
+ │ └── summary.md # Context for session injection
305
396
  ├── codebase/ # Codebase map (brownfield projects)
306
397
  │ ├── STACK.md # Languages, frameworks, dependencies
307
398
  │ ├── ARCHITECTURE.md # Patterns, layers, data flow
@@ -337,6 +428,33 @@ Set during `/gsd:new-project`:
337
428
 
338
429
  Change anytime by editing `.planning/config.json`
339
430
 
431
+ ## Planning Configuration
432
+
433
+ Configure how planning artifacts are managed in `.planning/config.json`:
434
+
435
+ **`planning.commit_docs`** (default: `true`)
436
+ - `true`: Planning artifacts committed to git (standard workflow)
437
+ - `false`: Planning artifacts kept local-only, not committed
438
+
439
+ When `commit_docs: false`:
440
+ - Add `.planning/` to your `.gitignore`
441
+ - Useful for OSS contributions, client projects, or keeping planning private
442
+ - All planning files still work normally, just not tracked in git
443
+
444
+ **`planning.search_gitignored`** (default: `false`)
445
+ - `true`: Add `--no-ignore` to broad ripgrep searches
446
+ - Only needed when `.planning/` is gitignored and you want project-wide searches to include it
447
+
448
+ Example config:
449
+ ```json
450
+ {
451
+ "planning": {
452
+ "commit_docs": false,
453
+ "search_gitignored": true
454
+ }
455
+ }
456
+ ```
457
+
340
458
  ## Common Workflows
341
459
 
342
460
  **Starting a new project:**