xdou is a terminal-native multi-agent development system.
Its north star: selected coding and architecture agents co-develop like a coordinated council of genius collaborators. The operator gives the mission; xdou coordinates council proposals, architectural synthesis, implementation, independent review, validation, fix iterations, and durable run artifacts.
xdou coordinates Claude Code, Codex, OpenCode, OpenRouter, and future agents through an artifact-based context bus. Agents do not share raw chat by default. The orchestrator compiles role-specific context packets, stores every run under .xdou/runs/<run-id>/, captures diffs/validation/reviews, and keeps the operator in control.
A full run follows this loop:
- Council — brainstormer and critic agents independently propose approaches and risks.
- Synthesis — the architect agent turns council input into one canonical plan.
- Implementation — the implementer agent executes against the synthesized plan.
- Validation — detected project test/build/typecheck commands run automatically.
- Review — one or more reviewer agents inspect the diff and validation result.
- Fix loop — if implementation, validation, or review blocks, the fixer agent patches and validation/review rerun up to
--max-fix-attempts. - Summary — final run state is written to
.xdou/runs/<run-id>/final-summary.md.
npm install
npm run build
node dist/cli.js helpDuring development you can run from source:
npm run dev -- helpxdou init
xdou agents detect
xdou brainstorm "Design the implementation"
xdou plan "Add GitHub OAuth login"
xdou run "Add GitHub OAuth login" --max-fix-attempts 2
xdou cockpit
xdou cockpit --snapshot
xdou status
xdou status --json
xdou runs list
xdou runs list --json
xdou context
xdou apply <run-id>
xdou config validateGlobal flags:
--cwd <path> Run against another repository
--json Emit machine-readable JSON where supported
--agents a,b,c Override team agents for brainstorm/plan/run
--max-fix-attempts <n> Maximum fixer iterations for xdou runxdou cockpit opens a visual terminal mission-control cockpit over the existing artifact store. It does not replace .xdou; it reads run manifests, timeline events, review verdicts, artifact previews, and safe apply/diff/review commands from .xdou/runs/<run-id>.
The interactive cockpit now uses Pi TUI (@earendil-works/pi-tui) for a pane-based visual layout:
- left: agent roster/status
- center: live council/timeline transcript
- right: current artifact preview (
plan.md,diff.patch,review.md,final-summary.md) - bottom: action bar
xdou cockpit
xdou cockpit <run-id>Keyboard:
tab switch pane focus
v show diff path
p show plan path
r show review path
a show apply command
q quit
For deterministic logs, CI, or terminals without TTY support:
xdou cockpit --snapshotThe long-term goal is a full visual multi-agent cockpit: agents speaking, planning, coding, reviewing, and acting through structured events. The next milestone is a canonical .xdou/runs/<id>/events.ndjson stream that powers both live TUI rendering and machine-readable automation.
xdou runrefuses to launch mutating coding agents unless the operator checkout is a clean git worktree.- Mutating implementation, validation, review, and fixer phases run in an isolated git worktree by default.
- The operator checkout remains untouched; generated changes live in
.xdou/worktrees/<run-id>/. - The canonical patch is captured at
.xdou/runs/<run-id>/diff.patch. xdou initadds.xdou/runs/and.xdou/worktrees/to.gitignoreso xdou artifacts do not dirty the project.- High-autonomy modes such as Codex
fullAutoare opt-in through config.
Inspect the run first:
xdou status
xdou context
xdou runs listThen inspect artifacts:
cat .xdou/runs/<run-id>/final-summary.md
cat .xdou/runs/<run-id>/diff.patchApply the captured patch through xdou after review:
xdou apply <run-id>For manual inspection, the canonical patch remains available:
cat .xdou/runs/<run-id>/diff.patchOr inspect the isolated worktree directly:
cd .xdou/worktrees/<run-id>
git diff HEAD -- .Failed/blocked runs preserve their worktree for debugging.
Each run creates inspectable artifacts under .xdou/runs/<run-id>/, including:
mission.mdproject.mdcouncil.mdplan.mdsynthesis.mddiff.patchvalidation.jsongenerated-acceptance.jsonmission-check.jsonreview.mdreview-verdicts.jsonfinal-summary.mdtimeline.ndjsonfixes/attempt-<n>/...when fixer iterations run- per-agent inbox/result files under
agents/<agent-id>/
- Node.js >= 20.19
- Git repository for project runs
- Optional external agents installed/authenticated:
claudecodexopencode
Edit xdou.yaml:
artifactDir: .xdou
agents:
qwen:
type: openrouter
model: qwen/qwen3-coder
roles: [critic, reviewer]
safe-codex:
type: codex
command: codex
fullAuto: false
teams:
default:
brainstormers: [claude, codex, qwen]
architect: claude
critic: qwen
implementer: safe-codex
reviewer: [claude, qwen]
fixer: safe-codexValidate config:
xdou config validate- Use existing OSS agent CLIs/APIs instead of reinventing coding agents.
- Claude Code: architecture/review/debugging.
- Codex: implementation/fixes/refactors.
- OpenCode: optional provider-agnostic worker.
- OpenRouter: optional reasoning/review council member via
OPENROUTER_API_KEY. - Context sharing is artifact-based: mission, council, synthesis, plan, diff, validation, reviews, summary.
- External agent commands are invoked with argv arrays, not shell prompt interpolation.
- Validation commands may use shell syntax and are run only after code generation in the isolated worktree.
External coding agents can execute commands and modify files in the isolated worktree. Use trusted repositories, review generated patches before applying, and keep high-autonomy modes opt-in. API keys such as OPENROUTER_API_KEY are read from the environment by the relevant adapter.