Repository navigation
Point Every Worktree-Finishing Skill at pr_review.py cleanup - #3188
Conversation
The skills that finish a worktree now name `pr_review.py cleanup <n> --checkout <base-clone>` for a pull request merged into develop, and `cleanup --sweep` for what an interrupted or abandoned session left behind, in place of the raw `git worktree remove`, `git branch -D`, and remote delete the host-safety allowlist does not cover. merge-and-release's hand-written defensive sweep shrinks to one merged pull request lookup per branch plus the command. unattended-handoff's worker and the resync and audit runs gain the cleanup step they lacked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base clone stays put with base=kept on an exit 0, a refusal can follow the remote delete, the local tip may sit behind the merged head, and a branch outside a develop pull request still needs deleting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
Three unresolved cleanup guidance findings remain.
2 open issues
What changed in this PR
This pull request standardizes worktree cleanup through pr_review.py across canonical and generated fleet skills.
Changes:
- Adds scripted cleanup and abandoned-session sweep guidance.
- Updates merge, review, handoff, resync, audit, and branch-deletion procedures.
- Regenerates skill distributions and source digests.
Findings:
.agents/skills/backlog-burndown/SKILL.md: P1, moderate, 3 votes — replace raw cleanup commands with the approved sweep workflow..agents/skills/repo-worktree/SKILL.md: P1, moderate, 4 votes — do not assumegit branch -dcan verify against a missing upstream..agents/skills/unattended-handoff/SKILL.md: P2, nit, 1 vote — qualify the no-leftovers claim by cleanup success.
| File | Description |
|---|---|
.github/skills/unattended-handoff/SKILL.md |
Updates lane closeout guidance. |
.github/skills/resync-a-repo/SKILL.md |
Adds worktree cleanup guidance. |
.github/skills/repo-worktree/SKILL.md |
Documents cleanup and sweep procedures. |
.github/skills/pr-review-conduct/SKILL.md |
Points merged PRs to cleanup. |
.github/skills/merge-and-release/SKILL.md |
Replaces defensive cleanup steps. |
.github/skills/git-commit-conventions/SKILL.md |
Expands cleanup deletion guidance. |
.github/skills/drive-pr/SKILL.md |
Uses cleanup after merging. |
.github/skills/backlog-burndown/SKILL.md |
Updates orchestrator cleanup guidance. |
.github/skills/audit-a-repo/SKILL.md |
Adds audit checkout cleanup guidance. |
.claude-plugin/fleet-skills/skills/unattended-handoff/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/resync-a-repo/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/repo-worktree/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/pr-review-conduct/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/merge-and-release/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/git-commit-conventions/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/drive-pr/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/backlog-burndown/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/skills/audit-a-repo/SKILL.md |
Generated skill update. |
.claude-plugin/fleet-skills/.source-digests/unattended-handoff |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/resync-a-repo |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/repo-worktree |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/pr-review-conduct |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/merge-and-release |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/git-commit-conventions |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/drive-pr |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/backlog-burndown |
Updates generated digest. |
.claude-plugin/fleet-skills/.source-digests/audit-a-repo |
Updates generated digest. |
.agents/skills/unattended-handoff/SKILL.md |
Canonical skill update. |
.agents/skills/resync-a-repo/SKILL.md |
Canonical skill update. |
.agents/skills/repo-worktree/SKILL.md |
Canonical cleanup procedure. |
.agents/skills/pr-review-conduct/SKILL.md |
Canonical PR cleanup guidance. |
.agents/skills/merge-and-release/SKILL.md |
Canonical release cleanup guidance. |
.agents/skills/git-commit-conventions/SKILL.md |
Canonical deletion exception. |
.agents/skills/drive-pr/SKILL.md |
Canonical merge cleanup guidance. |
.agents/skills/backlog-burndown/SKILL.md |
Canonical orchestrator cleanup guidance. |
.agents/skills/audit-a-repo/SKILL.md |
Canonical audit cleanup guidance. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3188 +/- ##
==========================================
Coverage ? 65.46%
==========================================
Files ? 17
Lines ? 9749
Branches ? 0
==========================================
Hits ? 6382
Misses ? 3367
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
- #3186 adds the local half of post-merge cleanup to `pr_review.py cleanup`. With `--checkout <base-clone>`, it removes the merged branch's worktrees and local branch after the remote delete and fast-forwards the base clone's `develop`. `cleanup --sweep` reports, and with `--apply` removes, the worktrees and branches an interrupted or abandoned session left behind. - #3188 points every skill that finishes a worktree at those commands, in place of the raw `git worktree remove`, `git branch -D`, and remote delete, which the host-safety allowlist does not cover. The skills are `repo-worktree`, `drive-pr`, `merge-and-release`, `backlog-burndown`, `pr-review-conduct`, `unattended-handoff`, `resync-a-repo`, and `audit-a-repo`. `git-commit-conventions`'s post-squash `-D` exception now admits a tip behind the verified head. - #3190 fixes a promotion-review finding. `cleanup --sweep` now judges a branch held only by a pruned worktree entry in the same run, rather than skipping it until the next. - #3191 fixes a second promotion-review finding. `unattended-handoff` step 7 no longer claims that no worktree outlives the lane, and it names a cleanup that could not run or that failed. Installed Skills change at release. Closes #3184 Closes #1682 Closes #1693 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
PR 2 for #3184. Every skill that finishes a worktree now names
pr_review.py cleanup <n> --repo <owner>/<repo> --checkout <base-clone>for a pull request merged intodevelop, andcleanup --sweepfor what an interrupted or abandoned session left behind. These replace the rawgit worktree remove,git branch -D, and remote delete steps, which the host-safety permission allowlist does not cover.repo-worktree"Listing and Cleanup": the command, plus hand removal for trees nodeveloppull request covers (a promotion's worktree, a detached helper, a standalone clone). A separate base-clone step handles abase=keptoutcome. A sweep bullet runs--applyonly on the maintainer's go-ahead.drive-prstep 4,pr-review-conduct's post-merge line, andbacklog-burndown"Cleanup Is the Orchestrator's" now name the command.merge-and-releasestep 8's hand-written defensive sweep is now one merged-PR lookup per branch, followed by the command and a--sweepreport.unattended-handoffstep 7,resync-a-repo, andaudit-a-repogain the cleanup step they lacked.git-commit-conventions's post-squash-Dexception now admits a branch tip behind the verified head, which is whatcleanupdeletes.Generated trees are rebuilt with
scripts/build_dist.py. The closing reference for #3184 belongs on the promotion pull request.Local review
Five recorded
local-strict-reviewpasses ran at thefrontiertier, raising 13introducedfindings, all fixed. The last one, the-dupstream claim that Copilot also raised, was fixed by leaving a promotion branch tocleanup --sweep, which reads it as finished onceorigin/maincontains it.pr-review-conduct's loop-completion rule now names that exception. Nothing remains open.🤖 Generated with Claude Code