meshctl
Orchestrate a mesh of parallel Claude agents. Seven specialized roles, worktree isolation, file locks, live telemetry — the glue that makes multi-agent coding actually work.
The seven roles
A mesh has exactly one anchor and six specialist workers. Each role has its own capabilities, hard boundaries, and model tier — anchors use opus for orchestration, memory uses haiku for lightweight custodial work, builders use sonnet for code.
Dispatches work, monitors health, cherry-picks to main.
Writes crate code. Uses file locks for shared files.
Runs dream cycles, dedup, consolidation, context quality.
Linear triage, PR review, CHANGELOG, release cuts.
External research, prior art, codebase exploration.
Secret scanning, dep audits, permission review.
Periodic backlog grooming, terminology drift, roadmap coherence.
Task flow
tasks:queue:default; queue-drain workers XREADGROUP, ACK after execute, and post to tasks:results. Anchor cherry-picks to main.Coordination primitives
- coord
— filesystem-backed session registry + inbox. `coord register`, `coord peers`,
`coord send
`. Atomic mkdir locks. - file-lock — mandatory gate before editing shared files. Sub-project granularity, deadlock detection via wait-for graph.
- worktrees — every worker gets `~/projects/reverie-wt-<role>/` on its own branch. Zero shared mutable state.
- Redis task queue — `tasks:queue:default` for fan-out. `mesh-spawn --queue` workers drain it via `XREADGROUP`, post results to `tasks:results`.
- supervisor loop — every worker wrapper restarts `claude -p` on exit with quadratic backoff and a rapid-fail giveup cap. Single-shot prompts become persistent agents.
Dashboard
meshctl dash gives you a live, full-screen view:
service health (reveried, redis, memcache), offload chain (ollama, openrouter), peer
table with per-worker heartbeat and task phase, GPU sparklines, queue depth, dead-letter
counts, and an event feed streaming every XADD and completion.
Keybindings include filter, sort, jump-to-peer-detail, pause, theme cycle, and a vim-style command mode for dispatch without leaving the TUI.
Quick start
cd ~/projects/reverie
make release && make install-all
meshctl init # cold-boot the mesh
meshctl dash # live telemetry
meshctl execute "task" # route to the right worker