gsd-opencode 1.10.2 → 1.20.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/agents/gsd-codebase-mapper.md +29 -3
- package/agents/gsd-debugger.md +19 -21
- package/agents/gsd-executor.md +213 -528
- package/agents/gsd-integration-checker.md +20 -0
- package/agents/gsd-phase-researcher.md +189 -267
- package/agents/gsd-plan-checker.md +278 -279
- package/agents/gsd-planner.md +299 -490
- package/agents/gsd-project-researcher.md +103 -345
- package/agents/gsd-research-synthesizer.md +5 -22
- package/agents/gsd-roadmapper.md +43 -6
- package/agents/gsd-verifier.md +158 -377
- package/{lib → bin/dm/lib}/constants.js +10 -3
- package/{src → bin/dm/src}/commands/install.js +5 -4
- package/{src → bin/dm/src}/commands/uninstall.js +3 -1
- package/{src → bin/dm/src}/services/backup-manager.js +1 -1
- package/{src → bin/dm/src}/services/config.js +1 -1
- package/{src → bin/dm/src}/services/file-ops.js +20 -4
- package/{src → bin/dm/src}/services/health-checker.js +3 -1
- package/{src → bin/dm/src}/services/repair-service.js +3 -1
- package/{src → bin/dm/src}/services/settings.js +1 -1
- package/{src → bin/dm/src}/services/update-service.js +2 -2
- package/bin/gsd-install.js +0 -0
- package/bin/gsd.js +9 -9
- package/commands/gsd/gsd-add-phase.md +43 -0
- package/commands/gsd/gsd-add-todo.md +47 -0
- package/commands/gsd/gsd-audit-milestone.md +36 -0
- package/commands/gsd/gsd-check-todos.md +45 -0
- package/commands/gsd/gsd-cleanup.md +18 -0
- package/commands/gsd/{complete-milestone.md → gsd-complete-milestone.md} +1 -1
- package/commands/gsd/{debug.md → gsd-debug.md} +16 -21
- package/commands/gsd/{discuss-phase.md → gsd-discuss-phase.md} +6 -9
- package/commands/gsd/gsd-execute-phase.md +41 -0
- package/commands/gsd/gsd-health.md +22 -0
- package/commands/gsd/gsd-help.md +22 -0
- package/commands/gsd/gsd-insert-phase.md +32 -0
- package/commands/gsd/gsd-join-discord.md +18 -0
- package/commands/gsd/{list-phase-assumptions.md → gsd-list-phase-assumptions.md} +3 -7
- package/commands/gsd/{map-codebase.md → gsd-map-codebase.md} +3 -3
- package/commands/gsd/gsd-new-milestone.md +44 -0
- package/commands/gsd/gsd-new-project.md +42 -0
- package/commands/gsd/gsd-pause-work.md +38 -0
- package/commands/gsd/gsd-plan-milestone-gaps.md +34 -0
- package/commands/gsd/gsd-plan-phase.md +44 -0
- package/commands/gsd/gsd-progress.md +24 -0
- package/commands/gsd/gsd-quick.md +41 -0
- package/commands/gsd/gsd-reapply-patches.md +119 -0
- package/commands/gsd/gsd-remove-phase.md +31 -0
- package/commands/gsd/{research-phase.md → gsd-research-phase.md} +38 -49
- package/commands/gsd/{resume-work.md → gsd-resume-work.md} +2 -2
- package/commands/gsd/gsd-set-profile.md +34 -0
- package/commands/gsd/gsd-settings.md +36 -0
- package/commands/gsd/gsd-update.md +37 -0
- package/commands/gsd/gsd-verify-work.md +38 -0
- package/get-shit-done/bin/gsd-tools.cjs +553 -0
- package/get-shit-done/bin/gsd-tools.test.cjs +2346 -0
- package/get-shit-done/bin/lib/commands.cjs +556 -0
- package/get-shit-done/bin/lib/config.cjs +162 -0
- package/get-shit-done/bin/lib/core.cjs +377 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
- package/get-shit-done/bin/lib/init.cjs +694 -0
- package/get-shit-done/bin/lib/milestone.cjs +215 -0
- package/get-shit-done/bin/lib/phase.cjs +877 -0
- package/get-shit-done/bin/lib/roadmap.cjs +298 -0
- package/get-shit-done/bin/lib/state.cjs +490 -0
- package/get-shit-done/bin/lib/template.cjs +222 -0
- package/get-shit-done/bin/lib/verify.cjs +772 -0
- package/get-shit-done/references/checkpoints.md +62 -364
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +10 -16
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +34 -0
- package/get-shit-done/references/model-profiles.md +54 -66
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +112 -10
- package/get-shit-done/references/questioning.md +4 -0
- package/get-shit-done/references/ui-brand.md +1 -1
- package/get-shit-done/templates/UAT.md +1 -1
- package/get-shit-done/templates/VALIDATION.md +104 -0
- package/get-shit-done/templates/codebase/structure.md +6 -6
- package/get-shit-done/templates/config.json +37 -0
- package/get-shit-done/templates/context.md +2 -10
- package/get-shit-done/templates/continue-here.md +6 -6
- package/get-shit-done/templates/debug-subagent-prompt.md +2 -2
- package/get-shit-done/templates/discovery.md +6 -6
- package/get-shit-done/templates/milestone-archive.md +3 -3
- package/get-shit-done/templates/phase-prompt.md +9 -7
- package/get-shit-done/templates/planner-subagent-prompt.md +6 -6
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
- package/get-shit-done/templates/research.md +29 -6
- package/get-shit-done/templates/roadmap.md +1 -1
- package/get-shit-done/templates/state.md +0 -30
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +16 -37
- package/get-shit-done/templates/user-setup.md +1 -13
- package/get-shit-done/templates/verification-report.md +5 -5
- package/get-shit-done/workflows/add-phase.md +111 -0
- package/{commands/gsd → get-shit-done/workflows}/add-todo.md +24 -60
- package/{commands/gsd → get-shit-done/workflows}/audit-milestone.md +83 -63
- package/{commands/gsd → get-shit-done/workflows}/check-todos.md +21 -73
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +251 -312
- package/get-shit-done/workflows/diagnose-issues.md +6 -31
- package/get-shit-done/workflows/discovery-phase.md +11 -11
- package/get-shit-done/workflows/discuss-phase.md +156 -49
- package/get-shit-done/workflows/execute-phase.md +238 -396
- package/get-shit-done/workflows/execute-plan.md +180 -1609
- package/get-shit-done/workflows/health.md +156 -0
- package/{commands/gsd → get-shit-done/workflows}/help.md +33 -35
- package/get-shit-done/workflows/insert-phase.md +129 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +3 -3
- package/get-shit-done/workflows/map-codebase.md +73 -80
- package/get-shit-done/workflows/new-milestone.md +382 -0
- package/{commands/gsd → get-shit-done/workflows}/new-project.md +281 -234
- package/get-shit-done/workflows/oc-set-profile.md +320 -0
- package/{commands/gsd → get-shit-done/workflows}/pause-work.md +31 -43
- package/{commands/gsd → get-shit-done/workflows}/plan-milestone-gaps.md +29 -50
- package/get-shit-done/workflows/plan-phase.md +478 -0
- package/{commands/gsd → get-shit-done/workflows}/progress.md +64 -47
- package/get-shit-done/workflows/quick.md +453 -0
- package/get-shit-done/workflows/remove-phase.md +154 -0
- package/get-shit-done/workflows/research-phase.md +73 -0
- package/get-shit-done/workflows/resume-project.md +17 -26
- package/get-shit-done/workflows/set-profile.md +80 -0
- package/get-shit-done/workflows/settings.md +213 -0
- package/get-shit-done/workflows/transition.md +84 -104
- package/{commands/gsd → get-shit-done/workflows}/update.md +70 -28
- package/get-shit-done/workflows/verify-phase.md +106 -492
- package/get-shit-done/workflows/verify-work.md +26 -53
- package/package.json +7 -4
- package/rules/gsd-oc-work-hard.md +36 -0
- package/skills/gsd-oc-select-model/SKILL.md +348 -0
- package/skills/gsd-oc-select-model/scripts/select-models.cjs +268 -0
- package/agents/gsd-set-model.md +0 -287
- package/agents/gsd-set-profile.md +0 -239
- package/agents/gsd-settings.md +0 -749
- package/bin/install.js +0 -323
- package/commands/gsd/add-phase.md +0 -207
- package/commands/gsd/execute-phase.md +0 -339
- package/commands/gsd/insert-phase.md +0 -227
- package/commands/gsd/new-milestone.md +0 -721
- package/commands/gsd/plan-phase.md +0 -525
- package/commands/gsd/quick.md +0 -309
- package/commands/gsd/remove-phase.md +0 -349
- package/commands/gsd/set-model.md +0 -77
- package/commands/gsd/set-profile.md +0 -46
- package/commands/gsd/settings.md +0 -33
- package/commands/gsd/verify-work.md +0 -219
- package/commands/gsd/whats-new.md +0 -124
- /package/{src → bin/dm/src}/commands/check.js +0 -0
- /package/{src → bin/dm/src}/commands/config.js +0 -0
- /package/{src → bin/dm/src}/commands/list.js +0 -0
- /package/{src → bin/dm/src}/commands/repair.js +0 -0
- /package/{src → bin/dm/src}/commands/update.js +0 -0
- /package/{src → bin/dm/src}/services/manifest-manager.js +0 -0
- /package/{src → bin/dm/src}/services/migration-service.js +0 -0
- /package/{src → bin/dm/src}/services/scope-manager.js +0 -0
- /package/{src → bin/dm/src}/services/structure-detector.js +0 -0
- /package/{src → bin/dm/src}/utils/hash.js +0 -0
- /package/{src → bin/dm/src}/utils/interactive.js +0 -0
- /package/{src → bin/dm/src}/utils/logger.js +0 -0
- /package/{src → bin/dm/src}/utils/npm-registry.js +0 -0
- /package/{src → bin/dm/src}/utils/path-resolver.js +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Decimal Phase Calculation
|
|
2
|
+
|
|
3
|
+
Calculate the next decimal phase number for urgent insertions.
|
|
4
|
+
|
|
5
|
+
## Using gsd-tools
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Get next decimal phase after phase 6
|
|
9
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase next-decimal 6
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Output:
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"found": true,
|
|
16
|
+
"base_phase": "06",
|
|
17
|
+
"next": "06.1",
|
|
18
|
+
"existing": []
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With existing decimals:
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"found": true,
|
|
26
|
+
"base_phase": "06",
|
|
27
|
+
"next": "06.3",
|
|
28
|
+
"existing": ["06.1", "06.2"]
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Extract Values
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
DECIMAL_INFO=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase next-decimal "${AFTER_PHASE}")
|
|
36
|
+
DECIMAL_PHASE=$(echo "$DECIMAL_INFO" | jq -r '.next')
|
|
37
|
+
BASE_PHASE=$(echo "$DECIMAL_INFO" | jq -r '.base_phase')
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or with --raw flag:
|
|
41
|
+
```bash
|
|
42
|
+
DECIMAL_PHASE=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs phase next-decimal "${AFTER_PHASE}" --raw)
|
|
43
|
+
# Returns just: 06.1
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
| Existing Phases | Next Phase |
|
|
49
|
+
|-----------------|------------|
|
|
50
|
+
| 06 only | 06.1 |
|
|
51
|
+
| 06, 06.1 | 06.2 |
|
|
52
|
+
| 06, 06.1, 06.2 | 06.3 |
|
|
53
|
+
| 06, 06.1, 06.3 (gap) | 06.4 |
|
|
54
|
+
|
|
55
|
+
## Directory Naming
|
|
56
|
+
|
|
57
|
+
Decimal phase directories use the full decimal number:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
SLUG=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs generate-slug "$DESCRIPTION" --raw)
|
|
61
|
+
PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
|
|
62
|
+
mkdir -p "$PHASE_DIR"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Example: `.planning/phases/06.1-fix-critical-auth-bug/`
|
|
@@ -17,7 +17,7 @@ The git log should read like a changelog of what shipped, not a diary of plannin
|
|
|
17
17
|
| PLAN.md created | NO | Intermediate - commit with plan completion |
|
|
18
18
|
| RESEARCH.md created | NO | Intermediate |
|
|
19
19
|
| DISCOVERY.md created | NO | Intermediate |
|
|
20
|
-
| **
|
|
20
|
+
| **task completed** | YES | Atomic unit of work (1 commit per task) |
|
|
21
21
|
| **Plan completed** | YES | Metadata commit (SUMMARY + STATE + ROADMAP) |
|
|
22
22
|
| Handoff created | YES | WIP state preserved |
|
|
23
23
|
|
|
@@ -51,14 +51,13 @@ Phases:
|
|
|
51
51
|
What to commit:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
|
|
55
|
-
git commit
|
|
54
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: initialize [project-name] ([N] phases)" --files .planning/
|
|
56
55
|
```
|
|
57
56
|
|
|
58
57
|
</format>
|
|
59
58
|
|
|
60
59
|
<format name="task-completion">
|
|
61
|
-
##
|
|
60
|
+
## task Completion (During Plan Execution)
|
|
62
61
|
|
|
63
62
|
Each task gets its own commit immediately after completion.
|
|
64
63
|
|
|
@@ -120,9 +119,9 @@ After all tasks committed, one final metadata commit captures plan completion.
|
|
|
120
119
|
docs({phase}-{plan}): complete [plan-name] plan
|
|
121
120
|
|
|
122
121
|
Tasks completed: [N]/[N]
|
|
123
|
-
- [
|
|
124
|
-
- [
|
|
125
|
-
- [
|
|
122
|
+
- [task 1 name]
|
|
123
|
+
- [task 2 name]
|
|
124
|
+
- [task 3 name]
|
|
126
125
|
|
|
127
126
|
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
128
127
|
```
|
|
@@ -130,11 +129,7 @@ SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
|
130
129
|
What to commit:
|
|
131
130
|
|
|
132
131
|
```bash
|
|
133
|
-
|
|
134
|
-
git add .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
135
|
-
git add .planning/STATE.md
|
|
136
|
-
git add .planning/ROADMAP.md
|
|
137
|
-
git commit
|
|
132
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
|
|
138
133
|
```
|
|
139
134
|
|
|
140
135
|
**Note:** Code files NOT included - already committed per-task.
|
|
@@ -154,8 +149,7 @@ Current: [task name]
|
|
|
154
149
|
What to commit:
|
|
155
150
|
|
|
156
151
|
```bash
|
|
157
|
-
|
|
158
|
-
git commit
|
|
152
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/
|
|
159
153
|
```
|
|
160
154
|
|
|
161
155
|
</format>
|
|
@@ -228,7 +222,7 @@ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
|
228
222
|
|
|
229
223
|
<commit_strategy_rationale>
|
|
230
224
|
|
|
231
|
-
## Why Per-
|
|
225
|
+
## Why Per-task Commits?
|
|
232
226
|
|
|
233
227
|
**Context engineering for AI:**
|
|
234
228
|
- Git history becomes primary context source for future OpenCode sessions
|
|
@@ -237,7 +231,7 @@ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
|
237
231
|
- Less reliance on parsing SUMMARY.md = more context for actual work
|
|
238
232
|
|
|
239
233
|
**Failure recovery:**
|
|
240
|
-
-
|
|
234
|
+
- task 1 committed ✅, task 2 failed ❌
|
|
241
235
|
- OpenCode in next session: sees task 1 complete, can retry task 2
|
|
242
236
|
- Can `git reset --hard` to last successful task
|
|
243
237
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Git Planning Commit
|
|
2
|
+
|
|
3
|
+
Commit planning artifacts using the gsd-tools CLI, which automatically checks `commit_docs` config and gitignore status.
|
|
4
|
+
|
|
5
|
+
## Commit via CLI
|
|
6
|
+
|
|
7
|
+
Always use `gsd-tools.cjs commit` for `.planning/` files — it handles `commit_docs` and gitignore checks automatically:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs({scope}): {description}" --files .planning/STATE.md .planning/ROADMAP.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The CLI will return `skipped` (with reason) if `commit_docs` is `false` or `.planning/` is gitignored. No manual conditional checks needed.
|
|
14
|
+
|
|
15
|
+
## Amend previous commit
|
|
16
|
+
|
|
17
|
+
To fold `.planning/` file changes into the previous commit:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "" --files .planning/codebase/*.md --amend
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commit Message Patterns
|
|
24
|
+
|
|
25
|
+
| Command | Scope | Example |
|
|
26
|
+
|---------|-------|---------|
|
|
27
|
+
| plan-phase | phase | `docs(phase-03): create authentication plans` |
|
|
28
|
+
| execute-phase | phase | `docs(phase-03): complete authentication phase` |
|
|
29
|
+
| new-milestone | milestone | `docs: start milestone v1.1` |
|
|
30
|
+
| remove-phase | chore | `chore: remove phase 17 (dashboard)` |
|
|
31
|
+
| insert-phase | phase | `docs: insert phase 16.1 (critical fix)` |
|
|
32
|
+
| add-phase | phase | `docs: add phase 07 (settings page)` |
|
|
33
|
+
|
|
34
|
+
## When to Skip
|
|
35
|
+
|
|
36
|
+
- `commit_docs: false` in config
|
|
37
|
+
- `.planning/` is gitignored
|
|
38
|
+
- No changes to commit (check with `git status --porcelain .planning/`)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Model Profile Resolution
|
|
2
|
+
|
|
3
|
+
Resolve model profile once at the start of orchestration, then use it for all task spawns.
|
|
4
|
+
|
|
5
|
+
## Resolution Pattern
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Default: `simple` if not set or config missing.
|
|
12
|
+
|
|
13
|
+
## Lookup Table
|
|
14
|
+
|
|
15
|
+
@~/.config/opencode/get-shit-done/references/model-profiles.md
|
|
16
|
+
|
|
17
|
+
Look up the agent in the table for the resolved profile. Pass the model parameter to task calls:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
task(
|
|
21
|
+
prompt="...",
|
|
22
|
+
subagent_type="gsd-planner",
|
|
23
|
+
model="{resolved_model}" # "inherit", "sonnet", or "haiku"
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Note:** Opus-tier agents resolve to `"inherit"` (not `"opus"`). This causes the agent to use the parent session's model, avoiding conflicts with organization policies that may block specific opus versions.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
1. Resolve once at orchestration start
|
|
32
|
+
2. Store the profile value
|
|
33
|
+
3. Look up each agent's model from the table when spawning
|
|
34
|
+
4. Pass model parameter to each task call (values: `"inherit"`, `"sonnet"`, `"haiku"`)
|
|
@@ -2,103 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
Model profiles control which OpenCode model each GSD agent uses. This allows balancing quality vs token spend.
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
1. Queries `opencode models` to discover available models
|
|
22
|
-
2. Prompts user to select models for each profile/stage combination
|
|
23
|
-
3. Saves to `.planning/config.json`
|
|
24
|
-
|
|
25
|
-
Configuration structure:
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"profiles": {
|
|
30
|
-
"active_profile": "balanced",
|
|
31
|
-
"presets": {
|
|
32
|
-
"quality": { "planning": "...", "execution": "...", "verification": "..." },
|
|
33
|
-
"balanced": { "planning": "...", "execution": "...", "verification": "..." },
|
|
34
|
-
"budget": { "planning": "...", "execution": "...", "verification": "..." }
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
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 |
|
|
39
20
|
|
|
40
21
|
## Profile Philosophy
|
|
41
22
|
|
|
42
|
-
When configuring presets, consider these guidelines:
|
|
43
|
-
|
|
44
23
|
**quality** - Maximum reasoning power
|
|
45
|
-
|
|
46
|
-
-
|
|
24
|
+
- Opus for all decision-making agents
|
|
25
|
+
- Sonnet for read-only verification
|
|
47
26
|
- Use when: quota available, critical architecture work
|
|
48
27
|
|
|
49
28
|
**balanced** (default) - Smart allocation
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- Mid-tier model for verification (needs reasoning, not just pattern matching)
|
|
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)
|
|
54
32
|
- Use when: normal development, good balance of quality and cost
|
|
55
33
|
|
|
56
|
-
**budget** - Minimal
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
- Lightweight model for research and verification
|
|
34
|
+
**budget** - Minimal Opus usage
|
|
35
|
+
- Sonnet for anything that writes code
|
|
36
|
+
- Haiku for research and verification
|
|
60
37
|
- Use when: conserving quota, high-volume work, less critical phases
|
|
61
38
|
|
|
62
39
|
## Resolution Logic
|
|
63
40
|
|
|
64
41
|
Orchestrators resolve model before spawning:
|
|
65
42
|
|
|
66
|
-
```
|
|
67
|
-
1.
|
|
68
|
-
2.
|
|
69
|
-
3.
|
|
70
|
-
4.
|
|
71
|
-
5. Pass model parameter to Task call
|
|
43
|
+
```
|
|
44
|
+
1. read .planning/config.json
|
|
45
|
+
2. Check model_overrides for agent-specific override
|
|
46
|
+
3. If no override, look up agent in profile table
|
|
47
|
+
4. Pass model parameter to task call
|
|
72
48
|
```
|
|
73
49
|
|
|
74
|
-
|
|
50
|
+
## Per-Agent Overrides
|
|
75
51
|
|
|
76
|
-
|
|
52
|
+
Override specific agents without changing the entire profile:
|
|
77
53
|
|
|
78
|
-
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"model_profile": "balanced",
|
|
57
|
+
"model_overrides": {
|
|
58
|
+
"gsd-executor": "opus",
|
|
59
|
+
"gsd-planner": "haiku"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
79
63
|
|
|
80
|
-
|
|
64
|
+
Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `haiku`.
|
|
81
65
|
|
|
82
|
-
|
|
66
|
+
## Switching Profiles
|
|
83
67
|
|
|
68
|
+
Runtime: `/gsd-set-profile <profile>`
|
|
69
|
+
|
|
70
|
+
Per-project default: Set in `.planning/config.json`:
|
|
84
71
|
```json
|
|
85
72
|
{
|
|
86
|
-
"
|
|
87
|
-
"active_profile": "balanced"
|
|
88
|
-
}
|
|
73
|
+
"model_profile": "balanced"
|
|
89
74
|
}
|
|
90
75
|
```
|
|
91
76
|
|
|
92
77
|
## Design Rationale
|
|
93
78
|
|
|
94
|
-
**Why
|
|
79
|
+
**Why Opus for gsd-planner?**
|
|
95
80
|
Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
|
|
96
81
|
|
|
97
|
-
**Why
|
|
82
|
+
**Why Sonnet for gsd-executor?**
|
|
98
83
|
Executors follow explicit PLAN.md instructions. The plan already contains the reasoning; execution is implementation.
|
|
99
84
|
|
|
100
|
-
**Why
|
|
101
|
-
Verification requires goal-backward reasoning - checking if code *delivers* what the phase promised, not just pattern matching.
|
|
85
|
+
**Why Sonnet (not Haiku) for verifiers in balanced?**
|
|
86
|
+
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.
|
|
87
|
+
|
|
88
|
+
**Why Haiku for gsd-codebase-mapper?**
|
|
89
|
+
read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
|
|
102
90
|
|
|
103
|
-
**Why
|
|
104
|
-
|
|
91
|
+
**Why `inherit` instead of passing `opus` directly?**
|
|
92
|
+
OpenCode's `"opus"` alias maps to a specific model version. Organizations may block older opus versions while allowing newer ones. GSD returns `"inherit"` for opus-tier agents, causing them to use whatever opus version the user has configured in their session. This avoids version conflicts and silent fallbacks to Sonnet.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Phase Argument Parsing
|
|
2
|
+
|
|
3
|
+
Parse and normalize phase arguments for commands that operate on phases.
|
|
4
|
+
|
|
5
|
+
## Extraction
|
|
6
|
+
|
|
7
|
+
From `$ARGUMENTS`:
|
|
8
|
+
- Extract phase number (first numeric argument)
|
|
9
|
+
- Extract flags (prefixed with `--`)
|
|
10
|
+
- Remaining text is description (for insert/add commands)
|
|
11
|
+
|
|
12
|
+
## Using gsd-tools
|
|
13
|
+
|
|
14
|
+
The `find-phase` command handles normalization and validation in one step:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
PHASE_INFO=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs find-phase "${PHASE}")
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Returns JSON with:
|
|
21
|
+
- `found`: true/false
|
|
22
|
+
- `directory`: Full path to phase directory
|
|
23
|
+
- `phase_number`: Normalized number (e.g., "06", "06.1")
|
|
24
|
+
- `phase_name`: Name portion (e.g., "foundation")
|
|
25
|
+
- `plans`: Array of PLAN.md files
|
|
26
|
+
- `summaries`: Array of SUMMARY.md files
|
|
27
|
+
|
|
28
|
+
## Manual Normalization (Legacy)
|
|
29
|
+
|
|
30
|
+
Zero-pad integer phases to 2 digits. Preserve decimal suffixes.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Normalize phase number
|
|
34
|
+
if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
|
|
35
|
+
# Integer: 8 → 08
|
|
36
|
+
PHASE=$(printf "%02d" "$PHASE")
|
|
37
|
+
elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
|
|
38
|
+
# Decimal: 2.1 → 02.1
|
|
39
|
+
PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
|
|
40
|
+
fi
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Validation
|
|
44
|
+
|
|
45
|
+
Use `roadmap get-phase` to validate phase exists:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
PHASE_CHECK=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}")
|
|
49
|
+
if [ "$(echo "$PHASE_CHECK" | jq -r '.found')" = "false" ]; then
|
|
50
|
+
echo "ERROR: Phase ${PHASE} not found in roadmap"
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Directory Lookup
|
|
56
|
+
|
|
57
|
+
Use `find-phase` for directory lookup:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
PHASE_DIR=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs find-phase "${PHASE}" --raw)
|
|
61
|
+
```
|
|
@@ -7,6 +7,11 @@ Configuration options for `.planning/` directory behavior.
|
|
|
7
7
|
"planning": {
|
|
8
8
|
"commit_docs": true,
|
|
9
9
|
"search_gitignored": false
|
|
10
|
+
},
|
|
11
|
+
"git": {
|
|
12
|
+
"branching_strategy": "none",
|
|
13
|
+
"phase_branch_template": "gsd/phase-{phase}-{slug}",
|
|
14
|
+
"milestone_branch_template": "gsd/{milestone}-{slug}"
|
|
10
15
|
}
|
|
11
16
|
```
|
|
12
17
|
|
|
@@ -14,6 +19,9 @@ Configuration options for `.planning/` directory behavior.
|
|
|
14
19
|
|--------|---------|-------------|
|
|
15
20
|
| `commit_docs` | `true` | Whether to commit planning artifacts to git |
|
|
16
21
|
| `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
|
|
22
|
+
| `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
|
|
23
|
+
| `git.phase_branch_template` | `"gsd/phase-{phase}-{slug}"` | Branch template for phase strategy |
|
|
24
|
+
| `git.milestone_branch_template` | `"gsd/{milestone}-{slug}"` | Branch template for milestone strategy |
|
|
17
25
|
</config_schema>
|
|
18
26
|
|
|
19
27
|
<commit_docs_behavior>
|
|
@@ -28,27 +36,31 @@ Configuration options for `.planning/` directory behavior.
|
|
|
28
36
|
- User must add `.planning/` to `.gitignore`
|
|
29
37
|
- Useful for: OSS contributions, client projects, keeping planning private
|
|
30
38
|
|
|
31
|
-
**
|
|
39
|
+
**Using gsd-tools.cjs (preferred):**
|
|
32
40
|
|
|
33
41
|
```bash
|
|
34
|
-
#
|
|
35
|
-
|
|
42
|
+
# Commit with automatic commit_docs + gitignore checks:
|
|
43
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: update state" --files .planning/STATE.md
|
|
44
|
+
|
|
45
|
+
# Load config via state load (returns JSON):
|
|
46
|
+
INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state load)
|
|
47
|
+
# commit_docs is available in the JSON output
|
|
36
48
|
|
|
37
|
-
#
|
|
38
|
-
|
|
49
|
+
# Or use init commands which include commit_docs:
|
|
50
|
+
INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init execute-phase "1")
|
|
51
|
+
# commit_docs is included in all init command outputs
|
|
39
52
|
```
|
|
40
53
|
|
|
41
54
|
**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
55
|
|
|
43
|
-
**
|
|
56
|
+
**Commit via CLI (handles checks automatically):**
|
|
44
57
|
|
|
45
58
|
```bash
|
|
46
|
-
|
|
47
|
-
git add .planning/STATE.md
|
|
48
|
-
git commit -m "docs: update state"
|
|
49
|
-
fi
|
|
59
|
+
node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit "docs: update state" --files .planning/STATE.md
|
|
50
60
|
```
|
|
51
61
|
|
|
62
|
+
The CLI checks `commit_docs` config and gitignore status internally — no manual conditionals needed.
|
|
63
|
+
|
|
52
64
|
</commit_docs_behavior>
|
|
53
65
|
|
|
54
66
|
<search_behavior>
|
|
@@ -89,6 +101,96 @@ To use uncommitted mode:
|
|
|
89
101
|
git commit -m "chore: stop tracking planning docs"
|
|
90
102
|
```
|
|
91
103
|
|
|
104
|
+
4. **Branch merges:** When using `branching_strategy: phase` or `milestone`, the `complete-milestone` workflow automatically strips `.planning/` files from staging before merge commits when `commit_docs: false`.
|
|
105
|
+
|
|
92
106
|
</setup_uncommitted_mode>
|
|
93
107
|
|
|
108
|
+
<branching_strategy_behavior>
|
|
109
|
+
|
|
110
|
+
**Branching Strategies:**
|
|
111
|
+
|
|
112
|
+
| Strategy | When branch created | Branch scope | Merge point |
|
|
113
|
+
|----------|---------------------|--------------|-------------|
|
|
114
|
+
| `none` | Never | N/A | N/A |
|
|
115
|
+
| `phase` | At `execute-phase` start | Single phase | User merges after phase |
|
|
116
|
+
| `milestone` | At first `execute-phase` of milestone | Entire milestone | At `complete-milestone` |
|
|
117
|
+
|
|
118
|
+
**When `git.branching_strategy: "none"` (default):**
|
|
119
|
+
- All work commits to current branch
|
|
120
|
+
- Standard GSD behavior
|
|
121
|
+
|
|
122
|
+
**When `git.branching_strategy: "phase"`:**
|
|
123
|
+
- `execute-phase` creates/switches to a branch before execution
|
|
124
|
+
- Branch name from `phase_branch_template` (e.g., `gsd/phase-03-authentication`)
|
|
125
|
+
- All plan commits go to that branch
|
|
126
|
+
- User merges branches manually after phase completion
|
|
127
|
+
- `complete-milestone` offers to merge all phase branches
|
|
128
|
+
|
|
129
|
+
**When `git.branching_strategy: "milestone"`:**
|
|
130
|
+
- First `execute-phase` of milestone creates the milestone branch
|
|
131
|
+
- Branch name from `milestone_branch_template` (e.g., `gsd/v1.0-mvp`)
|
|
132
|
+
- All phases in milestone commit to same branch
|
|
133
|
+
- `complete-milestone` offers to merge milestone branch to main
|
|
134
|
+
|
|
135
|
+
**Template variables:**
|
|
136
|
+
|
|
137
|
+
| Variable | Available in | Description |
|
|
138
|
+
|----------|--------------|-------------|
|
|
139
|
+
| `{phase}` | phase_branch_template | Zero-padded phase number (e.g., "03") |
|
|
140
|
+
| `{slug}` | Both | Lowercase, hyphenated name |
|
|
141
|
+
| `{milestone}` | milestone_branch_template | Milestone version (e.g., "v1.0") |
|
|
142
|
+
|
|
143
|
+
**Checking the config:**
|
|
144
|
+
|
|
145
|
+
Use `init execute-phase` which returns all config as JSON:
|
|
146
|
+
```bash
|
|
147
|
+
INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs init execute-phase "1")
|
|
148
|
+
# JSON output includes: branching_strategy, phase_branch_template, milestone_branch_template
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Or use `state load` for the config values:
|
|
152
|
+
```bash
|
|
153
|
+
INIT=$(node ~/.config/opencode/get-shit-done/bin/gsd-tools.cjs state load)
|
|
154
|
+
# Parse branching_strategy, phase_branch_template, milestone_branch_template from JSON
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Branch creation:**
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# For phase strategy
|
|
161
|
+
if [ "$BRANCHING_STRATEGY" = "phase" ]; then
|
|
162
|
+
PHASE_SLUG=$(echo "$PHASE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
163
|
+
BRANCH_NAME=$(echo "$PHASE_BRANCH_TEMPLATE" | sed "s/{phase}/$PADDED_PHASE/g" | sed "s/{slug}/$PHASE_SLUG/g")
|
|
164
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
# For milestone strategy
|
|
168
|
+
if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
|
|
169
|
+
MILESTONE_SLUG=$(echo "$MILESTONE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
170
|
+
BRANCH_NAME=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed "s/{milestone}/$MILESTONE_VERSION/g" | sed "s/{slug}/$MILESTONE_SLUG/g")
|
|
171
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
|
|
172
|
+
fi
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Merge options at complete-milestone:**
|
|
176
|
+
|
|
177
|
+
| Option | Git command | Result |
|
|
178
|
+
|--------|-------------|--------|
|
|
179
|
+
| Squash merge (recommended) | `git merge --squash` | Single clean commit per branch |
|
|
180
|
+
| Merge with history | `git merge --no-ff` | Preserves all individual commits |
|
|
181
|
+
| Delete without merging | `git branch -D` | Discard branch work |
|
|
182
|
+
| Keep branches | (none) | Manual handling later |
|
|
183
|
+
|
|
184
|
+
Squash merge is recommended — keeps main branch history clean while preserving the full development history in the branch (until deleted).
|
|
185
|
+
|
|
186
|
+
**Use cases:**
|
|
187
|
+
|
|
188
|
+
| Strategy | Best for |
|
|
189
|
+
|----------|----------|
|
|
190
|
+
| `none` | Solo development, simple projects |
|
|
191
|
+
| `phase` | Code review per phase, granular rollback, team collaboration |
|
|
192
|
+
| `milestone` | Release branches, staging environments, PR per version |
|
|
193
|
+
|
|
194
|
+
</branching_strategy_behavior>
|
|
195
|
+
|
|
94
196
|
</planning_config>
|
|
@@ -79,6 +79,7 @@ Use question to help users think by presenting concrete options to react to.
|
|
|
79
79
|
- Generic categories ("Technical", "Business", "Other")
|
|
80
80
|
- Leading options that presume an answer
|
|
81
81
|
- Too many options (2-4 is ideal)
|
|
82
|
+
- Headers longer than 12 characters (hard limit — validation will reject them)
|
|
82
83
|
|
|
83
84
|
**Example — vague answer:**
|
|
84
85
|
User says "it should be fast"
|
|
@@ -94,6 +95,9 @@ User mentions "frustrated with current tools"
|
|
|
94
95
|
- question: "What specifically frustrates you?"
|
|
95
96
|
- options: ["Too many clicks", "Missing features", "Unreliable", "Let me explain"]
|
|
96
97
|
|
|
98
|
+
**Tip for users — modifying an option:**
|
|
99
|
+
Users who want a slightly modified version of an option can select "Other" and reference the option by number: `#1 but for finger joints only` or `#2 with pagination disabled`. This avoids retyping the full option text.
|
|
100
|
+
|
|
97
101
|
</using_askuserquestion>
|
|
98
102
|
|
|
99
103
|
<context_checklist>
|