JSPM

opencode-orchestrator

0.9.35
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2599
  • Score
    100M100P100Q105963F
  • 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

πŸš€ Multi-Agent Orchestration Plugin for OpenCode

MIT License npm Tests


⚑ Quick Start

npm install -g opencode-orchestrator

Then in OpenCode:

/task "Build a REST API with authentication"

🧠 Core Philosophy

Explore β†’ Learn β†’ Adapt β†’ Act
Like a human exploring unknown space β€” discover, document, adjust, execute.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                                      β”‚
β”‚  πŸ” EXPLORE    β†’    πŸ“ LEARN    β†’    πŸ”„ ADAPT    β†’    ⚑ ACT                          β”‚
β”‚                                                                                      β”‚
β”‚  Scan unknown       Document           Adjust             Execute with               β”‚
β”‚  territory          discoveries        behavior           confidence                 β”‚
β”‚                                                                                      β”‚
β”‚  β€’ Read context     β€’ Record patterns  β€’ Match style      β€’ Build it                 β”‚
β”‚  β€’ Detect stack     β€’ Note conventions β€’ Fit the project  β€’ Test it                  β”‚
β”‚  β€’ Find commands    β€’ Log findings     β€’ Apply learnings  β€’ Seal it                  β”‚
β”‚                                                                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ›Έ The Astronaut Principle

Agents behave like astronauts landing on unknown planets:

  • Never assume gravity β€” Always detect the environment first
  • Document everything β€” Record discoveries for future missions
  • Adapt to atmosphere β€” Adjust behavior based on learnings
  • Act with confidence β€” Execute precisely once the terrain is mapped

This is real-time adaptation. Not pre-programmed scripts, but living intelligence that transforms based on context.

🎭 Agents & Their Adaptive Behavior

Agent Mission Adaptive Behavior
🎯 Commander Orchestration Discover project reality β†’ Delegate dynamically β†’ Loop until sealed
πŸ“‹ Planner Strategy Research actual docs β†’ Plan parallel paths β†’ Document findings
πŸ”¨ Worker Implementation Observe patterns β†’ Learn conventions β†’ Implement with fit
βœ… Reviewer Verification Read real standards β†’ Run actual tests β†’ Approve with evidence

Guiding Principles

Principle Adaptive Practice
πŸ” Discover, Don't Assume Read context.md, detect stack, find actual commands
πŸ“ Learn & Document Record patterns, conventions, and findings for reuse
πŸ“š Evidence Over Memory Cite docs, run commands, complete only with proof
πŸ”„ Transform with Context Behavior evolves based on documented learnings
🀝 Separation of Concerns Each agent masters one domain excellently

πŸ›οΈ Architecture

            /task "Build REST API"
                     β”‚
     ╔═══════════════╧═══════════════╗
     β•‘  🎯 COMMANDER β€” Delegate+Loop β•‘
     β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                     β”‚
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β–Ό               β–Ό               β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”
 β”‚PLANNERβ”‚      β”‚WORKER β”‚      β”‚WORKER β”‚   ← πŸ”₯ 50 PARALLEL
 β”‚plan.mdβ”‚      β”‚auth.tsβ”‚      β”‚api.ts β”‚      SESSIONS
 β””β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚               β”‚               β”‚
     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β–Ό
     ╔═══════════════╧═══════════════╗
     β•‘      βœ… REVIEWER β€” Verify     β•‘
     β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                     β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚ TODO 100%?      β”‚
            β”‚ Issues = 0?     β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              No ↙       β†˜ Yes
            ♻️ LOOP      πŸŽ–οΈ SEALED

✨ Key Features

Feature Description
⚑ 50 Parallel Sessions True multi-threading with isolated contexts
πŸ”₯ Parallel File Builds Workers build different files simultaneously
🧩 Smart Distribution One file = one worker. No conflicts
πŸ”— Real-Time Sync Shared .opencode/ state across all agents
πŸ›‘οΈ Auto Verification E2E tests, import checks, integration validation
🩹 Self-Healing Auto-recovery with 3 retries per session
🧬 Adaptive Intelligence Agents evolve behavior based on discoveries

Self-Healing Details

Error Type Recovery Action
Tool crash Inject recovery prompt
Rate limit Exponential backoff + retry
Context overflow Smart compaction
Session timeout Resume from checkpoint
Build failure Loop back, fix, retry

πŸ“Έ Screenshots

TUI

Commander TUI

Window

Commander Window

πŸ“š Documentation


🎹 Developer's Words

Piano and Code

I believe playing the piano is also a form of orchestration.

The harmony of polyphony β€” multiple voices β€” and homophony β€” a single melodic line.

Each voice sings its most beautiful song from its own place, yet when combined, they create one grand, beautiful melody. I believe this structure is no different from AI agents.


πŸ“„ License

MIT License. LICENSE