You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebuild the branch cleanup tooling so it can audit every remote branch and sort each one into KEEP, DELETE or DISCUSS. It must never delete a branch by itself: deletions only happen through a draft PR that a person approves. The specification is .github/specs/009-audit-branch-cleanup/.
scripts/cleanup-branches.js rewritten as a report-only CLI (npm run audit:branches, npm run audit:branches:json), with dry run as the default and direct deletion refused
Tests for categorisation, git and PR helpers, audit helpers, report formatting, and the CLI (git, gh and filesystem mocked)
CHANGELOG entry: "Branch Cleanup Reports" under Added
claude/* auto-approval rule switched off until a branch-age signal exists (spec 018 FR-020, task T053; f4fcec75)
Spec 009 tasks.md ticks brought up to date (f4fcec75)
The CLI only reads branches and writes Markdown or JSON reports. When open-PR status can't be verified, candidates are marked DISCUSS rather than DELETE. --dryRun=false no longer deletes branches; the only workflow that used the old behaviour is archived.
Definition of Ready (DoR)
Task described and scoped
Estimate added if relevant
Definition of Done (DoD)
Task completed and documented
Changelog entry prepared for PR
PR uses correct branch prefix (task/)
Documentation/changelog updated if needed
Branch deleted after merge
Linked issue(s) updated with latest status and closed after merge,
The related epic should not be closed, instead updated with a comment to reflect the closed issue
Task Summary
Rebuild the branch cleanup tooling so it can audit every remote branch and sort each one into KEEP, DELETE or DISCUSS. It must never delete a branch by itself: deletions only happen through a draft PR that a person approves. The specification is
.github/specs/009-audit-branch-cleanup/.Linked Stories/Tasks
Milestones & Timeline
5231213b. Theclaude/*auto-approval rule was switched off inf4fcec75, as spec 018 T053 requires, so nothing in this PR blocks the merge.Acceptance Criteria
Steps / Checklist
scripts/lib/:constants,age-calculator,git-merge-utils,github-pr-utils,exclusion-patterns,branch-utils,branch-categorization,report-formatterscripts/cleanup-branches.jsrewritten as a report-only CLI (npm run audit:branches,npm run audit:branches:json), with dry run as the default and direct deletion refusedghand filesystem mocked)claude/*auto-approval rule switched off until a branch-age signal exists (spec 018 FR-020, task T053;f4fcec75)tasks.mdticks brought up to date (f4fcec75)branch-audit.ymlworkflow and the approval-gated deletion step (spec 009 T046, T047, T073) are not in feat: branch-cleanup - Add report-only branch audit CLI #3358 and need their own issue before this one closesDependencies
claude/*branch may be auto-approved for deletion based on its tip-commit age. Met on feat: branch-cleanup - Add report-only branch audit CLI #3358.Additional Context
The CLI only reads branches and writes Markdown or JSON reports. When open-PR status can't be verified, candidates are marked DISCUSS rather than DELETE.
--dryRun=falseno longer deletes branches; the only workflow that used the old behaviour is archived.Definition of Ready (DoR)
Definition of Done (DoD)
🤖 Generated with Claude Code