How to use
- Copy the installation command and review the source package before installing it in your own agent environment.
- Check the source document for required tools, credentials and supported hosts.
- Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/venhdev/zenforge --skill sweepBefore you start
- Installation does not include a model subscription, API allowance or permission to access your files.
- Repository stars and installation counts describe activity, not an independent quality or security test.
Original skill document
Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.
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.
2. State
CLEAN: Workspace contains zero uncollected transient artifacts.STAGED: Reclaimable items identified and staged for user approval.DONE: Approved deletions executed and filesystem state verified.UNRESOLVED: Dirty working trees or unverified task states prevent safe deletion.
Canonical Output Contract
markdown
# Sweep Manifest: Workspace Hygiene · <CLEAN | STAGED | DONE | UNRESOLVED>
| Dimension | Target Coordinate | Reclamation Action |
| :--- | :--- | :--- |
| Scratch | .agents/scratch/<file_or_dir> | Delete ephemeral trace / PoC |
| Tasks | .agents/tasks/<feature-slug>/ | Delete completed feature collection |
| Worktree | .agents/worktree/<branch>/ | Remove worktree and prune metadata |
| Branch | <branch_name> | Delete squash-merged local branch |
Summary: <N> items staged for purge.
*(omit if clean)* Gap: <Blocker preventing deletion, e.g. dirty worktree.>Routing
- Workspace is CLEAN, continue development → (via /forge).
- Unfinished tasks detected during audit → (via /track-tasks).
- Ambiguous branch or task ownership → (via /clarify).
Execution Protocol
- Audit: Scan
.agents/scratch/,.agents/tasks/,.agents/worktree/, and local branches. If clean, outputCLEANand halt. - Stage: Group candidate deletions by dimension, verify all safety constraints (zero uncompleted tasks, zero dirty trees), present
STAGEDmanifest, and halt for authorization. - Purge: On approval, delete staged files/directories, run
git worktree prune, executebash scripts/prune-squashed.sh, and reportDONE.