[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M723N5T6HQ5EKMAM7KKK2XYZ":3,"skill-same:01M723N5T6HQ5EKMAM7KKK2XYZ":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M723N5T6HQ5EKMAM7KKK2XYZ","post-merge-cleanup",null,"Clean up an already-merged local branch after proving containment. Confirm each discard and preserve unique work.","arbiterForge\u002FcodeArbiter","arbiterForge","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F292945970?v=4","01M723CJ1FZ9YBVA7XXT0NJESP","01M723CJ23SYBFFTGBA7Q63BKH",153,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fplugins\u002Fca-pi\u002Froutines\u002Fpost-merge-cleanup\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: post-merge-cleanup\ndescription: \"Clean up an already-merged local branch after proving containment. Confirm each discard and preserve unique work.\"\nargument-hint: \"(none)\"\n---\n\n# post-merge-cleanup\n\nThe walk back from a merged PR, selected by cleanup intent or an explicit entry.\n\nThe work has landed on the default branch. What is left is local: the branch you\nare standing on, and whatever the run left in the tree. This skill returns you to\na clean, fast-forwarded default checkout without losing anything you have not\nexplicitly agreed to lose.\n\n**It is ordinary lifecycle work and never needs `\u002Fca-override`.** When it\ncannot proceed, it names the gate that stopped it. Issue #308 recorded the\nalternative: with no owner for this transition, the routing loop reached for\n`\u002Fca-chore`, then for `\u002Fca-override` — a bypass manufactured to cover a\ncoverage hole.\n\n\u003C!-- catalog-compatibility-notice:start -->\n> Compatibility route. Prefer `\u002Fca-pr --cleanup` for new explicit usage. The retained entry\n> and natural-language intent use this owner under\n> \u003Cplugin-root>\u002Fincludes\u002Fcommand-compatibility.md.\n\u003C!-- catalog-compatibility-notice:end -->\n\n## Entry boundaries\n\nSelect this owner for an already-merged branch cleanup request, `\u002Fca-pr --cleanup`,\nor the explicit `\u002Fca-cleanup` compatibility entry. Do not require repeated slash\nsyntax. An explanation-only or dirty-state question is read-only, not a deletion\nrequest. An unmerged branch belongs to the finishing owner, not this cleanup.\nMUST NOT require `\u002Fca-override` for ordinary cleanup; name a real blocker instead.\nThis owner neither stages nor commits. Keeping work may hand it to the existing\ncommit owner; no discard is implied by that handoff or by a cleanup request.\n\n## Pre-flight\n\nRead this, or STOP and surface the gap — never guess the default-branch name:\n\n- `\u003Cproject-root>\u002F.codearbiter\u002FCONTEXT.md` — the default-branch name.\n\nIf HEAD is already the default branch, there is no transition to make. Report the\ndirty state read-only and exit; branch pruning across *other* branches belongs to\n`\u002Fca-standup`.\n\n## Phase 1 — Prove the merge · gate: BLOCK\n\nA branch that looks merged is not merged. Establish it against the network, not\nagainst a stale local ref. This repo squash-merges by default, so SHA-ancestry\nalone is the wrong instrument for most landings: it holds for a fast-forward or\na merge-commit landing, but a squash merge writes a new commit with no SHA\nlineage back to the branch, and `--is-ancestor` will report non-zero for a\nbranch that landed cleanly. The gate is **content-containment**, proven by\nwhichever instrument fits the landing, always reported as a fact:\n\n1. `git fetch` the remote holding the default branch. A fetch that fails STOPs —\n   an unfetched comparison proves nothing.\n2. Prove containment with two primary instruments plus a fallback, tried in\n   order:\n   1. **Ancestry** — `git merge-base --is-ancestor HEAD origin\u002F\u003Cdefault>`. Holds\n      for a fast-forward or merge-commit landing. If it holds, that is the\n      proof: report it and move on.\n   2. **Squash-merge proof via the PR record** — if ancestry fails, run\n      `gh pr list --head \"$(git branch --show-current)\" --state merged --json number,state,headRefOid,mergeCommit`.\n      A `MERGED` PR whose `headRefOid` equals local `git rev-parse HEAD` proves\n      every commit on this branch rode that PR's squash into the default\n      branch. Report the PR number, that `headRefOid == HEAD`, the merge\n      commit (`mergeCommit.oid` in that JSON), **and** the ancestry check's\n      negative result — all as facts, not as a failure. Corroborate with\n      `git diff --quiet origin\u002F\u003Cdefault> HEAD` when it happens to hold; a\n      **non-empty** diff alongside a valid PR proof is normal (the default\n      branch advanced since the merge landed) and is reported as a fact, never\n      treated as a failure. The PR-record identity — `MERGED` plus\n      `headRefOid == HEAD` — is the load-bearing proof; the diff is\n      corroboration only when it happens to be fresh, never a requirement.\n   3. **Fallback when `gh` is unavailable or no PR record exists** —\n      `git diff --quiet origin\u002F\u003Cdefault> HEAD` (the tree is byte-identical to\n      the fetched default) is an acceptable fallback proof. Report it as such.\n3. Report whichever instrument held as a fact — the default branch, the fetched\n   SHA, and which of the three proofs established containment.\n\nIf none of the three hold, STOP exactly as today. Name the un-landed commits\nand route to `\u002Fca-pr`; nothing is deleted here.\n\n> Deliberate deviation from issue #586's suggested contract: that suggestion\n> required the squash-merge proof's diff to be empty. That requirement\n> re-breaks this gate the moment any later PR merges to the default branch —\n> the common state, not an edge case. The PR-record identity is what proves\n> containment; the diff is corroboration, demoted from requirement to fact.\n\nGate: the remote is fetched and HEAD is proven contained in the fetched default\nbranch — by ancestry, by the PR-record squash proof, or by the byte-identical\nfallback — or the skill has stopped.\n\n## Phase 2 — Classify the residue · gate: BLOCK\n\nList every dirty tracked change, every untracked file, and every stash reachable\nfrom this branch. Classify each into exactly one of three, and say *why* for each:\n\n- **Redundant** — byte-identical to content already on the default branch, or a\n  regenerated build artifact whose generator is committed and rerunnable. Safe to\n  remove because removing it loses no information.\n- **Superseded** — an earlier form of something the merged PR already landed in a\n  better shape. Name what supersedes it.\n- **Unique** — anything else. This is the default: an artifact that cannot be\n  proven redundant or superseded IS unique. Uncertainty classifies as unique, not\n  as redundant.\n\nPresent the classification before touching anything. A file whose class you\ncannot establish is reported as unique with the reason you could not classify it.\n\nGate: every dirty, untracked, and stashed artifact carries a class and a stated\nreason, with unclassifiable items counted as unique.\n\n## Phase 3 — Resolve the residue · gate: STOP\n\nPer item, in the order Phase 2 listed them. Never batch:\n\n- **Unique** — offer to keep it: `\u002Fca-commit` it on this branch before the\n  transition, move it aside, or leave it in place and stop the cleanup. It is\n  discarded only if the user explicitly confirms *that item by name*, with the\n  Phase 2 reasoning in view.\n- **Redundant \u002F superseded** — offer removal, one confirmation each, stating what\n  it is and why it is safe. Declining leaves it exactly where it is.\n\nA stash is never dropped here. Stashes are reported with `git stash show` as the\nsuggested next step, the same report-and-route contract `\u002Fca-standup` holds.\n\nIf anything the user chose to keep would block the checkout, STOP and say so\nrather than removing it anyway — but distinguish the two causes before naming\nthe artifact as the blocker:\n\n- **The kept artifact genuinely conflicts** — its content collides with what\n  checking out the default branch would need to change or remove. This is the\n  user's to resolve, as today.\n- **The local default ref lags the fetched one** — git refuses a checkout when\n  a locally-modified tracked file differs between HEAD and the target ref, and\n  a stale local `\u003Cdefault>` makes that difference larger than reality: content\n  the kept artifact never actually touches can still collide with what a\n  *current* default branch would carry. That gap is not the user's problem and\n  not the kept artifact's fault. It is resolved by Phase 4's fast-forward-first\n  step, not by discarding anything here. Issue #586 recorded the observed\n  failure mode: a stale local `main` — 513 lines behind on\n  `.codearbiter\u002Fgate-events.log` alone — made this STOP name a correctly-kept\n  38-line artifact as the blocker, which invites exactly the silent discard\n  this phase exists to prevent.\n\nGate: every item is resolved by an explicit per-item decision, and the working\ntree is clean enough to check out the default branch — or the skill has stopped\nwith the blocker named, correctly attributed to a genuine conflict or a stale\nlocal ref.\n\n## Phase 4 — Transition · gate: BLOCK\n\nOnly after Phase 3 leaves the tree safe:\n\n1. **Fast-forward the local default ref BEFORE checking it out:**\n   `git fetch origin \u003Cdefault>:\u003Cdefault>`. Git refuses a non-fast-forward\n   update of a ref that is not currently checked out, so the `--ff-only`\n   guarantee is preserved by the instrument itself — this cannot silently\n   rewrite the local default ref, only advance it or refuse. This is what\n   keeps a stale local default from blocking (or worse, misattributing) the\n   checkout below. This step can itself be refused for the same reason a\n   checkout can be — `\u003Cdefault>` checked out in another worktree — in which\n   case report that as the (correctly attributed) blocker, per Phase 3, and\n   stop; do not treat the refusal as license to skip ahead.\n2. Check out the default branch, then **verify the checkout actually happened**\n   (`git branch --show-current`). A checkout silently fails when another worktree\n   holds the branch, and every step after this one would otherwise run against\n   the wrong branch.\n3. Fast-forward with `--ff-only` (belt over the braces of step 1 — a no-op when\n   the pre-checkout fetch already brought the local ref current). A divergence\n   means the default branch moved in a way this skill will not reconcile:\n   report it and stop. Never a merge commit, never a rebase, never a reset.\n\nGate: the local default ref was fast-forwarded before the checkout — or the\nfast-forward's refusal was itself reported as a fact and the skill stopped —\nHEAD is confirmed on the default branch by re-read, and the belt-and-braces\n`--ff-only` pull either succeeded (typically a no-op) or was reported as a\nrefused divergence.\n\n## Phase 5 — Delete the merged local branch · gate: STOP\n\nOffer deletion of the now-merged local branch, with the Phase 1 containment\nproof restated. One confirmation, naming the branch.\n\n- `git branch -d` first, always. Never reach for `-D` on the assumption that a\n  refusal means `-d` can't handle a squash merge — it often can. `git branch\n  -d`'s safety check accepts a branch merged into its **upstream**, not only\n  into HEAD: with an upstream still configured and equal to the tip, `-d`\n  succeeds (with a warning) even for a squash merge that `--is-ancestor` alone\n  would call unmerged. Do not conclude a refusal here means `-D` is required —\n  check the reason first.\n- **The sanctioned `-D` path.** `-d` typically refuses once the remote branch\n  has been auto-deleted and pruned, because there is then no upstream left for\n  `-d` to test reachability against. When that happens, `git branch -D` is\n  permitted, but ONLY when both hold:\n  1. Phase 1's proof, established this run, was the PR-record squash proof\n     (`MERGED` and `headRefOid == HEAD`) — not a bare ancestry pass, not a\n     stale or assumed proof.\n  2. The confirmation restates that Phase-1 proof and explicitly names the\n     branch.\n  Frame this precisely: `-d`'s safety check tests SHA-reachability, and the\n  squash proof has already shown that instrument is the wrong one for this\n  repo's merge mode. The PR-record proof plus a named confirmation **replaces**\n  the check that `-d` can no longer run — it does not bypass it. Everywhere\n  else, `-D` stays forbidden exactly as before: if `-d` refuses and Phase 1's\n  proof was anything other than the PR-record squash proof, report both and\n  stop.\n- The **remote** branch is never touched. If the user wants it gone, that is\n  theirs to do or the platform's auto-delete-on-merge to do.\n\nDeclining leaves the branch in place. That is a normal outcome, not a failure.\n\nGate: the branch is deleted only after an explicit confirmation naming it, via\n`-d`, or via `-D` restricted to the sanctioned path above with the proof\nrestated, with the remote untouched.\n\n## Phase 6 — Receipt\n\nOne short summary: what landed, what was removed, what was kept, and where HEAD\nis now. State declines as declines — a cleanup the user stopped halfway is a\ncorrect outcome reported plainly, not an error.\n\n## Hard rules\n\n- MUST fetch and prove `HEAD` is **contained** in the fetched default branch\n  before any deletion — via ancestry, via the PR-record squash proof (`MERGED`\n  and `headRefOid == HEAD`), or, without `gh`, via a byte-identical tree diff.\n  MUST NOT infer merge state from a `: gone]` upstream alone.\n- MUST classify every artifact, and MUST treat anything not provably redundant or\n  superseded as unique.\n- MUST NOT discard a unique or unclassifiable artifact without an explicit\n  confirmation naming that item.\n- MUST confirm every removal and the branch deletion individually — no batched or\n  implied yes.\n- MUST fast-forward the local default ref (`git fetch origin \u003Cdefault>:\u003Cdefault>`)\n  before checking it out, or report the fast-forward's own refusal (e.g.\n  `\u003Cdefault>` checked out in another worktree) as the blocker and stop. MUST\n  re-read the current branch after checkout before acting on it.\n- MUST use `--ff-only`, and MUST NOT merge, rebase, or reset to reach the default\n  branch.\n- MUST use `git branch -d`, and MAY use `-D` ONLY when the Phase-1 squash-merge\n  proof held this run and `-d` refused, with that proof restated and the branch\n  named in the confirmation. Everywhere else `-D` is forbidden. MUST NOT delete a\n  remote branch, force-push, or write to the default branch.\n- MUST NOT drop a stash — report and route, as `\u002Fca-standup` does.\n- MUST NOT route to `\u002Fca-override` when blocked. Name the gate instead.\n","# post-merge-cleanup\n\nThe walk back from a merged PR, selected by cleanup intent or an explicit entry.\n\nThe work has landed on the default branch. What is left is local: the branch you\nare standing on, and whatever the run left in the tree. This skill returns you to\na clean, fast-forwarded default checkout without losing anything you have not\nexplicitly agreed to lose.\n\n**It is ordinary lifecycle work and never needs `\u002Fca-override`.** When it\ncannot proceed, it names the gate that stopped it. Issue #308 recorded the\nalternative: with no owner for this transition, the routing loop reached for\n`\u002Fca-chore`, then for `\u002Fca-override` — a bypass manufactured to cover a\ncoverage hole.\n\n\u003C!-- catalog-compatibility-notice:start -->\n> Compatibility route. Prefer `\u002Fca-pr --cleanup` for new explicit usage. The retained entry\n> and natural-language intent use this owner under\n> \u003Cplugin-root>\u002Fincludes\u002Fcommand-compatibility.md.\n\u003C!-- catalog-compatibility-notice:end -->\n\n## Entry boundaries\n\nSelect this owner for an already-merged branch cleanup request, `\u002Fca-pr --cleanup`,\nor the explicit `\u002Fca-cleanup` compatibility entry. Do not require repeated slash\nsyntax. An explanation-only or dirty-state question is read-only, not a deletion\nrequest. An unmerged branch belongs to the finishing owner, not this cleanup.\nMUST NOT require `\u002Fca-override` for ordinary cleanup; name a real blocker instead.\nThis owner neither stages nor commits. Keeping work may hand it to the existing\ncommit owner; no discard is implied by that handoff or by a cleanup request.\n\n## Pre-flight\n\nRead this, or STOP and surface the gap — never guess the default-branch name:\n\n- `\u003Cproject-root>\u002F.codearbiter\u002FCONTEXT.md` — the default-branch name.\n\nIf HEAD is already the default branch, there is no transition to make. Report the\ndirty state read-only and exit; branch pruning across *other* branches belongs to\n`\u002Fca-standup`.\n\n## Phase 1 — Prove the merge · gate: BLOCK\n\nA branch that looks merged is not merged. Establish it against the network, not\nagainst a stale local ref. This repo squash-merges by default, so SHA-ancestry\nalone is the wrong instrument for most landings: it holds for a fast-forward or\na merge-commit landing, but a squash merge writes a new commit with no SHA\nlineage back to the branch, and `--is-ancestor` will report non-zero for a\nbranch that landed cleanly. The gate is **content-containment**, proven by\nwhichever instrument fits the landing, always reported as a fact:\n\n1. `git fetch` the remote holding the default branch. A fetch that fails STOPs —\n   an unfetched comparison proves nothing.\n2. Prove containment with two primary instruments plus a fallback, tried in\n   order:\n   1. **Ancestry** — `git merge-base --is-ancestor HEAD origin\u002F\u003Cdefault>`. Holds\n      for a fast-forward or merge-commit landing. If it holds, that is the\n      proof: report it and move on.\n   2. **Squash-merge proof via the PR record** — if ancestry fails, run\n      `gh pr list --head \"$(git branch --show-current)\" --state merged --json number,state,headRefOid,mergeCommit`.\n      A `MERGED` PR whose `headRefOid` equals local `git rev-parse HEAD` proves\n      every commit on this branch rode that PR's squash into the default\n      branch. Report the PR number, that `headRefOid == HEAD`, the merge\n      commit (`mergeCommit.oid` in that JSON), **and** the ancestry check's\n      negative result — all as facts, not as a failure. Corroborate with\n      `git diff --quiet origin\u002F\u003Cdefault> HEAD` when it happens to hold; a\n      **non-empty** diff alongside a valid PR proof is normal (the default\n      branch advanced since the merge landed) and is reported as a fact, never\n      treated as a failure. The PR-record identity — `MERGED` plus\n      `headRefOid == HEAD` — is the load-bearing proof; the diff is\n      corroboration only when it happens to be fresh, never a requirement.\n   3. **Fallback when `gh` is unavailable or no PR record exists** —\n      `git diff --quiet origin\u002F\u003Cdefault> HEAD` (the tree is byte-identical to\n      the fetched default) is an acceptable fallback proof. Report it as such.\n3. Report whichever instrument held as a fact — the default branch, the fetched\n   SHA, and which of the three proofs established containment.\n\nIf none of the three hold, STOP exactly as today. Name the un-landed commits\nand route to `\u002Fca-pr`; nothing is deleted here.\n\n> Deliberate deviation from issue #586's suggested contract: that suggestion\n> required the squash-merge proof's diff to be empty. That requirement\n> re-breaks this gate the moment any later PR merges to the default branch —\n> the common state, not an edge case. The PR-record identity is what proves\n> containment; the diff is corroboration, demoted from requirement to fact.\n\nGate: the remote is fetched and HEAD is proven contained in the fetched default\nbranch — by ancestry, by the PR-record squash proof, or by the byte-identical\nfallback — or the skill has stopped.\n\n## Phase 2 — Classify the residue · gate: BLOCK\n\nList every dirty tracked change, every untracked file, and every stash reachable\nfrom this branch. Classify each into exactly one of three, and say *why* for each:\n\n- **Redundant** — byte-identical to content already on the default branch, or a\n  regenerated build artifact whose generator is committed and rerunnable. Safe to\n  remove because removing it loses no information.\n- **Superseded** — an earlier form of something the merged PR already landed in a\n  better shape. Name what supersedes it.\n- **Unique** — anything else. This is the default: an artifact that cannot be\n  proven redundant or superseded IS unique. Uncertainty classifies as unique, not\n  as redundant.\n\nPresent the classification before touching anything. A file whose class you\ncannot establish is reported as unique with the reason you could not classify it.\n\nGate: every dirty, untracked, and stashed artifact carries a class and a stated\nreason, with unclassifiable items counted as unique.\n\n## Phase 3 — Resolve the residue · gate: STOP\n\nPer item, in the order Phase 2 listed them. Never batch:\n\n- **Unique** — offer to keep it: `\u002Fca-commit` it on this branch before the\n  transition, move it aside, or leave it in place and stop the cleanup. It is\n  discarded only if the user explicitly confirms *that item by name*, with the\n  Phase 2 reasoning in view.\n- **Redundant \u002F superseded** — offer removal, one confirmation each, stating what\n  it is and why it is safe. Declining leaves it exactly where it is.\n\nA stash is never dropped here. Stashes are reported with `git stash show` as the\nsuggested next step, the same report-and-route contract `\u002Fca-standup` holds.\n\nIf anything the user chose to keep would block the checkout, STOP and say so\nrather than removing it anyway — but distinguish the two causes before naming\nthe artifact as the blocker:\n\n- **The kept artifact genuinely conflicts** — its content collides with what\n  checking out the default branch would need to change or remove. This is the\n  user's to resolve, as today.\n- **The local default ref lags the fetched one** — git refuses a checkout when\n  a locally-modified tracked file differs between HEAD and the target ref, and\n  a stale local `\u003Cdefault>` makes that difference larger than reality: content\n  the kept artifact never actually touches can still collide with what a\n  *current* default branch would carry. That gap is not the user's problem and\n  not the kept artifact's fault. It is resolved by Phase 4's fast-forward-first\n  step, not by discarding anything here. Issue #586 recorded the observed\n  failure mode: a stale local `main` — 513 lines behind on\n  `.codearbiter\u002Fgate-events.log` alone — made this STOP name a correctly-kept\n  38-line artifact as the blocker, which invites exactly the silent discard\n  this phase exists to prevent.\n\nGate: every item is resolved by an explicit per-item decision, and the working\ntree is clean enough to check out the default branch — or the skill has stopped\nwith the blocker named, correctly attributed to a genuine conflict or a stale\nlocal ref.\n\n## Phase 4 — Transition · gate: BLOCK\n\nOnly after Phase 3 leaves the tree safe:\n\n1. **Fast-forward the local default ref BEFORE checking it out:**\n   `git fetch origin \u003Cdefault>:\u003Cdefault>`. Git refuses a non-fast-forward\n   update of a ref that is not currently checked out, so the `--ff-only`\n   guarantee is preserved by the instrument itself — this cannot silently\n   rewrite the local default ref, only advance it or refuse. This is what\n   keeps a stale local default from blocking (or worse, misattributing) the\n   checkout below. This step can itself be refused for the same reason a\n   checkout can be — `\u003Cdefault>` checked out in another worktree — in which\n   case report that as the (correctly attributed) blocker, per Phase 3, and\n   stop; do not treat the refusal as license to skip ahead.\n2. Check out the default branch, then **verify the checkout actually happened**\n   (`git branch --show-current`). A checkout silently fails when another worktree\n   holds the branch, and every step after this one would otherwise run against\n   the wrong branch.\n3. Fast-forward with `--ff-only` (belt over the braces of step 1 — a no-op when\n   the pre-checkout fetch already brought the local ref current). A divergence\n   means the default branch moved in a way this skill will not reconcile:\n   report it and stop. Never a merge commit, never a rebase, never a reset.\n\nGate: the local default ref was fast-forwarded before the checkout — or the\nfast-forward's refusal was itself reported as a fact and the skill stopped —\nHEAD is confirmed on the default branch by re-read, and the belt-and-braces\n`--ff-only` pull either succeeded (typically a no-op) or was reported as a\nrefused divergence.\n\n## Phase 5 — Delete the merged local branch · gate: STOP\n\nOffer deletion of the now-merged local branch, with the Phase 1 containment\nproof restated. One confirmation, naming the branch.\n\n- `git branch -d` first, always. Never reach for `-D` on the assumption that a\n  refusal means `-d` can't handle a squash merge — it often can. `git branch\n  -d`'s safety check accepts a branch merged into its **upstream**, not only\n  into HEAD: with an upstream still configured and equal to the tip, `-d`\n  succeeds (with a warning) even for a squash merge that `--is-ancestor` alone\n  would call unmerged. Do not conclude a refusal here means `-D` is required —\n  check the reason first.\n- **The sanctioned `-D` path.** `-d` typically refuses once the remote branch\n  has been auto-deleted and pruned, because there is then no upstream left for\n  `-d` to test reachability against. When that happens, `git branch -D` is\n  permitted, but ONLY when both hold:\n  1. Phase 1's proof, established this run, was the PR-record squash proof\n     (`MERGED` and `headRefOid == HEAD`) — not a bare ancestry pass, not a\n     stale or assumed proof.\n  2. The confirmation restates that Phase-1 proof and explicitly names the\n     branch.\n  Frame this precisely: `-d`'s safety check tests SHA-reachability, and the\n  squash proof has already shown that instrument is the wrong one for this\n  repo's merge mode. The PR-record proof plus a named confirmation **replaces**\n  the check that `-d` can no longer run — it does not bypass it. Everywhere\n  else, `-D` stays forbidden exactly as before: if `-d` refuses and Phase 1's\n  proof was anything other than the PR-record squash proof, report both and\n  stop.\n- The **remote** branch is never touched. If the user wants it gone, that is\n  theirs to do or the platform's auto-delete-on-merge to do.\n\nDeclining leaves the branch in place. That is a normal outcome, not a failure.\n\nGate: the branch is deleted only after an explicit confirmation naming it, via\n`-d`, or via `-D` restricted to the sanctioned path above with the proof\nrestated, with the remote untouched.\n\n## Phase 6 — Receipt\n\nOne short summary: what landed, what was removed, what was kept, and where HEAD\nis now. State declines as declines — a cleanup the user stopped halfway is a\ncorrect outcome reported plainly, not an error.\n\n## Hard rules\n\n- MUST fetch and prove `HEAD` is **contained** in the fetched default branch\n  before any deletion — via ancestry, via the PR-record squash proof (`MERGED`\n  and `headRefOid == HEAD`), or, without `gh`, via a byte-identical tree diff.\n  MUST NOT infer merge state from a `: gone]` upstream alone.\n- MUST classify every artifact, and MUST treat anything not provably redundant or\n  superseded as unique.\n- MUST NOT discard a unique or unclassifiable artifact without an explicit\n  confirmation naming that item.\n- MUST confirm every removal and the branch deletion individually — no batched or\n  implied yes.\n- MUST fast-forward the local default ref (`git fetch origin \u003Cdefault>:\u003Cdefault>`)\n  before checking it out, or report the fast-forward's own refusal (e.g.\n  `\u003Cdefault>` checked out in another worktree) as the blocker and stop. MUST\n  re-read the current branch after checkout before acting on it.\n- MUST use `--ff-only`, and MUST NOT merge, rebase, or reset to reach the default\n  branch.\n- MUST use `git branch -d`, and MAY use `-D` ONLY when the Phase-1 squash-merge\n  proof held this run and `-d` refused, with that proof restated and the branch\n  named in the confirmation. Everywhere else `-D` is forbidden. MUST NOT delete a\n  remote branch, force-push, or write to the default branch.\n- MUST NOT drop a stash — report and route, as `\u002Fca-standup` does.\n- MUST NOT route to `\u002Fca-override` when blocked. Name the gate instead.\n",{"name":5,"description":7,"argument-hint":23},"(none)","main","fd7eb34b2da439551443d09526ab48fd1d1bb9bf","plugins\u002Fca-pi\u002Froutines\u002Fpost-merge-cleanup",9,"https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter","https:\u002F\u002Fcodearbiter.dev\u002F","https:\u002F\u002Fgithub.com\u002FarbiterForge","https:\u002F\u002FArbiterForge.com","2026-11-15 04:04:31",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add arbiterForge\u002FcodeArbiter --skill post-merge-cleanup",{"tool":39,"command":40},"bunx","bunx skills add arbiterForge\u002FcodeArbiter --skill post-merge-cleanup",{"tool":42,"command":43},"pnpm","pnpm dlx skills add arbiterForge\u002FcodeArbiter --skill post-merge-cleanup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fplugins\u002Fca-pi\u002Froutines\u002Fpost-merge-cleanup\u002FSKILL.md",true,[],[48,55,62,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M723VC2J3R1BJ20XW56WZG3K","myskill","A sample skill for fixtures — does one gated thing well.","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fsite\u002Ftest\u002Ffixtures\u002Fplugin\u002Fskills\u002Fmyskill\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M723VAQ3APJEW6G1ESJ7AGFN","dup","Second of two same-named skills, used to prove within-collection dedup still works.","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fsite\u002Ftest\u002Ffixtures\u002Fplugin-collisions\u002Fskills\u002Fdupskill-b\u002FSKILL.md",[],[],{"skillNo":63,"name":57,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M723V963M5R77EQM2N36KRTK","First of two same-named skills, used to prove within-collection dedup still works.","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fsite\u002Ftest\u002Ffixtures\u002Fplugin-collisions\u002Fskills\u002Fdupskill-a\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M723V7VKBK473J4WMKV758B5","debug","A fixture skill named debug, colliding with the debug command\u002Fagent.","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fsite\u002Ftest\u002Ffixtures\u002Fplugin-collisions\u002Fskills\u002Fdebug\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M723V5PS7H5QY903F2WB8MJY","writing-plans","Turn the selected specification into a maintained implementation plan with clear outcomes, useful tasks, dependencies, and verification steps. Drafting uses the existing authorization and does not require artifact approval codes, reviewer receipts, or a frozen implementation script.","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fplugins\u002Fca\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M723V22QK0R2VJ4HA74PRRW5","using-git-worktrees","OPTIONAL per-task isolation for autonomous parallel work. Routed to only on explicit opt-in by subagent-driven-development or dispatching-parallel-agents, so parallel units mutate files without colliding. Stands up one worktree per unit, works it in isolation, then integrates each unit back onto the caller's working branch for the caller's single commit-gate + finishing-a-development-branch exit. Never on the default path; it does not bypass a gate or finish per unit.","https:\u002F\u002Fgithub.com\u002FarbiterForge\u002FcodeArbiter\u002Fblob\u002Fmain\u002Fplugins\u002Fca\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[]]