Desktop e2e fixture seeding

From pwrdrvr/PwrAgent · View interactive version

Desktop e2e fixture seeding is an AI agent skill from the GitHub repository pwrdrvr/PwrAgent. Record, export, derive, and refresh desktop replay-backed E2E fixtures for PwrAgent. Use when Codex needs to seed or update `apps/desktop/e2e/fixtures/*` from a live desktop session with Computer Use, add a new capture recipe, promote `raw.capture.jsonl` into `replay.fixture.json`, or wire a replay-

How to use this skill

Skill file

Desktop E2E Fixture Seeding

Use this skill to turn a live desktop session into replay-backed Electron test

coverage.

Read First

Repo and desktop AGENTS.md instructions already apply. For this workflow,

read these files first:

  1. ../../../apps/desktop/e2e/fixtures/README.md

Then read the scenario recipe you are seeding or refreshing:

If you are adding a new scenario, mirror those recipe files and update the

shared fixture workflow doc.

Workflow

  1. Pick the scenario and confirm whether you are refreshing an existing fixture

or adding a new one.

  1. Prepare a disposable worktree if the capture recipe edits files.
  2. Launch the desktop app in record mode:

```bash

PWRAGNT_PROTOCOL_CAPTURE=true \

PWRAGNT_PROTOCOL_CAPTURE_ROOT=/tmp/pwragent-protocol-captures \

pnpm dev

```

  1. Use Computer Use primitives only and follow the scenario recipe exactly:
  1. Stop at the recipe's documented stop point. Record the backend-qualified

session id, thread id, and capture id if the export flow exposes them.

  1. Export the raw session evidence:

```bash

pnpm --filter @pwragent/desktop export:session-capture -- \

--capture-root /tmp/pwragent-protocol-captures \

--session codex:<thread-id> \

--output /tmp/<scenario>.raw.capture.jsonl

```

  1. Derive the curated replay fixture:

```bash

pnpm --filter @pwragent/desktop derive:replay-fixture -- \

--input /tmp/<scenario>.raw.capture.jsonl \

--output-dir apps/desktop/e2e/fixtures/<scenario> \

--scenario <scenario> \

--backend codex \

--thread-id <thread-id> \

--source-capture-id <capture-id> \

--start <sequence> \

--end <sequence>

```

  1. Add or update the Playwright Electron spec. Follow the style in:
  1. Run the relevant checks:

```bash

pnpm test:desktop-e2e

pnpm test

pnpm typecheck

```

Guardrails

user-visible assertion.

together in the same scenario directory.

state rather than protocol internals.

../../../apps/desktop/e2e/fixtures/README.md

when you add a new scenario or materially change the operator workflow.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.