Repository Hygiene

This policy keeps technical debt from accumulating in the repository by making file ownership, retention, and pruning rules explicit.

File Classes

Retention Rules

  1. Keep canonical, generated, and reference files in version control.
  2. Exclude ephemeral files from commits unless explicitly required by policy.
  3. Mark legacy directories in _data/repo_hygiene.yml and require an explicit retention decision.
  4. Any new top-level file or directory must be declared in _data/repo_hygiene.yml.

Pruning Workflow

  1. Detect candidates with ruby ./bin/validate_repo_hygiene.rb.
  2. Confirm that a candidate is not referenced by build scripts, templates, docs, or validators.
  3. If uncertain, quarantine under an archive path before deletion.
  4. Remove references and update _data/repo_hygiene.yml in the same commit.
  5. Run ./bin/pipeline validate.

Current Decisions

CI Enforcement

bin/validate_repo_hygiene.rb is part of ./bin/pipeline validate and enforces: