Architecture
A vendor-neutral orchestrator composes terminals, state, routing, tasks, approvals, and safe Git workspaces.
Component map
Human lead
dashboard + CLIorchestrator corelifecycle · routing · supervision · approvals
adapter contractClaude CodeCodexOpenCodeCopilotAntigravity
tmux terminalsSQLite stateJSONL historyGit worktrees
◇
Dependency rule
internal/domain is the shared vocabulary. Only the orchestrator composes state, tmux, adapters, messaging, and tasks. Vendor-specific behavior stays inside internal/adapter/*.
Two sources of truth, deliberately
.clishake/state.db
SQLite in WAL mode materializes agents, tasks, messages, approvals, and session state for fast concurrent queries.
.clishake/events.jsonl
An append-only audit record captures every mutation with an actor, subject, timestamp, payload, and correlation ID.
Message flow
routing model
lead types "@builder work 3"
└─ orchestrator.Send(...)
├─ parse + resolve selector
├─ persist message
├─ deliver through adapter
└─ append sent / delivered / failed eventsFile-mode adapters receive JSONL envelopes. Interactive TUI adapters receive literal input through tmux after readiness is verified.
Supervision loop
- Consume outputResume from a persisted per-agent byte offset.
- Check the processInspect pane, dead status, PID, and adapter health.
- Classify exitsSeparate intentional stops, clean completion, and crashes.
- Apply restart policyUse exponential backoff and crash-loop protection.