@tudeorangbiasa/sdd-multiagent-opencode 0.1.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 (49) hide show
  1. package/.opencode/agents/sdd-explorer.md +75 -0
  2. package/.opencode/agents/sdd-implementer.md +72 -0
  3. package/.opencode/agents/sdd-orchestrator.md +152 -0
  4. package/.opencode/agents/sdd-planner.md +58 -0
  5. package/.opencode/agents/sdd-reviewer.md +74 -0
  6. package/.opencode/agents/sdd-verifier.md +90 -0
  7. package/.opencode/commands/audit.md +75 -0
  8. package/.opencode/commands/brief.md +190 -0
  9. package/.opencode/commands/evolve.md +87 -0
  10. package/.opencode/commands/execute-parallel.md +116 -0
  11. package/.opencode/commands/execute-task.md +81 -0
  12. package/.opencode/commands/generate-prd.md +82 -0
  13. package/.opencode/commands/generate-rules.md +67 -0
  14. package/.opencode/commands/grill-me.md +99 -0
  15. package/.opencode/commands/implement.md +149 -0
  16. package/.opencode/commands/init-sdd.md +141 -0
  17. package/.opencode/commands/plan.md +96 -0
  18. package/.opencode/commands/refine.md +115 -0
  19. package/.opencode/commands/research.md +194 -0
  20. package/.opencode/commands/sdd-full-plan.md +91 -0
  21. package/.opencode/commands/specify.md +124 -0
  22. package/.opencode/commands/tasks.md +110 -0
  23. package/.opencode/commands/upgrade.md +107 -0
  24. package/.opencode/skills/sdd-audit/SKILL.md +59 -0
  25. package/.opencode/skills/sdd-evolve/SKILL.md +95 -0
  26. package/.opencode/skills/sdd-implementation/SKILL.md +88 -0
  27. package/.opencode/skills/sdd-planning/SKILL.md +59 -0
  28. package/.opencode/skills/sdd-research/SKILL.md +44 -0
  29. package/.sdd/config.json +36 -0
  30. package/.sdd/templates/feature-brief-v2.md +65 -0
  31. package/.sdd/templates/plan-compact.md +50 -0
  32. package/.sdd/templates/project-profile-template.json +33 -0
  33. package/.sdd/templates/research-compact.md +114 -0
  34. package/.sdd/templates/roadmap-template.json +29 -0
  35. package/.sdd/templates/roadmap-template.md +66 -0
  36. package/.sdd/templates/spec-compact.md +71 -0
  37. package/.sdd/templates/tasks-compact.md +48 -0
  38. package/.sdd/templates/todo-compact.md +30 -0
  39. package/README.md +272 -0
  40. package/bin/sdd-opencode.js +387 -0
  41. package/opencode.json +98 -0
  42. package/package.json +28 -0
  43. package/vendor/opencode-agent-rules/.opencode/plugins/context-guard.js +7 -0
  44. package/vendor/opencode-agent-rules/.opencode/rules/cli-first.md +31 -0
  45. package/vendor/opencode-agent-rules/.opencode/rules/context-budget.md +39 -0
  46. package/vendor/opencode-agent-rules/.opencode/rules/core-behavior.md +44 -0
  47. package/vendor/opencode-agent-rules/.opencode/rules/status-verification.md +36 -0
  48. package/vendor/opencode-agent-rules/AGENTS.md +64 -0
  49. package/vendor/opencode-agent-rules/opencode.json +9 -0
