1# tools 2 3| Script | What | 4| --- | --- | 5| `build` | What `wrangler` runs before serving or uploading: the Worker, and the preview when stale. | 6| `preview` | previewgen, then resvg, then ffmpeg: `card.png` and `loop.mp4` (and a stamp of what they were drawn from), byte-for-byte reproducible. | 7| `preview-hash` | One hash of everything the preview is drawn from (sources, the shared look, the default mascot). `preview` stamps it beside the files; `build` and `check-preview` compare it, so a stale card is caught by content, not file times. | 8| `check-preview` | Validates those files (PNG size; MP4 H.264, yuv420p, even sides, declared size, faststart, silent, short, under 4 MB). Proven to fail on a bad file. | 9 10Run them through mise: `mise run web:dev` (which runs `build`), `mise run web:preview`, `mise run web:check-preview`.