description:Resolve all merge conflicts on the current branch non-interactively, validate the build, and commit. Use when the user says "fix merge conflicts", "resolve conflicts", or when git status shows conflicting files.
disable-model-invocation:true
---
# Fix Merge Conflicts
Resolve all merge conflicts on the current branch non-interactively and leave the repo buildable.
## Constraints
- Do not ask the user for input. Make best-effort decisions and explain them in a summary.
- Prefer minimal changes that preserve both sides' intent.
- Do not push or tag — only commit locally.
## Workflow
### 1. Detect conflicts
```bash
git status --porcelain
```
Collect files with `U` statuses or containing `<<<<<<<` / `=======` / `>>>>>>>` markers.
### 2. Resolve conflicts per file
Open each conflicting file and remove conflict markers. Merge both sides logically when feasible.
**When sides are mutually exclusive**, pick the variant that: