Test-driven development (TDD) gives you two things at once: a solution that does what it should and a set of tests that raise the alarm if something breaks later. The tests run automatically on every change.
With AI agents it is a way to keep the agents in check. The agent gets to write the code, but the test decides whether it is right. Activator.se has more than 1,600 unit tests that run before a change goes live.
