JSPM

opencode-orchestrator

0.4.13
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1820
  • Score
    100M100P100Q105975F
  • License MIT

Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).

Package Exports

  • opencode-orchestrator

Readme

Logo

OpenCode Orchestrator ๐ŸŽฏ

Autonomous Multi-Agent Plugin for OpenCode

MIT License npm


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-orchestrator

Restart OpenCode after installation.


Usage

In OpenCode, press Tab to open the Agent selection menu. Select Commander and type your mission!

Commander Screenshot

Press Tab to select Commander

"Fix the login bug in the docker-compose environment"

The Commander will:

  1. Survey: Scan the Docker environment and codebase.
  2. Plan: Break the fix into steps.
  3. Execute: Call Builder to fix while matching patterns.
  4. Verify: Run builds/tests to prove the fix works.
  5. Complete: Report results with concrete evidence.

๐Ÿ“‹ Method 2: Use /task Command

/task "Implement user authentication with JWT"

๐Ÿ’ก Tip: Using the /task command makes Commander mode run 2x longer. Use /task for 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)

  1. Phase 0: Triage (Smart)
    • Fast Track ๐ŸŸข: Simple fixes โ†’ Execute instantly (Skip heavy scans).
    • Deep Track ๐Ÿ”ด: Complex features โ†’ Full Environment Scan & Plan.
  2. Phase 1: Environment Scan
    • Mandatory for Deep Track: Infra/Domain/Stack analysis.
  3. Phase 2: Parallel Planning
    • Architect creates a DAG of atomic tasks (Scalable Planning).
  4. Phase 3: Execution & Audit
    • Builder writes code โ†” Inspector verifies with evidence.
  5. 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:status

Development 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:test

Development 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:test

Release 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:major

Each release script:

  1. Builds the plugin
  2. Bumps version in package.json
  3. Creates git tag
  4. Pushes to remote
  5. Publishes to npm

Uninstall

npm uninstall -g opencode-orchestrator

Docs


License

MIT License. LICENSE


Reliability over slop. Environment over assumptions.