Merge without conflicts.

Entity-level semantic merge driver for Git. Understands functions, classes, and properties — so two agents editing different functions in the same file merge cleanly.

copied $ brew install ataraxy-labs/tap/weave
the problem
# Two agents edit different functions in the same file
# Agent 1 modifies processData()
# Agent 2 modifies validateInput()

$ git merge feature-b
CONFLICT (content): Merge conflict in src/lib.ts
Automatic merge failed; fix conflicts and then commit.

# Git sees overlapping line ranges — false conflict.
# The functions don't actually overlap. Git doesn't know that.
the solution
$ weave setup
 Merge driver configured for *.ts, *.js, *.py, *.go, *.rs, ...

$ git merge feature-b
weave [src/lib.ts]: 2 entities matched, 2 modified, 0 conflicts
Merge made by the 'ort' strategy.

# weave understands functions. Different functions = no conflict.

Three phases

weave has three layers, each building on the last. Use just the merge driver, or add coordination for multi-agent workflows.

PHASE 1

Merge Driver

Replaces git's line-level merge with entity-level merge. Parses code with tree-sitter, merges by function/class instead of by line.

PHASE 2

CRDT State

Persistent "who's editing what" state. Agents claim entities before editing, detect conflicts before they happen.

PHASE 3

MCP Server

15 tools exposed via Model Context Protocol. Claude and other AI agents call them directly to coordinate work.

weave vs git merge

git merges lines. mergiraf merges tree nodes. weave merges entities. Read the full deep dive →

Scenario git merge mergiraf weave merge
Two agents edit different functions CONFLICT (adjacent lines) auto-resolved auto-resolved
One adds function, one modifies another often conflicts auto-resolved auto-resolved
Both modify the same function identically CONFLICT auto-resolved detected as identical, uses either
Both modify the same function differently CONFLICT CONFLICT attempts 3-way merge on entity body
One deletes, one modifies silent data loss possible depends on context modify/delete conflict reported
Both add functions at same position CONFLICT CONFLICT auto-resolved (unordered entities)
Python: both add decorators to function CONFLICT CONFLICT auto-resolved (decorator bundling)

Real-world benchmarks

Tested on real merge commits from major open-source repos. For each merge commit, we replay the merge with both git and weave, then compare against the human-authored result. Every "win" is a merge where git conflicted but weave resolved cleanly.

Repository Language Merges Wins Regressions Human Match
git/git C 1,319 39 0 64%
Flask Python 56 14 0 57%
CPython C / Python 256 7 0 29%
Go Go 1,247 19 0 58%
TypeScript TypeScript 1,639 4 3 75%

Zero regressions on C, Python, and Go. Full breakdown with methodology →

Synthetic benchmarks

31 hand-crafted merge scenarios across 7 languages. Run weave bench to reproduce.

Scenario weave mergiraf git
Different functions modifiedcleancleanclean
Different class methods modifiedcleancleanclean
Both add different imports (TS)cleancleanCONFLICT
Class: different methods among 4cleancleanclean
One adds, other modifiescleancleanclean
Adjacent function changescleancleanclean
Python: different class methodscleancleanclean
Python: adjacent methods (4-method class)cleancleanclean
Both add exports at end of filecleanCONFLICTCONFLICT
Reformat vs modify (whitespace-aware)cleancleanCONFLICT
Both add functions at end of filecleanCONFLICTCONFLICT
Both add methods to class at endcleancleanCONFLICT
Rust: both add different use statementscleancleanCONFLICT
Python: both add different importscleancleanCONFLICT
Class: modify method + add newcleancleanclean
Both add functions between existingcleanCONFLICTCONFLICT
Python: both add different decoratorscleanCONFLICTCONFLICT
Decorator + body changecleancleanclean
TS: class method decoratorscleanCONFLICTCONFLICT
TS: interface field additionscleancleanCONFLICT
Rust: enum variant additionscleancleanCONFLICT
Java: different methods in same classcleancleanclean
Java: both add annotationscleancleanCONFLICT
C: different functions modifiedcleancleanclean
TS: method reorder + modificationcleancleanclean
Python: both add class methodscleancleanCONFLICT
Rust: both add impl methodscleancleanCONFLICT
TS: enum modify + add variantcleancleanclean
TS: add JSDoc + modify bodycleancleanclean
Rust: both add doc comments to different fnscleancleanclean
Go: both add different functionscleancleanCONFLICT

weave: 31/31 clean (100%) vs mergiraf: 26/31 (83%) vs git: 15/31 (48%). Full benchmark suite runs in 11ms. Individual merges take 65-374µs. Entity extraction powered by sem-core with xxHash64 structural hashing and parallel tree-sitter parsing.

Supported languages

Entity extraction powered by sem-core and tree-sitter.

LanguageExtensionsEntities
TypeScript.ts .tsxfunctions, classes, interfaces, types, enums
JavaScript.js .jsx .mjs .cjsfunctions, classes, variables
Python.pyfunctions, classes, decorators
Go.gofunctions, methods, types
Rust.rsfunctions, structs, enums, impls, traits
Java.javaclasses, methods, interfaces, enums, fields
C.c .hfunctions, structs, enums, unions, typedefs
C++.cpp .cc .cxx .hpp .hh .hxxfunctions, classes, structs, enums, namespaces, templates
Ruby.rbmethods, classes, modules
C#.csmethods, classes, interfaces, enums, structs, namespaces
PHP.phpfunctions, classes, methods, interfaces, traits, enums, namespaces
Fortran.f90 .f95 .f03 .f08 .f .forfunctions, subroutines, modules, programs, interfaces
JSON.jsonproperties, objects
YAML.yml .yamlsections, properties
TOML.tomlsections, properties
CSV.csv .tsvrows
Markdown.md .mdxheading-based sections

Quick start

Get weave running in your repo in 30 seconds.

~/my-project
# Install
$ cargo install --git https://github.com/Ataraxy-Labs/weave weave-cli
$ cargo install --git https://github.com/Ataraxy-Labs/weave weave-driver

# Configure your repo
$ cd my-project
$ weave setup
 Created .gitattributes with weave merge driver rules
 Configured git merge driver 'weave'

# Preview a merge before doing it
$ weave preview feature-branch
  src/auth.ts — auto-resolved
    2 entities matched, 2 modified, 0 conflicts
  src/config.json — auto-resolved
    1 entity matched, 1 modified, 0 conflicts

 Merge would be clean (2 file(s) auto-resolved by weave)

# Now git merge uses weave automatically
$ git merge feature-branch
Merge made by the 'ort' strategy.

For AI agents (MCP)

Claude Code (CLI)
# Install the MCP server binary
$ cargo install --git https://github.com/Ataraxy-Labs/weave weave-mcp

# Add to Claude Code (available in all projects)
$ claude mcp add --scope user weave -- weave-mcp

# Restart Claude Code, then verify with /mcp
Claude Desktop
# Add to Claude Desktop config (~/.config/claude/claude_desktop_config.json)
{
  "mcpServers": {
    "weave": { "command": "weave-mcp" }
  }
}