What do you want to do?
4 use cases
-
Catch conflicting agent plans before code is written
Publish each agent's planned symbol changes and get a conflict warning before either agent edits files.
- Foremerge
- Claude Code
- Codex
- Cursor
- Software and DevOps
- Intermediate
View prompt
In the <repo path> repository, register two agents with --no-worktree and publish intents that declare the same symbol:<target> scope with different operations. Expected output: a non-empty conflicts list in the second publish result with severity, explanation, and suggestion. Verify that the conflicts array is not empty before you report that the plans clash.
-
Set up Foremerge for a repo's coding agents
Install Foremerge, initialize the repo, and wire up every agent client you use in one pass.
- Foremerge
- Claude Code
- Codex
- Cursor
- Software and DevOps
- Intermediate
View prompt
In the <repo path> repository, install Foremerge, run `foremerge init`, then run `foremerge setup all` and `foremerge doctor --client all`. Expected output: a per-client result from setup and a doctor report. Verify that setup exited with status zero, since the README says it exits nonzero if any client failed.
-
Claim a code area so other agents see ownership
Mark which agent is working on a symbol, with an advisory lease that never blocks anyone.
- Foremerge
- Software and DevOps
- Intermediate
View prompt
In the <repo path> repository, have two registered agents claim symbol:<target> with separate intents and reasons. Expected output: both claims succeed and the second response includes an overlap warning. Verify that advisory_only is true in the claim data before you tell anyone the scope is owned.
-
Gate agent handoffs on a test command Foremerge runs
Register a trusted check so work counts as done only after Foremerge runs it itself.
- Foremerge
- Software and DevOps
- Intermediate
View prompt
In the <repo path> repository, register one check with `foremerge checks set` using the repository's real test command, then run `foremerge doctor`. Expected output: a doctor report stating whether the check can run in this worktree. Verify that the check does not always pass before you rely on it as a gate.
How to use Foremerge
- Check you have what it needs: Git and jq installed; macOS or Linux, or the Windows binaries from the releases page; A Git repository to coordinate, with at least one coding agent or a shell to act as one.
- Open naw103/foremerge on GitHub and read the README and license.
- Register each agent with
foremerge --json agent register --name stripe-agent --no-worktreeand note the returned id. (inferred, check the README) - Publish the first plan with
foremerge --json intent publish --agent "$STRIPE_AGENT" --task "modernize-payments" --summary "Replace PaymentService with StripePaymentService" --scope symbol:PaymentService=replace. (inferred, check the README) - Register a second agent and publish its plan with
--scope symbol:PaymentService=extend. - Read the findings with
jq '.data.conflicts[] | {kind, severity, scope, explanation, suggestion}'on the second publish result.
These steps come from our top use case, Catch conflicting agent plans before code is written, which also has a copy-paste agent prompt.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeForemerge alternatives · Best AI repos for Software and DevOps
About this repo
- Who it is forDevelopers who run several AI coding agents, such as Claude Code, Codex, or Cursor, on one Git repository and want to catch clashing plans before any code is written.
- Why it is hot
- LanguageRust
- Sourcegithub.com/naw103/foremerge · Back to Hot repos
Requirements
- Git and jq installed
- macOS or Linux, or the Windows binaries from the releases page
- A Git repository to coordinate, with at least one coding agent or a shell to act as one
- Rust 1.85+ only if you build from source
Maintain Foremerge? Add the Featured on Deduped badge
Paste this into your README:
[](https://dedupedai.com/use-cases/naw103-foremerge/?ref=badge)
Questions about Foremerge
What is Foremerge?
Foremerge is an open-source Rust coordination protocol that lets coding agents announce planned changes, see overlapping plans, and share claims and verification results above Git. It is an open-source project on GitHub: https://github.com/naw103/foremerge.
Who is Foremerge for?
Developers who run several AI coding agents, such as Claude Code, Codex, or Cursor, on one Git repository and want to catch clashing plans before any code is written.
What can I do with Foremerge?
4 use cases so far, for example: Catch conflicting agent plans before code is written; Set up Foremerge for a repo's coding agents; Claim a code area so other agents see ownership. Each has steps and a copy-paste agent prompt.
What do I need to run Foremerge?
Git and jq installed; macOS or Linux, or the Windows binaries from the releases page; A Git repository to coordinate, with at least one coding agent or a shell to act as one; Rust 1.85+ only if you build from source.
What are alternatives to Foremerge?
Other hot AI repos in Software and DevOps: Harness2, iFixAi, Orca, Diagram Design, AI Memory.
Is Foremerge safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.