Cleanup Skill
This skill documents the recommended process and rules for cleaning generated artifacts in the repository. Use this skill when performing repository housekeeping, CI cleanup, or when preparing a smaller distribution.
Rules
- •Always preserve canonical documentation and files under
docs/unless the file is explicitly a generated report (markedgenerated:or located indocs/reports/with clear origin). - •Do NOT delete files related to active or protected stories (e.g., files with
US-AI-010in the path or name) unless the owner confirms. - •Generated
test_*.txtfiles and benchmark outputs can be deleted; they are considered ephemeral and reproducible by running tests or scripts. - •If unsure, move files to
docs/archives/cleanup-<YYYYMMDD>/instead of permanent deletion. - •Before deleting, run a quick grep to ensure no tests or docs reference the file as a required artifact.
Steps
- •Identify candidates:
git ls-files --others --exclude-standardandrg "^test_.*\.txt$" -g '!docs/**'. - •Verify references:
rg "<filename>" -Sto find references in repo. - •Archive or delete:
- •Archive: move files to
docs/archives/cleanup-<YYYYMMDD>/. - •Delete:
git rm <file>and commit withdocprefix:doc - remove generated test artifacts.
- •Archive: move files to
- •Update
docs/cleanup_prompt.mdor skill metadata with the cleanup run summary.
Automation
- •Automation may run a cleanup job that removes files matching
test_*.txtexcept those underdocs/anddocs/species_audit/. - •CI jobs should not delete artifacts used for official reports unless the artifact is regenerated by the workflow itself.
Example commit message
doc - cleanup: remove ephemeral test artifacts (test_*.txt)