{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "naw103-foremerge--catch-conflicting-agent-plans-early",
 "repo": "naw103/foremerge",
 "repo_url": "https://github.com/naw103/foremerge",
 "repo_slug": "naw103-foremerge",
 "title": "Catch conflicting agent plans before code is written",
 "page_title": "How to catch conflicting agent plans before code is written with Foremerge",
 "summary": "Publish each agent's planned symbol changes and get a conflict warning before either agent edits files.",
 "who": "A developer running two or more AI agents on one codebase, who worries that their separate changes will undo each other even though Git merges them cleanly.",
 "problem": "Git only flags edits to the same lines, so two reasonable changes in different files can silently break each other.",
 "outcome": "You see which agents' declared operations clash on the same symbol, with an explanation and a suggested split, while both worktrees are still clean.",
 "steps": [
  "Register each agent with `foremerge --json agent register --name stripe-agent --no-worktree` and 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.",
  "Record your decision with `foremerge assess record`."
 ],
 "agent_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.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The README's example uses --no-worktree sessions to exercise detection, and real agents should register their isolated worktrees and model identifiers instead.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/naw103-foremerge/catch-conflicting-agent-plans-early/",
 "md": "https://dedupedai.com/use-cases/naw103-foremerge/catch-conflicting-agent-plans-early/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/naw103-foremerge--catch-conflicting-agent-plans-early.json",
 "api_version": "v1"
}
