LLM Wiki Pattern

Summary

An LLM-maintained wiki is a persistent knowledge base that compounds over time. Instead of retrieving raw documents from scratch for every question, the agent converts sources into structured Markdown pages, keeps cross-references current, records contradictions, and files useful answers back into the repository.

Local Implementation

This repository uses three layers:

Layer Path Rule
Raw sources raw/ Original material. Treat as source of truth and avoid rewriting.
Published wiki synthesis docs/ Agent-maintained summaries, concept pages, comparisons, analyses, and navigation files.
Generated site site/ MkDocs build output. Publish this directory with nginx.
Schema and private navigation AGENTS.md, raw/ Operating rules and source material that should not be exposed by nginx.

Workflows

Ingest

  1. Save the original source in raw/.
  2. Read it and identify durable concepts, entities, claims, and open questions.
  3. Create or update relevant pages in docs/.
  4. Add or revise entries in docs/index.md.
  5. Append an entry to docs/log.md.

Query

  1. Start with docs/index.md.
  2. Read relevant synthesized pages in docs/.
  3. Consult raw/ only when verification or direct source context is needed.
  4. If the answer produces reusable analysis, file it as a new or updated wiki page.

Lint

Periodically check for stale claims, contradictions, orphan pages, duplicate topics, weak citations, and missing cross-links. Record meaningful lint passes in docs/log.md.

Design Principles

  • Prefer synthesis over transient chat answers.
  • Keep raw sources immutable and wiki pages editable.
  • Make navigation cheap through docs/index.md.
  • Make history inspectable through docs/log.md.
  • Preserve source links so future agents can verify claims.

Source

AI Assistant
Selected Text