{
  "markdown": "# Quilt\n\n<!-- mcp-name: io.github.wkoverfield/quilt -->\n\n[![CI](https://github.com/wkoverfield/quilt/actions/workflows/ci.yml/badge.svg)](https://github.com/wkoverfield/quilt/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@quilt-dev/cli)](https://www.npmjs.com/package/@quilt-dev/cli)\n[![downloads](https://img.shields.io/npm/dm/@quilt-dev/cli)](https://www.npmjs.com/package/@quilt-dev/cli)\n[![license](https://img.shields.io/npm/l/@quilt-dev/cli)](LICENSE)\n\nQuilt is a command-line tool that tracks which agent wrote which lines in a\nshared Git checkout, so multiple AI coding agents can work in one repo at once\nand each commits only its own changes.\n\nIt captures every edit at the tool boundary, keeps a per-line record of who wrote\nwhat, and reconstructs each agent's own changes at commit time. Git stays the\nsource of truth. Quilt never calls an LLM or spawns agents, and its state lives in\na `.quilt/` sidecar you can delete without touching your repo.\n\n![Two agents editing one file, plain git vs Quilt. Without Quilt (left), the first agent's commit absorbs the other's work and the history credits one author. With Quilt (right), each change is committed by the agent that made it.](examples/contrast.gif)\n\n```bash\nnpm install -g @quilt-dev/cli\nquilt setup     # capture hooks wired; claim enforcement via Claude hooks or MCP\n```\n\n## The problem\n\nYou want your agents in ONE checkout: one `node_modules`, one build, one dev\nserver, one environment to keep working, not a worktree per agent, each with\nits own install and its own drift. But on a shared checkout, plain git bites\neven when agents work on completely different things: the first `git commit -am`\nsweeps everyone else's uncommitted files into one blob, codegen and lockfile\nchurn get credited to whoever committed last, and two agents occasionally do\nland on the same line, where one silently overwrites the other. None of that\nrequires agents to be working on the same task. It's just what a shared\ncheckout does by default.\n\nQuilt makes the shared checkout safe. Every agent commits exactly its own\nlines and nothing else: disjoint work stays disjoint all the way into\nhistory, with no ceremony. And when two agents genuinely want the same code,\nthat becomes a coordinated handoff instead of a silent loss. It holds as you\nadd agents.\n\n`./examples/fleet.sh` runs seven agents against one checkout. The two endings:\n\n```txt\nWITHOUT quilt   1 commit for 7 agents — six got \"nothing to commit\", their\n                work swept into the first agent's blob. a7 silently\n                overwrote a1's change to getUser. a1's work is gone.\n\nWITH quilt      6 clean commits, one per agent, each exactly its own lines.\n                a7's write into a1's claimed function was denied before any\n                bytes changed, with a1's stated intent in the denial.\n```\n\n## When two agents want the same file\n\nFanning out on disjoint files is the easy case. The real test is contention.\nA denied claim isn't a dead end. It carries the holder's stated intent and\nwhen their lease lapses:\n\n```txt\n$ QUILT_ACTOR=builder-flows quilt claim deals.js flows.js --intent \"wire flows to deals\"\n  ✗ denied  deals.js (held by builder-friction)\n      builder-friction is: friction pass: rename + archive flags\n      their claim lapses 2026-07-04T22:12:05Z unless renewed\n  ✓ claimed flows.js\n```\n\nSo the blocked agent builds its granted files while it waits, re-claims after\nthe holder's commit auto-releases, and layers its change on top of the landed\none. Two clean commits, both changes in the file, nothing lost.\n`./examples/contention.sh` runs the whole sequence on the real machinery.\n\n## What it does\n\n- **One shared checkout.** Model humans, agents, and bots as actors editing one\n  working tree, no worktree per agent.\n- **Line-level attribution.** `commit --mine` commits only your lines, even when\n  they share a hunk with another actor's.\n- **Symbol-level claims.** Reserve `utils.js#formatPrice`, not the whole file, so\n  agents editing different functions never contend. Ten languages via tree-sitter;\n  whole-file claims for the rest.\n- **Collision prevention.** A write into code another agent has claimed is denied,\n  with the holder's stated intent, before any bytes change.\n- **Push-awareness.** Claim a symbol that depends on a function another actor is\n  changing, and Quilt warns you at claim time.\n- **Detect and preserve.** If one actor overwrites another's uncommitted lines,\n  Quilt snapshots the victim's version so nothing is silently lost.\n\nEvery commit Quilt produces is an ordinary Git commit. It trusts Git and never\nrewrites it, and all state lives locally under `.quilt/`. No account, no daemon.\n\n## Quickstart\n\n```bash\nquilt setup      # wire Quilt into the repo (capture hooks + optional MCP tools)\nquilt doctor     # confirm it's wired and capture is flowing\n```\n\nThat's it. Agents are named automatically: each Claude Code session or MCP\nconnection gets its own id, so parallel agents are told apart with no setup.\n\n### 4 terminals, one repo\n\nThe whole flow, from a git repo to four agents working at once:\n\n```bash\ncd your-repo\nquilt setup          # once, ~5 seconds\nclaude               # terminal 1\nclaude               # terminal 2\nclaude               # terminal 3\nclaude               # terminal 4\n```\n\nStart sessions from a directory that holds several repos? Run `quilt setup`\nthere instead: it wires the workspace root and every repo inside, and each\nedit is captured into the repo its file belongs to.\n\nNothing else. No `QUILT_ACTOR`, no per-terminal ceremony, nothing to approve:\nthe capture hooks attribute every edit to its session automatically. Watch it\nlive with `quilt fleet`, and when a session's work is ready, ask it to run\n`quilt commit --mine -m \"...\"`. Each commit contains exactly that session's\nlines, even where two sessions touched the same file. (Claude Code will also\noffer to enable the optional quilt MCP server for the project; approving it\nadds the claim/prevention tools, but the hooks protect you either way.)\n\n### Watch the fleet\n\n`quilt ui` opens the same picture in your browser, live: who wrote what\n(per-actor line counts per file), active claims, who's blocked on whom, and\nanything that needs a human. Local-only (127.0.0.1), read-only, one command.\n\n![The quilt ui dashboard: an escalated collision at the top under \"Needs you\", actor cards with their claims, a who-wrote-what table with per-actor line counts, and blocked/queued actors.](examples/ui.png)\n\nPrefer the terminal? `quilt fleet --watch` is the same view as text.\n\nSet an explicit id when you want one that is stable across sessions:\n\n```bash\nQUILT_ACTOR=auth-agent claude    # this agent's edits are attributed to auth-agent\n```\n\nThen each agent commits only its own lines:\n\n```bash\nquilt status                     # who owns what\nquilt preview --mine             # exact patch that would be committed\nquilt commit --mine -m \"fix auth redirect\"\nquilt provenance HEAD            # actor, session, files, hunks, tree\n```\n\nQuilt writes that provenance into the Git commit itself, so it survives normal\npushes and fresh clones. Prompt correlation stays local in `quilt ui`; it is not\npublished into Git history.\n\nIn a shared shell, make the committer explicit (`quilt --as auth-agent commit\n--mine ...`). Quilt refuses a checkout-global session identity when the dirty\ntree shows another actor. If a deploy provider requires a recognized Git email,\nset one once while keeping actor names distinct:\n\n```bash\nquilt config author.email you@example.com\n```\n\n`quilt fleet` shows the whole picture: every actor, their claims, and anything\nthat needs a human. See [docs/reference.md](docs/reference.md) for the full\ncommand list.\n\n## Why not worktrees?\n\nA worktree per agent is the usual answer, and for fully independent tasks it\nworks. But every worktree is another environment to build (another install,\nanother build cache, another dev server) and isolation just moves the\ncollision to merge time. Those costs grow with the number of agents; the whole\npoint of a shared checkout is paying for the environment once.\n\n|                                 | Run fewer agents | Worktree per agent          | Quilt                       |\n| ------------------------------- | ---------------- | --------------------------- | --------------------------- |\n| Parallelism                     | capped low       | high                        | high                        |\n| Setup per agent                 | none             | full install/build/env × N  | none (one checkout)         |\n| See each other's in-flight work | n/a              | no                          | yes                         |\n| Collisions                      | avoided by hand  | surface at merge            | prevented, or surfaced live |\n| Clean per-agent commits         | n/a              | after a merge               | yes                         |\n\nWorktrees isolate; they don't coordinate. When agents work the same code at the\nsame time, you usually want them to see each other and account for each other as\nthey go. That is what Quilt does. The two aren't mutually exclusive: worktrees for\nindependent, long-running work, Quilt for agents in the same code at once.\n\n## Using it with agents\n\n`quilt setup` wires the capture hooks and a shared MCP server. On Claude Code the\nhooks let agents use the built-in Edit and Write tools normally while Quilt\nrecords each change's author and blocks a write into code another agent holds,\nwith no protocol for the agent to follow and no setup: each session is named\nautomatically, or carries its own `QUILT_ACTOR` for a stable id. For other\nruntimes, the same capture and prevention is available as MCP tools, with each\nconnection named automatically the same way.\n\nSee [docs/orchestrators.md](docs/orchestrators.md) for Codex, Cursor, Aider, and\nthe difference between process-per-agent and many-agents-in-one-process setups.\n\n## Docs\n\n- [docs/orchestrators.md](docs/orchestrators.md): running a fleet of agents.\n- [docs/reference.md](docs/reference.md): the full command list, how attribution\n  works, and the `.quilt/` state layout.\n- [bench/](bench/): the scenario ladder Quilt is tested against, run with and\n  without Quilt on the same metrics.\n\n## Telemetry\n\nOne anonymous heartbeat per day: quilt version, OS, Node major, random\nlocal id. Nothing else unless you opt in at `quilt setup`, and never code,\npaths, repo or actor names. `quilt telemetry off`, `QUILT_TELEMETRY=0`, or\n`DO_NOT_TRACK=1` silences everything. Details: [docs/reference.md](docs/reference.md).\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\nMIT\n",
  "bytes": 10700,
  "sha": "9a1f425be20ca1a93c94e1f0bb942b788757f9668e0568b3850586396f36836a",
  "repo_slug": "wkoverfield/quilt",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_wkoverfield_quilt_247351b8/readme"
}