lint
Health-check the wiki for orphan pages, stale index entries, missing Sources sections, and contradictions.
Wiki Lint
Run a health check on the wiki and report issues. Do not auto-fix anything — output a report only.
Step 1: Verify Wiki Exists
Use Glob to check for wiki/ and index.md. If either is missing, output:
Wiki not initialized. Run /wiki-init first.
Then stop.
Step 2: Collect All Wiki Pages
Use Glob to list all .md files under wiki/. This is your ground truth for
what pages exist.
Step 3: Check — Orphan Pages
Read index.md. For every wiki page you found in Step 2, check whether it
appears as a link in index.md.
Pages not referenced in index.md are orphans.
Step 4: Check — Stale Index Entries
For every link in index.md, verify the linked file actually exists on disk.
Links pointing to non-existent files are stale entries.
Step 5: Check — Missing Sources Sections
Read each wiki page. Check whether it contains a ## Sources section.
Pages missing ## Sources are attribution violations.
Step 6: Check — Contradictions (best-effort)
For entity pages (wiki/entities/), check whether the same entity is described
with conflicting facts across multiple pages. Look for obvious contradictions
(e.g., one page says "founded in 2020", another says "founded in 2018").
This check is best-effort — flag anything that looks suspicious. Only flag contradictions you are confident about. When in doubt, do not flag.
Step 7: Output Report
Format the report exactly as follows:
Wiki Lint Report
================
Errors (must fix):
[E001] Stale index entry: wiki/concepts/old-page.md (file not found)
[E002] Missing ## Sources: wiki/insights/my-insight.md
Warnings (should fix):
[W001] Orphan page: wiki/entities/some-entity.md (not in index.md)
[W002] Possible contradiction: wiki/entities/openai.md and wiki/entities/openai-company.md
both describe OpenAI — consider merging
Summary: <N> errors, <N> warnings
If no issues found:
Wiki Lint Report
================
All checks passed. No issues found.
Pages checked: <N>
Index entries: <N>
Do not modify any files. The user decides what to fix.