Skip to content
Tech News
← Back to articles

Weave: Merging based on language structure and not lines

read original more articles
Why This Matters

Weave introduces an entity-level semantic merge driver for Git, enabling conflict-free merges by understanding code structure rather than line overlaps. This innovation significantly improves the reliability of merging code changes across multiple languages and workflows, reducing manual intervention and errors. Its integration with AI agents and support for numerous programming languages positions it as a transformative tool for collaborative software development.

Key Takeaways

Merge without conflicts. Entity-level semantic merge driver for Git. Two agents edit different functions in the same file? Clean merge. Every time.

git merge # Two agents edited different functions $ git merge feature-b CONFLICT (content): Merge conflict in src/lib.ts Automatic merge failed. # Git sees overlapping lines. # The functions don't actually overlap. weave # Same merge, with weave configured $ git merge feature-b weave [src/lib.ts]: 2 entities matched, 2 modified, 0 conflicts Merge made by the 'ort' strategy. # Different functions = no conflict.

copied $ brew install weave

31 out of 31. 31 merge scenarios across 7 languages. Full breakdown → weave 31/31 (100%) mergiraf 26/31 (83%) git 15/31 (48%) 83 real-world wins 0 regressions on C, Python, Go 4,917 file merges tested 1,500+ downloads

Three layers Use just the merge driver. Or add coordination for multi-agent workflows. Full docs → MERGE Merge Driver Replaces git's line-level merge. Parses code with tree-sitter, merges by function and class. COORDINATE CRDT State Agents claim entities before editing. Detect conflicts before they happen. CONNECT MCP Server 15 tools via Model Context Protocol. Claude and other AI agents call them directly.

28 languages Entity extraction powered by sem-core and tree-sitter. Plus 5 data formats. Full list → TypeScript JavaScript Python Go Rust Java C C++ C# Ruby PHP Swift Kotlin Elixir Bash HCL Fortran Dart Perl OCaml Scala Zig Vue Svelte XML ERB JSON YAML TOML CSV Markdown

Try it. 5 seconds. ~/my-project $ brew install weave $ cd my-project && weave setup ✓ Merge driver configured $ git merge feature-branch Merge made by the 'ort' strategy.