gsd-opencode 1.9.1 → 1.9.2

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.
@@ -1,136 +1,33 @@
1
1
  ---
2
2
  name: gsd-settings
3
- description: Configure GSD workflow toggles and model profile
3
+ description: Configure GSD model profiles and workflow settings
4
+ agent: gsd-settings
4
5
  tools:
5
6
  - read
6
7
  - write
8
+ - bash
7
9
  - question
8
10
  ---
9
11
 
10
12
  <objective>
11
- Allow users to toggle workflow agents on/off and select model profile via interactive settings.
13
+ Open an interactive settings menu.
12
14
 
13
- Updates `.planning/config.json` with workflow preferences and model profile selection.
15
+ This delegates the implementation to the `gsd-settings` agent, which manages `.planning/config.json` and regenerates `opencode.json` when needed.
14
16
  </objective>
15
17
 
16
18
  <process>
17
19
 
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 question with current values shown:
41
-
42
- ```
43
- question([
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
- ```
20
+ Run the interactive settings flow using the `gsd-settings` agent.
128
21
 
129
22
  </process>
130
23
 
131
24
  <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
25
+
26
+ - [ ] `.planning/` is validated as an existing GSD project (or a clear error is shown)
27
+ - [ ] Current settings are displayed (active profile, effective models, workflow toggles)
28
+ - [ ] User can update profile and workflow toggles via interactive UI
29
+ - [ ] Updates are persisted to `.planning/config.json`
30
+ - [ ] `opencode.json` is regenerated/updated to reflect effective models
31
+ - [ ] A clear confirmation is shown ("GSD ► SETTINGS UPDATED")
32
+
136
33
  </success_criteria>
@@ -2,72 +2,103 @@
2
2
 
3
3
  Model profiles control which OpenCode model each GSD agent uses. This allows balancing quality vs token spend.
4
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 |
5
+ ## Stage-to-Agent Mapping
6
+
7
+ Agents are grouped by stage. Each profile assigns a model to each stage:
8
+
9
+ | Stage | Agents |
10
+ |-------|--------|
11
+ | Planning | gsd-planner, gsd-plan-checker, gsd-phase-researcher, gsd-roadmapper, gsd-project-researcher, gsd-research-synthesizer, gsd-codebase-mapper |
12
+ | Execution | gsd-executor, gsd-debugger |
13
+ | Verification | gsd-verifier, gsd-integration-checker, gsd-set-profile, gsd-settings |
14
+
15
+ ## Profile Configuration
16
+
17
+ Models are **user-configured**, not hardcoded. OpenCode supports multiple providers (Anthropic, OpenAI, local models, etc.), so available models vary per installation.
18
+
19
+ On first run, `/gsd-settings` runs the **Preset Setup Wizard**:
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
+ ```
20
39
 
21
40
  ## Profile Philosophy
22
41
 
42
+ When configuring presets, consider these guidelines:
43
+
23
44
  **quality** - Maximum reasoning power
24
- - Opus for all decision-making agents
25
- - Sonnet for read-only verification
45
+
46
+ - Use your most capable model for all stages
26
47
  - Use when: quota available, critical architecture work
27
48
 
28
49
  **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)
50
+
51
+ - Strong model for planning (where architecture decisions happen)
52
+ - Mid-tier model for execution (follows explicit instructions)
53
+ - Mid-tier model for verification (needs reasoning, not just pattern matching)
32
54
  - Use when: normal development, good balance of quality and cost
33
55
 
34
- **budget** - Minimal Opus usage
35
- - Sonnet for anything that writes code
36
- - Haiku for research and verification
56
+ **budget** - Minimal token spend
57
+
58
+ - Mid-tier model for anything that writes code
59
+ - Lightweight model for research and verification
37
60
  - Use when: conserving quota, high-volume work, less critical phases
38
61
 
39
62
  ## Resolution Logic
40
63
 
41
64
  Orchestrators resolve model before spawning:
42
65
 
66
+ ```text
67
+ 1. Read .planning/config.json
68
+ 2. Get active_profile (default: "balanced")
69
+ 3. Look up preset[profile][stage] for the agent's stage
70
+ 4. Apply any custom_overrides[profile][stage] if set
71
+ 5. Pass model parameter to Task call
43
72
  ```
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
- ```
73
+
74
+ Agent-to-model mappings are written to `opencode.json` by `/gsd-set-profile` and `/gsd-settings`.
49
75
 
50
76
  ## Switching Profiles
51
77
 
52
78
  Runtime: `/gsd-set-profile <profile>`
53
79
 
54
- Per-project default: Set in `.planning/config.json`:
80
+ Interactive settings: `/gsd-settings`
81
+
82
+ Per-project default stored in `.planning/config.json`:
83
+
55
84
  ```json
56
85
  {
57
- "model_profile": "balanced"
86
+ "profiles": {
87
+ "active_profile": "balanced"
88
+ }
58
89
  }
59
90
  ```
60
91
 
61
92
  ## Design Rationale
62
93
 
63
- **Why Opus for gsd-planner?**
94
+ **Why use your strongest model for planning?**
64
95
  Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
65
96
 
66
- **Why Sonnet for gsd-executor?**
97
+ **Why mid-tier for execution?**
67
98
  Executors follow explicit PLAN.md instructions. The plan already contains the reasoning; execution is implementation.
68
99
 
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.
100
+ **Why mid-tier (not lightweight) for verification?**
101
+ Verification requires goal-backward reasoning - checking if code *delivers* what the phase promised, not just pattern matching. Mid-tier models handle this well; lightweight models may miss subtle gaps.
71
102
 
72
- **Why Haiku for gsd-codebase-mapper?**
73
- read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
103
+ **Why lightweight for codebase mapping?**
104
+ Read-only exploration and pattern extraction. No complex reasoning required, just structured output from file contents.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-opencode",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for OpenCode by TÂCHES.",
5
5
  "keywords": [
6
6
  "opencode",