Wiki Maintenance & Tooling Lessons
Operational reference for anyone editing or extending this knowledge base. These are not facts about Fuller; they are the hard-won rules from building the wiki — what breaks, what works, and which conventions to follow. Synthesized from the 2026-06-27 migration session.
Editing frontmatter safely
The single most damaging class of error here is mangling YAML frontmatter with naive string tooling.
- Parse frontmatter line-based. Find the closing delimiter as a whole line (
lines.index("---", 1)), and edit only the target key's lines. Neverstr.split("---")— article slugs and bodies contain---(e.g.climate---architecture), and a substring split folds the body into the frontmatter. - Never run a DOTALL
.*over a frontmatter block. A regex like(?ms)^sources:\s*(\n(?:\s*-\s+.*\n?)*)with thesflag lets.*eat across newlines and silently strips every field aftersources:. This stripped 78 articles in one pass during migration. - For bulk metadata edits, round-trip through structured data. Have subagents return strict JSON (
{slug, tags, aliases}), then apply changes with a deterministic line-based writer. Reserve agent direct-writes for whole-file prose (compiling articles), never for patching frontmatter in place.
Sandbox & scripting constraints
catand heredocs are blocked in this environment (command not found: cat; the same applies tohead/tail/sed/awk). Generate files withprintf, Python (open(p,"w").write(...)), or the Write tool — and verify byte counts, because a failedcat >filesilently leaves a 0-byte file.- Validate field→path conversions. When migrating bullet-field records (
- **Receipt:** ...), only treat a value as a path if it is path-shaped (starts with.//../or contains/plus an extension). Free-text values like "not owned" or "in-store cash purchase" otherwise become dangling provenance links.
Layer boundaries: raw / inventory / datasets
- Books ingest by reference, not by copy. This repo is a Wiki.js site; book directories and their ebook formats are served from the repo root and stay there. Ingest a complete book as a thin
raw/repos/<slug>.mdpointer (type: repos,source:→../../../<book_dir>/, taggedingest-by-reference) plus a compiledwiki/topics/<slug>.mdoverview. An article, by contrast, is copied in full intoraw/articles/. Skim large books (index + representative chapters); do not flatten. - Collection-scale data goes in a
datasets/manifest, not per-item files. Hundreds-to-thousands of row-like records (the ~20,900-card Synergetics Dictionary) belong in adatasets/manifest — wiki as index, data external — optionally with one corpus inventory record. Surface the boundary explicitly and let the user override (they chose 365 individual inventory files for the holdings, which is their call).
Content discipline
- Establish authorship from the work's own text, not its slug or folder. In a single-subject collection, a Fuller-looking slug does not mean Fuller wrote it:
sunspotsis Steve Baer,estis L. Clark Stevens,we-are-all-astronautsis an exhibition catalog, the Coxeter geometry titles are third-party. Tag accordingly —buckminster-fuller(by) /about-buckminster-fuller/fuller-adjacent.
See Also
- Legacy Raw Source Registry (Legacy Raw Source Registry) — where the repo's external source files live, the layer these tooling lessons operate on
Sources
- 2026-06-27-ll-wiki-migration-tooling.md — the raw session lessons-learned note (7 lessons) this article synthesizes