Development record
Merged work leaves no residue: abcd-managed repos delete a PR branch on merge, and abcd tidies the stale local branch, tracking ref, and worktree
Superseded by itd-2610222214476887 on 2026-10-23: the one-command cleanup covers everything this seed asked for: the merged branch on the server, the local branch, its tracking ref and its worktree (product thinker, 2026-10-23)
Press Release
Seeded from a quoted-text intent capture. Expand into the full press-release narrative before planning.
Why This Matters
Merged work leaves no residue: abcd-managed repos delete a PR branch on merge, and abcd tidies the stale local branch, tracking ref, and worktree
This is the post-merge complement of itd-115: that intent gets a ready PR into the base without out-of-sync churn; this one cleans up what the merge leaves behind — the remote PR branch, the stale local branch, its tracking ref, and any worktree checked out on it.
Acceptance Criteria
Required (the itd-1 discipline): add at least one Given-When-Then bullet describing the verifiable bar for "shipped" before this draft can be planned.
Open Questions
None recorded yet.
Audit Notes
Empty. Populated by intent-fidelity-reviewer when intent moves to shipped/.
Frontmatter
| id | itd-118 |
|---|---|
| type | intent |
| lifecycle | superseded |
| kind | standalone |
| severity | minor |
.abcd/development/intents/superseded/itd-118-merged-work-leaves-no-residue-abcd.md
open on GitHub ↗ · commit history ↗
Referenced by10
- adr-2609091014087993A tool never creates directories in user-owned project space; agent and session scratch is machine-scopedrelated
- adr-2609091248200336A tool never creates directories in user-owned project space; the store's location binds now and its verbs bind when the store shipsrelated
- adr-2610161940004937Spent reservation branches are deleted only by one GitHub App the ruleset namesrelated
- iss-2610130501296659Merged branches and spent worktrees pile up because nothing removes them: by the close of 2026-10-12 the checkout held 137 local branches (83 already merged into main), 94 worktrees and 4 merged remote branches, and a person had to ask for the cleanup by hand. The person asked (2026-10-13) that a future drain and similar runs do this automatically. Done by hand that day with a read-only inventory (merged into origin/main, contained in a kept branch, PR state, worktree clean, local-tier file count) and a dry run before acting: 92 local branches, 40 worktrees and 4 remote branches removed, every worktree's local tier archived first. Draft itd-118 (merged work leaves no residue) and planned itd-2609091014076309 (the worktree store and its reclaim) describe the want; neither runs at the end of a drain or a cut.related
- iss-2610262042403190Both itd-106 and itd-118 have abcd switch on deletion of merged PR branchesrelated
- iss-2610262043385436itd-2609091034175565 hands reservation tombstone deletion to itd-118, whose scope covers PR branches and local residue onlyrelated
- itd-148Every change starts in its own worktree in abcd's store: the primary checkout is a read-only surface, and abcd blocks mutations there for every session but a declared coordinatorbuilt on by
- itd-2609091014076309Session and agent worktrees live in a machine-scoped store that abcd lists and reclaims, never beside the user's own projectsrelated
- itd-2609091034175565Before an agent starts on an item, it reserves it on the shared remote, and everyone who works on the project sees the reservationrelated
- itd-2610222214476887One command shows everything a repository has left lying around, and clears what is provably finishedsuperseded by
mentions10
- adr-2610031352212697Claims are branches on the shared remote; nothing kept on one computer is the register; claim text is data
- dcn-26102711123300702026-10-27 — The product thinker ruled on 2026-10-27 that a repository's delete-branch-on-merge setting is the technical facilitator's: where the repository's facilitator mode is autonomous, abcd sets it; where it is human, abcd reports it as a gap and changes nothing. The ahoy chapter's stance that abcd mirrors merge-hygiene settings and never sets them gains that one exception, owned by itd-118 and cited by itd-106.
- iss-2609170640135192A local branch whose pull request has merged is never pruned, so a checkout accumulates them until somebody sweeps by hand: this checkout held 57 on 2026-09-17, one per landed PR since early September. The sweep cannot be 'git branch --merged', because the repository allows squash and rebase merges and those leave no ancestry, so 20 of the 57 read as unmerged by ancestry and were provably merged only by patch-id or by the forge's PR state; and a branch checked out in a worktree survives the sweep until the worktree is removed. abcd knows the merge state (the resolution gates already read origin/main and the PR), so the install step or a fetch-time pass could list the merged branches and remove them on consent, never one with unmerged patches, never one a worktree holds, and never a name matching a backup pattern.
- iss-2610050532499080Nothing removed the spent worktrees and branches after the v0.13.0 cut (tagged 2026-10-05), so the checkout still carries work that is already on main, and abcd peers reports 35 live peers and 51 differing records, which buries what is actually in flight.
- iss-2610142200389875The reservations ruleset forbids deleting refs/heads/abcd-reserved/** with no bypass, so every spent reservation branch stays on the forge forever, counting against its per-repository branch limits and against the intent's 'needs occasional clean-up' (decision 10 of itd-2609091034175565); the rulesets README notes the itd-118 sweep needs the ruleset amended first.
- itd-1Every Intent Has Acceptance Criteria; Every Audit Verifies Them
- itd-115A Ready PR Merges Without Ever Wedging BEHIND
- itd-2610120738075547Work handed to a cloud session comes back, or says why not
- spc-42every-change-starts-in-its-own-worktree-the-primary-checkout
- spc-2610031753359849Reservations on the shared remote: `abcd reserve`, one liveness judgement, and the build, drain and land integration