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.
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.
opusOrchestrator
Schedules tasks, manages worktrees, coordinates the full 7-phase workflow.
sonnetImplementer
Builds features, business logic, and complex integrations with self-review.
sonnetWorker
Handles CRUD, boilerplate, migrations, config, and docs at 1/15th the cost.
haikuVerifier
Runs type-check, tests, lint, and format pipelines. Never modifies code.
haikuReviewer
Cross-agent code review for security, performance, design, and completeness.
sonnetReflector
Meta-analysis after complex runs. Learns routing patterns for future optimization.
opusExplorer
Parallel solution search when tasks fail. 3 strategies: conservative, alternative, minimal.
sonnetInstall
# 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
# 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