Peer-based agent swarm for end-to-end software delivery. Agents communicate via work packets through a shared board, no hierarchy, just structured collaboration.
The Architect is not a single agent, it's a master orchestrator that coordinates 13 domain-specific sub-agents across a 4-phase DAG. Each sub-agent produces structured output (MD or JSON), receives shared architecture context, and has its own knowledge base.
Execution flow: IntentGate classifies which domains are needed → DAG runs sub-agents in phase order → Contradiction Detection checks consistency → Ralph Loop ensures completeness.
The Dev agent orchestrates 12 specialized sub-agents that cover the full implementation stack, from design interpretation through backend, frontend, mobile, testing, and documentation. Each sub-agent produces structured output and declares its exports for downstream consumers.
Execution flow: IntentGate selects needed domains → feature-context.json initialized → DAG runs sub-agents in 4 phases → Contradiction Detection checks integration → Ralph Loop validates lint + tests.
The QA agent orchestrates 12 specialized sub-agents that cover the full quality spectrum, unit tests, integration tests, API validation, contract tests, schema validation, architecture review, load/stress/spike testing, security scanning, E2E user journeys, visual verification, and coverage analysis. Consumes both architecture-context.json and feature-context.json from upstream agents.
Execution flow: IntentGate selects test domains → qa-context.json initialized → DAG runs sub-agents in 4 phases → Contradiction Detection checks cross-agent consistency → Ralph Loop validates quality gate.
The Deploy agent orchestrates 11 specialized sub-agents that take built artifacts through packaging, infrastructure provisioning, deployment orchestration, and post-deploy validation. Consumes architecture-context.json and feature-context.json from upstream agents.
Execution flow: IntentGate selects deployment domains → deploy-context.json initialized → DAG runs sub-agents in 4 phases → Contradiction Detection checks cross-agent consistency → Ralph Loop validates deployment readiness.
Orchestrates comprehensive pull request review across code quality, security, API contracts, database changes, test coverage, documentation, style enforcement, architecture compliance, integration impact, and performance. Produces a unified review verdict (APPROVE / REQUEST_CHANGES / COMMENT).
Execution flow: Foundation strategist analyzes the diff → 6 core domain reviewers run in parallel → 3 cross-cutting reviewers synthesize → reporter aggregates into final verdict.
Champ's orchestration is backed by 3 pre-planning sub-agents that run before work packets are dispatched. They validate requirements, design success metrics, and gate the work plan, preventing downstream failures caused by ambiguous or incomplete specifications.
Execution flow: analyst audits requirements → product-analyst designs KPI/measurement plan → critic gates the full work plan with OKAY/REJECT verdict before dispatch.
| Component | Purpose |
|---|---|
agent.yaml | Manifest, name, model, complexity, capabilities, dependencies |
prompt.md | System prompt / persona (updated by feedback loop) |
knowledge/ | Domain knowledge files (.md) injected into prompts |
sub-agents/ | Optional, nested agents for mini-swarm patterns (e.g. Architect) |
| Store | Format | Updated By |
|---|---|---|
| packets.json | JSON, work packets with status | All agents |
| results/ | JSON, per-packet results | Completing agent |
| memory/ | JSON, key-value persistent store | Any agent |
| event_log.jsonl | Append-only JSONL | Harness (auto) |
| Module | Purpose |
|---|---|
protocol.ts | WorkPacket & WorkResult types, FSM transitions, packet creation |
board.ts | Read/write shared board (packets, results, events, memory) |
registry.ts | Agent discovery, Zod-validated manifest parsing |
runner.ts | Execute agents via Claude Code CLI with fix loop & worktree isolation |
sub-registry.ts | Sub-agent discovery for mini-swarms |
sub-runner.ts | Sub-agent execution with architecture context injection |
prompt-utils.ts | Prompt assembly, anti-scope injection, workresult parsing |
prompt-enricher.ts | Enrich prompts with verification feedback, memory, board context, sibling status |
model-resolver.ts | Complexity → model mapping (simple→haiku, medium→sonnet, complex→opus) |
tmux-runner.ts | Async tmux pane execution, DAG-based parallel sub-agent orchestration |
planner.ts | Plan creation, approval/rejection, codebase mapping |
pipeline.ts | Multi-stage pipeline execution & resume |
verifier.ts | Run verification checks on agent outputs |
role-router.ts | Score-based task routing to best-fit agent |
task-classifier.ts | Classify task size (trivial/explore/small/medium/large) |
skill-loader.ts | Load & resolve {{skill:name}} template refs in prompts |
cost-tracker.ts | Parse token usage, calculate cost per invocation |
session-metrics.ts | Compute session-level metrics & summaries |
worktree.ts | Git worktree create/remove for agent isolation |
mcp-registry.ts | Load MCP server registry, validate availability |
concurrency.ts | Slot-based concurrency cap (default 4 parallel agents) |
contracts.ts | Derive contracts, validate inputs/outputs per agent manifest |
stall-detector.ts | Detect stalled agents, nudge or block |
escalation.ts | Create & execute escalation plans for blocked agents |
turn-tracker.ts | Append & summarize conversation turns per packet |
team-state.ts | Per-agent state writes, team-wide state aggregation |
progress-ledger.ts | Append-only progress ledger with trim support |
stage-roster.ts | Load pipeline stage rosters & config |
notify.ts | Notification dispatch for agent events |
| Complexity | Primary Model | Fallback |
|---|---|---|
| Complex | Opus | Sonnet |
| Medium | Sonnet | Opus, Haiku |
| Simple | Haiku | Sonnet |
All agents are independent peers. They invoke each other via work packets, structured envelopes with instruction, context, and success criteria.
All state lives in shared/ as JSON/JSONL. No agent holds exclusive knowledge. Any agent can react to state changes via the board.
Complex agents (like Architect) can contain private sub-agents. Sub-agents are invisible to the top-level registry but follow the same patterns.
Agents declare complexity (simple/medium/complex). The model resolver maps this to the right Claude model with fallback chains.
Sub-agents run in dependency order. Within a phase, agents are independent and can run in parallel. Context accumulates across phases.
Humans set direction, review, and approve. The swarm does the work. Two orchestration modes: manual CLI or autopilot via Champ.