by Ataraxy-Labs
Entity-level git merge driver. Resolves false conflicts git invents when independent agents edit the same file. ~95% reduction vs. line-based merge.
# Add to your Claude Code skills
git clone https://github.com/Ataraxy-Labs/weaveweave is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Ataraxy-Labs. Entity-level git merge driver. Resolves false conflicts git invents when independent agents edit the same file. ~95% reduction vs. line-based merge. It has 1,371 GitHub stars.
weave's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/Ataraxy-Labs/weave" and add it to your Claude Code skills directory (see the Installation section above). weave ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
weave is primarily written in Rust. It is open-source under Ataraxy-Labs on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh weave against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Entity-level semantic merge driver for Git. Resolves conflicts at the function/class level instead of the line level, so two changes to different functions in the same file never conflict.
weave setup # this repo: registers weave as the merge driver + .gitattributes
weave setup --global # every repo on this machine, no per-repo step
weave setup --local # this repo only, writes .git/info/attributes instead
weave setup auto-detects the weave-driver binary, writes
merge.weave.driver to git config, and adds *.ts merge=weave (etc.) for
every supported extension. The equivalent by hand, if you need it:
git config merge.weave.name "Entity-level semantic merge"
git config merge.weave.driver "weave-driver %O %A %B %L %P"
echo '*.py merge=weave' >> .gitattributes # repeat per extension you want covered
After setup, git merge / git rebase / git cherry-pick all route through
weave automatically. No new commands to run to get a merge — only to resolve
one that still conflicts.
Most merges finish clean with no conflict markers. When one entity is genuinely disputed by both sides, weave leaves a marker box like git's, plus one line stating why:
<<<<<<< ours — function `process` (T, confidence: high)
// refused_by: statement_fold · collision: ` return data.upper()` +1 more
def process(data):
return data.upper()
=======
def process(data):
return json.dumps(data)
>>>>>>> theirs — function `process` (T, confidence: high)
Read the refused_by: line first. It names the guard that declined to
auto-merge and quotes the exact line(s) both sides disagree about — that's
usually enough to resolve on the spot.
Still unclear? Run weave explain <file>. It reads the three merge
stages straight out of git's index and reports, per conflicted entity, the
guard, the confidence, and the hunks both sides actually touched —
narrower and more precise than diffing the whole file by eye.
Edit. Pick a side, merge by hand, or rewrite — same as any conflict.
Remove the marker lines. The weave explain hint is written on the first
box's closing marker, so it goes when the markers go. Older weave versions
appended it as a separate trailing comment; weave check flags a leftover
copy.
Run weave check. With no arguments it verifies the working tree —
the file as you just edited it — against the three merge stages: markers
left behind, lines both sides kept that went missing, anything stated more
often than either side stated it, references that no longer resolve. One
verdict line per file, always a sentence, never a bare empty result:
OK: src/api.py — markers cleared, no unanimous-line loss, no duplicated
definitions or lines, no dangling references
A file with a real problem gets FOUND: <file> — <what and where> plus a
suggested repair when one follows mechanically from the finding. Exit code
is 0 clean / 1 findings, so it composes with a script or a pre-commit hook.
weave check --base <rev> --ours <rev> --theirs <rev> runs the same checks
between two revisions instead of the working tree (useful pre-merge, or with
no git repo at all via --base-dir/--ours-dir/--theirs-dir), and emits
JSON findings instead of the verdict sentence.
claude mcp add --scope user weave -- weave-mcp
Or any MCP client, via stdio:
{ "mcpServers": { "weave": { "command": "weave-mcp" } } }
weave-mcp discovers the repo from the first tool call's file path, the
WEAVE_REPO env var, or its working directory — set WEAVE_REPO if you
launch it from outside the repo. It lists one tool per command:
weave_edit, weave_preview, weave_explain, weave_check, weave_land and weave_patch.
For callers and blast radius use sem's MCP server. The live claim/release CRDT
layer (weave_claim_entity, weave_status, ...) is listed only with
WEAVE_EXPERIMENTAL=1. Each tool's description says when to call it and what an
empty result means — read that at call time, not here.
| Command | Does |
|---|---|
weave setup / setup --off |
register / remove the git merge driver |
weave land |
land a merge: gate each conflicted file PROVEN / VERIFIED / REFUSED; --onto origin/main --check sem merges, gates, verifies and publishes |
weave explain <file> |
per-entity conflict detail for one conflicted file |
weave check |
verify the working tree (or two revisions) against the merge |
weave preview <branch> |
dry-run a merge before running it |
weave patch extract/apply |
typed entity ops — turn a diff into ops, apply them three-way to a drifted target |
weave stats |
lifetime counters; --bench / --repo <path> compare weave with git |
weave explain <file> --summary |
structured JSON summary of the markers in a file |
weave experimental status / claim / release |
CRDT-backed multi-agent coordination state (prototype) |
Run weave --help or weave <command> --help for full flags.
WEAVE_EVENT=1 makes the merge driver write one JSON line per merge to
stderr, behind a weave-event: prefix:
weave-event: {"schema":"weave-event","schema_version":"1.0.0","file":"src/app.py",
"outcome":"clean","exit_code":0,"confidence":"very_high","conflicts":0,"findings":0,
"entities":{...},"bytes_out":481,"ms_merge":4.43,"ms_total":5.72,...}
One line per merge, including the ones that fail — so "which files conflicted
in this rebase, on what, and how long did each take" is one pass over the
lines rather than four stderr channels joined by hand. Off by default; nothing
is computed for it that the driver did not already have. The fields are
described in crates/weave-mcp/schema/weave-event.schema.json.
38 languages and data formats — TypeScript, JavaScript, Python, Go, Rust,
Java, C/C++, Ruby, C#, PHP, Swift, Kotlin, SQL, Lua, Nix, JSON, YAML and more
(see README for the full list). Anything else falls back to git's standard
line-level merge, including .vue, .svelte, .erb and .hs, which weave
can parse but does not yet merge well enough to claim.
cargo build --release && cargo test --workspace # weave, weave-driver, weave-mcp
License: MIT OR Apache-2.0.
Part of the Ataraxy Labs stack, agent-native infrastructure for software development. See also: sem (semantic version control) · inspect (semantic code review) · opensessions (tmux sidebar for coding agents).
Read the manifesto: https://ataraxy-labs.com/#thesis · Essays: https://ataraxy-labs.com/blogs · LLMs: https://ataraxy-labs.com/llms.txt
weave land merges code and checks the result for structural problems. Add --onto to integrate and publish, and --verify-cmd or --check sem to validate the final tree before publishing.
weave setup # this repo now merges through weave; git merge/rebase/cherry-pick unchanged
git merge <branch> # real conflicts land as markers with a `refused_by:` line stating why
weave explain <file> # per-hunk detail for one conflicted file, read off the actual git stages
# ...edit to resolve...
weave check # verify the working tree against the three merge stages; exits 1 on findings, 2 if it could not verify
weave land --resolver <cmd> # or: land it, each conflicted file labelled PROVEN / VERIFIED / REFUSED
See Setup for --global/--local variants, CLI Commands for the rest of the
weave binary, and MCP Server for agent-framework integration.
Git merges by comparing lines. When two branches both add code to the same file, even to completely different functions, Git sees overlapping line ranges and declares a conflict:
<<<<<<< HEAD
export function validateToken(token: string): boolean {
return token.length > 0 && token.startsWith("sk-");
}
=======
export function formatDate(date: Date): string {
return date.toISOString().split('T')[0];
}
>>>>>>> feature-branch
These are completely independent changes. There's no real conflict. But someone has to manually resolve it anyway.
This happens constantly when multiple AI agents work on the same codebase. Agent A adds a function, Agent B adds a different function to the same file, and Git halts everything for a human to intervene.
Weave replaces Git's line-based merge with entity-level merge, a 3-way merge that compares base, ours, and theirs at the level of individual functions, classes, and keys instead of individual lines. That lets it tell where the two branches actually drifted apart, rather than just where their edits happen to land on the same line numbers. It works like this:
Run the same scenario above through weave, and it merges cleanly with zero conflicts: both functions end up in the output.
This merge algorithm is deterministic and stateless: it reads three file revisions and writes one result, the same way git merge-file does. It is not a CRDT. (Weave separately ships a CRDT-backed coordination layer, weave-crdt, for tracking live multi-agent edits before they hit Git; see Architecture.)
| Scenario | Git (line-based) | Weave (entity-level) |
|---|---|---|
| Two agents add different functions to same file | CONFLICT | Auto-resolved |
Agent A modifies foo(), Agent B adds bar() |
CONFLICT (adjacent lines) | Auto-resolved |
| Both agents modify the same function differently | CONFLICT | CONFLICT (with entity-level context) |
| One agent modifies, other deletes same function | CONFLICT (cryptic diff) | CONFLICT: function 'validateToken' (modified in ours, deleted in theirs) |
| Both agents add identical function | CONFLICT | Auto-resolved (identical content detected) |
| Both agents add different properties to same object | CONFLICT | Auto-resolved |
| Different JSON keys modified | CONFLICT | Auto-resolved |
The key difference: Git produces false conflicts on independent changes because they happen to be in the same file. Weave only conflicts on actual semantic collisions when two branches change the same entity incompatibly.
31 hand-crafted merge scenarios across 7 languages, comparable to mergiraf's own test corpus. Run weave stats --bench to reproduce:
Two of the 31 must not merge. When both sides add different decorators to the same Python or TypeScript function, decorator application is function composition, so the stack order is a semantic decision neither side made — @cache outside @auth serves cached responses without ever running the auth check. Weave refuses rather than fabricate an order, and a tool that merges those cleanly is wrong, not better. Annotations in Java, C# and Kotlin are unordered metadata, so weave still set-unions those.
| Tool | Clean merges (of 29 mergeable) | Correct outcomes (of 31) |
|---|---|---|
| Weave | 29/29 (100%) | 31/31 (100%) |
| Mergiraf (v0.16.3) | 26/29 (90%) | 28/31 (90%) |
| Git | 15/29 (52%) | 17/31 (55%) |
All three tools correctly refuse the two decorator scenarios. Mergiraf fails on both-add-at-end-of-file and insert-between-existing; weave resolves those because it operates at entity granularity (functions, classes, methods) rather than AST node level. Full breakdown at ataraxy-labs.github.io/weave.
Replayed against real merge commits from five long-lived open-source repositories. For each of the first 500 merge commits per repo, weave re-runs the merge (base/ours/theirs from the actual git history) and compares its output to both Git's line merge and the human-authored merge commit. Reproduce with weave stats --repo <path-to-clone> --limit 500; full per-repo breakdown, including which files disagree and why, is at ataraxy-labs.github.io/weave/benchmarks.html.
Note (0.5.3): regenerated on the 0.5.3 engine on 2026-09-01 (
weave stats --repo <clone> --limit 500, fresh full clones). Read against the previous table with three caveats, stated rather than smoothed over. First, 0.5.3 conflicts on purpose where 0.5.2 sometimes resolved silently (divergent same-name additions, tightened same-entity and gap verdicts) — most of the regression increase is that tightening doing its job; on CPython, whose tested window is identical between runs, all of it is. Second, the earlier run's exact commit window was not recorded, andstats --repowalks the most recent N merges — for git, Go, and TypeScript the two runs replay substantially different commit sets, so cross-run rate comparisons there are indicative, not exact; this run's windows are current as of the date above. Third, audited details: the "clean line merge" baseline is a diff3 implementation (diffy), which disagrees withgit merge-fileon a small number of cases; 3 of the 86 regressions are a known guard false-positive (files whose source code contains conflict-marker string literals — e.g. TypeScript's own scanner); and in 2 regressions the line merge's "clean" result differs from what the human actually committed, i.e. weave's refusal was arguably the safer verdict.
| Repository | Language | File merges tested | Wins | Regressions | Human match |
|---|---|---|---|---|---|
| [git/git](http |