Help us improve
Share bugs, ideas, or general feedback.
Wit — Agent Coordination Protocol. Prevents merge conflicts when multiple AI agents work on the same codebase.
npx claudepluginhub amaar-mc/witCoordinate multiple AI agents working on the same codebase. Prevents merge conflicts before code is written.
Share bugs, ideas, or general feedback.
Agent coordination protocol for shared codebases
Declare intents. Lock symbols. Detect conflicts. Before code is written.
Wit coordinates multiple AI coding agents working on the same repository simultaneously. It sits between your agents and git — git handles version control, Wit prevents the conflicts.
The name comes from the word itself: the intelligence to coordinate before colliding. It also stands for Workspace Intent Tracker.
You have three Claude Code instances (or Cursor, Copilot, Devin — any combination) working on the same repo. Without coordination, they each write code independently and produce merge conflicts that waste time and break work.
Git detects conflicts after they happen. Wit prevents them before code is written.
Wit runs a lightweight daemon in the background. Agents communicate with it over a Unix socket using JSON-RPC. The daemon tracks four things:
| Primitive | What it does | Example |
|---|---|---|
| Intents | Agent announces planned work scope | "I'm refactoring the auth module" |
| Locks | Agent reserves a specific function/type/class | Lock src/auth.ts:validateToken |
| Conflicts | Daemon warns when intents or locks overlap | "Agent B also declared intent on auth.ts" |
| Contracts | Agents agree on function signatures | "validateToken accepts string, returns boolean" |
Intents and locks are warnings, not blocks. Agents always get to decide what to do. The only hard enforcement is contracts — a git pre-commit hook blocks commits that violate an accepted contract signature.
Wit requires Bun (v1.0+). It uses Bun-native APIs for the daemon, SQLite, and process management. Install Bun if you don't have it:
curl -fsSL https://bun.sh/install | bash
From npm:
bun install -g wit-protocol
From source:
git clone https://github.com/amaar-mc/wit.git
cd wit
bun install
bun link
After either method, the wit command is available globally.
cd your-project
wit init
This creates a .wit/ directory, starts the daemon, and generates a CLAUDE.md with coordination instructions. You only run this once per project — the daemon auto-starts on subsequent commands.
Every Claude Code session in this project will now automatically read the CLAUDE.md and follow the coordination protocol. Agents declare intents, lock symbols, and respect conflicts without any manual setup.
# See what's happening
wit status
# Declare intent before working
wit declare --description "Adding rate limiting to API" --files src/api.ts --files src/middleware.ts
# Lock a specific function you're about to modify
wit lock --symbol "src/api.ts:handleRequest"
# Check status — your intent and lock are visible to all agents
wit status
# Release when done
wit release --symbol "src/api.ts:handleRequest"
# Watch live updates (like htop for coordination)
wit watch
When Agent B tries to work in an area Agent A has claimed:
# Agent B declares intent on the same file
$ wit declare --description "Fixing auth bug" --files src/api.ts
# Response includes conflict warning:
# {
# "intentId": "abc-123",
# "conflicts": {
# "hasConflicts": true,
# "items": [{
# "type": "INTENT_OVERLAP",
# "message": "Agent A has active intent on src/api.ts"
# }]
# }
# }
Agent B sees the warning, checks what Agent A is doing, and chooses to work on a different part of the codebase.
Wit ships as a Claude Code plugin. Once installed, agents automatically declare intents and lock symbols before editing — no manual configuration.
Step 1: Add the Wit marketplace (one-time)
/plugin marketplace add amaar-mc/wit
Step 2: Install the plugin
/plugin install wit@amaar-mc-wit
Step 3: Make sure the CLI is installed (see Install the CLI above)