- repo-cleanup-loop.md 42 lines · 2.1 KB
Repository Cleanup Loop
Loop Engineering — a recurring janitor that keeps the repo's branch and PR list honest without deleting anything valuable.
🎯 Goal
Find stale branches and abandoned PRs, recover any work worth keeping (extract to an issue or fresh branch), and safely remove the rest.
⏱️ Schedule
Suggested interval: 7d (weekly). Because this loop can delete branches, keep the cadence slow and review its actions.
▶️ Run it
/loop 7d "Scan branches and PRs. For each stale one, decide: salvage valuable work into an issue/branch, or delete if fully merged or abandoned. Never lose unmerged work. Continue until the branch and PR list is clean."🔁 Iteration steps
- Perceive — list branches/PRs by last activity with
git-context-controller. - Reason — classify each: merged, abandoned, or contains salvageable work.
- Plan — decide salvage vs delete for the oldest item.
- Act — salvage to an issue/branch, then prune with
/branch-cleanup; thegit-workflow-manageragent guides safe operations. - Observe — confirm nothing valuable was lost; continue down the list.
🛑 Stopping condition
No stale branches or abandoned PRs remain and all salvageable work is captured.
🧩 Referenced components
command:git-workflow/branch-cleanup— prunes merged/stale branches.agent:git/git-workflow-manager— guards safe git operations.skill:git/git-context-controller— inspects branch/PR history.
💡 Example
A six-month-old spike/new-parser branch holds a useful prototype; the loop extracts it into an issue with the diff attached, then deletes the branch.
Scanned by NVIDIA SkillSpector
Automated static analysis (no LLM) · v2.12.0 · 2026-10-17
SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them.
No observations.
Learn more about NVIDIA SkillSpector.