playwright-evidence
Captures E2E test evidence (screenshots, videos, traces) and stores them under
.copilot-tracking/skraft-plans/{projectSlug}/changes/{date}/evidence/{story}/evidence/for agents to consume.
When to use
- Setting up Playwright evidence capture for a story in the DELIVER phase
- Capturing screenshots, videos, and traces on E2E test failure
- Generating an
manifest.mdevidence manifest that orchestrator agents read - Configuring the CI pipeline to upload evidence as an artefact
Entry contract
- Playwright (TypeScript) project configured with
playwright.config.ts SKRAFT_STORY_IDenvironment variable set (e.g.42-add-eligibility-check)@playwright/testinstalled, Chromium available
Exit contract
- Screenshots in
evidence/screenshots/{test-title}-{timestamp}.png(on failure) - Videos in
evidence/(moderetain-on-failure) - Traces in
evidence/traces/trace.zip(moderetain-on-failure) - HTML report in
evidence/reports/index.html manifest.mdlisting all captured files with type, path, and associated test
Invariants
- Path convention —
.copilot-tracking/skraft-plans/{projectSlug}/changes/{date}/evidence/{story}/evidence/—{story}comes fromSKRAFT_STORY_ID, consistent with all other SDLC artefacts - Scope of this skill: capture, name, store, list — publishing is the orchestrator agent’s responsibility
- Capture on failure only — do not accumulate artefacts on passing tests (
retain-on-failure) - CI retention —
retention-days: 7onupload-artifact; add theevidence/directory to.gitignore
Why this shape
The story key ({story} = SKRAFT_STORY_ID) makes the manifest unambiguous when multiple stories run in sequence. The orchestrator reads the manifest by resolving state.md to get the active story — no hardcoded path knowledge required. The manifest.md structures: run timestamp, overall status, duration, and a file table (type |
path | test). |
« Evidence is the record of what the system did. The manifest is how agents consume it. »
Allowed customisation
- Additional reporters (JUnit, list, etc.) (L1)
- Video window size (default: 1280×720) (L1)
- CI retention duration (default: 7 days) (L2)
- Tracing options (
screenshots,snapshots,sources) (L2)
See also
- outside-in-tdd — TDD cycle whose E2E tests produce this evidence
- quality-gates-evidence-contract — Evidence contract that this skill feeds
- software-engineer — DELIVER agent that configures and runs this skill