Wiki Schema
Compilation rules for the LLM Wiki system. LLM reads this before any wiki operation.
Layers
| Layer | Location | Writer | Maturity Range | Sources From |
|---|---|---|---|---|
| Control | Meta/Wiki/ | LLM | — | — |
| Memory | Memory/99-Wiki/ | LLM | stub, draft | Memory/* |
| Knowledge | Knowledge/99-Wiki/ | LLM | stub, draft, published | Knowledge/* |
Operations
Ingest
- Read source document fully
- Read Meta/Wiki/_index.md for existing knowledge graph
- Determine target layer by source location:
- Source in
Knowledge/*→ write wiki pages toKnowledge/99-Wiki/ - Source in
Memory/*→ write wiki pages toMemory/99-Wiki/
- Source in
- Extract key concepts (one concept = one page)
- For each concept: update existing page or create new one in the target layer
- Update target layer _index.md and Meta/Wiki/_index.md
- Append to Meta/Wiki/_log-YYMM.md
- One source at a time. Discuss takeaways with user before writing.
Promote
- User specifies topic to promote
- Scan Memory/99-Wiki/ for related pages
- Scan Knowledge/01-Source/ and Flow/ for related sources
- Write NEW synthesized page(s) in Knowledge/99-Wiki/ (fresh writing, not copy)
- Memory/99-Wiki/ pages are NOT modified
- Body links in Knowledge/99-Wiki/ only point to same layer or Knowledge/01-Source/
- Update indexes and log
Query
- Read Meta/Wiki/_index.md to locate relevant pages
- Read pages from both layers
- Synthesize answer with citations
- Write valuable answers to Memory/99-Wiki/ as new pages
Lint
- Run all checks from the checklist below
- _index.md can be rebuilt by scanning all wiki pages (TLDR for description, filename for cross-layer matching)
- 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)
Cross-Layer Link Rules
Each wiki layer only references content within its own top-level directory.
| Layer | Body links allowed | Sources allowed | Forbidden |
|---|---|---|---|
| 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 Link Check
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.