Development record
abcd has no single verb that cleans up a repository: after the 2026-10-22 crash this checkout held 189 worktrees (most on merged branches, some dirty), 86 reservation branches on origin (66 expired, 20 released), unmerged local branches, and inbox reports not yet pulled into the ledger, each needing its own manual pass. The person wants an abcd sweep verb that does everything a good cleanup needs: worktrees, branches, reservations, pulling in the inbox items, and so on.
abcd has no single verb that cleans up a repository: after the 2026-10-22 crash this checkout held 189 worktrees (most on merged branches, some dirty), 86 reservation branches on origin (66 expired, 20 released), unmerged local branches, and inbox reports not yet pulled into the ledger, each needing its own manual pass. The person wants an abcd sweep verb that does everything a good cleanup needs: worktrees, branches, reservations, pulling in the inbox items, and so on.
Evidence: hand-run survey and sweep, 2026-10-24
A survey of this checkout at 14:30 CEST, with 8 peer sessions live (4 busy), sorted every ref into "remove now", "keep" or "a person decides". It used origin/main ancestry, patch-equivalence (git cherry), the forge's PR state, worktree dirtiness, and the cwd of every live process.
- Remote branches (18, excluding reservations): 7 removed. Each one's tip was an ancestor of origin/main and had no open PR. Four came from PRs merged with
delete_branch_on_merge: trueset (#1055, #1071, #1072, #1073), so the forge setting alone does not clear them. Two had no PR because their content landed through a stacked PR (feat/announce-step4,feat/drain-steps5-7). One belonged to a closed PR whose content landed elsewhere (#1064). The deleted tips can be recovered by SHA: aaacdcad5, 59c8b54b0, 9e76b238f, 380ae0e9f, 005b38128, 84aec70af, b15e2e48a. 11 kept: 6 with open PRs (#982, #996, #1010, #1105, #1110, #1116),abcd-status/<login>, the queue ref for #1120,capture/iss-2610240827243654(queued),design/autonomy-grant(live work), and origin/main. Three open PRs are stale enough for a person to rule on: #982 (since 2026-10-18), #996 (2026-10-14) and #1010 (177 commits ahead). - Reservation branches (132): 40 expired, 87 released and 5 live. None were deleted by hand: the reservation-sweep workflow (#1111) owns them and has not run yet. Its secrets
RESERVATION_SWEEP_APP_ID/RESERVATION_SWEEP_APP_KEYdid not appear ingh secret listfrom this account, so the first run may be the dry run. - Local branches (24) and worktrees (24): none removed. Every one was either ahead of origin/main with no PR (that day's unlanded work), dirty, the cwd of a live process, or the embargo store (9 untracked private reports). The only clean candidates were
fix/external-review-events, at the old main with zero commits and no process in its worktree, andfix/embargo-guards, whose worktree is dirty. The first was created 70 minutes earlier and could not be told apart from a live session's lane that had not started. Nothing links a worktree to the session that made it (iss-2608220750029993).abcd peerslists both asmerged, which is wrong: iss-2610241240234678. Localmainsits 35 behind origin/main, and the main checkout holds uncommitted changes and is the cwd of 12 processes.
What the survey shows a sweep needs:
- Forge merge state and patch-equivalence, not just ancestry.
- Live-session ownership of each worktree.
- A third category, "a person decides", for stale open PRs.
- Deference to the reservation workflow instead of acting itself.
- Enforcement in the guard, so a hand-run delete cannot skip these checks. One run here did skip them: a check-then-act loop called
abcd guard checkwith the wrong syntax, ignored the nonzero result and deleted anyway. The guard would have allowed the deletes regardless, because it has no rule for them (iss-2610241239492159). Undergo run, exit codes collapse to 1 (iss-2610241240133009).
Frontmatter
| id | iss-2610222001116066 |
|---|---|
| type | issue |
| lifecycle | open |
| severity | minor |
.abcd/work/issues/open/iss-2610222001116066-abcd-has-no-single-verb-that-cleans-up-a.md
open on GitHub ↗ · commit history ↗
References1
- itd-2610222214476887One command shows everything a repository has left lying around, and clears what is provably finishedrelated
mentions6
- iss-2608220750029993Session-presence detection for shared checkouts: each live session leases a marker (session id, intended branch, started-at) in the checkout, and the pre-commit gate warns when another live session's lease is present — the armed-detector rung of the AGENTS.md concurrent-session conventions, which are vigilance-only until this ships. Lease home needs thought: the local tier is per-worktree by design, and the hazard is precisely two sessions in ONE worktree, so the lease belongs to the checkout, not the branch.
- iss-2610240827243654The documented CLI install one-liner (README and docs/how-to/install.md) is far too complicated to be a one-liner: a single sh -c string of roughly 3,000 characters that unsets proxy variables, refuses a symlinked ~/.abcd.noindex, maps uname output to a release asset, downloads it and checksums.txt, verifies the checksum, probes gh attestation verify for four flags, resolves the latest tag and its commit through the GitHub API, verifies build provenance, prints a long fallback warning, installs to ~/.local/bin and writes ~/.abcd.noindex/path-entry. Nobody can read, audit or safely retype it, and a reader cannot tell what they are agreeing to run.
- iss-2610241107435264A crashed copy strands records it reserved but never pushed, and nothing says so. After the 2026-10-24 crash, origin holds expired reservations whose footprints name records that exist nowhere on origin. Under reservation iss-2610222001116066 they are:
- iss-2610241239492159abcd guard has no hazard for deleting a branch or a worktree: git push origin --delete, git branch -D and git worktree remove are all allowed whatever the target holds, so the safety of a cleanup rests on the agent remembering its own checks. On 2026-10-24 a hand-run sweep's check-then-act loop invoked abcd guard check with the wrong syntax, read the nonzero exit as an objection, printed it and deleted seven remote branches anyway; the deletes were safe only because the survey before them was right, and the hook would have allowed them regardless. A guard has to be enforced at the hook, not hoped for in a script.
- iss-2610241240133009In a source checkout every abcd invocation is go run ./cmd/abcd, and go run turns every nonzero exit into 1: the binary's exit 2 (guard unevaluable, a usage error) and exit 3 (reserve: back off) both arrive as 1, the same code as a guard block. Measured 2026-10-24: guard check on an unterminated quote exits 2 as a built binary and 1 under go run. The dogfooding rule therefore makes the documented exit-code contract unreadable to the agents it governs, and a script that branches on exit 3 never sees it.
- iss-2610241240234678abcd peers lists a worktree whose branch has zero commits past an older main as merged (fix/external-review-events, created 70 minutes earlier by a live session and not yet started): an unstarted lane reads as spent work, which invites any sweep that trusts the listing to delete a peer's fresh worktree.