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

@ -31,7 +31,7 @@ try{
/* ================= THEMES ================= */html[data-theme="gruvbox"]{
--bg:#1d2021; --bg2:#282828; --panel:#282828; --panel2:#32302f; --panel3:#3c3836;
--line:#3c3836; --line2:#504945;
--txt:#ebdbb2; --dim:#a89984; --dim2:#7c6f64;
--txt:#ebdbb2; --dim:#a89984; --dim2:#8f8274;
--acc:#b8bb26; --acc-d:#79740e; --acc2:#83a598; --warn:#fabd2f; --miss:#fb4934; --ok:#8ec07c;
--on-acc:#1d2021; --bright:#fbf1c7; --field:#1d2021;
--glow1:#3c3836; --glow2:#2b2b1f; --overlay:rgba(29,32,33,.96); --steam:#83a598;
@ -40,7 +40,7 @@ try{
html[data-theme="monokai"]{
--bg:#1e1f1c; --bg2:#272822; --panel:#272822; --panel2:#2f3029; --panel3:#3b3c33;
--line:#3b3c33; --line2:#4e4f45;
--txt:#f8f8f2; --dim:#a6a28c; --dim2:#75715e;
--txt:#f8f8f2; --dim:#a6a28c; --dim2:#8d8974;
--acc:#a6e22e; --acc-d:#6b8f1a; --acc2:#66d9ef; --warn:#e6db74; --miss:#f92672; --ok:#a6e22e;
--on-acc:#1e1f1c; --bright:#ffffff; --field:#1e1f1c;
--glow1:#2f3a1e; --glow2:#33202b; --overlay:rgba(30,31,28,.96); --steam:#66d9ef;
@ -50,7 +50,7 @@ html[data-theme="solarized-dark"]{
--bg:#00212b; --bg2:#002b36; --panel:#002b36; --panel2:#073642; --panel3:#0b4452;
--line:#0f4b57; --line2:#1a6472;
--txt:#93a1a1; --dim:#839496; --dim2:#657b83;
--acc:#2aa198; --acc-d:#1a6b64; --acc2:#268bd2; --warn:#b58900; --miss:#dc322f; --ok:#859900;
--acc:#2aa198; --acc-d:#24857b; --acc2:#268bd2; --warn:#b58900; --miss:#dc322f; --ok:#859900;
--on-acc:#002b36; --bright:#eee8d5; --field:#00252f;
--glow1:#073642; --glow2:#00283a; --overlay:rgba(0,33,43,.96); --steam:#268bd2;
--k-tag:#2aa198; --k-item:#6c71c4; --k-ach:#268bd2; --k-area:#839496; --k-extra:#d33682;
@ -58,7 +58,7 @@ html[data-theme="solarized-dark"]{
html[data-theme="dracula"]{
--bg:#191a21; --bg2:#21222c; --panel:#282a36; --panel2:#343746; --panel3:#3d4055;
--line:#3d4055; --line2:#535680;
--txt:#f8f8f2; --dim:#b8bcd0; --dim2:#6272a4;
--txt:#f8f8f2; --dim:#b8bcd0; --dim2:#7484b8;
--acc:#50fa7b; --acc-d:#2f9e4c; --acc2:#8be9fd; --warn:#f1fa8c; --miss:#ff5555; --ok:#50fa7b;
--on-acc:#191a21; --bright:#ffffff; --field:#1e1f29;
--glow1:#2b2d5c; --glow2:#3a1f36; --overlay:rgba(25,26,33,.96); --steam:#8be9fd;
@ -67,7 +67,7 @@ html[data-theme="dracula"]{
html[data-theme="nord"]{
--bg:#242933; --bg2:#2e3440; --panel:#2e3440; --panel2:#3b4252; --panel3:#434c5e;
--line:#434c5e; --line2:#4c566a;
--txt:#d8dee9; --dim:#9aa5b5; --dim2:#6d7a8c;
--txt:#d8dee9; --dim:#9aa5b5; --dim2:#8290a2;
--acc:#88c0d0; --acc-d:#4e8a99; --acc2:#81a1c1; --warn:#ebcb8b; --miss:#bf616a; --ok:#a3be8c;
--on-acc:#2e3440; --bright:#eceff4; --field:#272c36;
--glow1:#3b4252; --glow2:#2b3a4a; --overlay:rgba(36,41,51,.96); --steam:#88c0d0;
@ -76,8 +76,8 @@ html[data-theme="nord"]{
html[data-theme="tokyo-night"]{
--bg:#16161e; --bg2:#1a1b26; --panel:#1f2335; --panel2:#24283b; --panel3:#2f3549;
--line:#2f3549; --line2:#3b4261;
--txt:#c0caf5; --dim:#9aa5ce; --dim2:#565f89;
--acc:#7aa2f7; --acc-d:#3d5fa8; --acc2:#7dcfff; --warn:#e0af68; --miss:#f7768e; --ok:#9ece6a;
--txt:#c0caf5; --dim:#9aa5ce; --dim2:#6f79a6;
--acc:#7aa2f7; --acc-d:#4c72c4; --acc2:#7dcfff; --warn:#e0af68; --miss:#f7768e; --ok:#9ece6a;
--on-acc:#16161e; --bright:#ffffff; --field:#1a1b26;
--glow1:#24283b; --glow2:#2a1f3d; --overlay:rgba(22,22,30,.96); --steam:#7dcfff;
--k-tag:#9ece6a; --k-item:#bb9af7; --k-ach:#7dcfff; --k-area:#9aa5ce; --k-extra:#ff9e64;
@ -94,7 +94,7 @@ html[data-theme="catppuccin"]{
html[data-theme="one-dark"]{
--bg:#21252b; --bg2:#282c34; --panel:#282c34; --panel2:#2c313a; --panel3:#353b45;
--line:#353b45; --line2:#3e4451;
--txt:#abb2bf; --dim:#8b93a1; --dim2:#5c6370;
--txt:#abb2bf; --dim:#8b93a1; --dim2:#79818f;
--acc:#61afef; --acc-d:#2f6ea8; --acc2:#56b6c2; --warn:#e5c07b; --miss:#e06c75; --ok:#98c379;
--on-acc:#21252b; --bright:#ffffff; --field:#23272e;
--glow1:#2c313a; --glow2:#2b2f45; --overlay:rgba(33,37,43,.96); --steam:#56b6c2;