Skip to content

Tutorial: from a first review to every pull request

In this tutorial you review a change to a website the way Yomorai does: production and the change’s preview open side by side in real browsers, every difference is classified, and the evidence is kept. Then you make it run by itself on every pull request, and give it to your coding agent.

You need Node.js 26.12 or later and two addresses of the same site: production, and a preview of the change (any deployment of the pull request, or two local builds). No account and no server. The first chapters take about ten minutes.

Every output on this page was copied from a real session; paths and times are shortened. In the commands, example.com and your-org/your-site stand for your own addresses and repository.

Yomorai is one npm package. Run it with npx, or install it with npm i -g yomorai:

Terminal window
npx yomorai --version
npx yomorai install-browser # the Chromium build Yomorai drives; add --with-deps on a bare Linux machine
npx yomorai doctor
PASS node Node 26.12.0
WARN config no configuration file found in ~/shop; run `yomorai init`
PASS chromium Chromium 159.0.8154.6 launches
PASS lighthouse performance measurement is available (provider lighthouse-local-chromium)
WARN model:visual not checked: no valid configuration
WARN model:reasoning not checked: no valid configuration
...
No check failed.

Warnings are fine for now: there is no configuration file yet, and no model is set up. Yomorai works without models. They describe and propose; deterministic code decides every classification.

Point the CLI at production and at the preview, and name the pages to compare:

Terminal window
npx yomorai review --production https://www.example.com --preview https://pr-42.example.com --routes /products --no-models

Yomorai opens both sites in Chromium, visits the routes, tries the controls it finds (menus, dialogs, filters), and compares what it saw: pixels, the DOM, accessibility, behaviour, runtime errors and, when configured, Lighthouse metrics. Progress goes to stderr; the report to stdout.

Here is the report for a pull request that broke the filters dialog of a small shop. It took 9 seconds:

Yomorai review rev_1m8st45ed4ergnb191b
■ Changes need attention - 2 confirmed regressions and 0 unintended changes were found; at least one is at or above the failing threshold.
Findings (18)
ID SEVERITY CLASSIFICATION CATEGORY ROUTE VIEWPORT OBSERVED
F-016 high ■ Confirmed regression functional /products desktop-1440 step 1 (click role=button[name="Open filters"]) leaves a dialog open in production and no…
F-017 high ■ Confirmed regression functional /products desktop-1440 step 2 (checkpoint) leaves a dialog open in production and no dialog in preview
F-002 info ◌ Inconclusive visual /products desktop-1440 After the failed interaction: <div> is visible in production and absent in preview
...
F-001 info ≈ Environmental difference dom /products desktop-1440 Text of [data-testid="now"] changed from "22:03:11" to "22:03:10"
...
Scenarios
3 scenarios compared in both environments; 0 not fully compared.
Cost: $0.0004
Exit code: 1 (findings at or above the failing threshold)

And the notes on stderr, which say what Yomorai could not know:

note: No configuration file was found; a minimal built-in configuration was used (routes: /products).
note: The intent of this change is unknown: no pull request was read. Differences cannot be matched to an intended change.
note: Models were not used (--no-models): findings rest on deterministic analysis only.

Every difference gets exactly one classification:

Classification Means
■ Confirmed regression A deterministic check failed in the preview and passed in production, with complete evidence from both
▲ Unintended change Something changed that the pull request does not account for
● Intended change The change matches what the pull request said it would do
≈ Environmental difference Noise: a clock, a random id, an ad slot, masked and recorded rather than reported
◌ Inconclusive Evidence is missing or the difference follows from another failure; never counted as a pass or a fail

In the example, the “Open filters” button no longer opens its dialog: two confirmed regressions at severity high. The dialog’s missing contents are inconclusive, because they are consequences of that failure, not separate problems. The footer clock differs between the two loads: an environmental difference.

The exit code is for your CI: 0 when nothing at or above report.failOn (default high) is a regression or an unintended change, 1 when something is, 2 for a configuration or input error, 3 when the review did not complete. Exit 0 does not mean “nothing changed”; read the conclusion.

Reviews are stored in .yomorai/data in the directory you ran from. Read one again, filter its findings, and export the evidence as one archive with a manifest of hashes:

