medieval-kit/scripts
CRT 0ebb3aa5ec Check the documentation against the kit it describes
REFERENCE.md was 751 lines long and said the kit had 27 models, 15,425
triangles and eleven material slots. It had 35, 31,404 and thirteen, and the
document named none of the last six models at all. A reference nobody can trust
the numbers in is worse than no reference, because a reader has no way to tell
which parts are still true.

This is the third time the same failure has happened here. It is why
`catalog-table.ts` exists — the reference once said "four items" when the kit
had twenty-three — but regenerating the TABLE never touched the prose around
it, and the prose kept its own copies of every number.

So the counts are now checked the way the geometry is: against the models
themselves, by a script that fails. `check-docs.ts` reads the built kit and
requires each of the three documents to state the right model count and
triangle total, to list every model that exists, to name none that does not,
and to get the slot count right where it is written as a word.

Mutation-tested, as everything else here is — a wrong total, a dropped model
row and a stale slot word each fail it. And that test cost me the very fix it
was testing: `git checkout REFERENCE.md` to undo a mutation threw away the
uncommitted repairs along with it. Mutation-test after committing, not before.

Two things it caught immediately:

  - The root README never stated a triangle total at all, so the number a
    reader most wants for judging whether a kit is affordable was in two of
    the three documents and absent from the front door.
  - My own first version of the slot check. It looked for any word before
    "slots", matched the ordinary phrase "material slots" several paragraphs
    earlier, found that "material" is not a number, and silently checked
    nothing — reporting nothing rather than failing. A check that passes by
    not running is worse than no check, because it reads as evidence.

`bun run check:docs`, and it is in the README's verify list with the others.
2026-08-26 18:37:18 +00:00
..
audit.ts Enforce "nothing floats", and rebuild the barrel from a reference photo 2026-08-21 12:23:11 +00:00
build-artifact.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
catalog-table.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
check-docs.ts Check the documentation against the kit it describes 2026-08-26 18:37:18 +00:00
export-glb.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
probe-tree.ts Add the oak 2026-08-23 12:47:21 +00:00
reference-shots.ts Add the reference-shot generator 2026-08-21 12:45:58 +00:00
render.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
support.ts Enforce "nothing floats", and rebuild the barrel from a reference photo 2026-08-21 12:23:11 +00:00
verify-glb.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
verify-model.ts Add the oak 2026-08-23 12:47:21 +00:00
zfight.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00