# Foremerge: AI Coordination Protocol for Coding Agents

> Foremerge detects intent conflicts before code changes with open-source coordination protocol.
- Title: Foremerge: AI Coordination Protocol for Coding Agents · GitHub
- Summary: Foremerge detects intent conflicts before code changes with open-source coordination protocol. Foremerge is an open-source protocol that helps AI coding…
- Keywords: foremerge, coding, agents, git, semantic, conflict, coordination, open-source, mcp, worktree, change-set, Protocol
- Source: GitHub — https://github.com/naw103/foremerge
- Read time: 1 min
- Topics: foremerge, ai, coding, agents, git, semantic, conflict, coordination, open-source, mcp, worktree, change-set
## What is Foremerge
Foremerge is the open-source coordination protocol for coding agents built above Git.
## How it works
Agents keep isolated worktrees while sharing intent, semantic claims, dependencies, provisional ChangeSets, decisions, validation, and provenance.
## Conflict detection
Foremerge detects intent conflicts before code changes by comparing semantic scopes.
## Example conflict
Agent A replaces PaymentService with StripePaymentService while Agent B adds PayPal support to PaymentService.
## Conflict resolution
Foremerge names conflicting agents, explains why plans clash, and suggests splitting work without code changes.
## Status
Foremerge 0.5.0 is a pre-1.0 local-first MVP with CLI, JSON API, MCP server, SQLite store, and deterministic conflict detector.
## Quickstart
Install Foremerge with curl, initialize, wire clients, set checks, and confirm with foremerge doctor.
## How it fits above Git
Foremerge resolves Git common directory and stores coordination state in SQLite under .git.
## Semantic workflow
Agents publish intent, claim scopes, start implementation, validate, and commit changes through Foremerge.
## ChangeSets and validation
ChangeSets capture agent/model, task, intent, affected files, dependencies, and Git ref for validation.
## Agent clients
Foremerge supports Codex, Claude Code, and Cursor clients with native MCP integration.
## MCP setup
MCP handles agent registration, intent publishing, conflict resolution, and work tracking.
## Local JSON API
Foremerge provides authenticated HTTP API for client interactions with loopback binding.
## What it does not do
Foremerge does not lock files, block agents, replace code review, or handle distributed consensus.
## Limitations
The MVP does not replicate SQLite across machines, has no published benchmarks, and lacks distributed safety.
## What happens next
Foremerge aims to detect intent conflicts before code changes with open-source coordination.
## Key takeaway

Foremerge is an open-source protocol that helps AI coding agents detect semantic conflicts before they cause code issues.