Janitor Skill
Clean the vault. Remove what's done. Keep it lean.
When to Run
- User says "clean", "janitor", "sweep", "tidy", or "clean up the vault"
- After a large ingest batch
- Periodically as maintenance
Procedure
Step 1 — Scan Tasks
Read every file in tasks/. Collect files where:
status: done
deletable: true
Step 2 — Verify Before Delete
For each candidate:
- Read the task content
- Check: does the useful information from this task already exist in a
wiki/ page?
Search only real pages — exclude index.md, hot.md and log.md.
- YES → safe to delete
- NO → extract the useful info, add it to the correct wiki page via the intake skill, THEN delete
- UNCLEAR → flag it for user review, do not delete
🔴 The exclusion is the whole safety of this step. log.md records the
filename of every file ingest creates, so a task called move-docs-site.md
puts the words "move", "docs" and "site" into wiki/ the moment it is created.
Match against the log and every task looks preserved, including ones whose
content was never written down anywhere. index.md and hot.md fail the same
way — they name pages, they do not contain them.
A filename is not information. Confirm the task's actual content — its
objective and details — is readable in a real page. If the only hit is the page
title or the log line, the answer is NO.
Step 3 — Orphan Sweep
Scan wiki/ for orphan pages:
- No inbound wikilinks from any other page
- No outbound wikilinks to any other page
- Not
index.md, hot.md, or log.md
For each orphan:
- If content is still valuable → link it from a relevant page or index
- If content is stale/empty → flag for user review
- Never auto-delete wiki pages without explicit user approval
Step 4 — Inbox Check
If inbox/ has files that look already processed (duplicates of wiki content):
- Flag them, don't delete — user decides
Step 5 — Consolidation Pass
Look for wiki pages that cover the same topic:
- If two pages overlap significantly → flag for merge, suggest which to keep
- Do not auto-merge without approval
Step 6 — Report
After every run, output a summary:
JANITOR REPORT
--------------
Tasks deleted: X
Tasks flagged for review: X
Orphan pages found: X
Duplicates flagged: X
Inbox items flagged: X
Append a one-line summary to wiki/log.md.
Update wiki/hot.md if anything changed.
Rules
- NEVER delete
index.md, hot.md, log.md, any skill, or any template
- NEVER delete without verifying info is preserved elsewhere
- When verifying, NEVER count a hit in
index.md, hot.md or log.md - those
name pages, they do not contain them. A filename match is not preservation.
- When uncertain, FLAG — don't delete
- User can override with "delete all flagged" after reviewing
- Log every deletion to
wiki/log.md
1---2name: janitor3description: Sweep the vault clean — delete tasks marked done + deletable after verifying their info lives in a wiki page, flag orphan pages, spot duplicate topics, and report every action. Use when the user says "clean", "janitor", "sweep", "tidy", "clean up the vault", or after a large ingest batch. Never deletes wiki pages without explicit approval.4---56# Janitor Skill78Clean the vault. Remove what's done. Keep it lean.910---1112## When to Run13- User says "clean", "janitor", "sweep", "tidy", or "clean up the vault"14- After a large ingest batch15- Periodically as maintenance1617---1819## Procedure2021### Step 1 — Scan Tasks22Read every file in `tasks/`. Collect files where:23```yaml24status: done25deletable: true26```2728### Step 2 — Verify Before Delete29For each candidate:301. Read the task content312. Check: does the useful information from this task already exist in a `wiki/` page?32 **Search only real pages — exclude `index.md`, `hot.md` and `log.md`.**33 - YES → safe to delete34 - NO → extract the useful info, add it to the correct wiki page via the intake skill, THEN delete35 - UNCLEAR → flag it for user review, do not delete3637🔴 **The exclusion is the whole safety of this step.** `log.md` records the38filename of every file ingest creates, so a task called `move-docs-site.md`39puts the words "move", "docs" and "site" into `wiki/` the moment it is created.40Match against the log and every task looks preserved, including ones whose41content was never written down anywhere. `index.md` and `hot.md` fail the same42way — they name pages, they do not contain them.4344**A filename is not information.** Confirm the task's actual content — its45objective and details — is readable in a real page. If the only hit is the page46title or the log line, the answer is NO.4748### Step 3 — Orphan Sweep49Scan `wiki/` for orphan pages:50- No inbound wikilinks from any other page51- No outbound wikilinks to any other page52- Not `index.md`, `hot.md`, or `log.md`5354For each orphan:55- If content is still valuable → link it from a relevant page or index56- If content is stale/empty → flag for user review57- Never auto-delete wiki pages without explicit user approval5859### Step 4 — Inbox Check60If `inbox/` has files that look already processed (duplicates of wiki content):61- Flag them, don't delete — user decides6263### Step 5 — Consolidation Pass64Look for wiki pages that cover the same topic:65- If two pages overlap significantly → flag for merge, suggest which to keep66- Do not auto-merge without approval6768### Step 6 — Report69After every run, output a summary:70```71JANITOR REPORT72--------------73Tasks deleted: X74Tasks flagged for review: X75Orphan pages found: X76Duplicates flagged: X77Inbox items flagged: X78```7980Append a one-line summary to `wiki/log.md`.81Update `wiki/hot.md` if anything changed.8283---8485## Rules86- NEVER delete `index.md`, `hot.md`, `log.md`, any skill, or any template87- NEVER delete without verifying info is preserved elsewhere88- When verifying, NEVER count a hit in `index.md`, `hot.md` or `log.md` - those89 name pages, they do not contain them. A filename match is not preservation.90- When uncertain, FLAG — don't delete91- User can override with "delete all flagged" after reviewing92- Log every deletion to `wiki/log.md`