ai-branch-cleanup

Solid

Cleans branches safely: switches to the default branch, prunes merged and squash-merged branches, syncs to remote, sweeps stale specs, rotates `.ai-engineering/runtime/` per retention policy. Trigger for 'tidy up', 'tidy branches', 'sync to main', 'delete old branches', 'start fresh', 'rotate runtime'. Auto-invoked by /ai-pr after merge. Not for committing changes; use /ai-commit instead. Not for code-level dead-code removal; use /ai-simplify instead.

AI & Automation 52 stars 3 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
57
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Branch Cleanup ## Quick start ``` /ai-branch-cleanup # full: sync + branch cleanup + spec sweep + runtime rotate + report /ai-branch-cleanup --sync # sync to default branch only /ai-branch-cleanup --branches # branch cleanup only /ai-branch-cleanup --specs # spec lifecycle sweep + _history.md rotation /ai-branch-cleanup --runtime # rotate .ai-engineering/runtime/ per retention policy /ai-branch-cleanup --consolidate-spec <slug> # delete finalised spec, append _history row ``` Full repository hygiene: safely migrate to the default branch, delete merged and squash-merged branches, rotate runtime artifacts, and produce a per-branch status report. No destructive operations without confirmation. ## When to Use - Session start, after merging PRs, between tasks, before `/ai-brainstorm`. - NOT for committing -- use `/ai-commit`. ## Process Default (no flags) is equivalent to `--all`: runs sync, branch cleanup, and report. ### Phase 0a: Instinct consolidation (default / `--all`, fail-open) 0. **Consolidate session learnings BEFORE switching branches** -- if `.ai-engineering/observations/observations.yml` exists, run `/ai-session-watch --review` to fold this session's observations (especially the LLM-only `corrections` family) into the corpus. This closes the no-commit/no-PR gap: a session that ends at tidy-up time — without a `/ai-commit` or `/ai-pr` having run `--review` — still consolidates its learnings instead of losing t...

Details

Author
arcasilesgroup
Repository
arcasilesgroup/ai-engineering
Created
4 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category