Turn Claude Code
into an AI team

MAO decomposes complex tasks into a DAG of parallel subtasks, routes each to the cheapest capable model (Opus / Sonnet / Haiku), executes in isolated git worktrees, and self-corrects through 5 layers of verification.

01 Decompose opus
02 Schedule & Setup sonnet
03 Execute haiku / sonnet
04 Verify haiku
05 Review sonnet
06 Reflect opus
07 Integrate sonnet
60–70%

cost reduction vs all-Opus, with quality maintained through 5 layers of self-correction

How It Works

DAG-Based Scheduling

Tasks are mapped as a directed acyclic graph. Independent tasks run in parallel across git worktrees. Dependencies are enforced automatically.

Model Tiering

Each task is scored for complexity and routed to the cheapest capable model. Haiku handles CRUD, Sonnet builds features, Opus tackles security and architecture.

Git Worktree Isolation

Each parallel task runs in its own git worktree with a dedicated branch. No conflicts during execution. Merge happens in dependency order after verification.

5-Layer Self-Correction

Self-review, automated verification, peer review, model escalation (haiku→sonnet→opus), and parallel exploration as last resort.

Complexity Scoring

files_touched × 1 + new_logic × 3 + security_risk × 5 + concurrency × 5. Score 0–3 → Haiku. 4–7 → Sonnet. 8+ → Opus.

3 Slash Commands

/mao for full orchestration, /mao-plan to preview the DAG, /mao-status to check progress.

Agent Roster

Architect

Decomposes problems into atomic tasks, designs the task DAG, scores complexity.

opus

Orchestrator

Schedules tasks, manages worktrees, coordinates the full 7-phase workflow.

sonnet

Implementer

Builds features, business logic, and complex integrations with self-review.

sonnet

Worker

Handles CRUD, boilerplate, migrations, config, and docs at 1/15th the cost.

haiku

Verifier

Runs type-check, tests, lint, and format pipelines. Never modifies code.

haiku

Reviewer

Cross-agent code review for security, performance, design, and completeness.

sonnet

Reflector

Meta-analysis after complex runs. Learns routing patterns for future optimization.

opus

Explorer

Parallel solution search when tasks fail. 3 strategies: conservative, alternative, minimal.

sonnet

Install

Terminal
# npm (recommended)
npx mao-orchestrator init

# or install globally
npx mao-orchestrator init --global

# curl (no Node required)
curl -fsSL https://raw.githubusercontent.com/aiconnai/mao-marketplace/main/install.sh | bash

# manual
git clone https://github.com/aiconnai/mao-marketplace.git
cp -r mao-marketplace/plugins/multi-agent-orchestrator/commands/*.md ~/.claude/commands/
cp -r mao-marketplace/plugins/multi-agent-orchestrator/agents/*.md ~/.claude/agents/

Quick Start

Claude Code
# Preview what MAO would do
/mao-plan Implement JWT auth with refresh tokens and rate limiting

# Full orchestration (plans, confirms, executes)
/mao Implement JWT auth with refresh tokens and rate limiting

# Check progress mid-run
/mao-status