← all repositories
naw103/foremerge

Git can't see when AI agents undo each other's work

An open-source coordination layer above Git that catches semantic intent conflicts between coding agents before they write a single line of code.

★503 stars Rust Coding AssistantsAgents
foremerge
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does Foremerge runs as a local-first CLI and MCP server that sits above a Git repository. Each agent registers its isolated worktree and publishes semantic intent—such as replacing or extending a specific symbol—into a shared SQLite database stored inside the project’s .git directory. Before any file changes, a deterministic conflict detector compares these declarations and raises advisories when plans collide.

The interesting bit The system deliberately refuses to lock files or block agents, because a single crashed agent would otherwise stall the whole fleet; instead it treats conflicts as advisory evidence that humans or agents must assess. It also never asks a model to judge conflicts, so identical inputs always yield identical outputs, keeping the audit trail deterministic and explainable.

Key highlights

  • Detects semantic conflicts—like replacing versus extending the same class—before any code is written, even when edits land in entirely different files.
  • Stores coordination state in a SQLite database inside .git, so every local agent sees the same picture without network round-trips.
  • Ships with an MCP server and native skills for Claude Code, Codex, and Cursor, wiring agents into the protocol automatically.
  • Verification-gated lifecycle: agents can request acceptance, but Foremerge runs the registered check itself rather than trusting an agent’s word.
  • Deterministic conflict detection based on declared operations (replace, extend, etc.) rather than natural-language summaries, so phrasing differences do not change the verdict.

Caveats

  • The project is explicitly pre-1.0 (version 0.5.0), and public schemas may still change.
  • Coordination between machines is outside the current scope; it is strictly local-first for now.
  • Published benchmark results do not yet exist.

Verdict Worth exploring if you are already running multiple AI agents against the same repository and have hit silent integration failures. Skip it if you are looking for distributed, cross-machine agent orchestration or a mature, frozen protocol.

Frequently asked

What is naw103/foremerge?
An open-source coordination layer above Git that catches semantic intent conflicts between coding agents before they write a single line of code.
Is foremerge open source?
Yes — naw103/foremerge is open source, released under the Apache-2.0 license.
What language is foremerge written in?
naw103/foremerge is primarily written in Rust.
How popular is foremerge?
naw103/foremerge has 503 stars on GitHub.
Where can I find foremerge?
naw103/foremerge is on GitHub at https://github.com/naw103/foremerge.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.