Skip to content

Multi-agent orchestration plugin for OpenCode. Coordinate specialized AI agents working together like a development team.

License

Notifications You must be signed in to change notification settings

sehyun0518/crew-opencode

Repository files navigation

crew-opencode

"Low-cost tasks to affordable agents; high-level reasoning to top-tier models."

npm version License: MIT TypeScript

crew-opencode Hero

Multi-agent orchestration plugin for OpenCode. Coordinate specialized AI agents working together like a professional development team.

English | ν•œκ΅­μ–΄

πŸ“‘ Table of Contents

πŸš€ Introduction

crew-opencode is a multi-agent orchestration system that coordinates specialized AI agents to work together on software development tasks. Instead of using a single expensive model for everything, crew-opencode strategically assigns tasks to the right agent with the right model, optimizing both cost and quality.

When you type the crew command, you become the Project Manager, directing a team of specialized agents that follow structured Standard Operating Procedures (SOPs) to deliver high-quality results.

πŸ’‘ Core Philosophy

  1. Cost-Effective: Simple, repetitive tasks go to lightweight models (Haiku), while complex reasoning uses top-tier models (Opus). This approach reduces costs by 60-70% compared to using premium models for everything.

  2. Specialization: Each agent is an expert in their domain (PM, Technical Analysis, Frontend, Design, QA) with tailored prompts and optimal model selection.

  3. Accountability: When agents fail, they generate Incident Reports ("Apology Letters") with root cause analysis, risk assessment, and prevention strategiesβ€”ensuring continuous improvement.

πŸ‘₯ The Crew

Five specialized agents working together:

Agent Role Model Cost Specialty
PM Project Manager Claude Opus 4.5 πŸ’°πŸ’°πŸ’° Orchestration, strategy, planning
TA Technical Analyst Claude Sonnet 4.5 πŸ’°πŸ’° Research, architecture, analysis
FE UI/UX Engineer Gemini 3 Pro πŸ’°πŸ’° Frontend implementation
Design Designer GPT 5.2 Medium πŸ’°πŸ’° UX flows, design systems
QA Quality Assurance Claude Haiku 4.5 πŸ’° Testing, verification

Cost Optimization: By using Haiku for QA (repetitive testing) and Opus only for PM (critical decisions), you get premium quality at a fraction of the cost.

✨ Features

🎯 Multi-Agent Orchestration

  • 5 specialized agents with role-specific prompts and optimal models
  • Parallel execution for tasks that can run simultaneously
  • Dependency management ensures tasks complete in the correct order

πŸ“‹ Structured Workflows (SOPs)

  • Feature Development (60-90min): Full feature implementation with research, design, coding, and testing
  • Bug Fix (40-70min): Root cause analysis and minimal, targeted fixes
  • Refactoring (100-160min): Safe refactoring with comprehensive test coverage

πŸ“ Incident Reporting ("Apology Letters")

  • Automatic generation when tasks fail
  • Root cause analysis: Why did it fail?
  • Risk assessment: What's the impact?
  • Prevention strategy: How to avoid it next time?

πŸ”§ OpenCode Integration

  • Custom tools for orchestration, status checking, and reporting
  • Hooks for pre/post tool execution and session cleanup
  • Seamless installation to OpenCode's plugin system

🎨 Beautiful CLI

  • Real-time progress tracking with event-driven updates
  • Color-coded output for easy reading
  • Dry-run mode to preview execution plans
  • Comprehensive help and error messages

πŸ“¦ Installation

Prerequisites

  • Bun >= 1.0 or Node.js >= 18.0 (for npm installation)
  • OpenCode (optional, for plugin integration)
  • API keys for LLM providers (Anthropic, OpenAI, Google)

Option 1: Install via GitHub Packages (Recommended for npm users)

# Configure npm to use GitHub Packages
echo "@sehyun0518:registry=https://npm.pkg.github.com" >> ~/.npmrc

# Install globally
npm install -g @sehyun0518/crew-opencode

Option 2: Standalone Binary (No runtime required)

Download the latest binary for your platform from GitHub Releases:

macOS (ARM64 - M1/M2/M3)

curl -L https://github.com/sehyun0518/crew-opencode/releases/download/v1.0.0/crew-opencode-macos-arm64 -o crew-opencode
chmod +x crew-opencode
sudo mv crew-opencode /usr/local/bin/

macOS (Intel)

curl -L https://github.com/sehyun0518/crew-opencode/releases/download/v1.0.0/crew-opencode-macos -o crew-opencode
chmod +x crew-opencode
sudo mv crew-opencode /usr/local/bin/

Linux (x64)

curl -L https://github.com/sehyun0518/crew-opencode/releases/download/v1.0.0/crew-opencode-linux-x64 -o crew-opencode
chmod +x crew-opencode
sudo mv crew-opencode /usr/local/bin/

Windows (x64)

# Download from: https://github.com/sehyun0518/crew-opencode/releases/download/v1.0.0/crew-opencode-windows-x64.exe
# Add to PATH or run directly

Option 3: Install via Bun

bunx @sehyun0518/crew-opencode install

Install as OpenCode Plugin

After installation, register with OpenCode:

# Install globally to ~/.opencode/
crew-opencode install --global

# Or install locally in current project
crew-opencode install --local

πŸš€ Quick Start

1. Install crew-opencode

npm install -g crew-opencode

2. Run your first task

crew-opencode crew "Add authentication to the API"

3. Check available agents and SOPs

crew-opencode list

4. View incident reports

crew-opencode reports

πŸ“– Usage

Basic Command

crew-opencode crew "your task description"

With SOP Selection

# Feature development (default)
crew-opencode crew "Add user profile page"

# Bug fixing
crew-opencode crew "Fix login timeout issue" --sop bugfix

# Refactoring
crew-opencode crew "Refactor authentication service" --sop refactor

Dry Run Mode

Preview the execution plan without running:

crew-opencode crew "Add comments feature" --dry-run

Example Workflows

Adding a New Feature:

crew-opencode crew "Add dark mode toggle to settings"

Output:

🎯 crew-opencode - Multi-Agent Orchestration

Task: Add dark mode toggle to settings
SOP: feature
Mode: Live

πŸ“‹ Execution Plan:

Workflow: feature
Steps: 5
Required Agents: PM, TA, DESIGN, FE, QA

  1. PM
     Analyze requirements and create execution plan

  2. TA + DESIGN [Parallel]
     β€’ TA: Research documentation and analyze codebase
     β€’ DESIGN: Review UI/UX flows and propose design

  3. FE
     Implement feature based on specs

  4. QA
     Write and run tests, verify quality

  5. PM
     Final review and summary

πŸš€ Starting execution...

Fixing a Bug:

crew-opencode crew "Fix navbar overflow on mobile" --sop bugfix

Refactoring Code:

crew-opencode crew "Extract API client into separate module" --sop refactor

πŸ“‹ SOPs (Standard Operating Procedures)

Feature Development (60-90 minutes)

When to use: Implementing new features

Workflow:

  1. PM: Requirements analysis and planning
  2. TA + Design (Parallel): Technical research and UX design
  3. FE: Implementation
  4. QA: Testing (β‰₯80% coverage)
  5. PM: Final review

Success Criteria:

  • All requirements met
  • 80%+ test coverage
  • No critical bugs
  • PM approval

Bug Fix (40-70 minutes)

When to use: Fixing bugs or issues

Workflow:

  1. PM: Bug analysis and prioritization
  2. TA: Root cause investigation
  3. FE: Minimal fix implementation
  4. QA: Regression testing
  5. PM: Review and closure

Principles:

  • Fix root cause, not symptoms
  • Minimal changes only
  • Always add regression test

Refactoring (100-160 minutes)

When to use: Improving code quality

Workflow:

  1. PM: Define scope and goals
  2. TA: Architecture analysis
  3. QA: Create safety net (baseline tests)
  4. FE: Incremental refactoring
  5. QA: Verify no regressions
  6. PM: Final validation

Safety First:

  • Tests before refactoring
  • Incremental changes
  • Continuous verification

