LLM Wiki: Health Check
Audit the wiki for structural issues, content gaps, and maintenance needs.
Step 1: Inventory
- Glob all
.md files in wiki/ recursively.
- For each file, read frontmatter and extract:
title, type, tags, sources, created, updated
- Scan each file's content for all
[[wikilinks]].
- Build a page inventory and a link graph.
Step 2: Structural Checks
Broken Wikilinks
- Find all
[[Target]] references across the wiki
- Check if a page with that title exists (case-insensitive filename match)
- Report any broken links (target page doesn't exist)
Orphan Pages
- Pages with zero inbound links from other wiki pages
- Exclude
index.md and log.md from this check
- Orphans are pages nobody references — they may be forgotten or poorly integrated
Missing Pages
- Wikilinks that point to non-existent pages — these are implicit "wanted pages"
- Rank by how many pages link to them (higher = more important to create)
Frontmatter Issues
- Pages missing required frontmatter fields (
title, type, created)
- Pages with
type that doesn't match their directory (e.g., type: entity in concepts/)
- Pages with empty or placeholder content
Naming Convention Violations
- Files not using lowercase kebab-case
- Files with spaces or special characters
- Extremely long filenames
Step 3: Content Checks
Stale Content
- Pages where
updated date is more than 30 days old AND newer sources exist that mention the same entities/concepts
- Source summaries whose original source file has been modified since the summary was written
Contradictions
- Use parallel subagents to spot-check key claims across pages:
- Find pages about the same entity/concept
- Compare claims, numbers, dates between them
- Flag any inconsistencies with specific quotes from each page
Thin Pages
- Pages with very little content (< 100 words excluding frontmatter)
- Pages that are just stubs with no real information
- Source summaries that lack key takeaways
Coverage Gaps
- Entities mentioned in 3+ sources but lacking their own page
- Concepts that appear frequently in tags but have no dedicated page
- Topics where only one source covers them (single-source risk)
Step 4: Source Drift Check (Manifest)
Read wiki/.manifest.json and verify source integrity:
- For each entry in the manifest, compute the current MD5 of the source file:
md5 -q <file>
- Compare against the stored hash. Report:
- Modified sources: MD5 differs — the source has changed since last ingest. Wiki pages may be stale. Suggest running
/llmwiki:ingest to re-process.
- Deleted sources: File no longer exists on disk. Wiki pages referencing it may be orphaned.
- Untracked sources: Files in
raw/, docs/, notes/ that aren't in the manifest at all — never ingested.
- Summarize: N modified, N deleted, N untracked out of N total tracked sources.
Step 5: Index & Log Checks
Index Accuracy
- Compare
wiki/index.md entries against actual files
- Pages in the wiki but missing from the index
- Index entries pointing to deleted/renamed pages
Log Completeness
- Check that recent file changes have corresponding log entries
- Identify files with no ingest log entry (possible manual additions)
Step 6: qmd Health
Check qmd status:
qmd status
- Is the wiki collection registered?
- How many documents are indexed vs. exist on disk?
- Are embeddings up to date?
If out of sync, suggest running qmd update and/or qmd embed.
Step 7: Generate Report
Present findings organized by severity:
Critical (fix now)
- Broken wikilinks
- Contradictions between pages
- Index out of sync
- Modified sources with stale wiki pages (run
/llmwiki:ingest)
Warning (fix soon)
- Orphan pages
- Stale content
- Thin pages
- Frontmatter issues
Info (nice to have)
- Missing pages (wanted but not created)
- Coverage gaps
- Synthesis opportunities
- Naming convention issues
Statistics
- Total pages: N (entities: N, concepts: N, sources: N, comparisons: N, synthesis: N)
- Total wikilinks: N (broken: N)
- Orphan pages: N
- Average page age: N days
- Most connected pages (top 5 by link count)
- Least connected pages (excluding new pages)
Suggested Actions
Prioritized list of maintenance tasks:
- Fix broken wikilinks (list specific fixes)
- Resolve contradictions (list specific pages)
- Create wanted pages (list top 5 by demand)
- Update stale pages (list specific pages)
- Write synthesis pages for well-covered topics
Step 8: Log
Append to wiki/log.md:
## [YYYY-MM-DD] health | Wiki health check
- Total pages: N
- Broken links: N
- Orphans: N
- Contradictions: N
- Stale pages: N
- Health score: N/100
Calculate health score:
- Start at 100
- -5 per broken wikilink
- -3 per orphan page
- -10 per contradiction
- -2 per stale page
- -1 per thin page
- -2 per index mismatch
- -5 per modified source not re-ingested
- -3 per deleted source with orphaned wiki pages
- Floor at 0
1---2name: llmwiki-health3description: Check LLM Wiki health. Finds orphan pages, broken wikilinks, contradictions, stale content, missing pages, cross-reference gaps, and suggests improvements. Run periodically to keep the wiki in good shape.4---56# LLM Wiki: Health Check78Audit the wiki for structural issues, content gaps, and maintenance needs.910## Step 1: Inventory11121. Glob all `.md` files in `wiki/` recursively.132. For each file, read frontmatter and extract:14 - `title`, `type`, `tags`, `sources`, `created`, `updated`153. Scan each file's content for all `[[wikilinks]]`.164. Build a page inventory and a link graph.1718## Step 2: Structural Checks1920### Broken Wikilinks21- Find all `[[Target]]` references across the wiki22- Check if a page with that title exists (case-insensitive filename match)23- Report any broken links (target page doesn't exist)2425### Orphan Pages26- Pages with **zero inbound links** from other wiki pages27- Exclude `index.md` and `log.md` from this check28- Orphans are pages nobody references — they may be forgotten or poorly integrated2930### Missing Pages31- Wikilinks that point to non-existent pages — these are implicit "wanted pages"32- Rank by how many pages link to them (higher = more important to create)3334### Frontmatter Issues35- Pages missing required frontmatter fields (`title`, `type`, `created`)36- Pages with `type` that doesn't match their directory (e.g., `type: entity` in `concepts/`)37- Pages with empty or placeholder content3839### Naming Convention Violations40- Files not using lowercase kebab-case41- Files with spaces or special characters42- Extremely long filenames4344## Step 3: Content Checks4546### Stale Content47- Pages where `updated` date is more than 30 days old AND newer sources exist that mention the same entities/concepts48- Source summaries whose original source file has been modified since the summary was written4950### Contradictions51- Use parallel subagents to spot-check key claims across pages:52 - Find pages about the same entity/concept53 - Compare claims, numbers, dates between them54 - Flag any inconsistencies with specific quotes from each page5556### Thin Pages57- Pages with very little content (< 100 words excluding frontmatter)58- Pages that are just stubs with no real information59- Source summaries that lack key takeaways6061### Coverage Gaps62- Entities mentioned in 3+ sources but lacking their own page63- Concepts that appear frequently in tags but have no dedicated page64- Topics where only one source covers them (single-source risk)6566## Step 4: Source Drift Check (Manifest)6768Read `wiki/.manifest.json` and verify source integrity:69701. For each entry in the manifest, compute the current MD5 of the source file:71 ```bash72 md5 -q <file>73 ```742. Compare against the stored hash. Report:75 - **Modified sources:** MD5 differs — the source has changed since last ingest. Wiki pages may be stale. Suggest running `/llmwiki:ingest` to re-process.76 - **Deleted sources:** File no longer exists on disk. Wiki pages referencing it may be orphaned.77 - **Untracked sources:** Files in `raw/`, `docs/`, `notes/` that aren't in the manifest at all — never ingested.783. Summarize: N modified, N deleted, N untracked out of N total tracked sources.7980## Step 5: Index & Log Checks8182### Index Accuracy83- Compare `wiki/index.md` entries against actual files84- Pages in the wiki but missing from the index85- Index entries pointing to deleted/renamed pages8687### Log Completeness88- Check that recent file changes have corresponding log entries89- Identify files with no ingest log entry (possible manual additions)9091## Step 6: qmd Health9293Check qmd status:94```bash95qmd status96```97- Is the wiki collection registered?98- How many documents are indexed vs. exist on disk?99- Are embeddings up to date?100101If out of sync, suggest running `qmd update` and/or `qmd embed`.102103## Step 7: Generate Report104105Present findings organized by severity:106107### Critical (fix now)108- Broken wikilinks109- Contradictions between pages110- Index out of sync111- Modified sources with stale wiki pages (run `/llmwiki:ingest`)112113### Warning (fix soon)114- Orphan pages115- Stale content116- Thin pages117- Frontmatter issues118119### Info (nice to have)120- Missing pages (wanted but not created)121- Coverage gaps122- Synthesis opportunities123- Naming convention issues124125### Statistics126- Total pages: N (entities: N, concepts: N, sources: N, comparisons: N, synthesis: N)127- Total wikilinks: N (broken: N)128- Orphan pages: N129- Average page age: N days130- Most connected pages (top 5 by link count)131- Least connected pages (excluding new pages)132133### Suggested Actions134Prioritized list of maintenance tasks:1351. Fix broken wikilinks (list specific fixes)1362. Resolve contradictions (list specific pages)1373. Create wanted pages (list top 5 by demand)1384. Update stale pages (list specific pages)1395. Write synthesis pages for well-covered topics140141## Step 8: Log142143Append to `wiki/log.md`:144```145## [YYYY-MM-DD] health | Wiki health check146- Total pages: N147- Broken links: N148- Orphans: N149- Contradictions: N150- Stale pages: N151- Health score: N/100152```153154Calculate health score:155- Start at 100156- -5 per broken wikilink157- -3 per orphan page158- -10 per contradiction159- -2 per stale page160- -1 per thin page161- -2 per index mismatch162- -5 per modified source not re-ingested163- -3 per deleted source with orphaned wiki pages164- Floor at 0