AAWEA.ORG
AAWEA.ORG
AAWEA.ORG
Testing Manual trigger πŸ‘‘ Official πŸ›‘ Hardened

Visual Regression Until Match

Run Playwright or Percy visual snapshots on UI changes; fix unintended diffs until baselines match intentionally.

πŸ‘ 1,321 views πŸ“₯ 1,211 installs πŸ‘€ by loops!
Download loop
Share Now
Manual start
↓
  1. 1
    Run visual tests

    Run visual regression tests. List screenshots that differ from baseline with component names.

    > npx playwright test --grep @visual
  2. 2
    Fix or approve

    If diffs are bugs, fix CSS/markup. If intentional, update snapshots only after verifying in report.

↓
βœ“
Exit condition: tests_pass

Visual regression tests pass with approved baselines

> npx playwright test --grep @visual
πŸ“Š Flow Diagram
flowchart TD Start(["Manual start"]) Start --> S0 S0("Run visual tests") S1("Fix or approve") S0 --> S1 Exit{"Visual regression tests pass with approved baselines"} S1 --> Exit Exit -- "No" --> S0 Exit -- "Yes" --> Done(["Success"]) style Exit fill:#fffbeb,stroke:#f59e0b,stroke-width:2px,color:#92400e style Done fill:#ecfdf5,stroke:#10b981,stroke-width:2px,color:#065f46
Run "Visual Regression Until Match" in your agent
Prompt only
Deeplinks and "Open in Cursor" only paste the kickoff prompt. They do not install hook files β€” your agent cannot tell whether files are on disk until you add them yourself.
Two separate pieces
  • Kickoff prompt β€” tells the agent the goal, check command, exit condition, and how to self-pace.
Kickoff prompt
Start the "Visual Regression Until Match" loop.

Goal: visual regression suite passes with intentional UI only
Max iterations: 6
Between iterations run: npx playwright test --grep @visual
Exit when: visual tests exit 0

Step 1: Run visual tests. Fix unintended UI diffs; update baselines only for deliberate design changes.

Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Anti-gaming rules
Rules the agent must follow so it cannot cheat the exit condition.
  • Do not modify the check command or exit criteria to force success
  • Do not skip, disable, or bypass checks to pass the exit condition
  • If stuck after several iterations, stop and report blockers instead of gaming metrics