agent-merge-conflict-arbiter
ما الذي تفعله
يجعل وكيلًا محايدًا يراجع تغييرات الطرفين وأهدافهما المعلنة لإنتاج نسخة مدمجة. وهي موجهة للفرق التي تشغّل عدة وكلاء ذكاء اصطناعي بالتوازي على مستودع واحد.
متى تستخدمها
- ✓عندما تتعارض فروع وكيلين أثناء حملة متوازية.
- ✓عندما يتوقف دمج git لأن وكيلين عدّلا الشيفرة نفسها.
- ✓عندما لا ينبغي لأي من الوكيلين أن يحسم نتيجة التعارض وحده.
رابط المهارة
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/agent-merge-conflict-arbiter/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“عدّل وكيلان الملفات نفسها وتوقف الدمج. احسم التعارض بحياد وادمج العمل.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يراجع الوكيل فرق الطرفين ونية كل طرف المعلنة، ثم ينتج نسخة مدمجة. ويشغّل بناء المشروع أو اختباراته إن وُجدت.
المحتوى التقني (ملف 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 mergeorgit rebasehalts 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 (
terminalrunninghermes 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 sidegit log --oneline <base>..<side>andgit diff <base>..<side> -- <file>for every conflicted file. In a halted merge,HEADis one side andMERGE_HEADis 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_fileand 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(orwrite_filefor 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
الأسئلة الشائعة
متى لا أستخدمها؟
لتعارضات داخل عمل وكيل واحد، أو للملفات الآلية البسيطة مثل ملفات القفل، والأفضل فيها إعادة توليدها.
ماذا تحتاج لتبدأ؟
مستودع فيه الدمج المتوقف، أو اسما الفرعين، إضافة إلى نية كل طرف من رسائل الإيداع أو ملاحظات طلب السحب.
لماذا وكيل محايد؟
تقول المهارة إن الوكلاء الذين يحلّون التعارضات مع عمل نظيرهم يميلون إلى الكتابة فوق عمله أو إسقاط تغييرهم.
التفاصيل
الوصف الأصلي من المؤلف
Neutral arbiter for merge conflicts between two agents.
الشعبية
- نجوم GitHub
- 260k
- الترتيب
- #438
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
antigravity-cli
260kيرشدك إلى تثبيت أداة سطر أوامر Antigravity وتحديثها واستكشاف أخطائها، بما في ذلك إضافاتها وتسجيل الدخول والبيئة المعزولة.
blackbox
260kيتيح لوكيلك تسليم مهمة برمجة إلى أداة Blackbox AI لسطر الأوامر، التي تشغّل عدة نماذج ذكاء اصطناعي وتختار أفضل نتيجة.
dynamic-workflow
260kيعلّم وكيلك تشغيل مجموعات كبيرة من أعمال متشابهة كسكربت محفوظ، فلا تعود إلى المحادثة الرئيسية إلا النتائج المتحقق منها.
grok
260kيتيح لوكيلك تسليم أعمال البرمجة إلى Grok Build CLI من xAI، لبناء الميزات وإعادة الهيكلة ومراجعة طلبات السحب أو إصلاح دفعات من المشكلات.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.