/conflict-resolve
Help during a merge or rebase when files have conflicts.
Usage
/conflict-resolve # all conflicts in current state
/conflict-resolve src/api.ts # one specific file
What it does
For each conflicted file:
1. Show context
- The 2 versions (HEAD and incoming) side by side
- The common ancestor (if rebasing)
- Recent commits that touched the conflicting region from both sides
2. Recommend a resolution
Based on:
- Whether one side is a strict superset
- Whether changes are independent (combine both)
- Whether changes are semantic conflicts (need human judgment)
3. Explain the trade-off
Concrete: "If you take HEAD, you lose the rate-limit fix from #142. If you take incoming, you lose the timezone bug fix from #138."
4. Apply (only with confirmation)
- Edit the file
- Run any relevant tests for that file
- Stage if tests pass
Rules
- Never resolve a conflict by deleting both versions without explicit confirmation
- Run tests after each resolution (don't batch)
- If conflicts touch security-sensitive code (auth, payments, crypto), flag with extra caution
- Preserve commit messages from both sides in the merge commit