diff --git a/CHANGELOG.md b/CHANGELOG.md index ffe9720..a931d15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 (#26): the recipe prefers the **handle** (`.login`) for `user.name`, the `{{author}}` interview default is the handle instead of a personal name, and the licence template's copyright line is stamped from `{{year}}`/`{{author}}` rather than hardcoded. +- The session-end checklist's branch item no longer strands rebase/squash-merged branches + (#28): `git branch -a --no-merged` is named as an ancestry test that over-reports on those + merge methods, the item prescribes content-based confirmation before force-deleting + (`gh pr list --state merged --head`, or `git log --cherry` for no-PR rebases) with an + explicit "never `-D` a branch that fails both checks", and the remote half is closed by the + `gh repo edit --delete-branch-on-merge` + `git fetch --prune` recipe. ## [0.5.0] - 2026-07-20 diff --git a/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md b/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md index 03f4dc6..cf6caff 100644 --- a/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md +++ b/plugins/repokit/skills/repo-standard/standard/session-end-checklist.md @@ -5,6 +5,19 @@ a minute; a session doesn't end "clean" with any box undecided. - [ ] **No undecided branches** — `git branch -a --no-merged`: for each hit, merge it, delete it, or open an issue that owns it. No silent survivors. + **`--no-merged` over-reports on rebase- and squash-merging repos** (both on by default on + GitHub): it tests ancestry ("is this tip reachable from HEAD"), not content ("did this change + land"), and both merge methods rewrite the commit — so a landed branch is reported unmerged + forever, and `git branch -d` refuses it by the same test. That is the one case where `-D` is + the correct tool, *after* confirming the change landed: + - the branch had a PR: `gh pr list --state merged --head ` lists it → landed; + - no PR: `git log --oneline --cherry main...` — every commit marked `=` has a + patch-equivalent commit on `main` (the rebase case) → landed. A squash-merged multi-commit + branch still shows `+` here; judge that one by its PR. + Then `git branch -D `. Never `-D` a branch that fails both checks. + Kill the remote half of the noise once per repo: `gh repo edit --delete-branch-on-merge` + auto-deletes merged PR branches, and `git fetch --prune` then clears the local `[gone]` + tracking stubs. - [ ] **Straight-to-main commits are one concern each** — if a commit subject needs an "and", split before pushing (the no-PR formulation of "one concern per PR"). - [ ] **Resume-state updated** — `docs/CHECKPOINT.md` (or the declared substitute) carries