Asking for a rewrite of untested code is how regressions ship. Pin the behaviour first.
The prompt is below. Replace the parts in [square brackets] with your own details.
Posted November 24, 2026
Here is legacy code with no tests: code.
Step 1: write characterisation tests that record what it does today, including its odd edge cases. Do not fix anything.
Step 2: list five refactors in order of risk, lowest first.
Step 3: do only the first one and show the diff.
After each step, tell me which test would fail if I had made a mistake.
Stop and wait for me before the next step.
If any behaviour looks like a bug, list it separately and leave it exactly as it is.
Your words
Open to everyone
Asking for a rewrite of untested code is how regressions ship. Pin the behaviour first.
The prompt is below. Replace the parts in [square brackets] with your own details.
4 views · 0 replies
Sign in or create a free account to reply. It costs nothing.
Already a member? Sign in