← Latest papers
🤖 AI

TDAD: Test-Driven Agentic Development - Reducing Code Regressions in AI Coding Agents via Graph-Based Impact Analysis

This paper introduces TDAD, an open-source tool that leverages graph-based impact analysis to provide AI coding agents with targeted test context, significantly reducing code regressions and improving issue-resolution rates compared to both baseline approaches and procedural TDD instructions.

Original authors: Pepe Alonso, Sergio Yovine, Victor A. Braberman

Published 2026-03-20
📖 5 min read🧠 Deep dive

Original authors: Pepe Alonso, Sergio Yovine, Victor A. Braberman

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you hire a very talented, but slightly reckless, robot assistant to fix a leak in your house. The robot is great at finding the leak and patching it (solving the problem). However, because the robot doesn't fully understand how the pipes connect to the rest of the house, it often accidentally bursts a pipe in the kitchen while fixing the bathroom.

In the world of software, this is called a regression. The robot fixes the bug you asked for, but breaks something else that was working fine.

This paper introduces a new tool called TDAD (Test-Driven Agentic Development) to stop these accidents. Here is the story of how it works, explained simply.

The Problem: The "Fix-It-All" Robot

Currently, AI coding agents are like that robot. We measure their success by asking: "Did they fix the bug?" If yes, we give them a gold star. We rarely ask: "Did they break anything else?"

The authors found that these AI agents are actually quite good at fixing bugs, but they are terrible at knowing what not to touch. When they try to fix a problem, they often break 6 or 7 other things in the process. This is why many AI fixes get rejected by human bosses in real companies.

The Old Way: "Just Be Careful!"

Researchers tried a common-sense approach first. They told the AI: "Hey, remember Test-Driven Development! Write a test first, then fix the code, then check the test."

They thought this would make the AI more careful. It backfired.

  • The Analogy: Imagine telling a nervous driver, "Remember the rules of the road! Look left, look right, check mirrors, signal, then drive."
  • The Result: The driver got so overwhelmed by the long list of instructions that they forgot how to actually drive and crashed more often.
  • The Paper's Finding: Giving the AI a long list of procedures (how to do things) actually made it break more code because it used up its brainpower (memory) on the instructions instead of the actual problem.

The New Way: TDAD (The "Map" Strategy)

Instead of telling the AI how to think, the authors gave it a map.

  1. Building the Map: Before the AI starts working, TDAD scans the entire codebase and draws a dependency map. It connects every piece of code to the specific tests that check if that code works.
    • Analogy: It's like a master electrician's blueprint that shows exactly which light switches control which lights in the house.
  2. The Handoff: When the AI is asked to fix a leak in the bathroom, TDAD hands it a sticky note that says: "You changed the bathroom pipe. You must check these 3 specific switches to make sure you didn't turn off the kitchen lights."
  3. The Result: The AI doesn't need to guess. It has a short, clear list of exactly what to verify.

The Results: A Miracle of Precision

The team tested this on a famous benchmark (SWE-bench) using open-source AI models running on regular computers (not supercomputers).

  • The "No Map" Group: The AI broke about 6% of the working code.
  • The "Long Instructions" Group: The AI broke nearly 10% of the code (the instructions confused it).
  • The "TDAD Map" Group: The AI broke only 1.8% of the code.

That is a 70% reduction in accidents!

Furthermore, in a second experiment with a different AI, giving it this map actually helped it solve more problems (from 24% to 32%) because the AI wasn't wasting energy guessing what to check.

The "Self-Improving" Twist

The coolest part? The authors built a loop where the AI could improve the TDAD tool itself.

  • The AI looked at its own instructions and realized, "Hey, these instructions are too long and confusing. Let's make them shorter."
  • It simplified the instructions from 107 lines down to just 20 lines.
  • Result: The success rate jumped from 12% to 60%. The AI realized that less talk, more data was the secret sauce.

The Big Lesson: Context > Instructions

The paper teaches us a valuable lesson about talking to AI:

  • Don't give the AI a long lecture on how to do its job (procedures).
  • Do give the AI the specific, relevant facts it needs to do its job (context).

If you want an AI to be a good coder, don't tell it to "be careful." Give it a map of the danger zones so it can navigate safely on its own.

Summary

TDAD is a tool that builds a "dependency map" for AI coders. Instead of lecturing the AI on how to write code, it simply points out exactly which tests to run to ensure nothing breaks. This simple change reduced code breakage by 70% and proved that for AI, good information is better than long instructions.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →