zo build is the flagship command. It reads the plan, decomposes it into phases, generates contracts for every active agent, and launches the Lead Orchestrator in a tmux session that drives the team to completion.
Synopsis
Smart mode detection
zo build auto-detects what to do based on the project’s current state:
| State | Behaviour |
|---|---|
Fresh (no STATE.md or phase = init) | Build from scratch. Phase 1 is the entry point. |
| In-progress | Continue from the recorded phase. Loads the previous phase’s snapshot for context. |
| Plan edited since last run | Detects the diff via timestamp + content hash. Re-decomposes. Surfaces the change to the human if the diff crosses a phase boundary. |
zo build figures it out.
What it does
Validate plan
Parses the plan and runs full validation. Aborts on any error before launching the agent session.
Resolve project context
Finds memory, target, and delivery repo via
_load_project_context(). Supports both .zo/-portable layout and legacy top-level memory/.Build orchestrator
Decomposes the plan into phases (mode-specific). Generates contracts: per-agent inputs, outputs, success criteria, time budget, precedent. Builds the Lead Orchestrator’s spawn prompt with full context (plan + phases + agent roster + memory + coordination instructions + per-project agent adaptations).
Launch session
Creates a tmux pane (default) or runs headless (
--no-tmux). Pastes the Lead Orchestrator’s prompt. The Lead reads the full plan, creates the team via TeamCreate, and drives execution.Monitor
The Python
LifecycleWrapper observes via ~/.claude/tasks/ and the tmux pane. Captures lifecycle events, pipes them to JSONL comms log, surfaces Haiku-summarised headlines every 60 seconds in your terminal. Auto-launches the training dashboard split-pane during Phase 4.Gate handling
At every phase boundary, checks artifact contracts and oracle thresholds. Automated gates auto-PROCEED. Blocking gates pause; you approve via
/gates:approve or reject via /gates:reject.Gate modes
--gate-mode controls human involvement:
- supervised (default)
- auto
- full-auto
Every gate pauses for human review. Maximum oversight. Best for the first run of a new project.
zo gates set <mode> -p <project>.
Cross-machine: —repo
When you’ve moved a project from one machine to another (Mac dev → GPU server), use--repo to point at the delivery repo containing the .zo/ layout:
zo build auto-detects --repo from the plan path when it’s inside .zo/plans/. So if you cd into the delivery repo and run zo continue, the inference happens for free.
Live monitoring
Whilezo build is running, you have several windows into what the team is doing:
tmux pane
Ctrl-b n switches to the agent session. Watch the Lead Orchestrator coordinate the team in real time. Ctrl-b p returns.Headlines
Every 60 seconds, your invoking terminal gets a 1-line Haiku summary of recent agent events. Lightweight live signal.
Training dashboard
Auto-launched as a split-pane during Phase 4. Rich Live panel: progress bar, metrics table, sparkline, checkpoints. See
zo watch-training.Comms log
JSONL events at
logs/comms/<date>.jsonl. Five event types: message, decision, gate, error, checkpoint. Replayable.Options
| Option | Default | Purpose |
|---|---|---|
--gate-mode | supervised | supervised / auto / full-auto |
--no-tmux | (off) | Disable interactive tmux flow. Headless mode for one-shot agents. Note: multi-phase orchestration requires the interactive session; --no-tmux is for init and draft, not full builds. |
--repo PATH | (auto) | Path to delivery repo with .zo/. Auto-inferred when the plan path is inside .zo/plans/. |
Examples
First run of a fresh project
First run of a fresh project
supervised gate mode. The Lead Orchestrator runs Phase 1; you approve at every gate.Auto-mode after first validation
Auto-mode after first validation
Resume on a new machine
Resume on a new machine
zo continue is shorthand for zo build against the project’s known plan, with .zo/ auto-detected.Overnight unattended run
Overnight unattended run
What you’ll see
When zo build stops
The session ends cleanly when:
- Phase 6 completes — all artifacts present, all tests pass, oracle confirmed. The final delivery is in the delivery repo.
- A blocking gate is hit — human input required. The session stays alive in tmux; you approve/reject via slash commands.
- The autonomous experiment loop returns DEAD_END or BUDGET_EXHAUSTED — escalates to human.
- You
/exit— graceful shutdown. Session summary written, tmux window killed.
Next
Phases & gates
What happens at each phase and gate.
Memory & continuity
How
zo build resumes across sessions.