skills/general/project-cleanup/SKILL.md
Project and docs cleanup with confidence-based decisions. Three modes: archive done docs, fix broken project references, and compress docs (merge related files, distill verbose content to rules-only, rename for clarity). Triggers: 'project cleanup', 'docs cleanup', 'clean up docs', 'archive done docs', 'fix project links', 'audit projects', 'compress docs', 'merge docs'.
npx skillsauth add beam-ai-team/beam-next-skills project-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Script paths: Commands below use scripts/... relative to this skill’s root (the folder that contains this SKILL.md). In a full Nexus checkout, the same scripts also live under 00-system/skills/system/project-cleanup/scripts/ from the repo root.
Three modes:
archive/, fix references.The script (docs_cleanup.py) scores each file into confidence tiers. The AI uses these scores plus its own reading to decide what to do.
| Tier | Script detects | AI action |
|------|---------------|-----------|
| HIGH | Explicit "Status: DONE", "Superseded by X", all checkboxes done, DONE banner | Auto-archive. No user confirmation needed. Move to archive/, add DONE banner, fix references. |
| MEDIUM | Completion hints ("implemented in session X", "no remaining work"), no open TODOs | Read file, then archive or keep. Skim 50 lines. If content confirms done → archive. If ambiguous → downgrade to LOW. |
| LOW | Mixed signals (done + active), open TODOs/TBDs, unclear status | Read file, propose to user. Present finding with reasoning. Wait for confirmation. |
| UNKNOWN | No signals detected | Read file and assess. Many files lack markers but are clearly done or active from context. Decide based on content. |
| ACTIVE | "Status: active/in-progress", "Next Steps" section, "currently working" | Keep. Do not propose archival. |
| PROTECTED | README.md, plan.md, backlog.md, SKILL.md | Never archive. |
Archive when ANY of these are true:
Keep when ANY of these are true:
| Folder type | Convention | Cleanup approach |
|-------------|-----------|-----------------|
| docs/ (in apps) | Has archive/, README.md index | Move done → archive/, update README |
| 01-planning/ | Overview, discovery, plan, steps | Rarely archived — these define the project. Archive only if project itself is done. |
| 02-resources/ | Reference docs, research, specs | Archive superseded/completed specs. Keep active references. Create archive/ if needed. |
| 03-working/ | Scripts, WIP, scratch files | Clean aggressively. Archive completed work. Delete true scratch files (with user OK). |
| 04-outputs/ | Deliverables, reports | Archive when delivered/final. Keep if iterating. |
| Flat folder | No convention | Suggest creating archive/ if >5 done files. Otherwise just flag. |
After moving a project into archive/, fix references elsewhere that still point to the old path.
# Auto-discover project roots and check for broken refs
python3 scripts/run_cleanup.py --base-path . --check
# Fix broken refs
python3 scripts/run_cleanup.py --base-path . --fix
# List all projects and their locations
python3 scripts/run_cleanup.py --base-path . --list
<root>/<id>/ → <root>/archive/<id>/status: ARCHIVED, add archive banner../ for sibling references--check then --fix to update external referencesAudit and clean up documentation within any project or app folder.
# Scan a single docs directory
python3 scripts/docs_cleanup.py \
--path 04-apps/beam-prism-electron/docs --json
# Scan an entire project (all subdirs)
python3 scripts/docs_cleanup.py \
--project 03-projects/Beam-Next/13-beam-prism-agents-platform --json
# Scan recursively (includes subdirectories)
python3 scripts/docs_cleanup.py \
--path 03-projects/Beam-Next/09-ai-venture-studio/02-resources --recursive --json
# Archive HIGH-confidence files automatically
python3 scripts/docs_cleanup.py \
--path <dir> --archive --dry-run # preview first
python3 scripts/docs_cleanup.py \
--path <dir> --archive # execute
# Fix links to moved files
python3 scripts/docs_cleanup.py \
--path <dir> --fix-redirects
Step 1 — Triage (script)
Run the script on each target. It returns confidence-scored results:
{
"summary": {"HIGH": 3, "MEDIUM": 2, "ACTIVE": 5, "UNKNOWN": 4},
"results": {
"HIGH": [{"file": "sentry-fix-plan.md", "action": "archive", "reason": "Explicitly done: Status: DONE"}],
"MEDIUM": [{"file": "old-research.md", "action": "archive", "reason": "Completion hints: implemented in session 47; no open TODOs"}]
}
}
Step 2 — AI reads MEDIUM + UNKNOWN files
For each MEDIUM and UNKNOWN file, read the first 50–100 lines. Classify:
Step 3 — Execute
Step 4 — Verify
Run the script again on the same path. Should show 0 HIGH, 0 MEDIUM.
To clean up across all projects at once:
# 1. List all projects
python3 scripts/run_cleanup.py --base-path . --list
# 2. For each project, scan and triage
python3 scripts/docs_cleanup.py \
--project <project-path> --json
# 3. For app docs
python3 scripts/docs_cleanup.py \
--path 04-apps/<app>/docs --json
| Option | Description |
|--------|-------------|
| --path <dir> | Scan a directory (mutually exclusive with --project) |
| --project <dir> | Scan full project (01-planning, 02-resources, etc.) |
| --recursive | With --path: include subdirectories |
| --json | Machine-readable output with confidence scores |
| --archive | Move HIGH-confidence files to archive/ |
| --fix-redirects | Fix links to docs that moved to archive/ |
| --dry-run | Preview without writing |
| --base-path | Workspace root (default: .) |
| --date | Date for DONE banner (default: today) |
The script checks for:
- [x] / - [ ]--json to get confidence-scored triagerun_cleanup.py --check and show report--fix--check to verify--list--project <path> --jsonarchive/. Create it when needed. Some projects use different conventions.Reduce file count and total content weight in a docs directory by merging related files, distilling verbose content to rules-only, and renaming for clarity. Use after Mode 2 archival, or independently when the active set is too large to be useful.
Apply Mode 3 when a docs directory has:
Merge two or more files into one when they share the same audience (always read together), cover complementary not duplicated content (rules vs. inventory, or two subsystems of one domain), and the combined result stays under ~300 lines.
Merge candidates to look for:
copilot-tool-ui.md + copilot-message-history.md → copilot-engineering.md)How to merge:
## section.CLAUDE.md/README.md/a rule file; verbose explanations that restate what the code shows; history/changelog tailsRewrite a single file to remove content weight without changing its purpose. Target: 40–60% of original length.
Distill candidates:
CLAUDE.mdHow to distill:
Rename a file when the current name is verbose, has a stale date, or uses a suffix that adds no information.
Rename candidates:
architecture-review-2026-03-16.md) — the date belongs in the content, not the filename-learnings / -guide / -plan suffixes when the content is reference material, not a planboard-room-expert-panel-architecture.md → board-room.md)After renaming: fix all references (README index, ROADMAP, internal doc links) with a grep sweep.
Step 1 — Survey
List all files in the target directory with line counts:
wc -l docs/reference/*.md | sort -n
Note: total lines, number of files, and any obvious pairs/groups.
Step 2 — Categorize each file
For each file, assign it to one or more buckets:
ARCHIVE — done/historical (use Mode 2 decision framework)MERGE — belongs with another fileDISTILL — has narrative/investigation weight to shedRENAME — name is verbose or staleKEEP — clean, correctly named, right sizeStep 3 — Propose to user
Present a table:
| File | Action | Rationale |
|------|--------|-----------|
| copilot-tool-ui.md | Merge → copilot-engineering.md | Same audience as copilot-message-history.md; 67 + 85 lines = 152 combined |
| streaming-smoothness-learnings.md | Merge + distill | Investigation log; 5 gotchas are the real value; merge into copilot-engineering.md |
| board-room-expert-panel-architecture.md | Rename → board-room.md | 4-token verbose name |
| design-rulebook.md | Merge → design-system.md | Pairs naturally with design-guide-building-blocks.md |
Show the target file count: Before → After.
Step 4 — Execute (after user approval)
For each merge group (in order, largest first):
For renames:
mv old-name.md new-name.mdStep 5 — Update indexes
Rewrite the README index (or equivalent) to reflect the final file set with one-line descriptions.
Step 6 — Verify
ls -la docs/reference/ | wc -l # file count
wc -l docs/reference/*.md | tail -1 # total lines
Report: Before (N files, X total lines) → After (M files, Y total lines).
board-room.md needs no further qualification.After a cleanup run (any mode), optionally suggest the project-restructure skill if you surfaced structural pain that hygiene alone will not fix:
This is a suggestion, not a requirement: many cleanups are done without layout changes. When the user only asked for cleanup, mention restructure in closing only when the scan clearly showed one or more of the above.
project-restructure expects hygiene first (this skill), then design/moves. If the user later runs restructure, they should not skip prior cleanup of done docs and dead ends.
docs/archive/ + README index. Other projects have flat folders. Adapt.archive/ adds one ../ level. Check and fix.archive/ without a README row is invisible. Always update the index.testing
Audit registry.yaml against disk, validate SKILL.md frontmatter, find duplicates and orphans. Load when user says 'audit skills registry', 'validate beam-next-skills', 'registry drift', 'skills catalog audit', 'check registry yaml'.
tools
All Workable ATS operations — fetch JDs, search candidates, post assessments/reviews. Load when user says "fetch JD", "search workable", "push to workable", "post review", "rate candidate", "workable", "push assessment", "list jobs", or after interview-coach completes an evaluation. Replaces workable-fetch-jd and workable-push-assessment.
data-ai
Load when user mentions "tavily research", "market intelligence", "competitive research", "GTM research", or needs real-time market data for sales, marketing, or vertical strategy.
development
Shared resource library for Slack integration skills. DO NOT load directly - provides common references (setup, API docs, error handling, authentication) and scripts used by slack-connect and individual Slack skills.