2026-09-26·por Sijie Wang#standmeet#architecture#design

derived-path-corpus-as-filesystem

Derived path — "the corpus is a filesystem"

Parent: corpus

corpus_notes (every genre — wiki / output / subjectivity, and raw too since d925d9081, 2026-07-09) has a parent_id self-ref tree but no path column. The address is derived on the fly from the parent chain + title slug (usecase.WikiTreePaths, backend/internal/corpus/usecase/corpus_tree_path.go:42). The schema comment (backend/db/schema.sql:200): corpus is a filesystem — a file's path is just which directory it sits in. The one exception is genre='writing': flat, slug-keyed, path derives as writings/<slug>.

Payoff: reparenting is free — move a node and every descendant's path updates automatically, no UPDATE sweep, no denormalized path to keep in sync. Slug-collision checks are per-parent (sibling-unique), so they scale. This is exactly the relationship the vault's own folder tree mirrors.

read next
sobre esta entrada

Una de las entradas de wiki de sijie. La IA en este sitio está anclada en el mismo corpus y responde en la voz de sijie, con citas que vuelven a entradas como esta — responder le cuesta dinero a sijie, así que espera detrás de un código: ingrese código de acceso →

derived-path-corpus-as-filesystem — Sijie Wang