The equivalent of โspring cleaningโ for a multi-session CRAFT project
Performs a full-project longitudinal audit across all sessions. Detects hallucinated state claims, orphaned references, internal contradictions, and accumulated state drift that escaped per-session checks. The equivalent of โspring cleaningโ for a multi-session CRAFT project.
Project Cleanup: Comprehensive State Audit
TL;DR
How To Start
STEP 1Specify Project and Scope
-
project_id
· string · required
Three-digit project ID to audit (e.g., “060”). -
scope
· string · optional · default: “full”
“full” = all 6 phases (~45–60 min). “quick” = phases 1, 2, 5, 6 (~20–25 min). “custom” = specify phases via phase_list. -
phase_list
· string · optional
Comma-separated phase numbers for custom scope (e.g., “1,2,5,6”). Phase 6 (synthesis) is always included. Ignored unless scope=custom. -
auto_fix
· boolean · optional · default: false
false = report-only mode (recommended first run). true = apply simple fixes with human approval. Complex fixes always require explicit confirmation.
Usage Examples
EXAMPLE 1Full project cleanup
EXAMPLE 2Quick scope audit
EXAMPLE 3Auto-fix mode
EXAMPLE 4Custom scope targeting lessons and recipes
How AI Reads This Recipe
- Pre-Flight (Step 0). Resolve scope to active phase list. Load key file paths via Glob. Verify SESSION_GROUND_TRUTH exists (requires CWK-001 session init). Initialize findings accumulator.
- File Integrity Audit (Phase 1, Cat). Check all CLAUDE.md Key Files paths exist on disk. Compare actual file line counts against latest handoff FILE_STATE claims. Detect orphaned files not referenced by CLAUDE.md, recipe index, or handoffs. Validate git state against CLAUDE.md claims.
- Handoff Chain Integrity (Phase 2, Cat). Verify handoff sequence (H001 through latest) — flag gaps, verify merge documentation. Check prior handoff chain links. Sample recent NEXT_PRIORITIES for completion evidence. Validate recipe/file references in handoffs against cookbooks.
- Lessons Learned Consistency (Phase 3, Cat). Validate LL entry count against ground truth. Check recipe ID validity in LL entries against cookbooks. Detect contradictions between adjacent LL entries on the same topic. Verify CLAUDE.md LL count alignment.
- Recipe Infrastructure Audit (Phase 4, Fernand). Validate recipe counts (INDEX vs cookbooks). Check recipe ID uniqueness across all cookbooks. Sample CLAUDE.md recipe version claims against cookbook headers. Validate dependency chains for sampled recipes.
- Cross-Reference Validation (Phase 5, Fernand). Verify all CLAUDE.md file paths exist. Sample recipe index line number accuracy. Verify git commit hashes from handoffs. Check transfer registry integrity. Validate CLAUDE.md priority completion claims.
- Synthesis & Report (Phase 6, Cat + Fernand). Score all CRITICAL and WARNING findings through CWK-024 verification gates. Fernand validates evidence-grounding of Cat’s findings. Cat validates domain context of Fernand’s findings. Generate CLEANUP-REPORT with severity distribution, detailed findings, and recommended actions. Apply auto-fixes if enabled (with human approval for each). Present summary.
When To Use This Recipe
Recipe FAQ
How often should I run a cleanup audit?
What are the six phases?
What is the difference between full and quick scope?
Should I use auto_fix on the first run?
Why does Phase 6 always run?
Version History
Get this recipe with CRAFT for Claude Cowork
Cowork recipes ship bundled with CRAFT for Claude Cowork — there’s no separate download. Clone the framework once, and your AI runs every recipe automatically when invoked.
Pull anytime to stay on the latest version — free to clone, no login or email required.
Then start your session
Once CRAFT is in your project folder, open a new Cowork session and ask Claude to initialize. For example:
You
Claude
Not familiar with Git? Download as a ZIP
No command line needed. Just download, move, and unzip:
- Open the CRAFT framework repo on GitHub.
- Click the green Code button, then choose Download ZIP.
- Move the downloaded ZIP into your Claude Cowork project folder.
- Unzip it: double-click on Mac, or right-click → Extract All on Windows.
