concord

Parallel coding agents, one repo, code that still fits together.

concord gives each function to one agent at a time, tells callers when a contract changes, and lands the combined work only when your tests pass.

Three agents, one function, total(). Recorded from experiments/cart-scenario/run.sh.
A rename total → subtotal
plan claim total done finish 0
B add discount_pct
plan claim… waits LATEST, merged done finish 0
C receipt() uses total
plan writes receipt() finish 10 adapts finish 0
gate
PASS 4/4

Filled: holds total. Amber: exit 10, a contract it uses changed.

The same three edits, merged two ways

git + Mergiraf, each agent on its own branch
# cart.py after merging A, B, C
def subtotal(items, discount_pct=0):
    gross = sum(i["price"] * i["qty"] for i in items)
    return gross * (1 - discount_pct / 100)

def receipt(items):
    return f"... total {total(items)}"

$ pytest
E   NameError: name 'total' is not defined
FAILED test_cart.py::test_total_with_discount
FAILED test_cart.py::test_receipt
2 failed, 2 passed
concord, same edits, same tests
# cart.py after the gate
def subtotal(items, discount_pct=0):
    gross = sum(i["price"] * i["qty"] for i in items)
    return gross * (1 - discount_pct / 100)

def receipt(items):
    amount = subtotal(items)
    shown = int(amount) if amount == int(amount) else amount
    return f"{item_count(items)} items, total {shown}"

$ concord gate -- pytest
4 passed
LANDED on main

Five more setups, measured

What each agent saw

agent-a: rename total
$ concord claim total
CLAIMED total
# edits, runs tests
$ concord done total "subtotal(items)
  -> int; CHANGED: renamed from total"
RELEASED total; next holder: agent-b;
callers that will be told: ['agent-c']
$ concord finish
FINISHED agent-a
agent-b: add a discount
$ concord claim total
# waits for agent-a
CLAIMED total
LATEST by agent-a: subtotal(items)
  -> int; CHANGED: renamed from total
MERGED voqvyxzyvooo
# edits subtotal, not total
$ concord done total "subtotal(items,
  discount_pct=0) -> float; CHANGED:
  now always float, format before printing"
$ concord finish
FINISHED agent-b
agent-c: add receipt()
# wrote receipt() calling total()
$ concord finish
NEW CONTRACT CHANGES in functions you call:
  total#1 by agent-a: CHANGED: renamed
  total#2 by agent-b: CHANGED: now
    always float, format before printing
MERGED voqvyxzyvooo vwowpmkzxymu
$ echo $?
10
# calls subtotal, formats the float
$ concord finish
FINISHED agent-c

Your repo afterwards

$ git log --graph --format='%s'
*   agent-c: finish
|\
| * agent-c: finish
* | agent-b: total: subtotal(items, discount_pct=0) -> float; CHANGED: now always float, format before printing
* | agent-a: total: subtotal(items) -> int: sum of price * qty; CHANGED: renamed from total
|/
* base: cart.py
$ git status
On branch main
nothing to commit, working tree clean
$ git branch -a
* main
$ git worktree list
/work/repo  fadc8cf [main]