From Agile to AI: Why TDD Is Becoming Non-Negotiable for AI Coding
Twenty-five years after the Agile Manifesto, a workshop hosted by Thoughtworks chief scientist Martin Fowler brought a clear message: if AI is writing more code, test-driven development (TDD) matters more than ever.
The group's takeaway was blunt. When tests come first, AI coding agents deliver better results. When they don't, agents can "prove" broken behavior by writing tests that match their own bad output. TDD closes that loophole.
What the workshop found
Engineering discipline isn't going away; it's moving. If an AI writes the code, humans must harden the testing, architecture, and review layers. That shift changes where quality is created and verified.
Teams given AI tools often hit the same old walls: approvals, dependencies, and unclear decisions. Output scales, but throughput doesn't. The result is the same delivery speed with more frustration.
Why TDD fits AI coding
TDD sets the target before the agent picks up the bow. It prevents agents from grading their own homework. You define behavior up front, then let the agent implement and iterate until tests pass.
It also creates confidence when refactoring AI-generated code. With strong tests, you can swap out pieces fast without fear of hidden regressions.
Standardize or accept drift?
AI agents working on different parts of a system tend to diverge in style and patterns, faster than human teams do. You can fight this with templates, repos of approved patterns, and linting-or you can embrace it where it doesn't hurt maintainability.
Pick your battles. Standardize around interfaces, contracts, security, and logging. Be looser on internal implementation details if the boundaries are solid and well tested.
Skills, roles, and the new org bottlenecks
Experienced engineers remain crucial because they see system edges, integration risks, and architectural trade-offs. That's where AI still needs guardrails.
Interestingly, junior developers are often faster with AI tools. They haven't formed habits that slow adoption. Pair them with seniors who set standards and review outputs, and you get speed with safety.
Security is behind-and getting riskier
Security keeps getting pushed "to later," and AI only magnifies the debt. More code, more changes, more places to miss a hardening step.
The group also called out a deeper issue: trust. We're building on non-deterministic systems. We need ways to prove behavior without relying on repeatable internals-think contract tests, sandboxed execution, policy-as-code, and continuous verification.
Do we need a new manifesto?
Not yet. Fowler's view: it's too early to declare rules when the field is still experimenting. The focus now is on practices that actually ship reliable software with AI in the loop.
If you need a north star, keep it simple: define behavior with tests, enforce standards at the boundaries, and treat AI as an accelerator under discipline-not a replacement for it.
Practical moves you can make this quarter
- Go all-in on TDD for AI-generated code paths: Write tests first, ban agent-written tests for new features unless reviewed by humans.
- Codify interfaces and contracts: Use OpenAPI/Protobuf/JSON Schemas and contract tests so agents can't drift at the edges.
- Standards as code: Linting, formatting, security rules, and policy-as-code in CI. Make it impossible to merge noncompliant code.
- Reference repos for agents: Provide examples, patterns, and code snippets you actually want the agents to copy.
- Shift security left: Threat models, SAST/DAST, SBOMs, dependency policies, and secret scanning baked into PRs.
- Pair juniors + seniors: Let juniors drive AI tools; let seniors own architecture, reviews, and final approvals.
- Measure the right thing: Track lead time, escaped defects, rework, and incident rate-not just lines of code or PR count.
- Create an AI change review: Treat prompts, system instructions, and agent configs as code. Review and version them.
Where this leaves Agile
Agile principles still apply. Short cycles, working software, customer feedback, and team collaboration are even more valuable when the code can be generated in minutes.
The difference now: tests and contracts define truth. That's how you keep speed without losing reliability.
Useful next steps
- Thoughtworks publishes ongoing research and practices for AI-assisted delivery.
- AI Learning Path for Software Developers covers workflows for integrating AI into day-to-day engineering with discipline.
Your membership also unlocks: