agentleFS
stjarnstromstjarnstrom/spec-system/skills/merge-conflicts/SKILL.md

merge-conflicts

Skill0 starsChanged 45 days agoMITView on GitHub

Resolve an in-progress git merge, rebase, or cherry-pick conflict by recovering each side's intent — including conflicts inside specs/, where statement IDs and pins have rules of their own. Use when git reports conflicts, or when merging parallel task branches.

4 other projects use a version of this.

Adopted by

Most recently taken up by

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
  1. Distinctive:

    Resolve code: Keep both intents where they are compatible.

    line 22
  2. Distinctive:

    Do not abort an operation the user started unless they ask.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Resolve by intent, not by hunk. Each side of a conflict was made for a reason; find the reason before choosing.

Procedure

  1. See the state. git status — which operation (merge, rebase, cherry-pick), which files, and what the operation is for.
  2. Recover each side's intent from its primary sources: the commit messages on both sides (git log --merge), the plan in docs/changes/, the PR or issue they cite.
  3. Resolve code. Keep both intents where they are compatible. Where they are not, keep the one the merge exists to deliver and note the trade-off in the merge commit. Invent no new behaviour in a conflict resolution.
  4. Resolve the spec layer by its rules.
    • A statement both sides changed is not a hunk to pick: it is an amendment decision. Attended, ask the user which behaviour is true. Unattended, keep the base branch's statement and park the task that changed it, with both versions quoted.
    • The same new ID used for two different statements. An ID already on the base branch keeps its number. The incoming statement takes the next free number, and every reference to it follows — verified-by test names, the plan, commit messages still to be written.
    • pinned: in registry.yaml records which spec content the code satisfies. Keep the base branch's pin, then let check say whether the merged spec still matches it. A pin that neither side's code was verified against is never kept to make check pass.
    • REGISTRY.md tables and registry.html are generated: take either side, then node specs/registry.mjs sync (and render if tracked).
    • Plans: a checkbox takes the most advanced state from either side; run-log lines from both sides are kept, in time order.
  5. Verify and finish. node specs/registry.mjs check when the repo has specs/; the test suite; then git add the resolved files and continue the operation (git merge --continue, git rebase --continue). Do not abort an operation the user started unless they ask.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.