本文へスキップ
Skillpedia
一般的なプログラミング260k · #438

agent-merge-conflict-arbiter

できること

このスキルは、中立のエージェントに両側の変更と、それぞれの目的を確認させて、マージされた結果を作らせます。1つのリポジトリで複数のAIエージェントを並行して動かしているチームのためのものです。

使う場面

  • ✓並行キャンペーン中に、2つのエージェントのブランチが競合したとき。
  • ✓2つのエージェントが同じコードを変更したため、gitのマージが止まったとき。
  • ✓競合の結果を、どちらのエージェントも単独で決めるべきではないとき。

スキルのリンク

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/agent-merge-conflict-arbiter/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/agent-merge-conflict-arbiter/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“2つのエージェントが同じファイルを編集し、マージが止まりました。競合を中立的に解決して、作業をマージしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは両方のdiffと、各側が述べた意図を確認し、マージされたバージョンを作ります。プロジェクトにビルドやテストがあれば、それも実行します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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

  • Two agent branches/worktrees collide during a parallel campaign (kanban engineering pipeline, parallel-PR wave, multi-worktree refactor).
  • git merge or git rebase halts on conflicts between two agents' work and neither original agent should self-adjudicate.
  • Do NOT use for conflicts within a single agent's own work, or for trivial lockfile/generated-file conflicts (regenerate those instead).

Prerequisites

  • A repo checkout containing the halted merge, or the two branch names plus permission to run the merge yourself.
  • Both sides' intent sources: kanban completion summaries (terminal running hermes kanban show <task-id>), PR bodies, or at minimum each branch's commit messages.
  • The project's build/test command, if one exists.

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:

  • delegate_task: spawn a subagent whose task message contains the repo path, both branch names, and both sides' intent summaries verbatim, plus an instruction to follow this skill.
  • Kanban-native: create a reconciliation card assigned to a third profile (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

  • Run via terminal: git status (confirm the conflicted state and list 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.
  • Collect each side's intent: hermes kanban show <task-id> for completion 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.
  • Done when: you can state both intents in your own words and have both diffs for every conflicted file.

2. Classify every conflicted hunk

  • Open each conflicted file with read_file and locate each <<<<<<</=======/>>>>>>> block.
  • Assign each hunk exactly one class from the Quick Reference table, judging by the stated intents — not by which change looks nicer.
  • If a single hunk contains multiple independent decisions (e.g., new logic that combines cleanly PLUS a styling/rounding choice both sides answered differently), decompose it into sub-decisions and classify each one.
  • A single file often mixes classes: one hunk may be a design collision while a neighboring hunk is disjoint. Classify per hunk, not per file.
  • Done when: every hunk has a written class and a one-line rationale.

3. Resolve under the impartiality contract

  • Edit each hunk with patch (or write_file for whole-file rewrites):
    • disjoint-intent → merge both changes so each intent is fully served.
    • same-question-different-answer → pick the answer that best serves the STATED intents (e.g., an intent of "strict validation" beats "quick default" if the task required correctness). Ne
よくある質問

いつ使うべきではありませんか?

1つのエージェントの自分の作業内の競合や、ロックファイルのような些細な生成ファイルには使いません。後者は再生成すべきです。

開始するには何が必要ですか?

止まったマージのあるリポジトリ、または2つのブランチ名と、コミットメッセージやプルリクエストのメモから得た各側の意図が必要です。

なぜ中立のエージェントを使うのですか?

スキルは、同僚のエージェントの作業を解決するエージェントは、相手を上書きしたり、自分の変更を落としたりしがちだと述べています。

詳細

作者による元の説明

Neutral arbiter for merge conflicts between two agents.

repo: NousResearch/hermes-agent

人気

GitHubのスター
260k
ランキング
#438
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル