merge-conflict-discipline
Skill0 starsChanged 8 days agoMITView on GitHub
Resolve merge conflicts by intent (never blind accept-ours/theirs) AND prevent them structurally — integrate, never clobber.
In this repository108 other files it gives its agents.
- adaptive-estimationSkill
- adaptive-loop-budgetingSkill
- adopt-and-deleteSkill
- adversarial-reviewSkill
- agent-drives-uiSkill
- agentic-coding-loopSkill
- agent-otel-trajectorySkill
- agents-as-iac-modulesSkill
- ascii-ui-mockupsSkill
- authoring-html-emailSkill
- authoring-skills-vs-mcpSkill
- batched-ssh-enumerationSkill
- c4-architectureSkill
- challenge-the-premiseSkill
- codegraph-bootstrapSkill
- codegraph-worktree-startupSkill
- colocated-pod-tolerationsSkill
- command-creatorSkill
- complexity-budgetsSkill
- connector-readinessSkill
- context-anchored-patchingSkill
- continuous-issue-resolutionSkill
- credential-proxySkill
- criticality-tiered-reportingSkill
- data-connector-buildingSkill
- declarative-firstSkill
- disk-pressure-forensicsSkill
- early-return-over-elseSkill
- email-triageSkill
- enums-codify-behaviorSkill
- ephemeral-workspace-lifecycleSkill
- event-sourcingSkill
- evidence-claim-boundariesSkill
- exhaustive-matchSkill
- feature-coverage-not-just-line-coverageSkill
- full-disk-forensicsSkill
- gate-before-pushSkill
- github-pr-shepherdingSkill
- graceful-shutdown-stateful-agentsSkill
- grounded-generationSkill
- iac-incident-responseSkill
- iac-not-ad-hocSkill
- instrumented-service-scaffoldSkill
- interface-over-conditionalsSkill
- knowledge-routingSkill
- lean-on-oss-standardsSkill
- live-money-disciplineSkill
- live-state-verificationSkill
- loop-governance-and-learningSkill
- low-level-executor-task-specSkill
- map-dispatch-over-conditionalsSkill
- mermaid-diagramsSkill
- oke-arc-runners-opentofuSkill
- orchestrate-agySkill
- orchestrate-claudeSkill
- orchestrate-codexSkill
- orchestrate-geminiSkill
- otel-emit-at-willSkill
- parameter-designSkill
- parse-dont-validateSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
They updated it differently from you: ask the same *why*; reconcile by INTENT — combine both where compatible.
- Distinctive: line 27
If you keep hitting real overlap, ask: are we not using best practices — a consistent formatter?
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
merge-conflict-discipline
The core rule: respect every change up to this point WHILE contributing your own — integrate, never clobber. Blind accept-ours/accept-theirs is almost always wrong; it silently discards someone's intent. Deep thought is required only on LEGIT overlap (both sides touched the same thing for incompatible reasons).
This skill has two halves: resolution (a conflict is here now) and prevention (stop them recurring).
PART A — RESOLUTION (semantic, intent-first)
- Understand the intent of BOTH sides first. Hardest when you authored neither. Use the 3-way view — ours / theirs / common ANCESTOR (
git config merge.conflictstyle zdiff3). Get the why: read the commit message, PR, issue, and author for the other side. "Get more context into why they deleted it" before you re-add it. - Clean text merge ≠ correct merge. Git cannot detect a SEMANTIC conflict — when one branch's intent isn't applied to lines the other branch added. A textually clean merge can be logically broken. Resolution always ends by re-running build + the full test suite. "It merged cleanly" is not done.
- Decision frameworks for legit overlap:
- They deleted what you meant to change (it's gone in latest): find out WHY it was deleted; confirm retaining it isn't at odds with the platform/north-star direction; then re-add, adapt, or drop your change. Default to the platform direction over local intent.
- They updated it differently from you: ask the same why; reconcile by INTENT — combine both where compatible; if truly mutually exclusive, pick the one serving the north-star. Then ask the prevention question: why did we collide here at all?
- Both added independent edits (the classic third case): standard 3-way integrate-both.
- Feed conflicts back into prevention. A conflict CLASS that recurs is a signal, not bad luck — add a prevention control (below) so it can't recur (regression-ratchet discipline).
PART B — PREVENTION (legit overlap is usually a design/hygiene smell)
If you keep hitting real overlap, ask: are we not using best practices — a consistent formatter? canonical sorting? leaning on open source enough?
- Deterministic formatters, fleet-wide (prettier / gofmt / ruff / black / buildifier / …): canonical layout → minimal diffs → fewer collisions. Enforce as a REQUIRED CI check so every PR arrives pre-canonicalized.
- Canonical / alphabetical sorting of imports, deps, enums, lists, config keys. Combine with one-item-per-line + a magic trailing comma so additions are appends, not line-edits two people fight over.
- Custom merge drivers via
.gitattributesfor trivial/generated classes (lockfiles: pnpm/poetry/composer, generated code) → auto-resolve the busywork. - Modular design (SRP, small focused files, "things that change together live together") → fewer same-section edits. Repeated overlap in one file is a structural signal to split it.
- Short-lived branches: small frequent PRs + frequent rebase off main → conflicts stay small and incremental.
DONE means
Build + tests green after resolution (not just "merged clean"); the resolution preserved both intents (or chose the north-star one deliberately, with the why recorded); and if the conflict class recurred, a prevention control was added.
Sources: git-scm gitattributes; semantic-conflict awareness (Fowler); standard merge-prevention practice.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

