CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation

arXiv:2606.22082 · cs.SE, cs.AI · Submitted 2026-06-20 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Computer Science. The day in computer science: software, systems and theory on arXiv.

Tom: We're looking at the paper: "CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation".

Title and authors: Tom: Now we’re looking at the title and the authors for "CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation". It lists Yifei Wang, Ruiyin Li, Peng Liang, Qiong Feng, Zengyang Li, Mojtaba Shahin, and Arif Ali Khan.

Jane: That’s a whole team of researchers from different schools at Wuhan University and Nanjing University of Science and Technology. It tells you that this isn't just one person's idea; it’s a collaborative effort to tackle this big problem.

Lu: The paper says that the authors are addressing the challenge in natural language to repository generation, which is a task that demands longer planning horizons and stable interfaces across files, which is why they needed this multi-agent structure.

Meng: So, what does "repository-level code generation" really mean in practice for us? Is it just writing one big file, or are we talking about the entire structure of a project? I need to know the scope when I'm trying to figure out how to deploy something at scale.

Lalam: It demands constructing an entire software repository from a natural language requirements document, which means they have to worry about all the files and how they connect together, not just one piece of code. That’s why they needed this system.

Tom: It sounds like the core idea is that generating a complete software repository requires managing all those moving parts simultaneously in a way that current single agents aren't good at yet. They are proposing to separate the planning, decision making, and implementation into distinct stages so they can manage that complexity.

Jane: So the authors are tackling the challenge by introducing this coordinated framework, which separates these three main phases so the system can handle those long-term planning horizons and stable interfaces across files. It’s a structural approach to coding that seems necessary for this kind of task.

Lu: The paper lays out how they propose using multiple Architect agents to draft competing software design sketches, and then a Chief Technical Officer agent selects the most promising one to turn into a contract. That competition part is supposed to help them find good starting points before the heavy lifting begins.

Meng: Competition sounds like it could be slow though. How do you manage that without just having too many agents running everything all the time during that initial design phase? What’s their approach to keeping that planning stage efficient?

Lalam: They are focusing on making sure the planning stage results in something machine-checkable, a contract specifying file ownership and dependencies, which cuts down on wasted implementation time later. That normalization step is key to efficiency.

Tom: So they are combining this competition with optional Retrieval Augmented Generation, or RAG grounding, which lets architects look at other designs for inspiration before drafting their own sketches. That’s adding a layer of external knowledge to the initial planning process.

The paper's summary: Tom: Moving on to the actual summary of "CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation". They explain how this framework works by separating planning, decision making, and implementation into distinct stages so they can handle the long horizons and interface stability needed for a whole repository.

Jane: It sounds like the core idea is that they’re trying to solve the problem of losing global architectural consistency that we see when agents work on different files separately. They’re trying to enforce structure before the actual coding begins, which seems like a necessary step for large systems.

Lu: The authors show that this framework performs better than just using one agent for the whole thing, especially when you look at their evaluation on NL2Repo-Bench where sketch-level improvements actually translate into executable code correctness. They prove that good planning leads to working results.

Meng: That link between a good design sketch and actual working code is what we always want to see, but they also show that removing the retrieval part from the planning stage caused a drop in performance, which tells us how much help those external references provide when those initial ideas are being formed.

Lalam: The paper also highlights how dynamic developer allocation, choosing who does what based on project modularity makes a real difference compared to just using Git coordination alone. It helps stop those cross-file inconsistencies before they even happen in the implementation stage.

Tom: So we're hearing about this whole coordinated approach: SDS competition, optional RAG grounding, CTO-guided contract normalization, and then dependency-aware scheduling for developers. It’s a lot of moving parts working together to handle the whole repo task at once.

Jane: That sounds like they are trying to fix the problem of losing global architectural consistency that we see when agents work on different files separately. They’re trying to enforce structure before they start coding, which seems like a necessary step for large systems.

The paper's improvements: Tom: Now we’re talking about the suggested improvements in "CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation". They talk about things like adaptive workflow selection and automated contract normalization, which are ways they’re trying to make the framework smarter.

Jane: That sounds like they are trying to optimize how they spend their resources depending on the difficulty of what we’re being asked to build. It’s about being smarter about which training path to take for a given project, based on whether the task is easy, medium, or hard.

