Test-Driven AI Agent Definition (TDAD): Compiling Tool-Using Agents from Behavioral Specifications
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
We present Test-Driven AI Agent Definition (TDAD), a methodology that treats agent prompts as compiled artifacts: engineers provide behavioral specifications, a coding agent converts them into executable tests, and a second coding agent iteratively refines the prompt until tests pass. Deploying tool-using LLM agents in production requires measurable behavioral compliance that current development practices cannot provide. Small prompt changes cause silent regressions, tool misuse goes undetected, and policy violations emerge only after deployment. To mitigate specification gaming, TDAD introduces three mechanisms: (1) visible/hidden test splits that withhold evaluation tests during compilation, (2) semantic mutation testing via a post-compilation agent that generates plausible faulty prompt variants, with the harness measuring whether the test suite detects them, and (3) spec evolution scenarios that quantify regression safety when requirements change. We evaluate TDAD on SpecSuite-Core, a benchmark of four deeply-specified agents spanning policy compliance, grounded analytics, runbook adherence, and deterministic enforcement. Across 24 independent trials, TDAD achieves 92% v1 compilation success with 97% mean hidden pass rate; evolved specifications compile at 58%, with most failed runs passing all visible tests except 1-2, and show 86-100% mutation scores, 78% v2 hidden pass rate, and 97% regression safety scores. The implementation is available as an open benchmark at https://github.com/f-labs-io/tdad-paper-code.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 20 of its 25 references that are in the map. First posted on arXiv 9 Mar 2026.
Builds on
20 of 25 references.
References · 20
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,006
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,947
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,402
- 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
- 2022Scaling Laws for Reward Model Overoptimizationcited by 1,095
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
- 2023Towards Understanding Sycophancy in Language Modelscited by 1,040
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 1,006
- 2023Large Language Models as Optimizerscited by 864
8 more
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
- 2023MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedbackcited by 297
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 233
- 2023Prompt Engineering a Prompt Engineercited by 53
- 2023Goodhart's Law in Reinforcement Learningcited by 41
- 2024SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelinescited by 19
- 2025Metamorphic Testing of Large Language Models for Natural Language Processingcited by 12
Built on by
Citing papers per year: 2026: 6.
6 papers.
- 2026How to Interpret Agent Behaviorcited by 10
- 2026TDAD: Test-Driven Agentic Development - Reducing Code Regressions in AI Coding Agents via Graph-Based Impact Analysiscited by 3
- 2026The Productivity-Reliability Paradox: Specification-Driven Governance for AI-Augmented Software Developmentcited by 3
- 2026Meta-Engineering Harnesses for AI-Native Software Production: A Contract-Driven Adversarial Verification Architecture with Early Deployment Reportcited by 1
- 2026ARCHER: Agentic Rule and Compliance Harness for Executable Regulationscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skillscited by 0
- 2026Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills10 Sep 2026
- 2026ARCHER: Agentic Rule and Compliance Harness for Executable Regulations28 Jul 2026
- 2026Meta-Engineering Harnesses for AI-Native Software Production: A Contract-Driven Adversarial Verification Architecture with Early Deployment Report25 May 2026
- 2026How to Interpret Agent Behavior13 May 2026
- 2026The Productivity-Reliability Paradox: Specification-Driven Governance for AI-Augmented Software Development1 May 2026
- 2026TDAD: Test-Driven Agentic Development - Reducing Code Regressions in AI Coding Agents via Graph-Based Impact Analysis18 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation
- 2026TDD Governance for Multi-Agent Code Generation via Prompt Engineering
- 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation
- 2026Automated structural testing of LLM-based agents: methods, framework, and case studies
- 2026TTHE: Test-Time Harness Evolution
- 2026GTDD: Generative Test-Driven Development for AI Coding Agents with Adversarial Testing
- 2026AgentAssay: Token-Efficient Regression Testing for Non-Deterministic AI Agent Workflows
- 2026Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents