The tracked data source is split into three parts:
canonical/contains the normalized JSONL used to build the database.migrations/contains forward-only SQLite schema changes.patches/contains small, sourced content changes.
canonical/ is generated by npm run data:canonical:export. Do not edit it by hand. A factual correction belongs in a new patch; a schema change belongs in a migration.
canonical data
+ migrations
+ patches
-> .cache/equilibrium.sqlite
-> .generated/documents/
Run the full rebuild with:
npm run data:rebuildThe SQLite database, generated shards, and reports are build outputs. They are ignored by Git and should not be copied into public/.
The old compressed seed is no longer part of the working tree. Its source documents and original records are retained under canonical/provenance/; the seed itself remains available in Git history at commit 43c23873.
Start by finding and inspecting the existing record:
npm run data:find -- --query "Seismic wand"
npm run data:context -- --id item:seismic-wand --format markdown
npm run data:impact -- --id item:seismic-wandThen:
- Add a small JSONL patch under
patches/. - Include stable IDs and source links.
- Run
npm run data:rebuild. - Run
npm run data:canonical:export. - Run
npm run data:canonical:validateandnpm run audit:data. - Commit the patch and the matching canonical export together.
Applied patches are immutable. A later correction should be another patch, not an edit to the old one.
- Do not hand-edit
canonical/,.cache/, or.generated/. - Do not rewrite a whole dataset to change one fact.
- Use migrations for schema changes only.
- Keep unknown or unrevealed league values empty until they have a source.
- Do not restore the retired per-domain JSON exports or mutation scripts.
- Do not create a separate
Troll Countryregion. It is part of Asgarnia in this project.
The full workflow and patch formats are documented in docs/data-platform.md.