{
    "componentChunkName": "component---src-templates-post-js",
    "path": "/blog/tdd-in-the-age-of-ai-agents",
    "result": {"data":{"markdownRemark":{"html":"<p>I have been thinking a lot about how software development is changing.</p>\n<p>Not because writing code is going away.\nBut because the way we get to working code is changing very fast.</p>\n<p>AI agents can now draft features, refactor files, create tests, and even fix bugs in a way that would have felt impossible a few years ago.\nThat is exciting.\nIt is also dangerous if we stop paying attention to discipline.</p>\n<p>For me, that is where TDD becomes more important, not less.</p>\n<hr>\n<h3>The new reality</h3>\n<p>Agentic development changes the shape of the work.</p>\n<p>Instead of spending all your energy on typing every line yourself, you spend more time:</p>\n<ul>\n<li>defining what the system should do</li>\n<li>checking whether the output matches the intent</li>\n<li>keeping complexity under control</li>\n<li>deciding when to trust the agent and when to stop it</li>\n</ul>\n<p>That is a different job.\nAnd it requires a different kind of focus.</p>\n<p>The biggest shift is not technical.\nIt is psychological.</p>\n<p>When code comes back quickly, it becomes very easy to mistake speed for correctness.\nThat is exactly where TDD helps.</p>\n<hr>\n<h3>Why TDD still matters</h3>\n<p>TDD gives you a small but powerful loop:</p>\n<ul>\n<li>write down the behavior first</li>\n<li>make the failure visible</li>\n<li>produce the minimum code to pass</li>\n<li>refactor with confidence</li>\n</ul>\n<p>That loop is valuable in normal development.\nIt becomes even more valuable when an agent is involved.</p>\n<p>Why?</p>\n<p>Because tests are a form of truth.\nThey help you separate:</p>\n<ul>\n<li>what you want</li>\n<li>what the code currently does</li>\n<li>what the agent thinks you asked for</li>\n</ul>\n<p>That separation matters.\nAgents are good at producing options.\nThey are not always good at understanding the shape of the problem the way a human does.</p>\n<p>If the test is weak, the agent can still look productive while drifting away from the real goal.\nIf the test is strong, the agent has a better boundary to work inside.</p>\n<hr>\n<h3>What agents change</h3>\n<p>Kent Beck’s broader point, as I read it, is not that agents make engineering obsolete.\nIt is that they push the important skills upward.</p>\n<p>That matches what I am seeing too.</p>\n<p>The valuable part is becoming:</p>\n<ul>\n<li>setting a clear vision</li>\n<li>breaking work into meaningful milestones</li>\n<li>controlling complexity as the system grows</li>\n<li>knowing what \"done\" actually means</li>\n</ul>\n<p>Those are not glamorous tasks, but they are the ones that keep projects from turning into chaos.</p>\n<p>The old habit was to focus on syntax, implementation details, and manual repetition.\nThe new habit is to focus on direction, quality, and verification.</p>\n<p>That is why I do not see AI agents as a replacement for engineering discipline.\nI see them as a stress test for it.</p>\n<hr>\n<h3>The failure modes are real</h3>\n<p>AI agents can be incredibly useful.\nThey can also surprise you in very annoying ways.</p>\n<p>Sometimes they:</p>\n<ul>\n<li>over-optimize for the prompt instead of the product</li>\n<li>remove useful tests because they look unnecessary</li>\n<li>produce code that compiles but does not really solve the problem</li>\n<li>create a false sense of progress because something changed fast</li>\n</ul>\n<p>That is why I do not trust speed on its own.</p>\n<p>Speed without validation is just a faster way to make mistakes.</p>\n<p>And when you are working in a product environment, mistakes are not abstract.\nThey affect users, teams, timelines, and trust.</p>\n<hr>\n<h3>The workflow I like</h3>\n<p>If I were building with agents today, I would keep the process simple.</p>\n<ol>\n<li>\n<p>Start with behavior.\nDefine what the feature should do in plain language.</p>\n</li>\n<li>\n<p>Write the test or acceptance check first.\nMake the expectation visible before the implementation exists.</p>\n</li>\n<li>\n<p>Let the agent draft the code.\nUse it as leverage, not as authority.</p>\n</li>\n<li>\n<p>Verify the result against the test and the design intent.\nAsk whether the solution is correct, not just whether it is complete.</p>\n</li>\n<li>\n<p>Refactor with human judgment.\nClean up the shape of the code so the next change is easier.</p>\n</li>\n</ol>\n<p>That flow keeps the human in charge of meaning while letting the agent handle more of the repetitive work.</p>\n<p>That feels like the right balance to me.</p>\n<hr>\n<h3>Why this matters for teams</h3>\n<p>This is not only a developer workflow issue.\nIt affects how teams operate.</p>\n<p>When agents become part of the development process, teams need stronger habits around:</p>\n<ul>\n<li>code review</li>\n<li>test quality</li>\n<li>architecture decisions</li>\n<li>shared understanding of product goals</li>\n</ul>\n<p>The best teams will not be the ones who use the most AI.\nThey will be the ones who use it with the clearest standards.</p>\n<p>That is especially important for startups.\nStartups move fast already.\nIf you add AI into the mix without strong feedback loops, you can scale confusion just as easily as you scale output.</p>\n<p>So the goal is not to chase more code.\nThe goal is to build better systems with less waste.</p>\n<hr>\n<h3>My takeaway</h3>\n<p>I do not think TDD is becoming outdated.\nI think it is becoming more useful in an environment where generation is cheap and correctness is still expensive.</p>\n<p>Agentic development gives us leverage.\nTDD gives us confidence.</p>\n<p>Together, they create a workflow where we can move quickly without losing our sense of direction.</p>\n<p>And that feels like the real opportunity.</p>\n<p>Not to write more code for the sake of it.\nBut to build software with more clarity, more control, and more intention.</p>","frontmatter":{"title":"TDD In The Age Of AI Agents","description":"Why tests matter even more when code is generated faster than ever","date":"2026-06-29T00:00:00.000Z","slug":"/blog/tdd-in-the-age-of-ai-agents","tags":["AI","Engineering","Culture","Product"]}}},"pageContext":{}},
    "staticQueryHashes": ["2009693873","2077189868","3303540520","3505212370","3825832676"]}