[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78HDSSQKF7A0WP04EBWR8WB":3,"skill-same:01M78HDSSQKF7A0WP04EBWR8WB":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M78HDSSQKF7A0WP04EBWR8WB","evidence-driven-testing",null,"Records visual proof while testing UI behavior — the agent tests the app hands-on via computer use while a screen recording with structured test\u002Fassertion annotations captures the session — then posts the video and a results summary to the PR and tracker issue. Use whenever a change needs verifiable evidence that it works, instead of prose claims — including headless environments (scripted screenshots and probes) and non-UI changes (measured numbers, output pairs).","kausthubh-coder\u002Fskills","kausthubh-coder","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F69598472?v=4","01M78HD86HJXRJ8D9WAZPWEQWQ","Kausthubh Nandimandalam","01M78HD876SS34X45HNK3A5WXV",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002F_retired\u002Fevidence-driven-testing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: evidence-driven-testing\ndescription: >\n  Records visual proof while testing UI behavior — the agent tests the app\n  hands-on via computer use while a screen recording with structured\n  test\u002Fassertion annotations captures the session — then posts the video and a\n  results summary to the PR and tracker issue. Use whenever a change needs\n  verifiable evidence that it works, instead of prose claims — including\n  headless environments (scripted screenshots and probes) and non-UI changes\n  (measured numbers, output pairs).\ncompatibility: Screen-recording path requires a GUI environment the agent can drive — built-in computer use, or the cua-driver CLI (trycua\u002Fcua) when the harness has no computer-use tools — plus an authenticated browser session for the app under test. The bundled recorder (scripts\u002Fevidence.py) runs on Linux (X11 via x11grab, Wayland via wf-recorder), macOS (avfoundation, needs Screen Recording permission) and Windows (gdigrab) and needs Python 3 plus ffmpeg + ffprobe built with libx264 and the ass filter. The headless path requires only a running app and a scriptable browser (e.g. Playwright via npx). Posting evidence requires gh (GitHub CLI) or equivalent.\nmetadata:\n  version: \"1.2\"\n---\n\n# Evidence-Driven Testing\n\nRecord annotated proof of behavior, then attach it to the PR and tracker issue.\n\nThe recording is the capture of you testing the app via computer use: start the\nrecorder, then drive the app yourself — click, type, navigate — through each\ntest target. Every action in the video is the test being performed live; the\nrecording has no value as evidence unless it shows that interactive session.\nIf the harness has no computer-use tools but a GUI exists, drive the app with\n`cua-driver` instead (see below) — it is still your live session.\n\nThe bundled recorder, `scripts\u002Fevidence.py`, captures the display with FFmpeg\non Linux, macOS, and Windows, timestamps each annotation you add while\ntesting, burns them into the video on stop, and verifies the result with\nffprobe. It writes `evidence.mp4`, `report.md`, and `manifest.json` into the\nsession folder.\n\n## Inputs\n\n- **Test targets** (required): The behaviors\u002Fflows to verify, phrased as testable statements.\n- **PR \u002F issue** (optional): Where to post the evidence. If omitted, deliver to the requester only.\n\n## The recorder\n\n`EVIDENCE` below means the path to `scripts\u002Fevidence.py` inside this skill's\nfolder (wherever the skill is installed, e.g.\n`~\u002F.claude\u002Fskills\u002Fevidence-driven-testing\u002Fscripts\u002Fevidence.py`). It needs only\nPython 3 and FFmpeg.\n\n- **Check first**: `python3 $EVIDENCE doctor` — verifies `ffmpeg`, `ffprobe`,\n  `libx264`, and the `ass` filter (`ready`), then which screen-capture source\n  works on this machine (`capture_ready` and the source `auto` will pick).\n  Exits non-zero only when the toolchain is missing; read `capture_ready`\n  before recording.\n- **Platforms** (`--source auto` picks the first available):\n\n  | OS | Source | Needs |\n  |---|---|---|\n  | Linux X11 \u002F XWayland | `x11` (x11grab) | `DISPLAY` set |\n  | Linux Wayland | `wayland` (wf-recorder) | `WAYLAND_DISPLAY` set, `wf-recorder` on PATH, and a compositor confirmed to support wlr-screencopy — either a known wlroots one (Sway, Hyprland, river, Wayfire, labwc, dwl, niri) or verified via `wayland-info`. GNOME and KDE Wayland are not capturable this way; `doctor` says so. Use `x11` through XWayland for X11 apps, or a fallback recorder. `--source wayland` still forces it |\n  | macOS | `avfoundation` | Screen Recording permission granted to the terminal \u002F agent host app; `doctor` lists screen indexes for `--screen-index` |\n  | Windows | `gdigrab` | any standard ffmpeg build; `powershell` for process checks |\n\n  Capture is the full screen by default; `--geometry WxH` and `--offset X,Y`\n  crop a region on x11, wayland, and gdigrab. XWayland only sees X11 windows,\n  so prefer the `wayland` source when the app under test is Wayland-native.\n- **Crash-safe raw capture**: the raw recording is MPEG-TS (`raw.ts`), so if\n  the recorder is killed hard or crashes, what was captured still probes and\n  renders. `stop` remuxes or re-encodes it into a standard `evidence.mp4`.\n- **How stopping works**: on Linux the recorder is signalled through a pidfd.\n  On macOS and Windows `start` launches a small supervisor process that owns\n  the ffmpeg child, and `stop` asks it (via `stop.request` in the session\n  folder) to interrupt, then terminate, then kill; it writes\n  `recorder-exit.json` when done. Nothing ever signals a bare PID, so a\n  recycled PID can't be hit. If the supervisor dies while the recorder is\n  still running, `stop` refuses and tells you which PID to stop by hand. If\n  it died before it could even record which process it started, `stop` stays\n  blocked until you have checked for a stray recorder yourself and rerun it\n  with `--accept-untracked-recorder`; the report then carries that caveat.\n- **Fallback recorders** when `doctor` reports no capture source (for\n  example Wayland without wf-recorder): `cua-driver recording start \u003Cdir>` \u002F\n  `stop` (see the cua-driver section), or the OS recorder (macOS:\n  `screencapture -v out.mov`). On these paths there is no annotation overlay,\n  so keep the annotation protocol as files — an `assertions.md` listing each\n  `setup` \u002F `test_start` \u002F `assertion` with its result and the approximate\n  video timestamp, exactly as in the headless path.\n- **Never** present `--source test` (the synthetic pattern generator) as UI\n  evidence. It exists to smoke-test the toolchain; the repo's\n  `tests\u002Ftest_evidence.py` exercises it.\n\n## Instructions\n\n### 1. Prepare the screen\n\n- Maximize the browser\u002Fapp window; close popups, notifications, and extra panels.\n- Navigate to the starting state (logged in, correct page) BEFORE recording, unless setup itself is under test.\n- Note the exact revision under test: `git rev-parse HEAD` and\n  `git branch --show-current` (or the deployment URL) — the recorder stamps\n  them into the report.\n\n### 2. Start recording\n\n- Begin the screen recording before the first meaningful action:\n\n  ```bash\n  python3 $EVIDENCE start \\\n    --output .artifacts\u002F\u003Ctask-name> \\\n    --title \"\u003Cwhat is being verified>\" \\\n    --commit \"$(git rev-parse HEAD)\" --branch \"$(git branch --show-current)\" \\\n    --environment \"\u003COS \u002F browser \u002F display \u002F deployment>\"\n  ```\n\n  It prints JSON with a `session` path and the chosen `source`; keep the\n  path (`SESSION=...`) for every later command. The source is auto-detected\n  and the whole screen is captured; pass `--source`, `--geometry`,\n  `--offset`, `--display`\u002F`--xauthority` (X11), `--screen-index` (macOS), or\n  `--output-name` (Wayland) only when `doctor` or the situation calls for it.\n- Add a `setup` annotation describing the starting context:\n\n  ```bash\n  python3 $EVIDENCE annotate \"$SESSION\" --type setup \\\n    --message \"Logged in, navigating to connectors page\"\n  ```\n\n### 3. Test via computer use, annotating as you go\n\n- Perform every interaction through computer use on the live app — the\n  recording captures your session, so the testing and the evidence are the\n  same act. Work at a watchable pace: let the UI settle after each action so\n  state changes are visible on video.\n- At each named test's start, add a `test_start` annotation in Jest style:\n\n  ```bash\n  python3 $EVIDENCE annotate \"$SESSION\" --type test_start \\\n    --message \"It should execute the tool directly when permission is 'always'\"\n  ```\n\n- After each check, add an `assertion` annotation with `--result passed`,\n  `failed`, or `untested`:\n\n  ```bash\n  python3 $EVIDENCE annotate \"$SESSION\" --type assertion --result passed \\\n    --message \"Tool ran without a permission prompt\"\n  ```\n\n- Rules for assertions:\n  - One assertion per meaningful state change — consolidate, don't annotate per UI label.\n  - Use \"Precondition: ...\" assertions to establish starting state.\n  - Keep under 80 characters, high-signal (the recorder rejects longer messages).\n  - If a test cannot run (missing prerequisite, expired auth window), mark it `untested` with the reason — never skip silently.\n  - The timestamp records when you asserted, not whether it was true — look at\n    the screen before choosing `passed`.\n\n### 4. Stop and review\n\n- Stop recording after the final assertion:\n\n  ```bash\n  python3 $EVIDENCE stop \"$SESSION\"\n  ```\n\n  This stops the capture (gracefully, so the recorder flushes; escalating\n  only if it ignores the request), burns the annotations into `evidence.mp4`,\n  probes the result, and writes `report.md` and `manifest.json` next to it.\n  It prints `\"verified\": true` on success; if rendering fails the session is\n  marked `finalization_failed` — fix the reported cause and run `stop` again\n  (a retry does not signal the recorder twice). If the recorder process can no\n  longer be signalled safely (it died, or its PID now belongs to another\n  process), the session is marked `recorder_lost`. Running `stop` again\n  finalizes whatever video was captured, but only once that recorder process\n  is confirmed gone — if it is still alive, stop it first, or the video would\n  be rendered while still being written.\n- Confirm the recording captured the key moments before sharing: extract a\n  frame at each assertion timestamp (`ffmpeg -ss \u003Ct> -i evidence.mp4\n  -frames:v 1 frame.png`) and check the state and the label are visible.\n- Fill in the Caveats section of `report.md`; never leave the placeholder.\n\n### 5. Post the evidence\n\n- `report.md` is the report: what was tested, environment + exact commit,\n  pass\u002Ffail per test, caveats. Extend it rather than rewriting from scratch.\n- Post the video + summary as a PR comment (embed in the PR description if\n  it's your PR). `gh pr comment` cannot attach a local video — upload\n  `evidence.mp4` through the PR's comment box in an authenticated browser, or\n  upload it to a host and link it (for example the `before-and-after` upload\n  adapters). Reopen the comment and confirm the video plays before claiming it\n  is posted.\n- Attach the same video to the tracker issue (Linear\u002FJira) with a one-line result.\n- Send the report + recording to the requester.\n\n## Guardrails\n\n- The video must show the actual test session being driven live. Never present\n  scripted playback, stitched clips, or synthetic footage as a recording; if\n  the harness lacks computer-use tools but a GUI exists, drive via\n  `cua-driver`; with no GUI at all, use the headless path instead.\n- Never record a half-covered or tiled window — maximize first.\n- Never record a screen showing secrets, tokens, customer data, or payment\n  details; if a flow requires them, mark it `untested` and say why.\n- When verifying a fix, show or reference the old failure alongside the new success.\n- Always state the exact commit\u002Fbranch\u002Fdeployment tested against.\n\n## No computer-use tools? Drive with cua-driver (GUI available)\n\nWhen a display exists but the agent has no built-in computer-use capability,\nuse [cua-driver](https:\u002F\u002Fgithub.com\u002Ftrycua\u002Fcua) (macOS \u002F Windows \u002F Linux) as\nthe actuator. It is still you testing the app live — the recording rule holds\nunchanged; only the input mechanism differs.\n\n- Verify the setup with `cua-driver doctor` before recording. If a\n  `cua-driver` skill is installed, read it and follow its protocol — the\n  snapshot-before-action invariant is mandatory.\n- Loop per interaction: `launch_app` → `get_window_state` (accessibility tree\n  + screenshot) → act via `element_token` (`click`, `type_text`, `press_key`)\n  → `verify_state` for the expected postcondition. Each `verify_state` check\n  maps 1:1 onto an `assertion` annotation.\n- Wherever `doctor` reports `capture_ready: yes`, keep using the bundled\n  recorder above for the video and the annotations; cua-driver only supplies\n  the input.\n- Otherwise, `cua-driver recording start \u003Coutput-dir>` \u002F `cua-driver recording\n  stop` is the recorder (the output directory is required, and the daemon\n  must be running: `cua-driver serve`). Video capture is on by default and is\n  finalized to `\u003Coutput-dir>\u002Frecording.mp4` on stop — but on Windows\u002FLinux it\n  shells out to ffmpeg, so a missing ffmpeg or display yields only the\n  per-turn trajectory folders (before\u002Fafter screenshots, `action.json`,\n  `click.png`), no video. After stopping, verify `recording.mp4` exists\n  before citing it; if it is absent, fix the recorder or present the\n  per-turn before\u002Fafter screenshots as numbered captures per the headless\n  protocol.\n- If no annotation overlay is available on this path, keep the protocol as\n  files: an `assertions.md` listing each `test_start` \u002F `assertion` with its\n  result, exactly as in the headless path.\n\n## Headless path (no GUI available)\n\nWhen the agent has no desktop to record, keep the same assertion discipline;\nswap the recorder for scripted capture:\n\n- Save everything to `.artifacts\u002F\u003Ctask-name>\u002F` (gitignore it — evidence gets\n  uploaded, never committed). Keep the capture script beside the captures so\n  the run is repeatable.\n- **Screenshots**: the `before-and-after` CLI (`@vercel\u002Fbefore-and-after`)\n  captures URLs or elements and its pairs feed PR embeds directly. In\n  containers\u002FVMs where Chrome fails with \"No usable sandbox\", set\n  `AGENT_BROWSER_ARGS=\"--no-sandbox\"`.\n- **Video \u002F multi-step flows**: a one-off Playwright script, run without\n  adding playwright to the project's dependencies:\n\n  ```bash\n  npx --yes --package=playwright node record.mjs\n  ```\n\n  (Plain `npx playwright node record.mjs` fails — `node` is not a Playwright\n  CLI command; `--package=playwright` is what puts the module on the path.)\n  Minimal `record.mjs`:\n\n  ```js\n  import { chromium } from \"playwright\";\n  const browser = await chromium.launch();\n  const context = await browser.newContext({\n    recordVideo: { dir: \".artifacts\u002F\u003Ctask-name>\u002F\" },\n  });\n  const page = await context.newPage();\n  await page.goto(\"http:\u002F\u002Flocalhost:3000\u002Fpath-under-test\");\n  \u002F\u002F ...drive the flow, one meaningful state change per step...\n  await context.close(); \u002F\u002F finalizes the .webm\n  await browser.close();\n  ```\n\n  Trim or compress with ffmpeg if the file is large.\n- **The annotation protocol becomes files**: number captures in test order\n  with the assertion in the name — `01-precondition-signed-in.png`,\n  `02-it-saves-on-blur-passed.png` — and keep an `assertions.md` in the\n  artifacts folder listing each `test_start` \u002F `assertion` with its result\n  (`passed` \u002F `failed` \u002F `untested` + reason).\n\n## Non-UI changes still need evidence\n\n- **API \u002F performance**: a scripted probe with measured numbers — request\n  counts per phase, latency before\u002Fafter — captured to `probe-output.txt`.\n- **Rendering \u002F canvas \u002F shader**: rendered frames plus pixel assertions\n  (diff values), reviewed by eye and saved as PNGs.\n- **Agent behavior**: the relevant transcript excerpt showing the tool call\n  and response.\n- **Bug fixes**: reproduce and capture the failure **before** writing the\n  fix — that capture is the \"before\" half of a before\u002Fafter pair.\n\n## Capture hygiene\n\n- Confirm the server you're probing is running *your* code (right port,\n  right process), especially when multiple agents share a machine:\n  `lsof -i :\u003Cport>` — or where `lsof` isn't installed,\n  `ss -ltnp \"sport = :\u003Cport>\"` to find the listener's PID, then\n  `ps -p \u003Cpid> -o args=` to confirm it's yours.\n- Evidence complements the repo's checks (typecheck\u002Fbuild\u002Ftests); it never\n  replaces them.\n- Hand before\u002Fafter media pairs to a before\u002Fafter tool for the PR embed\n  (e.g. `before-and-after before.png after.png --markdown`).\n","# Evidence-Driven Testing\n\nRecord annotated proof of behavior, then attach it to the PR and tracker issue.\n\nThe recording is the capture of you testing the app via computer use: start the\nrecorder, then drive the app yourself — click, type, navigate — through each\ntest target. Every action in the video is the test being performed live; the\nrecording has no value as evidence unless it shows that interactive session.\nIf the harness has no computer-use tools but a GUI exists, drive the app with\n`cua-driver` instead (see below) — it is still your live session.\n\nThe bundled recorder, `scripts\u002Fevidence.py`, captures the display with FFmpeg\non Linux, macOS, and Windows, timestamps each annotation you add while\ntesting, burns them into the video on stop, and verifies the result with\nffprobe. It writes `evidence.mp4`, `report.md`, and `manifest.json` into the\nsession folder.\n\n## Inputs\n\n- **Test targets** (required): The behaviors\u002Fflows to verify, phrased as testable statements.\n- **PR \u002F issue** (optional): Where to post the evidence. If omitted, deliver to the requester only.\n\n## The recorder\n\n`EVIDENCE` below means the path to `scripts\u002Fevidence.py` inside this skill's\nfolder (wherever the skill is installed, e.g.\n`~\u002F.claude\u002Fskills\u002Fevidence-driven-testing\u002Fscripts\u002Fevidence.py`). It needs only\nPython 3 and FFmpeg.\n\n- **Check first**: `python3 $EVIDENCE doctor` — verifies `ffmpeg`, `ffprobe`,\n  `libx264`, and the `ass` filter (`ready`), then which screen-capture source\n  works on this machine (`capture_ready` and the source `auto` will pick).\n  Exits non-zero only when the toolchain is missing; read `capture_ready`\n  before recording.\n- **Platforms** (`--source auto` picks the first available):\n\n  | OS | Source | Needs |\n  |---|---|---|\n  | Linux X11 \u002F XWayland | `x11` (x11grab) | `DISPLAY` set |\n  | Linux Wayland | `wayland` (wf-recorder) | `WAYLAND_DISPLAY` set, `wf-recorder` on PATH, and a compositor confirmed to support wlr-screencopy — either a known wlroots one (Sway, Hyprland, river, Wayfire, labwc, dwl, niri) or verified via `wayland-info`. GNOME and KDE Wayland are not capturable this way; `doctor` says so. Use `x11` through XWayland for X11 apps, or a fallback recorder. `--source wayland` still forces it |\n  | macOS | `avfoundation` | Screen Recording permission granted to the terminal \u002F agent host app; `doctor` lists screen indexes for `--screen-index` |\n  | Windows | `gdigrab` | any standard ffmpeg build; `powershell` for process checks |\n\n  Capture is the full screen by default; `--geometry WxH` and `--offset X,Y`\n  crop a region on x11, wayland, and gdigrab. XWayland only sees X11 windows,\n  so prefer the `wayland` source when the app under test is Wayland-native.\n- **Crash-safe raw capture**: the raw recording is MPEG-TS (`raw.ts`), so if\n  the recorder is killed hard or crashes, what was captured still probes and\n  renders. `stop` remuxes or re-encodes it into a standard `evidence.mp4`.\n- **How stopping works**: on Linux the recorder is signalled through a pidfd.\n  On macOS and Windows `start` launches a small supervisor process that owns\n  the ffmpeg child, and `stop` asks it (via `stop.request` in the session\n  folder) to interrupt, then terminate, then kill; it writes\n  `recorder-exit.json` when done. Nothing ever signals a bare PID, so a\n  recycled PID can't be hit. If the supervisor dies while the recorder is\n  still running, `stop` refuses and tells you which PID to stop by hand. If\n  it died before it could even record which process it started, `stop` stays\n  blocked until you have checked for a stray recorder yourself and rerun it\n  with `--accept-untracked-recorder`; the report then carries that caveat.\n- **Fallback recorders** when `doctor` reports no capture source (for\n  example Wayland without wf-recorder): `cua-driver recording start \u003Cdir>` \u002F\n  `stop` (see the cua-driver section), or the OS recorder (macOS:\n  `screencapture -v out.mov`). On these paths there is no annotation overlay,\n  so keep the annotation protocol as files — an `assertions.md` listing each\n  `setup` \u002F `test_start` \u002F `assertion` with its result and the approximate\n  video timestamp, exactly as in the headless path.\n- **Never** present `--source test` (the synthetic pattern generator) as UI\n  evidence. It exists to smoke-test the toolchain; the repo's\n  `tests\u002Ftest_evidence.py` exercises it.\n\n## Instructions\n\n### 1. Prepare the screen\n\n- Maximize the browser\u002Fapp window; close popups, notifications, and extra panels.\n- Navigate to the starting state (logged in, correct page) BEFORE recording, unless setup itself is under test.\n- Note the exact revision under test: `git rev-parse HEAD` and\n  `git branch --show-current` (or the deployment URL) — the recorder stamps\n  them into the report.\n\n### 2. Start recording\n\n- Begin the screen recording before the first meaningful action:\n\n  ```bash\n  python3 $EVIDENCE start \\\n    --output .artifacts\u002F\u003Ctask-name> \\\n    --title \"\u003Cwhat is being verified>\" \\\n    --commit \"$(git rev-parse HEAD)\" --branch \"$(git branch --show-current)\" \\\n    --environment \"\u003COS \u002F browser \u002F display \u002F deployment>\"\n  ```\n\n  It prints JSON with a `session` path and the chosen `source`; keep the\n  path (`SESSION=...`) for every later command. The source is auto-detected\n  and the whole screen is captured; pass `--source`, `--geometry`,\n  `--offset`, `--display`\u002F`--xauthority` (X11), `--screen-index` (macOS), or\n  `--output-name` (Wayland) only when `doctor` or the situation calls for it.\n- Add a `setup` annotation describing the starting context:\n\n  ```bash\n  python3 $EVIDENCE annotate \"$SESSION\" --type setup \\\n    --message \"Logged in, navigating to connectors page\"\n  ```\n\n### 3. Test via computer use, annotating as you go\n\n- Perform every interaction through computer use on the live app — the\n  recording captures your session, so the testing and the evidence are the\n  same act. Work at a watchable pace: let the UI settle after each action so\n  state changes are visible on video.\n- At each named test's start, add a `test_start` annotation in Jest style:\n\n  ```bash\n  python3 $EVIDENCE annotate \"$SESSION\" --type test_start \\\n    --message \"It should execute the tool directly when permission is 'always'\"\n  ```\n\n- After each check, add an `assertion` annotation with `--result passed`,\n  `failed`, or `untested`:\n\n  ```bash\n  python3 $EVIDENCE annotate \"$SESSION\" --type assertion --result passed \\\n    --message \"Tool ran without a permission prompt\"\n  ```\n\n- Rules for assertions:\n  - One assertion per meaningful state change — consolidate, don't annotate per UI label.\n  - Use \"Precondition: ...\" assertions to establish starting state.\n  - Keep under 80 characters, high-signal (the recorder rejects longer messages).\n  - If a test cannot run (missing prerequisite, expired auth window), mark it `untested` with the reason — never skip silently.\n  - The timestamp records when you asserted, not whether it was true — look at\n    the screen before choosing `passed`.\n\n### 4. Stop and review\n\n- Stop recording after the final assertion:\n\n  ```bash\n  python3 $EVIDENCE stop \"$SESSION\"\n  ```\n\n  This stops the capture (gracefully, so the recorder flushes; escalating\n  only if it ignores the request), burns the annotations into `evidence.mp4`,\n  probes the result, and writes `report.md` and `manifest.json` next to it.\n  It prints `\"verified\": true` on success; if rendering fails the session is\n  marked `finalization_failed` — fix the reported cause and run `stop` again\n  (a retry does not signal the recorder twice). If the recorder process can no\n  longer be signalled safely (it died, or its PID now belongs to another\n  process), the session is marked `recorder_lost`. Running `stop` again\n  finalizes whatever video was captured, but only once that recorder process\n  is confirmed gone — if it is still alive, stop it first, or the video would\n  be rendered while still being written.\n- Confirm the recording captured the key moments before sharing: extract a\n  frame at each assertion timestamp (`ffmpeg -ss \u003Ct> -i evidence.mp4\n  -frames:v 1 frame.png`) and check the state and the label are visible.\n- Fill in the Caveats section of `report.md`; never leave the placeholder.\n\n### 5. Post the evidence\n\n- `report.md` is the report: what was tested, environment + exact commit,\n  pass\u002Ffail per test, caveats. Extend it rather than rewriting from scratch.\n- Post the video + summary as a PR comment (embed in the PR description if\n  it's your PR). `gh pr comment` cannot attach a local video — upload\n  `evidence.mp4` through the PR's comment box in an authenticated browser, or\n  upload it to a host and link it (for example the `before-and-after` upload\n  adapters). Reopen the comment and confirm the video plays before claiming it\n  is posted.\n- Attach the same video to the tracker issue (Linear\u002FJira) with a one-line result.\n- Send the report + recording to the requester.\n\n## Guardrails\n\n- The video must show the actual test session being driven live. Never present\n  scripted playback, stitched clips, or synthetic footage as a recording; if\n  the harness lacks computer-use tools but a GUI exists, drive via\n  `cua-driver`; with no GUI at all, use the headless path instead.\n- Never record a half-covered or tiled window — maximize first.\n- Never record a screen showing secrets, tokens, customer data, or payment\n  details; if a flow requires them, mark it `untested` and say why.\n- When verifying a fix, show or reference the old failure alongside the new success.\n- Always state the exact commit\u002Fbranch\u002Fdeployment tested against.\n\n## No computer-use tools? Drive with cua-driver (GUI available)\n\nWhen a display exists but the agent has no built-in computer-use capability,\nuse [cua-driver](https:\u002F\u002Fgithub.com\u002Ftrycua\u002Fcua) (macOS \u002F Windows \u002F Linux) as\nthe actuator. It is still you testing the app live — the recording rule holds\nunchanged; only the input mechanism differs.\n\n- Verify the setup with `cua-driver doctor` before recording. If a\n  `cua-driver` skill is installed, read it and follow its protocol — the\n  snapshot-before-action invariant is mandatory.\n- Loop per interaction: `launch_app` → `get_window_state` (accessibility tree\n  + screenshot) → act via `element_token` (`click`, `type_text`, `press_key`)\n  → `verify_state` for the expected postcondition. Each `verify_state` check\n  maps 1:1 onto an `assertion` annotation.\n- Wherever `doctor` reports `capture_ready: yes`, keep using the bundled\n  recorder above for the video and the annotations; cua-driver only supplies\n  the input.\n- Otherwise, `cua-driver recording start \u003Coutput-dir>` \u002F `cua-driver recording\n  stop` is the recorder (the output directory is required, and the daemon\n  must be running: `cua-driver serve`). Video capture is on by default and is\n  finalized to `\u003Coutput-dir>\u002Frecording.mp4` on stop — but on Windows\u002FLinux it\n  shells out to ffmpeg, so a missing ffmpeg or display yields only the\n  per-turn trajectory folders (before\u002Fafter screenshots, `action.json`,\n  `click.png`), no video. After stopping, verify `recording.mp4` exists\n  before citing it; if it is absent, fix the recorder or present the\n  per-turn before\u002Fafter screenshots as numbered captures per the headless\n  protocol.\n- If no annotation overlay is available on this path, keep the protocol as\n  files: an `assertions.md` listing each `test_start` \u002F `assertion` with its\n  result, exactly as in the headless path.\n\n## Headless path (no GUI available)\n\nWhen the agent has no desktop to record, keep the same assertion discipline;\nswap the recorder for scripted capture:\n\n- Save everything to `.artifacts\u002F\u003Ctask-name>\u002F` (gitignore it — evidence gets\n  uploaded, never committed). Keep the capture script beside the captures so\n  the run is repeatable.\n- **Screenshots**: the `before-and-after` CLI (`@vercel\u002Fbefore-and-after`)\n  captures URLs or elements and its pairs feed PR embeds directly. In\n  containers\u002FVMs where Chrome fails with \"No usable sandbox\", set\n  `AGENT_BROWSER_ARGS=\"--no-sandbox\"`.\n- **Video \u002F multi-step flows**: a one-off Playwright script, run without\n  adding playwright to the project's dependencies:\n\n  ```bash\n  npx --yes --package=playwright node record.mjs\n  ```\n\n  (Plain `npx playwright node record.mjs` fails — `node` is not a Playwright\n  CLI command; `--package=playwright` is what puts the module on the path.)\n  Minimal `record.mjs`:\n\n  ```js\n  import { chromium } from \"playwright\";\n  const browser = await chromium.launch();\n  const context = await browser.newContext({\n    recordVideo: { dir: \".artifacts\u002F\u003Ctask-name>\u002F\" },\n  });\n  const page = await context.newPage();\n  await page.goto(\"http:\u002F\u002Flocalhost:3000\u002Fpath-under-test\");\n  \u002F\u002F ...drive the flow, one meaningful state change per step...\n  await context.close(); \u002F\u002F finalizes the .webm\n  await browser.close();\n  ```\n\n  Trim or compress with ffmpeg if the file is large.\n- **The annotation protocol becomes files**: number captures in test order\n  with the assertion in the name — `01-precondition-signed-in.png`,\n  `02-it-saves-on-blur-passed.png` — and keep an `assertions.md` in the\n  artifacts folder listing each `test_start` \u002F `assertion` with its result\n  (`passed` \u002F `failed` \u002F `untested` + reason).\n\n## Non-UI changes still need evidence\n\n- **API \u002F performance**: a scripted probe with measured numbers — request\n  counts per phase, latency before\u002Fafter — captured to `probe-output.txt`.\n- **Rendering \u002F canvas \u002F shader**: rendered frames plus pixel assertions\n  (diff values), reviewed by eye and saved as PNGs.\n- **Agent behavior**: the relevant transcript excerpt showing the tool call\n  and response.\n- **Bug fixes**: reproduce and capture the failure **before** writing the\n  fix — that capture is the \"before\" half of a before\u002Fafter pair.\n\n## Capture hygiene\n\n- Confirm the server you're probing is running *your* code (right port,\n  right process), especially when multiple agents share a machine:\n  `lsof -i :\u003Cport>` — or where `lsof` isn't installed,\n  `ss -ltnp \"sport = :\u003Cport>\"` to find the listener's PID, then\n  `ps -p \u003Cpid> -o args=` to confirm it's yours.\n- Evidence complements the repo's checks (typecheck\u002Fbuild\u002Ftests); it never\n  replaces them.\n- Hand before\u002Fafter media pairs to a before\u002Fafter tool for the PR embed\n  (e.g. `before-and-after before.png after.png --markdown`).\n",{"name":5,"metadata":24,"description":26,"compatibility":27},{"version":25},"1.2","Records visual proof while testing UI behavior — the agent tests the app hands-on via computer use while a screen recording with structured test\u002Fassertion annotations captures the session — then posts the video and a results summary to the PR and tracker issue. Use whenever a change needs verifiable evidence that it works, instead of prose claims — including headless environments (scripted screenshots and probes) and non-UI changes (measured numbers, output pairs).\n","Screen-recording path requires a GUI environment the agent can drive — built-in computer use, or the cua-driver CLI (trycua\u002Fcua) when the harness has no computer-use tools — plus an authenticated browser session for the app under test. The bundled recorder (scripts\u002Fevidence.py) runs on Linux (X11 via x11grab, Wayland via wf-recorder), macOS (avfoundation, needs Screen Recording permission) and Windows (gdigrab) and needs Python 3 plus ffmpeg + ffprobe built with libx264 and the ass filter. The headless path requires only a running app and a scriptable browser (e.g. Playwright via npx). Posting evidence requires gh (GitHub CLI) or equivalent.","main","16324e7f9b33ea663982e77e17c70c3d1c9d65de","_retired\u002Fevidence-driven-testing","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder","idk","2026-11-12 02:40:31",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add kausthubh-coder\u002Fskills --skill evidence-driven-testing",{"tool":41,"command":42},"bunx","bunx skills add kausthubh-coder\u002Fskills --skill evidence-driven-testing",{"tool":44,"command":45},"pnpm","pnpm dlx skills add kausthubh-coder\u002Fskills --skill evidence-driven-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002F_retired\u002Fevidence-driven-testing\u002FSKILL.md",true,[49],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"scripts\u002Fevidence.py","SCRIPT","脚本",56721,"https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002F_retired\u002Fevidence-driven-testing\u002Fscripts\u002Fevidence.py",[56,63,70,77,84,91],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M78HGP3TZ9GKGVHJWZQA260T","writing-for-agents","Write docs that agents read (skills, AGENTS.md, CLAUDE.md). Use when creating or editing a skill, or changing AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M78HGKHT02YCX5GN0J65AWNH","unslop","Make prose sound human, not AI-written. Use whenever you write a PR description, commit message, doc, README, release note, post, email or UI copy, or when asked to unslop or de-AI text.","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M78HGHGKYYCJF2TGFYP1V5SR","tutor","Run a study session from my exam plan and progress files in the study repo. Use when I say study, teach me, quiz me, practice for an exam, or check whether I really understand a topic.","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftutor\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M78HGF54K9V30X8S1BJZ09V4","threads","Start, steer and read T3 threads on my laptop or Mac mini from either machine. Use to move a thread to the Mac, get a Windows check from the laptop, manage threads on both, or answer a message from the other machine.","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fthreads\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M78HG985HPM88MPYCNKBS40Y","statechart","Check a TLA+ model and draw it as a Mermaid statechart, with the shortest path to each broken rule. Use for \u002Fstatechart, to read a TLC result, or to show a bug as a path through states.","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fstatechart\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M78HG7NEAG7FMFY92VC6YJVC","sol-loop","Review a change with GPT Sol in a loop until we both agree. Use when I say \"sol loop\".","https:\u002F\u002Fgithub.com\u002Fkausthubh-coder\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsol-loop\u002FSKILL.md",[],[]]