Skip to content
Preprint

TraceDev: A Traceability-Driven Multi-agent Framework for Requirement-to-Code Development

Jul 2026 · 0 citations · 61 references
Computer Science

TL;DR

This work proposes TraceDev, a multi-agent framework for automated software development grounded in use cases that contain multiple functional points and complex semantics, and demonstrates the effectiveness of TraceDev in repository-level code generation from requirements.

Abstract

In modern software development, the rapid advancement of Large Language Models (LLMs) has made the end-to-end transformation of Natural Language Requirements (NLRs) into executable repository-level code increasingly feasible. However, existing approaches typically rely on simplified instructions (e.g., single-sentence descriptions), failing to reflect complex software development scenarios. Moreover, they lack explicit requirement traceability mechanisms, making it difficult to precisely align and validate generated code against original requirements. To address these limitations, we propose TraceDev, a multi-agent framework for automated software development grounded in use cases that contain multiple functional points and complex semantics. TraceDev employs five role-specific agents, including a Requirement Refiner, Designer, Developer, Tester, and Validator. Notably, the Validator Agent constructs and maintains a heterogeneous traceability graph that links requirements, design models, and code artifacts for interacting with the preceding four agents. The traceability graph maintains consistency across various artifacts and serves as a structured context for efficient memory management, supporting reliable repository-level code generation. We evaluate TraceDev on two widely used datasets (including 125 use cases) compared with two state-of-the-art approaches. On the ETOUR dataset, TraceDev achieves a success rate of 53.63\%, outperforming baseline approaches by up to 186.63\%. A similar trend is observed on the SMOS dataset, where TraceDev attains a success rate of 56.82\%, exceeding baseline approaches by up to 340.80\%. These results demonstrate the effectiveness of TraceDev in repository-level code generation from requirements.

View source

Similar papers

Open access 2026

CCGMAS: A Multi-Agent Framework for Cross-Platform Go Code Generation via Requirement-Centered Semantic Modeling and Feedback-Driven Verification

Cross-platform code generation is a critical challenge in modern software engineering, particularly for systems targeting heterogeneous instruction set architectures and operating systems. Although large language models (LLMs) have demonstrated strong capabilities in code generation, existing approaches often suffer from implicit semantic modeling, insufficient handling of platform-specific constraints, and lack of reliable validation mechanisms, leading to unstable and non-compilable outputs in real-world scenarios. To address these limitations, this paper proposes CCGMAS, a multi-agent framework for cross-platform Go code generation. The framework consists of four collaborative agents: a Platform Residue Analysis Agent that extracts platform-dependent semantics and constructs a structured platform residue profile, a Requirement Generation Agent that transforms multi-source code context into a requirement-centered semantic representation with iterative quality optimization, a Code Generation Agent that produces target-platform implementations through multi-candidate synthesis, and a Verification Agent that performs progressive validation and provides structured feedback. By introducing requirement documents as an intermediate semantic layer and incorporating platform residue modeling, CCGMAS enables more explicit semantic alignment across platforms. Furthermore, a feedback-driven refinement loop is designed to iteratively correct errors at different stages, improving both functional correctness and platform compatibility. Experiments on CCGBench demonstrate that CCGMAS reduces the platform residue rate by up to 62.2% in the best case and improves the cross-platform build pass rate by up to 45.0% compared with direct translation baselines.

Xiao Zhang, Bo Yang · 0 citations
Book Open access Jul 2026

TestAgent: A Multi-Agent LLM Framework for Repository-Level Unit Test Generation

TestAgent, a multi-agent tool implemented as a VS Code extension that automates the generation of high-quality unit tests for Java projects using repository-level Code Knowledge Graphs, demonstrates its practical utility for regression testing and bug discovery.

Ye Shang, Quanjun Zhang, Zheng Zhan et al. · 0 citations
Preprint Jul 2026

Bridging Behavior and Implementation: Automated Java Glue Code Generation for Behavior-Driven Development

