JSPM

opencode-orchestrator

1.0.24
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1820
  • Score
    100M100P100Q103514F
  • 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 Orchestration Engine for Software Engineering

MIT License npm


Overview

OpenCode Orchestrator is a framework designed to manage complex software engineering tasks through parallel multi-agent execution. It extends the capabilities of standard AI agents by introducing a hierarchical delegation model and a multi-stage verification pipeline.

Key Characteristics

  • Parallel Execution: Manages multiple concurrent agent sessions to accelerate development.
  • Hierarchical Delegation: Supports recursive task decomposition (Fractal Spawning) for complex requirements.
  • Integrated Verification: Employs a multi-stage pipeline (Unit & Integration) to ensure code quality.
  • Persistent State: Uses structured logging to maintain state and recover from interruptions.

⚑ Quick Start

npm install -g opencode-orchestrator

In an OpenCode environment:

/task "Implement a real-time collaborative editor using WebSocket"

πŸ—οΈ Architecture

The system is built upon two core mechanisms that handle scaling and quality control.

HPFA (Hyper-Parallel Fractal Architecture)

HPFA is a parallel execution model that enables task decomposition at scale.

  • Managed Concurrency: Orchestrates up to 50 parallel agent sessions simultaneously.
  • Recursive Scaling: Allows "Worker" agents to spawn sub-workers for modular tasks, ensuring deep architectural coverage.

MSVP (Multi-Stage Verification Pipeline)

MSVP is a structured verification process that decouples implementation from quality assurance.

  • Stage 1 (Unit Verification): Reviewers validate individual module changes and run local tests immediately after implementation.
  • Stage 2 (Integration Review): A master reviewer verifies cross-module consistency and system integrity after all individual units are completed.

πŸ“Š Workflow Diagram

              [User Task Input]
                     β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚     COMMANDER     β”‚ (Orchestration context)
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Phase 0: Parallel Discovery    β”‚ (Structure, Tech Stack, Docs, Infra)
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚      PLANNER      β”‚ (Create Hierarchical Plan)
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Phase 1: Parallel Execution    β”‚ (HPFA Implementation Grid)
    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
           β”‚         β”‚         β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
    β”‚ WORKER  β”‚ β”‚ WORKER β”‚ β”‚ WORKER β”‚ (Fractal Spawning)
    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
           β”‚         β”‚         β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
    β”‚ REVIEWERβ”‚ β”‚ REVIEWERβ”‚ β”‚ REVIEWERβ”‚ (Stage 1: Unit Verification)
    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
           β”‚         β”‚         β”‚
    ───────▼─────────▼─────────▼───────
    β”‚          Sync Barrier           β”‚ (Wait for all units)
    ─────────────────┬─────────────────
                     β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚  MASTER REVIEWER  β”‚ (Stage 2: System Integration)
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚  Mission Sealed?  β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                No ↙   β†˜ Yes
             [Loop]   [Complete]

πŸš€ System Roles

Role Responsibility Key Actions
Commander Mission Control Task assignment, conflict resolution, global synchronization
Planner Architecture Environment analysis, dependency mapping, TODO generation
Worker Implementation Code writing, file modification, unit test creation
Reviewer Quality Control Static analysis, build verification, integration testing

πŸ› οΈ Features

  • Concurrent Task Management: Efficiently handles up to 50 background agent sessions.
  • Automated Context Synthesis: Parallel scouters gather environment intelligence (Structure, Stack, Docs) instantly.
  • Synchronized Verification: Ensures all distributed tasks pass Stage 1 review before final integration.
  • Fault Tolerance: Automatically resumes progress from checkpoints in case of tool or session failure.
  • Context Optimization: Monitors context window limits and performs automated compaction for long sessions.

Piano Developer's Note

OpenCode Orchestrator was developed to solve the "sequential bottleneck" in AI-assisted coding. By treating agents as distributed processing units rather than just chat interfaces, we aim to provide a more reliable and scalable autonomous engineering experience.

Full Developer's Note β†’


πŸ“„ License

MIT License. See LICENSE for details.