Lu: They also emphasize automated contract normalization by having the Chief Technical Officer agent select a sketch and turn it into that machine-checkable contract, setting all the rules for file ownership and interfaces upfront before anyone starts writing code. That formalizes the design before implementation starts.

Meng: I’m worried about that normalization step being too rigid though. If the initial sketch is slightly off, forcing it into a strict contract might just lead to wasted effort trying to satisfy impossible rules during coding. What’s their defense against that rigidity?

Lalam: They suggest that the whole process is designed for iteration, and if a failure happens during Quality Assurance, they feed those failures back into the developer agents for repair, which acts as a soft correction mechanism instead of just failing and starting over.

Tom: So we're talking about adaptive workflow selection based on task complexity where the system can dynamically switch between a prompt engineering approach and a supervised fine-tuning approach based on whether the task is expected to be easy or hard. It’s about being smarter about which training path to take for a given project.

Jane: That sounds like optimizing how they spend their resources depending on the difficulty of what we’re being asked to build, by adjusting the approach for different complexities. It makes sense that you wouldn't want to use a heavy method for something that doesn't need it.

Conclusion: Tom: So to wrap up, "CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation" is this multi-agent framework that coordinates planning through design competition and contract normalization before developers implement code with dependency scheduling guided by a QA agent. It’s about taking repo generation from a single long task to a series of structured steps.

Lu: I think what’s most significant is how they show that the planning stage, even with optional RAG grounding, significantly improves the quality of the final output compared to simpler methods like just using a single model. The initial idea generation process itself is key to the whole success here.

Meng: From an engineering standpoint, it shows that having specialized agents handle different phases—like a dedicated CTO for contracts—can actually prevent massive errors during implementation that we usually see in larger systems when things start getting bigger.

Tom: So CodeTeam is this framework for repo-level code generation, combining competition and structured coordination to handle complexity. Thanks for joining us to talk about this paper.

Wuhan University School of Computer Science Department of Computer Science Nanjing University of Science and Technology Central China Normal University RMIT University University of Oulu Institute

cs.SE, cs.AI

Submitted: 2026-06-20

Updated: 2026-11-20

Comments: 33 pages, 1 images, 20 tables, Manuscript revision to a Journal (2026)

Code: https://github.com/Significant-Gravitas/AutoGPT

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 100/100

The gist: CodeTeam is an LLM-based multi-agent framework designed for repository-level code generation, moving beyond simple file-level completion to address complex coding tasks across entire codebases.

Key concepts

SketchEval benchmark
This is a standardized test used to measure how good the generated software design sketches (SDSs) are. It uses SketchBLEU metrics to score the similarity between human-written designs and AI-generated ones, helping researchers quantify planning quality.
Chief Technical Officer (cto) agent
This agent acts as a reviewer during the planning stage. Its job is to evaluate competing design sketches and select the best one, then formalizing it into a machine-readable contract that defines file responsibilities and dependencies for the developers.
Dependency-aware scheduler
This is a system that manages when different code files are written. Instead of writing everything at once, this scheduler ensures that a file is only coded after all its required prerequisite files have been successfully implemented, respecting the actual code structure.
Dynamic developer allocation
This concept involves assigning specific developers to specific parts of the repository based on its modularity. This proactive assignment helps prevent inconsistencies by ensuring team structure matches how the repository is naturally organized.

Terminology

Summary

CodeTeam is an LLM-based multi-agent framework designed for repository-level code generation, moving beyond simple file-level completion to address complex coding tasks across entire codebases. p. 0

Where the paper says it

CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation YIFEI WANG, School of Computer Science, Wuhan University, China RUIYIN LI, School of Computer Science, Wuhan University, China PENG LIANG, School of Computer Science, Wuhan University, China QIONG FENG, School of Computer Science, Nanjing University of Science and Technology, China ZENGYANG LI, School of Computer Science, Central China Normal University, China MOJTABA SHAHIN, School of Computing Technologies, RMIT University, Australia ARIF ALI KHAN, 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.

The framework operates by separating the process into distinct, coordinated stages: planning, decision making, and implementation. p. 0
Where the paper says it

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. p. 0

