Used for arkweb-security-patch-conflict-resolver。
When encountering manual landing,manual_attempted / manual_applied, old blocker cleanup, and issue-filtered diff adjudication, first read the references/manual-landing-contract.mdwithin this skill. Do not reference scripts or md from other skills.
Output
Single-issue mode writes to .ace-outputs/{runId}/07_conflict_resolution.md。
Batch mode must process issues one by one, reading the target sub-repository, .ace-outputs/{runId}/issues/{issue_id}/06_merge_result.md/json recorded inpatch_normalization[]、modified_files[] and blockers, and performing the minimal equivalent manual write within the current project's target git sub-repository; each issue writes to .ace-outputs/{runId}/issues/{issue_id}/07_conflict_resolution.md, and the overview writes to .ace-outputs/{runId}/07_conflict_resolution.md。
Must include:
- apply failure/conflict files and root cause.
- Upstream fix intent.
- ArkWeb local differences and adaptation decisions.
- Minimal equivalent manual write plan.
- Explanation of deviations from the upstream patch.
Rules
- Understand the security fix intent first, then modify the code.
- In this workflow, "conflict resolution" means minimal manual writing: read the normalized patch hunks and the current target file, and make the minimal equivalent change within the scope of
modified_files[]. - For
patch does not apply, missing blobs in three-way merge, context drift, and empty diff, do not merely restate the git apply failure; you must attempt a minimal manual write unless you can prove it cannot be completed within the allowed scope. - If no manual write was performed, you must state
manual_attempted=falseandmanual_skip_reason。 - After a successful manual write, you must write back
manual_attempted=true、manual_rewrite=true, the final changed files, the key semantic correspondences, and clear the oldpatch_apply_failed:*、no_real_file_change; the oldworktree_add_failedserves only as a historical failure record and does not participate in the current adjudication. - A successful manual fix is a successful merge: as long as the minimal manual write truly lands the security/functional semantics of the upstream patch, and the issue-filtered diff contains allowed files, you must write back
manual_applied=true、semantic_landed=true, clear the current merge blocker, and allow the issue to proceed toready_for_next。 - Do not mistake "attempted manual" for success. If the manual path was entered but no issue-allowed file was actually written, or the semantics cannot be confirmed, you must write
manual_attempted=true、manual_applied=false, retain the latest blocker, and must not proceed toready_for_next。 final_changed_filesmust list only the allowed files for the current issue and the registered local adaptation files. The global worktree diff can only serve as diagnostic input and must not be written verbatim into that issue's result.- Only conflict files explicitly involved in the upstream patch, and files explicitly listed as necessary for this patch in the merge/adaptation report, may be modified.
- Other uncommitted code, untracked files, historical dirty changes, build artifacts, and unrelated deletions in the project must be ignored.
- Batch mode is prohibited from using git worktree; conflicts must be resolved in the current project's target sub-repository.
- If multiple issues modify the same file, the automatic merge phase should first select the smallest issue_id in ascending numerical order as the winner to enter the active batch, and mark the other issues as
duplicate_file_overlapanddeferred_for_archive; non-winner issues do not enter conflict resolution. The overlapping files of non-winner issues must not be forcibly written into the winner issue's result. - Do not clean up, stage, format, rewrite, or incidentally fix any files outside the scope of this patch.
- If a conflict requires modifying files outside the scope to continue, stop and output the blocking item; do not automatically expand the processing scope.
- When the semantics cannot be confirmed, do not force it through; output the blocking item.
- In batch mode, each round must record the before-and-after changes in fail/pass/blocker for that round and the final diff changes; if no issue's blockers decrease,
manual_attemptedstatus changes, or diff changes, it must outputno_progressand stop continuing to spin idly.