Every test passed. The customer got refunded twice.

AI built your refund feature in seconds. It even wrote the tests. Everything passed. Then a customer got their money back twice. Turns out, nobody mentioned that part. Before you spend another afternoon perfecting your prompts, try writing down the rules your software actually needs to follow.
Ask AI to build a refund feature. Seconds later, you have code, error handling, and tests. Everything passes.
Then a customer gets refunded twice.
The AI wasn’t told what should happen when the same request arrives again. It made an assumption. Its tests followed that assumption.
Now imagine several agents working on your product, each getting a slightly different explanation of how the business works.
You can generate a lot of code this way. You can also generate a lot of expensive misunderstandings.
Here’s a better workflow:
Write the rules down once. Keep a shared specification with the project. Which contracts allow full refunds? Which allow partial refunds? What must never happen? What information is still missing?
Resolve gaps before building. If two requirements conflict, settle the conflict. If a rule is missing, get an answer. Make uncertainty visible before it becomes code.
Give AI the relevant rules. Every agent should work from the same agreed requirements, alongside the code and interfaces it needs.
Check the result independently. “Never refund twice” in a document is an intention. A check that catches duplicate execution helps you enforce it. Tests based on the implementation’s own assumptions can miss the original mistake.
Keep the connection between requirements, code, and checks. When a business rule changes, you’ll know what needs another look.
AI makes code cheap to produce. Clear rules make that code useful.
Inspired by “Prompting Is Now the Slowest, Buggiest Way to Code with AI. Here’s the Fast, Clean One” by Jose Crespo, PhD, published in AI Advances.