Lock in a known-good interaction
Code works. Record the interaction. Lock the behavior in before someone refactors it into a bug.
You start with
Your code is on a known-good build. The waveform drag works. The undo stack works. You want to keep it that way forever — without hand-writing the Playwright test that proves it.
- 01 — Record the working interactionClick the recorder extension. Reproduce the interaction the way a real user would. Stop.
- 02 — Generate the spec@cuit/spec-gen turns the captured events into a deterministic Playwright/Vitest spec grounded in @cuit/harness primitives — no pixel coords.
- 03 — Run the specExpect GREEN. The interaction works on current code — the spec confirms it. This is the baseline.
- 04 — Commit the spec as the baselinePR adds the spec to tests/regressions/. Any future PR that breaks the interaction now fails CI before merge.
You end with
A GREEN spec.ts committed to your repo. Future regressions caught automatically — no human had to hand-write a Playwright test.
How the agent detects this: When the spec passes on the first run, the agent recognizes Flow B and commits + opens a PR adding regression coverage — no fix needed.