/e2e-from-recording (primary)
What it does
/e2e-from-recording is the primary path for turning a captured browser flow into
a production-quality test. It chains three agents in sequence:
- Stabilizer — cleans the raw VS Code recording and paired English steps into a
canonical spec file (
tests/specs/) plus data entries (tests/data/). - Generator — converts that spec into an executable
.spec.tsfile undertests/e2e/, then smoke-runs it. - Reviewer — checks the generated test against the project rulebook
(
tests/agents/rules/playwright-rules.md) and emits a PASS or FAIL verdict. If the test fails review, the pipeline loops generate → review at most once before handing control back to you.
When to use it
Use /e2e-from-recording whenever you have already captured a flow in the
VS Code Playwright Recorder and saved it as a .spec.ts file in
tests/recordings/. This is the fastest, most reliable path from a captured flow to a
committed test.
If you are designing a test from scratch without a recording, use /e2e-from-scratch instead.
How to run it
- Claude Code
- Codex CLI
- Gemini CLI
- Antigravity
/e2e-from-recording tests/recordings/add-billing-contact.spec.ts
Run e2e-from-recording for tests/recordings/add-billing-contact.spec.ts
/e2e-from-recording tests/recordings/add-billing-contact.spec.ts
/e2e-from-recording
On Antigravity, the slash command takes no inline argument — run /e2e-from-recording, then provide the recording path when prompted.
Example
Input:
tests/recordings/add-billing-contact.spec.ts— the raw Playwright Recorder output.tests/recordings/add-billing-contact.steps.md— the paired English steps file describing the intent of each action in plain language.
What you get back:
- A canonical spec at
tests/specs/billing/add-billing-contact.md(Stabilizer output). - A runnable test at
tests/e2e/billing/add-billing-contact.spec.ts(Generator output). - A smoke-run result showing whether the test executes cleanly in the target environment.
- A Reviewer verdict — PASS if the test meets all project standards, FAIL with line-precise findings if something needs fixing.
- An alignment report at
tests/recordings/.stabilizer-reports/add-billing-contact-alignment.mdmapping each raw recorder line to a logical step.
Notes
- The pipeline does not commit. You review the output and commit when satisfied.
- The paired English file is required. The Stabilizer halts with an error if
tests/recordings/<name>.steps.mdis missing or if the steps are too vague to map to the recording. Write at least one plain-English sentence per logical action before running the command. - Smoke-run limit. If the generated test fails to run three times in a row, the pipeline halts and reports the failure rather than looping indefinitely. Fix the underlying issue (usually a selector or data problem) before retrying.
- Generate → review loop. If the Reviewer returns FAIL, the Generator revises and the Reviewer runs once more. After two review cycles the pipeline stops and presents the findings to you.