A 7-step test loop for agent prompts: build the test before you tweak the prompt

petrusenko_max · x · 2026-10-29

A practical loop for iterating on any agent or skill's prompt: (1) collect every failure with its triggering input in a folder—that folder is your test suite; (2) write checks a script can run, not human judgment calls; (3) add 5-10 passing cases so fixes can't silently break them; (4) score the current prompt as a baseline; (5) change exactly one thing (prompt, tool description, or model) at a time; (6) rerun everything and keep the change only if score rises with no regressions; (7) when production breaks, the case goes into the folder before the fix. Prompts get rewritten and models swapped, but the folder of failures keeps telling the truth.

Original post →

More from coding & agent

coding & agent channel →