baro

How it works

Two processes, a mozaik event bus, bounded contexts, and an anti-corruption layer in front of every model — the architecture behind a run.

baro is two processes. A Rust TUI host owns the run lifecycle — launch, detach, the run registry, the resume guard, the write guard on prd.json — and spawns a TypeScript orchestrator over a versioned JSONL protocol. Everything you see (baro watch, the TUI, the cloud dashboard) is a reader of that stream.

baro architecture — a Rust TUI host, a TypeScript orchestrator whose bounded contexts meet on the mozaik event bus, and machine gates in front of every merge

The bus is the language

Inside the orchestrator, bounded contexts talk through the mozaik event bus. Every context connects as a mozaik Participant; every message is a frozen SemanticEvent with one typed contract per context. Nothing calls across a context directly — the board, the conductor, the scouts, the architect, the planner, and the critic are all peers on the same bus.

The whole of @mozaik-ai/core enters through one anti-corruption port (runtime/mozaik.ts), so a mozaik runtime upgrade lands as a single adapter swap rather than a tree-wide migration.

The contexts

ContextOwns
Goalthe Architect: goal contract, invariants, obligations, remediation
Planningdomain (no I/O), application, per-backend adapters — the progressive planner that admits story fragments as the run learns
Executionthe collective board: offers, leases, waves, recovery, runtime replanning
Acceptancethe Critic and its evidence capture, the altitude probe
Verificationthe gate registry, the declared-tests translator, no-shell command execution
Integrationisolated git worktrees, sealed lineage, merges, write surfaces
Marketthe story factory: offers, admission, worker routing
Contractshared normalization and the authority denylist

A collective, not a coordinator

Most agent harnesses run hub-and-spoke: one coordinator model spawns workers, each works alone, and everything flows back through the coordinator's context window. baro's story agents are peers. They observe the events that concern them, exchange peer notes, and negotiate: a story blocked on a sibling's work suspends cooperatively and resumes when the dependency merges. Coordination is a protocol on the bus, not one model's memory.

A live plan

The plan is not prose — it's a DAG the run negotiates with. The progressive planner admits fragments as understanding grows; runtime replanning adds, removes, and rewires stories mid-run; a failed gate can spawn its own remediation story; and an agent can dispute a premise the Architect got wrong. Every plan change is a typed event on the stream with its reason attached.

Models are behind a boundary

No context knows which vendor produced its tokens. Phases request capabilities from lane adapters — Claude CLI, Codex CLI, a mozaik-native OpenAI-compatible runner, opencode, pi — and the same gates, critic, and merge machinery run identically on every backend. See LLM providers for routing, and Verification & gates for what stands in front of every merge regardless of backend.

On this page