vrt-check
VRT Check
Run visual regression tests, then triage every failure by eye before touching a snapshot. The workflow's only real risk is rubber-stamping --update on a diff nobody looked at: everything below exists to prevent that.
Step 1: Discover the tooling
Never assume a command. Different repos wire VRT through different tools. Look for, in order:
- Task runner targets:
just --listorgrep -E 'visual|screenshot|chromatic|snapshot' justfile Makefilefor targets likevisual-diff,visual-update,test:visual. - package.json scripts:
grep -A2 '"scripts"' package.jsonforchromatic,test:visual,storybook:test,playwright test.*visual. - Storybook test-runner: presence of
.storybook/test-runner.tsor@storybook/test-runnerinpackage.json. - Playwright screenshot tests:
toHaveScreenshot(calls in*.spec.ts, or aplaywright.config.*withsnapshotDir/toMatchSnapshotsettings. - Chromatic:
chromatic.config.jsonor achromaticdevDependency; these run in CI and produce a web UI, not local diff images, say so and point the user there instead of trying to fake a local diff. - Loki:
.lokiconfig orlokidevDependency.
Base each check on the actual output of the command you ran (ls, grep, just --list), never assert a file is absent without having listed the directory. If two of these are present, ask the user which one is authoritative rather than running both. If none are found, stop and say so, do not invent a screenshot workflow.
For an unfamiliar repo, where a subagent/Task tool is available, delegate this discovery to it rather than grepping inline yourself; otherwise run the greps above directly. Either way, keep the discovered commands around for the rest of the run.