tidy-project
A janitor pass. Scan the project for rot, fix what is clearly safe, propose what is risky, then commit. The project keeps everything tracked, so the tree should be clean and committed when you finish.
Core principle: a destructive step never runs unattended. Safe fixes apply automatically; anything that deletes tracked content or is ambiguous is proposed and waits for a yes.
Scan list
- Stray junk —
*.log,tmp/,.scratch/, editor/OS cruft, build leftovers. TASKS.mdstaleness — completed items lingering in Now/Next; resolved Open Questions still listed.- Dead
docs/memory/pointers —MEMORY.mdlines pointing at files that no longer exist (or files with no pointer). - AGENTS.md index drift — index entries for dirs/files that no longer exist, or top-level dirs/files missing from the index.
- Broken cross-references — links between docs (CONTEXT, ADRs, TASKS) whose targets moved or were deleted.
Two classes
Safe (auto-fix):
- Delete junk that already matches
.gitignorepatterns. - Fix an index entry whose target merely moved.
- Remove a
MEMORY.mdpointer to a deleted file. - Repair a broken link whose target is unambiguous.
Risky (propose, then wait):
- Deleting any tracked file.
- Removing or rewriting a
TASKS.mditem (you might still want it). - Anything where "is this outdated?" is a judgment call.
Steps
- Run the scan. Build two lists: safe-fixes, risky-proposals.
- Apply the safe fixes.
- Present the risky list as a short numbered plan. Apply only what the user approves.
- Commit:
git add -A && git commit -m "tidy: <summary>". If nothing changed, say so and skip the commit.
Do not
- Delete tracked content without explicit approval.
- "Tidy" by deleting work you do not understand. When unsure, propose, never auto.