7 Commits
Author SHA1 Message Date
Locust agent 14b442109a test(a11y): add axe-core scan and manual WCAG checks over every route, width and theme
Adds two dev-only harnesses and reports what they find. No application code
is touched.

scripts/check-a11y.mjs runs axe-core 4.14 against the built site over every
router route and alias, at 360px and 1440px, in the light and dark themes.
The theme is set through localStorage['beat-theme'] and asserted on every
page before scanning, so a theme that fails to apply aborts the run.

scripts/check-a11y-manual.mjs records the manual criteria as assertions:
keyboard operability with a visible focus indicator, landmarks, heading
order, meaningful link text, alt text, and measured contrast computed from
the rendered DOM.

axe-core and playwright-core are added as devDependencies. playwright-core
is used rather than playwright so no postinstall browser download happens
and `npm ci` in the Pages workflow stays clean.
2026-11-03 03:39:33 +00:00
Locust agent 01d6997fd0 feat: add check-citations.mjs methodology script
Plain Node script (no dependency) proving every research claim and figure
in README.md and public/src/data carries an inline [id] citation or a
BEAT-default marker, and that every citation id resolves to a reference
entry on both mirrors (README ## References and references.js). A
reference entry that is never cited fails. Structured fields (limits,
durations, option scale labels, score values, presentation data) are
carved out per the settled calibration.

Exit 0 at branch head: 9 README claim lines, 23 data prose claims, 6
reference entries each side, 26 citation sites, zero defects.

Verified failure modes on a scratch copy: unresolved id, dropped
references entry, never-cited entry, uncited claim all fail with exit 1.
2026-11-03 00:24:44 +00:00
Locust agent 58f5b29dc2 test(scripts): check README and site id sets against the section map 2026-11-03 00:12:17 +00:00
Locust agent 757f29f6e9 feat(scripts): add theme contrast measurement harness and measured table
Add scripts/check-contrast.mjs, a plain Node script with no runtime
dependency and no test framework, that measures the WCAG 2.2 contrast
ratio of every theme token pair in the light and the dark theme.

- Read the light values from the :root block and the dark values from
  the .dark block of public/src/main.css, the only stylesheet in the
  build that declares the token values.
- Read the measured pairs from scripts/contrast-pairs.json, so the list
  is reviewable next to the script. Every pair states its own threshold
  and the harness rejects a threshold that disagrees with its category.
- Apply 4.5:1 for body text, 3:1 for large text and 3:1 for UI
  component boundaries, and exit non-zero naming every pair below its
  threshold with its token names, values, measured ratio and threshold.
- Report a token that is missing from a theme as a failure, not a skip.

Commit the measured table to docs/theme-contrast.md: 16 pairs, 32
measurements, 32 pass, 0 fail at commit 552d847.
2026-11-02 22:23:22 +00:00
Locust agent 86028df383 feat(scripts): add the pre-redesign route compatibility check
scripts/check-routes.mjs reads the committed "before" route list from
docs/pre-redesign-routes.md and proves every path in it still resolves
at the branch head.

Two halves, both required for every old path:

- Router half: the path resolves against the route table of
  public/src/router/index.js as a route path, an alias or the target of
  a redirect chain.
- Published-output half: the directory the Pages workflow uploads
  (./public/dist) answers a cold request to the old URL. index.html and
  the 404.html fallback must both boot the app from the same bundle, and
  the route table inside that bundle must still carry the old path and
  resolve it to the same target as the router config.

The route list is parsed at run time, so a path added to the document
later is picked up without touching the script. The published output is
read from the workflow file, so the check follows the real deploy target.

Plain Node, no runtime dependency and no test framework: exit 0 when
every old path resolves, 1 naming each path that does not, 2 on a usage
or I/O error.
2026-11-02 20:51:28 +00:00
Locust agent e12af7bc5b feat(build): generate the 404 fallback from the current build
The SPA fallback must load the hashed assets of the build that is actually
published, so it cannot be a frozen copy of an index document. The new
scripts/generate-404.mjs writes dist/404.html from the built dist/index.html
and runs last in the build, after vite build has copied publicDir.

The generator resolves the dist directory from its own location, so it
behaves the same from the repository root and from public/, where npm runs
it. It refuses to write a fallback that has no app mount point or that
references files missing from the build output, so a broken build fails
loudly instead of shipping a blank page.

The two frozen copies (public/404.html, public/public/404.html) are
removed; dist/404.html is a generated artefact with no committed source
copy.
2026-11-02 19:08:04 +00:00
Locust agentandClaude Opus 4.8 bbb9ce3ae9 feat(scripts): add design-rule and banned-term check scripts
Two plain-Node check scripts, no new runtime dependency, that enforce the
BEAT design rules and the copy discipline mechanically. Both exit non-zero
when they find something and print file, line and column for every hit.

scripts/check-design-rules.mjs covers README.md and public/src: no emoji
characters, no gradient utilities or gradient declarations, no inline style
attributes, no <style> blocks in Vue components, and no icon markup other
than FontAwesome components or classes.

scripts/check-banned-terms.mjs reads the banned-term list from
scripts/banned-terms.txt, so the list can be tuned without touching the
script. It scans the site copy (string literals, template text and
user-visible attributes) and the README headings.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-11-02 15:44:35 +00:00