opencode-orchestrator 0.5.6 → 0.5.8
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/README.md +24 -176
- package/dist/index.js +18 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,34 +11,18 @@
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## Why
|
|
14
|
+
## Why?
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
I wanted to achieve the same quality of work as premium models like **Gemini 3 Pro** and **Claude Opus**, but with affordable models.
|
|
19
|
-
For developers who chose **budget-friendly subscriptions** instead of expensive plans, I built a multi-agent system that can **autonomously complete** complex engineering tasks even with mid-tier LLMs.
|
|
20
|
-
|
|
21
|
-
> *"Intelligence is a resource. Orchestrate it."*
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## What is this?
|
|
26
|
-
|
|
27
|
-
A **5-agent autonomous architecture** designed to solve complex engineering tasks with high reliability, even on mid-range LLMs.
|
|
28
|
-
|
|
29
|
-
**Core Philosophy**: Intelligence is a resource. We orchestrate that resource through **Phase-based Workflows** and **Mandatory Environment Scans** to ensure code always fits the project's infrastructure.
|
|
30
|
-
|
|
31
|
-
> 🦀 **Powered by Rust** — Background tasks and parallel searches run on native Rust binaries for maximum performance.
|
|
16
|
+
Tested GLM-4, got disappointed. Built this to make mid-tier models work like premium ones through structured orchestration.
|
|
32
17
|
|
|
33
18
|
### Key Features
|
|
34
|
-
- **🎯 Autonomous Loop** — Commander runs
|
|
35
|
-
- **🔍 Environment Scan** —
|
|
36
|
-
- **🔨 Smart Implementation** —
|
|
37
|
-
- **🛡️ Rigorous Audit** —
|
|
38
|
-
- **💾 Persistent Context** —
|
|
39
|
-
- **🏗️ Parallel Agents** —
|
|
40
|
-
- **⏳ Background Tasks** —
|
|
41
|
-
- **🔎 mgrep** — Multi-pattern parallel search powered by Rust for blazing-fast codebase analysis.
|
|
19
|
+
- **🎯 Autonomous Loop** — Commander runs until the mission is complete
|
|
20
|
+
- **🔍 Environment Scan** — Analyzes Infra, Stack, and Domain before coding
|
|
21
|
+
- **🔨 Smart Implementation** — Matches existing codebase patterns
|
|
22
|
+
- **🛡️ Rigorous Audit** — Proves success with builds/tests/logs
|
|
23
|
+
- **💾 Persistent Context** — Saves session state to disk
|
|
24
|
+
- **🏗️ Parallel Agents** — Run multiple agents concurrently
|
|
25
|
+
- **⏳ Background Tasks** — Non-blocking command execution
|
|
42
26
|
|
|
43
27
|
---
|
|
44
28
|
|
|
@@ -54,168 +38,33 @@ Restart OpenCode after installation.
|
|
|
54
38
|
|
|
55
39
|
## Usage
|
|
56
40
|
|
|
57
|
-
### 🚀
|
|
41
|
+
### 🚀 Select Commander via Tab Key (Recommended)
|
|
58
42
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<div align="center">
|
|
62
|
-
<img src="assets/commander-screenshot.png" alt="Commander Screenshot" width="600" />
|
|
63
|
-
<p><em>Press Tab to select Commander</em></p>
|
|
64
|
-
</div>
|
|
43
|
+
Press `Tab` in OpenCode → Select **Commander** → Type your mission!
|
|
65
44
|
|
|
66
45
|
```
|
|
67
46
|
"Fix the login bug in the docker-compose environment"
|
|
68
47
|
```
|
|
69
48
|
|
|
70
|
-
|
|
71
|
-
1. **Survey**: Scan the Docker environment and codebase.
|
|
72
|
-
2. **Plan**: Break the fix into steps.
|
|
73
|
-
3. **Execute**: Call Builder to fix while matching patterns.
|
|
74
|
-
4. **Verify**: Run builds/tests to prove the fix works.
|
|
75
|
-
5. **Complete**: Report results with concrete evidence.
|
|
76
|
-
|
|
77
|
-
### 📋 Method 2: Use /task Command
|
|
49
|
+
### 📋 Use /task Command
|
|
78
50
|
|
|
79
51
|
```bash
|
|
80
52
|
/task "Implement user authentication with JWT"
|
|
81
53
|
```
|
|
82
54
|
|
|
83
|
-
> **💡 Tip:**
|
|
84
|
-
> Use `/task` for complex tasks that need extended processing!
|
|
85
|
-
|
|
86
|
-
### ⚡ Example: Parallel Execution
|
|
87
|
-
|
|
88
|
-
Trigger parallel agent execution with prompts like:
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
"Build and test in parallel"
|
|
92
|
-
"Implement feature X while reviewing module Y"
|
|
93
|
-
"Run linting, tests, and build at the same time"
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Commander will automatically use `delegate_task` with `background: true` for independent tasks.
|
|
97
|
-
|
|
98
|
-
Monitor parallel tasks in the terminal:
|
|
99
|
-
```
|
|
100
|
-
[parallel] 🚀 SPAWNED task_a1b2 → builder: Implement feature X
|
|
101
|
-
[parallel] 🚀 SPAWNED task_c3d4 → inspector: Review module Y
|
|
102
|
-
[parallel] ✅ COMPLETED task_c3d4 → inspector: Review module Y (45s)
|
|
103
|
-
[parallel] 🗑️ CLEANED task_c3d4 (session deleted)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## Agents (5-Agent Architecture)
|
|
109
|
-
|
|
110
|
-
| Agent | Emoji | Role | Responsibility |
|
|
111
|
-
| :--- | :--- | :--- | :--- |
|
|
112
|
-
| **Commander** | 🎯 | Orchestrator | Autonomous mission control & delegation |
|
|
113
|
-
| **Architect** | 🏗️ | Planner | Task decomposition & strategy correction |
|
|
114
|
-
| **Builder** | 🔨 | Developer | Full-stack implementation (Logic + UI) |
|
|
115
|
-
| **Inspector** | 🔍 | Quality | 5-point audit & automatic bug fixing |
|
|
116
|
-
| **Recorder** | 💾 | Context | Persistent environment & progress tracking |
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## The Workflow (Progressive Phases)
|
|
121
|
-
|
|
122
|
-
1. **Phase 0: Triage (Smart)**
|
|
123
|
-
- **Fast Track 🟢**: Simple fixes → Execute instantly (Skip heavy scans).
|
|
124
|
-
- **Deep Track 🔴**: Complex features → Full Environment Scan & Plan.
|
|
125
|
-
2. **Phase 1: Environment Scan**
|
|
126
|
-
- Mandatory for Deep Track: Infra/Domain/Stack analysis.
|
|
127
|
-
3. **Phase 2: Parallel Planning**
|
|
128
|
-
- Architect creates a DAG of atomic tasks (Scalable Planning).
|
|
129
|
-
4. **Phase 3: Execution & Audit**
|
|
130
|
-
- Builder writes code ↔ Inspector verifies with evidence.
|
|
131
|
-
5. **Phase 4: Completion**
|
|
132
|
-
- Mission Complete reported with proof of build/test success.
|
|
55
|
+
> **💡 Tip:** `/task` makes Commander run **2x longer** for complex tasks.
|
|
133
56
|
|
|
134
57
|
---
|
|
135
58
|
|
|
136
|
-
##
|
|
137
|
-
|
|
138
|
-
### Quick Start (Local Development)
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
# Step 1: Build and link (run this ONCE)
|
|
142
|
-
npm run dev:link
|
|
143
|
-
|
|
144
|
-
# Step 2: Restart OpenCode
|
|
145
|
-
|
|
146
|
-
# Step 3: Make code changes...
|
|
147
|
-
|
|
148
|
-
# Step 4: Rebuild and re-link (after code changes)
|
|
149
|
-
npm run dev:link
|
|
150
|
-
|
|
151
|
-
# (Optional) Check link status
|
|
152
|
-
npm run dev:status
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Development Scripts
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
# Build the plugin
|
|
159
|
-
npm run build
|
|
160
|
-
|
|
161
|
-
# Run all tests (87 tests)
|
|
162
|
-
npm run test:all
|
|
163
|
-
|
|
164
|
-
# Run unit tests only
|
|
165
|
-
npm run test:unit
|
|
166
|
-
|
|
167
|
-
# Run E2E tests only
|
|
168
|
-
npm run test:e2e
|
|
169
|
-
|
|
170
|
-
# Link for local testing (auto-rebuilds)
|
|
171
|
-
npm run dev:link
|
|
172
|
-
|
|
173
|
-
# Unlink from global
|
|
174
|
-
npm run dev:unlink
|
|
175
|
-
|
|
176
|
-
# Check if plugin is linked globally
|
|
177
|
-
npm run dev:status
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Test Suite
|
|
181
|
-
|
|
182
|
-
| Command | Description | Tests |
|
|
183
|
-
|---------|-------------|-------|
|
|
184
|
-
| `npm run test:all` | Run all tests with verbose output | 87 |
|
|
185
|
-
| `npm run test:unit` | Unit tests (concurrency, task-store, etc.) | 40 |
|
|
186
|
-
| `npm run test:e2e` | E2E tests (background, session, rust, system) | 47 |
|
|
187
|
-
| `npm run test:coverage` | Generate coverage report | - |
|
|
188
|
-
|
|
189
|
-
### Development Workflow
|
|
190
|
-
|
|
191
|
-
| Step | Command | Description |
|
|
192
|
-
|------|----------|-------------|
|
|
193
|
-
| 1️⃣ Initial setup | `npm run dev:link` | Build + link for the first time |
|
|
194
|
-
| 2️⃣ Test | Open OpenCode | Test your changes |
|
|
195
|
-
| 3️⃣ Make changes | Edit code | Modify TypeScript files |
|
|
196
|
-
| 4️⃣ Rebuild | `npm run dev:link` | Rebuild + re-link |
|
|
197
|
-
| 5️⃣ Repeat | 2-4 | Iterate on changes |
|
|
198
|
-
| ❌ Cleanup | `npm run dev:unlink` | Unlink when done |
|
|
199
|
-
|
|
200
|
-
### Release Scripts
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
# Release patch version (0.5.4 → 0.5.5)
|
|
204
|
-
npm run release:patch
|
|
205
|
-
|
|
206
|
-
# Release minor version (0.5.5 → 0.6.0)
|
|
207
|
-
npm run release:minor
|
|
208
|
-
|
|
209
|
-
# Release major version (0.5.5 → 1.0.0)
|
|
210
|
-
npm run release:major
|
|
211
|
-
```
|
|
59
|
+
## The 5 Agents
|
|
212
60
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
61
|
+
| Agent | Role | Responsibility |
|
|
62
|
+
| :--- | :--- | :--- |
|
|
63
|
+
| **Commander** 🎯 | Orchestrator | Autonomous mission control |
|
|
64
|
+
| **Architect** 🏗️ | Planner | Task decomposition |
|
|
65
|
+
| **Builder** 🔨 | Developer | Full-stack implementation |
|
|
66
|
+
| **Inspector** 🔍 | Quality | Audit & auto-fix |
|
|
67
|
+
| **Recorder** 💾 | Context | Progress tracking |
|
|
219
68
|
|
|
220
69
|
---
|
|
221
70
|
|
|
@@ -227,11 +76,10 @@ npm uninstall -g opencode-orchestrator
|
|
|
227
76
|
|
|
228
77
|
---
|
|
229
78
|
|
|
230
|
-
##
|
|
79
|
+
## Documentation
|
|
231
80
|
|
|
232
|
-
- [Architecture & Design](docs/ARCHITECTURE.md)
|
|
233
|
-
- [
|
|
234
|
-
- [Changelog](CHANGELOG.md) — Version history and updates
|
|
81
|
+
- [Architecture & Design](docs/ARCHITECTURE.md)
|
|
82
|
+
- [Troubleshooting](docs/PLUGIN_TROUBLESHOOTING.md)
|
|
235
83
|
|
|
236
84
|
---
|
|
237
85
|
|
package/dist/index.js
CHANGED
|
@@ -22,11 +22,12 @@ You are Commander. Complete missions autonomously. Never stop until done.
|
|
|
22
22
|
</role>
|
|
23
23
|
|
|
24
24
|
<core_rules>
|
|
25
|
-
1.
|
|
26
|
-
2. Never
|
|
27
|
-
3. Never
|
|
28
|
-
4.
|
|
29
|
-
5. Always
|
|
25
|
+
1. LANGUAGE: ALL output MUST be in English only. No exceptions. No other languages.
|
|
26
|
+
2. Never stop until "\u2705 MISSION COMPLETE"
|
|
27
|
+
3. Never wait for user during execution
|
|
28
|
+
4. Never stop because agent returned nothing
|
|
29
|
+
5. Always survey environment & codebase BEFORE coding
|
|
30
|
+
6. Always verify with evidence based on runtime context
|
|
30
31
|
</core_rules>
|
|
31
32
|
|
|
32
33
|
<phase_0 name="TRIAGE">
|
|
@@ -216,8 +217,8 @@ You are Architect. Break complex tasks into atomic pieces.
|
|
|
216
217
|
</role>
|
|
217
218
|
|
|
218
219
|
<constraints>
|
|
219
|
-
|
|
220
|
-
If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
220
|
+
1. LANGUAGE: ALL output MUST be in English only. No exceptions. No other languages.
|
|
221
|
+
2. If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
221
222
|
</constraints>
|
|
222
223
|
|
|
223
224
|
<scalable_planning>
|
|
@@ -278,8 +279,8 @@ You are Builder. Write code that works.
|
|
|
278
279
|
</role>
|
|
279
280
|
|
|
280
281
|
<constraints>
|
|
281
|
-
|
|
282
|
-
If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
282
|
+
1. LANGUAGE: ALL output MUST be in English only. No exceptions. No other languages.
|
|
283
|
+
2. If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
283
284
|
</constraints>
|
|
284
285
|
|
|
285
286
|
<scalable_attention>
|
|
@@ -344,8 +345,8 @@ You are Inspector. Prove failure or success with evidence.
|
|
|
344
345
|
</role>
|
|
345
346
|
|
|
346
347
|
<constraints>
|
|
347
|
-
|
|
348
|
-
If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
348
|
+
1. LANGUAGE: ALL output MUST be in English only. No exceptions. No other languages.
|
|
349
|
+
2. If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
349
350
|
</constraints>
|
|
350
351
|
|
|
351
352
|
<scalable_audit>
|
|
@@ -411,8 +412,8 @@ You are Recorder. Save and load work progress.
|
|
|
411
412
|
</role>
|
|
412
413
|
|
|
413
414
|
<constraints>
|
|
414
|
-
|
|
415
|
-
If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
415
|
+
1. LANGUAGE: ALL output MUST be in English only. No exceptions. No other languages.
|
|
416
|
+
2. If your reasoning collapses into gibberish, stop and output "ERROR: REASONING_COLLAPSE".
|
|
416
417
|
</constraints>
|
|
417
418
|
|
|
418
419
|
<purpose>
|
|
@@ -13053,6 +13054,10 @@ var COMMANDS = {
|
|
|
13053
13054
|
You are Commander. Complete this mission. Never stop until 100% done.
|
|
13054
13055
|
</role>
|
|
13055
13056
|
|
|
13057
|
+
<language_rule>
|
|
13058
|
+
CRITICAL: ALL output MUST be in English only. No exceptions. No other languages permitted.
|
|
13059
|
+
</language_rule>
|
|
13060
|
+
|
|
13056
13061
|
<phase_1 name="MANDATORY_ENVIRONMENT_SCAN">
|
|
13057
13062
|
Before any planning or coding, you MUST understand:
|
|
13058
13063
|
1. INFRA: OS-native? Container? Docker-compose? Volume-mounted?
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.8",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|