Skip to content

Configure visual-verify gates

A visual-verify gate captures screenshots of a UI change and has a model judge them, so a backlog run that touches the interface is checked before it merges. The gate is configured per agent profile — a profile that builds UI turns it on and says what to capture.

The Agent Profiles tab in Settings, listing each profile with its default agent, execution mode, version and status, and a badge on the workspace default.The Agent Profiles tab in Settings, listing each profile with its default agent, execution mode, version and status, and a badge on the workspace default.
  1. Open the agent profile in the editor and switch to its Form tab.
  2. In the Visual verify gate, set:
    • Enable — turn the gate on for runs that use this profile.
    • Capture routes — the app routes to screenshot (for example / and /tasks). Leave it empty to capture the root route only.
    • Viewports — which device widths to capture: mobile, desktop, or both.
    • Judge threshold — the minimum confidence (0–100) the model judge must reach for a pass. A pass below the threshold is treated as a fail.
  3. Save the profile.

On a run that uses the profile, the gate captures the configured routes at the configured viewports, the judge scores them, and a score below the threshold holds the run for attention rather than letting it merge.

The mode is set on the project’s backlog automation, in the block visual of its pipeline configuration (through the project automation API or the Management API project spec, automations[].pipeline_config.visual):

Mode What happens on a change that engages the gate
off The gate does not run. This is the default.
machine The vision judge decides. A fail sends the item back for rework.
human A person signs off on the visual card.
both The judge decides first; after a pass, a person signs off.
baseline Each captured screen or asset is compared with its approved baseline. People approve only new and removed ones; changes to approved ones are judged by machine.

The mode resolves as visual.mode, else the older visual_verify key of the same pipeline configuration, else off. An unknown value is read as human, so a typo never lets a UI change through unchecked. An agent profile whose Enable is off still turns the gate off for runs of that profile.

The gate runs when the diff touches a path whose path class has the effect visual. A project declares its classes with PUT /api/projects/{id}/path-rules; without its own rules, SupaCloud’s web defaults apply (web/, .svelte, .css, .scss, routes and components). A game project declares its own screens and assets, for example:

{
"use_defaults": false,
"classes": [
{
"name": "unity_ui",
"globs": ["Assets/**/*.uxml", "Assets/**/*.uss", "Assets/**/*.prefab", "Assets/Scenes/**/*.unity"],
"effects": ["visual"]
},
{ "name": "blender_assets", "globs": ["Art/**/*.blend"], "effects": ["visual"] }
]
}

With these rules a change to Assets/Scenes/Match.unity engages the gate, and a change that touches only scripts does not.

Use baseline mode for web, Unity and Blender producers

Section titled “Use baseline mode for web, Unity and Blender producers”

In baseline mode every captured surface has a history of approved images. A person approves a surface once, when it is new. After that, each change to it is scored against the approved image and passes by machine when it is small enough or when the vision judge accepts it.

visual:
mode: baseline
producers:
- kind: unity
runner_labels: [unity]
command: "fmctl unity-capture --manifest Artifacts/capture.json"
manifest: Artifacts/capture.json
- kind: blender
runner_labels: [blender, cuda]
command: "fmctl blender-render --manifest Artifacts/render.json"
manifest: Artifacts/render.json
auto_pass_threshold: 0.002
noise_floor: 0.0002
judge_tier: vision_judge
on_capture_failure: rework
Key Meaning
mode off, machine, human, both or baseline.
producers The capture steps. Each runs as its own capture_<kind> step after the implementation, on a runner with the listed labels: web on an agent, unity or blender on the project’s edge runner.
auto_pass_threshold The largest diff score a changed surface may have to pass without the judge. Default 0.002 (0.2 % of the pixels).
noise_floor A score at or below it counts as unchanged. Default 0.0002.
judge_tier The calibrated model tier of the vision judge. Without it the judge uses the vision-model pin.
on_capture_failure rework (default) or human, see When a capture fails.

Both thresholds are clamped to the range 0 to 1, and the noise floor is never above the auto-pass threshold.

The capture step runs the producer’s command, which renders the screens or assets and writes a capture manifest. For each surface that already has a baseline, the step fetches the baseline image and scores the difference with odiff on the runner (the agent image carries it; an edge runner needs it installed). It then uploads every capture, every diff image and finally the manifest to the artifact store with the tool artifact.put, so a capture made on a desktop workstation reaches the gate the same way as one made next to the hub. The manifest is uploaded as a report with the media type application/vnd.supacloud.capture+json.

The manifest, schema supacloud.capture/v2, lists at most 500 entries:

{
"schema": "supacloud.capture/v2",
"producer": "unity",
"entries": [
{
"surface_id": "screen:Assets/UI/Club/Overview",
"variant": "1920x1080-dark",
"artifact_id": "0b7e…",
"producer": "unity",
"source_paths": ["Assets/UI/Club/Overview.uxml", "Assets/UI/Club/Overview.uss"],
"accessibility_json": null,
"diff": { "score": 0.0007, "diff_artifact_id": "5c1d…", "baseline_sha256": "9f2a…" }
}
]
}
  • surface_id — a stable id the repository defines, for example screen:<uxml path without extension> or asset:<blend name>/<camera>.
  • variant — the viewport, theme, locale, level of detail or camera. A baseline belongs to one (surface_id, variant) pair.
  • source_paths — the files that define the surface. They decide whether a surface that is missing from the manifest was removed.
  • diff — present only when the surface had a baseline. score is the share of differing pixels between 0 and 1 (odiff reports a percentage, which the step divides by 100), and baseline_sha256 names the baseline it was scored against.
Class When Result
New No approved baseline exists for the surface. A person approves it.
Unchanged The score is at or below noise_floor. Passes.
Changed The score is at or below auto_pass_threshold. Passes.
Changed The score is above auto_pass_threshold, the entry has no score, or it was scored against an older baseline. The vision judge compares the baseline and the capture against the item’s acceptance criteria. A fail sends the item back for rework with the diff images and the judge’s rationale.
Removed A baseline surface is missing from the manifest while one of its source paths changed. A person approves the removal.

The item passes the gate when every surface passes. A judge fail on any surface is a machine fail. Otherwise, while new or removed surfaces remain, the item waits for a person.

The item’s visual card shows each new surface’s capture, and each changed surface with its baseline and capture side by side. Only a project owner or admin can decide it, from the web inbox, Telegram or Discord. An agent can never decide a visual card, and the decision does not depend on the autonomy level.

  • Approve — the gate passes for the pull request’s current head, and the merge follows on its own once the item’s other gates are green. No board drag is needed.
  • Reject — your comment and the captures go back to the implementer as a rework round.

When the pull request merges, its approved new captures and its machine-passed changed captures become the current baselines, recorded with who approved them (or machine) and when. Approved removals retire their baselines. A later change is scored against these images.

The history of each surface stays. A project member can read it, and an owner or admin can restore an earlier baseline:

  • GET /api/projects/{id}/visual/baselines?surface=<surface_id> — the current baselines of the project, optionally for one surface.
  • POST /api/projects/{id}/visual/baselines/{baseline_id}/revert — make an earlier baseline current again (audited as visual.baseline_reverted).
  • GET /api/backlog/items/{id}/visual — the classification of each surface of an item, with signed links to the captures and diff images.

Agents read the same list with the MCP tool visual.baselines.list.

In baseline mode a missing manifest is a failure, never a silent pass. The gate records capture_unavailable and re-runs the capture step once. When the second attempt brings no manifest either, the item goes back for rework with the reason capture_unavailable. Set on_capture_failure: human to have a person review the item instead, as the other modes do when no capture is available.