Terminal window
npx yomorai status rev_1m8st45ed4ergnb191b
npx yomorai findings rev_1m8st45ed4ergnb191b --severity high
npx yomorai evidence export rev_1m8st45ed4ergnb191b --out review.tar
Review rev_1m8st45ed4ergnb191b · local/review#0 @ 10592aff48d7
State: succeeded
Conclusion: failure
Findings: 4 environmental_difference, 12 inconclusive, 2 confirmed_regression
HIGH confirmed_regression functional /products @ desktop-1440 - step 1 (click role=button[name="Open filters"]) leaves a dialog open in production and no dialog in preview
id F-016 · kind broken_modal · confidence 0.90
Fix before merging, or state in the pull request that this change is intended.
Wrote review.tar (15694848 bytes, 87 manifest entries).
Verified: every file matches the hash in the manifest.

yomorai init writes a configuration file (the next chapter edits it). yomorai serve then serves the dashboard on the stored reviews:

Terminal window
npx yomorai init
npx yomorai serve
Yomorai is serving ~/shop/.yomorai/data
URL: http://127.0.0.1:4319
Token: 5ac1…
Dashboard: http://127.0.0.1:4319/?token=5ac1…

Open the Dashboard link: it signs this browser in and opens the list of reviews.

The dashboard’s review list: one completed review whose check failed, with 2 regressions, 12 inconclusive and 4 environmental findings

A review shows its stages as they run, both deployments, and the findings grouped by severity and category, each with its evidence:

A review in the dashboard: the stages on the left, the two high-severity regressions on the right

Without a pull request, nothing can be an intended change: Yomorai cannot tell a redesign from a regression. Give it the pull request and it reads the title, description and diff (as data, never as instructions), records the intent, and matches every difference against it:

Terminal window
GITHUB_TOKEN=… npx yomorai review --production https://www.example.com --preview https://pr-42.example.com --pr 42 --repo your-org/your-site

A token with read access to the repository is enough. A difference the pull request accounts for (a new button it describes, a page it redesigns) is then reported as intended; one it does not account for stays a regression or an unintended change.

yomorai.config.yaml holds what a review may open and what it checks. The starter file, shortened:

version: 1
environments:
production:
origins: [https://app.example.com] # the only origins a review may open
discovery:
- type: static
url: https://app.example.com
preview:
origins: [https://preview.example.com]
discovery:
- type: github-deployments # how a pull request finds its preview
routes:
include:
- path: /
critical: true # always visited
defaultViewports: [desktop-1440, mobile-390]
report:
failOn: high # what fails the check

Change the origins to yours, add your important routes, then run npx yomorai doctor again. Every option is in the configuration reference.

Add the GitHub Action. In local mode it runs the review on the runner against two deployed addresses, and never checks out or runs the pull request’s code:

.github/workflows/yomorai.yml
on: pull_request
jobs:
yomorai:
runs-on: ubuntu-latest
steps:
- uses: shashikanth-a/[email protected]
with:
mode: local
production-url: https://www.example.com
preview-url: https://pr-${{ github.event.number }}.example.com

The step fails when the review finds a regression or an unintended change at or above failOn. Other CI systems use the Docker image, which contains Yomorai and its Chromium:

Terminal window
docker run --rm ghcr.io/shashikanth-a/yomorai yomorai review --production https://www.example.com --preview https://pr-42.example.com

Yomorai is also an MCP server. Add it to your agent’s MCP configuration:

{
"mcpServers": {
"yomorai": {
"command": "npx",
"args": ["-y", "yomorai", "mcp"],
"cwd": "/absolute/path/to/your/project"
}
}
}

The agent can then call verify_change with a baseline and a changed address (for example its dev server) after it edits your frontend, read the findings, fix what it broke, and check again. Everything a page says reaches the agent marked as untrusted data. All seven tools are in the MCP reference.

For a shared deployment, with reviews on every pull request, approvals, a dashboard for the team, budgets and an audit log, Yomorai runs in your own Cloudflare account: there is no Yomorai server and nothing to sign up for. Self-hosting on Cloudflare covers it step by step.