Repo0: Design-Driven Zero-to-All Code Generation

📄 arXiv: 2608.19854v1 📥 PDF

作者: Silin Chen, Haoyi Teng, Xiaodong Gu, Yuling Shi, Jiale Huang, Yongpan Wang, Hongyu Zhang, Haibing Guan

分类: cs.SE, cs.AI

发布日期: 2026-08-20

备注: Our code and data are available at https://github.com/cslsolow/Repo0


💡 一句话要点

提出Repo0框架以解决零到全代码生成问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 代码生成 软件架构 模块化设计 自然语言处理 深度学习

📋 核心要点

  1. 现有代码生成方法大多依赖于预定义的代码库架构,无法满足从自然语言需求直接构建软件项目的需求。
  2. Repo0框架通过双向有向无环图(Dual-DAG)维护架构状态,迭代演化组件边界,实现模块化的代码生成。
  3. 在六个真实世界代码库的实验中,Repo0在功能覆盖率和通过率上均显著优于最强基线RPG,提升幅度分别达到20.08和29.74个百分点。

📝 摘要(中文)

大型语言模型代理在代码生成方面取得了显著进展,但大多数现有系统假设预定义的代码库架构,这在零到全代码生成中并不成立。本文提出Repo0,一个用于零到全代码生成的连续结构演化框架。Repo0通过维护一个明确的架构状态(双向有向无环图Dual-DAG),从自然语言需求出发,迭代演化组件边界,直到结构收敛,之后利用收敛的架构指导测试驱动的代码生成。实验表明,Repo0在多个真实世界代码库上表现优异,功能覆盖率和通过率均显著提高。

🔬 方法详解

问题定义:论文旨在解决现有代码生成方法在零到全生成场景下的局限性,特别是缺乏灵活架构适应能力的问题。现有方法往往依赖于固定的代码库结构,无法有效应对动态需求。

核心思路:Repo0的核心思路是通过双向有向无环图(Dual-DAG)来维护和演化软件架构,从而实现模块化的代码生成。该方法允许在开发过程中动态调整组件边界,以适应不断变化的需求。

技术框架:Repo0的整体架构包括需求级DAG和组件级DAG,二者通过对齐关系相互关联。系统从自然语言需求开始,迭代执行结构性操作,直到达到结构收敛,随后使用收敛后的架构进行测试驱动的代码生成。

关键创新:Repo0的主要创新在于引入了双向有向无环图(Dual-DAG)作为架构状态的显式表示,并通过模块化导向的结构演化实现了灵活的代码生成。这一设计与传统的固定架构方法本质上不同。

关键设计:在设计中,Repo0使用了模块化度量来指导结构演化,确保组件边界的合理性。此外,系统的收敛过程通过明确的结构状态管理,优化了代码生成的效率和质量。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

Repo0在六个真实世界代码库的实验中表现出色,功能覆盖率和通过率分别提高了20.08和29.74个百分点,显著优于最强基线RPG,展示了其在零到全代码生成中的有效性和优势。

🎯 应用场景

Repo0框架在软件开发领域具有广泛的应用潜力,尤其是在快速迭代和需求变化频繁的项目中。通过实现从自然语言需求到完整软件项目的自动化生成,Repo0能够显著提高开发效率,降低人力成本,推动智能编程工具的发展。

📄 摘要(原文)

Large language model agents have made substantial progress in code generation, yet most existing systems assume a predefined repository architecture. This assumption does not hold in zero-to-all code generation, where an agent must construct an entire software project directly from natural-language requirements while maintaining a modular repository architecture throughout development. We present Repo0, a continuous structural evolution framework for zero-to-all code generation. Repo0 maintains an explicit architectural state instantiated as a Dual-Directed-Acyclic-Graph (Dual-DAG), consisting of a requirement-level DAG, a component-level DAG, and their alignment relation. Starting from natural-language requirements, it iteratively evolves component boundaries through structural actions guided by modularity metrics until structural convergence, after which the converged architecture guides test-driven development code generation. We evaluate Repo0 on six real-world repositories from RepoCraft using GPT-5 mini and DeepSeek V3.2. Repo0 achieves the highest Functionality Coverage and Pass Rate across all settings. Compared with RPG, the strongest repository-planning baseline, Repo0 improves Functionality Coverage by up to 20.08 percentage points and Pass Rate by up to 29.74 percentage points. Ablation and structural-evolution analyses further demonstrate the importance of the Dual-DAG architectural state, modularity-guided structural evolution, and explicit structural convergence.