concord

How it works

concord has three parts: a board that every agent reads and writes, jj workspaces that keep agents apart, and a gate that tests the combination before anything lands.

The stack

LayerChoiceWhy
Isolationjj workspaces, one per agentmerges and rebases never block; undo is always available; light
Coordinationthe concord boardthe only layer that prevented semantic bugs
Merge driverMergirafresolves same-function conflicts git cannot
Landingconcord gatethe only layer that detected every semantic bug

The board

The board is one JSON file, state.json, in a concord/ folder inside the jj repo store. Any workspace or subdirectory of a project reaches the same board through .jj/repo, and each project has its own. Every command checks and changes the board inside one exclusive flock.

A blocking command that has to wait releases the lock and retries every 2 seconds. The board records each agent's last command, and a waiting command refreshes its own agent's record at most once a minute. That record is how concord tells a slow agent from a crashed one: 30 minutes of silence stops the wait with BLOCKED by <agent>.

Your repository

Nobody types a jj command. Without .jj, concord sets up jj colocated with git, and git keeps working. Your main workspace tracks files like git does: a new file stays untracked until you git add it. Agents start from your last commit, and your main folder is never an agent's workspace, so a session editing there without concord keeps its files.

History only grows. A committed change is never rewritten, and other agents' work comes in by merge, never by rebase. Plain git push and fetch keep every machine consistent.

Rust architecture

A functional core with an imperative shell around it:

ModuleRole
corePure state machine: apply(Option<Board>, Command, now) -> Result<Step, Error>, where Step is Wait or Next(Board, Outcome). Barrier, queue order, idempotent plan, seen-set for contract notices. Every protocol rule lives here and is tested without a filesystem or processes.
storeLoads and saves the board atomically under flock; the only module touching the board file.
vcsA fork of jj 0.47.1 used as a library, in-process: revsets, commit, new, rebase, abandon, bookmarks, Mergiraf through jj's merge editor. No subprocess, no jj binary.
teamProject discovery, agent workspaces, and the check that worker commands run in their own workspace.
gateCombines finished work through vcs and runs the test command.
serve, remoteThe HTTP server (board API and git http-backend) and its client in a joined clone.
cliArgument parsing, waiting loops, exit codes. The concord and git-concord binaries both call concord::main.

Open decisions