The understudy
The harness's Playwright showpiece — an agent that walks all nine beats through the accessibility tree, captures screenshots, and smoke-tests the tenant so the fallback deck builds itself.
- Drive a demo tenant deterministically through the accessibility tree
- Capture per-beat screenshots so the fallback deck builds itself
- Run rehearsal as a test that fails loudly on UI drift
The demo needs insurance. Beats fail live — a preview moves a button, a grid loads slow, the network hiccups — and the story cannot stop while you troubleshoot. The insurance is a folder of screenshots of every beat working, captured at 7 a.m., ready to drop in when a beat dies. You do not build that folder by hand.
The understudy builds it. It drives the demo tenant through all nine beats via
the Playwright server, which works through the accessibility tree rather than
pixel coordinates⊙ — deterministic, and repeatable
against the logged-in tenant with a persistent profile and stored session state.
Per beat it navigates, asserts the expected landmark, and screenshots to
06-rehearsal/. The fallback deck assembles itself as a side effect of walking
the script.
Its contract is worth reading in full, because the failure behavior is the whole point:
---
description: Walks every beat in a real browser, screenshots and smoke-tests the tenant.
tools: ['playwright']
model: Claude Sonnet 5
user-invocable: true
---
# The Demo Harness — drewbreyer.com/harness — starter file, as of 2026-07-06
# understudy
You drive the demo tenant through all nine beats via Playwright, so the
fallback deck builds itself and drift is caught before the room.
## The beat-walk contract
For each beat: navigate -> assert the expected landmark -> screenshot to
06-rehearsal/{beat}.png -> continue. On failure, capture the state and keep
going. Report a per-beat pass/fail table at the end; never die mid-run.
## How you work
- Drive through the accessibility tree, not pixel coordinates.
- Use a persistent profile with storage-state so the run is repeatable against
the logged-in tenant.
## What you never do
- Never stop on the first failure. Capture and continue.
- Never claim a beat passed without the landmark assertion.
- Never treat yourself as a pilot: you are insurance. Selectors rot; report it.
## Invocation
"@understudy run the morning smoke test across all nine beats."
And the morning-of run is one command — the /demo-smoke-test prompt walks every
beat and reports per-beat pass or fail:
---
description: Walk every demo beat in the tenant and report per-beat pass or fail.
mode: agent
---
# The Demo Harness — drewbreyer.com/harness — starter file, as of 2026-07-06
Run the morning smoke test.
1. Read 05-agents/demo-script.md for the nine beats.
2. Hand off to the understudy to drive each beat in the demo tenant via
Playwright, asserting the expected landmark and capturing a screenshot to
06-rehearsal/{beat}.png.
3. Do not stop on the first failure. Capture state, keep going, and report a
table of beat -> pass/fail with the screenshot path for each.
Fail loudly in the summary if any beat drifted. This is insurance, not a pilot.
Rehearsal as a test
The smoke run is not a warm-up; it is a test suite for your demo. It walks every beat and fails loudly on any drift, so you learn at 7 a.m. that a preview renamed a command — not at 10, in the room. And it never dies mid-run: on a failure it captures state and keeps going, so one broken beat does not cost you the screenshots of the other eight.
What the understudy is not
The understudy is insurance, not a pilot. UI selectors rot, previews move things, and an accessibility-tree walk can still be defeated by a genuinely redesigned page. It reduces the chance of a surprise; it does not eliminate it. Treat a green smoke run as “no known drift,” not “nothing can go wrong” — and keep a human on the keyboard.
In the field
Point the understudy at two beats of your script and let it capture screenshots. Then change something small in the tenant and re-run — watch it fail loudly on the drift. That failure, on your schedule, is the feature.