Short answer
Run python -m scripts drift --flow flows/….yaml --out-dir output/. Exit code 0 = the script still matches the live UI. Non-zero = stop at the first failing step, read drift-report.json and any failure screenshot, then fix the product or the selectors.
Steps
- Pick the flow file — The same YAML you used to record (for example
flows/invite.yaml). - Run drift —
python -m scripts drift --flow flows/invite.yaml --out-dir output/. No MP4 is written; this is a fast replay. - Check the exit code —
0means pass. Non-zero means broken. - Open the report — Read
output/drift-report.json(or the path your skill version writes) for failed step index, error text, and paths. - Open the screenshot — If present (for example
drift-failure.png), compare it to what step N expected. - Decide the fix — Product regression → file a bug with “broken at step N”. Script issue → update selectors / waits, then re-run drift. Only then re-record with approval.
How to read “broken at step N”
Step numbers match the n field in the flow file and the numbered markdown steps. The failure is the first action that could not complete — missing button, wrong text, timeout on a spinner, or login wall.
Do not loop retries to force a green check. That hides real UI breaks and defeats release-proof docs.