Repair a PR conflict
Collect current evidence before touching the branch:
.agents/skills/repair-pr-conflict/scripts/collect-conflict-context.sh OWNER/REPO PR_NUMBER
Resolve safely
- Confirm the live PR head SHA, head branch, base branch, repository ownership, and conflict state.
- Locate the existing PR worktree or create an isolated worktree from the exact head. Never reset another worktree.
- Fetch the current base and integrate it into the active PR branch.
- Resolve files semantically. Preserve compatible APIs, capability fields, tests, and fail-closed behavior from both sides.
- Inspect the resolved diff for accidental deletion, duplicate implementations, weakened assertions, or generated artifacts.
- Invoke
$validate-framekit; include native gates when required. - Commit the conflict repair and push to the same PR head branch when authorized.
- Re-run the collector and verify the new head SHA, mergeability, and remote checks.
Do not abandon, recreate, force-push, merge, or close the PR unless explicitly requested. If the PR comes from a fork or the head branch cannot be changed safely, report the permission boundary.