Agent merge conflict arbiter

From bolone-sengkuni/hermes-brutal-mod · View interactive version

Agent merge conflict arbiter is an AI agent skill from the GitHub repository bolone-sengkuni/hermes-brutal-mod. Neutral arbiter for merge conflicts between two agents.

How to use this skill

Skill file

Agent Merge-Conflict Arbiter

Resolve a git merge conflict between two AGENTS' branches as an impartial third

party. Agents resolving conflicts against a peer's work reliably either

overwrite the peer or abandon their own change — they lack the peer's context

and are biased toward their own side. This skill is the fix: a neutral

reconciler that receives both diffs plus both sides' stated intents and

produces a merged result, like a merge-queue arbiter.

When to Use

engineering pipeline, parallel-PR wave, multi-worktree refactor).

neither original agent should self-adjudicate.

lockfile/generated-file conflicts (regenerate those instead).

Prerequisites

permission to run the merge yourself.

hermes kanban show <task-id>), PR bodies, or at minimum each branch's

commit messages.

How to Run

Standalone — a human (or agent) invokes this skill inside the conflicted

repo: load the skill, then follow the Procedure top to bottom.

Spawned neutral agent — the preferred shape in multi-agent campaigns:

both branch names, and both sides' intent summaries verbatim, plus an

instruction to follow this skill.

(not either worker's profile) with BOTH conflicted cards linked as parents —

`kanban_create(title="reconcile branch-a x branch-b", assignee="reconciler",

parents=["t_a", "t_b"])`. The parent links carry both sides' completion

summaries into the reconciler's context automatically; the card body should

name the repo path and the two branches.

Quick Reference

| Hunk class | Definition | Resolution |

|---|---|---|

| disjoint-intent | The two changes serve different goals and can coexist | Combine both |

| same-question-different-answer | Both sides answered one design question differently | Pick ONE per stated intents; surface the decision |

| superseded | One side's premise no longer holds after the other's change | Keep the surviving side; note why |

Impartiality contract: never favor the side that spawned you; touch ONLY

conflicted regions (no drive-by edits); every design-question pick must appear

explicitly in the hand-back summary.

Procedure

1. Gather both sides

conflicted files), git merge-base <A> <B>, then for each side

git log --oneline <base>..<side> and git diff <base>..<side> -- <file>

for every conflicted file. In a halted merge, HEAD is one side and

MERGE_HEAD is the other.

summaries/metadata, or the PR body, or the commit messages from the log

above. Write down one sentence of intent per side before touching any file.

for every conflicted file.

2. Classify every conflicted hunk

<<<<<<</=======/>>>>>>> block.

by the stated intents — not by which change looks nicer.

that combines cleanly PLUS a styling/rounding choice both sides answered

differently), decompose it into sub-decisions and classify each one.

a neighboring hunk is disjoint. Classify per hunk, not per file.

3. Resolve under the impartiality contract

STATED intents (e.g., an intent of "strict validation" beats "quick

default" if the task required correctness). Never split the difference

into a hybrid neither side asked for.

(block the kanban card / report back) rather than guess.

opportunistic fixes.

resolved file is staged.

4. Verify

touched modules. Both intents must be observable in the merged behavior

(e.g., side A's new semantics AND side B's disjoint addition both present).

listing hunk decisions is fine).

5. Hand back

file:lines — class — which side(s) kept — rationale. For every

same-question-different-answer hunk, state the design question and the

answer you picked so a human can veto it — never bury a design call.

Pitfalls

you are structurally biased — state this and weigh the other side's intent

deliberately. Prefer the third-profile shape so this never arises.

designed; pick one answer and surface it.

whole file as one class silently drops a disjoint change.

original agents.

completion summaries or PR bodies. If neither side's intent is recoverable,

escalate instead of guessing.

a hotspot signal, not routine reconciliation work — flag it (e.g. a

hotspot: <path> — <reason> kanban comment) so the orchestrator decomposes

that file, rather than serially reconciling every new collision on it.

Verification

dropped one is explicitly named in the summary.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.