Worktree hygiene
repository_manager_worktree_hygieneAudit session worktrees before releases, classify safe-to-prune versus do-not-disturb, and optionally remove only merged worktrees and dangling admin pointers.
Instructions
Audit (and optionally prune) session worktrees as a release-flow step.
Wraps :meth:WorktreeManager.audit. Read-only by default — it returns the
safe_to_prune/do_not_disturb classification so a release run can
report what could be cleaned without touching anything. With
prune=True it removes only merged worktrees (and dangling admin
pointers), never active/stale work or orphaned directories. This is
the audit-aware cleanup the release pipeline runs instead of a blind reaper.
(CONCEPT:RM-WORKTREE-AUDIT)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | main | |
| prune | No | ||
| stale_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||