The test comes first, always
Start a task and the agent is locked into red before green: write a test, watch it fail, and only then touch production code. On the Kiro CLI that lock is a real gate — a write that skips the failing test is denied outright and the reason goes straight back to the model. In the IDE the same discipline runs as steering.