Ataraxy-Labs/weave

Entity-level git merge driver. Resolves false conflicts git invents when independent agents edit the same file. ~95% reduction vs. line-based merge.

weave – Entity‑level semantic merge for Git

What it is

  • A Rust‑based tool that replaces Git’s line‑by‑line merge with a semantic merge that works on functions, classes, JSON keys and other language entities. It parses the three versions of a file (base, ours, theirs) with tree‑sitter, matches entities by name/scope, and merges them intelligently.

Why it matters

  • When multiple AI agents (or developers) edit the same file, Git often flags a conflict even though the changes are independent (e.g., two new functions added side‑by‑side). weave resolves those false conflicts automatically, letting agents continue without human intervention.

Key features

  • Entity‑level 3‑way merge – works on functions, classes, object keys, etc., across 38 supported languages.
  • Deterministic & stateless – given the same three revisions it always produces the same result, similar to git merge-file.
  • Conflict context – when a real conflict occurs, the marker includes the entity name, type, and a short “refused_by” reason, making manual resolution easier.
  • weave land – a command that validates the merged tree, optionally runs a custom resolver, and stages only files that pass structural checks (PROVEN, VERIFIED, REFUSED).
  • Integration with Git and Jujutsu – provides a weave-driver merge driver and a weave setup command that writes the necessary .gitattributes rules automatically.
  • CRDT‑backed coordination layer (separate weave‑crdt crate) for live multi‑agent editing before the changes hit Git.
  • Benchmarks & tests – 441 unit/integration tests, plus extensive benchmark suites comparing against Git and Mergiraf on real‑world repositories (git, Flask, CPython, Go, TypeScript).

Installation

# Homebrew (macOS / Linux)
brew install weave

# From source (requires Rust toolchain)
git clone https://github.com/Ataraxy-Labs/weave
cd weave
cargo install --path crates/weave-cli      # `weave` command
cargo install --path crates/weave-driver   # driver invoked by Git

Typical workflow

  1. Run weave setup (or --global, --local, --off) to install the merge driver for all supported file types.
  2. Merge as usual: git merge <branch>.
  3. If weave produces conflict markers, use weave explain <file> for detailed entity‑level info.
  4. After editing, run weave check to verify the tree.
  5. Finish with weave land (optionally providing a custom resolver) to stage the resolved files.

Ecosystem & related projects

  • sem – semantic version control.
  • inspect – semantic code review.
  • opensessions – tmux sidebar for coding agents.
  • weave‑crdt – a CRDT layer for live multi‑agent collaboration (mentioned but not part of this repo).

Maturity

  • Latest stable release 0.5.3 (as of Sep 2026).
  • CI runs on Linux and Windows; all tests pass (441 + tests).
  • Benchmarked on thousands of real merge commits with published results.

License

  • Dual‑licensed under MIT OR Apache‑2.0.

Bottom line weave is a production‑ready, open‑source solution for reducing false merge conflicts in codebases where many automated agents (or developers) edit the same files. By merging at the level of language entities rather than raw lines, it lets teams ship changes faster and with fewer manual interventions.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Dispatch