TDD Governance for Multi-Agent Code Generation via Prompt Engineering DOI: XXXXXXX.XXXXXXX Conference: The 30th International Conference on Evaluation and Assessment in Software Engineering; 9–12 June, 2026; Glasgow, Scotland, United Kingdom CCS: Software and its engineering Software development techniques CCS: Software and its engineering Automatic programming CCS: Computing methodologies Artificial intelligence CCS: Computing methodologies Machine learning
Tarlan Hasanli, Shahbaz Siddeeq, Bishwash Khanal, Pyry Kotilainen, Tommi Mikkonen, Pekka Abrahamsson · 2026
Read TDD Governance for Multi-Agent Code Generation via Prompt Engineering DOI: XXXXXXX.XXXXXXX Conference: The 30th International Conference on Evaluation and Assessment in Software Engineering; 9–12 June, 2026; Glasgow, Scotland, United Kingdom CCS: Software and its engineering Software development techniques CCS: Software and its engineering Automatic programming CCS: Computing methodologies Artificial intelligence CCS: Computing methodologies Machine learning by Tarlan Hasanli, Shahbaz Siddeeq, Bishwash Khanal, Pyry Kotilainen, Tommi Mikkonen, Pekka Abrahamsson (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-26615.txt.
Introduction
Hasanli and five colleagues built an AI-native test-driven development frame that turns TDD discipline into firm rules for multi-agent code generation. Large language models speed coding but waver in stability, determinism, and discipline when free, and existing methods treat tests as side inputs rather than constraints. Their layered design writes rules into a machine-readable manifesto spread across planning, generation, repair, and validation, splitting model proposals from engine control. Phase order, bounded repair loops, check gates, and atomic mutation control improve stability and repeat runs.
Catalog record
| CREATOR | Tarlan Hasanli, Shahbaz Siddeeq, Bishwash Khanal, Pyry Kotilainen, Tommi Mikkonen, Pekka Abrahamsson |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 24298 |
| LICENSE | http://creativecommons.org/licenses/by-sa/4.0/ |
| RIGHTS | CC BY SA |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.26615
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
TDD Governance for Multi-Agent Code Generation via Prompt Engineering DOI: XXXXXXX.XXXXXXX Conference: The 30th International Conference on Evaluation and Assessment in Software Engineering; 9–12 June, 2026; Glasgow, Scotland, United Kingdom CCS: Software and its engineering Software development techniques CCS: Software and its engineering Automatic programming CCS: Computing methodologies Artificial intelligence CCS: Computing methodologies Machine learning Tarlan Hasanli, Shahbaz Siddeeq, Bishwash Khanal, Pyry Kotilainen, Tommi Mikkonen, Pekka Abrahamsson Abstract . Large language models (LLMs) accelerate software development but often exhibit instability, non-determinism, and weak adherence to development discipline in unconstrained workflows. While test-driven development (TDD) provides a structured Red-Green-Refactor process, existing LLM-based approaches typically use tests as auxiliary inputs rather than enforceable process constraints. We present an AI-native TDD framework that operationalizes classical TDD principles as structured prompt-level and workflow-level governance mechanisms. Extracted principles are formalized in a machine-readable manifesto and distributed across planning, generation, repair, and validation stages within a layered architecture that separates model proposal from deterministic engine authority. The system enforces phase ordering, bounded repair loops, validation gates, and atomic mutation control to improve stability and reproducibility. We describe architecture and discuss encoding software engineering discipline directly into prompt orchestration, which we think offers a promising direction for reliable LLM-assisted development. 1. Introduction The discipline of software engineering is undergoing a major shift as autonomous LLM-based agents take on complex coding tasks ( 17 ) . In agentic AI, role-specific agents collaborate to achieve programming goals with limited human intervention ( 4 ) . While this can improve productivity, LLMs remain non-deterministic. Even identical prompts often produce different outputs, and a temperature of zero does not ensure consistent results ( 15 ) . In multi-agent settings, small logic errors can spread across the workflow, which makes automated guardrails essential for code quality and reliability ( 7 ; 22 ) . One potential solution comes from Test-Driven Development, introduced through Extreme Programming, where tests are written before implementation so correctness is defined in advance ( 1 ) . However, TDD can be demanding because developers must maintain both design intent and detailed test logic, which often reduces productivity during adoption ( 2 ; 19 ) . AI-native engineering offers a practical complement: TDD provides clear pass or fail constraints, and LLMs can generate much of the repetitive test code that developers often find tedious ( 5 ) . This paper presents a prompt-centric multi-agent framework that turns TDD principles into enforceable rules for LLM-based code generation. Specialized agents follow explicit guidance, and an orchestrator controls phase order and checks test outcomes before transitions. It also limits repair loops. By embedding TDD into the prompt architecture, the framework aims to reduce instability in LLM-generated code while preserving the efficiency benefits of agentic AI 2. Background and Motivation This section reviews the empirical evidence that motivates encoding TDD as a governed multi-agent protocol. We organize the discussion around three themes: classical TDD foundations, LLM instability factors, and test-guided prompting approaches. Beck’s formulation of TDD operationalizes development as micro-iterations: tests specify behavior before implementation, encourage minimal solutions, and require continuous refactoring after reaching a passing state ( 1 ) . Fowler’s refactoring catalog complements this by defining safe structural transformations and highlighting that automated tests are the prerequisite for verifying behavior preservation ( 6 ) . Together, these sources motivate a process view in which tests are not merely evaluation artifacts but an explicit control mechanism for incremental design change. Recent advances in large language models have reduced the cost of code generation, enabling synthesis from natural-language specifications and interactive debugging. Test-guided prompting improves functional correctness and developer confidence in LLM-assisted tasks ( 14 ; 5 ) , but these systems do not inherently enforce disciplined processes such as phase ordering, minimal implementation, or bounded repair cycles. Repository-scale analysis shows that LLMs produce incorrect or nonsensical code due to contextual dependency errors, insufficient grounding, and overconfident interpolation ( 23 ) . Retrieval augmentation reduces hallucinations, indicating that reliability depends on prompt context quality as well as model capability. Non-determinism further weakens workflows stability: identical prompts often produce different outputs, with zero equal test outputs in up to 75.76% of cases on complex benchmarks ( 15 ) . Similar variability appears in code review tasks ( 10 ) , and apparently correct code may still fail in clean environments due to dependency and configuration issues ( 21 ) . These findings suggest that functional correctness alone is insufficient and motivate governed workflows with reproducibility controls. Interaction-centered evidence shows further failure modes, including incomplete answers, excessive outputs, missing preconditions, and prompt sensitivity, often requiring manual decomposition and iterative steering ( 20 ) . Test cases improve performance by reducing ambiguity and acting as executable specifications ( 14 ) . WebApp1K similarly finds that when tests serve as both a prompt and a verifier, success depends heavily on instruction following and in-context learning ( 3 ) . Interactive workflows further support test-centric iteration. TiCoder blends TDD-style test refinement with code generation, reporting improved correctness and reduced cognitive load ( 5 ) . At repository scale, TDFlow decomposes workflows into specialized sub-agents for patching, debugging, and revising, achieving high pass rates with ground-truth tests ( 8 ) . Our contribution instead emphasizes governed execution under model non-determinism through deterministic validation, bounded repair, and engine-controlled state mutation. Practical guidance for TDD-style LLM use emphasizes that test-first interaction patterns, descriptive signatures, and focused unit tests improve reliability over naive prompting ( 16 ) . Empirical prompt engineering work shows that iterative self-evaluation loops (Self-Refine) and structured Chain-of-Thought prompting measurably improve code generation quality ( 18 ; 11 ) . Integrating deterministic diagnostics, such as static analysis warnings as feedback, can further improve non-functional dimensions like maintainability ( 9 ) . These studies establish that structured prompting and deterministic feedback improve outcomes, but they do not specify how to enforce process discipline, specifically TDD phase ordering, minimal implementation, and bounded repair, across multi-agent workflows. Three empirically supported observations summarize this gap: (1) Classical TDD relies on disciplined phase ordering and behavior-preserving refactoring backed by tests ( 1 ; 6 ) . (2) LLM-based software engineering exhibits instability through hallucinations, non-determinism, and reproducibility gaps ( 23 ; 15 ; 10 ; 21 ) . (3) Test-guided and structured prompting approaches improve correctness but do not enforce full TDD discipline as a governed protocol ( 14 ; 3 ; 5 ; 8 ; 16 ) . A central open problem therefore remains: how to translate classical TDD principles into enforceable, governance-aware prompt structures that ensure bounded autonomy and phase discipline across multi-agent workflows. The framework presented in Section 3 addresses this gap. 3. AI-Native TDD 3.1. Deriving Enforceable Principles from TDD Literature We begin by describing how TDD principles are extracted and formalized as enforceable guidelines. Our goal is not to summarize TDD books or re-document practices. Instead, we distill the key normative rules that early TDD literature treats as correct. We focus on rules that often break down in real teams under time and delivery pressure. We therefore focus on principles that were framed as the "right" way to develop, yet were economically fragile for humans because they demanded continuous attention, constant feedback, and non-deferrable cleanup work. Source scope and