Skip to content

disk-hygiene and repo-hygiene: default to a deep, justified inventory instead of category skips #5221

Description

@kyle-sexton

What happened

The operating procedure for a machine cleanup is: always produce a recursive listing (name, extension, size, mtime, owner, producer attribution) and require a written justification for every KEEP. "Tool-managed" or "OS-owned" alone is not a reason to keep something.

The default passes of /disk-hygiene:clean and /repo-hygiene:clean do not work that way. On one machine they missed about 4.8 GB of real cruft that a deep pass found:

  • 3.4 GB of superseded Codex, Claude Code and cursor-agent binaries (old versions left beside the current one)
  • 476 MB of uninstalled plugin cache versions
  • 94 MB (about 5,000 items) of test-harness leftovers in /tmp
  • orphaned ~/.claude/projects/-tmp-* transcripts
  • broken mise trusted-config symlinks

Evidence (checked against origin/main)

  • plugins/disk-hygiene/skills/clean/SKILL.md:188-190 starts a large root with a bounded --max-depth 1 pass and fans out only "per subtree that the evidence justifies".
  • SKILL.md:71 excludes OS-owned, hidden and system entries from selection. Nothing requires a per-entry reason for the exclusion, so "OS-owned" or "tool-managed" ends the inquiry.
  • The decision procedure at SKILL.md:266-281 keeps anything uncertain and treats name-only or age-only signals as Low. That is right for deletion, but it produces no inventory of what was kept and why.
  • plugins/repo-hygiene has no machine-level listing at all.

Expected behavior

For an attended whole-machine pass, the default is a deep inventory in which every entry gets a disposition and every KEEP names a reason (who produced it, what is using it, why it must stay). A blanket "managed by tool X" is rejected unless the skill can show X still references the entry. Superseded versions of versioned installs (keep the newest and the running one) and uninstalled plugin cache versions are named categories.

Suggested direction

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.needs-triageNot yet classified. Floor until a type and one priority tier are set.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions