Summary: Red-green testing (write failing tests first, then the code that makes them pass) was hard for humans to sustain but is ideal for agents. When an agent writes code first and tests after, it “cheats” by testing its own implementation. With tests written up front and frozen, it can only change the code, so the signal is black-and-white.
Key ideas
- Red: tests fail because the feature doesn’t exist; green: the same tests pass after implementation (langtalks—73-harness-engineering).
- The agent may not modify tests to make them pass, only code. “No choice” is the essence of a harness (langtalks—73-harness-engineering).
- Good engineering practices humans found too costly to maintain become cheap with agents (langtalks—73-harness-engineering).
- AI revives TDD: for a migration (Parquet to Apache Iceberg), have Claude write the tests first, run old and new paths in parallel, compare outputs, then refactor and generalize (osim-tochna—gong-ai-for-developers, ohad-parush).
Disagreements & open questions
Takeaways
- Have agents write and freeze failing tests before implementing (langtalks—73-harness-engineering)