|
| 1 | +--- |
| 2 | +name: vizzly |
| 3 | +description: "Use when a repo has Vizzly configured and you need screenshot memory or visual history: before/after UI changes, visual regression review, screenshot history, approved baselines, diffs, dynamic regions, docs/manual images, public screenshots, or Vizzly builds. Teaches agents to use Vizzly CLI/context for local TDD, cloud builds, review state, comments, hotspots, previews, and SDK capture patterns." |
| 4 | +--- |
| 5 | + |
| 6 | +# Vizzly |
| 7 | + |
| 8 | +Vizzly is the project's screenshot memory database. It stores approved baselines, current screenshots, diffs, review state, comments, hotspots, previews, and public screenshot URLs. |
| 9 | + |
| 10 | +Use Vizzly when you need to understand what the UI looked like before, what changed, what humans already reviewed, or which screenshots already exist. Browser automation is still useful for interacting with a live app; Vizzly is usually the faster first stop for visual history. |
| 11 | + |
| 12 | +## First Instinct |
| 13 | + |
| 14 | +Before changing UI, check whether Vizzly already has local screenshot context: |
| 15 | + |
| 16 | +```bash |
| 17 | +vizzly context build current --source local --agent |
| 18 | +``` |
| 19 | + |
| 20 | +If a task names a screen, component, or screenshot, inspect that screenshot's history before changing thresholds or re-capturing blindly: |
| 21 | + |
| 22 | +```bash |
| 23 | +vizzly context screenshot "<screenshot-name>" --source local --json |
| 24 | +``` |
| 25 | + |
| 26 | +When you make or verify UI changes, run the focused user workflow that owns the surface: |
| 27 | + |
| 28 | +```bash |
| 29 | +vizzly tdd run "<test command>" --no-open |
| 30 | +``` |
| 31 | + |
| 32 | +Then inspect what changed: |
| 33 | + |
| 34 | +```bash |
| 35 | +vizzly context build current --source local --agent --json |
| 36 | +``` |
| 37 | + |
| 38 | +For specific evidence, drill in: |
| 39 | + |
| 40 | +```bash |
| 41 | +vizzly context comparison <comparison-id> --json |
| 42 | +vizzly context screenshot "<screenshot-name>" --json |
| 43 | +vizzly context review-queue --json |
| 44 | +``` |
| 45 | + |
| 46 | +If local context is unavailable and the project uses cloud builds, use the build id from CI or CLI output: |
| 47 | + |
| 48 | +```bash |
| 49 | +vizzly context build <build-id> --agent --json --include diffs,comments |
| 50 | +``` |
| 51 | + |
| 52 | +## What Vizzly Knows |
| 53 | + |
| 54 | +- **Approved baselines**: expected UI. |
| 55 | +- **Current screenshots**: what the latest run rendered. |
| 56 | +- **Diffs**: where pixels/layout/content changed. |
| 57 | +- **Review state and comments**: human context attached to builds and screenshots. |
| 58 | +- **Hotspots and confirmed regions**: known dynamic areas. |
| 59 | +- **Preview links**: static or deployed UI context for a build. |
| 60 | +- **Public screenshots**: stable URLs for documentation and manuals. |
| 61 | + |
| 62 | +## Acting On Visual Context |
| 63 | + |
| 64 | +- Treat approved baselines as visual truth. |
| 65 | +- Treat diffs as evidence, not as approval instructions. |
| 66 | +- Do not approve or reject visual changes unless the user explicitly asks. |
| 67 | +- Prefer existing E2E or user journeys over narrow screenshot-only specs. |
| 68 | +- For dynamic content, inspect screenshot context before changing thresholds. |
| 69 | +- Prefer deterministic test data, per-screenshot `threshold`, per-screenshot `minClusterSize`, hotspots, or confirmed regions over global tolerance changes. |
| 70 | +- Report visual findings with screenshot names, build/comparison links when available, and the command you ran. |
| 71 | + |
| 72 | +## Capturing Screenshots |
| 73 | + |
| 74 | +Use the existing integration when one is present. For direct JavaScript capture: |
| 75 | + |
| 76 | +```javascript |
| 77 | +import { vizzlyScreenshot } from '@vizzly-testing/cli/client'; |
| 78 | + |
| 79 | +let screenshot = await page.screenshot(); |
| 80 | +await vizzlyScreenshot('checkout-form', screenshot, { |
| 81 | + properties: { |
| 82 | + browser: 'chromium', |
| 83 | + viewport: 'desktop', |
| 84 | + state: 'valid-card' |
| 85 | + }, |
| 86 | + threshold: 2, |
| 87 | + minClusterSize: 4 |
| 88 | +}); |
| 89 | +``` |
| 90 | + |
| 91 | +Use `properties` to separate variants such as theme, locale, viewport, role, state, component, page, or docs/manual grouping. |
| 92 | + |
| 93 | +## When You Need More Detail |
| 94 | + |
| 95 | +- For SDK examples and capture patterns, read `references/sdks.md`. |
| 96 | +- For CLI/context commands and JSON output, read `references/cli-context.md`. |
| 97 | +- For dynamic content, thresholds, and hotspots, read `references/dynamic-content.md`. |
| 98 | +- For public screenshot URLs and docs/manual images, read `references/public-screenshots.md`. |
| 99 | +- For project setup and CI, read `references/setup-ci.md`. |
0 commit comments