Where the paper says it

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 Chief Technical Officer (cto) agent then evaluates these SDSs to select and normalize the most promising sketch into a machine-checkable contract specifying file ownership, public interfaces, and dependency constraints. p. 0
Where the paper says it

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.

The implementation stage involves Developer agents generating code under a dependency-aware scheduler utilizing bounded context and lightweight Git-based coordination. p. 0
Where the paper says it

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.

A QA agent subsequently runs tests and drives iterative repairs. p. 0
Where the paper says it

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.

The main contributions of the study include:

  1. Proposing CodeTeam as a multi-agent framework combining SDS competition, optional Retrieval-Augmented Generation (RAG) grounding, cto-guided contract normalization, project-specific developer allocation, dependency-aware execution, Git coordination, and QA-driven repair for repo-level code generation. p. 2

    Where the paper says it

    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.

  2. Conducting a comprehensive evaluation on the SketchEval benchmark using SketchBLEU metrics to compare prompt engineering (PE) and supervised fine-tuning (SFT) variants against CodeS variants, as well as single-model and multiple agent baselines. p. 2

    Where the paper says it

    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 SketchEval benchmark with SketchBLEU [42] metrics comparing both a prompt-engineering (PE) variant and a supervised fine-tuning (SFT) variant against the corresponding CodeS [42] variants, as well as a single-model baseline and multiple agent baselines.

  3. Introducing an external execution-based validation protocol on NL2Repo-Bench for rigorous end-to-end assessment. p. 2

    Where the paper says it

    ● We conduct a comprehensive evaluation of CodeTeam on SketchEval benchmark with SketchBLEU [42] metrics comparing both a prompt-engineering (PE) variant and a supervised fine-tuning (SFT) variant against the corresponding CodeS [42] variants, as well as a single-model baseline and multiple agent baselines. ● We introduce an external execution-based validation protocol on NL2Repo-Bench to enable more rigorous end-to-end assessment.

