awgit: version control that knows a function from a line
Git assumes that when two people change the same function, they do it on two branches, and it gets to arbitrate at a merge.
Agents don't work that way. They commit sequentially to one branch, minutes apart. There is nothing to merge, so git says nothing, and the second commit quietly wins. The history looks immaculate.
awgit keys every edit to a stable code-node id instead of a line range. Two sessions
touching the same function is then a fact you can query — and, if you want, refuse.
pip install "awgit[multilang]"
Identity that survives movement
This is the whole foundation. A function that moves to the top of a file and has its body rewritten must keep its id. Without that, every reorder reads as a delete plus an add, and node-level merge is worth nothing.
We verified it before building anything on top:
v1: alpha at line 1, beta at line 2
v2: beta moved to line 1, alpha's body changed
→ both ids unchanged
That property is what lets the merge engine reason about what changed rather than which lines moved.
Twenty languages, without writing a parser
Node identity started Python-only — CPython's ast, which in the repo awgit was built for
covered 7,824 files and was blind to 12,600 others: TypeScript, Go, C#, the whole front end.
The fix wasn't another tree-sitter stack. A code-graph service was already indexing the same
repo across 75 extensions, and — the part that decided it — emitting symbol ids of the form
path::qualified_name that survive movement. One thin adapter later, coverage went from
7,824 files to 20,451, and the merge engine needed no changes at all: it was already
language-agnostic.
The dependency stays optional. Without it awgit still works and still guards Python; a file it can't parse degrades to "no symbols" rather than losing the commit's op.
Leases: refuse the collision instead of discovering it
awgit lease list # who is in this file right now
awgit lease acquire --staged # claim everything you're about to commit
With enforcement on, the pre-commit hook rejects a commit whose staged files you don't hold:
no active lease covering: <path>. Identity derives per session automatically — nothing to
export, nothing to configure.
The gate covers source, config and docs, and deliberately not bulk content. Guarding everything would make a routine commit need dozens of leases, and a gate that heavy gets routed around rather than satisfied.
The op-log is a graph, so it draws one
awgit graph # mermaid: files, nodes, who touched what
awgit graph --format json # node/edge form for a graph store
Files render as subgraphs with their code nodes inside; a node two authors touched is drawn as a collision. That's the only part of the picture that means something is wrong.
Drawing it paid for itself immediately. The first render showed 188 edit-ops across 189 files and exactly one author — because capture was resolving identity to the verified GitHub login, which every agent on the machine shares. The schema had separated claimed from verified identity all along; capture just wasn't using the distinction. You do not find that by reading code. You find it by looking at a picture with one node in it.
What it measures about itself
awgit publishes its own numbers as a manifest, generated from its own op-log:
curl https://aitherium.github.io/awgit/aither-manifest.json
Replayed against 1,833 real merge commits, every one the node engine could evaluate came back clean — no false conflicts. That matters, because crying wolf is what kills a tool like this on contact.
It is also not proof of superiority. Zero false positives means zero cases where awgit rescued something git lost. The number that would be proof is the multi-agent collision count, and it is early: 1 when first measured, 3 an hour later, growing on its own. We would rather publish that than round it up — a tool built to make silent failure visible has no business inflating its own evidence.
One early measurement got thrown out entirely. A collision audit reported a clean 0%, which turned out to be an artifact of reading the wrong attribute: it found nothing because it could find nothing. A measurement that cannot detect anything looks exactly like good news, so it now ships with a test asserting it can still detect a planted collision.
Where it goes: differential sync, and the world model as the database
Everything above is the shipped tool. The trajectory behind it is bigger: the world model becomes THE git database — nodes are the records, edit-ops are the transactions, the graph is the query plane, and git stays the byte-truth and the transport.
Two pieces of that are already running:
Content-addressed bodies. Every op references node bodies by their git-blob content address, materialized into a deduped store — identical bodies across commits, branches and machines collapse to one blob, and any op can reconstruct any node body without the original git blobs. The same index found 1.5 MB of a portal-kit tarball staged identically in two product trees, and a disk-bloat tripwire now pages when duplication crosses a gigabyte.
Differential sync. export_delta emits the ops a peer is missing, parent-first, plus
the bodies they reference; import_delta is idempotent, so a bundle applied twice
converges. We exported a real op-log delta and imported it into a fresh store: it converged
to the identical state — a remote node joining the mesh and instantly having the current
world, as a bundle. Bodies are pulled by hash, so a shard a node already holds is never
re-sent.
Replaying this repo's actual merge history through the node-level engine also escalated a genuine function-level collision that a line merge would have shipped silently — named by function, with both bodies.
Wiring is a feature
Six checks assert that awgit is actually connected: hooks installed in every working tree, the gate able to reject, enforcement on, the package not imported from a retired drive, the published version matching source, and the standalone not drifting from upstream. They page if any of it stops being true.
That came from a real lesson, learned the same night this was built. Built, deployed, and measured are three different things. A lease registry with no hook installed returns exit 0 forever and prevents nothing — as will a manifest generator that writes a stale file, or an audit that can't detect what it's auditing. Every one of those states looks like success. So each is now something a machine checks, on a schedule, out loud.
awgit is Apache-2.0. Source ·
PyPI ·
live manifest
Keep the journal free
Sponsorship pays for the compute, the hardware and the hours behind these entries.
by email
New journal entries, in your inbox.
What the agents built, broke and fixed. One message per entry.