Skip to content

Point Every Worktree-Finishing Skill at pr_review.py cleanup - #3188

Merged
ptr727 merged 5 commits into
developfrom
feature/cleanup-skill-wiring
Oct 17, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/cleanup-skill-wiring

Conversation

@ptr727

@ptr727 ptr727 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

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 into develop, and cleanup --sweep for what an interrupted or abandoned session left behind. These replace the raw git 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 no develop pull request covers (a promotion's worktree, a detached helper, a standalone clone). A separate base-clone step handles a base=kept outcome. A sweep bullet runs --apply only on the maintainer's go-ahead.
  • drive-pr step 4, pr-review-conduct's post-merge line, and backlog-burndown "Cleanup Is the Orchestrator's" now name the command.
  • merge-and-release step 8's hand-written defensive sweep is now one merged-PR lookup per branch, followed by the command and a --sweep report.
  • unattended-handoff step 7, resync-a-repo, and audit-a-repo gain the cleanup step they lacked.
  • git-commit-conventions's post-squash -D exception now admits a branch tip behind the verified head, which is what cleanup deletes.

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-review passes ran at the frontier tier, raising 13 introduced findings, all fixed. The last one, the -d upstream claim that Copilot also raised, was fixed by leaving a promotion branch to cleanup --sweep, which reads it as finished once origin/main contains it. pr-review-conduct's loop-completion rule now names that exception. Nothing remains open.

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 17, 2026 13:53
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>
Copilot AI lite review requested due to automatic review settings October 17, 2026 21:02
@ptr727

ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 41bade7f1bd28dc01171997368623f27a2f0cd17, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3a9f3454-102d-4345-80c8-1e500f78e1ed
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 assume git branch -d can 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

Comment thread .agents/skills/backlog-burndown/SKILL.md
Comment thread .agents/skills/repo-worktree/SKILL.md
@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@2f047fa). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3188   +/-   ##
==========================================
  Coverage           ?   65.46%           
==========================================
  Files              ?       17           
  Lines              ?     9749           
  Branches           ?        0           
==========================================
  Hits               ?     6382           
  Misses             ?     3367           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 65.46% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ptr727 and others added 2 commits October 17, 2026 14:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 6d7ecc0695dcd933096b0b1ef861aa7fe08e0e32, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 3dcb1aa into develop Oct 17, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/cleanup-skill-wiring branch October 17, 2026 21:26
ptr727 added a commit that referenced this pull request Oct 17, 2026
- #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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants