/ca-cleanup — post-merge branch transition
Your PR merged. You are still standing on the branch, with build output, worktree
residue, and scratch files around you. This command owns the ordinary walk back:
prove the branch actually landed, decide what the leftovers are, get to a clean
fast-forwarded default checkout, and drop the merged local branch.
It exists because nothing else owned it. /ca-standup is daily hygiene and
deliberately never touches the current branch or the default one;
/ca-chore takes docs, dependency bumps, and reverts. Issue #308 recorded
what the gap produced: a routine cleanup routed to /ca-chore, which
refused it, and then to /ca-override — a bypass invented to cover missing
coverage. This is that coverage.
Routes to
The post-merge-cleanup skill (<plugin-root>/routines/post-merge-cleanup/SKILL.md),
which owns the ancestry proof, the artifact classification, and the per-item
confirmations.
When NOT to use
- The branch has NOT merged yet →
/ca-pr (finishing-a-development-branch)
owns the terminal decision; come back here after it lands.
- Daily start-of-day hygiene across other branches and worktrees →
/ca-standup.
- A read-only look at what is dirty →
/ca-status.
- Uncommitted work you want to keep →
/ca-commit. This command never
commits for you.
Hard gate
- MUST prove the current branch is an ancestor of the fetched default branch
before anything is deleted. An unproven or unfetched ancestry STOPs — a branch
that only looks merged is not merged.
- MUST classify every dirty or untracked artifact as unique, redundant,
or superseded, and MUST NOT discard a unique or unclassifiable one without
explicit per-item confirmation naming it.
- MUST confirm each removal individually — no batched yes, no implied yes.
- MUST reach the default branch with a clean working tree, and MUST fast-forward
with
--ff-only only — never a merge commit, never a rebase, never a reset
that discards work.
- MUST NOT force-delete a branch, force-push, delete a remote branch, or write to
the default branch.
- MUST NOT require
/ca-override. This is ordinary lifecycle work; if it
cannot proceed, the reason is a stated gate, not a bypass.
1---2name: ca-cleanup3description: Finish an already-merged branch — classify the leftover artifacts, return to a fast-forwarded default checkout, and delete the merged local branch. Every discard confirmed per item; ancestry proven, never assumed.4---5
6# /ca-cleanup — post-merge branch transition
7
8Your PR merged. You are still standing on the branch, with build output, worktree
9residue, and scratch files around you. This command owns the ordinary walk back:
10prove the branch actually landed, decide what the leftovers are, get to a clean
11fast-forwarded default checkout, and drop the merged local branch.
12
13It exists because nothing else owned it. `/ca-standup` is daily hygiene and
14deliberately never touches the current branch or the default one;
15`/ca-chore` takes docs, dependency bumps, and reverts. Issue #308 recorded
16what the gap produced: a routine cleanup routed to `/ca-chore`, which
17refused it, and then to `/ca-override` — a bypass invented to cover missing
18coverage. This is that coverage.
19
20## Routes to
21
22The `post-merge-cleanup` skill (`<plugin-root>/routines/post-merge-cleanup/SKILL.md`),
23which owns the ancestry proof, the artifact classification, and the per-item
24confirmations.
25
26## When NOT to use
27
28- The branch has NOT merged yet → `/ca-pr` (`finishing-a-development-branch`)
29 owns the terminal decision; come back here after it lands.
30- Daily start-of-day hygiene across *other* branches and worktrees →
31 `/ca-standup`.
32- A read-only look at what is dirty → `/ca-status`.
33- Uncommitted work you want to keep → `/ca-commit`. This command never
34 commits for you.
35
36## Hard gate
37
38- MUST prove the current branch is an ancestor of the **fetched** default branch
39 before anything is deleted. An unproven or unfetched ancestry STOPs — a branch
40 that only *looks* merged is not merged.
41- MUST classify every dirty or untracked artifact as **unique**, **redundant**,
42 or **superseded**, and MUST NOT discard a unique or unclassifiable one without
43 explicit per-item confirmation naming it.
44- MUST confirm each removal individually — no batched yes, no implied yes.
45- MUST reach the default branch with a clean working tree, and MUST fast-forward
46 with `--ff-only` only — never a merge commit, never a rebase, never a reset
47 that discards work.
48- MUST NOT force-delete a branch, force-push, delete a remote branch, or write to
49 the default branch.
50- MUST NOT require `/ca-override`. This is ordinary lifecycle work; if it
51 cannot proceed, the reason is a stated gate, not a bypass.