Critic
Critic
Deterministic QA checks, rendered frame diffs against baselines, bounded repair loop, and seeded defect evaluation.
The critic checks work before it ships. It runs in two modes: static deterministic checks, and rendered checks that capture real browser frames and diff them against a baseline.
Static checks
pnpm paxfx check
pnpm paxfx check gate
pnpm paxfx check seeded
pnpm paxfx repair
pnpm paxfx repair --loopcheck validates reduced-motion pathways, keyboard access, content overflow, and frame budgets, then writes .pax/reports/check.json. check gate runs the full declared inventory (~32 checks). check seeded evaluates 32 representative defect fixtures and reports precision/recall in .pax/reports/seeded-eval.json.
repair applies only high-confidence fixes and writes .pax/reports/repair.json. repair --loop runs a bounded loop (max 3 attempts) with before/after diffs in .pax/reports/repair.md. Failures exit with code 3.
Every finding includes severity, confidence, nature (objective vs heuristic), evidence, source location, and suggested repair. Heuristic advisories are never presented as hard failures.
Rendered checks
check --rendered loads a local HTML file or URL in headless Chromium, freezes animation time at fixed timestamps, and captures one PNG per frame. With a baseline recorded, each frame is compared pixel by pixel.
# Approve first baseline (required)
pnpm paxfx check baseline approve --rendered preview.html --approved-by you --reason "initial"
# Record a baseline
pnpm paxfx check --rendered examples/title-card/preview.html --update-baseline --approved-by you --reason "initial"
# Compare against it
pnpm paxfx check --rendered examples/title-card/preview.html
# Custom timestamps and baseline location
pnpm paxfx check --rendered preview.html --frames 0,500,1000 --baseline .pax/baselines/customDefaults: frames at 0, 250, and 500 milliseconds; a 1280x720 viewport; baselines under .pax/baselines/<target>/; captured frames under .pax/frames/<target>/. A frame fails when more than 1% of pixels differ, and a visual diff PNG is written next to the captured frame.
Rendered checks also feed real page data into the deterministic checks: console errors, the presence of a prefers-reduced-motion rule, and horizontal overflow.
Related
Was this page helpful?
Answers are not recorded or transmitted. Pax has no telemetry.