Behavior-Driven Development (BDD) helps technical and non-technical stakeholders share a common understanding of software requirements through natural-language scenarios. Glue code makes these scenarios executable by mapping each step to the corresponding project code. However, developing and maintaining glue code requires knowledge of both the intended behavior and the underlying codebase, making it a labor-intensive part of BDD as requirements evolve. Although large language models (LLMs) have shown strong code generation capabilities, their use for automated glue code generation remains unexplored. This task requires reasoning over underspecified behavior, related BDD artifacts, and large project codebases. We present AutoGlue, a hierarchical multi-agent framework for automated Java glue code generation. AutoGlue follows a behavior-first workflow that separates behavior interpretation, context retrieval, and code generation. A Behavior Interpreter derives the intent of a step from its scenario context, while a Developer agent retrieves relevant BDD artifacts and project code before generating the final glue code. We evaluate AutoGlue on 1,307 steps from eight open-source Java projects. Compared with few-shot prompting, AutoGlue improves API F1 by 58.7% and CodeBLEU by 43.7%. It produces directly usable glue code for 46.1% of the evaluated steps, while most partially correct outputs require only minor revisions, such as adding missing actions or refining parameters. Ablation results show that behavior interpretation and project-aware context retrieval both contribute substantially to generation quality. These findings demonstrate that LLMs can effectively connect natural-language behavior specifications with project code and support specification-driven software development.

Xinyu Shi, Zhou Yang, An Ran Chen · 0 citations
Conference Jul 2026

Metamorphic Testing of Multi-Agent LLM Systems: A Trace-Based Behavioral Oracle Framework

Multi-agent systems built on large language models (LLMs) are increasingly deployed for complex tasks requiring autonomous planning, tool use, and inter-agent coordination. However, the non-deterministic nature of LLM outputs and the emergent behavior arising from agent interactions render traditional test oracles ineffective, creating a critical gap in quality assurance for agentic AI. This work introduces MORPHAGENT, a framework designed to address the oracle problem in multi-agent LLM systems through trace-based behavioral analysis. Our contributions are threefold: (1) goal-preservation relations that verify consistent goal achievement under input perturbations, (2) coordination-consistency relations that validate inter-agent delegation and communication patterns under agent substitution and reordering, and (3) tool-use integrity relations that ensure semantic equivalence of tool invocation sequences under prompt paraphrasing. MorphAgent instruments agent execution to capture structured traces comprising planning steps, tool calls, message exchanges, and final outputs, then systematically applies metamorphic transformations and checks behavioral invariants without requiring ground-truth oracles. We evaluate the framework on four multi-agent benchmarks spanning code generation, research synthesis, customer service, and data analysis tasks, encompassing 2,840 source-followup execution pairs across three LLM backends. Results show that MORPHAGENT detects 82.0% of seeded behavioral faults, including 90.3% of coordination failures and 81.7% of goal-deviation faults, while maintaining a false positive rate of 6.1%. The framework uncovers 14 previously unreported behavioral anomalies in established multi-agent frameworks, demonstrating its practical utility for assuring agentic AI reliability. These results suggest that trace-based metamorphic testing can serve as a practical foundation for reliable validation of emerging agentic AI systems.

Gopalakrishnan Marimuthu · 0 citations
Preprint Jul 2026

Model-Driven Discipline for Multi-Agent LLMs: Requirement-to-Verification Generation of Traceable System Models

Software complexity is a long-standing challenge for system engineers. Model-Driven Engineering (MDE) addresses it by treating models as first-class artefacts, but a typical MDE process spans many tools and produces heterogeneous models of different system aspects, making traceability, maintenance, and change management difficult. We propose RADIANT, an engineering methodology that combines MDE with Multi-Agent Large Language Models (LLMs) for complete model-based system development, with a focus on safety-critical systems. From a carefully specified requirement model, RADIANT automatically generates heterogeneous models across engineering phases -- a concept model, a domain-specific modelling language, a conforming system model, and a behaviour model -- together with executable, element-level traceability links, on top of which it provides exact, automated change-impact analysis. Generated behaviour models are translated into CSP and formally verified (e.g.\ for deadlock freedom and convergence) with a counterexample-driven repair loop. Evaluating RADIANT across three LLMs, we find that the multi-agent decomposition reliably improves the \emph{syntactic validity} of the generated formal artefacts over a single-agent baseline -- and their \emph{executability} where the model's code generation permits -- while gains in semantic accuracy are model-dependent. A six-participant study shows an order-of-magnitude ($10$--$15\times$) reduction in development time, and the unmodified pipeline transfers to a second domain.

Ran Wei, Letian Zhu, Haochi Wang et al. · 0 citations
Preprint Aug 2026

A Unified Issue Resolution Benchmark for Requirement Clarification, Planning, and Code Generation for Coding Agents

SWE-RPG is introduced, a repository-level benchmark that combines executable patch evaluation with validated ground-truth references (GTs) for Requirement Clarification and Implementation Planning, and suggests implicit-requirement recovery as a key candidate direction for improving coding agents.

Xin Zhou, C. Chong, Kisub Kim et al. · 0 citations