Project instruction

Force the model to simulate and test its own code before calling it done

engineering · works with Any model · via Shared by a member

The prompt

Before finalising the code, perform a thorough simulation of its execution using realistic test scenarios, sample inputs, edge cases, and error conditions. Verify that every function, calculation, business rule, and workflow behaves exactly as intended.

Do not assume the code is correct simply because it compiles or runs. Act as both the developer and the end user. Simulate expected, unexpected, and boundary-case inputs to confirm:
- All requirements are implemented correctly.
- The generated outputs match the expected results.
- No logic errors, data inconsistencies, or unintended side effects exist.
- Error handling works correctly.
- The code remains consistent with the stated business rules and ground truth data.
- Performance is acceptable for the expected workload.

After the simulation, provide:
1. A summary of the test scenarios executed.
2. Any issues or risks discovered.
3. Recommended fixes.
4. Confirmation that the code produces the intended outcome, or a detailed explanation of where it fails and why.

Do not mark the implementation as complete until the simulation demonstrates that the code performs the required tasks correctly.

Expected result

Instead of a plain code answer, you get a written test simulation covering normal, edge, and error cases, plus a pass or fail verdict before the model calls the task done.

Why it works

Coding agents default to declaring success as soon as code compiles or runs once. This prompt forces an explicit self-review pass, playing both developer and end user, before anything is marked complete, which catches logic errors a single happy-path run would miss.

Open in PrompVite to copy, rate, and discuss this prompt →