Repository avatar
Version Control
v0.2.2
active

lanekeeper

io.github.UpwanSingh/lanekeeper

Warns parallel AI coding agents when their changes in other git worktrees would break each other.

Documentation

Lanekeeper

Keeps every AI coding agent in its lane. Lanekeeper detects when parallel AI coding agents' changes collide, warns them before they write code that breaks another lane, and checks their pull requests together in CI. The analysis runs on your machine; your source code never leaves it.

Website · Quick start · Rules · Docs · Blog · npm

npm i -g lanekeeper    # or: brew install upwansingh/tap/lanekeeper
lk init

Without Node, curl -fsSL https://lanekeeper.dev/install | sh installs the signed single-file binary for macOS, Linux or Windows from the latest release.

The problem

Claude works in one git worktree and adds an option to login(). Cursor works in another and writes a report that calls login(admin). Each passes its own tests. Git merges them without a conflict, because they touched different files. The build on main fails.

Git compares lines, CI tests each branch alone, and the agents can't see each other. Nothing checks the combination before it lands.

How it works

  1. It sees every lane. Each git worktree or branch an agent works in is a lane. A small local daemon watches all of them, including uncommitted changes.
  2. It maps changes to code. Changes are read as functions, classes, types, routes, migrations and dependencies, not just lines. TypeScript, JavaScript and Python in depth; Go, Rust, Java, Kotlin, Swift, Ruby, C# and PHP by name.
  3. It tells the agent while it works. Claude Code hooks, Cursor hooks and an MCP server put the clash in front of the agent right after the edit, with the other lane's new signature and what to do. In block mode the breaking edit is refused before it is written.
  4. It checks pull requests together. The GitHub Action compares each pull request with the other open ones, confirms real conflicts with an in-memory merge, suggests a merge order, and, given your build and test commands, builds the risky pairs together.

Detection is deterministic: the same changes always give the same clashes. Lanekeeper doesn't call a language model.

What it catches

RuleNameWhenSeverity
R1SAME_SYMBOLBoth lanes change the same function, class or type in different wayshigh or warn
R2SIGNATURE_BREAKOne lane changes a signature while another adds a call in the old formhigh or warn
R3REMOVED_DEPENDENCYOne lane removes or renames something another lane starts usinghigh
R4TEXT_OVERLAPBoth lanes edit the same lines, confirmed with an in-memory git mergehigh or warn
R5CLAIM_CONFLICTA lane edits code another lane has claimed for a refactorhigh or warn
R6TYPE_SHAPE_CHANGEOne lane changes the shape of a type another lane starts usingwarn
R7MIGRATION_COLLISIONBoth lanes add migrations with the same number, or interleaved on one tablehigh or warn
R8DEPENDENCY_DIVERGENCEBoth lanes change the same dependency to different versions, or a lockfilewarn
R9ROUTE_OR_ENV_COLLISIONBoth lanes add the same route, or the same env variable with different valueswarn
R10COMBINED_FAILURETwo pull requests build and test fine alone but fail togetherhigh

The rules are measured on 187 clash scenarios, 33 of them derived from real changes in open-source projects (FastAPI, Requests, Hono, Express, Zod and others). pnpm bench writes the report to bench/REPORT.md. Every rule, with examples: lanekeeper.dev/docs/rules.

Works with

AgentHow
Claude CodeHooks before and after every edit, or the plugin. Session briefs on start.
CursorHooks on writes, the MCP server, and a project rule.
CodexThe MCP server and an AGENTS.md section.
GitHubAn Action that comments, annotates, and fails a pull request that breaks another.

The Claude Code plugin installs from this repository: /plugin install lanekeeper --marketplace UpwanSingh/lanekeeper (Claude Code 2.1.275 or later; on older versions, /plugin marketplace add UpwanSingh/lanekeeper, then /plugin install lanekeeper@lanekeeper). The MCP server is lanekeeper mcp, listed in the MCP Registry as io.github.UpwanSingh/lanekeeper.

Your code stays on your machine

Source code, diffs, file contents and your agents' prompts never leave your machine or your CI. Team sync, if you turn it on, sends symbol names, file paths, content hashes and clash records, never source. Lanekeeper never changes your git index, stash, refs or config. Details: Privacy and data.

Pricing

Everything that runs on one machine is free, and so is the Action on public repositories. Team sync between machines will be a paid plan; the hosted service isn't open yet. See pricing.

Repository layout

PathWhat
packages/cliThe lanekeeper / lk command, published to npm
packages/daemon, packages/hooks, packages/mcpThe local daemon, agent hooks and MCP server
packages/analysis, packages/rules, packages/protocolParsing, the clash rules and shared types
packages/actionThe GitHub Action
apps/cloud, apps/server, apps/dashboardTeam sync: Cloudflare Worker, self-hosted server, dashboard
apps/weblanekeeper.dev
benchThe accuracy benchmark

Development: pnpm i, then pnpm check (lint, typecheck and tests) and pnpm bench.

License

Lanekeeper is open core. Everything you run on your own machine and in your CI is open source under the Apache License 2.0: the CLI, daemon, hooks, MCP server, GitHub Action, the analysis and rules, and the benchmark. The team service is proprietary and source-available: packages/room, packages/ui, apps/cloud, apps/server, apps/dashboard and apps/web each carry their own LICENSE. Running them, including self-hosting, needs a separate agreement (sales@lanekeeper.dev). NOTICE lists which directories are open source and which are proprietary.

Security

Report vulnerabilities to security@lanekeeper.dev or through GitHub private vulnerability reporting. See lanekeeper.dev/security.

NPM
lanekeeper
Install Command
npm install lanekeeper
Runtime: npx