A snapshot is the evidence a command retains. It might be a browser screen,
a terminal’s output or a set of database rows. Your agent compares that evidence
with an earlier run and checks the change against your application’s rules.
Reflow stores no approved baseline: a difference never fails a run, and the agent
judges whether it is an expected change or a regression.
Ask your agent:
Add snapshots at the points that explain this journey. Run it, inspect the
changed screens and outputs, and fix regressions within the scope of my change.
Show me the evidence and anything still unresolved before preparing the PR.
This Browser snapshot command is the visual checkpoint. It retains
screenshot.png, the page text aria.yaml, state.json and render.md under
plugins/<step>/<call>-<binding>-snapshot/. Capturing compares nothing and cannot
fail on a visual difference.
Scope each snapshot tightly, so that a difference means something:
name= always. The name is what pairs the same snapshot across runs.
selector= captures one visible element with stable bounds instead of the
viewport. Missing or ambiguous targets fail without a viewport fallback.
mask= covers regions that change for good reasons, such as a timestamp;
mask_optional= does the same for elements that may be absent.
status “Invitation sent to sam@acme.test”
row “sam@acme.test”: Pending · Editor
this run
status “Invitation sent to sam@acme.test”
row “sam@acme.test”: Pending · Member
Agent reviewon pull request #482Outside scope
The role selector disappeared.
This pull request changes invitation copy. The form no longer offers a role, and the invitation went out as Member where the earlier run on main sent Editor. Owners still need to choose a role before sending an invitation.
A screenshot shows one moment. To verify that an element plays, loops, starts on
scroll, or stays still, record it with site.record and assert on frame changes:
site.record captures the target element at 5 fps (configurable from 1–10 fps),
runs timed scroll or click entries in actions, and judges expect purely
from frame-to-frame pixel differences:
Check
Holds when
still
Nothing changed between from and to.
starts
The first change after after arrives within within ms (and not before notBefore, if set).
moves
After that first change, motion continues for for ms with no pause longer than gap.
loops
Two frames from the first pass reappear in order within within (after standing still for hold, if set).
resumes
The frame after one action matches the frame before another.
Any unmet or undecidable check (a limit within two frame intervals of a change,
an off-screen element, or a recording ending early) fails the step with guidance
on what to adjust.
Each recording retains its artifacts under plugins/<step>/<call>-<binding>-record/:
screenshot.png — 12-frame contact sheet above a per-frame pixel-change chart.
clip.png — real-timing animated PNG (with off-screen cards and an END OF RECORDING closing card).
recording.json — per-sample measurements and check verdicts.
frames/*.png — full-resolution key frames (such as frames/first-change.png).
Extract any full-size time range or cropped box from a retained recording:
This writes frame-<ms>.png files plus frames.json with each frame’s changed
share; add --crop x,y,width,height to crop every frame to one region.
reflow evidence diff compares two recordings by verdicts and whole-second
moving/still intervals rather than raw pixels. Recordings run in bundled Chromium;
see the Browser plugin for
all arguments and limits, and Evidence diffing
for full reflow evidence frames options.
LocalBash and DockerUbuntu retain command results, including standard output,
standard error and exit status. Wrap an application CLI command in a flow:
worker.bash command="./bin/fulfill order-1042"
Command output is retained automatically, without a terminal screenshot command.
Here both versions exit successfully, but one stops returning tracking information.
See LocalBash or DockerUbuntu
for connection settings, command arguments and file capture.
Both runs exit 0 and the worker still reports dispatched, but it no longer returns a tracking number: the earlier run on main printed TRK-1042, this run prints none. Can the shipment notification still include a tracking link?
A query can capture the business state behind the screen:
db.query sql="SELECT id, status, refunded FROM orders ORDER BY id" key="id" checkpoint="orders"
Use a unique, non-null key for stable row ordering. The snapshot retains query
rows; your agent relates the difference to the application’s refund rules.
See SQL: PostgreSQL and ClickHouse for setup, limits and write controls.
app.reflow.io/acme/changes/517/run/2
changes/#517 Round refund amounts in the ledger fix/refund-rounding/
A read-only query keeps the orders around the refund, keyed by id.
This step has not started. What it keeps appears here when it ends.
This step is running. What it keeps appears here when it ends.
EARLIER RUNmain · 2 days ago
id
status
refunded
1041
paid
0.00
1042
refunded
25.00
1043
paid
0.00
THIS RUNorders · 3 rows
id
status
refunded
1041
paid
0.00
1042
refunded
20.00
1043
paid
0.00
What this step didWhat this step doesWhat this step does
line 251 of 1
Kept 3 rows as orders
db.query sql="SELECT id, status, refunded FROM orders ORDER BY id" key="id" checkpoint="orders"
Status
passed
Time
took 120ms, starting 0ms into the step
What it kept · orders
earlier run · main
id status refunded
1041 paid 0.00
1042 refunded 25.00
1043 paid 0.00
3 rows · key id · amounts in USD
this run
id status refunded
1041 paid 0.00
1042 refunded 20.00
1043 paid 0.00
3 rows · key id · amounts in USD
Agent reviewon pull request #517In scope
The order says refunded. $5.00 is missing.
Full refunds return the entire $25.00 payment. The rows this run kept show $20.00 returned for order 1042, where the earlier run on main returned 25.00. Check the refund amount before merging.
knowledge · refunds.md
Review / The order says refunded. $5.00 is missing
A named screenshot of one element; omit selector for the viewport.
worker.bash command="…"
Command output, errors and exit status.
db.query … checkpoint="…"
Query result rows.
Custom plugin command
The state and artifacts declared by that provider.
These are command excerpts. Declare aliases and binding names in your flow, and initialize the application
plugin lock; see Write a flow. Use list_plugins to
inspect the installed command schemas. Every plugin invocation returns a terminal
snapshot, but only some commands capture a screen or a named review checkpoint.
A click’s result does not replace an intentional screenshot of the outcome.
To show the state around a step’s action side by side in the dashboard’s step
inspector, give exactly one call before the action checkpoint="before" and one
call after it checkpoint="after", for example the same worker.bash or
db.query. Each call keeps its usual view (command, exit status, output, rows),
and screenshots both calls retain under the same name compare in a slider.
Browser steps (compact Browser statements, Browser plugin calls such as
site.click or TypeScript) also keep a fresh screenshot from just before
their action once a page is open, unless the run is private or nearly out of
time. Without one, the inspector shows the previous step’s screenshot labelled as
a stand-in; a prerequisite or a flow’s first step has no before screen.
A step that passes before anything has opened a page (the browser is still on
about:blank, for example after API-only site.script calls) keeps no
screenshot: the inspector and the step’s tile say that no page had loaded. A
failed step keeps its screenshot either way.
When earlier steps or covered source files change, the next plan automatically
includes affected steps and their dependents. Apply runs that work. An unchanged,
completed step can reuse its evidence; you do not need to taint it after every edit.
A flow with a Browser step is the exception: when any of its steps must run, the
whole flow replays from its first step, because its browser closed with the earlier
run. Only a failed run held with reflow apply --hold continues from the failed step.
If the external application changed without a source or input change, request fresh
evidence with reflow taint flow-name, then plan and apply. Your agent can select
flow-name#step-name to start from a particular step; Reflow also includes affected
dependents. In a flow with a Browser step that means every step from the first, to
open the browser again.
A difference is a question for your agent to investigate. It can update an obsolete
test or fix a product regression, rerun the affected work and show the resulting
delta. See Repair and rerun for that workflow.
Reflow stores no baseline, and nothing approves one. After reflow apply reaches
terminal, each succeeded run that executed steps itself has its snapshots compared
with a reference run of the same flow, and each real difference is reported.
A difference never fails the run: ok, outcome and the exit code are unchanged.
The calling agent looks at both images and judges whether the difference is an
expected change or a regression.
base_run: when apply was given --ci-context with a base_sha, the run at
that pull request base commit, else the newest run on an ancestor of it.
default_branch: the most recent succeeded run of the same flow whose commit is
reachable from the repository’s default branch (origin/HEAD, else
origin/main or origin/master, else local main or master). This is
tested locally with git; nothing is fetched.
previous_run: otherwise, the most recent earlier succeeded run on another
commit than this checkout’s. This may be the agent’s own earlier pass, so judge
it with that in mind.
The run itself and other runs of the same apply never qualify.
A run stands for its commit only when its working tree was clean. An apply from
a checkout with uncommitted changes records its commit as <sha>+dirty, which
never qualifies as a base_run or default_branch reference; it can still
serve as a previous_run marked reference.dirty: true.
reference.same_commit: true indicates the reference ran on the checkout’s own
commit, so with uncommitted changes it may be the caller’s own earlier pass.
The human output has one short block per flow with differences. It names the step
and snapshot, the share of pixels that differ, and the command that shows both
images:
The snapshots were compared; differences lists each one that differs.
no_reference
The flow has no qualifying earlier passing run, for example on its first passing run.
no_snapshots
The flow takes no snapshot.
unavailable
The comparison did not happen: the backend does not yet list reference runs, a read failed, or the 30 second bound for the whole apply was reached. reason says which. Never read it as “same”.
Through MCP, manage_executionapply returns at admission. The same visual
object, with visual_next_action when a judgement is required, is on
manage_executionaction: "run" for a succeeded run’s compact read (no
details). Pass visual_compare: false to skip it.
No comparison happens for --no-wait, for a cancelled or errored apply, for a
fully reused run, inside a coverage session, or for reflow ci run:
reflow ci report compares each flow with its run in the
baseline CI run instead. reflow apply --no-visual-compare skips it.
Reflow stores no verdict. The agent states, for each difference, whether it is an
expected change or a regression, and why, in its own report. Inside a change
review it adds the same as a note with the review_changesannotate action.
A passing run can still show a broken screen, a missing field, or a latency
regression. To compare all retained captures between any two runs—such as a base
run and a head run, or a run against its reference run—run:
reflow evidence diff pairs named Browser snapshots by step and snapshot name
(snapshots/<step name>/<snapshot name>/<file>) and compares:
Visual and accessibility captures: pixel diffs, dense-region detection,
#FF00FF mask exclusions, Browser aria.yaml, and macOS ax/*.json node text
and sibling order.
Structured checkpoints and downloads: JSON pointer diffs across SQL rows,
CLI output, MCP tool calls, and rendered summaries, plus download metadata
(filename, size, SHA-256).
A/A noise filtering (--control / --history): suppresses volatile clocks,
temporary paths, and measured drift so changed text and real regressions rank
first.
Step timing and served builds: flags SLOWER / NEAR-TIMEOUT steps and
warns when same-process or same-executable loopback servers answered both
runs.
Matrix observations (--request + --select): isolates one JSON pointer
across side=base and side=head variants.
See Evidence diffing for complete flags, A/A control rules,
matrix --select readings, reflow evidence frames, and comparison thresholds.
When ready to share findings with reviewers, embed captures in a
Review app or post keyed inline comments with
Pull request code reviews.
flowKey is the exact key declared in the comparison inventory: inspect
base.checks[].key or head.checks[].key (and matching runs[].key). It is not
implicitly a flow slug, UUID, file path or display name. An inventory can use
login-smoke as its key; use that string only when the inventory actually declares it.
For a storyboard screen bound to that check, set flowKey: "login-smoke" and
checkpoint: "org-home" only if that check captures a snapshot named org-home.
checkpoint uses the authored snapshot name (the capture’s displayName in
comparison reads), not the step label. Provider captures also expose a retained
internal name, such as provider_snapshot:<hash>; an exact internal name is
accepted too. The name must identify at most one capture on each side of the
selected flow.
A step move can change the internal key between sides; the storyboard retains
both originals as a before/after pair. Repeated names within one side, or a name
that also matches another capture’s internal key on that side, are ambiguous.
Use unique snapshot names or an unambiguous internal key; Reflow never picks
the first matching capture.
The review distinguishes a flow outside the comparison, a checkpoint missing
from a selected flow, an ambiguous name, and an unavailable retained screenshot.
Omit both fields when no existing inventory check and named capture are known. A storyboard binding maps
review evidence; it does not create a test or prove the flow ran.
get_run_evidence lists provider screenshots using the authored checkpoint name,
step, and invocation number whenever the retained Browser manifest records the
name. Multiple captures with the same name retain separate evidence IDs. Missing
or unreadable metadata falls back to a step/call label without preventing image
access, and labels never alter image identity or checksum verification.
For volatile timestamps or branch labels, author a CSS mask on site.snapshot.
See Browser snapshots for exact syntax and pixel
behavior. A mask hides those pixels from comparison; it does not judge a
difference elsewhere in the capture.
A change comparison uses the frozen knowledge reviews explicitly selected as
knowledge.base and knowledge.head; the application’s current knowledge root
is not attached automatically. Include the storyboard document in each review’s
selected paths to show it alongside the retained captures.
Each selected knowledge review must have a repository label matching the
comparison and a non-null gitCommit matching that side’s exact revision commit.
When base and head commits differ, publish two knowledge reviews with their
respective labels, even if both select the same unchanged corpus revision.
One shared review with gitCommit: null does not satisfy either side. The labels
are caller-supplied context; they do not prove Git ancestry or execution.
Inspect these labels before publishing the comparison. A published comparison’s
selection is immutable: changing the current knowledge root cannot attach a map
or repair its selected Git labels. A new comparison is needed to change those
selections. Resolving an existing snapshot name does not require editing the map
or republishing the captures.
To hand a reviewer a curated interactive page with before/after image sliders
(<reflow-compare>), embedded flows (<reflow-flow>), live run step rails
(<reflow-run>), and highlighted retained files (<reflow-file>), publish a
Review app with manage_review_apps.
To post a pull request summary, link that review app, and attach keyed inline
diff comments as reflow-code-review[bot], use
Pull request code reviews (reflow pr review and
reflow pr comment).