LLM Wiki Lint
Run structural and content-risk health checks on wiki/, audit outputs/ for promotable knowledge, and save a durable report to outputs/.
Required reads
.llm-wiki/profile.json- Active profile markdown
wiki/index.mdwiki/log.mdwiki/SCHEMA.mdwhen present
If wiki/index.md is missing, stop and ask the user to initialize or repair the workspace first.
Step-by-step procedure
1. Resolve workspace and active profile
Read .llm-wiki/profile.json and the active profile markdown.
Keep in memory:
- wiki taxonomy
- authority rules
- profile-specific drift checks
- content-risk priorities
2. Read the index first
Read wiki/index.md and parse the listed slugs/paths.
Use the index as the canonical navigation map for the lint pass.
Initialize result buckets:
broken_wikilinks(when SCHEMA link dialect iswikilinkor unset)broken_markdown_links(when SCHEMA link dialect ismarkdown)missing_anchorsorphansindex_omissionsthin_pagesduplicate_or_overlapping_pagescontent_risk_warningsprofile_specific_warningspromotion_candidatesstale_outputs
2b. Resolve link dialect
Read wiki/SCHEMA.md when present and resolve the workspace link dialect:
wikilink(default) — Obsidian[[…]]cross-referencesmarkdown— standard Markdown[title](relative/path.md)links (OKF-friendly)
If SCHEMA omits the dialect, default to wikilink for backward compatibility.
Do not mix dialects in findings; check only the active dialect.
3. Run structural checks across wiki/
At minimum, check:
- broken cross-page links for the active dialect (
broken_wikilinksorbroken_markdown_links) - missing anchors
- orphan pages
- index omissions
Rules:
- treat these as hard structural findings
- report exact file paths and targets
- use
wiki/as the compiled root, not the workspace root
4. Run content-health checks
Check for:
- thin pages
- duplicate or overlapping pages
- stale contradiction notes
- unsupported claims that appear stronger than their sources justify
- pages relying too heavily on weak sources when the profile expects stronger ones
Rules:
- treat these as content-risk findings, not structural breakages
- preserve distinction between "broken" and "risky"
5. Run profile-specific checks
Use the active profile to decide what special drift audits matter. Examples may include:
- README vs config/reference drift
- flow vs edition drift
- legacy terminology drift
- customer-facing over-claim risk
- missing high-level comparison/query pages for repeated questions
If the profile defines no special checks, skip this section cleanly.
6. Audit outputs/ for promotion candidates
If outputs/ exists, inspect it for files that may contain durable knowledge not yet represented in wiki/.
Classify findings into:
- keep in
outputs/as non-canonical artifact - promote into
wiki/during maintenance - stale/redundant artifact
Rules:
- do not treat
outputs/as part of the normal query base - do not auto-promote content during lint unless the user explicitly asked for fixes or a maintenance run that includes promotion
- prefer recommending promotion in the report; actual promotion should normally happen during reflection or an explicit maintenance pass
7. Write a durable lint report
Write outputs/YYYY-MM-DD-lw-lint-report.md.
Include:
- summary counts
- hard structural findings
- content-risk warnings
- profile-specific warnings
- outputs audit findings:
- artifacts that are clearly non-canonical and should remain in
outputs/ - markdown artifacts that contain durable knowledge and should be promoted into
wiki/ - stale or redundant artifacts that may be archived or deleted
- artifacts that are clearly non-canonical and should remain in
- prioritized next actions
8. Update wiki navigation and log
- Add the lint report to
wiki/index.mdonly if the workspace indexes outputs/reports there - Append a log entry to
wiki/log.md - Use the workspace's normal log style when it has one
9. Print terminal summary
Return:
- hard structural counts
- content-risk counts
- promotion-candidate counts
- top-priority follow-up actions
- lint report path
Hard rules
- Separate structural failures from content-risk warnings.
- Use the active profile to decide which drift checks matter.
- Do not silently repair content during lint unless the user explicitly asked for fixes.
- Use exact file paths in findings whenever possible.
- Treat
wiki/as canonical andoutputs/as non-canonical.