Discover and use relevant installed skills for resolving merge conflicts and verifying the resulting change.

Work scope:

{{ context.work }}

Publication summary:

{{ context.publication_summary }}

Make the PR mergeable by resolving its conflicts with the target branch. Inspect the current PR, its target branch, published head and prepared worktree. Read applicable repository instructions.

If the PR has merged or closed, report that state without modifying it.

Fetch the latest target branch and integrate it using the repository’s conventions. Prefer rebase. Resolve conflicts by understanding both changes. Preserve the required behaviour of the work scope, relevant target-branch changes and unrelated work.

Verify that the local branch integrates cleanly with the fetched target. Run the relevant checks and create or update local commits using the repository’s conventions.

If the conflict has already disappeared, report the evidence without introducing unnecessary changes.

This step may fetch remote changes, merge or rebase locally, resolve conflicts, run checks and create local commits. Later steps own local review and publication. The caller owns any tracker updates.

Return `repair_summary` with the target revision, conflicts resolved, resulting changes, verification evidence and anything still unresolved.

Return `repair_result` as `changed` when this step changed the local branch or its files, otherwise `unchanged`. A changed repair is reviewed against its reason before it is published. An unchanged one goes straight to publication.
