Add AGENTS.md and move the verification tools into the repo

The checks that were being run by hand lived in /tmp and would have been
lost, and the colour-contrast pass was ad-hoc enough that it missed
--dim2 entirely.

- tools/verify.js: headless smoke test. Boots the page against a stubbed
  DOM/canvas and checks all 9 tabs render, all 10 maps draw with no
  non-finite geometry and no squashed labels, dog-tag sub-checkboxes cover
  every tag in every list, no photo appears in two steps, every theme has a
  CSS block, and no personal data shipped.
- tools/theme-contrast.py: WCAG check across all themes, now also covering
  --on-acc on --acc.

Running the stricter check found real problems: --dim2 (small captions) was
2.3-3.0:1 in four themes and --acc-d was 2.7-2.8:1 in two. Lightened those.
Worst theme is now 3.2:1, all on-accent pairs are 4.8:1 or better.

- AGENTS.md documents the architecture, build stages, assertions, data
  provenance, deployment and the traps already hit, so a future session does
  not rediscover them the hard way.
This commit is contained in:
Rain 2026-09-15 17:41:48 -04:00
parent a63606b5c8
commit fbb5f02f49
6 changed files with 530 additions and 17 deletions

View file

@ -13,6 +13,8 @@ A single-file, offline-friendly companion page for 100%-ing **Metal Gear Solid 2
| `steam-proxy-worker.js` | Optional Cloudflare Worker. Same job as the Python helper, but for when the page is **hosted** somewhere instead of run locally. |
| `build/` | The sources. `index.html` is generated from these, so edit here rather than in the built file. |
| `deploy.sh` | Rebuilds and pushes to `pages` in one step. |
| `tools/` | `verify.js` (headless smoke test) and `theme-contrast.py` (WCAG check). Both run before deploying. |
| `AGENTS.md` | Orientation for anyone picking this up cold: architecture, conventions, and the traps already hit. |
## Hosting it (GitHub Pages, Netlify, Cloudflare Pages, Neocities…)
@ -21,6 +23,8 @@ A single-file, offline-friendly companion page for 100%-ing **Metal Gear Solid 2
### Updating the live site
```bash
node tools/verify.js # smoke test
python3 tools/theme-contrast.py # after touching any colour
./deploy.sh "what you changed"
```