Research Questions (RQs) yielded significant findings:

  • RQ1 Summary: CodeTeam consistently outperformed all baselines on both SketchEval and NL2Repo-Bench across PE and SFT settings. On SketchEval, it achieved 51. p. 0

    Where the paper says it

    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 explicitly compare CodeTeam’s prompt-engineering (PE) and supervised fine-tuning (SFT) variants with the corresponding CodeS variants, where CodeTeam improves the overall SketchBLEU by 4.

    7% (PE) and 60.9% (SFT) overall SketchBLEU, with improvements concentrated in structural and dataflow sub-scores, particularly for medium and hard repositories. p. 0
    Where the paper says it

    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 explicitly compare CodeTeam’s prompt-engineering (PE) and supervised fine-tuning (SFT) variants with the corresponding CodeS variants, where CodeTeam improves the overall SketchBLEU by 4.

    On NL2RepoBench, CodeTeam reached 34. p. 5
    Where the paper says it

    2 Design and Implementation of CodeTeam Figure 1 illustrates the end-to-end workflow of CodeTeam. Starting from a README-style requirements document (the input format used in SketchEval benchmark [42] and NL2RepoBench benchmark [8]), the system first performs rule-based preprocessing (Step 0 ) to produce a normalized requirements document.

    6% (PE) and 42.3% (SFT) pass rates, demonstrating that sketch-level improvements translate into executable correctness. p. 5
    Where the paper says it

    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-toend performance on SketchEval [42] and uses NL2Repo-Bench [8] as an external execution-based validation protocol, running all 104 tasks under the same controlled conditions to verify that sketch-level improvements translate into executable correctness.

  • RQ2 Summary: Removing RAG from the architect stage resulted in a 4.2-point drop in overall SketchBLEU (8. p. 0

    Where the paper says it

    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 explicitly compare CodeTeam’s prompt-engineering (PE) and supervised fine-tuning (SFT) variants with the corresponding CodeS variants, where CodeTeam improves the overall SketchBLEU by 4.

    1% relative), with greater degradation observed on harder repositories. p. 0
    Where the paper says it

    Ablation results show that project-specific developer allocation and retrieval-augmented planning each contribute substantially to the SketchBLEU improvement (9. 1% relative, respectively), while Git-based coordination adds a smaller but consistent complementary improvement.

    Conversely, RAG enhanced planning diagnostics: SDS parse success rate rose from 0. p. 5
    Where the paper says it

    CodeTeam incorporates an optional RAG subsystem in the architect stage, combined with a competition-and-selection workflow. To isolate its effect, we remove retrieval while keeping the rest of the workflow intact, and evaluate both end-to-end quality and planningstage diagnostics.

    86 to 0.94, structural validity improved from 0. p. 7
    Where the paper says it

    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.

    78 to 0.90, and plan diversity increased from 0. p. 6
    Where the paper says it

    The choice of agent multiplicity reflects a trade-off between performance and computational cost. Empirically, setting 𝑁=4 Architect agents provides a favorable balance between design diversity and token efficiency in the current configuration of CodeTeam.

    25 to 0.42.

  • RQ3 Summary: Dynamic developer allocation proved more impactful than Git-based coordination because it influences the workflow earlier and more globally; aligning developer count, file ownership, repair routing, and context construction with repository modularity prevents cross-file inconsistencies before implementation. When removed, QA rounds increased from 3. p. 6

    Where the paper says it

    Nonessential elements (e. , badges, images, changelogs, release notes, and contributor sections) are removed.

    6 to 5.2, interface-mismatch failures rose from 7. p. 2
    Where the paper says it

    Then, Developer agents implement files under a dependency-aware scheduler, 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.

    8 to 12.4, and average context size grew from 3. p. 0
    Where the paper says it

    9 absolute points, respectively. On the execution-based NL2Repo-Bench benchmark, used as an external validation protocol, CodeTeam achieves the highest average test pass rate in both settings (34.

    1k to 4.4k tokens per developer call, leading to a 5. p. 9
    Where the paper says it

    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.

    1-point SketchBLEU drop (9. p. 4
    Where the paper says it

    OpenHands [34] 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.

    9% relative). p. 0
    Where the paper says it

    Ablation results show that project-specific developer allocation and retrieval-augmented planning each contribute substantially to the SketchBLEU improvement (9. 1% relative, respectively), while Git-based coordination adds a smaller but consistent complementary improvement.

The overall implication is that NL2Repo should be treated not just as a long-context code generation task but as a coordinated software engineering process. p. 0

Where the paper says it

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 explicitly compare CodeTeam’s prompt-engineering (PE) and supervised fine-tuning (SFT) variants with the corresponding CodeS variants, where CodeTeam improves the overall SketchBLEU by 4.

Future work plans involve integrating execution-based feedback into the QA loop, incorporating stronger static analysis into scheduling and repair stages, and extending the framework to multi-language and larger repositories via hierarchical SDS planning. The evaluation utilized 19 Python repositories for SketchEval [42] and 104 Python tasks for NL2Repo-Bench [8]. p. 3
Where the paper says it

CodeS [42] 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 [8].

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Adaptive workflow selection based on task complexity: The system can dynamically choose between a prompt-engineering (PE) variant and a supervised fine-tuning (SFT) variant based on whether the task is expected to be easy, medium, or hard, optimizing resource usage for SketchBLEU improvement.

  2. Retrieval-grounded architectural planning: The framework can incorporate optional retrieval augmented generation (RAG) in the Architect stage to retrieve design references from a corpus of public repositories, which helps architects produce more grounded software design sketches (SDSs).

  3. Automated contract normalization: A Chief Technical Officer (CTO) agent can select the most promising Software Design Sketch (SDS) and normalize it into a machine-checkable contract specifying file ownership, public interfaces, and dependency constraints.

  4. Dependency-aware implementation scheduling: Developer agents can generate code under a scheduler that respects the dependency graph, ensuring that files are implemented only after their prerequisites are complete, which is achieved by prioritizing files based on a priority function prio(f).

  5. Git-based coordination with structured feedback: Implementation can be coordinated through lightweight Git-based workflows where developers commit changes with structured update reason records, and the QA agent routes failures back to responsible agents for repair.

  6. Dynamic developer allocation: The system can use project-specific developer allocation within the SDS to determine team size and file ownership, which prevents cross-file inconsistencies by aligning team structure with the repository's actual modular structure.

Abstract

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 dependency-aware 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). CodeTeam and the experimental results are available at https://github.com/WhitenWhiten/CodeTeam

Sources

Related papers