{"_id":"@ataraxy-labs/weave","_rev":"5-69cf9ed7cc8803edfe7cf8140aeddb02","name":"@ataraxy-labs/weave","dist-tags":{"latest":"0.5.2"},"versions":{"0.3.5":{"name":"@ataraxy-labs/weave","version":"0.3.5","license":"MIT OR Apache-2.0","_id":"@ataraxy-labs/weave@0.3.5","maintainers":[{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"}],"bin":{"weave":"bin/weave.js","weave-mcp":"bin/weave-mcp.js","weave-driver":"bin/weave-driver.js"},"dist":{"shasum":"35a17cd9fe5ccb60833b6de913a8333b4a95db26","tarball":"https://registry.npmjs.org/@ataraxy-labs/weave/-/weave-0.3.5.tgz","fileCount":8,"integrity":"sha512-hKr4l/8PS2E7jUgKwK0YEoe4lGHP3sFkp/8dscNinDfmcx6yZnAbvjfiJcvgj32XLI+wc+7aAEY2YKjOMNRXMQ==","signatures":[{"sig":"MEYCIQCU7SbLTo9+Nk+po30g+dEIDXKoFoq4zPB7TSBlIN34pAIhAK2utahaaI/DisaHL9DQ8rEvl+XBb6K+JpqCTxgdJHBL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31468},"type":"module","engines":{"node":">=20"},"gitHead":"797b58441977b39099edb3b362ff8ae457fd919f","scripts":{"prepack":"node ./scripts/sync-package-version.mjs","postinstall":"node ./scripts/postinstall.mjs"},"_npmUser":{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"},"_npmVersion":"10.8.2","description":"npm wrapper for the weave CLI, driver, and MCP server. Downloads matching release binaries and exposes weave, weave-driver, and weave-mcp commands.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/weave_0.3.5_1780206175454_0.13193556211197977","host":"s3://npm-registry-packages-npm-production"}},"0.3.6":{"name":"@ataraxy-labs/weave","version":"0.3.6","license":"MIT OR Apache-2.0","_id":"@ataraxy-labs/weave@0.3.6","maintainers":[{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"}],"bin":{"weave":"bin/weave.js","weave-mcp":"bin/weave-mcp.js","weave-driver":"bin/weave-driver.js"},"dist":{"shasum":"2b3011b2e3d75d490b7b7a931ccf1d54a7bb6787","tarball":"https://registry.npmjs.org/@ataraxy-labs/weave/-/weave-0.3.6.tgz","fileCount":8,"integrity":"sha512-IyNpgORZ+Zxlk+ZmQxC3TIDqUxaPo7zbZvqkj45CmM0feJRvDrR+aFNOJu9sFBvotpuZwzhxa/AkJR+OeZHowQ==","signatures":[{"sig":"MEUCIQCf3iNmtTvnHaGmTEaBFAFIGLCOc0t9P2cn8N1AMw3HKwIgL9l9Pt9BsPyzBZ/6uJqHVjEWwrzdVLbJcP+HSUiUY88=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31468},"type":"module","engines":{"node":">=20"},"gitHead":"aad5d61745d900986d9664a2ae8afe22ad8d9ebe","scripts":{"prepack":"node ./scripts/sync-package-version.mjs","postinstall":"node ./scripts/postinstall.mjs"},"_npmUser":{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"},"_npmVersion":"10.8.2","description":"npm wrapper for the weave CLI, driver, and MCP server. Downloads matching release binaries and exposes weave, weave-driver, and weave-mcp commands.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/weave_0.3.6_1780685550907_0.3038682723642179","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@ataraxy-labs/weave","version":"0.5.0","license":"MIT OR Apache-2.0","_id":"@ataraxy-labs/weave@0.5.0","maintainers":[{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"}],"bin":{"weave":"bin/weave.js","weave-mcp":"bin/weave-mcp.js","weave-driver":"bin/weave-driver.js"},"dist":{"shasum":"06d64c39657a0900cae3b6e48a9788b9d6918056","tarball":"https://registry.npmjs.org/@ataraxy-labs/weave/-/weave-0.5.0.tgz","fileCount":12,"integrity":"sha512-aUj7Yg3gO+kivgWCpJjPrgvpBY8bnxn/Rz8XmYoblnWJVP/EBtvTbhjX9rcYxSzNETZ2XCSugYUU/VtfQBuIcg==","signatures":[{"sig":"MEQCICL1AMJ2Xq6BLT2iHOViS5MPx/AlrtZcohdr9PYgMoTfAiAQPj16nMyrbJfz9rUflrB0wq9/W2F3XlDwVVYXhFVUsQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48714},"type":"module","engines":{"node":">=20"},"gitHead":"84890736b2c1ad3f28b1a4fe9ac4790f5f0220a3","scripts":{"prepack":"node ./scripts/sync-package-version.mjs","postinstall":"node ./scripts/postinstall.mjs"},"_npmUser":{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"},"_npmVersion":"10.8.2","description":"npm wrapper for the weave CLI, driver, and MCP server. Downloads matching release binaries and exposes weave, weave-driver, and weave-mcp commands.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/weave_0.5.0_1786550236035_0.6675491611014581","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@ataraxy-labs/weave","version":"0.5.1","license":"MIT OR Apache-2.0","_id":"@ataraxy-labs/weave@0.5.1","maintainers":[{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"}],"bin":{"weave":"bin/weave.js","weave-mcp":"bin/weave-mcp.js","weave-driver":"bin/weave-driver.js"},"dist":{"shasum":"91792da4c27fbb44c8ae0ed077b5bb0396407ed9","tarball":"https://registry.npmjs.org/@ataraxy-labs/weave/-/weave-0.5.1.tgz","fileCount":12,"integrity":"sha512-cObNg6pAMF6HsJF/z0AZkrlp4XFzaGQiP3XyPPMxVyxBYWakT/pb9yxGvX4JBWxFHop3B10hPBO8/7UMPyF9aQ==","signatures":[{"sig":"MEUCIQC7RmtiZWWDvl6ramxzfhk9y8mwbXeLF+Nxjc/6ZgikcgIgHdT+0R2sk8HFFA/nMJLrsMnZy2VLaBrcgWAABG3m2LE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48714},"type":"module","engines":{"node":">=20"},"gitHead":"b9b0abdfbdb8b576c3ea75bba2d5cf1ff2095fb0","scripts":{"prepack":"node ./scripts/sync-package-version.mjs","postinstall":"node ./scripts/postinstall.mjs"},"_npmUser":{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"},"_npmVersion":"10.8.2","description":"npm wrapper for the weave CLI, driver, and MCP server. Downloads matching release binaries and exposes weave, weave-driver, and weave-mcp commands.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/weave_0.5.1_1786618402784_0.8077434697195573","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"@ataraxy-labs/weave","version":"0.5.2","description":"npm wrapper for the weave CLI, driver, and MCP server. Downloads matching release binaries and exposes weave, weave-driver, and weave-mcp commands.","license":"MIT OR Apache-2.0","type":"module","bin":{"weave":"bin/weave.js","weave-driver":"bin/weave-driver.js","weave-mcp":"bin/weave-mcp.js"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"scripts":{"postinstall":"node ./scripts/postinstall.mjs","prepack":"node ./scripts/sync-package-version.mjs"},"_id":"@ataraxy-labs/weave@0.5.2","gitHead":"797255ee1e303e20d39ed1a8d7fb8014799de543","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-zqd/i3BG8FMYcHR12NYhaUWNHnjGUH20HfQhd2eLSgH9B47K6yZvQ8/ZrCd4kYQC8YvkFUvhDpsnSPw2FVa2Pg==","shasum":"ad8a2298bf3cbd0612df05fe9cd34d175901692b","tarball":"https://registry.npmjs.org/@ataraxy-labs/weave/-/weave-0.5.2.tgz","fileCount":12,"unpackedSize":51932,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDtbcG6mfGpJGCE4H7ug1LetN4JxYIiA5fGMVVQimABHgIgN9QDKE4TskXHT+AWf3JpsQM1k/QE2YNFwZZuvEYuo3I="}]},"_npmUser":{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"},"directories":{},"maintainers":[{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/weave_0.5.2_1787408151849_0.9305376215078158"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-31T05:42:55.261Z","modified":"2026-08-22T14:15:52.147Z","0.3.5":"2026-05-31T05:42:55.600Z","0.3.6":"2026-06-05T18:52:31.049Z","0.5.0":"2026-08-12T15:57:16.205Z","0.5.1":"2026-08-13T10:53:22.940Z","0.5.2":"2026-08-22T14:15:51.995Z"},"license":"MIT OR Apache-2.0","description":"npm wrapper for the weave CLI, driver, and MCP server. Downloads matching release binaries and exposes weave, weave-driver, and weave-mcp commands.","maintainers":[{"name":"ataraxy-labs","email":"rohan@ataraxy-labs.com"}],"readme":"> **Part of the [Ataraxy Labs](https://ataraxy-labs.com) stack** — agent-native infrastructure for software development. See also: [sem](https://ataraxy-labs.com/sem) (semantic version control) · [inspect](https://github.com/Ataraxy-Labs/inspect) (semantic code review) · [opensessions](https://github.com/Ataraxy-Labs/opensessions) (tmux sidebar for coding agents).\n>\n> Read the manifesto: https://ataraxy-labs.com/#thesis · Essays: https://ataraxy-labs.com/blogs · LLMs: https://ataraxy-labs.com/llms.txt\n\n<p align=\"center\">\n  <img src=\"assets/banner.svg\" alt=\"weave\" width=\"600\" />\n</p>\n\n<p align=\"center\">\n  <strong>Entity-level semantic merge driver for Git.</strong><br>\n  Resolves merge conflicts that Git can't by understanding code structure via tree-sitter.\n</p>\n\n<p align=\"center\">\n  <a href=\"#install\">Install</a> ·\n  <a href=\"#quickstart\">Quickstart</a> ·\n  <a href=\"#how-weave-fixes-this\">How It Works</a> ·\n  <a href=\"#mcp-server\">MCP Server</a> ·\n  <a href=\"https://github.com/Ataraxy-Labs/weave/releases/latest\">Releases</a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/Ataraxy-Labs/weave/releases/latest\"><img src=\"https://img.shields.io/github/v/release/Ataraxy-Labs/weave?color=blue&label=release\" alt=\"Release\"></a>\n  <a href=\"https://formulae.brew.sh/formula/weave\"><img src=\"https://img.shields.io/badge/homebrew-weave-orange\" alt=\"Homebrew\"></a>\n  <img src=\"https://img.shields.io/badge/rust-stable-orange\" alt=\"Rust\">\n  <img src=\"https://img.shields.io/badge/tests-401_passing-brightgreen\" alt=\"Tests\">\n  <a href=\"LICENSE-MIT\"><img src=\"https://img.shields.io/badge/license-MIT_OR_Apache--2.0-yellow\" alt=\"License\"></a>\n  <img src=\"https://img.shields.io/badge/languages-38-blue\" alt=\"Languages\">\n</p>\n\n<p align=\"center\">\n  <img src=\"assets/merge-animation.gif\" alt=\"Weave merge animation: two branches add different functions, git conflicts, weave merges cleanly\" width=\"700\" />\n</p>\n\n## Quickstart\n\n```bash\nweave setup                 # this repo now merges through weave; git merge/rebase/cherry-pick unchanged\ngit merge <branch>          # real conflicts land as markers with a `refused_by:` line stating why\nweave explain <file>        # per-hunk detail for one conflicted file, read off the actual git stages\n#  ...edit to resolve...\nweave check                 # verify the working tree against the three merge stages; exits 1 on findings\n```\n\nSee [Setup](#setup) for `--global`/`--local` variants and [MCP Server](#mcp-server) for agent-framework integration.\n\n## The Problem\n\nGit merges by comparing **lines**. When two branches both add code to the same file — even to completely different functions — Git sees overlapping line ranges and declares a conflict:\n\n```\n<<<<<<< HEAD\nexport function validateToken(token: string): boolean {\n    return token.length > 0 && token.startsWith(\"sk-\");\n}\n=======\nexport function formatDate(date: Date): string {\n    return date.toISOString().split('T')[0];\n}\n>>>>>>> feature-branch\n```\n\nThese are **completely independent changes**. There's no real conflict. But someone has to manually resolve it anyway.\n\nThis happens constantly when multiple AI agents work on the same codebase. Agent A adds a function, Agent B adds a different function to the same file, and Git halts everything for a human to intervene.\n\n## How Weave Fixes This\n\nWeave replaces Git's line-based merge with **entity-level merge**. Instead of diffing lines, it:\n\n1. Parses all three versions (base, ours, theirs) into semantic entities — functions, classes, JSON keys, etc. — using [tree-sitter](https://tree-sitter.github.io/)\n2. Matches entities across versions by identity (name + type + scope)\n3. Merges at the entity level:\n   - **Different entities changed** → auto-resolved, no conflict\n   - **Same entity changed by both** → attempts intra-entity merge, conflicts only if truly incompatible\n   - **One side modifies, other deletes** → flags a meaningful conflict\n\nThe same scenario above? Weave merges it cleanly with zero conflicts — both functions end up in the output.\n\n## Weave vs Git Merge\n\n| Scenario | Git (line-based) | Weave (entity-level) |\n|----------|-----------------|---------------------|\n| Two agents add different functions to same file | **CONFLICT** | Auto-resolved |\n| Agent A modifies `foo()`, Agent B adds `bar()` | **CONFLICT** (adjacent lines) | Auto-resolved |\n| Both agents modify the same function differently | CONFLICT | CONFLICT (with entity-level context) |\n| One agent modifies, other deletes same function | CONFLICT (cryptic diff) | CONFLICT: `function 'validateToken' (modified in ours, deleted in theirs)` |\n| Both agents add identical function | **CONFLICT** | Auto-resolved (identical content detected) |\n| Both agents add different properties to same object | **CONFLICT** | Auto-resolved |\n| Different JSON keys modified | **CONFLICT** | Auto-resolved |\n\nThe key difference: Git produces false conflicts on **independent changes** because they happen to be in the same file. Weave only conflicts on **actual semantic collisions** when two branches change the same entity incompatibly.\n\n## Weave vs Mergiraf\n\nTested on 31 real-world merge scenarios across Python, TypeScript, Rust, Go, Java, and C:\n\n| Tool | Clean Merges | Score |\n|------|-------------|-------|\n| **Weave** | **31/31** | 100% |\n| Mergiraf (v0.16.3) | 26/31 | 83% |\n| Git | 15/31 | 48% |\n\nMergiraf fails on both-add-at-end-of-file, insert-between-existing, and decorator conflict scenarios. Weave resolves all of these because it operates at entity granularity (functions, classes, methods) rather than AST node level. Full breakdown at [ataraxy-labs.github.io/weave](https://ataraxy-labs.github.io/weave/).\n\n## Real-World Benchmarks\n\nTested on real merge commits from major open-source repositories. For each merge commit, we replay the merge with both Git and Weave, then compare against the human-authored result.\n\n- **Wins**: Merge commits where Git conflicted but Weave resolved cleanly\n- **Regressions**: Cases where Weave introduced errors (0 across all repos)\n- **Human Match**: How often Weave's output exactly matches what the human wrote\n- **Resolution Rate**: Percentage of all merge commits Weave resolved vs total attempted\n\n| Repository | Language | Merge Commits | Wins | Regressions | Human Match | Resolution |\n|------------|----------|---------------|------|-------------|-------------|------------|\n| [git/git](https://github.com/git/git) | C | 1319 | 39 | 0 | 64% | 13% |\n| [Flask](https://github.com/pallets/flask) | Python | 56 | 14 | 0 | 57% | 54% |\n| [CPython](https://github.com/python/cpython) | C/Python | 256 | 7 | 0 | 29% | 13% |\n| [Go](https://github.com/golang/go) | Go | 1247 | 19 | 0 | 58% | 28% |\n| [TypeScript](https://github.com/microsoft/TypeScript) | TypeScript | 2000 | 65 | 0 | 6% | 23% |\n\nZero regressions across all repositories. Every \"win\" is a place where a developer had to manually resolve a false conflict that Weave handles automatically.\n\n## Testing\n\nweave's correctness is checked two ways. The open test suite in this\nrepository covers the documented merge properties and runs in CI. In\naddition, every release is gated by a private conformance suite — currently\n2,800+ enumerated merge-rule cells and five corpora of real-world merges —\nmaintained separately, following the held-out-benchmark practice used by\nconformance and evaluation suites elsewhere (SQLite/TH3, Khronos CTS, LLM\neval sets). PRs receive a pass/fail status from this suite automatically.\n\n## Conflict Markers\n\nWhen a real conflict occurs, weave gives you context that Git doesn't: which\nentity, what type, and — on the line inside the box — which internal guard\ndeclined to auto-merge and exactly which lines both sides disagree about.\n\n```\n<<<<<<< ours — function `process` (T, confidence: high)\n// refused_by: statement_fold · collision: `    return data.upper()` +1 more\nexport function process(data: any) {\n    return JSON.stringify(data);\n}\n=======\nexport function process(data: any) {\n    return data.toUpperCase();\n}\n>>>>>>> theirs — function `process` (T, confidence: high)\n```\n\nRun `weave explain <file>` for more detail on every conflicted entity in the\nfile, and `weave check` after editing to verify your resolution against the\nthree merge stages — see [Quickstart](#quickstart).\n\n## Supported Languages\n\nTypeScript, TSX, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, C#, PHP, Swift, Kotlin, Scala, Dart, Elixir, Bash, Fish, Fortran, Perl, OCaml, Zig, Elm, Clojure, EDN, D, Lua, Nix, SQL, HCL/Terraform, LaTeX, XML, JSON, YAML, TOML, CSV, Markdown. Falls back to standard line-level merge for everything else.\n\n`weave setup` writes a `merge=weave` line for exactly this list and nothing\nelse. Each language on it passes a five-scenario merge sweep — two sides adding\ndifferent definitions merges clean, two sides rewriting the same definition\nconflicts, and nothing is dropped — in `crates/weave-core/tests/language_coverage.rs`.\n\nVue, Svelte, ERB and Haskell are parsed but deliberately **not** claimed. Their\nentity model treats a whole `<script>` block, template, or type signature as a\nsingle unit, so two people adding two different definitions conflict where they\nshould merge cleanly, and the conflict marker can land mid-definition. Those\nfiles get Git's line-level merge instead, which is the better answer until the\nparser gains a real per-definition model for them.\n\nThat is what the merge engine can parse. `weave setup` writes `.gitattributes`\nrules for a narrower set, so Kotlin, HCL/Terraform, Vue, Svelte, ERB, CSV, Perl,\nOCaml and Zig files still take git's line merge until you add the rule yourself:\n\n```bash\necho '*.kt merge=weave' >> .gitattributes   # same shape for any extension above\n```\n\n## Install\n\n```bash\nbrew install weave\n```\n\nOr build from source (requires Rust). Two binaries, both required: `weave`\n(the CLI you run — `setup`/`explain`/`check`/...) and `weave-driver` (the one\ngit itself invokes on every merge; `weave setup` fails without it on `PATH`):\n\n```bash\ngit clone https://github.com/Ataraxy-Labs/weave\ncd weave\ncargo install --path crates/weave-cli      # the `weave` binary\ncargo install --path crates/weave-driver   # the `weave-driver` binary git calls\n```\n\nUpgrading an existing source install? `cargo install` refuses to overwrite a\nbinary it didn't put there itself — add `--force` to either command above.\n\n## Setup\n\nIn any Git repo:\n\n```bash\nweave setup\n```\n\nThis configures Git to use weave for all supported file types. Then use `git merge` as normal.\n\nTo revert back to normal git merging:\n\n```bash\nweave unsetup\n```\n\nTo set up for just yourself (without modifying `.gitattributes`), write the same supported file type rules to `.git/info/attributes` instead:\n\n```bash\nweave setup --local\n```\n\n### Global (every repo)\n\nTo make weave the default merge driver for **all** your repos at once (no per-repo setup, like [mergiraf](https://mergiraf.org/usage.html#registration-as-a-git-merge-driver)):\n\n```bash\nweave setup --global\n```\n\nThis writes the driver to your `~/.gitconfig` and the supported file-type rules to git's global attributes file (`~/.config/git/attributes`, or your `core.attributesfile` if set). No git repo required. Make sure `weave-driver` is on your `PATH` (it ships next to the `weave` binary).\n\nThe equivalent manual config, if you prefer:\n\n```bash\ngit config --global merge.weave.name \"Entity-level semantic merge\"\ngit config --global merge.weave.driver \"weave-driver %O %A %B %L %P\"\n# then add `*.ts merge=weave` (etc.) to ~/.config/git/attributes\n```\n\n## Jujutsu (jj)\n\nAdd to your jj config (`jj config edit --user`):\n\n```toml\n[merge-tools.weave]\nprogram = \"weave-driver\"\nmerge-args = [\"$base\", \"$left\", \"$right\", \"-o\", \"$output\", \"-l\", \"$marker_length\", \"-p\", \"$path\"]\nmerge-conflict-exit-codes = [1]\nmerge-tool-edits-conflict-markers = true\nconflict-marker-style = \"git\"\n```\n\nResolve conflicts with `jj resolve --tool weave`, or set as default:\n\n```bash\njj config set --user ui.merge-editor \"weave\"\n```\n\n## Preview\n\nDry-run a merge to see what weave would do:\n\n```bash\nweave preview feature-branch\n```\n\n```\n  src/utils.ts — auto-resolved\n    unchanged: 2, added-ours: 1, added-theirs: 1\n  src/api.ts — 1 conflict(s)\n    ✗ function `process`: both modified\n\n✓ Merge would be clean (1 file(s) auto-resolved by weave)\n```\n\nAfter a real conflict, `weave explain <file>` and `weave check` are the\nnext two commands — see [Quickstart](#quickstart).\n\n## MCP Server\n\nFor agent frameworks that speak [MCP](https://modelcontextprotocol.io):\n\n```bash\n# Claude Code\nclaude mcp add --scope user weave -- weave-mcp\n\n# Any MCP client, via stdio (~/.config/claude/claude_desktop_config.json etc.)\n{ \"mcpServers\": { \"weave\": { \"command\": \"weave-mcp\" } } }\n```\n\nThe server discovers the repo from the first tool call's file path, the\n`WEAVE_REPO` env var, or its working directory. It exposes `weave_check` and\n`weave_findings` as the read contract for acting on a merge, entity\ninspection tools (`weave_extract_entities`, `weave_diff`,\n`weave_get_dependencies`/`_dependents`), and a claim/release layer for\ncoordinating multiple agents in one repo. Each tool's own description states\nwhen to call it and what an empty result means.\n\n## Architecture\n\n```\nweave-core       # Library: entity extraction, 3-way merge algorithm, reconstruction\nweave-driver     # Git merge driver binary (called by git via %O %A %B %L %P)\nweave-cli        # CLI: `weave setup`, `weave explain`, `weave check`, `weave preview`, ...\nweave-crdt       # Automerge-backed multi-agent coordination state\nweave-mcp        # MCP server exposing weave to agent frameworks\n```\n\nUses [sem-core](https://github.com/Ataraxy-Labs/sem) for entity extraction via tree-sitter grammars.\n\n## How It Works\n\n```\n         base\n        /    \\\n     ours    theirs\n        \\    /\n       weave merge\n```\n\n1. **Parse** all three versions into semantic entities via tree-sitter\n2. **Extract regions** — alternating entity and interstitial (imports, whitespace) segments\n3. **Match entities** across versions by ID (file:type:name:parent)\n4. **Resolve** each entity: one-side-only changes win, both-changed attempts intra-entity 3-way merge\n5. **Reconstruct** file from merged regions, preserving ours-side ordering\n6. **Fallback** to line-level merge for files >1MB, binary files, or unsupported types\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=Ataraxy-Labs/weave&type=Date)](https://star-history.com/#Ataraxy-Labs/weave&Date)\n","readmeFilename":"README.md"}