diff --git a/AGENTS.md b/AGENTS.md index 7ff0eb4d4..5c7359fc7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -217,6 +217,14 @@ See [TESTING.md](TESTING.md) for the full multi-agent E2E guide. ### PR Screenshots +> **Screenshots for PRs, reviews, chats, and demos are disposable artifacts, not +> tests.** Save them under ignored `test-results/` and use the standalone +> `just desktop-screenshot` helper. Do not create or modify a committed +> Playwright spec merely to capture evidence, and do not leave `.screenshot()` +> calls behind: they do not assert pixels or provide regression coverage. A +> committed visual-regression test must deliberately use a reviewed +> `toHaveScreenshot()` baseline. +> > **Do NOT use `buzz upload`, the relay media endpoint, or any third-party > image host for PR screenshots.** Relay media URLs fail through GitHub's camo > proxy. Always use `scripts/post-screenshots.sh` for PNGs before linking them diff --git a/desktop/src-tauri/src/managed_agents/screenshot_skill.md b/desktop/src-tauri/src/managed_agents/screenshot_skill.md index 361e747fe..b1ffe8cd2 100644 --- a/desktop/src-tauri/src/managed_agents/screenshot_skill.md +++ b/desktop/src-tauri/src/managed_agents/screenshot_skill.md @@ -2,11 +2,30 @@ name: desktop-screenshot description: > Capture desktop app screenshots and post them to GitHub PRs with immutable URLs. -version: 1 +version: 2 --- # Desktop Screenshot Skill +## CRITICAL: Screenshots Are Disposable Artifacts, Not Tests + +Screenshots captured for a PR, review, chat, or demo belong under ignored +`test-results/` (or another temporary directory). **Do not create or modify a +committed Playwright spec just to capture evidence.** Use the standalone +`just desktop-screenshot` helper below; if the desired state needs custom setup +that the helper cannot express, use a temporary untracked script and delete it +after capture. + +A committed Playwright test must assert behavior independently of any image it +writes. A plain `page.screenshot()` or `locator.screenshot()` does not validate +pixels and is not regression coverage. Do not leave such calls in tests as PR +or chat artifacts. Visual regression testing is a separate, deliberate change: +use a reviewed `toHaveScreenshot()` baseline and account for its CI stability +and maintenance cost. + +Before committing screenshot work, inspect `git diff -- desktop/tests` and +remove capture-only specs and incidental `.screenshot()` calls. + ## CRITICAL: How to Host Screenshots for PRs **NEVER use `buzz upload`, the relay media endpoint, or any third-party image