JSPM

opencode-orchestrator

0.9.74
  • 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

MIT License npm Tests

πŸš€ Multi-Agent Orchestration Plugin for OpenCode

⚑ Quick Start

npm install -g opencode-orchestrator

Then in OpenCode:

/task "Implement a Diablo2 Online Game for Web"

⭐ Core Philosophy

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸ” EXPLORE β†’ πŸ“ LEARN β†’ πŸ”„ ADAPT β†’ ⚑ ACT         β”‚
β”‚  Scan        Document    Adjust      Execute      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The Agents

Agent Role What It Does
🎯 Commander Orchestrator Leads the task, delegates work to other agents, ensures completion
πŸ“‹ Planner Researcher Analyzes the project, creates the plan, documents findings
πŸ”¨ Worker Implementer Writes code, modifies files, follows the project's patterns
βœ… Reviewer Verifier Tests changes, checks for errors, confirms quality

πŸ“– Core Principles

Principle What It Means
πŸ” Never Assume Always check the actual code and config files first
πŸ“ Document Everything Record patterns and findings for future tasks
πŸ“š Verify with Evidence Run tests, cite sources, complete with proof
πŸ”„ Adapt to the Project Match the project's existing style and patterns
🀝 Specialized Roles Each agent has a clear, focused responsibility

πŸ›οΈ Workflow Architecture

        /task "Build REST API"
                β”‚
    ╔═══════════════════════════════════╗
    β•‘  🎯 COMMANDER β€” "Start the task"  β•‘
    β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                    β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β–Ό               β–Ό               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”
β”‚PLANNERβ”‚      β”‚WORKER β”‚      β”‚WORKER β”‚   ← πŸ”₯ 50 PARALLEL
β”‚plan.mdβ”‚      β”‚auth.tsβ”‚      β”‚api.ts β”‚      TASKS CONCURRENTLY
β””β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚               β”‚               β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β–Ό
    ╔═══════════════════════════════════╗
    β•‘  βœ… REVIEWER β€” "Verify everything"β•‘
    β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•€β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                    β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚ TODO 100%?      β”‚
           β”‚ Issues = 0?     β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             No ↙       β†˜ Yes
          ♻️ LOOP      βœ… COMPLETE

Features

Feature What It Does
πŸš€ 60-80% Optimization Smart polling & output caching for massive speed gains
⚑ 50 Parallel Tasks Run up to 50 agents simultaneously
πŸ”„ Non-Stop Recovery WAL-based persistence (resumes tasks after crashes)
πŸ”₯ Multi-File Ops Work on different files at the same time
πŸ›‘οΈ Self-Scaling Dynamic concurrency limits based on success/failure
🩹 Memory Integrity Strict resource cleanup prevents leaks in long sessions
🧬 Adaptive AI Agents learn and adapt based on the project

πŸ”οΈ Extreme Resilience & Performance

Built for "Infinite Missions," the OpenCode Orchestrator is engineered to handle massive codebases and long-running tasks where absolute stability is non-negotiable.

  • πŸ”„ Continuous Operation: Long-running missions survive process restarts. If the orchestrator or local machine crashes, work resumes exactly where it left off via WAL (Write-Ahead Log) persistence.
  • ⚑ Maximized Resource Efficiency: Integrated output caching and smart polling reduce API overhead by 60-80%, allowing for more concurrent agents with less latency.
  • πŸ›‘οΈ Quality-Based Stability: Success/Failure tracking automatically scales currency limits. The system adapts to model reliability and rate limits in real-time, ensuring a stable mission even under chaos.
  • πŸ’Ž Memory Integrity: Rigorous resource management guarantees zero memory leaks, even during sessions that last for days.

Error Handling

Error What Happens
πŸ’₯ Tool crash Inject recovery prompt and retry
🚦 Rate limit hit Wait and retry with exponential backoff
πŸ“¦ Context overflow Compact the context automatically
⏱️ Session timeout Resume from the last checkpoint
πŸ”¨ Build failure Fix the issue and retry

πŸ“š Documentation

🎹 Developer's Words

Read the full note β†’

πŸ“„ License

MIT License. LICENSE