@tudeorangbiasa/sdd-multiagent-opencode 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.opencode/agents/sdd-explorer.md +1 -2
  2. package/.opencode/agents/sdd-implementer.md +4 -5
  3. package/.opencode/agents/sdd-orchestrator.md +17 -127
  4. package/.opencode/agents/sdd-planner.md +5 -6
  5. package/.opencode/agents/sdd-reviewer.md +0 -1
  6. package/.opencode/agents/sdd-verifier.md +3 -4
  7. package/.opencode/commands/sdd-apply.md +83 -0
  8. package/.opencode/commands/sdd-explore.md +63 -0
  9. package/.opencode/commands/sdd-propose.md +116 -0
  10. package/.opencode/commands/sdd-ship.md +71 -0
  11. package/.opencode/plugins/sdd-auto-reasoning.js +141 -0
  12. package/.opencode/plugins/sdd-register.js +22 -0
  13. package/.opencode/skills/sdd-audit/SKILL.md +5 -5
  14. package/.opencode/skills/sdd-implementation/SKILL.md +10 -12
  15. package/.opencode/skills/sdd-planning/SKILL.md +20 -29
  16. package/.opencode/skills/sdd-research/SKILL.md +5 -5
  17. package/.sdd/config.json +10 -10
  18. package/.sdd/templates/design-template.md +21 -0
  19. package/.sdd/templates/model-profile-template.json +35 -3
  20. package/.sdd/templates/progress-template.md +23 -0
  21. package/.sdd/templates/project-profile-template.json +2 -2
  22. package/.sdd/templates/proposal-template.md +22 -0
  23. package/.sdd/templates/reasoning-profile-template.json +21 -0
  24. package/.sdd/templates/spec-template.md +19 -0
  25. package/.sdd/templates/tasks-template.md +8 -0
  26. package/.sdd/templates/verification-template.md +17 -0
  27. package/GUIDE.md +128 -0
  28. package/README.md +185 -150
  29. package/bin/sdd-opencode.js +34 -7
  30. package/opencode.json +10 -14
  31. package/package.json +6 -4
  32. package/.opencode/commands/audit.md +0 -75
  33. package/.opencode/commands/brief.md +0 -190
  34. package/.opencode/commands/evolve.md +0 -87
  35. package/.opencode/commands/execute-parallel.md +0 -116
  36. package/.opencode/commands/execute-task.md +0 -81
  37. package/.opencode/commands/generate-prd.md +0 -82
  38. package/.opencode/commands/generate-rules.md +0 -67
  39. package/.opencode/commands/grill-me.md +0 -99
  40. package/.opencode/commands/implement.md +0 -149
  41. package/.opencode/commands/init-sdd.md +0 -141
  42. package/.opencode/commands/plan.md +0 -96
  43. package/.opencode/commands/refine.md +0 -115
  44. package/.opencode/commands/research.md +0 -194
  45. package/.opencode/commands/sdd-full-plan.md +0 -91
  46. package/.opencode/commands/specify.md +0 -124
  47. package/.opencode/commands/tasks.md +0 -110
  48. package/.opencode/commands/upgrade.md +0 -107
  49. package/.opencode/skills/sdd-evolve/SKILL.md +0 -95
  50. package/.sdd/templates/feature-brief-v2.md +0 -65
  51. package/.sdd/templates/plan-compact.md +0 -50
  52. package/.sdd/templates/research-compact.md +0 -114
  53. package/.sdd/templates/roadmap-template.json +0 -29
  54. package/.sdd/templates/roadmap-template.md +0 -66
  55. package/.sdd/templates/spec-compact.md +0 -71
  56. package/.sdd/templates/tasks-compact.md +0 -48
  57. package/.sdd/templates/todo-compact.md +0 -30
