Flow proof
Proof has to survive a sceptical reviewer. It uses flow-capture for the mechanics; this skill only adds what it takes for a recording to count as proof. Read flow-capture's SKILL.md first.
What counts as proof
A recording is proof only if all of these hold:
- It's a recording. Render with
--mode video. Slides are never proof; they show endpoints that someone picked. - The server is real. No
route.fulfill, no mocked API, no data edited in the page. The header shows "N responses mocked or cached" when the app didn't serve a document, fetch or XHR. In proof that count should be 0. If it isn't, say why in the PR, for example a known cached response. The check doesn't cover WebSockets, EventSource, scripts or images, so don't mock those either. - Every claim is asserted. Each caption that states a result is a
flow.verifywhose assertion checks that result. A claim without an assertion is decoration. Cut it or assert it. - The code under test is the code shown. Provenance records the git state of the directory the spec runs from. Make sure the app server serves that same checkout, not a dev server running from a different worktree or branch. If the header shows "+ uncommitted changes" or "+ N untracked files", commit first or explain it in the PR.
- Nothing is staged by hand. No
page.evaluateto set state and no steps out of order. Setup that the flow doesn't show, such as seeding data or signing in, happens beforecreateFlowCapture, and the PR says what it was.
Before/after for a fix
- Write one flow spec that walks the user-visible path to the bug. It should end with a
verifythat fails on the base and passes on the head.- On the base, the bug makes the assertion fail, so record the base with that final
verifyreplaced by ashotof the same state, labelled with what goes wrong ("Totals still show the old value"). - Keep the step count identical on both sides;
--comparesyncs by step.
- On the base, the bug makes the assertion fail, so record the base with that final
- Record on the base, the merge base of the branch with its target, and on the head. Use separate checkouts, each serving its own app server, with separate
FLOW_OUTfolders (<ticket>-before,<ticket>-after). - Render:
The defaultuv run stitch.py <ticket>-before --compare <ticket>-after --labels Before,After --gif--motion subtleis right for proof. Don't use--no-header; provenance is part of the evidence. - Attach the MP4 and the
summary.mdscreenshots to the PR. The MP4 is the evidence, because its header text is readable. The GIF is only a preview, since its provenance text shrinks to a few pixels. The summary's ✓ marks show which steps were asserted. - Use a fresh
FLOW_OUTfor each side. A capture clears its own folder, so a failed base run can't be mixed with an old passing one.
Proof of a feature
A single recording on the head, ending in a verify of the outcome the feature promises. Render with --mode video.
Before sharing
- Watch the whole video at normal speed. A reviewer will.
- Check the header: the right branch and commit, 0 mocked responses, and the recording date.
- Check that every result caption has a ✓.
- If the video exposes something unrelated that is broken, mention it rather than re-recording around it.