Package Exports
- opencode-orchestrator
Readme
OpenCode Orchestrator ๐ฏ
Autonomous Multi-Agent Plugin for OpenCode
Why I Built This ๐ค
I was frustrated coding with DeepSeek and Z.AI.
I wanted to achieve the same quality of work as premium models like Gemini 3 Pro and Claude Opus, but with affordable models. 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.
"Intelligence is a resource. Orchestrate it."
What is this?
A 5-agent autonomous architecture designed to solve complex engineering tasks with high reliability, even on mid-range LLMs.
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.
Key Features
- ๐ฏ Autonomous Loop โ Commander runs relentlessly until mission is complete.
- ๐ Environment Scan โ Mandatory analysis of Infra (Docker/OS), Stack, and Domain before any code change.
- ๐จ Smart Implementation โ Builder matches existing codebase patterns exactly.
- ๐ก๏ธ Rigorous Audit โ Inspector proves success with environment-specific evidence (Builds/Tests/Logs).
- ๐พ Persistent Context โ Recorder saves session state to disk, enabling resume at any time.
- ๐๏ธ Parallel Agents โ Delegated agent execution (
delegate_task) with sync/async modes. - โณ Background Tasks โ Run long commands (builds, tests) in background and check results later.
- ๐ mgrep โ Multi-pattern parallel search for fast codebase analysis.
Installation
npm install -g opencode-orchestratorRestart OpenCode after installation.
Usage
๐ Method 1: Select Commander via Tab Key (Recommended)
In OpenCode, press Tab to open the Agent selection menu. Select Commander and type your mission!
Press Tab to select Commander
"Fix the login bug in the docker-compose environment"The Commander will:
- Survey: Scan the Docker environment and codebase.
- Plan: Break the fix into steps.
- Execute: Call Builder to fix while matching patterns.
- Verify: Run builds/tests to prove the fix works.
- Complete: Report results with concrete evidence.
๐ Method 2: Use /task Command
/task "Implement user authentication with JWT"๐ก Tip: Using the
/taskcommand makes Commander mode run 2x longer. Use/taskfor complex tasks that need extended processing!
โก Example: Parallel Execution
Trigger parallel agent execution with prompts like:
"Build and test in parallel"
"Implement feature X while reviewing module Y"
"Run linting, tests, and build at the same time"Commander will automatically use delegate_task with background: true for independent tasks.
Monitor parallel tasks in terminal:
[parallel] ๐ SPAWNED task_a1b2 โ builder: Implement feature X
[parallel] ๐ SPAWNED task_c3d4 โ inspector: Review module Y
[parallel] โ
COMPLETED task_c3d4 โ inspector: Review module Y (45s)
[parallel] ๐๏ธ CLEANED task_c3d4 (session deleted)Agents (5-Agent Architecture)
| Agent | Emoji | Role | Responsibility |
|---|---|---|---|
| Commander | ๐ฏ | Orchestrator | Autonomous mission control & delegation |
| Architect | ๐๏ธ | Planner | Task decomposition & strategy correction |
| Builder | ๐จ | Developer | Full-stack implementation (Logic + UI) |
| Inspector | ๐ | Quality | 5-point audit & automatic bug fixing |
| Recorder | ๐พ | Context | Persistent environment & progress tracking |
The Workflow (Progressive Phases)
- Phase 0: Triage (Smart)
- Fast Track ๐ข: Simple fixes โ Execute instantly (Skip heavy scans).
- Deep Track ๐ด: Complex features โ Full Environment Scan & Plan.
- Phase 1: Environment Scan
- Mandatory for Deep Track: Infra/Domain/Stack analysis.
- Phase 2: Parallel Planning
- Architect creates a DAG of atomic tasks (Scalable Planning).
- Phase 3: Execution & Audit
- Builder writes code โ Inspector verifies with evidence.
- Phase 4: Completion
- Mission Complete reported with proof of build/test success.
Development
Quick Start (Local Development)
# Step 1: Build and link (run this ONCE)
npm run dev:link
# Step 2: Restart OpenCode
# Step 3: Make code changes...
# Step 4: Rebuild and re-link (after code changes)
npm run dev:link
# (Optional) Check link status
npm run dev:statusDevelopment Scripts
# Build the plugin
npm run build
# Link for local testing (auto-rebuilds)
npm run dev:link
# Unlink from global
npm run dev:unlink
# Check if plugin is linked globally
npm run dev:status
# Test install/uninstall scripts locally
npm run dev:testDevelopment Workflow
| Step | Command | Description |
|---|---|---|
| 1๏ธโฃ Initial setup | npm run dev:link |
Build + link for the first time |
| 2๏ธโฃ Test | Open OpenCode | Test your changes |
| 3๏ธโฃ Make changes | Edit code | Modify TypeScript files |
| 4๏ธโฃ Rebuild | npm run dev:link |
Rebuild + re-link |
| 5๏ธโฃ Repeat | 2-4 | Iterate on changes |
| โ Cleanup | npm run dev:unlink |
Unlink when done |
Common Scenarios
# ๐ Changed code and want to test
npm run dev:link
# ๐ Check if linked properly
npm run dev:status
# ๐งน Cleanup before committing
npm run dev:unlink
# ๐งช Test install/uninstall scripts
npm run dev:testRelease Scripts
# Release patch version (0.4.7 โ 0.4.8)
npm run release:patch
# Release minor version (0.4.7 โ 0.5.0)
npm run release:minor
# Release major version (0.4.7 โ 1.0.0)
npm run release:majorEach release script:
- Builds the plugin
- Bumps version in package.json
- Creates git tag
- Pushes to remote
- Publishes to npm
Uninstall
npm uninstall -g opencode-orchestratorDocs
- Architecture & Design โ Detailed system design and agent protocols
- Plugin Troubleshooting โ Setup and common issues
- Changelog โ Version history and updates
- Changelogs โ Detailed implementation notes per release
License
MIT License. LICENSE
Reliability over slop. Environment over assumptions.