opencode-swarm 2.1.0 → 2.1.1

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 (2) hide show
  1. package/README.md +50 -133
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,161 +1,78 @@
1
1
  # OpenCode Swarm
2
2
 
3
- Architect-centric agentic swarm plugin for OpenCode. Hub-and-spoke orchestration with SME consultation, code generation, and QA review.
3
+ ![License](https://img.shields.io/badge/license-MIT-blue)
4
+ ![OpenCode Plugin](https://img.shields.io/badge/opencode-plugin-green)
5
+ ![Agentic Architecture](https://img.shields.io/badge/architecture-architect--centric-purple)
4
6
 
5
- ## Overview
7
+ **Architect-driven, multi-agent development for OpenCode.**
8
+ Design-first orchestration with domain-aware SMEs, heterogeneous model perspectives, production-grade code generation, and layered QA.
6
9
 
7
- OpenCode Swarm implements a multi-agent development pipeline where:
10
+ OpenCode Swarm is built for engineers who want **structured reasoning, controlled delegation, and predictable outcomes**—not parallel agent noise.
8
11
 
9
- 1. **Architect** (central orchestrator) analyzes requests and coordinates all agents
10
- 2. **SME Agents** provide domain-specific technical expertise (serial execution)
11
- 3. **Coder** implements unified specifications
12
- 4. **QA Agents** (Security Reviewer + Auditor) validate code quality
13
- 5. **Test Engineer** generates test cases for approved code
12
+ ---
14
13
 
15
- ```
16
- User → Architect (analyze) → [SME Pool - serial] → Architect (collate)
17
- → Coder → [QA: Security + Auditor] → Architect (triage) → Test
18
- ```
14
+ ## Why OpenCode Swarm
19
15
 
20
- ## Installation
16
+ Most agent frameworks parallelize everything and hope coherence emerges later.
17
+ OpenCode Swarm enforces discipline:
21
18
 
22
- ```bash
23
- bunx opencode-swarm install
24
- ```
19
+ - A single Architect owns analysis and decisions
20
+ - Experts are consulted only when technically relevant
21
+ - Agents execute serially for traceability
22
+ - Security and correctness are validated before delivery
23
+ - Different models can be assigned per role, introducing genuinely distinct perspectives
25
24
 
26
- Then start OpenCode:
25
+ This design improves **accuracy, efficiency, and failure detection**, especially on complex or high-stakes tasks.
27
26
 
28
- ```bash
29
- opencode
30
- ```
31
-
32
- ## Configuration
27
+ ---
33
28
 
34
- Edit `~/.config/opencode/opencode-swarm.json`:
35
-
36
- ```json
37
- {
38
- "preset": "hybrid",
39
- "presets": {
40
- "remote": {
41
- "architect": { "model": "anthropic/claude-sonnet-4.5" },
42
- "coder": { "model": "openai/gpt-5.2-codex" },
43
- "_sme": { "model": "google/gemini-3-flash" },
44
- "_qa": { "model": "google/gemini-3-flash" },
45
- "test_engineer": { "model": "google/gemini-3-flash" }
46
- },
47
- "hybrid": {
48
- "architect": { "model": "anthropic/claude-sonnet-4.5" },
49
- "coder": { "model": "ollama/qwen3:72b" },
50
- "_sme": { "model": "npu/qwen3:14b" },
51
- "_qa": { "model": "npu/qwen3:14b" },
52
- "test_engineer": { "model": "npu/qwen3:14b" }
53
- }
54
- },
55
- "swarm_mode": "hybrid",
56
- "gpu_url": "http://192.168.1.100:1234/v1",
57
- "npu_url": "http://localhost:11435/v1",
58
- "max_iterations": 5
59
- }
60
- ```
29
+ ## Key Advantage: Heterogeneous Model Perspectives
61
30
 
62
- ### Category Defaults
31
+ OpenCode Swarm allows **per-role model selection** so that each cognitive function is optimized independently:
63
32
 
64
- Use `_sme` and `_qa` to set models for all agents in a category:
33
+ - Architect deep reasoning and synthesis
34
+ - SMEs → domain recall and speed
35
+ - Coder → implementation fidelity
36
+ - QA → adversarial review and audit rigor
65
37
 
66
- ```json
67
- {
68
- "agents": {
69
- "_sme": { "model": "npu/qwen3:14b" },
70
- "_qa": { "model": "npu/qwen3:14b" }
71
- }
72
- }
73
- ```
38
+ Using different models per role reduces correlated failure modes, increases early error detection, and mirrors how real engineering teams benefit from diverse expertise.
74
39
 
75
- To override a specific agent within a category:
40
+ See: [docs/design-rationale.md](docs/design-rationale.md)
76
41
 
77
- ```json
78
- {
79
- "agents": {
80
- "_sme": { "model": "npu/qwen3:14b" },
81
- "sme_oracle": { "model": "ollama/qwen3:72b" }
82
- }
83
- }
84
- ```
42
+ ---
85
43
 
86
- ### Custom Prompts
44
+ ## Architecture Overview
87
45
 
88
- Place custom prompts in `~/.config/opencode/opencode-swarm/`:
46
+ OpenCode Swarm implements a hub-and-spoke pipeline with a single controlling Architect.
89
47
 
90
- - `{agent}.md` - Replace the default prompt entirely
91
- - `{agent}_append.md` - Append to the default prompt
92
-
93
- Example: `architect_append.md` to add custom instructions to the Architect.
94
-
95
- ## Agents
96
-
97
- ### Orchestrator
98
-
99
- | Agent | Role |
100
- |-------|------|
101
- | `architect` | Central orchestrator, coordinates all phases |
102
-
103
- ### SME Specialists (Domain Experts)
104
-
105
- | Agent | Domain |
106
- |-------|--------|
107
- | `sme_windows` | Windows OS internals, registry, services |
108
- | `sme_powershell` | PowerShell scripting, cmdlets, modules |
109
- | `sme_python` | Python ecosystem, libraries, best practices |
110
- | `sme_oracle` | Oracle Database, SQL/PLSQL, administration |
111
- | `sme_network` | Networking, firewalls, DNS, TLS/SSL |
112
- | `sme_security` | STIG compliance, hardening, encryption |
113
- | `sme_linux` | Linux administration, systemd, packages |
114
- | `sme_vmware` | VMware vSphere, ESXi, PowerCLI |
115
- | `sme_azure` | Azure cloud services, Entra ID, ARM/Bicep |
116
- | `sme_active_directory` | Active Directory, LDAP, Group Policy |
117
- | `sme_ui_ux` | UI/UX design, interaction patterns |
118
-
119
- ### Pipeline Agents
120
-
121
- | Agent | Role |
122
- |-------|------|
123
- | `coder` | Implements specifications, writes production code |
124
- | `security_reviewer` | Security vulnerability assessment |
125
- | `auditor` | Code correctness and quality review |
126
- | `test_engineer` | Test case and validation script generation |
127
-
128
- ## Workflow Phases
129
-
130
- 1. **ANALYZE** - Parse request, identify domains, create initial spec
131
- 2. **SME_CONSULTATION** - Consult domain experts serially
132
- 3. **COLLATE** - Synthesize SME outputs into unified spec
133
- 4. **CODE** - Generate implementation
134
- 5. **QA_REVIEW** - Security and quality review (parallel)
135
- 6. **TRIAGE** - Approve, request revision, or block
136
- 7. **TEST** - Generate tests for approved code
137
-
138
- ## Delegation Rules
48
+ ```
49
+ User Architect (analysis)
50
+ → Reader (optional)
51
+ Relevant SMEs (serial)
52
+ → Architect (spec synthesis)
53
+ Coder
54
+ → Security Review → Audit
55
+ Architect (triage)
56
+ → Test Engineer
57
+ ```
139
58
 
140
- The Architect enforces resource-aware delegation:
59
+ See: [docs/architecture.md](docs/architecture.md)
141
60
 
142
- - **SME agents**: Execute serially (one at a time) to avoid overwhelming local inference
143
- - **QA agents**: May execute in parallel (independent analysis)
144
- - **Cross-category**: One agent per category may run simultaneously
61
+ ---
145
62
 
146
- ## Tools
63
+ ## Installation
147
64
 
148
- | Tool | Description |
149
- |------|-------------|
150
- | `detect_domains` | Auto-detect SME domains from text |
151
- | `extract_code_blocks` | Extract and save code blocks to files |
65
+ ```json
66
+ {
67
+ "plugin": ["opencode-swarm"]
68
+ }
69
+ ```
152
70
 
153
- ## Environment Variables
71
+ ```bash
72
+ bunx opencode-swarm install
73
+ ```
154
74
 
155
- | Variable | Description |
156
- |----------|-------------|
157
- | `OPENCODE_SWARM_PRESET` | Override preset selection |
158
- | `OPENCODE_SWARM_DEBUG` | Enable debug logging (`1` to enable) |
75
+ ---
159
76
 
160
77
  ## License
161
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",