Wiki Schema

Compilation rules for the LLM Wiki system. LLM reads this before any wiki operation.

Layers

LayerLocationWriterMaturity RangeSources From
ControlMeta/Wiki/LLM
MemoryMemory/99-Wiki/LLMstub, draftMemory/*
KnowledgeKnowledge/99-Wiki/LLMstub, draft, publishedKnowledge/*

Operations

Ingest

  1. Read source document fully
  2. Read Meta/Wiki/_index.md for existing knowledge graph
  3. Determine target layer by source location:
    • Source in Knowledge/* write wiki pages to Knowledge/99-Wiki/
    • Source in Memory/* write wiki pages to Memory/99-Wiki/
  4. Extract key concepts (one concept = one page)
  5. For each concept: update existing page or create new one in the target layer
  6. Update target layer _index.md and Meta/Wiki/_index.md
  7. Append to Meta/Wiki/_log-YYMM.md
  8. One source at a time. Discuss takeaways with user before writing.

Promote

  1. User specifies topic to promote
  2. Scan Memory/99-Wiki/ for related pages
  3. Scan Knowledge/01-Source/ and Flow/ for related sources
  4. Write NEW synthesized page(s) in Knowledge/99-Wiki/ (fresh writing, not copy)
  5. Memory/99-Wiki/ pages are NOT modified
  6. Body links in Knowledge/99-Wiki/ only point to same layer or Knowledge/01-Source/
  7. Update indexes and log

Query

  1. Read Meta/Wiki/_index.md to locate relevant pages
  2. Read pages from both layers
  3. Synthesize answer with citations
  4. Write valuable answers to Memory/99-Wiki/ as new pages

Lint

  1. Run all checks from the checklist below
  2. _index.md can be rebuilt by scanning all wiki pages (TLDR for description, filename for cross-layer matching)
  3. Drift detection uses git commit timestamps

Delete / Archive / Merge

  • Delete: remove page, update all indexes and incoming links
  • Archive: move to Knowledge/99-Archive/, update indexes
  • Merge: combine overlapping pages, update all references

Page Frontmatter

Memory/99-Wiki/ pages

---
aliases:
type: page | overview
maturity: stub | draft
created_date: YYYY-MM-DD HH:MM
modified_date: YYYY-MM-DD HH:MM
permalink: posts/{uuid()}
sources:
  - (relative path to source document)
tags: []
---

Knowledge/99-Wiki/ pages

---
aliases:
type: page | overview
maturity: stub | draft | published
publish: true | false
created_date: YYYY-MM-DD HH:MM
modified_date: YYYY-MM-DD HH:MM
permalink: posts/{uuid()}
sources:
  - (vault-root path to source document within Knowledge/*)
tags: []
---

Page Body Structure

# Title

**TLDR**: One sentence summary (used by _index.md).

## Content

Body text. One concept per page. Max ~800 words before considering split.

## Related Pages (optional)

- [[relative-link.md|Related Page]] -- brief context

Naming Rules

  • Lowercase, hyphen-separated: redis-pipeline.md
  • Chinese allowed: application-reuse.md
  • No date prefix on wiki pages
  • Sub-topics prefixed with parent: redis-pipeline.md under redis.md

Page Types

  • overview: Topic entry point, links to sub-pages
  • page: Everything else (entity, comparison, practice)

Each wiki layer only references content within its own top-level directory.

LayerBody links allowedSources allowedForbidden
Memory/99-Wiki/Memory/99-Wiki/, Memory/01-Inbox/Memory/*Knowledge/, Flow/
Knowledge/99-Wiki/Knowledge/99-Wiki/, Knowledge/01-Source/Knowledge/*Memory/, Flow/

Relative Path Rules

All body links use file-relative paths. Frontmatter sources use vault-root paths.

  • Memory/99-Wiki/ same directory: [[other-page.md|text]]
  • Memory/99-Wiki/ Memory/01-Inbox/: [[../01-Inbox/YYMM/...|text]]
  • Knowledge/99-Wiki/ same directory: [[other-page.md|text]]
  • Knowledge/99-Wiki/ Knowledge/01-Source/: [[../01-Source/...|text]]
  • Meta/Wiki/_index.md Memory/99-Wiki/: [[../../Memory/99-Wiki/page.md|text]]
  • Meta/Wiki/_index.md Knowledge/99-Wiki/: [[../../Knowledge/99-Wiki/page.md|text]]

Maturity Rules

  • stub: single source extraction
  • draft: 2+ sources, cross-referenced
  • published: comprehensive synthesis, lint passed (Knowledge/99-Wiki/ only)
  • Source = one independent input document. Same doc on different days = 1. One diary entry = 1.
  • publish:true requires maturity = published

Conflict Resolution

  • Never silently overwrite
  • Add Dispute section with both claims and sources
  • Lint flags unresolved disputes; 30-day escalation

Human Edit Handling

  • New LLM content goes into Updates section (not overwriting body)
  • Lint checks frontmatter completeness
  • If page structure deviates from template, flag for manual review

publish:true pages body links must target:

  • Knowledge/99-Wiki/ page also publish:true, OR
  • Knowledge/01-Source/ page

Lint Checklist

Structure: orphaned pages, broken links, oversized pages, missing TLDR, overview completeness, source path validity.

Content: contradictions, stale info (>12 months for API/version), knowledge gaps, unresolved disputes >30 days.

Cross-layer: Knowledge/99-Wiki/ linking to Memory/99-Wiki/ (violation), drift detection (git timestamps), index consistency.

Publish: link target compliance, maturity standard met.