@@ -0,0 +1,71 @@
1
+ # Specification: [Feature Name]
2
+
3
+ **Task ID:** [task-id]
4
+ **Created:** [date]
5
+ **Status:** Ready for Planning
6
+ **Version:** 1.0
7
+
8
+ ## 1. Problem Statement
9
+ - The Problem: [Clear description]
10
+ - Current Situation: [How users currently handle this]
11
+ - Desired Outcome: [What success looks like]
12
+
13
+ ## 2. User Personas
14
+ ### Primary User: [Name]
15
+ - Who: [Description]
16
+ - Goals: [What they want to achieve]
17
+ - Pain points: [Current frustrations]
18
+
19
+ ## 3. Functional Requirements
20
+ ### FR-1: [Requirement Name]
21
+ **Description:** [What it does]
22
+
23
+ **User Story:**
24
+ > As a [user type], I want to [action] so that [benefit].
25
+
26
+ **Acceptance Criteria:**
27
+ - [ ] Given [context], when [action], then [result]
28
+ - [ ] [Additional criteria]
29
+
30
+ **Priority:** Must Have / Should Have / Nice to Have
31
+
32
+ ## 4. Non-Functional Requirements
33
+ - Performance: [Specific metrics]
34
+ - Security: [Security requirements]
35
+ - Accessibility: [Accessibility requirements]
36
+ - Scalability: [Scalability requirements]
37
+
38
+ ## 5. Out of Scope
39
+ - ❌ [Exclusion 1] - [Why excluded]
40
+ - ❌ [Exclusion 2] - [Why excluded]
41
+
42
+ ## 6. Edge Cases & Error Handling
43
+ | Scenario | Expected Behavior |
44
+ |----------|-------------------|
45
+ | [Edge case] | [How system handles] |
46
+
47
+ | Error | User Message | System Action |
48
+ |-------|--------------|---------------|
49
+ | [Error] | "[Message]" | [Action] |
50
+
51
+ ## 7. Success Metrics
52
+ | Metric | Target | How to Measure |
53
+ |--------|--------|----------------|
54
+ | [Metric] | [Target] | [Method] |
55
+
56
+ ## 8. Open Questions
57
+ - [ ] [Question requiring input]
58
+
59
+ ## 9. Revision History
60
+ | Version | Date | Changes |
61
+ |---------|------|---------|
62
+ | 1.0 | [date] | Initial specification |
63
+
64
+ ## Next Steps
65
+ 1. Review spec with stakeholders
66
+ 2. Resolve open questions
67
+ 3. Run `/plan [task-id]` to create technical plan
68
+
69
+ ---
70
+
71
+ *Specification created with SDD Multi-Agent OpenCode*
@@ -0,0 +1,48 @@
1
+ # Implementation Tasks: [Feature Name]
2
+
3
+ **Task ID:** [task-id]
4
+ **Created:** [date]
5
+ **Status:** Ready for Implementation
6
+
7
+ ## Summary
8
+
9
+ | Metric | Value |
10
+ |--------|-------|
11
+ | Total Tasks | [count] |
12
+ | Estimated Effort | [hours/days] |
13
+ | Phases | [count] |
14
+
15
+ ## Phase 1: [Phase Name]
16
+
17
+ **Goal:** [What this phase accomplishes]
18
+
19
+ ### Task 1.1: [Task Title]
20
+
21
+ **Description:** [What needs to be done]
22
+
23
+ **Acceptance Criteria:**
24
+ - [ ] [Criteria 1]
25
+ - [ ] [Criteria 2]
26
+
27
+ **Effort:** [X hours]
28
+ **Priority:** High/Medium/Low
29
+ **Dependencies:** None / [Task IDs]
30
+
31
+ ---
32
+
33
+ [Repeat for all tasks in all phases]
34
+
35
+ ## Quick Reference Checklist
36
+
37
+ - [ ] Task 1.1: [Title]
38
+ - [ ] Task 1.2: [Title]
39
+ - [ ] Task 2.1: [Title]
40
+
41
+ ## Next Steps
42
+
43
+ 1. Review task breakdown
44
+ 2. Run `/implement [task-id]` to start execution
45
+
46
+ ---
47
+
48
+ *Tasks created with SDD Multi-Agent OpenCode*
@@ -0,0 +1,30 @@
1
+ # Todo List: [Feature Name]
2
+
3
+ **Task ID:** [task-id]
4
+ **Created:** [date]
5
+ **Status:** In Progress
6
+
7
+ ## Phase 1: [Phase Name]
8
+
9
+ - [ ] Task 1.1: [Description]
10
+ - Dependencies: None
11
+ - Files: [files to create/modify]
12
+ - [ ] Task 1.2: [Description]
13
+ - Dependencies: Task 1.1
14
+ - Files: [files to create/modify]
15
+
16
+ ## Phase 2: [Phase Name]
17
+
18
+ - [ ] Task 2.1: [Description]
19
+ - Dependencies: Phase 1 complete
20
+ - Files: [files to create/modify]
21
+
22
+ ## Progress Log
23
+
24
+ | Task | Status | Completed At | Notes |
25
+ |------|--------|--------------|-------|
26
+ | | | | |
27
+
28
+ ---
29
+
30
+ *Todo list created with SDD Multi-Agent OpenCode*
package/README.md ADDED
@@ -0,0 +1,272 @@
1
+ # SDD Multi-Agent OpenCode
2
+
3
+ Spec-Driven Development framework for OpenCode with multi-agent orchestration, DAG-based parallel execution, and free-tier model optimization.
4
+
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
+
7
+ ## Layering
8
+
9
+ This repo is the **SDD workflow layer**. For base agent behavior, CLI-first scaffolding, status verification, and context-window management, use [`opencode-agent-rules`](https://github.com/TudeOrangBiasa/opencode-agent-rules) first.
10
+
11
+ ```txt
12
+ opencode-agent-rules # base behavior + context/compaction policy
13
+
14
+ sdd-multiagent-opencode # SDD commands, agents, skills, templates
15
+
16
+ external UI skills # impeccable, taste, nothing-design, etc.
17
+ ```
18
+
19
+ ## What's Different from the Original
20
+
21
+ | Aspect | Original (Cursor) | This (OpenCode) |
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 |
25
+ | **Codebase Search** | grep/glob | `codebase-memory-mcp` graph queries |
26
+ | **Web Research** | Cursor web search | `exa_web_search_exa` |
27
+ | **Visual Verification** | N/A | Chrome DevTools + Qwen (image-capable) |
28
+ | **Hooks** | `hooks.json` | Plugin JS/TS with event system |
29
+ | **Cost** | Per-token billing | All free-tier models |
30
+
31
+ ## Multi-Agent Architecture
32
+
33
+ | Agent | Model | Role |
34
+ |-------|-------|------|
35
+ | **sdd-orchestrator** | `opencode/gpt-5.5` | DAG scheduling, conflict detection, deadlock handling |
36
+ | **sdd-planner** | `opencode/gpt-5.5` | 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) |
41
+
42
+ ## Quick Start
43
+
44
+ ### npx Install (Recommended)
45
+
46
+ ```bash
47
+ cd your-project
48
+ npx sdd-multiagent-opencode init
49
+ ```
50
+
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
+ **Flags:**
56
+ ```bash
57
+ npx sdd-multiagent-opencode init # Install everything
58
+ npx sdd-multiagent-opencode init --sdd-only # SDD workflow only
59
+ npx sdd-multiagent-opencode init --rules-only # Base rules only
60
+ npx sdd-multiagent-opencode init --force # Overwrite existing
61
+ npx sdd-multiagent-opencode init --dry-run # Preview only
62
+ ```
63
+
64
+ ### 1. Install (Manual)
65
+
66
+ #### Option A: Using Commands (Recommended)
67
+
68
+ If you have OpenCode running, you can use the init commands:
69
+
70
+ ```
71
+ /init-rules # Install base agent rules first
72
+ /init-sdd # Install SDD workflow layer
73
+ ```
74
+
75
+ #### Option B: Manual Copy
76
+
77
+ ```bash
78
+ # Recommended: install base agent rules first
79
+ git clone https://github.com/TudeOrangBiasa/opencode-agent-rules.git
80
+
81
+ # Clone into your project
82
+ git clone https://github.com/TudeOrangBiasa/sdd-multiagent-opencode.git
83
+
84
+ # Or copy the .opencode/ and .sdd/ directories into your project
85
+ cp opencode-agent-rules/AGENTS.md /your-project/
86
+ cp -r opencode-agent-rules/.opencode/rules /your-project/.opencode/
87
+ cp -r opencode-agent-rules/.opencode/plugins /your-project/.opencode/
88
+ cp -r sdd-multiagent-opencode/.opencode /your-project/
89
+ cp -r sdd-multiagent-opencode/.sdd /your-project/
90
+ cp sdd-multiagent-opencode/opencode.json /your-project/
91
+ ```
92
+
93
+ ### 2. Configure
94
+
95
+ Merge the `agent` and `permission` sections from `opencode.json` into your project's `opencode.json`.
96
+
97
+ ### 3. Update Project Profile
98
+
99
+ Edit `.sdd/project-profile.json` with your stack:
100
+ - framework (e.g., "next", "react", "express")
101
+ - language (e.g., "typescript", "javascript")
102
+ - packageManager (e.g., "pnpm", "npm", "yarn")
103
+ - commands (dev, build, test, lint)
104
+
105
+ ### 4. Use
106
+
107
+ ```bash
108
+ # Quick planning (80% of features)
109
+ /brief user-auth JWT authentication with login/logout
110
+
111
+ # Full planning (complex features)
112
+ /research database-engine Best database for our use case --deep
113
+ /specify user-auth User authentication with login, logout, password reset
114
+ /plan user-auth
115
+ /tasks user-auth
116
+ /implement user-auth
117
+
118
+ # TDD workflow (test-driven development)
119
+ /tasks user-auth --tdd
120
+ /implement user-auth --tdd
121
+
122
+ # Full project roadmap
123
+ /sdd-full-plan blog-platform Full-featured blog with CMS and analytics
124
+ /execute-parallel blog-platform --until-finish
125
+
126
+ # Audit
127
+ /audit user-auth
128
+ ```
129
+
130
+ ## Commands
131
+
132
+ | Command | Purpose | Output |
133
+ |---------|---------|--------|
134
+ | `/init-rules` | Install base agent rules | Base rules files |
135
+ | `/init-sdd` | Install SDD workflow | SDD files + project profile |
136
+ | `/brief` | Lightweight feature brief (~30 min) | `feature-brief.md` |
137
+ | `/research` | Pattern investigation (supports `--deep`) | `research.md` |
138
+ | `/specify` | Detailed requirements | `spec.md` |
139
+ | `/plan` | Technical architecture | `plan.md` |
140
+ | `/tasks` | Task breakdown | `tasks.md` |
141
+ | `/implement` | Execute implementation with todo tracking | Code + `todo-list.md` |
142
+ | `/sdd-full-plan` | Complete project roadmap | `roadmap.json` + tasks |
143
+ | `/execute-parallel` | Parallel DAG execution | Updated roadmap |
144
+ | `/execute-task` | Single task execution | Updated roadmap |
145
+ | `/evolve` | Update specs with discoveries | Updated specs |
146
+ | `/refine` | Iterate on specs through discussion | Updated docs |
147
+ | `/upgrade` | Brief → Full SDD planning | Full SDD docs |
148
+ | `/audit` | Compare implementation against specs | Audit report |
149
+ | `/generate-prd` | PRD via Socratic questions | `full-prd.md` |
150
+ | `/generate-rules` | Auto-generate coding rules | Rule files |
151
+ | `/grill-me` | Clarify product requirements | Clarified brief |
152
+
153
+ ## Project Structure
154
+
155
+ ```
156
+ .opencode/
157
+ ├── opencode.json # Agent configs, permissions, model assignments
158
+ ├── agents/
159
+ │ ├── sdd-orchestrator.md # DAG coordinator (GPT 5.5)
160
+ │ ├── sdd-planner.md # Architecture designer (GPT 5.5)
161
+ │ ├── sdd-explorer.md # Codebase investigator (DeepSeek)
162
+ │ ├── sdd-implementer.md # Code generator (DeepSeek)
163
+ │ ├── sdd-verifier.md # Completeness checker (Qwen + Chrome)
164
+ │ └── sdd-reviewer.md # Code reviewer (MiniMax)
165
+ ├── commands/
166
+ │ ├── brief.md # /brief
167
+ │ ├── research.md # /research
168
+ │ ├── specify.md # /specify
169
+ │ ├── plan.md # /plan
170
+ │ ├── tasks.md # /tasks
171
+ │ ├── implement.md # /implement
172
+ │ ├── sdd-full-plan.md # /sdd-full-plan
173
+ │ ├── execute-parallel.md # /execute-parallel
174
+ │ ├── execute-task.md # /execute-task
175
+ │ ├── evolve.md # /evolve
176
+ │ ├── refine.md # /refine
177
+ │ ├── upgrade.md # /upgrade
178
+ │ ├── audit.md # /audit
179
+ │ ├── generate-prd.md # /generate-prd
180
+ │ └── generate-rules.md # /generate-rules
181
+ └── skills/
182
+ ├── sdd-research/SKILL.md
183
+ ├── sdd-planning/SKILL.md
184
+ ├── sdd-implementation/SKILL.md
185
+ ├── sdd-audit/SKILL.md
186
+ └── sdd-evolve/SKILL.md
187
+
188
+ .sdd/
189
+ ├── config.json # Project configuration
190
+ ├── project-profile.json # Stack and skill routing config
191
+ └── templates/ # Document templates
192
+ ├── feature-brief-v2.md
193
+ ├── spec-compact.md
194
+ ├── plan-compact.md
195
+ ├── tasks-compact.md
196
+ ├── research-compact.md
197
+ ├── todo-compact.md
198
+ ├── roadmap-template.json
199
+ └── roadmap-template.md
200
+
201
+ specs/
202
+ ├── active/ # Features in development
203
+ ├── backlog/ # Future features
204
+ ├── completed/ # Delivered features
205
+ └── todo-roadmap/ # Project roadmaps with DAG
206
+ ```
207
+
208
+ ## Workflows
209
+
210
+ ### Quick Planning (80% of features)
211
+ ```
212
+ /brief → /evolve → /refine → /implement
213
+ ```
214
+
215
+ ### Full Planning (complex features)
216
+ ```
217
+ /research → /specify → /plan → /tasks → /implement
218
+ ```
219
+
220
+ ### Deep Research (unfamiliar domain)
221
+ ```
222
+ /research --deep → /specify → /plan → /tasks → /implement
223
+ ```
224
+
225
+ ### Parallel Execution (project roadmap)
226
+ ```
227
+ /sdd-full-plan → /execute-parallel --until-finish
228
+ ```
229
+
230
+ ### TDD Workflow (Test-Driven Development)
231
+
232
+ ```
233
+ /brief feature-x → /tasks feature-x --tdd → /implement feature-x --tdd
234
+ ```
235
+
236
+ With `--tdd` flag:
237
+ - `/tasks` generates TDD-specific tasks with test-first structure
238
+ - `/implement` writes failing test → implements minimum code → verifies pass → refactors
239
+
240
+ **Example:**
241
+ ```
242
+ /tasks user-auth --tdd
243
+ /implement user-auth --tdd
244
+ ```
245
+
246
+ ## Tools Integration
247
+
248
+ ### codebase-memory-mcp
249
+ Used by `sdd-explorer` and `sdd-implementer` for:
250
+ - `search_graph` — find functions, classes, routes by natural language
251
+ - `trace_path` — trace call chains and dependencies
252
+ - `get_code_snippet` — read specific function/class source code
253
+ - `query_graph` — run Cypher queries for complex patterns
254
+ - `get_architecture` — high-level project structure
255
+
256
+ ### exa_web_search_exa
257
+ Used by `sdd-explorer` and `sdd-research` skill for:
258
+ - External pattern research
259
+ - Documentation lookup
260
+ - Technology comparison
261
+ - Deep research mode (`--deep`)
262
+
263
+ ### chrome-devtools
264
+ Used by `sdd-verifier` for:
265
+ - `chrome-devtools_navigate_page` — navigate to feature pages
266
+ - `chrome-devtools_take_screenshot` — capture visual state
267
+ - `chrome-devtools_take_snapshot` — analyze DOM structure
268
+ - `chrome-devtools_list_console_messages` — check for errors
269
+
270
+ ## License
271
+
272
+ MIT