arXiv:2606.22082cs.SEcs.AI2026-06被引 1

用多智能体协作生成完整代码仓库,提升设计与实现一致性。

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

论文配图:CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation
图 1 · 摘自论文原文
  • 分阶段协同:规划、决策、实现由不同智能体负责,各司其职。
  • 在SketchEval上提升SketchBLEU达4.1(提示工程)和2.9(微调)点。
  • 适合需高一致性代码生成的项目级开发场景,如自动化系统构建。

自然语言到代码仓库生成(NL2Repo)要求系统从自然语言需求文档构建完整软件仓库。相比函数级生成,该任务需更长的规划周期、文件间稳定接口及跨文件不一致性的迭代调试。为此,我们提出CodeTeam——一个基于大模型的多智能体框架,将规划、决策与实现分离为协调阶段。规划阶段中,多个Architect智能体生成竞争性软件设计草图(SDS),可结合检索到的设计参考。CTO智能体评估、选择并标准化最优SDS为机器可检的契约,明确文件归属、公共接口与依赖约束。实现阶段,开发者智能体在依赖感知调度下生成代码,使用有限上下文与轻量级Git协调;质检智能体运行测试并驱动迭代修复。在基于合成的SketchEval基准上,CodeTeam的提示工程(PE)与监督微调(SFT)版本分别相较对应CodeS版本提升4.1与2.9的绝对SketchBLEU。在执行级的NL2Repo-Bench基准上,两种设置下均取得最高平均测试通过率(34.6% PE,42.3% SFT),证实设计改进延伸至上游测试套件下的功能正确性。消融实验表明,项目特定开发者分配与检索增强规划分别带来9.9%与8.1%的相对SketchBLEU提升。CodeTeam及实验数据见https://github.com/WhitenWhiten/CodeTeam。

原文摘要 · Abstract (English)

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 (SDS), optionally grounded by retrieved design references. A CTO 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 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 and 2.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.6% PE, 42.3% SFT), confirming that the sketch-improvements extend to functional correctness under upstream test suites. Ablation results show that project-specific developer allocation and retrieval-augmented planning each contribute substantially to the SketchBLEU improvement (9.9% and 8.1% relative, respectively). CodeTeam and the experimental results are available at https://github.com/WhitenWhiten/CodeTeam

代码生成多智能体大模型软件工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。