schema
The saved record's layout, versions and upgrades.
Every save carries the kit's layout number (kit) and the game's layout number (version). When a game ships a new layout it raises version and supplies a migration for each older number; upgrade runs them step by step when an old save loads and fills in any new defaults. A save from a newer build is read but never overwritten, and a failed upgrade leaves the record as it was with info.failed set.
Also provides fresh (a new empty record), sanitize (fix types, keep unknown keys, never raises), checkMigrations, fillDefaults, pretty (stable JSON for display), copy and the list of standard stat names (STAT_NAMES).
Internal: saveKit.save calls it on every load. Games set version, migrations and defaults through Save.setup rather than calling this module.
Scoped to this part · feeds back into the world's score.