Repolode
Ataraxy-Labs

Ataraxy-Labs/weave

An entity-level Git merge driver that merges code by functions, classes and keys instead of lines, avoiding false conflicts between independent edits.

Stars
1,352
Forks
49
Open issues
2
Last commit
14 hours ago

What is it?

Weave replaces Git's line-based three-way merge with an entity-level merge. It parses the base, ours and theirs versions of a file with tree-sitter, matches functions, classes and keys across versions by name, type and scope, and merges those entities. Changes to different entities resolve automatically, while changes to the same entity conflict only when they are truly incompatible.

The problem it targets is most visible when several AI agents or developers edit the same file at once. Git reports a conflict when two branches add different functions next to each other, even though nothing actually collides. Weave installs as a merge driver via `weave setup`, and conflicts it cannot resolve are written with entity-level context, such as which function was modified on one side and deleted on the other.

The project also includes `weave land` for gating and publishing agent merges, `weave check` and `weave explain` for reviewing resolutions, an MCP server for agent frameworks, and a Jujutsu configuration. It supports around 38 languages and falls back to Git's line merge for unsupported or very large files.

Key features

  • 01Merges functions, classes and keys as entities, so independent additions to one file do not conflict.
  • 02Uses tree-sitter grammars to parse about 38 languages, including TypeScript, Python, Go, Rust and JSON.
  • 03Reports conflicts with entity-level context such as entity type and which side modified or deleted it.
  • 04Installs as a Git merge driver with `weave setup`, globally or per repository.
  • 05Provides `weave check`, `weave explain` and `weave preview` to review resolutions before committing.
  • 06Ships an MCP server so agent frameworks can call its merge, edit and check tools.

Use cases

  • Letting several AI coding agents work on the same source file without manual conflict resolution.
  • Reducing false merge conflicts when many developers edit the same large module or config file.
  • Adding a structural check step before an automated agent merge is published to a branch.

Quick start

  1. 1

    Install weave (the README's Install section has the details)

  2. 2

    Enable weave in the repo so git merges use it

    weave setup
  3. 3

    Run a merge; real conflicts appear as markers with a refused_by line

    git merge <branch>
  4. 4

    Verify your resolved working tree against the merge stages

    weave check

Things to know

  • Entity-level merging can produce conflicts where plain Git would merge cleanly, as its own benchmarks show regressions on several repositories.
  • Vue, Svelte, ERB and Haskell files are deliberately not merged by weave and fall back to other handling.
  • The project is at version 0.5.x and its merge verdicts changed between releases.

In collections

Topics

FAQ

What is weave?
An entity-level Git merge driver that merges code by functions, classes and keys instead of lines, avoiding false conflicts between independent edits. Weave replaces Git's line-based three-way merge with an entity-level merge. It parses the base, ours and theirs versions of a file with tree-sitter, matches functions, classes and keys across versions by name, type and scope, and merges those entities. Changes to different entities resolve automatically, while changes to the same entity conflict only when they are truly incompatible.
Is weave free to use? What license does it have?
weave is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is weave still maintained?
Actively maintained. The last commit to weave was on Nov 7, 2026.
What can I use weave for?
Letting several AI coding agents work on the same source file without manual conflict resolution. Reducing false merge conflicts when many developers edit the same large module or config file. Adding a structural check step before an automated agent merge is published to a branch.
How do I install weave?
Install weave (the README's Install section has the details) Enable weave in the repo so git merges use it: weave setup Run a merge; real conflicts appear as markers with a refused_by line: git merge <branch> Verify your resolved working tree against the merge stages: weave check
Where can I get weave?
The source code and installation instructions are on GitHub: https://github.com/Ataraxy-Labs/weave

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects