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.
- package/README.md +104 -0
- package/agents/gsd-entity-generator.md +237 -0
- package/agents/gsd-executor.md +15 -0
- package/agents/gsd-planner.md +22 -0
- package/bin/install.js +78 -7
- package/commands/gsd/analyze-codebase.md +410 -0
- package/commands/gsd/audit-milestone.md +20 -1
- package/commands/gsd/debug.md +20 -0
- package/commands/gsd/execute-phase.md +37 -4
- package/commands/gsd/help.md +91 -0
- package/commands/gsd/new-milestone.md +27 -7
- package/commands/gsd/new-project.md +104 -11
- package/commands/gsd/plan-phase.md +84 -26
- package/commands/gsd/progress.md +2 -0
- package/commands/gsd/query-intel.md +128 -0
- package/commands/gsd/quick.md +23 -0
- package/commands/gsd/research-phase.md +20 -0
- package/commands/gsd/set-profile.md +106 -0
- package/commands/gsd/settings.md +136 -0
- package/get-shit-done/references/model-profiles.md +73 -0
- package/get-shit-done/templates/config.json +5 -0
- package/get-shit-done/templates/entity.md +173 -0
- package/get-shit-done/workflows/execute-phase.md +45 -9
- package/get-shit-done/workflows/execute-plan.md +165 -4
- package/get-shit-done/workflows/map-codebase.md +24 -2
- package/get-shit-done/workflows/verify-work.md +22 -0
- package/hooks/dist/gsd-intel-index.js +97 -0
- package/hooks/dist/gsd-intel-prune.js +78 -0
- package/hooks/dist/gsd-intel-session.js +39 -0
- package/hooks/dist/statusline.js +84 -0
- package/package.json +12 -2
- package/scripts/build-hooks.js +95 -0
- /package/hooks/{gsd-check-update.js → dist/gsd-check-update.js} +0 -0
- /package/hooks/{statusline.js → dist/gsd-statusline.js} +0 -0
|
@@ -0,0 +1,410 @@
|
|
|
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
|
+
- Orchestrator selects files for entity generation (up to 50 based on priority)
|
|
33
|
+
- Spawns `gsd-entity-generator` subagent with file list (paths only, not contents)
|
|
34
|
+
- Subagent reads files in fresh 200k context, generates entities, writes to disk
|
|
35
|
+
- PostToolUse hook automatically syncs entities to graph.db
|
|
36
|
+
- Subagent returns statistics only (not entity contents)
|
|
37
|
+
- This preserves orchestrator context for large codebases (500+ files)
|
|
38
|
+
- Users can skip Step 9 if they only want the index (faster)
|
|
39
|
+
</context>
|
|
40
|
+
|
|
41
|
+
<process>
|
|
42
|
+
|
|
43
|
+
## Step 1: Create directory structure
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
mkdir -p .planning/intel
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Step 2: Find all indexable files
|
|
50
|
+
|
|
51
|
+
Use Glob tool with pattern: `**/*.{js,ts,jsx,tsx,mjs,cjs}`
|
|
52
|
+
|
|
53
|
+
Exclude directories (skip any path containing):
|
|
54
|
+
- node_modules
|
|
55
|
+
- dist
|
|
56
|
+
- build
|
|
57
|
+
- .git
|
|
58
|
+
- vendor
|
|
59
|
+
- coverage
|
|
60
|
+
- .next
|
|
61
|
+
- __pycache__
|
|
62
|
+
|
|
63
|
+
Filter results to remove excluded paths before processing.
|
|
64
|
+
|
|
65
|
+
## Step 3: Process each file
|
|
66
|
+
|
|
67
|
+
Initialize the index structure:
|
|
68
|
+
```javascript
|
|
69
|
+
{
|
|
70
|
+
version: 1,
|
|
71
|
+
updated: Date.now(),
|
|
72
|
+
files: {}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
For each file found:
|
|
77
|
+
|
|
78
|
+
1. Read file content using Read tool
|
|
79
|
+
|
|
80
|
+
2. Extract exports using these patterns:
|
|
81
|
+
- Named exports: `export\s*\{([^}]+)\}`
|
|
82
|
+
- Declaration exports: `export\s+(?:const|let|var|function\*?|async\s+function|class)\s+(\w+)`
|
|
83
|
+
- Default exports: `export\s+default\s+(?:function\s*\*?\s*|class\s+)?(\w+)?`
|
|
84
|
+
- CommonJS object: `module\.exports\s*=\s*\{([^}]+)\}`
|
|
85
|
+
- CommonJS single: `module\.exports\s*=\s*(\w+)\s*[;\n]`
|
|
86
|
+
- TypeScript: `export\s+(?:type|interface)\s+(\w+)`
|
|
87
|
+
|
|
88
|
+
3. Extract imports using these patterns:
|
|
89
|
+
- ES6: `import\s+(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)\s+from\s+['"]([^'"]+)['"]`
|
|
90
|
+
- Side-effect: `import\s+['"]([^'"]+)['"]` (not preceded by 'from')
|
|
91
|
+
- CommonJS: `require\s*\(\s*['"]([^'"]+)['"]\s*\)`
|
|
92
|
+
|
|
93
|
+
4. Store in index:
|
|
94
|
+
```javascript
|
|
95
|
+
index.files[absolutePath] = {
|
|
96
|
+
exports: [], // Array of export names
|
|
97
|
+
imports: [], // Array of import sources
|
|
98
|
+
indexed: Date.now()
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Step 4: Detect conventions
|
|
103
|
+
|
|
104
|
+
Analyze the collected index for patterns.
|
|
105
|
+
|
|
106
|
+
**Naming conventions** (require 5+ exports, 70%+ match rate):
|
|
107
|
+
- camelCase: `^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]+)+$` or single lowercase `^[a-z][a-z0-9]*$`
|
|
108
|
+
- PascalCase: `^[A-Z][a-z0-9]+(?:[A-Z][a-z0-9]+)*$` or single `^[A-Z][a-z0-9]+$`
|
|
109
|
+
- snake_case: `^[a-z][a-z0-9]*(?:_[a-z0-9]+)+$`
|
|
110
|
+
- SCREAMING_SNAKE: `^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)+$` or single `^[A-Z][A-Z0-9]*$`
|
|
111
|
+
- Skip 'default' when counting (it's a keyword, not naming convention)
|
|
112
|
+
|
|
113
|
+
**Directory patterns** (use lookup table):
|
|
114
|
+
```
|
|
115
|
+
components -> UI components
|
|
116
|
+
hooks -> React/custom hooks
|
|
117
|
+
utils, lib -> Utility functions
|
|
118
|
+
services -> Service layer
|
|
119
|
+
api, routes -> API endpoints
|
|
120
|
+
types -> TypeScript types
|
|
121
|
+
models -> Data models
|
|
122
|
+
tests, __tests__, test, spec -> Test files
|
|
123
|
+
controllers -> Controllers
|
|
124
|
+
middleware -> Middleware
|
|
125
|
+
config -> Configuration
|
|
126
|
+
constants -> Constants
|
|
127
|
+
pages -> Page components
|
|
128
|
+
views -> View templates
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Suffix patterns** (require 5+ occurrences):
|
|
132
|
+
```
|
|
133
|
+
.test.*, .spec.* -> Test files
|
|
134
|
+
.service.* -> Service layer
|
|
135
|
+
.controller.* -> Controllers
|
|
136
|
+
.model.* -> Data models
|
|
137
|
+
.util.*, .utils.* -> Utility functions
|
|
138
|
+
.helper.*, .helpers.* -> Helper functions
|
|
139
|
+
.config.* -> Configuration
|
|
140
|
+
.types.*, .type.* -> TypeScript types
|
|
141
|
+
.hook.*, .hooks.* -> React/custom hooks
|
|
142
|
+
.context.* -> React context
|
|
143
|
+
.store.* -> State store
|
|
144
|
+
.slice.* -> Redux slice
|
|
145
|
+
.reducer.* -> Redux reducer
|
|
146
|
+
.action.*, .actions.* -> Redux actions
|
|
147
|
+
.api.* -> API layer
|
|
148
|
+
.route.*, .routes.* -> Route definitions
|
|
149
|
+
.middleware.* -> Middleware
|
|
150
|
+
.schema.* -> Schema definitions
|
|
151
|
+
.mock.*, .mocks.* -> Mock data
|
|
152
|
+
.fixture.*, .fixtures.* -> Test fixtures
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Step 5: Write index.json
|
|
156
|
+
|
|
157
|
+
Write to `.planning/intel/index.json`:
|
|
158
|
+
```javascript
|
|
159
|
+
{
|
|
160
|
+
"version": 1,
|
|
161
|
+
"updated": 1737360330000,
|
|
162
|
+
"files": {
|
|
163
|
+
"/absolute/path/to/file.js": {
|
|
164
|
+
"exports": ["functionA", "ClassB"],
|
|
165
|
+
"imports": ["react", "./utils"],
|
|
166
|
+
"indexed": 1737360330000
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Step 6: Write conventions.json
|
|
173
|
+
|
|
174
|
+
Write to `.planning/intel/conventions.json`:
|
|
175
|
+
```javascript
|
|
176
|
+
{
|
|
177
|
+
"version": 1,
|
|
178
|
+
"updated": 1737360330000,
|
|
179
|
+
"naming": {
|
|
180
|
+
"exports": {
|
|
181
|
+
"dominant": "camelCase",
|
|
182
|
+
"count": 42,
|
|
183
|
+
"percentage": 85
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"directories": {
|
|
187
|
+
"components": { "purpose": "UI components", "files": 15 },
|
|
188
|
+
"hooks": { "purpose": "React/custom hooks", "files": 8 }
|
|
189
|
+
},
|
|
190
|
+
"suffixes": {
|
|
191
|
+
".test.js": { "purpose": "Test files", "count": 12 }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Step 7: Generate summary.md
|
|
197
|
+
|
|
198
|
+
Write to `.planning/intel/summary.md`:
|
|
199
|
+
|
|
200
|
+
```markdown
|
|
201
|
+
# Codebase Intelligence Summary
|
|
202
|
+
|
|
203
|
+
Last updated: [ISO timestamp]
|
|
204
|
+
Indexed files: [N]
|
|
205
|
+
|
|
206
|
+
## Naming Conventions
|
|
207
|
+
|
|
208
|
+
- Export naming: [case] ([percentage]% of [count] exports)
|
|
209
|
+
|
|
210
|
+
## Key Directories
|
|
211
|
+
|
|
212
|
+
- `[dir]/`: [purpose] ([N] files)
|
|
213
|
+
- ... (top 5)
|
|
214
|
+
|
|
215
|
+
## File Patterns
|
|
216
|
+
|
|
217
|
+
- `*[suffix]`: [purpose] ([count] files)
|
|
218
|
+
- ... (top 3)
|
|
219
|
+
|
|
220
|
+
Total exports: [N]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Target: < 500 tokens. Keep concise for context injection.
|
|
224
|
+
|
|
225
|
+
## Step 8: Report completion
|
|
226
|
+
|
|
227
|
+
Display summary statistics:
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
Codebase Analysis Complete
|
|
231
|
+
|
|
232
|
+
Files indexed: [N]
|
|
233
|
+
Exports found: [N]
|
|
234
|
+
Imports found: [N]
|
|
235
|
+
|
|
236
|
+
Conventions detected:
|
|
237
|
+
- Naming: [dominant case] ([percentage]%)
|
|
238
|
+
- Directories: [list]
|
|
239
|
+
- Patterns: [list]
|
|
240
|
+
|
|
241
|
+
Files created:
|
|
242
|
+
- .planning/intel/index.json
|
|
243
|
+
- .planning/intel/conventions.json
|
|
244
|
+
- .planning/intel/summary.md
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Step 9: Generate semantic entities (optional)
|
|
248
|
+
|
|
249
|
+
Generate entity files that capture semantic understanding of key files. These provide PURPOSE, not just syntax.
|
|
250
|
+
|
|
251
|
+
**Skip this step if:** User only wants the index, or codebase has < 10 files.
|
|
252
|
+
|
|
253
|
+
### 9.1 Create entities directory
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
mkdir -p .planning/intel/entities
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### 9.2 Select files for entity generation
|
|
260
|
+
|
|
261
|
+
Select up to 50 files based on these criteria (in priority order):
|
|
262
|
+
|
|
263
|
+
1. **High-export files:** 3+ exports (likely core modules)
|
|
264
|
+
2. **Hub files:** Referenced by 5+ other files (via imports analysis)
|
|
265
|
+
3. **Key directories:** Entry points (index.js, main.js, app.js), config files
|
|
266
|
+
4. **Structural files:** Files matching convention patterns (services, controllers, models)
|
|
267
|
+
|
|
268
|
+
From the index.json, identify candidates and limit to 50 files maximum per run.
|
|
269
|
+
|
|
270
|
+
### 9.3 Spawn entity generator subagent
|
|
271
|
+
|
|
272
|
+
Spawn `gsd-entity-generator` with the selected file list.
|
|
273
|
+
|
|
274
|
+
**Pass to subagent:**
|
|
275
|
+
- Total file count
|
|
276
|
+
- Output directory: `.planning/intel/entities/`
|
|
277
|
+
- Slug convention: `src/lib/db.ts` -> `src-lib-db` (replace / with -, remove extension, lowercase)
|
|
278
|
+
- Entity template (include full template from agent definition)
|
|
279
|
+
- List of absolute file paths (one per line)
|
|
280
|
+
|
|
281
|
+
**Task tool invocation:**
|
|
282
|
+
|
|
283
|
+
```python
|
|
284
|
+
# Build file list (one absolute path per line)
|
|
285
|
+
file_list = "\n".join(selected_files)
|
|
286
|
+
today = date.today().isoformat()
|
|
287
|
+
|
|
288
|
+
Task(
|
|
289
|
+
prompt=f"""Generate semantic entity documentation for key codebase files.
|
|
290
|
+
|
|
291
|
+
You are a GSD entity generator. Read source files and create semantic documentation that captures PURPOSE (what/why), not just syntax.
|
|
292
|
+
|
|
293
|
+
**Parameters:**
|
|
294
|
+
- Files to process: {len(selected_files)}
|
|
295
|
+
- Output directory: .planning/intel/entities/
|
|
296
|
+
- Date: {today}
|
|
297
|
+
|
|
298
|
+
**Slug convention:**
|
|
299
|
+
- Remove leading /
|
|
300
|
+
- Remove file extension
|
|
301
|
+
- Replace / and . with -
|
|
302
|
+
- Lowercase everything
|
|
303
|
+
- Example: src/lib/db.ts -> src-lib-db
|
|
304
|
+
|
|
305
|
+
**Entity template:**
|
|
306
|
+
```markdown
|
|
307
|
+
---
|
|
308
|
+
path: {{absolute_path}}
|
|
309
|
+
type: [module|component|util|config|api|hook|service|model|test]
|
|
310
|
+
updated: {today}
|
|
311
|
+
status: active
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
# {{filename}}
|
|
315
|
+
|
|
316
|
+
## Purpose
|
|
317
|
+
|
|
318
|
+
[1-3 sentences: What does this file do? Why does it exist? What problem does it solve?]
|
|
319
|
+
|
|
320
|
+
## Exports
|
|
321
|
+
|
|
322
|
+
- `functionName(params): ReturnType` - Brief description
|
|
323
|
+
- `ClassName` - What this class represents
|
|
324
|
+
|
|
325
|
+
If no exports: "None"
|
|
326
|
+
|
|
327
|
+
## Dependencies
|
|
328
|
+
|
|
329
|
+
- [[internal-file-slug]] - Why needed (for internal deps)
|
|
330
|
+
- external-package - What it provides (for npm packages)
|
|
331
|
+
|
|
332
|
+
If no dependencies: "None"
|
|
333
|
+
|
|
334
|
+
## Used By
|
|
335
|
+
|
|
336
|
+
TBD
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
**Process:**
|
|
340
|
+
For each file path below:
|
|
341
|
+
1. Read file content using Read tool
|
|
342
|
+
2. Analyze purpose, exports, dependencies
|
|
343
|
+
3. Check if entity already exists (skip if so)
|
|
344
|
+
4. Write entity to .planning/intel/entities/{{slug}}.md
|
|
345
|
+
5. PostToolUse hook syncs to graph.db automatically
|
|
346
|
+
|
|
347
|
+
**Files:**
|
|
348
|
+
{file_list}
|
|
349
|
+
|
|
350
|
+
**Return format:**
|
|
351
|
+
When complete, return ONLY statistics:
|
|
352
|
+
|
|
353
|
+
## ENTITY GENERATION COMPLETE
|
|
354
|
+
|
|
355
|
+
**Files processed:** {{N}}
|
|
356
|
+
**Entities created:** {{M}}
|
|
357
|
+
**Already existed:** {{K}}
|
|
358
|
+
**Errors:** {{E}}
|
|
359
|
+
|
|
360
|
+
Entities written to: .planning/intel/entities/
|
|
361
|
+
|
|
362
|
+
Do NOT include entity contents in your response.
|
|
363
|
+
""",
|
|
364
|
+
subagent_type="gsd-entity-generator"
|
|
365
|
+
)
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**Wait for completion:** Task() blocks until subagent finishes.
|
|
369
|
+
|
|
370
|
+
**Parse result:** Extract entities_created count from response for final report.
|
|
371
|
+
|
|
372
|
+
### 9.4 Verify entity generation
|
|
373
|
+
|
|
374
|
+
Confirm entities were written:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
ls .planning/intel/entities/*.md 2>/dev/null | wc -l
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### 9.5 Report entity statistics
|
|
381
|
+
|
|
382
|
+
```
|
|
383
|
+
Entity Generation Complete
|
|
384
|
+
|
|
385
|
+
Entity files created: [N] (from subagent response)
|
|
386
|
+
Location: .planning/intel/entities/
|
|
387
|
+
Graph database: Updated automatically via PostToolUse hook
|
|
388
|
+
|
|
389
|
+
Next: Intel hooks will continue incremental updates as you code.
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
</process>
|
|
393
|
+
|
|
394
|
+
<output>
|
|
395
|
+
- .planning/intel/index.json - File index with exports and imports
|
|
396
|
+
- .planning/intel/conventions.json - Detected naming and structural patterns
|
|
397
|
+
- .planning/intel/summary.md - Concise summary for context injection
|
|
398
|
+
- .planning/intel/entities/*.md - Semantic entity files (optional, Step 9)
|
|
399
|
+
</output>
|
|
400
|
+
|
|
401
|
+
<success_criteria>
|
|
402
|
+
- [ ] .planning/intel/ directory created
|
|
403
|
+
- [ ] All JS/TS files scanned (excluding node_modules, dist, build, .git, vendor, coverage)
|
|
404
|
+
- [ ] index.json populated with exports and imports for each file
|
|
405
|
+
- [ ] conventions.json has detected patterns (naming, directories, suffixes)
|
|
406
|
+
- [ ] summary.md is concise (< 500 tokens)
|
|
407
|
+
- [ ] Statistics reported to user
|
|
408
|
+
- [ ] Entity files generated for key files (if Step 9 executed)
|
|
409
|
+
- [ ] Entity files contain Purpose section with semantic understanding
|
|
410
|
+
</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
|
|
package/commands/gsd/debug.md
CHANGED
|
@@ -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
|
|
@@ -230,12 +253,22 @@ After user runs /gsd:plan-phase {Z} --gaps:
|
|
|
230
253
|
<wave_execution>
|
|
231
254
|
**Parallel spawning:**
|
|
232
255
|
|
|
233
|
-
|
|
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:
|
|
234
267
|
|
|
235
268
|
```
|
|
236
|
-
Task(prompt="Execute plan at {plan_01_path}\n\nPlan
|
|
237
|
-
Task(prompt="Execute plan at {plan_02_path}\n\nPlan
|
|
238
|
-
Task(prompt="Execute plan at {plan_03_path}\n\nPlan
|
|
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}")
|
|
239
272
|
```
|
|
240
273
|
|
|
241
274
|
All three run in parallel. Task tool blocks until all complete.
|
package/commands/gsd/help.md
CHANGED
|
@@ -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
|