mlsanityData to 14 Oct 2026

Test-Driven AI Agent Definition (TDAD): Compiling Tool-Using Agents from Behavioral Specifications

arXiv 2603.08806 ↗First posted 9 Mar 2026cs.SE cs.AIcited by 6

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

  1. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  2. 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  4. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,006
  5. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,947
  6. 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,402
  7. 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
  8. 2022Scaling Laws for Reward Model Overoptimizationcited by 1,095
  9. 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,045
  10. 2023Towards Understanding Sycophancy in Language Modelscited by 1,040
  11. 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 1,006
  12. 2023Large Language Models as Optimizerscited by 864
8 more
  1. 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 832
  2. 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 653
  3. 2023MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedbackcited by 297
  4. 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 233
  5. 2023Prompt Engineering a Prompt Engineercited by 53
  6. 2023Goodhart's Law in Reinforcement Learningcited by 41
  7. 2024SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelinescited by 19
  8. 2025Metamorphic Testing of Large Language Models for Natural Language Processingcited by 12

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 6.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation
  2. 2026TDD Governance for Multi-Agent Code Generation via Prompt Engineering
  3. 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation
  4. 2026Automated structural testing of LLM-based agents: methods, framework, and case studies
  5. 2026TTHE: Test-Time Harness Evolution
  6. 2026GTDD: Generative Test-Driven Development for AI Coding Agents with Adversarial Testing
  7. 2026AgentAssay: Token-Efficient Regression Testing for Non-Deterministic AI Agent Workflows
  8. 2026Rethinking the Value of Agent-Generated Tests for LLM-Based Software Engineering Agents