2026-09-23·by Sijie Wang#standmeet#architecture#design

backlinks-as-rebuilt-edge-tables

Parent: corpus

[[X]] lives literally in the body (never rewritten at storage). On every save, the code extracts all [[X]], resolves them to ids, and deletes all out-edges then inserts the new set (note_refs / writing_refsnote_refs was wiki_refs until 4fc769d61, 2026-07-06; both tables now point at corpus_notes, backend/db/schema.sql:294, :639) — declarative, not incremental, so there are no edge-bookkeeping bugs. Out-degree = "sources / read next"; in-degree (by dst) = backlinks; counts are live COUNTs, no redundant column.

Resolution differs per estate: writing_refs is slug-first then title, case-insensitive (refreshCrossLinks, backend/internal/corpus/usecase/writings_save.go:185); note_refs has no slug — title plus the note's frontmatter aliases pool, case-insensitive (corpus_notes.aliases, 463411b48, 2026-08-05). No match → render the literal [[X]] (Quartz/Obsidian-compatible). The vault's own [[]] behave the same, and show_as_source controls whether a read entry is citedderived-path-corpus-as-filesystem is the sibling tree idea.

about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →