03
characterization test
also golden master
Snapshot what the system does today, then change it. Not the ideal — the actual.
What is characterization test?
A characterization test records current behaviour, even when that behaviour is wrong. Its job is to scream when you move. Snapshots, golden files, recorded HTTP conversations.
Why does characterization test matter when vibe coding?
The model’s favourite crime in a legacy tree is a helpful rewrite. Characterization lets you say: behaviour frozen, structure may move. A later turn is allowed to change behaviour, on purpose.
How do you do characterization test?
Record input and output on the critical paths. Commit them as tests. Tell the model those snapshots must stay green. Spec changes get their own turn.
How do you ask a model for characterization test?
Add characterization tests for (paths) that lock current input/output. Do not edit those tests during the refactor. Behaviour changes are a separate request.
What goes wrong with characterization test?
Snapshots so wide that every edit goes red, and someone deletes the suite. Keep them narrow: only the paths you actually care about.