βš™οΈ Configuration

Configuration file: .opencode/crew-opencode/crew-opencode.json

{
  "version": "1.0",
  "crew": {
    "pm": {
      "enabled": true,
      "model": "claude-opus-4.5",
      "maxTurns": 10,
      "temperature": 0.7
    },
    "ta": {
      "enabled": true,
      "model": "claude-sonnet-4.5",
      "maxTurns": 15,
      "temperature": 0.5
    }
    // ... other agents
  },
  "sop": {
    "default": "feature"
  },
  "incidentReport": {
    "enabled": true,
    "outputDir": "reports",
    "format": "json"
  }
}

Agent Configuration

Each agent can be configured:

  • enabled: Enable/disable the agent
  • model: Model to use
  • maxTurns: Maximum conversation turns
  • temperature: Model temperature (0-2)

πŸ› οΈ CLI Commands

Main Commands

# Execute a task with the crew
crew-opencode crew "task description" [options]

# Install plugin to OpenCode
crew-opencode install [--global|--local]

# Uninstall plugin
crew-opencode uninstall [--global|--local]

Utility Commands

# List available agents and SOPs
crew-opencode list [--agents|--sops]

# Diagnose installation
crew-opencode doctor

# View incident reports
crew-opencode reports [--limit N]

# Manage configuration
crew-opencode config [key] [value]

Options

  • -s, --sop <type>: SOP type (feature, bugfix, refactor)
  • --dry-run: Preview execution plan
  • -g, --global: Global installation
  • -l, --local: Local installation

πŸ”§ Development

Build from Source

# Clone repository
git clone https://github.com/sehyun0518/crew-opencode.git
cd crew-opencode

# Install dependencies
bun install

# Build
bun run build

# Run locally
bun run dev

Project Structure

crew-opencode/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents/         # Agent definitions (PM, TA, FE, Design, QA)
β”‚   β”œβ”€β”€ cli/            # CLI commands
β”‚   β”œβ”€β”€ config/         # Configuration system
β”‚   β”œβ”€β”€ core/           # Orchestration engine
β”‚   β”œβ”€β”€ hooks/          # OpenCode hooks
β”‚   β”œβ”€β”€ sop/            # SOP workflows
β”‚   └── tools/          # Custom tools
β”œβ”€β”€ tests/              # Test suite
└── templates/          # Templates

πŸ§ͺ Testing

# Run all tests
bun test

# Run with coverage
bun run test:coverage

# Watch mode
bun test --watch

Coverage Goals: β‰₯80% (lines, functions, statements)

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests
  5. Ensure tests pass (bun test)
  6. Commit (git commit -m 'feat: add amazing feature')
  7. Push (git push origin feature/amazing-feature)
  8. Open a Pull Request

Development Workflow

  • Follow Conventional Commits
  • Maintain β‰₯80% test coverage
  • Update documentation
  • Add yourself to contributors list

πŸ“„ License

MIT Β© 2026 crew-opencode

See LICENSE for details.

πŸ™ Acknowledgments


Made with ❀️ by the crew-opencode team

  • Root Cause: Why did it stop?
  • Risk Analysis: What impact does this error have on the project?
  • Prevention Strategy: How will we ensure this doesn't happen again?
  • This is not just a log; it is a Self-Reflection process for the agent.

πŸ“¦ Installation

OpenCode must be installed first.

# Install OpenCode first
curl -fsSL https://opencode.ai/install | bash

# Install crew-opencode plugin
bunx crew-opencode install

Quick Start

# Run with default workflow
opencode

# Or execute a specific workflow
bunx crew-opencode run feature

🀝 Contributing

We are striving to create a better agent-based coding environment. We acknowledge that our current methods may not be the best, and we eagerly await your wisdom.

  • Proposals for new Roles
  • Improvements in Prompt Engineering
  • Bug reports and fixes
  • Etc.

All PRs are welcome. Please join us in becoming a constantly growing organization!

Β© 2026 crew-opencode. All rights reserved.

About

Multi-agent orchestration plugin for OpenCode. Coordinate specialized AI agents working together like a development team.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •