opencode-orchestrator 0.5.6 → 0.5.7
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 -174
- package/dist/index.js +18 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,34 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## Why I Built This 🤔
|
|
15
|
-
|
|
16
|
-
**I was frustrated coding with DeepSeek and Z.AI.**
|
|
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
14
|
## What is this?
|
|
26
15
|
|
|
27
|
-
A **5-agent autonomous architecture**
|
|
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.
|
|
16
|
+
A **5-agent autonomous architecture** for OpenCode that completes complex engineering tasks reliably.
|
|
30
17
|
|
|
31
|
-
>
|
|
18
|
+
> *"Intelligence is a resource. Orchestrate it."*
|
|
32
19
|
|
|
33
20
|
### 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.
|
|
21
|
+
- **🎯 Autonomous Loop** — Commander runs until the mission is complete
|
|
22
|
+
- **🔍 Environment Scan** — Analyzes Infra, Stack, and Domain before coding
|
|
23
|
+
- **🔨 Smart Implementation** — Matches existing codebase patterns
|
|
24
|
+
- **🛡️ Rigorous Audit** — Proves success with builds/tests/logs
|
|
25
|
+
- **💾 Persistent Context** — Saves session state to disk
|
|
26
|
+
- **🏗️ Parallel Agents** — Run multiple agents concurrently
|
|
27
|
+
- **⏳ Background Tasks** — Non-blocking command execution
|
|
42
28
|
|
|
43
29
|
---
|
|
44
30
|
|
|
@@ -54,168 +40,33 @@ Restart OpenCode after installation.
|
|
|
54
40
|
|
|
55
41
|
## Usage
|
|
56
42
|
|
|
57
|
-
### 🚀
|
|
58
|
-
|
|
59
|
-
In OpenCode, press `Tab` to open the Agent selection menu. Select **Commander** and type your mission!
|
|
43
|
+
### 🚀 Select Commander via Tab Key (Recommended)
|
|
60
44
|
|
|
61
|
-
|
|
62
|
-
<img src="assets/commander-screenshot.png" alt="Commander Screenshot" width="600" />
|
|
63
|
-
<p><em>Press Tab to select Commander</em></p>
|
|
64
|
-
</div>
|
|
45
|
+
Press `Tab` in OpenCode → Select **Commander** → Type your mission!
|
|
65
46
|
|
|
66
47
|
```
|
|
67
48
|
"Fix the login bug in the docker-compose environment"
|
|
68
49
|
```
|
|
69
50
|
|
|
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
|
|
51
|
+
### 📋 Use /task Command
|
|
78
52
|
|
|
79
53
|
```bash
|
|
80
54
|
/task "Implement user authentication with JWT"
|
|
81
55
|
```
|
|
82
56
|
|
|
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.
|
|
57
|
+
> **💡 Tip:** `/task` makes Commander run **2x longer** for complex tasks.
|
|
133
58
|
|
|
134
59
|
---
|
|
135
60
|
|
|
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
|
-
```
|
|
61
|
+
## The 5 Agents
|
|
212
62
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
63
|
+
| Agent | Role | Responsibility |
|
|
64
|
+
| :--- | :--- | :--- |
|
|
65
|
+
| **Commander** 🎯 | Orchestrator | Autonomous mission control |
|
|
66
|
+
| **Architect** 🏗️ | Planner | Task decomposition |
|
|
67
|
+
| **Builder** 🔨 | Developer | Full-stack implementation |
|
|
68
|
+
| **Inspector** 🔍 | Quality | Audit & auto-fix |
|
|
69
|
+
| **Recorder** 💾 | Context | Progress tracking |
|
|
219
70
|
|
|
220
71
|
---
|
|
221
72
|
|
|
@@ -227,11 +78,10 @@ npm uninstall -g opencode-orchestrator
|
|
|
227
78
|
|
|
228
79
|
---
|
|
229
80
|
|
|
230
|
-
##
|
|
81
|
+
## Documentation
|
|
231
82
|
|
|
232
|
-
- [Architecture & Design](docs/ARCHITECTURE.md)
|
|
233
|
-
- [
|
|
234
|
-
- [Changelog](CHANGELOG.md) — Version history and updates
|
|
83
|
+
- [Architecture & Design](docs/ARCHITECTURE.md)
|
|
84
|
+
- [Troubleshooting](docs/PLUGIN_TROUBLESHOOTING.md)
|
|
235
85
|
|
|
236
86
|
---
|
|
237
87
|
|
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.7",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|