package/GUIDE.md ADDED
@@ -0,0 +1,128 @@
1
+ # SDD Multi-Agent OpenCode Guide
2
+
3
+ This kit exposes one small workflow for OpenCode:
4
+
5
+ ```text
6
+ /sdd-explore -> /sdd-propose -> /sdd-apply -> /sdd-ship
7
+ ```
8
+
9
+ It is inspired by spec-driven development, but it is not a port of another tool. The goal is to make OpenCode safer on real projects by separating investigation, planning, implementation, and final verification.
10
+
11
+ ## Commands
12
+
13
+ | Command | Purpose | Writes Code? |
14
+ |---------|---------|--------------|
15
+ | `/sdd-explore` | Investigate unclear ideas, bugs, or code areas | No |
16
+ | `/sdd-propose` | Create one focused change plan | No |
17
+ | `/sdd-apply` | Implement an approved change | Yes |
18
+ | `/sdd-ship` | Verify readiness before merge/release | No, unless explicitly asked |
19
+
20
+ ## Default Flow
21
+
22
+ ```text
23
+ /sdd-propose change-id "what should change"
24
+ -> review specs/active/change-id/
25
+ /sdd-apply change-id
26
+ /sdd-ship change-id
27
+ ```
28
+
29
+ Use `/sdd-explore` first only when the problem is unclear.
30
+
31
+ ## When To Use Each Command
32
+
33
+ ### `/sdd-explore`
34
+
35
+ Use this when you need understanding before deciding what to build.
36
+
37
+ ```text
38
+ /sdd-explore "admin UI feels messy, find reusable component opportunities"
39
+ /sdd-explore invoice-delete "why invoice delete sometimes fails"
40
+ ```
41
+
42
+ This command should return findings, options, and a recommended next `/sdd-propose` command. It must not implement code.
43
+
44
+ ### `/sdd-propose`
45
+
46
+ Use this when you know the change you want.
47
+
48
+ ```text
49
+ /sdd-propose ui-admin-components "modularize admin UI into reusable components"
50
+ /sdd-propose "add password reset flow"
51
+ ```
52
+
53
+ It creates:
54
+
55
+ ```text
56
+ specs/active/<change-id>/
57
+ ├── proposal.md
58
+ ├── spec.md
59
+ ├── design.md
60
+ ├── tasks.md
61
+ └── progress.md optional for large changes
62
+ ```
63
+
64
+ Review these files before applying. This is the agreement point.
65
+
66
+ ### `/sdd-apply`
67
+
68
+ Use this after the proposal is accepted.
69
+
70
+ ```text
71
+ /sdd-apply ui-admin-components
72
+ ```
73
+
74
+ It reads the artifacts, implements `tasks.md`, updates checkboxes, and runs targeted verification when possible.
75
+
76
+ For large changes, it uses `progress.md` as a checkpoint so work can resume without relying on chat history. If tasks touch disjoint files, it can run safe batches in parallel through subagents; otherwise it runs sequentially.
77
+
78
+ ### `/sdd-ship`
79
+
80
+ Use this before calling the change done.
81
+
82
+ ```text
83
+ /sdd-ship ui-admin-components
84
+ ```
85
+
86
+ It audits the implementation against the artifacts and writes:
87
+
88
+ ```text
89
+ specs/active/<change-id>/verification.md
90
+ ```
91
+
92
+ ## Example: New Feature
93
+
94
+ ```text
95
+ /sdd-propose auth-reset "add secure password reset by email"
96
+ /sdd-apply auth-reset
97
+ /sdd-ship auth-reset
98
+ ```
99
+
100
+ ## Example: Bug Fix
101
+
102
+ ```text
103
+ /sdd-explore invoice-delete "deleting invoices sometimes fails in production"
104
+ /sdd-propose invoice-delete "fix invoice delete failure with regression coverage"
105
+ /sdd-apply invoice-delete
106
+ /sdd-ship invoice-delete
107
+ ```
108
+
109
+ ## Example: Refactor
110
+
111
+ ```text
112
+ /sdd-explore admin-ui "check whether admin UI is modular and reusable"
113
+ /sdd-propose admin-ui-components "extract reusable admin layout and form components"
114
+ /sdd-apply admin-ui-components
115
+ /sdd-ship admin-ui-components
116
+ ```
117
+
118
+ ## Design Principles
119
+
120
+ - Four commands only by default.
121
+ - No fake flags like `--deep` or `--until-finish`.
122
+ - No source code changes during explore/propose.
123
+ - One change folder per unit of work.
124
+ - Planning artifacts are compact and reviewable.
125
+ - Proposals must cite real project files or clearly say what was not found.
126
+ - Long-running apply work must checkpoint to `progress.md`.
127
+ - Parallel execution is a capability inside `/sdd-apply`, not a separate command.
128
+ - Verification is a first-class step, not a vague final message.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SDD Multi-Agent OpenCode
2
2
 
