--- title: 'CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation' authors: ['Yifei Wang', 'Ruiyin Li', 'Peng Liang', 'Qiong Feng', 'Zengyang Li', 'Mojtaba Shahin', 'Arif Ali Khan'] date: 2026-11-23 categories: ['cs.SE', 'cs.AI'] tags: ['multi_agent', 'system_design'] source_id: '2606.22082' source_url: 'https://arxiv.org/abs/2606.22082' description: 'Natural language to repository generation (NL2Repo) requires a system to construct an entire software repository from a natural-language requirements document. Compared with function-level code...' keywords: ['cs.SE', 'cs.AI', 'CodeTeam', 'LLM-Powered', 'Multi-Agent'] canonical: 'https://dailyreading.cc/records/arxiv_2606.22082' --- # CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation [YIFEI WANG,](https://orcid.org/0000-0003-0100-6896) School of Computer Science, Wuhan University, China [RUIYIN LI,](https://orcid.org/0000-0001-8536-4935) School of Computer Science, Wuhan University, China [PENG LIANG,](https://orcid.org/0000-0002-2056-5346) School of Computer Science, Wuhan University, China [QIONG FENG,](https://orcid.org/0000-0003-1667-8062) School of Computer Science, Nanjing University of Science and Technology, China [ZENGYANG LI,](https://orcid.org/0000-0002-7258-993X) School of Computer Science, Central China Normal University, China [MOJTABA SHAHIN,](https://orcid.org/0000-0002-9081-1354) School of Computing Technologies, RMIT University, Australia [ARIF ALI KHAN,](https://orcid.org/0000-0002-8479-1481) M3S Research Group, SEIS Unit, University of Oulu, Finland Natural language to repository generation (NL2Repo) requires a system to construct an entire software repository from a natural-language requirements document. Compared with function-level code generation, this task demands longer planning horizons, stable interfaces across files, and iterative debugging of cross-file inconsistencies. To address these challenges, we propose CodeTeam, an LLM-based multi-agent framework that separates planning, decision making, and implementation into distinct, coordinated stages. In the planning stage, multiple Architect agents draft competing software design sketches (SDSs), optionally grounded by retrieved design references. A cto (Chief Technical Officer) agent then evaluates, selects, and normalizes the most promising SDS into a machine-checkable contract that specifies file ownership, public interfaces, and dependency constraints. In the implementation stage, Developer agents generate code under a dependencyaware scheduler with bounded context and lightweight Git-based coordination, while a qa agent runs tests and drives iterative repairs. On the synthesis-based SketchEval benchmark, we compare CodeTeam's prompt-engineering (PE) variant with CodeS and five representative baselines across 19 repositories under a retrieval-free protocol, where CodeTeam improves the mean structural score by 3.84 absolute points over CodeS (53.88 versus 50.04). On the execution-based NL2Repo-Bench benchmark, used as an external validation protocol across 104 tasks, CodeTeam achieves a mean counted-test pass rate of 48.24% compared with 43.25% for CodeS, while full-task resolution remains 0/520 across all evaluated workflows and paired differences relative to the strongest adapter baseline span zero. Ablation results show that retrieval-augmented planning and SDS contract governance improve structural quality, while live interface briefs and qa-driven repair contribute most to repository coherence and executable test passing. CodeTeam and the experimental results are available at [35](#page-32-0). CCS Concepts: • Software and its engineering → Software development techniques. Additional Key Words and Phrases: Large Language Model, Multi-Agent System, Repository-Level Code Generation, Software Engineering Automation, NL2Repo Authors' Contact Information: [Yifei Wang,](https://orcid.org/0000-0003-0100-6896) whiten@whu.edu.cn, School of Computer Science, Wuhan University, Wuhan, China; [Ruiyin Li,](https://orcid.org/0000-0001-8536-4935) School of Computer Science, Wuhan University, Wuhan, China, ryli\_cs@whu.edu.cn; [Peng Liang,](https://orcid.org/0000-0002-2056-5346) School of Computer Science, Wuhan University, Wuhan, China, liangp@whu.edu.cn; [Qiong Feng,](https://orcid.org/0000-0003-1667-8062) School of Computer Science, Nanjing University of Science and Technology, Nanjing, China, qiongfeng@njust.edu.cn; [Zengyang Li,](https://orcid.org/0000-0002-7258-993X) School of Computer Science, Central China Normal University, Wuhan, China, zengyangli@ccnu.edu.cn; [Mojtaba Shahin,](https://orcid.org/0000-0002-9081-1354) School of Computing Technologies, RMIT University, Melbourne, Australia, mojtaba.shahin@rmit.edu.au; [Arif Ali Khan,](https://orcid.org/0000-0002-8479-1481) M3S Research Group, SEIS Unit, University of Oulu, Oulu, Finland, arif.khan@oulu.fi. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org. © 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM. ACM 1557-7392/2026/0-ART0 0:2 Wang et al. #### **ACM Reference Format:** Yifei Wang, Ruiyin Li, Peng Liang, Qiong Feng, Zengyang Li, Mojtaba Shahin, and Arif Ali Khan. 2026. CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation. *ACM Trans. Softw. Eng. Methodol.* 0, 0, Article 0 (2026), 33 pages. https://doi.org/10.1145/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn #### 1 Introduction Large Language Models (LLMs) have demonstrated strong capabilities in code generation, but prevailing evaluation paradigms remain largely confined to short, self-contained tasks such as single-function synthesis in HumanEval-style settings [3]. In contrast, generating a complete software repository from natural-language requirements is a distinct task rather than a direct extension of function-level code generation, introducing challenges in file structures, modules, and interfaces [41]. Recent execution-based NL2Repo-Bench results further show that from-scratch repository generation requires architectural design, dependency management, multi-module implementation, and packaging, and that current agents exhibit failures such as loss of global architectural consistency and brittle cross-file dependencies [6]. Consequently, generating a complete repository from a natural-language specification demands more than localized code completion. It requires a system that can design a complete repository structure, maintain consistency among cross-file interfaces, and iteratively detect and repair errors that manifest throughout the subsequent lifecycle. Recent repository-level benchmarks show that multi-file tasks are heterogeneous. RepoBench [23] and CrossCodeEval [7] focus on repository-level completion within an existing codebase. The FEA-Bench benchmark [22] evaluates incremental feature implementation, requiring the model to add new functionality while editing related parts of an existing repository. Moreover, CodeS [41] and the more recent NL2Repo-Bench [6] push one step further: the model starts from an empty workspace and must generate a complete repository solely from natural-language requirements. Across these settings, recurring challenges include managing long-range dependencies, reasoning under partial or underspecified information, and addressing errors that only manifest during system-level integration. These challenges indicate that repository-level code generation is not solely a modeling problem, but also a workflow design problem. Multi-agent software development systems, such as ChatDev [28] and MetaGPT [15], demonstrate that role specialization and structured interaction can enhance multi-step generation. Similarly, repository-interaction agents such as CodeAgent [43], SWE-agent [39], and OpenHands [34] further underscore the importance of tool use, environment interaction, and iterative execution for achieving reliable outcomes. Despite these advances, a critical **gap** remains in the natural language-to-repository (NL2Repo) [41] generation. Existing approaches address complementary parts of the NL2Repo pipeline, with different assumptions about planning, implementation, and repair. ChatDev [28] and MetaGPT [15] emphasize collaborative development workflows; SWE-agent [39] focuses on issue resolution in existing repositories; OpenHands [34] provides an open platform for AI developers based on agents with integrated benchmarking; and CodeAgent [43] targets repo-level code generation with tool support for information retrieval, implementation, and testing. More closely related efforts, such as ProjectGen [45], incorporate architecture design and skeleton construction. Building on these efforts, we focus on **three challenges** that arise when generating a repository from an empty workspace: (1) high-level design planning that produces a machine-checkable contract, (2) cross-file interface consistency maintained throughout implementation, and (3) coordinating bounded-context implementation against that contract with dependency-aware scheduling and iterative repair. To address this gap, we propose CodeTeam, an LLM-based multi-agent framework tailored to NL2Repo. Our approach extends the sketch-based paradigm of CodeS into a complete end-to-end workflow. Specifically, multiple Architect agents first generate competing software design sketches (SDSs), optionally supported by retrieved design references. A dedicated cto (Chief Technical Officer) agent subsequently selects the most promising design and normalizes it into a machine-checkable contract before code implementation. Then, Developer agents implement files under a dependency-aware scheduler, and exchange interface updates through a lightweight Git-based workflow. Throughout this process, a qa (Quality Assurance) agent is activated under certain conditions, such as when generation tasks are complete, or when test failures are detected. Detected failures are then fed back to the Developer agents for repair. The main contributions of this study are as follows: - We propose CodeTeam, a multi-agent framework for repo-level code generation that combines SDS competition, optional RAG (Retrieval-Augmented Generation) grounding, ctoguided contract normalization, project-specific developer allocation, dependency-aware execution, Git-based coordination, and qa-driven repair. - We conduct a comprehensive evaluation of CodeTeam on the SketchEval benchmark [41](#page-32-2), comparing its prompt-engineering (PE) variant against CodeS and representative single-agent and multi-agent baselines. We report paired task-level comparisons and targeted ablations to examine the contributions of planning and implementation policies. - We introduce an external execution-based validation protocol on NL2Repo-Bench to enable more rigorous end-to-end assessment. Organization: The rest of this paper is structured as follows: Section [2](#page-2-0) presents the related work. Section [3](#page-5-0) describes the study design, including the overall framework of CodeTeam, its core modules, and implementation details. Section [4](#page-16-0) presents the results, which are further analyzed and discussed in Section [5.](#page-24-0) The potential threats to validity are clarified in Section [6.](#page-28-0) Finally, Section [7](#page-29-0) concludes this work with future work directions. #### 2 Related Work ### 2.1 From NL2Code to Long-Context Code Generation Previous work on natural language to code (NL2Code) mainly focuses on generating small, self-contained programs. Benchmarks such as CoNaLa [40](#page-32-7), CONCODE [18](#page-31-4), and APPS [14](#page-31-5) pair natural-language descriptions with target programs and evaluate NL2Code performance using metrics ranging from string-based similarity to execution-based tests. These datasets also drove the development of code-pretrained models. For example, CodeT5 introduces identifier-aware pre-training to improve both code understanding and code generation [36](#page-32-8), while the HumanEval framework established an influential test-based evaluation for synthesized programs [3](#page-30-0). Opensource models then explore richer generation capabilities. InCoder explores bidirectional context and code infilling [11](#page-30-3), whereas CodeGen emphasizes multi-turn program synthesis [26](#page-31-6). Despite these advances, such settings largely underrepresent the complexity of real-world software development. In practice, software implementation activities must follow extensive surrounding context, including dependencies across files, shared utilities, build conventions, and repository-specific APIs. Although CONCODE can partially address this by providing the rest of the Java class as context [18](#page-31-4), most early NL2Code benchmarks still abstract away cross-file calls, configuration, and repository structure. Consequently, strong performance on isolated code snippets does not necessarily translate into the ability to generate coherent and consistent code at the repository level. Recent work has begun to address this limitation by shifting attention from isolated generation to effective context utilization. Retrieval-augmented generation (RAG) introduces mechanisms for dynamically selecting relevant information as external memory [21](#page-31-7), and this idea has been adapted to code generation by retrieving relevant documentation at generation time [46](#page-32-9). Meanwhile, 0:4 Wang et al. long-context adaptation methods such as LongLoRA extend usable context length at lower cost [5](#page-30-4). However, for repository-level code generation, increasing context length alone is insufficient. Effective systems must also determine which contextual information (e.g., design constraints and interface definitions) should be exposed at each step and ensure that such information remains consistent across multiple interdependent generation steps. ## 2.2 Repository-Level Code Completion and NL2Repo Repository-level code generation can be divided into three related yet distinct settings, primarily differentiated by the extent to which the repository context is predefined versus constructed during generation. The first is repository-level completion, where the repository already exists and the main challenge is to retrieve and use relevant cross-file context. For example, RepoBench [23](#page-31-0) formalizes this setting and covers retrieval, completion, and end-to-end pipelines. CrossCodeEval [7](#page-30-2) broadens evaluations to multiple programming languages and shows that cross-file reasoning is beyond a single ecosystem. Methods such as RepoCoder [42](#page-32-10) and GraphCoder [24](#page-31-8) tailor retrieval to this setting by iteratively retrieving relevant repository snippets or code-context graphs before generation. The second setting is repository-level incremental development, in which a system extends an existing repository by implementing a new feature. Compared to completion, this setting requires not only generating new code but also coordinating edits across multiple existing files. For example, FEA-Bench [22](#page-31-1) formalizes this feature-implementation setting and shows that current models struggle when required to add new components and modify existing ones under executable tests. Although this setting is closer to real-world maintenance scenarios than snippet generation, it still assumes that the repository structure, build configuration, and many interfaces are already in place. The third setting is from-scratch repository generation from natural language requirements (NL2Repo). CodeS [41](#page-32-2) formalizes this NL2Repo task and proposes a multi-layer sketch decomposition (RepoSketcher, FileSketcher, and SketchFiller), together with the SketchEval benchmark and the SketchBLEU metric. More recently, NL2Repo-Bench extends the from-scratch setting to 104 Python library tasks and evaluates generated repositories using the original upstream pytest suites, making the benchmark much stricter about end-to-end executability [6](#page-30-1). The three settings above form a spectrum defined by the degree of available structure: from fully specified repositories (completion), to partially specified ones (incremental development), to entirely unconstrained generation (NL2Repo). While closely connected, they are not interchangeable. Methods that perform well when a repository structure and dependencies are given often fail when required to generate file trees, public APIs, and the dependency structure. ### 2.3 LLM-Based Agents for Software Development A growing body of work investigates LLM-based agents that address complex tasks through multi-step interaction, tool use, and collaboration. In the context of software development, systems such as ChatDev [28](#page-31-2) organize specialized agents for design, coding, and testing, using structured communication protocols to improve end-to-end coherence. Similarly, MetaGPT [15](#page-31-3) incorporates standardized operating procedures into the prompting, reducing error propagation across development stages. More recent systems such as MapCoder [17](#page-31-9) further decompose multi-step code generation through explicit planning and retrieval-augmented agents. Along similar lines, Self-Collaboration [8](#page-30-5) organizes analyst, coder, and tester roles, while AgentCoder [16](#page-31-10) separates programming, test design, and test execution with iterative feedback. In repository issue resolution, AutoCodeRover [44](#page-32-11) uses program structure to guide search and repair, whereas Agentless [38](#page-32-12) uses a simpler localization, repair, and validation pipeline; these approaches motivate explicit accounting for workflow complexity and cost, although their existing-repository setting differs from NL2Repo. Therefore, these systems show that role specialization and explicit coordination can improve the stability of long-horizon generation over single-pass generation tasks. Recent studies evaluate LLM agents in realistic software engineering environments grounded in existing repositories. SWE-bench [19](#page-31-11) constructs tasks from real GitHub issues and the corresponding pull requests, requiring models to resolve issues end-to-end by repository edits. Building on this benchmark, SWE-agent demonstrates that designing stronger agent-computer interfaces enables more effective navigation, file editing, and test execution [39](#page-32-4). OpenHands [34](#page-32-5) further generalizes this paradigm by providing an open platform for agent evaluation. While these studies significantly advance agent evaluation, they predominantly assume an existing codebase as the starting point, which differs fundamentally from the NL2Repo setting. More closely related to our work are approaches that explicitly target repository- or project-level generation from scratch. CodeAgent introduces a tool-integrated framework for repo-level code generation and a dedicated benchmark, CodAgentBench [43](#page-32-3). ProjectGen [45](#page-32-6) studies project-level generation from requirements through architecture design, skeleton construction, and code completion guided by a structured architecture representation. These systems are more relevant to the goal of our work, but CodeTeam differs in a key aspect: its software design sketch (SDS) serves not merely as a planning artifact, but as a machine-checkable contract that specifies file ownership, public interfaces, and dependency constraints, and that actively governs every subsequent implementation step. Even in the absence of multi-agent architectures, iterative repository-level generation with intermediate feedback has been shown to improve performance on generation tasks. For example, AlphaCodium [31](#page-31-12) is a test-driven multi-stage pipeline that outperforms single-pass prompting on code generation tasks. Similarly, Self-Debugging [4](#page-30-6) enables LLMs to refine their own generated code by explaining and re-executing it, and Reflexion [32](#page-31-13) equips agents with verbal self-reflection to improve decision-making across development stages. These observations reinforce an important finding for NL2Repo: when tasks involve many dependent decisions, task decomposition and iterative verification are not just implementation conveniences, but central to generating correct repositories. ### 2.4 Conclusive Summary Existing literature has addressed several complementary aspects of repository-level generation under varying operating conditions. Early work on NL2Code and long-context modeling primarily improves local synthesis and context utilization. Studies on repository-level completion and featureimplementation benchmarks focus on generation within existing codebases. Meanwhile, agentbased frameworks demonstrate the benefits of role specialization, tool integration, and iterative verification in managing complex generation workflows. These studies suggest that high-quality software generation depends not only on model capacity, but also on how planning, context, and execution are organized across the end-to-end workflow. While CodeS [41](#page-32-2) and NL2Repo-Bench [6](#page-30-1) establish NL2Repo as a meaningful setting for repository-level code generation from natural-language requirements, the broader methodological space for this setting remains relatively underexplored. In particular, unlike tasks defined over an existing repository, NL2Repo introduces additional challenges, including repository planning, cross-file coordination, and consistency maintenance throughout the generation process. To better address these challenges, we propose CodeTeam, a multi-agent framework for end-to-end repository construction in the NL2Repo setting. Built on sketch-based planning and agent collaboration, CodeTeam further strengthens coordination and iterative refinement through SDS competition, cto-guided contract normalization, dependency-aware scheduling, lightweight Git coordination, and qa-driven repair mechanisms. 0:6 Wang et al. ### 3 Study Design ### 3.1 Research Questions We investigate whether a workflow-oriented multi-agent system improves NL2Repo generation, and which mechanisms contribute to repository quality. To this end, we formulate three research questions (RQs) that progressively evaluate the system at the end-to-end, planning, and implementation levels. RQ1 evaluates controlled end-to-end performance on SketchEval [41](#page-32-2) and uses NL2Repo-Bench [6](#page-30-1) as an external execution-based validation protocol, covering all 104 tasks to distinguish structural alignment, partial test passing, and full-task resolution. RQ2 focuses on the planning stage, examining how retrieval-augmented grounding affects repository structure, and RQ3 analyzes how coordination mechanisms affect repository construction during implementation by scheduling and Git-based communication. ## RQ1: How does CodeTeam's PE version perform on repository-level code generation tasks compared with CodeS and other baseline methods? To answer RQ1, we compare the PE versions of CodeTeam, CodeS, and representative agentbased baselines adapted to NL2Repo. We evaluate structural quality on SketchEval and complement it with execution-based evaluation on NL2Repo-Bench. We restrict the comparison to PE because stage-specific SFT supervision cannot be matched consistently across these workflows. ## RQ2: Does retrieval-augmented grounding improve architectural planning in NL2Repo tasks? Planning mistakes in NL2Repo (e.g., missing modules or inconsistent interfaces) often propagate to downstream implementation. CodeTeam incorporates an optional RAG subsystem in the architect stage, combined with a competition-and-selection workflow. To isolate its effect, we disable retrieval while keeping the rest of the workflow intact, and examine the resulting structural impact across controlled ablation settings. ## RQ3: Do dynamic developer allocation and lightweight Git-based coordination affect repository generation quality? Repository generation requires managing inter-file dependencies and frequent interface updates. CodeTeam addresses these challenges with Architect-guided developer allocation, dependencyaware execution, and a Git-based coordination that propagates interface changes under a bounded context. For answering RQ3, we systematically ablate these coordination mechanisms, evaluating how developer allocation, interface propagation, and QA-driven repair shape structural coherence and execution correctness. Table [1](#page-6-0) summarizes the evaluation used to address each RQ; the statistical protocol is described in Section [3.3.4.](#page-14-0) ### 3.2 Design and Implementation of CodeTeam Figure [1](#page-7-0) illustrates the end-to-end workflow of CodeTeam. Starting from a README-style requirements document (the input format used in SketchEval benchmark [41](#page-32-2) and NL2Repo-Bench benchmark [6](#page-30-1)), the system first performs rule-based preprocessing (Step 0 ) to produce a normalized requirements document. The workflow then enters a planning-and-selection phase: in | RQ | Evidence scope | Results | |-----|--------------------------------------------------------------------------------------------------|-----------------| | RQ1 | Seven PE workflows; structural and execution results; cost and diagnostic analyses | Section 4.1-4.2 | | RQ2 | Retrieval removal (A5), planning variants, and the architect-count/retrieval-depth grid | Section 4.3 | | RQ3 | Allocation, scheduling, interface propagation, and QA variants; eight execution-subset contrasts | Section 4.4 | Table 1. Research questions and the corresponding evaluations. Step ①, N Architect agents independently propose alternative software design sketches (SDSs); in Step ②, a Cto agent evaluates these candidates, performs comparative analysis, and selects a single adopted solution. The adopted SDS explicitly determines the three design artifacts highlighted in Figure 1: the technology stack, the project file structure, and the developer allocation plan. In Step ③, CodeTeam materializes the adopted SDS by initializing a Git repository, pre-constructing the file hierarchy, and instantiating exactly the Developer agents specified in the selected developer plan. Step ④ corresponds to the implementation stage, during which the Developer agents generate code following the prescribed structure while coordinating through lightweight Git-based communication. In Step ⑤, the QA agent evaluates newly completed dependency layers or small batches of files against the requirements and the SDS. In Step ⑥, QA findings are routed back to the responsible Developer agents, and any impacted dependent files are requeued when interface changes propagate. Steps ④-⑥ repeat until one of the following termination conditions is met: no new issues are detected, a predefined iteration limit is reached, or resource constraints (e.g., wall-clock time or token budget) are exhausted. Finally, Step ⑥ outputs the generated Git repository. Unless otherwise specified, the default configuration uses N=4 Architect agents, one cto agent, and one QA agent. The number of Developer agents is not fixed globally. Instead, each Architect agent proposes a project-specific developer plan within its SDS, specifying the required team size of Developer agents, D, and a file-to-developer ownership map. After the cto agent selects an SDS, CodeTeam instantiates exactly those D Developer agents for the run. The choice of agent multiplicity reflects a trade-off between performance and computational cost. Empirically, setting N=4 Architect agents provides a favorable balance between design diversity and token efficiency in the current configuration of CodeTeam; we examine sensitivity to this setting across multiple configurations in Section 4.3. Meanwhile, the cto agent and QA agent are responsible for centralized selection and verification checkpoints. While candidate contract filtering and queue scheduling follow deterministic rules, comparative SDS scoring and lightweight test synthesis operate as sequential single-pass stages that do not substantially benefit from parallelization. Therefore, the current configuration uses a single cto and a single QA agent. To ensure fair evaluation, all agents within a run share the same backbone model and decoding configuration (e.g., temperature, top-p, and the remaining sampling parameters). This design isolates the effects of workflow structure and inter-agent coordination, ensuring that observed performance differences arise primarily from the framework itself rather than variations in model behavior, while cumulative call and token expenditures across workflows are reported explicitly (Section 3.3.1). 3.2.1 Requirements Preprocessing. We treat a repository's README as the input of natural-language requirements. To convert this input into a structured and analysis-ready form, we apply a rule-based preprocessing pipeline. Specifically, we normalize section headings, flatten nested bullet lists, keep fenced code blocks only when they convey actionable information (e.g., commands, 0:8 Wang et al. ![](figures/arxiv_2606.22082/_page_7_Figure_1.jpeg) Fig. 1. CodeTeam workflow from requirements preprocessing (①) to architect planning (①), cto selection (②), solution materialization and Git-coordinated implementation (③-④), Qa-driven repair (⑥-⑥), and final repository output (⑦). configuration keys, or API examples). Nonessential elements (e.g., badges, images, changelogs, release notes, and contributor sections) are removed. The output is a single requirements document with stable section markers. These markers allow subsequent system components to reference requirement spans by heading name rather than by raw line indices. Overall, this preprocessing step keeps requirements-relevant details while eliminating noise that is unlikely to contribute to downstream repository construction. 3.2.2 Software Design Sketch as an Executable Contract. CodeTeam represents each candidate plan as a structured software design sketch (SDS), a machine-checkable design contract that specifies the repository-level implementation plan before code generation begins. Each SDS records the three design artifacts highlighted in Figure 1: the technology stack, the project file structure, and the developer allocation plan. Here, the project structure is broader than a directory tree: it includes the fixed repository file hierarchy, each file's responsibility and public interface, and explicit dependency edges among files. Concretely, an SDS specifies: (1) the technology stack, including programming language, framework, testing framework, and key dependencies; (2) a fixed repository file tree that the system instantiates before implementation; (3) per-file responsibilities and public interfaces (e.g., class or function signatures); (4) explicit cross-file dependencies (e.g., imports or calls); (5) a developer allocation plan that determines how many Developer agents are needed and which files are owned by $Developer\ 0$ to $Developer\ D-1$ ; and (6) coarse workload estimates to guide execution. By embedding team size and ownership into the SDS, the system treats these factors as project-specific planning decisions rather than fixed global hyperparameters. From an operational perspective, the SDS must include four mandatory fields: tech\_stack, repo\_tree, developer\_plan, and files. The repo\_tree field records the file hierarchy, while each entry in files records the corresponding file-level contract, including its purpose, exported interface, owner, and dependencies. A candidate is considered *parseable* only if it can be loaded as JSON without manual repair. *Structural validity* then requires that every file listed in files appears in repo\_tree, every owner identifier appears in developer\_plan, every depends\_on edge points to a declared file or exported symbol, and the resulting inter-file dependency graph is acyclic after collapsing same-file symbol references. Candidates that fail these hard checks are still logged for diagnostics, but excluded from CTO selection. Following plan selection by the CTO agent, CODETEAM initializes a Git repository, creates the full file tree, and instantiates the Developer agents declared in the chosen SDS. During implementation, developers are constrained to operate strictly within the predefined structure: no extra files outside the SDS can be created, and file ownership must remain consistent with the developer plan. This constraint is part of the proposed workflow to ensure that architectural decisions remain traceable to the planning stage and that comparisons across methods stay reproducible. Listing 1 shows a simplified (illustrative) SDS schema. Listing 1. Simplified SDS schema ``` { "tech_stack": {"language": "Python", "framework": "Flask", "test": "pytest"}, "repo_tree": ["src/core.py", "src/api.py", "tests/test_api.py"], "dependencies": ["flask>=2.0", "pytest"], "developer_plan": { "num_developers": 3, "owners": [ {"id": 0, "files": ["src/core.py"]}, {"id": 1, "files": ["src/api.py"]}, {"id": 2, "files": ["tests/test_api.py"]} ] }, "files": [ {"path": "src/core.py", "purpose": "domain objects", "public_api": ["class User: ..."], "owner": 0}, {"path": "src/api.py", "purpose": "HTTP API wrappers", "public_api": ["def fetch_user(user_id: str) -> User"], "depends_on": ["src/core.py::User"], "owner": 1}, {"path": "tests/test_api.py", "purpose": "API tests", "depends_on": ["src/api.py::fetch_user"], "owner": 2} ] } ``` 3.2.3 Architect Stage: Diversified Planning with Optional Retrieval Grounding. Candidate SDSs are created in the Architect stage. Specifically, CodeTeam instantiates N Architect agents, each of which independently drafts one candidate SDS. Each candidate specifies not only the repository structure and interfaces, but also a project-specific development plan, including the number of developers to instantiate and the corresponding file ownership assignments. This design enables different architects to explore trade-offs between parallelism and coordination cost. We use N=4 as the default configuration; the sensitivity grid for N and k is reported in Section 4.3. A common failure mode is design convergence, where different Architect agents produce highly similar designs, thereby reducing diversity and weakening competitive selection. To mitigate this issue, we introduce several mechanisms. First, the generation order of architects is randomized per run. Second, each Architect agent is assigned a different design preference (e.g., minimal vs. layered architecture, or class-based vs. functional organization). Third, instead of exposing full prior SDS candidates, each Architect agent only receives a short summary of previously claimed top-level module names and high-level design intents. Consequently, the non-duplication constraint is enforced at the coarse module-boundary level rather than by exposing full candidate plans to downstream architects. When RAG is enabled, the system retrieves the top-k design references (k=5 by default) from a curated corpus of public repositories. Each item is stored as a compact representation (including README summary, file tree, dependency patterns, file-role summaries, and exported-interface hints) rather than large raw code blocks. Architect agents recognize this information as design 0:10 Wang et al. hints, such as module decompositions, dependency choices, typical file boundaries, and plausible team organization. Architect agents are instructed to produce an original SDS tailored to the current requirements. Before submission, each Architect agent performs a lightweight self-validation that mirrors the parsing and validity checks, as well as the proposed developer count and file ownership mapping. 3.2.4 cto Stage: Selection and Normalization. CTO selection consists of two steps: SDS candidate filtering and SDS candidate selection. First, an automatic filtering process removes invalid candidates. Specifically, candidates are discarded when they exhibit JSON parsing failures, missing ownership, unresolved file references, inconsistent symbol declarations, or cyclic dependencies at the file level. Second, the cto agent evaluates each remaining candidate on four criteria: (1) structural validity, (2) interface consistency, (3) implementability under the stated dependencies and resource constraints, and (4) the appropriateness of the proposed developer count and file ownership relative to the repository scale. Each criterion is scored from 0 to 2, yielding a total score in the range [0, 8], and the scores are presented in cto agent's JSON format output. In the case of ties (i.e., when multiple SDS candidates achieve the same total score), preference is given to candidates with fewer undeclared assumptions and lower cross-module dependency fan-out, as these properties indicate better modularity and robustness. The selected SDS is then normalized into a machine-actionable representation by canonicalizing paths, deduplicating symbols, resolving naming conflicts, materializing the developer-to-file ownership mapping, and constructing a file-level dependency graph for execution. If normalization fails after selection, the next highest-scoring valid SDS candidate is selected. The normalized SDS becomes the single source of truth for Developer agents and QA agents. 3.2.5 Development Stage: Architect-planned Allocation with Dependency-aware Execution. Code-Team implements repositories at the granularity of file tasks, where the task pool is constrained by the developer plan selected in the SDS. Accordingly, Step 4 in Figure 1 comprises two coupled processes: Developer agents follow the adopted file structure and developer-to-file ownership mapping, and they synchronize changes through Git-based coordination. Each Developer agent is assigned ownership of a subset of files, and the number of developers varies across repositories. Once the CTO agent accepts an SDS, that developer-to-file ownership mapping becomes the initial division of labor for the entire execution. To avoid sharing the entire repository with every Developer agent, CodeTeam constructs a compact task-specific context consisting of: (1) the SDS fragment relevant to the target file; (2) the current content of the target file; and (3) interface briefs for dependent files, including signatures, invariants, and the latest summarized interface changes. Developer agents may request at most two additional interface briefs per task, but they do not read the full content of files owned by other agents. Each brief exposes only the depended-upon file path, exported symbols, typed signatures when available, stated invariants, and the latest update\_reason summary. This keeps calls focused and reduces long-context pressure while still enabling cross-file consistency. Algorithm 1 describes the execution logic. It maintains a ready queue based on dependency satisfaction and dispatches each ready file to its recorded owner. Files without prerequisites are prioritized early inside each Developer agent's ownership set; if an interface change occurs, affected dependent files can be requeued for repair and routed back to their owners. The ready-queue priority is a deterministic ordering rather than a learned or tuned score. Among ready files owned by the same Developer agent, CodeTeam first chooses the file with the longest downstream dependency chain, since delaying such a file is most likely to block later tasks. If there is a tie, it chooses the file with more direct dependent files; if a tie still remains, it chooses **Algorithm 1:** Architect-planned developer allocation with dependency-aware execution in CodeTeam. ``` Input: Normalized SDS, ownership map O, file dependency graph G=(V, E) Output: Repository implementation 1 initialize Developer agents from O 2 C \leftarrow \emptyset // completed files R \leftarrow \{v \in V \mid \operatorname{deps}(v) = \emptyset\} 4 compute prio(v) for each v \in V 5 while (R \neq \emptyset) or running tasks exist) and budget remains do foreach idle DEVELOPER agent d_i do if R \cap O(d_i) \neq \emptyset then 7 f \leftarrow \arg\max_{q \in R \cap O(d_i)} \operatorname{prio}(q) 8 assign f to developer d_i with compact context remove f from R and mark f as running 10 if a developer finishes f then 11 commit changes with a structured message including update_reason 12 update the interface index and refresh dependent briefs 13 remove f from running 14 C \leftarrow C \cup \{f\} 15 add newly-ready files into R based on C 16 if OA trigger holds then 17 run tests; route failures to the owners of suspected source files and re-queue affected 18 files if needed ``` the file that appears earlier in the normalized SDS file list. We denote this ordering compactly as prio(f) = (depth(f), fanout(f), -order(f)). 3.2.6 Git-based Coordination, QA Feedback, and Termination. Steps **6**—**6** in Figure 1 form a QA-guided repair loop on top of the Git-tracked workspace. To propagate interface updates without sharing full file contents, CodeTeam uses lightweight Git-based coordination. Each Developer agent works on an isolated branch and commits changes upon completing a file task. Each commit message includes a structured update\_reason record with four elements: the target file, modified exported symbols, a compatibility note, and affected dependent files. These commit messages serve as the primary communication medium, enabling other agents to update dependent files by using summarized interface information. The QA agent evaluates intermediate states during the QA-guided repair loop without attempting to reconstruct hidden reference tests from the benchmarks (e.g., NL2Repo-Bench [6]). Instead, after completing each dependency layer or a small batch of ready files, the QA agent generates lightweight, temporary tests from the SDS and specified requirements. These tests are generated within a temporary QA directory, executed, and removed before final evaluation, ensuring that temporary QA files are excluded from the final delivered file tree and its evaluation. QA feedback is normalized into issue records containing a symptom category, traceback or assertion message, suspected source files, and the minimal repair scope. The scheduler requeues the smallest affected set of files: by default, only the likely source file is requeued and assigned back to its recorded owner 0:12 Wang et al. | Benchmark | Tasks | Easy | Medium | Hard | Endpoint | |---------------|-------|------|--------|------|------------------------------| | SketchEval | 19 | 5 | 8 | 6 | Structural score | | NL2Repo-Bench | 104 | 26 | 46 | 32 | Counted-test pass percentage | Table 2. Benchmarks and evaluation coverage. for repair, and dependent files are requeued only when the issue impacts a public API, import path, or shared configuration artifact. To identify the true error source when failures involve multiple dependent files, the QA agent applies four diagnostic criteria in sequence: (1) *interface consistency*: the suspected source file must declare all symbols and types referenced by the failing dependent file in its public interface; (2) *dependency directionality*: if the failure traceback originates from a dependent file but the root cause is an undeclared or changed interface in a source file, the source file is flagged as the repair target; (3) *structural validity*: the source file must pass syntactic checks independently before the dependent file is re-evaluated; and (4) *minimal repair scope*: when multiple files exhibit cascading failures, only the earliest file in the dependency chain that violates (1) or (3) is requeued by default, and downstream dependents are requeued only when the issue propagates to a public API, import path, or shared configuration artifact. Execution terminates under one of three conditions: (1) the QA agent reports no failures over a complete validation pass, (2) the configured QA-iteration limit is reached, or (3) a global wall-clock or token budget is exceeded. This corresponds to the transition from the iterative loop in Steps 9-9 to the final output in Step 9. The bounded execution policy directly supports Algorithm 1: invalid plans are filtered prior to scheduling, active tasks are removed from R upon dispatch so they cannot be assigned redundantly, and budget exhaustion terminates the attempt by returning the latest repository state. We configure at most three QA rounds per attempt, with early termination triggered if all verification checks pass (analyzed in Section 4.4). By establishing an explicit contract, the SDS limits structural drift, ownership ambiguity, and cascading repair propagation. Fixing the file tree can nevertheless restrict adaptation when an initial design omits an essential module, while strict file-level ownership introduces coordination boundaries. We examine these trade-offs through targeted ablation interventions in Section 3.5. #### 3.3 Benchmark Experiment Design We evaluate our approach on Sketcheval, a benchmark introduced by Code [41]. Sketcheval comprises 19 real-world Python repositories, each paired with requirements documents and reference implementations. Following the official Sketcheval split, we use three difficulty groups: hard repositories contain more than 10 Python files or more than 2,500 Python code lines; medium repositories contain more than 5 Python files or more than 500 Python code lines but do not meet the hard threshold; and the remaining repositories are classified as easy. This yields 5 easy, 8 medium, and 6 hard tasks. For each task, the input is the processed requirements document, and the output is a complete repository generated in an empty workspace. Table 2 summarizes the task coverage of Sketcheval and the complementary execution-based benchmark NL2Repo-Bench. On Sketcheval, we report the composite structural score, which compares generated and reference repository sketches in terms of directory hierarchy and file-level syntax skeletons [41], while complementing this structural score with runtime execution-based testing on NL2Repo-Bench to evaluate functional correctness. | Method | Workflow structure | Retrieval | |---------------------------|----------------------------------------------|-------------| | | | | | Vanilla | Single-pass direct generation | None | | ChatDev | Design–coding–testing dialogue | None | | AutoGPT | Controller/tool loop | None | | CodeS | RepoSketcher, FileSketcher, and SketchFiller | None | | MetaGPT | Structured handoffs across SOP roles | None | | DeepSeek-style
adapter | Coordinator/worker task dispatch | None | | CodeTeam | SDS, CTO, scheduler, and QA | None (main) | Table 3. Generation workflows used in the main comparison. We compare CodeTeam against six baselines that cover single-agent generation, multi-agent software development, generalist autonomous agents, and prior task-specific NL2Repo methods. - Vanilla. The Vanilla baseline uses a single agent to generate the entire repository without explicit task decomposition, role collaboration, or cross-file iterative repair. It receives the processed requirements document and basic file creation and read/write capabilities in a single generation pass. - ChatDev. ChatDev [28](#page-31-2) is an academic multi-agent software development framework. We adapt its design, coding, and testing role decomposition to the NL2Repo setting while restricting its tools to workspace inspection, file editing, and local test execution. ChatDev serves as the primary academic multi-agent baseline for evaluating whether role-based software development workflows transfer to repository-level code generation from natural language requirements. - AutoGPT. AutoGPT [12](#page-30-7) is a representative open-source generalist autonomous agent framework. We instantiate it as a single Controller agent that iteratively plans, generates code, inspects the workspace, edits files, and executes local tests. This baseline evaluates whether a generic long-horizon agent loop, without task-specific repository planning mechanisms, is sufficient for NL2Repo. - CodeS. CodeS [41](#page-32-2) is a task-specific NL2Repo baseline based on multi-layer sketch generation (RepoSketcher, FileSketcher, and SketchFiller). We evaluate its promptengineering (PE) variant. CodeS serves as the representative prior NL2Repo baseline and provides a direct comparison against methods designed specifically for repository-level generation. - MetaGPT. MetaGPT [15](#page-31-3) organizes development through standardized operating procedures (SOPs) and structured handoffs among product, architecture, and engineering roles, broadening the comparison of role-based multi-agent workflows. - DeepSeek-style adapter. The DeepSeek-style adapter implements a coordinator/worker task-dispatch workflow with task decomposition, worker implementation, and integration checking on the same backbone as the other workflows (recorded as DeepSeek-Adapter in the replication artifacts). It evaluates a coordinator/worker architecture rather than a native DeepSeek model. For a fair comparison, none of the baselines receives SDS generation, architect competition, retrieval hints, dependency-aware developer allocation, Git-style interface specifications, or the ownership-aware QA repair mechanism used by CodeTeam. Within each controlled comparison, all agents are instantiated with the same backbone model and decoding configuration. In the 0:14 Wang et al. | Scope of the PE evaluation and the excluded SFT pilot. | Table 4. | | | | | |--------------------------------------------------------|----------|--|--|--|--| |--------------------------------------------------------|----------|--|--|--|--| | Aspect | Evaluation scope | |-----------------------------|------------------------------------------------------------------------------------| | Current comparison | PE only; five repetitions per task | | Reason for excluding
SFT | Stage-specific supervision is not matched symmetrically across the seven workflows | | Prior campaign meta
data | Qwen2.5-72B [33]; 18,240 training and 960 validation instances; 4,266 GPU-hours | | Current backbone | Qwen3.8-27B [29]; shared across all PE workflows | primary seven-workflow comparison (Table [3\)](#page-12-0), all systems—including CodeTeam—operate without external retrieval so that the comparison isolates multi-agent planning and coordination. The retrieval-enabled configuration is evaluated separately in the ablation experiments (Section [3.5\)](#page-15-0). Because cumulative LLM invocations, token throughput, and repair rounds vary across workflow architectures, we report per-workflow resource usage alongside quality metrics. - 3.3.1 Backbone Model and Inference Settings. All evaluated workflows use Qwen3.8-27B [29](#page-31-14) with BF16 inference, thinking mode with medium reasoning effort, a temperature of 0.6, top- of 0.95, and at most 8,192 output tokens per call. The primary evaluation is conducted under prompt engineering across five independent repetitions per task, yielding 95 structural runs and 520 execution runs per workflow (with at most three QA rounds per attempt in CodeTeam). Cumulative call and token expenditures across workflows are analyzed in Section [4.2.](#page-18-0) We chose Qwen3.8-27B, a recent model (released on August 14, 2026) checkpoint with publicly available weights, because we could host it locally within our compute budget for the expanded evaluation. We used the same checkpoint across workflows to control for backbone differences, enable reproducible accounting of token and compute usage, and avoid hosted API version drift. - 3.3.2 SFT Setup. We focus our comparative evaluation on the prompt-engineering (PE) setting to maintain methodological consistency across all seven workflows, because stage-specific supervised fine-tuning (SFT) data cannot be constructed symmetrically across distinct agent architectures. An earlier SFT exploration conducted on Qwen2.5-72B [33](#page-32-13) (summarized in Table [4\)](#page-13-1) is excluded from the comparative evaluation so that all reported rankings reflect matched PE runs on the shared Qwen3.8-27B backbone. - 3.3.3 RAG Corpus and Retrieval Settings. The Architect-stage RAG corpus is built from public Python repositories. We exclude benchmark repositories, as well as forks, mirrors, archived projects, boilerplate templates, and any repositories overlapping with training or test targets by name, origin, package lineage, dependency manifests, or high README similarity. For indexing, each repository is converted into chunks rather than raw code, including README summaries, top-level file trees, dependency manifests, and brief file-role and interface summaries. The resulting artifacts are segmented into 768-token chunks with 128-token overlap and embedded using BGE-M3 [2](#page-30-8). We index these embeddings using an HNSW [25](#page-31-15) index implemented in FAISS [9](#page-30-9). At query time, the architect stage retrieves top-=5 chunks from distinct repositories based on cosine similarity. This design prioritizes reusable architectural patterns while minimizing the risk of implementation-level copying. The corpus contains 1,240 repositories and 186,000 chunks, collected on 2025-11-30. To verify the absence of benchmark leakage, we audited 200 representative retrieval probes against a cosine | Item | Protocol | |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| | Unit of analysis | Task means over five repetitions; repetitions are not treated as independent tasks | | Paired contrasts | Within-task differences between the indicated workflows or between an
intervention and its reference | | Main/structural
inter
vals | 95% percentile task bootstrap, 20,000 resamples; seed 20261030 | | Execution-subset inter
vals | 95% paired 𝑡
intervals over 24 task means | | Multiplicity | Paired 𝑡
tests with separate Holm families: five reported main contrasts, thirteen
structural interventions, and eight execution-subset interventions | | Sensitivity | Leave-one-task-out (LOO) mean ranges across tasks | | Auxiliary summaries | Compute-matched controls and QA diagnostics are summarized descriptively over
520 records | Table 5. Statistical analysis protocol for workflow and intervention comparisons. similarity threshold of 0.72, observing zero suspicious overlaps (Table [17\)](#page-22-0). We further discuss contamination threats to the external validity in Section [6.3.](#page-28-1) 3.3.4 Statistical Analysis and Reproducibility. To assess differences between workflows, we first average the five repetitions within each task and then compute paired within-task differences (Table [5\)](#page-14-1). We use 20,000 task-bootstrap resamples [10](#page-30-10) with a fixed seed of 20261030 for the main and structural intervention confidence intervals. We apply two-sided paired tests with Holm step-down adjustment separately across the five main contrasts, thirteen structural interventions, and eight execution-subset interventions. For the 24-task execution subset, we report 95% paired confidence intervals over the 24 task means. Because the task is the unit of both resampling and inference, repeated runs are not treated as independent tasks. Across all experiments, the evaluation comprises 665 main structural runs (7 × 19 × 5), 1,330 structural intervention runs (14 × 19 × 5 across reference and A1–A13), 855 sensitivity-grid runs (9 × 19 × 5), 3,640 main execution runs (7 × 104 × 5), and 1,080 execution-subset runs (9 × 24 × 5), together with compute-control and QA diagnostic records. All run-level result tables, diagnostic summaries, and statistical analysis scripts are provided in our replication package [35](#page-32-0). #### 3.4 Execution-Based Evaluation on NL2Repo-Bench To assess whether the conclusions on SketchEval generalize to a stricter execution-based setting, we introduce an external evaluation-based protocol on NL2Repo-Bench [6](#page-30-1). NL2Repo-Bench contains 104 tasks spanning nine categories of Python libraries. Each task provides the agent with a single natural-language specification and an empty workspace, and the generated repository is evaluated by executing the original upstream pytest suite in a controlled environment [6](#page-30-1). The benchmark groups tasks by repository size into easy (26), medium (46), and hard (32), with an average input length of approximately 18.8k tokens [6](#page-30-1). Compared to SketchEval, NL2Repo-Bench emphasizes end-to-end executability: generated repositories must satisfy package layout, dependency specification, import consistency, and functional correctness as verified by the upstream test suites [6](#page-30-1). In our work, NL2Repo-Bench is used as an external validation protocol. We follow the documentonly setting of NL2Repo-Bench, where agents do not have access to the target repository, scaffolding, or test cases during generation. A practical adaptation is needed because CodeTeam 0:16 Wang et al. Table 6. Definitions and scope of the thirteen interventions. | ID | Change from reference F | Scope | |-----|---------------------------------------------------------------------------------|---------------| | A1 | One Architect, with the saved planning allowance reallocated to implementation. | Bundled | | A2 | Four sketches from the same prompt, retaining CTO selection. | Single policy | | A3 | Select the first structurally valid sketch without comparative CTO ranking. | Single policy | | A4 | Replace the SDS-governed workflow with a direct implementation plan. | Bundled | | A5 | Disable Architect-stage retrieval ( $k = 0$ ). | Single policy | | A6 | Fix the developer count at $D = 4$ and re-derive the ownership map. | Bundled | | A7 | Assign files round-robin, changing file grouping and repair ownership. | Bundled | | A8 | Disable dependent-file regeneration following interface changes. | Single policy | | A9 | Provide full dependent source files instead of compact interface briefs. | Single policy | | A10 | Dispatch ready files lexically instead of by dependency depth and fan-out. | Single policy | | A11 | Use a shared working tree without agent branches; retain live briefs. | Single policy | | A12 | Freeze interface briefs; omit updates from update_reason records. | Single policy | | A13 | Disable QA-driven testing and source repair. | Single policy | decomposes repository construction into architect competition, CTO-based sketch selection, developer implementation, Git-mediated coordination, and QA-driven repair. Crucially, this adaptation affects only how the repository is generated while preserving the benchmark input condition and final upstream evaluation. Every workflow in Table 11 is evaluated on all 104 tasks across five repetitions. We report three execution outcomes on NL2Repo-Bench: (1) the mean counted-test pass percentage (100 $n_{\rm passed}/n_{\rm total}$ ), averaged across the five repetitions within each task and then across tasks; (2) harness-clean attempts, defined as runs in which all collected tests pass with zero recorded test failures ( $n_{\rm failed}$ =0, $n_{\rm passed}$ = $n_{\rm collected}$ ), even if only a subset of the upstream suite is collected; and (3) full-task resolution (Pass@1), which requires 100% of upstream counted tests to pass ( $n_{\rm passed}$ = $n_{\rm total}$ ) without collection or execution errors. Across all 520 attempts per workflow, no method achieves full-task resolution (Pass@1=0%), reflecting the difficulty of from-scratch repository generation under unmodified upstream test suites. Test collection statistics are analyzed alongside the execution results in Section 4.2. For execution-based ablations, we evaluate eight representative interventions and reference F on a stratified 24-task subset across five repetitions per configuration in Section 4.4. #### 3.5 Ablation Study Design To answer RQ2 and RQ3, we design a set of ablation variants (A1–A13, summarized in Table 6) evaluated relative to a common retrieval-enabled reference configuration F (N=4 architects, top-k=5 retrieval, mean structural score 55.90). Reference F serves as the paired baseline for the thirteen interventions and is kept distinct from the retrieval-free main comparison. These interventions distinguish isolated single-policy modifications (A2, A3, A5, and A8–A13) from bundled configuration changes (A1, A4, A6, and A7) where altering an upstream structural decision simultaneously affects downstream budget allocation, contract governance, or file ownership. 3.5.1 Ablation for RQ2: Disabling RAG in the Architect Stage. To evaluate the role of retrieval, variant A5 removes the retrieval subsystem entirely. Architect agents receive only the requirements document and the competition constraints, without access to external references. The CTO agent still selects and normalizes an SDS, and the downstream Developer agents and QA-guided repair loop remain unchanged. We evaluate A5 on all 19 SketchEval tasks alongside the $3 \times 3$ sensitivity grid over architect count N and retrieval depth k. - 3.5.2 Ablation for RQ3: Disabling Dynamic Allocation in the Developer Stage. To assess the impact of dynamic developer allocation, we separate fixed team sizing (A6, fixing D=4 with re-derived ownership) from round-robin file assignment (A7, distributing files round-robin across developers and altering repair ownership). We additionally evaluate disabling dependent-file regeneration (A8), providing full dependent source files instead of compact briefs (A9), and dispatching ready files lexically rather than by dependency priority (A10). - 3.5.3 Ablation on Git-based Coordination. To assess the impact of commit-based coordination, we separate removing isolated agent branches while retaining live briefs in a shared working tree (A11) from freezing interface briefs to their initial post-planning state without propagating update\_reason updates (A12). Finally, A13 disables QA-driven testing and source repair. All thirteen interventions are evaluated on the 19 SketchEval tasks across five repetitions per configuration. Eight representative interventions (A1, A3, A4, A6, A10, A11, A12, and A13) together with reference F are also evaluated on the 24-task NL2Repo-Bench subset (Table 19). #### 4 Results This section reports the experimental results corresponding to the three RQs formulated in Section 3.1, following the evaluation protocol described in Section 3.3 to Section 3.5. We first present the structural evaluation on Sketcheval (RQ1), followed by execution-based validation on NL2Repo-Bench. We then analyze the intervention contrasts that address planning-stage retrieval (RQ2) and implementation-stage coordination (RQ3). Unless stated otherwise, task scores are averaged over five repetitions. In addition to aggregate scores, we examine task-level differences across the 19 Sketcheval repositories to assess whether improvements are broadly distributed rather than dominated by a few outlier tasks. #### 4.1 RQ1: SketchEval Performance of CodeTeam Table 7 reports the main benchmark results on SketchEval. 4.1.1 Overall Performance in the PE Setting. In the prompt-engineering (PE) setting, CodeTeam achieves an overall structural score of 53.88, compared with 50.04 for CodeS, an improvement of 3.84 points. The DeepSeek-style adapter is the closest comparator at 52.61, while MetaGPT, ChatDev, AutoGPT, and Vanilla obtain mean scores of 48.51, 47.62, 46.83, and 42.88, respectively. The ablations in Section 4.3 and Section 4.4 examine which workflow policies contribute to these differences. A closer look at the per-difficulty breakdown shows how performance varies across repository complexity levels. On *easy* repositories, CODETEAM and CODES achieve mean scores of 57.09 and 51.44 (+5.65 points); on *medium* repositories, 54.06 and 50.00 (+4.06 points); and on *hard* repositories, 50.98 and 48.93 (+2.05 points). The DeepSeek-style adapter reaches 51.44 on hard repositories compared with 50.98 for CODETEAM. While CODETEAM maintains a positive margin over CODES across all three difficulty groups, the margin narrows on harder repositories as inter-module dependencies and coordination demands increase. Table 8 reports paired within-task contrasts across the primary comparators. The structural improvement of CodeTeam over CodeS (+3.84 points) is statistically significant, with a 95% task-bootstrap confidence interval of [2.07, 5.59] and $p_{\rm Holm}=0.003$ . Relative to the DeepSeek-style adapter, CodeTeam shows a +1.27-point difference whose confidence interval ([-0.19, 2.67]) spans 0:18 Wang et al. Table 7. Structural scores in the PE setting for all 19 SketchEval tasks (five repetitions per task; 95 records per workflow). Overall values report mean±sample SD across the 95 records. | Method | Easy (5) | Medium (8) | Hard (6) | All (19) | |------------------------|----------|------------|----------|------------------------------| | Vanilla | 47.13 | 42.75 | 39.54 | 42.88±7.31 | | ChatDev | 50.01 | 47.67 | 45.58 | 47.62±7.12 | | AutoGPT | 48.94 | 45.60 | 46.72 | $46.83 \pm 7.35$ | | CODES | 51.44 | 50.00 | 48.93 | $50.04 \pm 5.70$ | | MetaGPT | 52.03 | 48.74 | 45.28 | 48.51±7.12 | | DeepSeek-style adapter | 55.65 | 51.60 | 51.44 | 52.61±5.80 | | CODETEAM | 57.09 | 54.06 | 50.98 | $53.88{\scriptstyle\pm6.16}$ | Table 8. Paired workflow contrasts (CodeTeam minus comparator), with 95% task-bootstrap confidence intervals and Holm-adjusted *p*-values across the five primary contrasts. | Comparator | Metric | Δ | 95% CI | P Holm | |------------|--------------------|-------|---------------|-------------------| | CodeS | Structural | +3.84 | [2.07, 5.59] | 0.003 | | CodeS | Counted-test (pp) | +4.99 | [2.19, 7.77] | 0.003 | | CodeS | Harness-clean (pp) | +3.46 | [-1.54, 8.46] | 0.372 | | Adapter | Structural | +1.27 | [-0.19, 2.67] | 0.314 | | Adapter | Counted-test (pp) | +1.67 | [-1.03, 4.35] | 0.372 | Table 9. Task-level comparisons (CodeTeam minus CodeS). Structural ties have absolute difference at most 0.5 points; other ties are exact. LOO denotes the leave-one-task-out mean range. | Endpoint | W/T/L | Range | Median | LOO range | |--------------------|----------|-----------------|--------|--------------| | Structural | 15/1/3 | [-4.81, 12.72] | 4.39 | [3.35, 4.32] | | Counted-test (pp) | 67/1/36 | [-36.21, 36.84] | 5.02 | [4.68, 5.39] | | Harness-clean (pp) | 28/54/22 | [-80.00, 80.00] | 0.00 | [2.72, 4.27] | zero ( $p_{\text{Holm}} = 0.314$ ), indicating that the difference between these two coordinated workflows is not statistically significant on the 19-task structural benchmark. - 4.1.2 Scope of the Structural Score. On Sketcheval, the structural score measures repository-level alignment in directory hierarchy, module boundaries, and file-level syntax skeletons [41]. Higher structural scores indicate that a workflow more consistently preserves the target module organization, but structural similarity alone does not verify runtime executability; we therefore pair this evaluation with execution-based testing on NL2Repo-Bench in Section 4.2. - 4.1.3 Repository Size and Task-level Distribution. Finally, we examine whether the observed improvements are broadly distributed across tasks rather than driven by a few outliers. As summarized in Table 9, CodeTeam achieves a higher structural score than CodeS on 15 out of 19 repositories, ties on 1 (difference within 0.5 points), and scores lower on 3. Task-level differences range from -4.81 to +12.72 points (median +4.39 points), and a leave-one-task-out (LOO) analysis yields mean improvements in [3.35, 4.32] points. Table 10. Per-task structural scores on SketchEval, averaged over five repetitions. Differences are computed before rounding. | Task | Stratum | CodeS | CodeTeam | Δ | |------|---------|-------|----------|--------| | 1 | Easy | 57.21 | 62.56 | +5.36 | | 2 | Easy | 47.12 | 59.84 | +12.72 | | 3 | Easy | 56.90 | 57.39 | +0.49 | | 4 | Easy | 45.41 | 46.11 | +0.70 | | 5 | Easy | 50.56 | 59.54 | +8.98 | | 6 | Medium | 54.42 | 55.35 | +0.93 | | 7 | Medium | 46.82 | 53.01 | +6.19 | | 8 | Medium | 46.66 | 52.54 | +5.88 | | 9 | Medium | 48.17 | 52.56 | +4.39 | | 10 | Medium | 53.20 | 57.50 | +4.31 | | 11 | Medium | 48.79 | 47.35 | -1.43 | | 12 | Medium | 40.10 | 45.59 | +5.50 | | 13 | Medium | 61.88 | 68.56 | +6.68 | | 14 | Hard | 42.84 | 49.03 | +6.19 | | 15 | Hard | 42.82 | 44.93 | +2.10 | | 16 | Hard | 52.89 | 52.08 | -0.81 | | 17 | Hard | 55.42 | 50.61 | -4.81 | | 18 | Hard | 49.23 | 55.75 | +6.52 | | 19 | Hard | 50.37 | 53.46 | +3.09 | Table 10 reports per-task scores across the 19 repositories. On Task 2 (*easy*), CodeTeam achieves 59.84 compared with 47.12 for CodeS (+12.72 points), whereas on Task 17 (*hard*), CodeTeam scores 50.61 versus 55.42 for CodeS (-4.81 points). These per-task results show that while CodeTeam improves structural alignment on most tasks, repositories with dense inter-file dependencies can still favor simpler sketch generation. #### 4.2 RQ1: Execution-Based Validation on NL2Repo-Bench To examine whether the improvements observed on SketchEval generalize to a stricter evaluation setting, we additionally compare methods on NL2Repo-Bench [6]. In this benchmark, each generated repository is judged by executing the original upstream pytest suite rather than by structural overlap. Table 11 reports the results. CodeTeam achieves a mean counted-test pass rate of 48.24%, compared with 43.25% for CodeS and 46.57% for the DeepSeek-style adapter. The paired within-task improvement over CodeS is +4.99 percentage points (95% CI [2.19, 7.77], $p_{\text{Holm}} = 0.003$ ; Table 8). Relative to the DeepSeek-style adapter, the +1.67 percentage-point difference is not statistically significant (95% CI [-1.03, 4.35], $p_{\text{Holm}} = 0.372$ ). Across the 104 execution tasks, CodeTeam achieves higher counted-test pass rates than CodeS on 67 tasks, ties on 1, and records lower pass rates on 36 (Table 9). Task-level differences span from -36.21 to +36.84 percentage points (median +5.02 pp; LOO range [4.68, 5.39] pp). For harness-clean attempts, CodeTeam records 85/520 compared with 67/520 for CodeS (+3.46 pp; 95% CI [-1.54, 8.46] pp, $p_{\rm Holm} = 0.372$ ). 0:20 Wang et al. Table 11. Counted-test pass percentage on NL2Repo-Bench (104 tasks; five repetitions per task). Overall SD is computed across the 520 attempts. A harness-clean attempt has zero recorded failures among collected tests ( $n_{\text{failed}}$ =0, $n_{\text{passed}}$ = $n_{\text{collected}}$ ). | Method | Overall | Easy (26) | Medium (46) | Hard (32) | Harness-clean | |------------------------|-------------------|-----------|-------------|-----------|---------------| | Vanilla | 33.34±13.92 | 36.90 | 33.21 | 30.64 | 23/520 | | ChatDev | 39.49±13.54 | 39.56 | 40.90 | 37.40 | 38/520 | | AutoGPT | 38.92±13.86 | 39.77 | 39.83 | 36.93 | 36/520 | | CODES | 43.25±13.77 | 44.49 | 43.71 | 41.59 | 67/520 | | MetaGPT | 40.74±13.19 | 42.53 | 41.12 | 38.72 | 44/520 | | DeepSeek-style adapter | $46.57 \pm 13.33$ | 47.51 | 46.32 | 46.17 | 76/520 | | CodeTeam | $48.24 \pm 18.18$ | 49.68 | 48.84 | 46.21 | 85/520 | Table 12. Full-task resolution and near-complete attempts (520 attempts per workflow). No attempt passes all counted tests; observed Pass@1 is therefore zero for every workflow. | Method | Fully solved | At least 90% | Maximum (%) | |------------------------|--------------|--------------|-------------| | Vanilla | 0 | 0 | 76.47 | | ChatDev | 0 | 0 | 82.61 | | AutoGPT | 0 | 0 | 82.61 | | CodeS | 0 | 0 | 80.00 | | MetaGPT | 0 | 0 | 76.47 | | DeepSeek-style adapter | 0 | 0 | 80.95 | | CODETEAM | 0 | 16 | 96.88 | 4.2.1 Test Coverage and Full-Task Resolution. To contextualize these execution scores, we examine upstream test counts and collection coverage. The total number of upstream counted tests ( $n_{\rm total}$ ) is fixed within each task and ranges from 10 to 80 across the 104 tasks (median 24.5, IQR 19–32). In CodeTeam, collected test cases ( $n_{\rm collected}$ ) range from 4 to 58 per attempt (median 16), with zero harness-level collection errors (collection\_error=0) recorded across runs. Whereas the counted-test pass rate ( $100\ n_{\rm passed}/n_{\rm total}$ ) measures partial test-suite completion relative to the full upstream test count, full-task resolution (Pass@1) requires $n_{\rm passed}=n_{\rm total}$ on a single generation attempt. Across all seven workflows, no attempt passes 100% of counted tests, yielding an observed Pass@1 of 0/520 for every workflow (Table 12). CodeTeam produces 16 near-complete attempts with counted-test pass rates of at least 90% and a maximum pass rate of 96.88%. Among CodeTeam's 85 harness-clean attempts ( $n_{\rm failed}=0$ , $n_{\rm passed}=n_{\rm collected}$ ), the counted-test pass rate averages 64.16% (ranging from 36.36% to 95.65%), indicating that passing all collected tests reflects partial test-suite completion on the collected subset rather than complete task resolution. - 4.2.2 Failure Annotation Reliability. To evaluate the consistency of failure categorization on NL2Repo-Bench, two annotators independently labeled 80 sampled failure records per workflow (560 records in total). As reported in Table 13, pairwise agreement ranges from 86.2% to 90.0% across workflows, with Cohen's $\kappa$ between 0.83 and 0.87 (overall agreement 88.4%, mean $\kappa = 0.85$ ). - 4.2.3 Inference Cost. Table 14 summarizes per-attempt LLM calls, token usage, and compute expenditure across the 520 execution attempts per workflow. Because CodeTeam performs multi-architect planning, CTO selection, dependency-aware implementation, and iterative QA repair, it Table 13. Inter-annotator agreement for failure labels across 80 sampled records per workflow. | Method | Sampled | Agreed | Agreement (%) | κ | |------------------------|---------|--------|---------------|------| | Vanilla | 80 | 72 | 90.0 | 0.87 | | ChatDev | 80 | 71 | 88.8 | 0.86 | | AutoGPT | 80 | 70 | 87.5 | 0.84 | | CodeS | 80 | 72 | 90.0 | 0.87 | | MetaGPT | 80 | 69 | 86.2 | 0.83 | | DeepSeek-style adapter | 80 | 71 | 88.8 | 0.86 | | CODETEAM | 80 | 70 | 87.5 | 0.84 | Table 14. Resource use across 520 attempts per workflow. Calls and token counts (thousands) are medians; node-h denotes recorded node-hours. Totals are sums across all 520 attempts. | Method | Calls | Input
(k) | Output
(k) | Median
node-h | Node-h IQR | Sum
node-h | |------------------------|-------|--------------|---------------|------------------|----------------|---------------| | Vanilla | 1 | 16 | 8 | 0.8 | [0.67, 0.95] | 429.66 | | ChatDev | 16 | 65 | 48 | 7.2 | [5.89, 8.78] | 3891.20 | | AutoGPT | 24 | 87 | 67 | 10.5 | [9.03, 12.71] | 5703.18 | | CodeS | 14 | 71 | 51 | 7.0 | [5.85, 8.56] | 3807.64 | | MetaGPT | 18 | 80 | 55 | 8.5 | [6.90, 10.20] | 4534.83 | | DeepSeek-style adapter | 40 | 300 | 185 | 27.5 | [22.38, 34.01] | 14988.03 | | CODETEAM | 44 | 332 | 201 | 30.0 | [25.12, 35.51] | 16237.89 | uses medians of 44 calls, 332k input tokens, 201k output tokens, and 30.0 node-hours per attempt (16,237.89 node-hours in total across 520 attempts). By comparison, CodeS uses medians of 14 calls, 71k input tokens, 51k output tokens, and 7.0 node-hours per attempt (3,807.64 node-hours in total), with node-hour interquartile ranges of 25.12–35.51 for CodeTeam and 5.85–8.56 for CodeS. The roughly 4.3× ratio in median node-hours reflects the additional compute expended on multi-agent planning and verification. 4.2.4 Compute-Matched Controls. To examine how baseline performance changes under a comparable compute budget, Table 15 summarizes compute-matched controls scaled to a median of 29.8 node-hours across 520 records. Under this matched budget, CodeS reaches a mean structural score of 52.40 and a counted-test pass rate of 46.06%, and the single-agent control reaches 51.90 and 45.80%, compared with 53.89 and 48.25% for CodeTeam. The resulting differences (+1.49 structural points and +2.19 pp over CodeS; +1.99 structural points and +2.45 pp over the single-agent control) indicate that scaling compute narrows the gap relative to the unscaled baselines, while CodeTeam retains a modest descriptive margin under matched compute. 0:22 Wang et al. | Table 15. Aggregate compute-control | ol results across 520 record | s per condition. | |-------------------------------------|------------------------------|------------------| |-------------------------------------|------------------------------|------------------| | Method | Condition | Structural | Counted-test (%) | Median
node-h | Records | |--------------|-----------|------------|------------------|------------------|---------| | CodeS | Matched | 52.40 | 46.06 | 29.8 | 520 | | Single agent | Matched | 51.90 | 45.80 | 29.8 | 520 | | CodeTeam | Full | 53.89 | 48.25 | 30.0 | 520 | Table 16. Intervention contrasts (variant minus reference F). Structural intervals use the task bootstrap over 19 tasks; execution intervals use paired t intervals over 24 task means. Holm adjustment is applied separately across the thirteen structural and eight execution contrasts. "–" denotes an intervention not included in the 24-task execution subset. | ID | Structural ∆ (points)
[95% CI] | P Holm | Execution ∆ (pp)
[95% CI] | P Holm | |-----|-----------------------------------|-------------------|------------------------------|-------------------| | A1 | -1.58 [ -2.70, -0.45] | 0.138 | -1.24 [-4.63, 2.15] | 1.000 | | A2 | -0.68 [-2.55, 1.09] | 1.000 | - | - | | A3 | -1.18 [ -2.46, 0.06] | 0.546 | -0.64 [-3.37, 2.09] | 1.000 | | A4 | -3.88 [ -4.50, -3.33 ] | < 0.001 | -5.31 [-9.08, -1.54] | 0.055 | | A5 | -1.88 [ -2.80, -0.99] | 0.011 | - | - | | A6 | -0.08 [-1.43, 1.21] | 1.000 | -0.05 [-3.32, 3.22] | 1.000 | | A7 | -0.58 [-1.82, 0.59] | 1.000 | - | - | | A8 | -1.28 [ -2.18, -0.36] | 0.138 | - | - | | A9 | -0.28 [-1.29, 0.69] | 1.000 | - | _ | | A10 | -1.48 [ -2.86, -0.16] | 0.363 | -2.52 [-6.34, 1.30] | 0.931 | | A11 | +0.22 [-0.47, 0.88] | 1.000 | +0.26 [-3.54, 4.06] | 1.000 | | A12 | -2.08 [ -3.15, -1.05] | 0.015 | -3.37 [-7.06, 0.32] | 0.431 | | A13 | -4.58 [-5.15, -4.02] | < 0.001 | -7.17 [-10.08, -4.26] | < 0.001 | **RQ1 Summary:** In the PE setting, CodeTeam significantly outperforms CodeS in both structural score (+3.84 points, $p_{\text{Holm}} = 0.003$ ) and counted-test pass rate (+4.99 percentage points, $p_{\text{Holm}} = 0.003$ ), while its differences relative to the DeepSeek-style adapter (+1.27 points and +1.67 percentage points) are not statistically significant. These gains reflect improved partial repository synthesis (0/520 full-task resolution across all workflows) and entail higher compute usage (30.0 vs. 7.0 median node-hours for CodeS). #### 4.3 RQ2: Effect of Retrieval-Augmented Grounding on Architectural Planning Table 16 reports the intervention contrasts for both RQ2 and RQ3 relative to reference configuration F. Removing the RAG subsystem from the architect stage (A5) reduces the mean structural score from 55.90 (reference F) to 54.02, a difference of -1.88 points (3.36% relative; 95% CI [-2.80, -0.99], $p_{\text{Holm}} = 0.011$ ). RAG mitigates this gap by surfacing reusable file-decomposition precedents from real-world repositories, which can remind architects of module boundaries that are easy to omit when requirements are underspecified. For example, for a command-line data-processing task, retrieved design summaries may suggest separating the command layer, core transformation logic, input/output adapters, configuration loading, validation, and tests, instead of collapsing the SDS into only a | Item | Reported value | | |---------------------------------|-----------------|--| | Repositories / design chunks | 1,240 / 186,000 | | | Collection date | 2025-11-30 | | | Similarity threshold / top- $k$ | 0.72 / 5 | | | Leakage probes / positives | 200 / 0 | | Table 17. Retrieval corpus and leakage-probe summary. Table 18. Mean structural scores in the (N, k) sensitivity analysis on SketchEval (19 tasks and five repetitions per cell). | N\k | 3 | 5 | 7 | |-----|------|------|------| | 2 | 52.6 | 53.4 | 54.0 | | 4 | 54.1 | 55.9 | 56.6 | | 6 | 55.2 | 56.9 | 57.1 | command entry point and one processing file. Such retrieval does not have to be purely abstract to be useful: if a retrieved project has a related architectural shape, its file organization can still serve as a valid design precedent, provided that the benchmark repositories are not included in the retrieval corpus and the retrieved artifacts are limited to design-level summaries rather than raw code. Moreover, the RAG corpus is extensible rather than fixed; when new architectural patterns are added to the corpus, the same retrieval-grounded planning mechanism can expose them to the architects. Therefore, the RAG ablation should be interpreted as measuring the practical value of retrieval-grounded design references for SDS generation, rather than as an isolated test of whether the model can abstract and transfer high-level file-decomposition patterns across tasks. Because A5 is evaluated through the end-to-end structural score, this contrast reflects the downstream structural effect of retrieval-grounded planning; Table 17 summarizes the corpus parameters and leakage-probe audit. 4.3.1 Architect Count and Retrieval Depth. Table 16 also reports the remaining planning-stage interventions: single-architect planning with reallocated implementation budget (A1, -1.58 points, $p_{\rm Holm}=0.138$ ), four sketches generated from an identical prompt while retaining CTO selection (A2, -0.68 points, $p_{\rm Holm}=1.000$ ), selecting the first valid sketch without CTO ranking (A3, -1.18 points, $p_{\rm Holm}=0.546$ ), and replacing the SDS-governed workflow with direct implementation (A4, -3.88 points, $p_{\rm Holm}<0.001$ ). Among these, the bundled removal of the SDS contract in A4 produces the largest planning-stage drop, whereas the narrower single-factor changes in A1–A3 yield smaller differences whose adjusted p-values exceed 0.05. Table 18 reports the $3 \times 3$ sensitivity grid over architect count $(N \in \{2, 4, 6\})$ and retrieval depth $(k \in \{3, 5, 7\})$ . Mean structural scores increase from 52.6 at (N=2, k=3) to 57.1 at (N=6, k=7), with the default (4, 5) setting achieving 55.9. Increasing retrieval depth from k=3 to k=5 yields gains of +0.8, +1.8, and +1.7 points for N=2, 4, 6, respectively, whereas increasing from k=5 to k=7 yields smaller gains (+0.6, +0.7, and +0.2 points), indicating diminishing marginal gains at k=7. 0:24 Wang et al. | Stratum | Tasks | Recorded task identifiers / scope | |---------------------|--------|-----------------------------------------------| | Easy | 6 | 2, 4, 9, 18, 20, 24 | | Medium | 11 | 30, 32, 38, 41, 44, 48, 52, 53, 56, 58, 65 | | Hard | 7 | 82, 84, 86, 94, 101, 103, 104 | | Total / repetitions | 24 / 5 | 120 records per configuration; 1,080 in total | | Reference F | 55.00% | Mean recorded counted-test pass percentage | Table 19. Composition of the 24-task execution subset. **RQ2 Summary**: Removing Architect-stage retrieval (A5) reduces the mean structural score by 1.88 points ( $p_{\text{Holm}} = 0.011$ ), and replacing the SDS-governed planning workflow with direct implementation (A4) reduces the structural score by 3.88 points ( $p_{\text{Holm}} < 0.001$ ). Across the (N,k) grid, structural scores increase with architect count and retrieval depth but show diminishing marginal gains beyond (N=4,k=5). ### 4.4 RQ3: Effect of Dynamic Developer Allocation and Git-Based Coordination Table 16 reports the implementation- and repair-stage interventions (A6–A13). Fixing the developer count to D=4 with re-derived ownership (A6) yields a difference of -0.08 points (95% CI [-1.43, 1.21], $p_{\text{Holm}} = 1.000$ ), and round-robin file assignment (A7) yields -0.58 points (95% CI [-1.82, 0.59], $p_{\text{Holm}} = 1.000$ ). Disabling dependent-file regeneration (A8, -1.28 points, $p_{\text{Holm}} = 0.138$ ), providing full dependent source files instead of compact briefs (A9, -0.28 points, $p_{\text{Holm}} = 1.000$ ), and lexical file scheduling (A10, -1.48 points, $p_{\text{Holm}} = 0.363$ ) likewise do not reach statistical significance after multiplicity adjustment. By contrast, the two Git-coordination interventions separate branch mechanics from interface-brief propagation. Removing isolated agent branches while retaining live briefs in a shared working tree (A11) yields +0.22 points (95% CI [-0.47,0.88], $p_{\rm Holm}=1.000$ ), whereas freezing interface briefs to their initial post-planning state without propagating update\_reason updates (A12) reduces the structural score by 2.08 points (95% CI [-3.15,-1.05], $p_{\rm Holm}=0.015$ ). Finally, disabling QA-driven testing and source repair (A13) produces the largest structural reduction of 4.58 points (95% CI [-5.15,-4.02], $p_{\rm Holm}<0.001$ ), indicating that iterative test-driven repair is the largest single contributor among the implementation-stage interventions. 4.4.1 Execution-Subset Consistency. Table 19 summarizes the 24-task NL2Repo-Bench subset, and Table 16 reports its eight paired execution contrasts relative to reference F (which has a mean counted-test pass rate of 55.00% on this subset, distinct from the retrieval-free 48.24% mean across all 104 tasks). The sign of each execution contrast matches its structural counterpart, although only A13 remains statistically significant after Holm adjustment. On the 24-task execution subset (Table 16), disabling QA-driven source repair (A13) produces the largest drop in counted-test pass rate (-7.17 percentage points; 95% CI [-10.08, -4.26], $p_{\rm Holm} < 0.001$ ). Replacing the SDS-governed workflow with direct implementation (A4) lowers the pass rate by 5.31 percentage points (95% CI [-9.08, -1.54], $p_{\rm Holm} = 0.055$ ), and freezing interface briefs (A12) lowers the pass rate by 3.37 percentage points (95% CI [-7.06, 0.32], $p_{\rm Holm} = 0.431$ ), while the remaining contrasts have confidence intervals spanning zero. These results indicate that QA-driven repair and SDS contract governance account for the largest execution-subset differences. | Property | Accepted | Rejected | |------------------------------------------------------|----------|--------------| | Records | 282 | 238 | | Mean recorded upstream pass (%) | 55.2 | 40.0 | | Rejected records at 1 / 2 / 3 rounds | - | 77 / 80 / 81 | | Overall acceptance / point-biserial $\boldsymbol{r}$ | 54.2% | / 0.34 | Table 20. QA diagnostic summary across 520 records. 4.4.2 QA Diagnostics and Termination. Table 20 summarizes the internal QA diagnostic records across 520 runs. Internal QA accepted 282 candidate repositories and rejected 238 (54.2% acceptance). Accepted records achieved a higher mean upstream counted-test pass rate (55.2%) than rejected records (40.0%, point-biserial correlation r=0.34), indicating a positive association between internal QA acceptance and upstream test performance. Among the 238 rejected records, termination occurred after 1, 2, and 3 QA rounds in 77, 80, and 81 cases, respectively, reflecting runs that exhausted their repair or budget allowance without passing internal QA. **RQ3 Summary**: Across the implementation-stage interventions, QA-driven source repair (A13: -4.58 structural points and -7.17 execution percentage points, both $p_{\rm Holm} < 0.001$ ) and live interface-brief updates (A12: -2.08 structural points, $p_{\rm Holm} = 0.015$ ) yield statistically significant structural contributions. By contrast, fixed developer sizing (A6), round-robin assignment (A7), and removing agent branches while retaining live briefs (A11) produce small differences whose confidence intervals span zero. #### 5 Discussion This section interprets the experimental findings, examines the mechanisms behind the observed improvements, and discusses the broader implications for researchers and practitioners. #### 5.1 Interpretation of the Results We first examine CodeTeam's performance improvements and then discuss the role each evaluation benchmark plays in interpreting these results. 5.1.1 Understanding CodeTeam's Performance Improvements. Multi-agent coordination and QA-driven repair complement sketch-based decomposition. A central observation from Table 7 is that CodeTeam improves over CodeS in the PE setting, increasing the mean structural score from 50.04 to 53.88. This finding suggests that a structured multi-agent workflow can compensate for cross-file consistency limitations that emerge when directly prompting a backbone model to produce a complete repository. The finding is consistent with the original motivation of CodeS, where multi-layer sketch decomposition reduces the difficulty of generating long structured outputs [41]. However, our results further indicate that sketch decomposition alone is not sufficient when code generation spans multiple interacting files; it needs to be coupled with inter-agent coordination and iterative QA-driven repair mechanisms that actively maintain cross-file consistency during implementation (Table 16). 0:26 Wang et al. Structural consistency through the SDS contract. The software design sketch (SDS) functions as an explicit, machine-checkable contract that binds file boundaries, public APIs, and inter-file dependencies into a coherent specification. Once such a contract is established, Developer agents can implement files with smaller, task-specific contexts, and the developer-to-file ownership mapping enables precise routing of repairs and re-queuing of dependent files when interfaces drift during iterative development. Replacing this contract-governed workflow with direct implementation (A4) reduces the structural score by 3.88 points ( $p_{\text{Holm}} < 0.001$ ) and lowers the execution-subset pass rate by 5.31 percentage points ( $p_{\text{Holm}} = 0.055$ ; Table 16). This observation also resonates with findings from repository-level completion benchmarks, where downstream performance depends heavily on retrieving and using appropriate cross-file context rather than generating code in isolation [23, 42]. Effects of repository complexity. The structural improvements over CodeS occur across all three difficulty strata, with the margin decreasing from 5.65 points on easy repositories to 4.06 on medium and 2.05 on hard repositories (see Table 7), as both methods obtain lower absolute scores on harder tasks. As dependency complexity increases, systems that fail to control interface consistency tend to degrade more sharply. While CodeTeam's dependency-aware scheduling and Qa-driven repair mechanisms improve over the baselines across strata, harder repositories with denser inter-module coupling remain challenging. Alignment of multi-agent coordination with established software engineering practices. The design of these mechanisms can be understood through an analogy with human development teams. A repository is not built by a single developer writing all files in sequence; the process typically involves (1) an architecture review in which senior engineers agree on module boundaries, public interfaces, and technology choices; (2) a task assignment phase in which files or features are distributed to developers based on expertise and module ownership; and (3) iterative code review cycles in which reviewers verify interface contracts and cross-module consistency before changes are merged. CodeTeam instantiates this workflow at the agent level: the Architect competition and CTO selection correspond to architecture review, the SDS-based developer allocation corresponds to task assignment with explicit ownership, and the QA-driven repair loop corresponds to code review. These coordination structures reduce the context burden on any single agent while preserving global coherence across the repository. **Repository scale and the SDS.** The SDS also provides an explicit target for repository scale. This role is consistent with an empirical pattern reported in Codes, where agent-based baselines tend to generate only a small number of files or produce limited LOC, while sketch-based pipelines can sustain larger repository structures [41]. In CodeTeam, the SDS combined with the pre-construction of the full file tree reduces the likelihood that a generation run terminates with an underspecified or incomplete repository. Although size alignment should not be interpreted as evidence of correctness by itself, it serves as a basic validity indicator: generating a repository at a plausible scale is often a necessary precondition for capturing the required functionality. 5.1.2 Roles of Evaluation Benchmarks. Role of Sketcheval. Sketcheval rewards structural alignment with a reference repository sketch and captures architectural and dataflow quality. The Sketchebleu metric, motivated by Codebleu but extended to repository-level sketches with dataflow matching [30, 41], provides a scalable proxy for structural and semantic alignment when running every generated repository is computationally prohibitive. In this study, the composite structural score serves as a scalable indicator of repository-level syntactic and architectural alignment across candidate workflows. Role of NL2Repo-Bench. The NL2Repo-Bench experiment shifts the evaluation objective from repository resemblance to executable correctness: whether the generated repository can pass the original upstream pytest suite across 104 tasks [6,](#page-30-1) [41](#page-32-2). While CodeTeam achieves the highest mean counted-test pass rate (48.24% vs. 43.25% for CodeS), full-task resolution remains 0/520 across all evaluated workflows (Table [11\)](#page-19-0). Crucially, the relative ranking of methods on NL2Repo-Bench mirrors the ranking on SketchEval, providing converging evidence that the improvements from structured planning and coordination are not artifacts of sketch-level evaluation but reflect improvements in repository construction quality under partial test-suite completion. Complementarity of the two benchmarks. Taken together, SketchEval and NL2Repo-Bench suggest that a robust repository-level evaluation strategy should combine proxy metrics with execution-based tests. SketchBLEU is useful during rapid system iteration because it is computationally inexpensive, whereas NL2Repo-Bench provides a stricter assessment of functional completeness at larger scale [6,](#page-30-1) [41](#page-32-2). We view these two benchmarks as complementary rather than competing evaluation modalities. ## 5.2 Implications 5.2.1 Implications for researchers. Assessing workflow design across backbone models. Our experiments show that CodeTeam improves over CodeS on a shared Qwen3.8-27B [29](#page-31-14) backbone in the PE setting; whether these gains hold under fine-tuning or across other model families remains an open question. Fine-tuning and multi-agent workflow design are complementary rather than substitutive: fine-tuning helps the backbone model follow structured output formats and cope with longer input contexts, while the multi-agent workflow reduces the burden on any single generation call to maintain cross-file consistency, such as stable APIs, import paths, file ownership, and dependency assumptions across repository components [5,](#page-30-4) [41](#page-32-2). Future work should investigate whether the relative rankings and ablation patterns hold across backbone families (e.g., CodeLlama, DeepSeek-Coder, StarCoder2) and model parameter sizes (e.g., 7B, 14B, 32B, and 70B models) to strengthen the generalizability of these findings. Bridging NL2Repo generation with execution-based repository-level repair. The QA loop in CodeTeam is intentionally lightweight, yet the intervention results (Table [16\)](#page-21-2) indicate that even targeted repository-level repair meaningfully improves structural alignment and counted-test pass rates, although passing internal QA tests remains distinct from resolving full upstream test suites (Table [20\)](#page-24-1). This finding aligns with the broader trend where multi-step workflows with intermediate feedback consistently outperform single-pass prompting [31](#page-31-12). Bridging NL2Repo generation with repository-repair benchmarks such as SWE-bench [19,](#page-31-11) [39](#page-32-4) represents a promising direction: a system could first generate a repository from natural-language requirements and then apply repair-oriented agents to improve functional correctness under execution-based feedback. Incorporating richer static analysis feedback. The current RAG corpus provides design-level hints about file decomposition and dependency structure but does not explicitly encode architectural quality attributes such as modularity and testability. Incorporating architecture-specific retrieval criteria, for instance, filtering candidates by coupling metrics or documentation completeness, may further stabilize SDS generation quality. Similarly, static analysis tools [20](#page-31-17), call-graph analysis [13](#page-31-18), type-inference engines, and import-resolution tools could be integrated into the QA stage to detect interface mismatches earlier and more precisely than the current lightweight test-generation approach. 0:28 Wang et al. Multi-language and large-scale repository support. All experiments are conducted on Python repositories. Extending CodeTeam to multi-language projects would require language-aware dependency analysis, heterogeneous build-system support, and cross-language interface specifications. At larger scales, the SDS can grow to thousands of tokens for repositories exceeding 40~50 files; a hierarchical SDS that first specifies package-level contracts and then refines file-level details within each package could mitigate this issue. Parallelizing QA across independent subgraphs of the dependency graph is a natural extension that could reduce the wall-clock time of the QA repair loop by allowing independent file groups to be checked and repaired concurrently. 5.2.2 Implications for Practitioners. Balancing up-front planning and downstream implementation rework. A well-established principle in software engineering is that defects detected during design are substantially cheaper to fix than those discovered during integration or testing [1]. The multi-agent design of CodeTeam applies this principle to LLM-based code generation: it shifts computational effort toward up-front architectural planning (SDS generation and CTO evaluation) so that cross-file inconsistencies are resolved before individual files are implemented. As reported in Table 14, this coordination increases median model calls from 14 (CodeS) to 44 and raises median prompt/output volume from 71k/51k to 332k/201k tokens. The multi-agent workflow introduces additional cost, but this cost is most valuable for repository-level tasks where architectural planning, cross-file consistency, and iterative repair directly affect final code quality. Therefore, practitioners should not necessarily use the full workflow for every programming request. Instead, they can reserve CodeTeam for complex or high-risk tasks, and use dynamic developer allocation and bounded QA rounds to keep the token budget manageable. Choosing bounded QA iterations. Iterative feedback loops are widely used in LLM-based code generation to progressively improve output quality [4, 32]. A common finding across these systems is that the improvement contributed by each additional iteration decreases rapidly: early rounds fix the most critical errors, while later rounds yield only incremental refinements. In CodeTeam, bounding the QA loop to at most three rounds caps verification cost while addressing cross-file interface and runtime errors (A13 in Table 16). A resource-constrained deployment of CodeTeam could therefore limit the number of QA iterations to 2~3 rounds, making CodeTeam practical for cost-sensitive settings: teams can start with a small number of QA rounds and increase it only for repositories whose complexity warrants additional QA iterations. Explicit interface contracts and file ownership enable incremental adoption of CODETEAM. Three design choices made in CodeTeam facilitate its incremental adoption in practice. First, the SDS serves as an *explicit interface contract*: each file's public API (function signatures, input/output types, and cross-file call targets) is declared before implementation begins, so that downstream Developer agents can code against stable interfaces rather than evolving assumptions. Second, *file-level ownership* assigns every source file to exactly one Developer agent, eliminating concurrent developer edits to the same file and simplifying conflict resolution. Third, *dependency-aware task scheduling* (see Algorithm 1) topologically orders ready file-generation tasks according to their import dependencies, ensuring that a file's dependencies are generated before the file itself. Together, these three design choices make it straightforward to parallelize file generation across independent subgraphs of the dependency graph, thereby scaling CodeTeam to larger repositories without sacrificing cross-file consistency. Explicit API interface specification and role-based partitioning of file ownership are also related to coordination mechanisms explored in multi-agent code-generation frameworks such as ChatDev [28] and MetaGPT [15]; however, CodeTeam differs by grounding these mechanisms in an SDS-centered, repository-level generation and QA workflow. Practitioners can adopt individual components of CodeTeam (e.g., SDS-based planning without the full QA loop) incrementally, scaling the multi-agent workflow to match the size of the target repository. ## 6 Threats to Validity We discuss the main threats to the validity of our findings and the mitigation steps we adopted, following standard guidance for empirical software engineering studies [37](#page-32-14). ## 6.1 Construct Validity On SketchEval, the primary outcome measure is SketchBLEU [41](#page-32-2), an automatic proxy for repository quality. SketchBLEU extends CodeBLEU [30](#page-31-16) and therefore inherits a well-known limitation of n-gram-based metrics [27](#page-31-19): a higher score does not, by itself, guarantee that the generated repository is executable, secure, or maintainable. To mitigate this threat, we additionally conduct an execution-based evaluation on NL2Repo-Bench [6](#page-30-1), reporting counted-test pass rates alongside harness-error and full-resolution counts (Table [11\)](#page-19-0), as well as QA acceptance diagnostics across 520 runs (Table [20\)](#page-24-1). Because the two benchmarks cover different task sets, consistent method rankings provide converging evidence across structural and execution criteria rather than a tasklevel correlation between the two metrics. A second construct threat concerns the operationalization of the mechanisms utilized in Code-Team. For instance, "dynamic developer allocation" is realized through a combination of Architect-guided team sizing, file ownership mapping, dependency-aware execution (Algorithm [1\)](#page-10-0), and compact context packages. Part of the measured SketchBLEU improvement may stem from specific implementation-level design choices rather than solely from the high-level mechanism. Similarly, "RAG for design" depends on a particular retrieval corpus, embedding model, and top- setting. To make these choices transparent, we describe the concrete implementation of each component in Section [3.2,](#page-5-2) and Table [16](#page-21-2) distinguishes isolated policy changes from bundled workflow replacements (specifically A1, A4, A6, and A7) [37](#page-32-14). ### 6.2 Internal Validity Internal validity concerns whether the observed performance differences can be attributed to the workflow mechanisms under study rather than to confounding factors. Although all methods share the same Qwen3.8-27B backbone model and decoding configuration, the prompt templates and total invocation budgets differ across systems. In addition, the main baseline comparisons operate without retrieval augmentation, whereas the full intervention reference enables design-level RAG; we therefore analyze baseline and intervention contrasts within their respective comparison families and include a compute-matched 1× pass-budget control (Table [15\)](#page-21-1). Additionally, CodeTeam involves several hyperparameters (=4, top-=5, QA iteration limit, CTO scoring rubric) selected based on preliminary experiments rather than exhaustive search. We report all chosen values transparently (see Section [3.2\)](#page-5-2) and conducted sensitivity checks ( ∈ {2, 4, 6}, ∈ {3, 5, 7}) in Table [18.](#page-22-1) ### 6.3 External Validity Our evaluation covers SketchEval (19 Python repositories) [41](#page-32-2) and NL2Repo-Bench (104 Python tasks) [6](#page-30-1) using an open-weights Qwen3.8-27B backbone [29](#page-31-14) in the prompt-engineering setting, with execution-based interventions evaluated on a 24-task stratified subset (Table [19\)](#page-23-1). Despite this breadth, the study does not cover larger codebases, mixed-language systems, or projects with heavier build or test pipelines, nor does it evaluate fine-tuned or alternative model families (the DeepSeek-style adapter is evaluated on the shared Qwen3.8-27B backbone). We standardized on a single locally hosted model checkpoint with publicly available weights rather 0:30 Wang et al. than proprietary LLM APIs to ensure controlled workflow comparisons, reproducible token and compute accounting, and freedom from hosted API version drift across the full evaluation matrix. We therefore position our findings as evidence within a clearly defined benchmark setting rather than as universal claims. A related threat is data contamination: benchmark repositories may appear in the backbone model's training corpora. We follow the official CodeS evaluation protocol [41](#page-32-2), and retrieved RAG artifacts are provided only as high-level design hints with explicit prohibitions on verbatim copying, while our 200-probe leakage audit (Table [17\)](#page-22-0) filters target and near-duplicate repositories at a cosine-similarity threshold of 0.72, but benchmark-specific bias cannot be fully excluded. ## 6.4 Reliability LLM-based systems are inherently stochastic, and multi-agent workflows can amplify variability. To improve reliability, we evaluate each method with five repetitions per task and report mean±standard deviation. As detailed in Section [3.3.4,](#page-14-0) we apply two-sided paired tests to tasklevel means, with Holm adjustment within each comparison family. We use 20,000 task-bootstrap resamples for the main comparisons and structural interventions, and paired confidence intervals for the 24-task execution subset. On the 19-repository structural benchmark and the 24-task execution subset, sample size limits statistical power for smaller contrasts (for example, the difference between CodeTeam and the DeepSeek-style adapter has a 95% confidence interval spanning zero and should be interpreted as inconclusive rather than equivalent). For failure categorization across 80 sampled failure records per workflow, two annotators achieved substantial inter-rater agreement ( = 0.85; Table [13\)](#page-20-0). Finally, our replication package provides the run-level result tables, diagnostic summaries, and statistical analysis scripts [35](#page-32-0). #### 7 Conclusions This paper presents CodeTeam, an LLM-based multi-agent framework for NL2Repo that separates planning, decision making, and implementation into distinct, coordinated stages. CodeTeam combines (1) an architecture competition stage in which multiple Architect agents propose competing software design sketches (SDSs), optionally grounded by retrieval-augmented design references, (2) a cto agent that selects and normalizes the winning SDS into a machine-checkable contract, and (3) a dependency-aware development stage with dynamic developer allocation, Gitbased coordination, and qa-driven iterative repair. On SketchEval, CodeTeam improves the mean structural score from 50.04 (CodeS) to 53.88 in the prompt-engineering (PE) setting. On NL2Repo-Bench, the mean counted-test pass rate increases from 43.25% to 48.24%, while full-task resolution remains 0/520 across all evaluated workflows. The structural ablations support contributions from design-level retrieval, SDS contract governance, live interface-brief updates (A12), and qa-driven testing and source repair (A13). On the execution subset, only A13 is statistically significant after Holm adjustment. The confidence intervals for the developer allocation and branch isolation contrasts (A6, A7, and A11) include zero, leaving it unclear whether either mechanism improves repository generation quality. Overall, the main implication of CodeTeam is that NL2Repo should be treated not merely as a long-context code generation task, but as a coordinated software engineering process. We proposed CodeTeam because from-scratch repository generation exposes failure modes that local code synthesis alone cannot reliably address: the system must first derive a coherent architecture from underspecified requirements, then preserve interface contracts, dependency constraints, and implementation responsibilities across many file-level generation steps. By making these contracts explicit and coupling them with role specialization, dependency-aware scheduling, and targeted QA feedback, CodeTeam provides a practical workflow pattern for using LLM agents as a coordinated development team rather than isolated code generators. Its contribution, therefore, lies not only in improving benchmark performance but also in demonstrating how LLM-based repository generation can be made more structured, inspectable, and extensible. As future work, we plan to evaluate the framework across additional backbone families, strengthen execution-based feedback in the QA loop to bridge the gap between structural evaluation and functional correctness, incorporate stronger static analysis feedback (e.g., call-graph analysis, type inference) into the scheduling and repair stages, and extend the framework to multi-language and larger-scale repositories through hierarchical SDS planning and cross-language interface contracts. We discuss these directions in detail in Section [5.2.](#page-26-0) ## Data Availability The replication package for this study is available at [35](#page-32-0), including the run-level result tables, diagnostic summaries, and statistical analysis scripts used to reproduce all reported tables and statistical comparisons. ### Acknowledgments This work has been partially supported by the National Natural Science Foundation of China (NSFC) with Grant Nos. 92582203 and 62402348. #### References - [1] Barry Boehm and Victor R. Basili. 2001. Software Defect Reduction Top 10 List. IEEE Computer 34, 1 (2001), 135–137. - [2] Jianlv Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. 2024. BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation. arXiv preprint arXiv:2402.03216 (2024). - [3] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. 2021. Evaluating Large Language Models Trained on Code. arXiv preprint arXiv:2107.03374 (2021). - [4] Xinyun Chen, Maxwell Lin, Nathanael Schärli, and Denny Zhou. 2024. Teaching Large Language Models to Self-Debug. In Proceedings of the 12th International Conference on Learning Representations (ICLR). OpenReview.net, 1–23. - [5] Yukang Chen, Shengju Qian, Haotian Tang, Xin Lai, Zhijian Liu, Song Han, and Jiaya Jia. 2024. LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models. In Proceedings of the 12th International Conference on Learning Representations (ICLR). OpenReview.net, 1–19. - [6] Jingzhe Ding, Shengda Long, Changxin Pu, Huan Zhou, Hongwan Gao, Xiang Gao, Chao He, Yue Hou, Fei Hu, Zhaojian Li, Weiran Shi, Zaiyuan Wang, Daoguang Zan, Chenchen Zhang, Xiaoxu Zhang, Qizhi Chen, Xianfu Cheng, Bo Deng, Qingshui Gu, Kai Hua, Juntao Lin, Pai Liu, Mingchen Li, Xuanguang Pan, Zifan Peng, Yujia Qin, Yong Shan, Zhewen Tan, Weihao Xie, Zihan Wang, Yishuo Yuan, Jiayu Zhang, Enduo Zhao, Yunfei Zhao, He Zhu, Liya Zhu, Chenyang Zou, Ming Ding, Jianpeng Jiao, Jiaheng Liu, Minghao Liu, Qian Liu, Chongyang Tao, Jian Yang, Tong Yang, Zhaoxiang Zhang, Xinjie Chen, Wenhao Huang, and Ge Zhang. 2025. NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents. arXiv preprint arXiv:2512.12730 (2025). - [7] Yangruibo Ding, Zijian Wang, Wasi Ahmad, Hantian Ding, Ming Tan, Nihal Jain, Murali Krishna Ramanathan, Ramesh Nallapati, Parminder Bhatia, Dan Roth, and Bing Xiang. 2023. CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion. In Proceedings of the 37th Annual Conference on Neural Information Processing Systems (NeurIPS). NeurIPS Proceedings, 46701–46723. - [8] Yihong Dong, Xue Jiang, Zhi Jin, and Ge Li. 2024. Self-Collaboration Code Generation via ChatGPT. ACM Transactions on Software Engineering and Methodology 33, 7 (2024), 189:1–189:38. - [9] Matthijs Douze, Anton Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. 2024. The Faiss Library. arXiv preprint arXiv:2401.08281 (2024). - [10] Bradley Efron. 1979. Bootstrap Methods: Another Look at the Jackknife. Annals of Statistics 7, 1 (1979), 1–26. - [11] Daniel Fried, Armen Aghajanyan, Jessy Lin, Sida Wang, Eric Wallace, Freda Shi, Ruiqi Zhong, Wen-tau Yih, Luke Zettlemoyer, and Mike Lewis. 2022. InCoder: A Generative Model for Code Infilling and Synthesis. arXiv preprint arXiv:2204.05999 (2022). - [12] Significant Gravitas. 2023. AutoGPT. [https://github.com/Significant-Gravitas/AutoGPT.](https://github.com/Significant-Gravitas/AutoGPT) 0:32 Wang et al. [13] Mary W. Hall and Ken Kennedy. 1992. Efficient Call Graph Analysis. ACM Letters on Programming Languages and Systems 1, 3 (1992), 227–242. - [14] Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, and Jacob Steinhardt. 2021. Measuring Coding Challenge Competence With APPS. arXiv preprint arXiv:2105.09938 (2021). - [15] Sirui Hong, Mingchen Zhuge, Jiaqi Chen, Xiawu Zheng, Yuheng Cheng, Jinlin Wang, Ceyao Zhang, Zili Wang, Steven Ka Shing Yau, Zijuan Lin, Liyang Zhou, Chenyu Ran, Lingfeng Xiao, Chenglin Wu, and Jürgen Schmidhuber. 2024. MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework. In Proceedings of the 12th International Conference on Learning Representations (ICLR). OpenReview.net, 1–29. - [16] Dong Huang, Jie M. Zhang, Michael Luck, Qingwen Bu, Yuhao Qing, and Heming Cui. 2023. AgentCoder: Multi-Agentbased Code Generation with Iterative Testing and Optimisation. arXiv preprint arXiv:2312.13010 (2023). - [17] Md. Ashraful Islam, Mohammed Eunus Ali, and Md Rizwan Parvez. 2024. MapCoder: Multi-Agent Code Generation for Competitive Problem Solving. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL). ACL, 4917–4942. - [18] Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, and Luke Zettlemoyer. 2018. Mapping Language to Code in Programmatic Context. In Proceedings of the 23rd Conference on Empirical Methods in Natural Language Processing (EMNLP). ACL, 1643–1652. - [19] Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. 2024. SWEbench: Can Language Models Resolve Real-World GitHub Issues?. In Proceedings of the 12th International Conference on Learning Representations (ICLR). OpenReview.net, 1–51. - [20] Syed Mohammad Kashif, Ruiyin Li, Peng Liang, Amjed Tahir, Qiong Feng, Zengyang Li, and Mojtaba Shahin. 2026. Beyond Functional Correctness: Design Issues in AI IDE-Generated Large-Scale Projects. arXiv preprint arXiv:2604.06373 (2026). - [21] Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. arXiv preprint arXiv:2005.11401 (2020). - [22] Wei Li, Xin Zhang, Zhongxin Guo, Shaoguang Mao, Wen Luo, Guangyue Peng, Yangyu Huang, Houfeng Wang, and Scarlett Li. 2025. FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementation. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (ACL). ACL, 17160–17176. - [23] Tianyang Liu, Canwen Xu, and Julian McAuley. 2024. RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems. In Proceedings of the 12th International Conference on Learning Representations (ICLR). OpenReview.net, 1–19. - [24] Wei Liu, Ailun Yu, Daoguang Zan, Bo Shen, Wei Zhang, Haiyan Zhao, Zhi Jin, and Qianxiang Wang. 2024. GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model. arXiv preprint arXiv:2406.07003 (2024). - [25] Yu. A. Malkov and D. A. Yashunin. 2016. Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs. arXiv preprint arXiv:1603.09320 (2016). - [26] Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. 2022. CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis. arXiv preprint arXiv:2203.13474 (2022). - [27] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a Method for Automatic Evaluation of Machine Translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics (ACL). ACL, 311–318. - [28] Chen Qian, Wei Liu, Hongzhang Liu, Nuo Chen, Yufan Dang, Jiahao Li, Cheng Yang, Weize Chen, Yusheng Su, Xin Cong, Juyuan Xu, Dahai Li, Zhiyuan Liu, and Maosong Sun. 2024. ChatDev: Communicative Agents for Software Development. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL). ACL, 15174–15186. - [29] Qwen Team. 2026. Qwen3.8-27B. Hugging Face model card. - [30] Shuo Ren, Daya Guo, Shuai Lu, Long Zhou, Shujie Liu, Duyu Tang, Neel Sundaresan, Ming Zhou, Ambrosio Blanco, and Shuai Ma. 2020. CodeBLEU: a Method for Automatic Evaluation of Code Synthesis. arXiv preprint arXiv:2009.10297 (2020). - [31] Tal Ridnik, Dedy Kredo, and Itamar Friedman. 2024. Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering. arXiv preprint arXiv:2401.08500 (2024). - [32] Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. 2023. Reflexion: Language Agents with Verbal Reinforcement Learning. In Proceedings of the 37th Annual Conference on Neural Information Processing Systems (NeurIPS). NeurIPS Proceedings, 8634–8652. - [33] Qwen Team, An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Dayiheng Liu, Fei Huang, Haoran Wei, et al. 2024. Qwen2.5 Technical Report. arXiv preprint arXiv:2412.15115 (2024). - [34] Xingyao Wang, Boxuan Li, Yufan Song, Frank F. Xu, Xiangru Tang, Mingchen Zhuge, Jiayi Pan, Yueqi Song, Bowen Li, Jaskirat Singh, Hoang H. Tran, Fuqiang Li, Ren Ma, Mingzhang Zheng, Bill Qian, Yanjun Shao, Niklas Muennighoff, Yizhe Zhang, Binyuan Hui, Junyang Lin, Robert Brennan, Hao Peng, Heng Ji, and Graham Neubig. 2025. OpenHands: An Open Platform for AI Software Developers as Generalist Agents. In Proceedings of the 13th International Conference on Learning Representations (ICLR). OpenReview.net, 1–38. - [35] Yifei Wang, Ruiyin Li, Peng Liang, Qiong Feng, Zengyang Li, Mojtaba Shahin, and Arif Ali Khan. 2026. Replication Package for the Paper: CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation. [https://github.com/WhitenWhiten/CodeTeam.](https://github.com/WhitenWhiten/CodeTeam) - [36] Yue Wang, Weishi Wang, Shafiq Joty, and Steven C. H. Hoi. 2021. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation. In Proceedings of the 26th Conference on Empirical Methods in Natural Language Processing (EMNLP). ACL, 8696–8708. - [37] Claes Wohlin, Per Runeson, Martin Höst, Magnus C. Ohlsson, Björn Regnell, and Anders Wesslén. 2012. Experimentation in Software Engineering. Springer. - [38] Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, and Lingming Zhang. 2025. Demystifying LLM-Based Software Engineering Agents. Proceedings of the ACM on Software Engineering 2, FSE (2025), FSE037. - [39] John Yang, Carlos E Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, and Ofir Press. 2024. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. In Proceedings of the 38th Annual Conference on Neural Information Processing Systems (NeurIPS). NeurIPS Proceedings, 50528–50652. - [40] Pengcheng Yin, Bowen Deng, Edgar Chen, Bogdan Vasilescu, and Graham Neubig. 2018. Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflow. In Proceedings of the 15th International Conference on Mining Software Repositories (MSR). ACM, 476–486. - [41] Daoguang Zan, Ailun Yu, Wei Liu, Dong Chen, Bo Shen, Yafen Yao, Wei Li, Xiaolin Chen, Yongshun Gong, Bei Guan, Zhiguang Yang, Yongji Wang, Lizhen Cui, and Qianxiang Wang. 2026. CodeS: Natural Language to Code Repository via Multi-Layer Sketch. ACM Transactions on Software Engineering and Methodology 35, 7 (2026), 1–26. - [42] Fengji Zhang, Bei Chen, Yue Zhang, Jacky Keung, Jin Liu, Daoguang Zan, Yi Mao, Jian-Guang Lou, and Weizhu Chen. 2023. RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generation. In Proceedings of the 28th Conference on Empirical Methods in Natural Language Processing (EMNLP). ACL, 2471–2484. - [43] Kechi Zhang, Jia Li, Ge Li, Xianjie Shi, and Zhi Jin. 2024. CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL). ACL, 13643–13658. - [44] Yuntong Zhang, Haifeng Ruan, Zhiyu Fan, and Abhik Roychoudhury. 2024. AutoCodeRover: Autonomous Program Improvement. In Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA). ACM, 1592–1604. - [45] Qianhui Zhao, Li Zhang, Fang Liu, Junhang Cheng, Chengru Wu, Junchen Ai, Qiaoyuanhe Meng, Lichen Zhang, Xiaoli Lian, Shubin Song, and Yuanping Guo. 2025. Towards Realistic Project-Level Code Generation via Multi-Agent Collaboration and Semantic Architecture Modeling. arXiv preprint arXiv:2511.03404 (2025). - [46] Shuyan Zhou, Uri Alon, Frank F. Xu, Zhiruo Wang, Zhengbao Jiang, and Graham Neubig. 2023. DocPrompting: Generating Code by Retrieving the Docs. In Proceedings of the 11th International Conference on Learning Representations (ICLR). OpenReview.net, 1–16.