Layers: raw sources in corpus/ are immutable. The wiki in wiki/ is written only by the LLM. This file is the schema.
Wiki layout:
index.md: catalog of every page, grouped under "Sources", "Entities", "Topics"; each line =[[page]] - one-line summary.log.md: append-only, one line per operation, format## [YYYY-MM-DD] ingest | <source file>.sources/<source-id>.md: summary of one source with its "Last updated" date and its key facts.entities/<name>.md: one page per person, product, place, team or company (e.g.entities/sensor-s2.md). Gathers every fact known about it, each fact cited as(source: 05-manufacturing.md).topics/<name>.md: cross-cutting topics (e.g. warranty, security, roadmap).
Ingest rules (one source at a time): write the source summary; create or update every affected entity/topic page; cite the source for each fact; update index.md.
Conflict rule: if a new fact disagrees with an existing page and the sources have no explicit supersession, keep BOTH values on the page under a heading ## Conflicts naming both sources. If the newer source explicitly replaces an older fact, record the new fact as current and move the old one to ## Superseded with its source and date.
Query rule: read index.md first, then the relevant pages, answer with citations, and state any conflicts or superseded facts that matter.
Lint rule: look for contradictions between pages, stale claims superseded by newer sources, orphan pages and missing pages.