Pillar 1 · Corpus (the asset)
Parent: key-designs
The owner's knowledge base — the moat. One table, corpus_notes, with a genre column (raw / wiki / output / subjectivity / writing) — the three tiers are still raw→wiki→output (isomorphic to an Obsidian vault's raw→wiki→output), but the separate raw_entries / wiki_entries / output_entries / writings tables were folded into that one structure on 2026-07-09 (d925d9081 raw, bfb8c7129 writings; backend/db/schema.sql:189). A parent_id derived-path tree (no path column; re-parenting is free), and note_refs backlink edge tables (renamed from wiki_refs, 4fc769d61, 2026-07-06) rebuilt declaratively from [[wikilinks]]. Fields: excerpt (was summary), published (was seo_indexed). Ingress today = full vault SyncVault (raw + writing + wiki/subjectivity + CSS) + writings export/import + admin direct writes; egress = the landing/reader (app/src/app/wiki|output|writings) and the agent's retrieval tools.
Status: the corpus-as-vault block has landed — all three faces built: feed (SyncVault wires raw + writing + wiki/subjectivity + .obsidian CSS; output stays promote-derived; reverse export writes wiki/subjectivity/output back as genre folder + tree + folder-notes since 2026-07-29 — backend/internal/corpus/obsidian/export_corpus.go, 9f1ffcf13 — alongside writings/<slug>.md), crawl (Meili FTS + corpus_links 1-hop over note_refs, ACL in query), render (KaTeX + Mermaid + callouts + TikZ + widgets). Sync is now a sync-mode connector (backend/internal/connector/obsidian.go).
Data model (ER)
media_assets (three genre FKs, zero writers) is gone; media now lives in an owner-scoped global asset pool — assets + asset_references, a referenced asset cannot be deleted (d81d2782a, 2026-09-05; backend/db/schema.sql:585-613).
Two link estates on purpose: note_refs for the corpus tree, writing_refs for writings — both rebuilt declaratively, never hand-maintained (backlinks-as-rebuilt-edge-tables). Writings vs the corpus tiers is a standing confusable (confusables) — even now that both are rows of corpus_notes, writing addressing stays flat and slug-keyed while wiki/output paths derive from the tree.
Children
- corpus-diagram-coverage — diagram-coverage ledger.
- derived-path-corpus-as-filesystem —
parent_idtree, paths derived not stored. - three-tier-corpus-promotion — raw→wiki→output as the curation pipeline.
- backlinks-as-rebuilt-edge-tables —
note_refs/writing_refs, declaratively rebuilt. - global-asset-pool — one owner-scoped
assetspool +asset_referencesrecomputed from content on every save; a referenced asset refuses delete and names its referrers. - corpus-retrieval — Meilisearch lexical (Postgres FTS fallback) + tree +
corpus_links(1-hop; the agent drives depth — the BFS was the wrong model) (no vector, by choice). - writings-import-export — the obsidian subsystem: zip layout, publish-gate, source-path/slug idempotency (the web-edit guard is gone — the vault is the single live source), whole-batch link resolution; identity keyed on title, and a rename deliberately orphans.
- obsidian-sync-mechanism — the sync design (protocol / vault-ingestion / rendering-and-extensibility); all genres wired both ways, and it now runs as a sync-mode connector.
- rendering-engines — render symmetry: KaTeX · Mermaid · TikZ · callouts · widgets, all live.