3 ms·
Weave replaces git's merge with entity-level merge. It parses all three versions (base, ours, theirs) with tree-sitter, extracts functions/classes/methods, matc
by rs545837 8mo ago
Weave replaces git's merge with entity-level merge. It parses all three versions (base, ours, theirs) with tree-sitter, extracts functions/classes/methods, matches them by name and structural hash, and merges per-entity instead of per-line.
On our benchmark of 31 real-world scenarios across 7 languages:
- weave: 31/31 clean (100%)
- mergiraf: 26/31 clean (83%)
- git: 15/31 clean (48%)
The 5 scenarios where mergiraf fails are both-add-at-same-position and decorator conflicts. Mergiraf works at tree-node level, so when both sides insert at the same tree position it can't distinguish them. Weave treats entities as unordered sets, so two agents adding different functions at the end of a file just get unioned.
Key differences from mergiraf (which was on HN last year, 432pts):
- Entity-level, not tree-node-level. Functions and classes are the merge unit, not AST nodes.
- Inner entity merge: when both sides modify the same class, methods are decomposed and merged independently by name.
- Decorator/annotation bundling: decorators move with the function they annotate through merges.
- Rename detection via AST-normalized structural hashing.
- ConGra conflict taxonomy (Text/Syntax/Functional) with resolution hints per conflict.
- MCP server with 15 tools for AI agent coordination (claim entities before editing, detect conflicts, preview merges, dependency/impact analysis).
- 12 languages: TS, TSX, JS, Python, Go, Rust, Java, C, C++, Ruby, C#, Fortran.
It plugs into git as a merge driver, so it works with merge, rebase, and cherry-pick. Setup is brew install ataraxy-labs/tap/weave && weave setup.
This blew up on Twitter/X yesterday. A lot of the interest came from people running multiple Cursor/Claude agents on the same repo and hitting constant false conflicts.
Built in Rust. Entity extraction powered by sem-core (our tree-sitter wrapper). Open source, MIT.
Happy to answer questions about the merge algorithm, the benchmark methodology, or the MCP coordination model