Skip to content
Hacker News front page

Weave: merge by language structure, not by lines

Weave: Merging based on language structure and not lines

Weave is a Git merge driver that parses code into entities like functions and classes via tree-sitter, then merges at that level instead of line-by-line. Two agents editing different functions in the same file merge cleanly. It scored 31/31 on a 31-scenario benchmark, while native Git scored 15/31. It also layers a CRDT state for pre-merge conflict detection and an MCP server exposing 15 tools for Claude and other agents. 28 languages and 5 data formats are supported, with 4,917 file merges tested and zero regressions on C, Python, and Go.

Why it matters: Weave tackles a new problem in the AI coding era: when multiple agents edit the same file, line-level merging produces false conflicts. It uses tree-sitter to merge by function/class entities, scoring 31/31 on benchmarks vs Git's 15/31. The CRDT coordination layer and MCP serv...

Read the original ↗Export Markdown