references.html is generated from REFERENCES.json. Three small command-line
tools do the work: two are plain Node (nothing to install), one is Python and
needs a virtual environment because it talks to the real internet.
None of these run automatically — you run each one by hand, in this order, whenever you add or edit an entry.
Checks REFERENCES.json against the rules the schema and the build script
both assume: required fields present, enum values valid (type,
ghostati_testability.level, ...), tags used in intervention/target/
domain are declared in tag_definitions, no duplicate slugs or titles.
- Reads:
REFERENCES.json - Writes: nothing. Prints errors/warnings to the console and exits non-zero on failure.
- Run:
node scripts-dev/validate-references.js
Run this first after any manual or LLM-assisted edit to the JSON — it's the
thing that would have caught the ghostmaxxing_relevance vs. ghostati_relevance
field-name mismatch that was in the old prompt file.
Regenerates the reference list itself. Calls the validator automatically first and refuses to build if it fails.
- Reads:
REFERENCES.json,templates/references.template.html - Writes:
references.html - Run:
node scripts-dev/build-references-page.js
The header, nav, intro copy, and the "How this archive is maintained"
section live in templates/references.template.html — edit that file
directly for wording changes. The script only fills in its {{...}}
placeholders ({{REFERENCE_COUNT}}, {{STATS_LINE}}, {{DECADE_NAV}},
{{REFERENCES_BODY}}); it never touches the rest of that file.
- Edit
REFERENCES.jsonby hand, or generate/extend it with an LLM usingPROMPT-REFERENCES-UPDATE.txt. node scripts-dev/validate-references.js— fix anything it flags.- Get the preview image in place:
- Has a paper/arXiv link →
python3 scripts-dev/extract-paper-figures.py --slug <slug>, review the candidate, move/rename it toimages/references/<slug>.png. - No paper (art/activism entry) → source or make a PNG by hand, save it
to
images/references/<slug>.png.
- Has a paper/arXiv link →
- Confirm
preview_imagein the JSON points at/images/references/<slug>.png. node scripts-dev/build-references-page.jsto regeneratereferences.html.- Open
references.htmlin a browser and spot-check the new card.
After generating or editing REFERENCES.json:
- Run
node scripts-dev/validate-references.jsand fix anything it flags — it checks required fields, enum values, and tag_definitions consistency, and will catch a wrong field name (e.g. ghostati_relevance vs. ghostmaxxing_relevance) before it becomes a silent bug in the build. - Get preview_image assets in place per the Preview-image rules above.
- Run
node scripts-dev/build-references-page.jsto regenerate references.html. It calls the validator itself and refuses to build on a failing JSON, but running it manually first gives you a clearer look at any errors.