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.
- package/README.md +104 -0
- package/agents/gsd-debugger.md +20 -1
- package/agents/gsd-executor.md +30 -0
- package/agents/gsd-phase-researcher.md +9 -0
- package/agents/gsd-planner.md +41 -0
- package/agents/gsd-research-synthesizer.md +9 -0
- package/bin/install.js +78 -7
- package/commands/gsd/add-todo.md +11 -0
- package/commands/gsd/analyze-codebase.md +363 -0
- package/commands/gsd/audit-milestone.md +20 -1
- package/commands/gsd/check-todos.md +11 -0
- package/commands/gsd/debug.md +20 -0
- package/commands/gsd/execute-phase.md +40 -5
- package/commands/gsd/help.md +118 -0
- package/commands/gsd/new-milestone.md +267 -263
- package/commands/gsd/new-project.md +116 -10
- package/commands/gsd/pause-work.md +11 -0
- package/commands/gsd/plan-milestone-gaps.md +11 -0
- package/commands/gsd/plan-phase.md +84 -26
- package/commands/gsd/progress.md +8 -0
- package/commands/gsd/query-intel.md +128 -0
- package/commands/gsd/quick.md +23 -0
- package/commands/gsd/remove-phase.md +11 -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/references/planning-config.md +94 -0
- package/get-shit-done/templates/config.json +9 -0
- package/get-shit-done/templates/entity.md +173 -0
- package/get-shit-done/workflows/complete-milestone.md +11 -0
- package/get-shit-done/workflows/diagnose-issues.md +11 -0
- package/get-shit-done/workflows/discuss-phase.md +11 -0
- package/get-shit-done/workflows/execute-phase.md +68 -9
- package/get-shit-done/workflows/execute-plan.md +188 -4
- package/get-shit-done/workflows/map-codebase.md +35 -2
- package/get-shit-done/workflows/verify-work.md +33 -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/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/statusline.js} +0 -0
|
@@ -252,6 +252,17 @@ Update any internal references to reflect new numbering.
|
|
|
252
252
|
<step name="commit">
|
|
253
253
|
Stage and commit the removal:
|
|
254
254
|
|
|
255
|
+
**Check planning config:**
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
259
|
+
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
|
263
|
+
|
|
264
|
+
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
265
|
+
|
|
255
266
|
```bash
|
|
256
267
|
git add .planning/
|
|
257
268
|
git commit -m "chore: remove phase {target} ({original-phase-name})"
|
|
@@ -31,6 +31,24 @@ Normalize phase input in step 1 before any directory lookups.
|
|
|
31
31
|
|
|
32
32
|
<process>
|
|
33
33
|
|
|
34
|
+
## 0. Resolve Model Profile
|
|
35
|
+
|
|
36
|
+
Read model profile for agent spawning:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Default to "balanced" if not set.
|
|
43
|
+
|
|
44
|
+
**Model lookup table:**
|
|
45
|
+
|
|
46
|
+
| Agent | quality | balanced | budget |
|
|
47
|
+
|-------|---------|----------|--------|
|
|
48
|
+
| gsd-phase-researcher | opus | sonnet | haiku |
|
|
49
|
+
|
|
50
|
+
Store resolved model for use in Task calls below.
|
|
51
|
+
|
|
34
52
|
## 1. Normalize and Validate Phase
|
|
35
53
|
|
|
36
54
|
```bash
|
|
@@ -132,6 +150,7 @@ Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
|
132
150
|
Task(
|
|
133
151
|
prompt=filled_prompt,
|
|
134
152
|
subagent_type="gsd-phase-researcher",
|
|
153
|
+
model="{researcher_model}",
|
|
135
154
|
description="Research Phase {phase}"
|
|
136
155
|
)
|
|
137
156
|
```
|
|
@@ -165,6 +184,7 @@ Research file: @.planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
|
165
184
|
Task(
|
|
166
185
|
prompt=continuation_prompt,
|
|
167
186
|
subagent_type="gsd-phase-researcher",
|
|
187
|
+
model="{researcher_model}",
|
|
168
188
|
description="Continue research Phase {phase}"
|
|
169
189
|
)
|
|
170
190
|
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: set-profile
|
|
3
|
+
description: Switch model profile for GSD agents (quality/balanced/budget)
|
|
4
|
+
arguments:
|
|
5
|
+
- name: profile
|
|
6
|
+
description: "Profile name: quality, balanced, or budget"
|
|
7
|
+
required: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Switch the model profile used by GSD agents. This controls which Claude model each agent uses, balancing quality vs token spend.
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<profiles>
|
|
15
|
+
| Profile | Description |
|
|
16
|
+
|---------|-------------|
|
|
17
|
+
| **quality** | Opus everywhere except read-only verification |
|
|
18
|
+
| **balanced** | Opus for planning, Sonnet for execution/verification (default) |
|
|
19
|
+
| **budget** | Sonnet for writing, Haiku for research/verification |
|
|
20
|
+
</profiles>
|
|
21
|
+
|
|
22
|
+
<process>
|
|
23
|
+
|
|
24
|
+
## 1. Validate argument
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
|
|
28
|
+
Error: Invalid profile "$ARGUMENTS.profile"
|
|
29
|
+
Valid profiles: quality, balanced, budget
|
|
30
|
+
STOP
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 2. Check for project
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
ls .planning/config.json 2>/dev/null
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If no `.planning/` directory:
|
|
40
|
+
```
|
|
41
|
+
Error: No GSD project found.
|
|
42
|
+
Run /gsd:new-project first to initialize a project.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## 3. Update config.json
|
|
46
|
+
|
|
47
|
+
Read current config:
|
|
48
|
+
```bash
|
|
49
|
+
cat .planning/config.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Update `model_profile` field (or add if missing):
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"model_profile": "$ARGUMENTS.profile"
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Write updated config back to `.planning/config.json`.
|
|
60
|
+
|
|
61
|
+
## 4. Confirm
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
✓ Model profile set to: $ARGUMENTS.profile
|
|
65
|
+
|
|
66
|
+
Agents will now use:
|
|
67
|
+
[Show table from model-profiles.md for selected profile]
|
|
68
|
+
|
|
69
|
+
Next spawned agents will use the new profile.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
</process>
|
|
73
|
+
|
|
74
|
+
<examples>
|
|
75
|
+
|
|
76
|
+
**Switch to budget mode:**
|
|
77
|
+
```
|
|
78
|
+
/gsd:set-profile budget
|
|
79
|
+
|
|
80
|
+
✓ Model profile set to: budget
|
|
81
|
+
|
|
82
|
+
Agents will now use:
|
|
83
|
+
| Agent | Model |
|
|
84
|
+
|-------|-------|
|
|
85
|
+
| gsd-planner | sonnet |
|
|
86
|
+
| gsd-executor | sonnet |
|
|
87
|
+
| gsd-verifier | haiku |
|
|
88
|
+
| ... | ... |
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Switch to quality mode:**
|
|
92
|
+
```
|
|
93
|
+
/gsd:set-profile quality
|
|
94
|
+
|
|
95
|
+
✓ Model profile set to: quality
|
|
96
|
+
|
|
97
|
+
Agents will now use:
|
|
98
|
+
| Agent | Model |
|
|
99
|
+
|-------|-------|
|
|
100
|
+
| gsd-planner | opus |
|
|
101
|
+
| gsd-executor | opus |
|
|
102
|
+
| gsd-verifier | sonnet |
|
|
103
|
+
| ... | ... |
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
</examples>
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsd:settings
|
|
3
|
+
description: Configure GSD workflow toggles and model profile
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Write
|
|
7
|
+
- AskUserQuestion
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Allow users to toggle workflow agents on/off and select model profile via interactive settings.
|
|
12
|
+
|
|
13
|
+
Updates `.planning/config.json` with workflow preferences and model profile selection.
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<process>
|
|
17
|
+
|
|
18
|
+
## 1. Validate Environment
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
ls .planning/config.json 2>/dev/null
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**If not found:** Error - run `/gsd:new-project` first.
|
|
25
|
+
|
|
26
|
+
## 2. Read Current Config
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
cat .planning/config.json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Parse current values (default to `true` if not present):
|
|
33
|
+
- `workflow.research` — spawn researcher during plan-phase
|
|
34
|
+
- `workflow.plan_check` — spawn plan checker during plan-phase
|
|
35
|
+
- `workflow.verifier` — spawn verifier during execute-phase
|
|
36
|
+
- `model_profile` — which model each agent uses (default: `balanced`)
|
|
37
|
+
|
|
38
|
+
## 3. Present Settings
|
|
39
|
+
|
|
40
|
+
Use AskUserQuestion with current values shown:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
AskUserQuestion([
|
|
44
|
+
{
|
|
45
|
+
question: "Which model profile for agents?",
|
|
46
|
+
header: "Model",
|
|
47
|
+
multiSelect: false,
|
|
48
|
+
options: [
|
|
49
|
+
{ label: "Quality", description: "Opus everywhere except verification (highest cost)" },
|
|
50
|
+
{ label: "Balanced (Recommended)", description: "Opus for planning, Sonnet for execution/verification" },
|
|
51
|
+
{ label: "Budget", description: "Sonnet for writing, Haiku for research/verification (lowest cost)" }
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
question: "Spawn Plan Researcher? (researches domain before planning)",
|
|
56
|
+
header: "Research",
|
|
57
|
+
multiSelect: false,
|
|
58
|
+
options: [
|
|
59
|
+
{ label: "Yes", description: "Research phase goals before planning" },
|
|
60
|
+
{ label: "No", description: "Skip research, plan directly" }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
question: "Spawn Plan Checker? (verifies plans before execution)",
|
|
65
|
+
header: "Plan Check",
|
|
66
|
+
multiSelect: false,
|
|
67
|
+
options: [
|
|
68
|
+
{ label: "Yes", description: "Verify plans meet phase goals" },
|
|
69
|
+
{ label: "No", description: "Skip plan verification" }
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
question: "Spawn Execution Verifier? (verifies phase completion)",
|
|
74
|
+
header: "Verifier",
|
|
75
|
+
multiSelect: false,
|
|
76
|
+
options: [
|
|
77
|
+
{ label: "Yes", description: "Verify must-haves after execution" },
|
|
78
|
+
{ label: "No", description: "Skip post-execution verification" }
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
])
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Pre-select based on current config values.**
|
|
85
|
+
|
|
86
|
+
## 4. Update Config
|
|
87
|
+
|
|
88
|
+
Merge new settings into existing config.json:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
...existing_config,
|
|
93
|
+
"model_profile": "quality" | "balanced" | "budget",
|
|
94
|
+
"workflow": {
|
|
95
|
+
"research": true/false,
|
|
96
|
+
"plan_check": true/false,
|
|
97
|
+
"verifier": true/false
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Write updated config to `.planning/config.json`.
|
|
103
|
+
|
|
104
|
+
## 5. Confirm Changes
|
|
105
|
+
|
|
106
|
+
Display:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
110
|
+
GSD ► SETTINGS UPDATED
|
|
111
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
112
|
+
|
|
113
|
+
| Setting | Value |
|
|
114
|
+
|----------------------|-------|
|
|
115
|
+
| Model Profile | {quality/balanced/budget} |
|
|
116
|
+
| Plan Researcher | {On/Off} |
|
|
117
|
+
| Plan Checker | {On/Off} |
|
|
118
|
+
| Execution Verifier | {On/Off} |
|
|
119
|
+
|
|
120
|
+
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
|
121
|
+
|
|
122
|
+
Quick commands:
|
|
123
|
+
- /gsd:set-profile <profile> — switch model profile
|
|
124
|
+
- /gsd:plan-phase --research — force research
|
|
125
|
+
- /gsd:plan-phase --skip-research — skip research
|
|
126
|
+
- /gsd:plan-phase --skip-verify — skip plan check
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</process>
|
|
130
|
+
|
|
131
|
+
<success_criteria>
|
|
132
|
+
- [ ] Current config read
|
|
133
|
+
- [ ] User presented with 4 settings (profile + 3 toggles)
|
|
134
|
+
- [ ] Config updated with model_profile and workflow section
|
|
135
|
+
- [ ] Changes confirmed to user
|
|
136
|
+
</success_criteria>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Model Profiles
|
|
2
|
+
|
|
3
|
+
Model profiles control which Claude model each GSD agent uses. This allows balancing quality vs token spend.
|
|
4
|
+
|
|
5
|
+
## Profile Definitions
|
|
6
|
+
|
|
7
|
+
| Agent | `quality` | `balanced` | `budget` |
|
|
8
|
+
|-------|-----------|------------|----------|
|
|
9
|
+
| gsd-planner | opus | opus | sonnet |
|
|
10
|
+
| gsd-roadmapper | opus | sonnet | sonnet |
|
|
11
|
+
| gsd-executor | opus | sonnet | sonnet |
|
|
12
|
+
| gsd-phase-researcher | opus | sonnet | haiku |
|
|
13
|
+
| gsd-project-researcher | opus | sonnet | haiku |
|
|
14
|
+
| gsd-research-synthesizer | sonnet | sonnet | haiku |
|
|
15
|
+
| gsd-debugger | opus | sonnet | sonnet |
|
|
16
|
+
| gsd-codebase-mapper | sonnet | haiku | haiku |
|
|
17
|
+
| gsd-verifier | sonnet | sonnet | haiku |
|
|
18
|
+
| gsd-plan-checker | sonnet | sonnet | haiku |
|
|
19
|
+
| gsd-integration-checker | sonnet | sonnet | haiku |
|
|
20
|
+
|
|
21
|
+
## Profile Philosophy
|
|
22
|
+
|
|
23
|
+
**quality** - Maximum reasoning power
|
|
24
|
+
- Opus for all decision-making agents
|
|
25
|
+
- Sonnet for read-only verification
|
|
26
|
+
- Use when: quota available, critical architecture work
|
|
27
|
+
|
|
28
|
+
**balanced** (default) - Smart allocation
|
|
29
|
+
- Opus only for planning (where architecture decisions happen)
|
|
30
|
+
- Sonnet for execution and research (follows explicit instructions)
|
|
31
|
+
- Sonnet for verification (needs reasoning, not just pattern matching)
|
|
32
|
+
- Use when: normal development, good balance of quality and cost
|
|
33
|
+
|
|
34
|
+
**budget** - Minimal Opus usage
|
|
35
|
+
- Sonnet for anything that writes code
|
|
36
|
+
- Haiku for research and verification
|
|
37
|
+
- Use when: conserving quota, high-volume work, less critical phases
|
|
38
|
+
|
|
39
|
+
## Resolution Logic
|
|
40
|
+
|
|
41
|
+
Orchestrators resolve model before spawning:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
1. Read .planning/config.json
|
|
45
|
+
2. Get model_profile (default: "balanced")
|
|
46
|
+
3. Look up agent in table above
|
|
47
|
+
4. Pass model parameter to Task call
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Switching Profiles
|
|
51
|
+
|
|
52
|
+
Runtime: `/gsd:set-profile <profile>`
|
|
53
|
+
|
|
54
|
+
Per-project default: Set in `.planning/config.json`:
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"model_profile": "balanced"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Design Rationale
|
|
62
|
+
|
|
63
|
+
**Why Opus for gsd-planner?**
|
|
64
|
+
Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
|
|
65
|
+
|
|
66
|
+
**Why Sonnet for gsd-executor?**
|
|
67
|
+
Executors follow explicit PLAN.md instructions. The plan already contains the reasoning; execution is implementation.
|
|
68
|
+
|
|
69
|
+
**Why Sonnet (not Haiku) for verifiers in balanced?**
|
|
70
|
+
Verification requires goal-backward reasoning - checking if code *delivers* what the phase promised, not just pattern matching. Sonnet handles this well; Haiku may miss subtle gaps.
|
|
71
|
+
|
|
72
|
+
**Why Haiku for gsd-codebase-mapper?**
|
|
73
|
+
Read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<planning_config>
|
|
2
|
+
|
|
3
|
+
Configuration options for `.planning/` directory behavior.
|
|
4
|
+
|
|
5
|
+
<config_schema>
|
|
6
|
+
```json
|
|
7
|
+
"planning": {
|
|
8
|
+
"commit_docs": true,
|
|
9
|
+
"search_gitignored": false
|
|
10
|
+
}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
| Option | Default | Description |
|
|
14
|
+
|--------|---------|-------------|
|
|
15
|
+
| `commit_docs` | `true` | Whether to commit planning artifacts to git |
|
|
16
|
+
| `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
|
|
17
|
+
</config_schema>
|
|
18
|
+
|
|
19
|
+
<commit_docs_behavior>
|
|
20
|
+
|
|
21
|
+
**When `commit_docs: true` (default):**
|
|
22
|
+
- Planning files committed normally
|
|
23
|
+
- SUMMARY.md, STATE.md, ROADMAP.md tracked in git
|
|
24
|
+
- Full history of planning decisions preserved
|
|
25
|
+
|
|
26
|
+
**When `commit_docs: false`:**
|
|
27
|
+
- Skip all `git add`/`git commit` for `.planning/` files
|
|
28
|
+
- User must add `.planning/` to `.gitignore`
|
|
29
|
+
- Useful for: OSS contributions, client projects, keeping planning private
|
|
30
|
+
|
|
31
|
+
**Checking the config:**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Check config.json first
|
|
35
|
+
COMMIT_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
36
|
+
|
|
37
|
+
# Auto-detect gitignored (overrides config)
|
|
38
|
+
git check-ignore -q .planning 2>/dev/null && COMMIT_DOCS=false
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Auto-detection:** If `.planning/` is gitignored, `commit_docs` is automatically `false` regardless of config.json. This prevents git errors when users have `.planning/` in `.gitignore`.
|
|
42
|
+
|
|
43
|
+
**Conditional git operations:**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
if [ "$COMMIT_DOCS" = "true" ]; then
|
|
47
|
+
git add .planning/STATE.md
|
|
48
|
+
git commit -m "docs: update state"
|
|
49
|
+
fi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</commit_docs_behavior>
|
|
53
|
+
|
|
54
|
+
<search_behavior>
|
|
55
|
+
|
|
56
|
+
**When `search_gitignored: false` (default):**
|
|
57
|
+
- Standard rg behavior (respects .gitignore)
|
|
58
|
+
- Direct path searches work: `rg "pattern" .planning/` finds files
|
|
59
|
+
- Broad searches skip gitignored: `rg "pattern"` skips `.planning/`
|
|
60
|
+
|
|
61
|
+
**When `search_gitignored: true`:**
|
|
62
|
+
- Add `--no-ignore` to broad rg searches that should include `.planning/`
|
|
63
|
+
- Only needed when searching entire repo and expecting `.planning/` matches
|
|
64
|
+
|
|
65
|
+
**Note:** Most GSD operations use direct file reads or explicit paths, which work regardless of gitignore status.
|
|
66
|
+
|
|
67
|
+
</search_behavior>
|
|
68
|
+
|
|
69
|
+
<setup_uncommitted_mode>
|
|
70
|
+
|
|
71
|
+
To use uncommitted mode:
|
|
72
|
+
|
|
73
|
+
1. **Set config:**
|
|
74
|
+
```json
|
|
75
|
+
"planning": {
|
|
76
|
+
"commit_docs": false,
|
|
77
|
+
"search_gitignored": true
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
2. **Add to .gitignore:**
|
|
82
|
+
```
|
|
83
|
+
.planning/
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
3. **Existing tracked files:** If `.planning/` was previously tracked:
|
|
87
|
+
```bash
|
|
88
|
+
git rm -r --cached .planning/
|
|
89
|
+
git commit -m "chore: stop tracking planning docs"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
</setup_uncommitted_mode>
|
|
93
|
+
|
|
94
|
+
</planning_config>
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mode": "interactive",
|
|
3
3
|
"depth": "standard",
|
|
4
|
+
"workflow": {
|
|
5
|
+
"research": true,
|
|
6
|
+
"plan_check": true,
|
|
7
|
+
"verifier": true
|
|
8
|
+
},
|
|
9
|
+
"planning": {
|
|
10
|
+
"commit_docs": true,
|
|
11
|
+
"search_gitignored": false
|
|
12
|
+
},
|
|
4
13
|
"parallelization": {
|
|
5
14
|
"enabled": true,
|
|
6
15
|
"plan_level": true,
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Entity Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/codebase/{entity-slug}.md` - file-level intelligence documentation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
path: {path}
|
|
12
|
+
type: {type}
|
|
13
|
+
updated: {updated}
|
|
14
|
+
status: {status}
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# {filename}
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
{purpose}
|
|
22
|
+
|
|
23
|
+
## Exports
|
|
24
|
+
|
|
25
|
+
{exports}
|
|
26
|
+
|
|
27
|
+
## Dependencies
|
|
28
|
+
|
|
29
|
+
{dependencies}
|
|
30
|
+
|
|
31
|
+
## Used By
|
|
32
|
+
|
|
33
|
+
{used_by}
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
{notes}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Field Reference
|
|
43
|
+
|
|
44
|
+
### Frontmatter
|
|
45
|
+
|
|
46
|
+
| Field | Values | Description |
|
|
47
|
+
|-------|--------|-------------|
|
|
48
|
+
| `path` | Absolute path | Full path to the file |
|
|
49
|
+
| `type` | module, component, util, config, test, api, hook | Primary classification |
|
|
50
|
+
| `updated` | YYYY-MM-DD | Last time this entity was updated |
|
|
51
|
+
| `status` | active, deprecated, stub | Current state |
|
|
52
|
+
|
|
53
|
+
### Sections
|
|
54
|
+
|
|
55
|
+
**Purpose** (required)
|
|
56
|
+
1-3 sentences covering:
|
|
57
|
+
- What this file does
|
|
58
|
+
- Why it exists
|
|
59
|
+
- Who/what uses it (high-level)
|
|
60
|
+
|
|
61
|
+
**Exports** (required for modules with exports)
|
|
62
|
+
List each export with signature and description:
|
|
63
|
+
```markdown
|
|
64
|
+
- `functionName(arg: Type): ReturnType` - What it does
|
|
65
|
+
- `ClassName` - What it represents
|
|
66
|
+
- `CONSTANT_NAME` - What value it holds
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For files without exports (config, tests), write "None" or describe what the file defines.
|
|
70
|
+
|
|
71
|
+
**Dependencies** (required)
|
|
72
|
+
Internal dependencies use wiki-links (slugified paths):
|
|
73
|
+
```markdown
|
|
74
|
+
- [[src-lib-db]] - Database client
|
|
75
|
+
- [[src-types-user]] - User type definitions
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
External dependencies use plain text:
|
|
79
|
+
```markdown
|
|
80
|
+
- react - Component framework
|
|
81
|
+
- jose - JWT handling
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Used By** (grows over time)
|
|
85
|
+
Files that import this one, using wiki-links:
|
|
86
|
+
```markdown
|
|
87
|
+
- [[src-app-api-auth-route]]
|
|
88
|
+
- [[src-components-dashboard]]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Initially may be empty or incomplete. Updated as Claude encounters imports.
|
|
92
|
+
|
|
93
|
+
**Notes** (optional)
|
|
94
|
+
Patterns, gotchas, or context:
|
|
95
|
+
```markdown
|
|
96
|
+
- Uses singleton pattern for connection pooling
|
|
97
|
+
- WARNING: Must call `init()` before any other method
|
|
98
|
+
- Related: See [[src-lib-cache]] for caching layer
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Slug Convention
|
|
104
|
+
|
|
105
|
+
Entity slugs are derived from file paths:
|
|
106
|
+
- `src/lib/db.ts` becomes `src-lib-db`
|
|
107
|
+
- `src/app/api/auth/route.ts` becomes `src-app-api-auth-route`
|
|
108
|
+
|
|
109
|
+
Rule: Replace `/` and `.` with `-`, drop file extension.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Example
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
---
|
|
117
|
+
path: /project/src/lib/auth.ts
|
|
118
|
+
type: util
|
|
119
|
+
updated: 2025-01-15
|
|
120
|
+
status: active
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
# auth.ts
|
|
124
|
+
|
|
125
|
+
## Purpose
|
|
126
|
+
|
|
127
|
+
JWT token management using jose library. Handles token creation, verification, and refresh rotation. Used by all protected API routes via middleware.
|
|
128
|
+
|
|
129
|
+
## Exports
|
|
130
|
+
|
|
131
|
+
- `createAccessToken(userId: string): Promise<string>` - Creates 15-min access token
|
|
132
|
+
- `createRefreshToken(userId: string): Promise<string>` - Creates 7-day refresh token
|
|
133
|
+
- `verifyToken(token: string): Promise<TokenPayload>` - Validates and decodes token
|
|
134
|
+
- `rotateRefresh(oldToken: string): Promise<TokenPair>` - Issues new token pair
|
|
135
|
+
|
|
136
|
+
## Dependencies
|
|
137
|
+
|
|
138
|
+
- [[src-lib-db]] - Stores refresh tokens for revocation
|
|
139
|
+
- [[src-types-auth]] - TokenPayload, TokenPair types
|
|
140
|
+
- jose - JWT signing and verification
|
|
141
|
+
- bcrypt - Password hashing
|
|
142
|
+
|
|
143
|
+
## Used By
|
|
144
|
+
|
|
145
|
+
- [[src-middleware]]
|
|
146
|
+
- [[src-app-api-auth-login-route]]
|
|
147
|
+
- [[src-app-api-auth-logout-route]]
|
|
148
|
+
- [[src-app-api-auth-refresh-route]]
|
|
149
|
+
|
|
150
|
+
## Notes
|
|
151
|
+
|
|
152
|
+
- Access tokens are stateless; refresh tokens stored in DB for revocation
|
|
153
|
+
- Uses RS256 algorithm with keys from environment
|
|
154
|
+
- WARNING: Never log token values, even in debug mode
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Guidelines
|
|
160
|
+
|
|
161
|
+
**When to create/update:**
|
|
162
|
+
- After modifying a file during plan execution
|
|
163
|
+
- When encountering a file that lacks documentation
|
|
164
|
+
- When relationships change (new imports, exports)
|
|
165
|
+
|
|
166
|
+
**Minimal viable entity:**
|
|
167
|
+
At minimum, an entity needs frontmatter + Purpose. Other sections can be "TBD" if unknown.
|
|
168
|
+
|
|
169
|
+
**Accuracy over completeness:**
|
|
170
|
+
Better to have partial accurate info than complete guesses. Mark unknowns explicitly.
|
|
171
|
+
|
|
172
|
+
**Link discovery:**
|
|
173
|
+
The hook that processes entities extracts all `[[wiki-links]]` to build the relationship graph. Ensure links use correct slug format.
|
|
@@ -620,6 +620,17 @@ git push origin v[X.Y]
|
|
|
620
620
|
|
|
621
621
|
Commit milestone completion including archive files and deletions.
|
|
622
622
|
|
|
623
|
+
**Check planning config:**
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
627
|
+
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
|
631
|
+
|
|
632
|
+
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
633
|
+
|
|
623
634
|
```bash
|
|
624
635
|
# Stage archive files (new)
|
|
625
636
|
git add .planning/milestones/v[X.Y]-ROADMAP.md
|
|
@@ -156,6 +156,17 @@ For each gap in the Gaps section, add artifacts and missing fields:
|
|
|
156
156
|
|
|
157
157
|
Update status in frontmatter to "diagnosed".
|
|
158
158
|
|
|
159
|
+
**Check planning config:**
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
163
|
+
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
|
167
|
+
|
|
168
|
+
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
169
|
+
|
|
159
170
|
Commit the updated UAT.md:
|
|
160
171
|
```bash
|
|
161
172
|
git add ".planning/phases/XX-name/{phase}-UAT.md"
|