3
- Spec-Driven Development framework for OpenCode with multi-agent orchestration, DAG-based parallel execution, and free-tier model optimization.
3
+ Spec-Driven Development workflow kit for OpenCode with four core commands, multi-agent support, and configurable model routing.
4
4
 
5
5
  Inspired by [spec-kit-command-cursor](https://github.com/madebyaris/spec-kit-command-cursor), rebuilt from scratch for OpenCode's multi-agent architecture.
6
6
 
@@ -20,38 +20,65 @@ external UI skills # impeccable, taste, nothing-design, etc.
20
20
 
21
21
  | Aspect | Original (Cursor) | This (OpenCode) |
22
22
  |--------|-------------------|-----------------|
23
- | **Models** | Single `inherit` model | 4 models optimized per agent role |
24
- | **Parallel Execution** | Cursor `is_background: true` | OpenCode subagent spawning via Task tool |
23
+ | **Models** | Single `inherit` model | Configurable per-agent routing |
24
+ | **Parallel Execution** | Cursor `is_background: true` | Safe subagent spawning with file conflict detection |
25
25
  | **Codebase Search** | grep/glob | `codebase-memory-mcp` graph queries |
26
26
  | **Web Research** | Cursor web search | `exa_web_search_exa` |
27
27
  | **Visual Verification** | N/A | Chrome DevTools + Qwen (image-capable) |
28
28
  | **Hooks** | `hooks.json` | Plugin JS/TS with event system |
29
- | **Cost** | Per-token billing | All free-tier models |
29
+ | **Commands** | 15+ slash commands | 4 core commands: explore, propose, apply, ship |
30
+ | **Cost** | Per-token billing | Free-tier optimized with paid model routing |
30
31
 
31
32
  ## Multi-Agent Architecture
32
33
 
33
- | Agent | Model | Role |
34
- |-------|-------|------|
35
- | **sdd-orchestrator** | `opencode/minimax-m2.5-free` | DAG scheduling, conflict detection, deadlock handling |
36
- | **sdd-planner** | `opencode/qwen3.6-plus-free` | Architecture design, technical planning |
37
- | **sdd-explorer** | `opencode/deepseek-v4-flash-free` | Codebase discovery (readonly) |
38
- | **sdd-implementer** | `opencode/deepseek-v4-flash-free` | Code generation (high token usage) |
39
- | **sdd-verifier** | `opencode/qwen3.6-plus-free` | Completeness check + visual/UI verification (Chrome DevTools) |
40
- | **sdd-reviewer** | `opencode/minimax-m2.5-free` | Code review (security, performance, spec compliance) |
34
+ | Agent | Default Model | Role |
35
+ |-------|--------------|------|
36
+ | **sdd-orchestrator** | configurable | DAG scheduling, conflict detection, deadlock handling |
37
+ | **sdd-planner** | configurable | Architecture design, technical planning |
38
+ | **sdd-explorer** | configurable | Codebase discovery (readonly) |
39
+ | **sdd-implementer** | configurable | Code generation (high token usage) |
40
+ | **sdd-verifier** | configurable | Completeness check + visual/UI verification (Chrome DevTools) |
41
+ | **sdd-reviewer** | configurable | Code review (security, performance, spec compliance) |
42
+
43
+ **All models are configurable** via `.sdd/model-profile.json`. Edit this file to change which model each agent uses. See [Model Settings](#model-settings) below.
41
44
 
42
45
  ## Quick Start
43
46
 
44
- ### npx Install (Recommended)
47
+ ### Plugin Install (Recommended)
48
+
49
+ Add to your `opencode.json` (global or project-level):
50
+
51
+ ```json
52
+ {
53
+ "plugin": [
54
+ "@tudeorangbiasa/sdd-multiagent-opencode@git+https://github.com/TudeOrangBiasa/sdd-multiagent-opencode.git"
55
+ ]
56
+ }
57
+ ```
58
+
59
+ Restart OpenCode. The plugin auto-registers skills, agents, commands, and internal plugins (model router, auto reasoning).
60
+
61
+ To pin a version:
62
+
63
+ ```json
64
+ {
65
+ "plugin": [
66
+ "@tudeorangbiasa/sdd-multiagent-opencode@git+https://github.com/TudeOrangBiasa/sdd-multiagent-opencode.git#v0.2.0"
67
+ ]
68
+ }
69
+ ```
70
+
71
+ Verify by asking: "What SDD commands do you have?"
72
+
73
+ ### npx Install (Fallback)
74
+
75
+ For projects that prefer local files instead of a plugin:
45
76
 
46
77
  ```bash
47
78
  cd your-project
48
79
  npx -y -p @tudeorangbiasa/sdd-multiagent-opencode sdd-opencode init
49
80
  ```
50
81
 
51
- This installs both:
52
- - Base OpenCode agent rules (verification, CLI-first, context budget)
53
- - SDD multi-agent workflow (commands, agents, skills, templates)
54
-
55
82
  **Flags:**
56
83
  ```bash
57
84
  npx -y -p @tudeorangbiasa/sdd-multiagent-opencode sdd-opencode init # Install everything
@@ -61,19 +88,72 @@ npx -y -p @tudeorangbiasa/sdd-multiagent-opencode sdd-opencode init --force
61
88
  npx -y -p @tudeorangbiasa/sdd-multiagent-opencode sdd-opencode init --dry-run # Preview only
62
89
  ```
63
90
 
91
+ ### Updating
92
+
93
+ Plugin installs update automatically when OpenCode restarts and fetches the latest git commit. To pin a stable version, use a tag:
94
+
95
+ ```json
96
+ "@tudeorangbiasa/sdd-multiagent-opencode@git+https://github.com/TudeOrangBiasa/sdd-multiagent-opencode.git#v0.2.0"
97
+ ```
98
+
99
+ For npx installs, run the installer again with `--force` to overwrite existing files.
100
+
101
+ ## Command Flow Guide
102
+
103
+ See [GUIDE.md](GUIDE.md) for the practical command flow.
104
+
105
+ Default workflow:
106
+
107
+ ```text
108
+ /sdd-explore # investigate unclear ideas, bugs, or code areas; no code changes
109
+ /sdd-propose # create proposal.md, spec.md, design.md, tasks.md; no code changes
110
+ /sdd-apply # implement an approved change
111
+ /sdd-ship # final verification and readiness review
112
+ ```
113
+
114
+ Most work starts with `/sdd-propose`, then `/sdd-apply`, then `/sdd-ship`. Use `/sdd-explore` first only when the problem is unclear.
115
+
64
116
  ### Model Settings
65
117
 
66
118
  The installer creates `.sdd/model-profile.json`. Edit this file to change which model each OpenCode agent uses.
67
119
 
68
- Default profile avoids paid GPT models:
120
+ **⚠️ Requirement:** SDD works best with at least **ONE paid/subscription model** for orchestrator and planner. These roles need strong reasoning + multimodal capabilities that free models lack.
121
+
122
+ **Subscription options:**
123
+ - **OpenCode Go** ($10/month) — GLM 5.1, Kimi K2.5, MiniMax M2.5/M2.7
124
+ - **Kimi Moderato** — Kimi K2.6 with vision support
125
+ - **OpenAI Plus** — GPT 5.5 with reasoning and multimodal
126
+ - **GLM Lite** — GLM 5.1 with strong reasoning
127
+ - **OpenRouter** — Access to frontier reasoning models
128
+
129
+ **Recommended paid models for SDD:**
130
+
131
+ | Model | Best For | Notes |
132
+ |-------|----------|-------|
133
+ | `opencode/gpt-5.5` | Orchestrator, Planner | Strongest reasoning + multimodal |
134
+ | `opencode/claude-sonnet-4-5` | Planner, Reviewer | Excellent code understanding |
135
+ | `opencode/claude-opus-4-5` | Planner (complex) | Maximum capability for architecture |
136
+ | `opencode/kimi-k2.6` | Verifier, Planner | Strong reasoning + vision support |
137
+ | `opencode/glm-5.1` | Orchestrator, Planner | Strong reasoning alternative |
138
+
139
+ **Free-tier fallback** (limited capability — not recommended for production):
140
+
141
+ | Model | Best For | Limitations |
142
+ |-------|----------|-------------|
143
+ | `opencode/qwen3.6-plus-free` | General fallback | Limited multimodal |
144
+ | `opencode/deepseek-v4-flash-free` | Explorer, Implementer | Code gen only, no reasoning |
145
+ | `opencode/minimax-m2.5-free` | Reviewer, Orchestrator | Basic coordination |
146
+ | `opencode/big-pickle` | Explorer | Limited-time free |
147
+
148
+ **Default profile** (orchestrator/planner require paid, others use free):
69
149
 
70
150
  ```json
71
151
  {
72
- "defaultPrimary": "opencode/minimax-m2.5-free",
152
+ "defaultPrimary": "opencode/gpt-5.5",
73
153
  "small": "opencode/deepseek-v4-flash-free",
74
154
  "agents": {
75
- "sdd-orchestrator": "opencode/minimax-m2.5-free",
76
- "sdd-planner": "opencode/qwen3.6-plus-free",
155
+ "sdd-orchestrator": "opencode/gpt-5.5",
156
+ "sdd-planner": "opencode/gpt-5.5",
77
157
  "sdd-explorer": "opencode/deepseek-v4-flash-free",
78
158
  "sdd-implementer": "opencode/deepseek-v4-flash-free",
79
159
  "sdd-verifier": "opencode/qwen3.6-plus-free",
@@ -82,29 +162,51 @@ Default profile avoids paid GPT models:
82
162
  }
83
163
  ```
84
164
 
85
- `.opencode/plugins/sdd-model-router.js` reads this file at OpenCode startup and applies the model settings. Restart OpenCode after editing it.
165
+ **Model routing rationale:**
166
+ - **Orchestrator** → GPT 5.5 (paid): needs strongest reasoning for DAG coordination, deadlock detection
167
+ - **Planner** → GPT 5.5 (paid): needs maximum reasoning for architecture design, risk assessment
168
+ - **Explorer** → DeepSeek free: fast readonly exploration, token-efficient
169
+ - **Implementer** → DeepSeek free: code generation, handles high token usage
170
+ - **Verifier** → Qwen free: multimodal for Chrome DevTools screenshots
171
+ - **Reviewer** → MiniMax free: structured code review output
86
172
 
87
- ### 1. Install (Manual)
173
+ `.opencode/plugins/sdd-model-router.js` reads this file at OpenCode startup and applies the model settings. **Restart OpenCode after editing it.**
88
174
 
89
- #### Option A: Using Commands (Recommended)
175
+ **Important:** Do NOT set models in `opencode.json` — they will be ignored. All model routing goes through `model-profile.json`.
90
176
 
91
- If you have OpenCode running, you can use the init commands:
177
+ ### Auto Reasoning
92
178
 
93
- ```
94
- /init-rules # Install base agent rules first
95
- /init-sdd # Install SDD workflow layer
179
+ The installer also creates `.sdd/reasoning-profile.json` and installs `.opencode/plugins/sdd-auto-reasoning.js`.
180
+
181
+ The plugin reverse-engineers the behavior of `@howaboua/pi-auto-reasoning-tool` for OpenCode:
182
+ - sets reasoning effort automatically per agent and command
183
+ - exposes `change_reasoning` when `@opencode-ai/plugin` is available
184
+ - resets tool overrides after the next model request by default
185
+
186
+ Default routing:
187
+
188
+ ```json
189
+ {
190
+ "default": "low",
191
+ "agents": {
192
+ "sdd-orchestrator": "high",
193
+ "sdd-planner": "high",
194
+ "sdd-implementer": "medium",
195
+ "sdd-reviewer": "medium"
196
+ }
197
+ }
96
198
  ```
97
199
 
98
- #### Option B: Manual Copy
200
+ Restart OpenCode after editing `.sdd/reasoning-profile.json`.
201
+
202
+ ### Manual Install
203
+
204
+ If you prefer local files over a plugin:
99
205
 
100
206
  ```bash
101
- # Recommended: install base agent rules first
102
207
  git clone https://github.com/TudeOrangBiasa/opencode-agent-rules.git
103
-
104
- # Clone into your project
105
208
  git clone https://github.com/TudeOrangBiasa/sdd-multiagent-opencode.git
106
209
 
107
- # Or copy the .opencode/ and .sdd/ directories into your project
108
210
  cp opencode-agent-rules/AGENTS.md /your-project/
109
211
  cp -r opencode-agent-rules/.opencode/rules /your-project/.opencode/
110
212
  cp -r opencode-agent-rules/.opencode/plugins /your-project/.opencode/
@@ -113,158 +215,92 @@ cp -r sdd-multiagent-opencode/.sdd /your-project/
113
215
  cp sdd-multiagent-opencode/opencode.json /your-project/
114
216
  ```
115
217
 
116
- ### 2. Configure
117
-
118
218
  Merge the `agent` and `permission` sections from `opencode.json` into your project's `opencode.json`.
119
219
 
120
- ### 3. Update Project Profile
220
+ ## Usage
121
221
 
122
- Edit `.sdd/project-profile.json` with your stack:
123
- - framework (e.g., "next", "react", "express")
124
- - language (e.g., "typescript", "javascript")
125
- - packageManager (e.g., "pnpm", "npm", "yarn")
126
- - commands (dev, build, test, lint)
222
+ See [GUIDE.md](GUIDE.md) for the practical flow.
127
223
 
128
- ### 4. Use
224
+ ```text
225
+ /sdd-propose auth-reset "add secure password reset by email"
226
+ /sdd-apply auth-reset
227
+ /sdd-ship auth-reset
228
+ ```
129
229
 
130
- ```bash
131
- # Quick planning (80% of features)
132
- /brief user-auth JWT authentication with login/logout
133
-
134
- # Full planning (complex features)
135
- /research database-engine Best database for our use case --deep
136
- /specify user-auth User authentication with login, logout, password reset
137
- /plan user-auth
138
- /tasks user-auth
139
- /implement user-auth
140
-
141
- # TDD workflow (test-driven development)
142
- /tasks user-auth --tdd
143
- /implement user-auth --tdd
144
-
145
- # Full project roadmap
146
- /sdd-full-plan blog-platform Full-featured blog with CMS and analytics
147
- /execute-parallel blog-platform --until-finish
148
-
149
- # Audit
150
- /audit user-auth
230
+ If the problem is unclear, start with exploration:
231
+
232
+ ```text
233
+ /sdd-explore "admin UI feels messy, find reusable component opportunities"
151
234
  ```
152
235
 
153
236
  ## Commands
154
237
 
155
- | Command | Purpose | Output |
156
- |---------|---------|--------|
157
- | `/init-rules` | Install base agent rules | Base rules files |
158
- | `/init-sdd` | Install SDD workflow | SDD files + project profile |
159
- | `/brief` | Lightweight feature brief (~30 min) | `feature-brief.md` |
160
- | `/research` | Pattern investigation (supports `--deep`) | `research.md` |
161
- | `/specify` | Detailed requirements | `spec.md` |
162
- | `/plan` | Technical architecture | `plan.md` |
163
- | `/tasks` | Task breakdown | `tasks.md` |
164
- | `/implement` | Execute implementation with todo tracking | Code + `todo-list.md` |
165
- | `/sdd-full-plan` | Complete project roadmap | `roadmap.json` + tasks |
166
- | `/execute-parallel` | Parallel DAG execution | Updated roadmap |
167
- | `/execute-task` | Single task execution | Updated roadmap |
168
- | `/evolve` | Update specs with discoveries | Updated specs |
169
- | `/refine` | Iterate on specs through discussion | Updated docs |
170
- | `/upgrade` | Brief → Full SDD planning | Full SDD docs |
171
- | `/audit` | Compare implementation against specs | Audit report |
172
- | `/generate-prd` | PRD via Socratic questions | `full-prd.md` |
173
- | `/generate-rules` | Auto-generate coding rules | Rule files |
174
- | `/grill-me` | Clarify product requirements | Clarified brief |
238
+ | Command | Purpose | Writes Code? |
239
+ |---------|---------|--------------|
240
+ | `/sdd-explore` | Investigate unclear ideas, bugs, or code areas | No |
241
+ | `/sdd-propose` | Create one focused change plan | No |
242
+ | `/sdd-apply` | Implement an approved change | Yes |
243
+ | `/sdd-ship` | Final verification and readiness review | No, unless explicitly asked |
175
244
 
176
245
  ## Project Structure
177
246
 
178
247
  ```
179
248
  .opencode/
180
- ├── opencode.json # Agent configs, permissions, model assignments
181
249
  ├── agents/
182
- │ ├── sdd-orchestrator.md # DAG coordinator (GPT 5.5)
183
- │ ├── sdd-planner.md # Architecture designer (GPT 5.5)
184
- │ ├── sdd-explorer.md # Codebase investigator (DeepSeek)
185
- │ ├── sdd-implementer.md # Code generator (DeepSeek)
186
- │ ├── sdd-verifier.md # Completeness checker (Qwen + Chrome)
187
- │ └── sdd-reviewer.md # Code reviewer (MiniMax)
250
+ │ ├── sdd-orchestrator.md # Multi-agent coordination internals
251
+ │ ├── sdd-planner.md # Proposal/spec/design/tasks planning
252
+ │ ├── sdd-explorer.md # Readonly codebase investigation
253
+ │ ├── sdd-implementer.md # Approved implementation work
254
+ │ ├── sdd-verifier.md # Completeness and UI verification
255
+ │ └── sdd-reviewer.md # Final review and readiness checks
188
256
  ├── commands/
189
- │ ├── brief.md # /brief
190
- │ ├── research.md # /research
191
- │ ├── specify.md # /specify
192
- ├── plan.md # /plan
193
- │ ├── tasks.md # /tasks
194
- │ ├── implement.md # /implement
195
- │ ├── sdd-full-plan.md # /sdd-full-plan
196
- │ ├── execute-parallel.md # /execute-parallel
197
- │ ├── execute-task.md # /execute-task
198
- │ ├── evolve.md # /evolve
199
- │ ├── refine.md # /refine
200
- │ ├── upgrade.md # /upgrade
201
- │ ├── audit.md # /audit
202
- │ ├── generate-prd.md # /generate-prd
203
- │ └── generate-rules.md # /generate-rules
257
+ │ ├── sdd-explore.md # /sdd-explore
258
+ │ ├── sdd-propose.md # /sdd-propose
259
+ │ ├── sdd-apply.md # /sdd-apply
260
+ └── sdd-ship.md # /sdd-ship
204
261
  └── skills/
205
262
  ├── sdd-research/SKILL.md
206
263
  ├── sdd-planning/SKILL.md
207
264
  ├── sdd-implementation/SKILL.md
208
- ├── sdd-audit/SKILL.md
209
- └── sdd-evolve/SKILL.md
265
+ └── sdd-audit/SKILL.md
210
266
 
211
267
  .sdd/
212
268
  ├── config.json # Project configuration
213
269
  ├── project-profile.json # Stack and skill routing config
214
270
  └── templates/ # Document templates
215
- ├── feature-brief-v2.md
216
- ├── spec-compact.md
217
- ├── plan-compact.md
218
- ├── tasks-compact.md
219
- ├── research-compact.md
220
- ├── todo-compact.md
221
- ├── roadmap-template.json
222
- └── roadmap-template.md
271
+ ├── proposal-template.md
272
+ ├── spec-template.md
273
+ ├── design-template.md
274
+ ├── tasks-template.md
275
+ ├── progress-template.md
276
+ └── verification-template.md
223
277
 
224
278
  specs/
225
- ├── active/ # Features in development
226
- ├── backlog/ # Future features
227
- ├── completed/ # Delivered features
228
- └── todo-roadmap/ # Project roadmaps with DAG
279
+ └── active/
280
+ └── <change-id>/
281
+ ├── proposal.md
282
+ ├── spec.md
283
+ ├── design.md
284
+ ├── tasks.md
285
+ ├── progress.md
286
+ └── verification.md
229
287
  ```
230
288
 
231
289
  ## Workflows
232
290
 
233
- ### Quick Planning (80% of features)
234
- ```
235
- /brief → /evolve → /refine → /implement
236
- ```
237
-
238
- ### Full Planning (complex features)
239
- ```
240
- /research → /specify → /plan → /tasks → /implement
241
- ```
242
-
243
- ### Deep Research (unfamiliar domain)
244
- ```
245
- /research --deep → /specify → /plan → /tasks → /implement
246
- ```
291
+ Most changes use:
247
292
 
248
- ### Parallel Execution (project roadmap)
249
- ```
250
- /sdd-full-plan → /execute-parallel --until-finish
293
+ ```text
294
+ /sdd-propose -> /sdd-apply -> /sdd-ship
251
295
  ```
252
296
 
253
- ### TDD Workflow (Test-Driven Development)
297
+ Unclear changes use:
254
298
 
299
+ ```text
300
+ /sdd-explore -> /sdd-propose -> /sdd-apply -> /sdd-ship
255
301
  ```
256
- /brief feature-x → /tasks feature-x --tdd → /implement feature-x --tdd
257
- ```
258
-
259
- With `--tdd` flag:
260
- - `/tasks` generates TDD-specific tasks with test-first structure
261
- - `/implement` writes failing test → implements minimum code → verifies pass → refactors
262
302
 
263
- **Example:**
264
- ```
265
- /tasks user-auth --tdd
266
- /implement user-auth --tdd
267
- ```
303
+ This kit intentionally avoids fake CLI flags such as `--deep` or `--until-finish`. If deeper research or parallel execution is needed, describe that in normal language and let the agent plan it explicitly.
268
304
 
269
305
  ## Tools Integration
270
306
 
@@ -277,11 +313,10 @@ Used by `sdd-explorer` and `sdd-implementer` for:
277
313
  - `get_architecture` — high-level project structure
278
314
 
279
315
  ### exa_web_search_exa
280
- Used by `sdd-explorer` and `sdd-research` skill for:
316
+ Used by `sdd-explorer` when external research is relevant:
281
317
  - External pattern research
282
318
  - Documentation lookup
283
319
  - Technology comparison
284
- - Deep research mode (`--deep`)
285
320
 
286
321
  ### chrome-devtools
287
322
  Used by `sdd-verifier` for:
@@ -260,6 +260,20 @@ function installSdd(ctx) {
260
260
  count++;
261
261
  }
262
262
 
263
+ const reasoningProfileDest = path.join(sddDir, "reasoning-profile.json");
264
+ const reasoningProfileTemplateSrc = path.join(
265
+ sddDir,
266
+ "templates",
267
+ "reasoning-profile-template.json"
268
+ );
269
+
270
+ if (fs.existsSync(reasoningProfileDest) && !ctx.force) {
271
+ ctx.skipped.push(".sdd/reasoning-profile.json (exists)");
272
+ } else if (fs.existsSync(reasoningProfileTemplateSrc)) {
273
+ copyFileSafe(reasoningProfileTemplateSrc, reasoningProfileDest, ctx);
274
+ count++;
275
+ }
276
+
263
277
  const specsDir = path.join(ctx.targetRoot, "specs");
264
278
  ensureDir(path.join(specsDir, "active"));
265
279
  ensureDir(path.join(specsDir, "backlog"));
@@ -303,16 +317,25 @@ function patchOpencodeJson(ctx) {
303
317
  if (fs.existsSync(pkgJsonPath)) {
304
318
  const pkgConfig = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
305
319
 
306
- if (pkgConfig.model) {
307
- targetConfig.model = pkgConfig.model;
308
- ctx.installed.push("opencode.json (model patch)");
309
- }
320
+ if (Array.isArray(pkgConfig.plugin)) {
321
+ if (!Array.isArray(targetConfig.plugin)) {
322
+ targetConfig.plugin = [];
323
+ }
310
324
 
311
- if (pkgConfig.small_model) {
312
- targetConfig.small_model = pkgConfig.small_model;
313
- ctx.installed.push("opencode.json (small_model patch)");
325
+ for (const pluginEntry of pkgConfig.plugin) {
326
+ const key = JSON.stringify(pluginEntry);
327
+ const exists = targetConfig.plugin.some((existing) => JSON.stringify(existing) === key);
328
+ if (!exists) {
329
+ targetConfig.plugin.push(pluginEntry);
330
+ ctx.installed.push(`opencode.json (plugin: ${Array.isArray(pluginEntry) ? pluginEntry[0] : pluginEntry})`);
331
+ }
332
+ }
314
333
  }
315
334
 
335
+ // NOTE: model and small_model are NOT patched from opencode.json.
336
+ // Model routing is handled by .sdd/model-profile.json + sdd-model-router.js plugin.
337
+ // Users edit model-profile.json to change models — opencode.json models are ignored.
338
+
316
339
  if (pkgConfig.agents && !targetConfig.agents) {
317
340
  targetConfig.agents = pkgConfig.agents;
318
341
  ctx.installed.push("opencode.json (agents patch)");
@@ -331,6 +354,10 @@ function patchOpencodeJson(ctx) {
331
354
  targetConfig.permission = pkgConfig.permission;
332
355
  ctx.installed.push("opencode.json (permission patch)");
333
356
  }
357
+
358
+ // NOTE: model and small_model are NOT patched here.
359
+ // Model routing is handled by .sdd/model-profile.json + sdd-model-router.js plugin.
360
+ // Users should edit model-profile.json to change models, not opencode.json.
334
361
  }
335
362
 
336
363
  if (ctx.dryRun) {