Repository cleanup loop
Inspect branches, worktrees, commits, and PRs; recover valuable work and remove stale state with evidence.
Use this when repo state has become hard to trust.
- List local branches, remote branches, open PRs, closed PRs, and worktrees.
- Identify unmerged commits and owners.
- Recover valuable work by opening or updating PRs.
- Archive or delete stale branches only after confirming no useful commits remain.
- Prune unused worktrees and stale remotes.
- Summarize what was recovered, retained, and removed.
Stop when every remaining branch and PR has a clear owner or purpose.