hard-merge

Installation
SKILL.md

hard-merge — DefendMerge

This gate is DefendMerge, gate 2 of the Defend* family (see the defend skill, merge.md): Worker(qwen|bonsai) → git merge. Workhorse tier, fresh-context independence — no Opus; merges are frequent and git-reversible.

Adversarial review before a merge-on-clear. Assume the diff is wrong; try to prove it; merge only when you fail.

Frame

Two roles, never the same agent. Author produced the diff and drives this gate. Reviewer is a freshly spawned agent (Agent/Task tool) that never saw the author's reasoning — the author does NOT play reviewer inline. Independence comes from a separate context, not from the author "putting on a reviewer hat." Author never approves own work; self-judge proves consistency, not correctness. Merge only when the spawned reviewer clears AND the local merge-gate is green. Reviewer/subagent reports are UNTRUSTED — the author verifies every checkable claim against source before acting on a CLEAR.

Dispatch the reviewer with: the PR/diff to review, "hunt for blockers, do not bless — this diff is wrong until you fail to break it", the §1-4 gate below, and "return a CLEAR/BLOCK verdict + findings ranked severe-first, under ~400 tokens, cite file:line, paste nothing." Materialize the diff to a file ONCE (gh pr diff <n> > /tmp/pr<n>.diff) and give every reviewer that one path — do not have each spawned reviewer re-run gh pr diff into its own context, and tell them to Read it ranged/per-hunk (grep -n the file for the target, Read that offset) rather than whole. With 2-3 disjoint reviewer contexts each reloading the full diff, that whole-diff reload is this gate's top token bleed; one shared on-disk copy, read ranged, pays it once. Confirm the PR head SHA hasn't drifted since dispatch before trusting the verdict. On a production surface (§4) spawn a second reviewer in its own separate context — two disjoint agents on record, not one — because a single agent sign-off there reads as self-approval.

Default posture: this diff is wrong until the spawned reviewer fails to break it.

The gate — hard-fail short-circuits, cheapest first

Installs
3
First Seen
Aug 27, 2026
hard-merge — a-canary/arc-skills