sweep
Installation
SKILL.md
sweep — Workspace Hygiene & Clean-Purge Engine
Operating Invariants
- Pre-Mutation Gate: Stage all candidate deletions in the Canonical Output Contract and halt for affirmative authorization before deleting files.
- Active Work Preservation: Purge exclusively verified completed artifacts; preserve plan dossiers in
.agents/scratch/plans/containing active phases (PLANNED,CLAIMED,IN_PROGRESS,DRIFTED), task collections containingreadyorin-progresstasks, dirty worktrees, and unmerged branches. - Targeted Scope: Confine deletions strictly to
.agents/scratch/, fully completed.agents/tasks/<feature-slug>/directories, and merged.agents/worktree/paths. - Atomic Execution: Execute approved deletions atomically, prune orphaned git administrative metadata via
git worktree prune, and report reclaimed status.
Domain Rubric
1. Reclamation Dimensions
- Scratch & Dossiers: Temporary scripts (
hitl-loop.sh), subagent traces (*-dossier.md), absorbed spike directories, and completed plan dossiers (COMPLETEDorREJECTED) in.agents/scratch/. - Completed Task Collections: Feature directories under
.agents/tasks/<feature-slug>/where all contained tasks haveStatus: done. - Merged Worktrees & Branches: Clean worktrees under
.agents/worktree/and squash-merged local branches verified viascripts/prune-squashed.sh.