Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Data

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.

Build flow

canonical data
  + migrations
  + patches
  -> .cache/equilibrium.sqlite
  -> .generated/documents/

Run the full rebuild with:

npm run data:rebuild

The 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.

Changing a record

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-wand

Then:

  1. Add a small JSONL patch under patches/.
  2. Include stable IDs and source links.
  3. Run npm run data:rebuild.
  4. Run npm run data:canonical:export.
  5. Run npm run data:canonical:validate and npm run audit:data.
  6. 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.

Rules

  • 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 Country region. It is part of Asgarnia in this project.

The full workflow and patch formats are documented in docs/data-platform.md.