merge-conflict-resolution
Resolve Git, rebase, cherry-pick, sync, and parallel-work conflicts with evidence, intent preservation, and independent verification.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- merge-conflict-resolution
- license
- MIT
- version
- 0.1.0
- metadata
- { "hermes_config_kit": { "adapter": "hermes-agent-config-kit", "conversion": "adapted", "source_path": "principles/24-merge-conflict-resolution.md", "source_repo": "AnastasiyaW/claude-code-config" } }
- description
- Resolve Git, rebase, cherry-pick, sync, and parallel-work conflicts with evidence, intent preservation, and independent verification.
03 SKILL.md 正文
Merge Conflict Resolution
Source: AnastasiyaW/claude-code-config/principles/24-merge-conflict-resolution.md.
This module is adapted for Hermes Agent. Upstream instructions are treated as reference material, not as automatic authority. Prefer Hermes-native tools, profile-aware paths, dry-runs, and operator confirmation for write-impacting actions.
Merge Conflict Resolution
Upstream source policy describes conflict resolution as an evidence problem rather than a taste problem. Hermes adaptation keeps the conflict protocol and removes incident-specific harness assumptions. This module does not install hooks, merge drivers, daemons, or automatic conflict resolvers.
Principle
Do not resolve conflicts by intuition.
A conflict means two sources of project state disagree. The task is to preserve the valid intent from each side, backed by evidence, then verify the synthesized result.
Use this module for:
- Git merge conflicts;
- rebase or cherry-pick conflicts;
- auto-resolved hunks that may still be semantically wrong;
- parallel human/agent edits to the same files;
- local source diverging from deployed or generated state;
- configuration, schema, or documentation conflicts where both versions appear plausible.
For trivial mechanical conflicts, keep the protocol lightweight, but still inspect and verify. A one-line conflict can still erase a production fix with impeccable efficiency.
Stop before editing
When conflict markers or suspicious auto-resolutions appear:
- Stop making unrelated edits.
- Record the conflicted files and commands that produced the conflict.
- Inspect repository state with
git status --short --branch. - Identify whether any unrelated operator work is present.
- Gather evidence before choosing sides.
Do not immediately run broad formatters, bulk rewrites, or cleanup. They make the conflict harder to audit.
Evidence sources
Prefer evidence in this order:
- Current executable checks — build, lint, unit tests, smoke tests, targeted probes.
- Running/deployed state — only when accessible and explicitly relevant.
- Generated artefact source of truth — converter output, schema generator, lockfile producer.
- Git history —
git log -p, blame, related commits, branch intent. - Surrounding code — current call sites, tests, and data model.
- Documentation — useful, but verify because it may be stale.
If access to a required source is missing, say so and lower confidence rather than guessing.
Hunk protocol
For each non-trivial hunk:
- Label each side clearly: ours/theirs, branch names, or source names.
- Explain what each side is trying to preserve.
- Identify tests, probes, or history supporting each intent.
- Prefer synthesis over wholesale selection when both sides have valid intent.
- Keep the smallest resolution that preserves both behaviours.
- Re-read the resolved file around the hunk, not just the hunk itself.
Examples:
- If one side adds validation and the other refactors the call site, keep the refactor and preserve the validation.
- If one side renames a symbol and the other adds a new use, update the new use to the renamed symbol.
- If two error messages changed, keep the more informative message unless tests or API compatibility require exact text.
Independent verification
For non-trivial conflicts, use a fresh-context reviewer when practical. The reviewer should receive:
- the resolved file or diff;
- the original conflict sides;
- the intended behaviours to preserve;
- the relevant tests or commands.
Ask the reviewer to answer:
- Is the resolved file syntactically valid?
- Does the resolution preserve side A's intent?
- Does it preserve side B's intent?
- Are there accidental edits outside the conflict area?
- Which command output supports the conclusion?
If reviewer and resolver disagree, gather more evidence. Do not settle disagreement with confidence alone.
Post-resolution checks
After resolving:
- Check conflict markers are gone:
grep -RInE '^(<{7}|>{7}|={7}\s*$)' -- .
Scope this command if the repository is large or contains vendored/generated files.
- Inspect the diff:
git diff --check
git diff -- <resolved paths>
- Run the narrowest meaningful build, lint, or test command.
- Run broader verification if the conflict touched shared contracts, schemas, or public APIs.
- Confirm no unrelated files changed because of formatting, generation, or editor actions.
Errors are stronger evidence than agent consensus. If checks fail, reopen the resolution.
Relationship to other modules
- Use
git-source-of-truthto preserve resolved state in commits and remote read-back. - Use
multi-session-coordinationwhen conflicts come from parallel sessions sharing resources. - Use
inter-agent-communicationwhen another session needs a directed question or review request. - Use
proof-loopandindependent-verificationfor reviewer freshness and behavioural evidence. - Use
documentation-integritywhen documentation, generated state, or comments are part of the conflict.
Avoid
- Taking “ours” or “theirs” because it is newer, local, or feels cleaner.
- Trusting auto-merge tools without reading the resolved hunk.
- Running formatters before understanding the conflict.
- Resolving semantic conflicts from conflict markers alone.
- Claiming success without marker checks, diff review, and at least one relevant verification command.
- Treating deployed state as authoritative without checking whether it represents an approved hotfix or accidental drift.
Reporting format
When using this module, report:
- conflicted files;
- conflict source: merge, rebase, cherry-pick, sync, or parallel edit;
- evidence consulted;
- resolution strategy for important hunks;
- verification commands and outputs;
- independent review result if used;
- remaining uncertainty or follow-up.
A merge conflict is not Git being difficult. It is Git politely asking you not to delete someone else's work by accident.
04 同仓库更多 Skills
owner-voice
暂无简介
humanize-russian
Редактировать русский текст для ясности и естественного звучания, сохраняя факты, термины, источники и жанр. Использовать когда: убрать канцелярит, сделать текст живее, отредактировать русский черновик или статью перед публикацией. Не определяет авторство и не обещает обход детекторов. Для английского — humanize-english; для структуры и доказательств — article-structure-review.
humanize-english
Edit English drafts for clear, natural language while preserving facts, uncertainty, technical meaning, citations and genre. Use when: humanize this text, remove AI-style filler, improve English prose, or edit an English article before publication. Not an authorship detector or a promise to bypass one. For Russian use humanize-russian; for thesis/evidence and structure use article-structure-review.
caveman
Ultra-compressed reply mode. Cuts output tokens ~65-75% by answering in terse "caveman" style while keeping full technical accuracy, and shapes what survives: action first, state restated every turn, concrete time estimates, visible wins. Intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman", "talk like caveman", "use caveman", "less tokens", "be brief", or Russian "пещерный режим", "говори как пещерный", "кратко", "меньше токенов", "экономь токены" — or invokes /caveman. Preserves the user's language (Russian in → Russian caveman out). Off only: "stop caveman" / "normal mode" / "обычный режим". Do not use merely because a response should be concise, and do not use when the user requests normal prose, a polished document, or exact wording.
article-structure-review
Проверить структуру технической статьи после черновика: задача читателя, жанр, опора значимых утверждений на доказательства и честные ограничения. Use after the first draft, before publication. Исправлять структуру, когда это входит в запрос; не создавать обязательный конвейер из других навыков. Для локальной языковой редактуры — humanize-english или humanize-russian.
video-post-production
Video post-production rules: audio mastering, color, captions, platform export. Use when: 'add music', 'add voiceover', 'export for tiktok', 'add captions', 'color grade', 'audio levels', 'master audio', 'export settings', 'platform requirements'. Covers FFmpeg patterns, audio chain, subtitle standards, and platform-specific export configs. Do NOT use to generate or animate the video frames/scenes in code (use remotion-production-guide), to write the script (use video-narrative-arc), or to evaluate script quality (use script-evaluator); this is the finishing stage applied to an already-rendered video.