Three-tier corpus by promotion
Parent: corpus
raw → wiki → output: draft → curated → polished. Entries are promoted, not copied — since the tiers folded into one corpus_notes table (d925d9081, 2026-07-09) provenance is one column, source_ids (the upstream ids: wiki←raw, output←wiki — the old source_raw_ids / source_wiki_ids normalised), plus promoted_to on the raw row (backend/db/schema.sql:186-187, :246), so you can't silently cite the same raw dump twice. Semantics: output is "safe to quote verbatim in dialogue," wiki is curated middle, raw is the loose ingest inbox — but raw is no longer title-less or flat: it is a genre in the same tree, with a title, parent_id folder nodes and inbox_* triage columns (sync-k-raw-tree.spec.ts; the admin shows raw folder nodes by name since 9cdb70f48, 2026-09-06).
This is the model the vault's raw/ → wiki/ tree mirrors.