Skip to content

pr-pre-merge: auto-resolve documentation merge conflicts instead of aborting #142

Description

@LeanAndMean

Summary

The pr-pre-merge skill aborts the entire merge step when it encounters conflicts in non-version files (e.g., CLAUDE.md, documentation). Claude should resolve straightforward merge conflicts automatically and only stop to ask the user when it encounters genuine ambiguity or is uncertain about the correct resolution.

Current Behavior

Step 3 (branch freshness) maintains a narrow allowlist of files eligible for auto-resolution (plugin.json, package.json, pyproject.toml, setup.cfg, Cargo.toml, build.gradle). Any conflict outside this list causes the skill to abort the merge and stop the entire checklist, requiring the user to resolve manually and re-run.

In practice, documentation conflicts (CLAUDE.md, requirements docs) are often trivially resolvable — both sides added different content to the same section, and both additions should be kept.

Proposed Behavior

When a merge produces conflicts, Claude should:

  1. Read each conflicted file and assess the conflict markers.
  2. If the resolution is unambiguous (e.g., both sides added distinct content to the same section), resolve it automatically and continue.
  3. If the resolution is ambiguous or risky (e.g., both sides modified the same line with incompatible changes, or semantic meaning is unclear), present the conflict to the user and ask how to proceed.

The version-file allowlist with its --theirs strategy can remain as a fast path, but should not be the only path to auto-resolution.

Acceptance Criteria

  • Merge conflicts in non-allowlist files do not automatically abort the checklist
  • Unambiguous conflicts (additive, non-overlapping changes) are resolved without user intervention
  • Ambiguous conflicts prompt the user with the conflicting content and resolution options
  • The pre-merge report notes which files had conflicts auto-resolved
  • Version-file allowlist behavior is preserved as-is

Context

Encountered while running /mach10:pr-pre-merge 649 on a branch 8 commits behind main. Three documentation files conflicted (both sides adding different Issue references to the same Phase 5 description). All three were trivially resolvable but the skill aborted.

Related closed issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions