/patching-bugs:prove-patch <run-dir> <attempt 1-3> [checkout]from patching-bugs
Judges a new local fix commit without trusting its author — every repair_scope case through one retained side-blind harness on clean baseline and patched worktrees, the project checks that matter on both, then the three-arm check (baseline fails, patch passes, patch reset to baseline fails again) — writing prove.json, receipts and a hash manifest under $TMPDIR. Use when patching-bugs:patching-bugs hands over a commit to prove, or the user wants proof that one local fix commit changes the outcome. Not for a merged fix, a PR or a patch file — use post-patch-validation:post-patch-validation.
Ships in patching-bugs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Request: $ARGUMENTS
The patcher believes the fix works. That belief is not evidence. You decide from runs you launch yourself on pinned trees, with expectations fixed before you see any output. A missing or ambiguous observation is a gap, and a gap is never written down as a pass.
Scripts: ${CLAUDE_SKILL_DIR}/../patching-bugs/scripts/. Record fields:
${CLAUDE_SKILL_DIR}/../patching-bugs/references/records.md. Judging rules:
judging.md. Harness contract:
${CLAUDE_SKILL_DIR}/../reproduce-bug/references/recipes.md.
Write every path in commands literally and absolutely; never put the run directory, the scripts or the checkout in a shell variable. The transcript is part of the evidence.
From the brief: checkout, run directory, attempt N, baseline commit, patch_commit, identity
string, approval quote, guidance. Your directory is <run>/prove/attempt-N/; it must be new.
patch/attempt-N/patch.json names the same commits; git rev-parse --verify <sha>^{commit} both.Read finding.json (invariant, repair_scope),
git diff --no-ext-diff --no-textconv <baseline> <patch_commit>, and the PoC package under
reproduce/poc/. Ignore what the patcher concluded. Ask: does the diff restore the invariant at its
source, or only reject the reported string? Which inputs would tell those apart? They belong in
unproven if no planned case covers them.
Copy the reproduce harness into prove/attempt-N/receipts/harness/ (or write a new one there under
the same contract when it cannot express a planned case). Every case runs through that one file,
one command shape, on both trees. It stays side-blind: no commit ids, branch names or paths in its
decisions.
Write prove/attempt-N/cases.json: one {check_id, argv} per repair_scope case (all of them,
representatives and controls), argv calling the retained harness with the planned input.
GOCACHE=<TMPDIR>/gocache GOFLAGS=-buildvcs=false \
python3 ${CLAUDE_SKILL_DIR}/../patching-bugs/scripts/arms.py cases \
--repo /abs/checkout --baseline <baseline> --patch <patch_commit> --build '<build argv JSON>' \
--plan /abs/run/prove/attempt-N/cases.json --artifact <artifact> --out /abs/run/prove/attempt-N
The JSON it prints holds a RUN object per side for each case, ready for prove.json.
Write prove/attempt-N/checks.json with the checks that matter for this change: the full suite
(go test ./...), focused packages, a behavior check whose output must stay byte-identical (a
control input printed by the real artifact), security tests if the project has them. Run them on
both trees with --label checks and the same command shape as step 3. Each becomes a
project_checks entry with its kind.
GOCACHE=<TMPDIR>/gocache GOFLAGS=-buildvcs=false \
python3 ${CLAUDE_SKILL_DIR}/../patching-bugs/scripts/arms.py run \
--repo /abs/checkout --baseline <reproduce.baseline_commit> --patch <patch_commit> \
--build '<build argv JSON>' --poc '<reproduce.poc_argv JSON>' --artifact <artifact> \
--out /abs/run/prove/attempt-N
Compile claims: --failure-type compile --expected-diagnostic '<text>', no --poc or
--artifact. Needed: reverted pass (baseline fails, patched passes, reverted fails the same
way), build_identity pass for runtime. Its output gives reverted, build_identity, hashes
and reverted_hash_note for prove.json; receipts/source.json pins the commits and trees.
Receipts alone cannot show what was launched. Confirm yourself:
receipts/cases/launch.json and receipts/checks/launch.json: the argv is the one you ran, the
commits are the pinned baseline and patch, the plan names your retained harness;receipts/source.json: commits match, reverted tree equals baseline tree, patched differs;markers.py check-stdout <stdout> --input '<planned>' --runtime-identity <that side's artifact path> <sha256> (from the build part of the step 3 output);Write prove/attempt-N/prove.json (schema_version 2): attempt, failure_type (same as the
reproduction), both commits, the three-arm fields, cases (each with source =
receipts/harness/<file>), project_checks, unproven (concrete limits you did not prove; never
empty), agent. Then:
python3 ${CLAUDE_SKILL_DIR}/../patching-bugs/scripts/records.py manifest /abs/run/prove/attempt-N
python3 ${CLAUDE_SKILL_DIR}/../patching-bugs/scripts/records.py check /abs/run
python3 ${CLAUDE_SKILL_DIR}/../patching-bugs/scripts/verdict.py /abs/run
The manifest replaces the helper's interim one and must cover every receipt. Read the gap: and
finding: lines of the verdict output; judging.md explains each.
prove.json path, the three-arm result, build identity, every case and check that is not a pass
(with its receipt path and the reason), and unproven. Exact failures, no reassurance.
--output on git log, git show and git diff; --ext-diff and --no-index on git diff;
--textconv on git show.arms.py, cp and every build or test command prompt; that is the gate.git worktree by hand.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flyoverhead/devops-plugins --plugin patching-bugs5 skills in this plugin
/implement-patchRepairs one confirmed bug where its invariant breaks, inside the finding's repair_scope — before-repair gate, a hunt for same-invariant variants, suite before and after, a regression test seen failing on the unpatched code first, the smallest reviewable fix, then one local `git commit -s` plus fix.patch, tests.patch and patch.json under $TMPDIR. Use when patching-bugs:patching-bugs hands over a patch attempt, or a confirmed finding.json needs that fix. Not for a quick fix with no confirmed finding (just edit the code) nor for judging the commit — use patching-bugs:prove-patch./patching-bugsDrives one named bug from report to a local fix commit that someone other than its author has proven — intake into finding.json, a reproduce agent, a blind validate agent, up to three patch-then-prove rounds by separate fresh agents, an optional regression-hunt pass, and a Markdown report with a verdict, all under $TMPDIR. Use when the user starts /patching-bugs:patching-bugs with a bug report, issue or finding and wants the fix shown to work. Not for checking a fix that already exists — use post-patch-validation:post-patch-validation./reproduce-bugShows one reported bug is real on the current build before any edit — builds the pinned baseline in a scratch worktree with the project's own command, runs the built artifact through a PoC harness printing PATCH_LOADED, PATCH_CASE and PATCH_REACHED (or the exact compiler diagnostic), and stores its stdout, stderr and exit codes beside reproduce.json and a hash manifest under $TMPDIR. Use when a bug must be shown on the current build with raw output someone else can rerun, or for the reproduce stage of patching-bugs:patching-bugs. Not for whether a scanner alert is real — use fp-check:fp-check.Other plugins' skills for the same job