Intent-Preserving Merge Resolution
Never resolve conflicts by choosing the newer-looking block.
For each hunk:
- Identify the base and the independent intent of ours and theirs from commits, tests, issues, and neighboring changes.
- State the invariants each side intended to preserve.
- Choose: keep one, combine, re-express both, or escalate because intents conflict.
- Repair tests/contracts to prove the combined result.
- Search for semantic conflicts outside marked hunks: renamed symbols, changed schemas, duplicated behavior, and mismatched generated files.
- Finish the merge/rebase only after repository validation. Do not abort unless the user requests abandonment.