Skip to content

repo-hygiene: add an opt-in .work/ tidy mode #5222

Description

@kyle-sexton

What happened

A whole-machine cleanup reviewed 11 .work/ items across repos. Eight belonged to PRs that had already merged or issues that had already closed. Nothing in repo-hygiene looks at .work/, so they stay until someone attributes each one by hand.

Proposal

An opt-in mode of /repo-hygiene:clean (off by default) that tidies .work/:

  1. Inventory every entry under .work/ (name, size, mtime).
  2. Attribute each to its PR or issue (from the name, a marker file, or the branch that produced it) and report that PR or issue's state.
  3. Once the PR merges or the issue closes, delete the entry or consolidate it into a uniform layout (for example .work/<issue-or-pr>/<artifact>), behind the usual confirmation gate.
  4. Entries that cannot be attributed are listed and never deleted.

Why opt-in

.work/ is the gitignored place agents put backups and scratch, so an entry may be the only copy of something. The mode has to be requested, list what it would remove first, and leave unattributed entries alone.

Evidence

git grep -F ".work/" origin/main -- plugins/repo-hygiene returns nothing, so the skill has no notion of the directory. The batch forms (#994) cover caches, build output and git only.

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

    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