Scratch Obeya stages on Windows without a \tmp folder

bun scripts/scratch-obeya.ts <stage.json> kept its scratch folders and port claims under a fixed /tmp. On Windows, Bun reads that as \tmp on the current drive, which a fresh machine doesn't have. So staging failed while picking a port, before anything was staged. Now the script uses one base folder for each platform.

PlatformBeforeNow
macOS, Linux/tmp/obeya-scratch-4480/tmp/obeya-scratch-4480 (unchanged, as docs and demos name it)
WindowsD:\tmp\obeya-scratch-4480: fails if D:\tmp is missing%TEMP%\obeya-scratch-4480, e.g. C:\Users\dev\AppData\Local\Temp\obeya-scratch-4480
Port claimsalways under /tmp, even with --dirnext to the scratch folders, in the same base folder

On a fresh Windows machine (GitHub's windows-latest runner, no D:\tmp)

The new check scripts/check-scratch.ts stages from a stage file alone, as a demo does, then sends a line through --say and stops the server. It ran on a temporary branch, first with the script from main, then with the fix:

Result on Windows
Before✗ stages without --port or --dir:
ENOENT: no such file or directory, scandir '/tmp'
After✓ stages in 5.2 s, at C:\Users\RUNNER~1\AppData\Local\Temp\obeya-scratch-4480
✓ the folder is in the system temp folder; no port claim left behind
✓ its page answers
✓ --say reaches the card
✓ --stop ends the server (2.6 s)

On Ubuntu and macOS the same check passes at /tmp/obeya-scratch-4480, as before. The run on GitHub. The temporary branch has been deleted.

From now on in every build

The Build workflow runs this check on Windows, Linux and macOS for each push to main that changes code (8 to 33 s per platform in these runs). That catches the scratch Obeya breaking on any of the three.

Checks here

✓ scripts/scratch-obeya.test.ts: a new test for the folder choice on macOS, Linux and Windows. 5 of 5 pass.
✓ Typecheck clean. The full suite: 2030 pass, 6 fail in server timing tests. Those were different ones in each run, and their files pass on their own (159 of 159).

The hero video's stage file and the site screenshots name their scratch folder through the same helper, so they keep working on Windows too.