venhdev/zenforge

sweep

Audit workspace hygiene, stage reclaimable transient artifacts, and atomically purge completed tasks, stale scratch files, and merged worktrees.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/venhdev/zenforge --skill sweep

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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 containing ready or in-progress tasks, 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

  1. Scratch & Dossiers: Temporary scripts (hitl-loop.sh), subagent traces (*-dossier.md), absorbed spike directories, and completed plan dossiers (COMPLETED or REJECTED) in .agents/scratch/.
  2. Completed Task Collections: Feature directories under .agents/tasks/<feature-slug>/ where all contained tasks have Status: done.
  3. Merged Worktrees & Branches: Clean worktrees under .agents/worktree/ and squash-merged local branches verified via scripts/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

  1. Audit: Scan .agents/scratch/, .agents/tasks/, .agents/worktree/, and local branches. If clean, output CLEAN and halt.
  2. Stage: Group candidate deletions by dimension, verify all safety constraints (zero uncompleted tasks, zero dirty trees), present STAGED manifest, and halt for authorization.
  3. Purge: On approval, delete staged files/directories, run git worktree prune, execute bash scripts/prune-squashed.sh, and report DONE.
같은 저장소의 Skills

더 많은 Skills

모든 Skills