Lanekeeper

v0.4.0
io.github.UpwanSingh/lanekeeper Checked 2 hours ago Published 10 hours ago

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

Website · Quick start · Rules · Docs · Blog · npm Without Node, curl -fsSL https://lanekeeper.dev/install | sh installs the signed single-file binary for macOS, Linux or Windows from the latest release. 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.

Summary extracted from the README.

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.

Lanekeeper in a terminal: lk status shows a high R2 SIGNATURE_BREAK clash between lanes moscow and berlin over login(), and lk explain gives the new signature and what to do

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

Rule Name When Severity
R1 SAME_SYMBOL Both lanes change the same function, class or type in different ways high or warn
R2 SIGNATURE_BREAK One lane changes a signature while another adds a call in the old form high or warn
R3 REMOVED_DEPENDENCY One lane removes or renames something another lane starts using high
R4 TEXT_OVERLAP Both lanes edit the same lines, confirmed with an in-memory git merge high or warn
R5 CLAIM_CONFLICT A lane edits code another lane has claimed for a refactor high or warn
R6 TYPE_SHAPE_CHANGE One lane changes the shape of a type another lane starts using warn
R7 MIGRATION_COLLISION Both lanes add migrations with the same number, or interleaved on one table high or warn
R8 DEPENDENCY_DIVERGENCE Both lanes change the same dependency to different versions, or a lockfile warn
R9 ROUTE_OR_ENV_COLLISION Both lanes add the same route, or the same env variable with different values warn
R10 COMBINED_FAILURE Two pull requests build and test fine alone but fail together high

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

Agent How
Claude Code Hooks before and after every edit, or the plugin. Session briefs on start.
Cursor Hooks on writes, the MCP server, and a project rule.
Codex Hooks on its apply_patch edits, the MCP server, and an AGENTS.md section.
GitHub An 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

Path What
packages/cli The lanekeeper / lk command, published to npm
packages/daemon, packages/hooks, packages/mcp The local daemon, agent hooks and MCP server
packages/analysis, packages/rules, packages/protocol Parsing, the clash rules and shared types
packages/action The GitHub Action
apps/cloud, apps/server, apps/dashboard Team sync: Cloudflare Worker, self-hosted server, dashboard
apps/web lanekeeper.dev
bench The 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.