Repo0:設計驅動的從零到全部程式碼生成
Repo0: Design-Driven Zero-to-All Code Generation
August 20, 2026
作者: Silin Chen, Haoyi Teng, Xiaodong Gu, Yuling Shi, Jiale Huang, Yongpan Wang, Hongyu Zhang, Haibing Guan
cs.AI
摘要
大型語言模型智能體在程式碼生成方面已取得實質進展,然而現有系統大多假設存在預先定義的程式碼庫架構。這個假設在從零到完整的程式碼生成中並不成立,因為在此情境下,智能體必須直接從自然語言需求建構整個軟體專案,並在整個開發過程中維持模組化的程式碼庫架構。我們提出 Repo0,一個用於從零到完整程式碼生成的持續結構演化框架。Repo0 維護一個明確的架構狀態,以雙有向無環圖(Dual-DAG)實例化,由需求層級 DAG、元件層級 DAG 及其對齊關係組成。從自然語言需求出發,Repo0 透過由模組化指標引導的結構動作,迭代地演化元件邊界,直到結構收斂;隨後,收斂後的架構引導測試驅動開發的程式碼生成。我們在 RepoCraft 的六個真實世界程式碼庫上,使用 GPT-5 mini 與 DeepSeek V3.2 評估 Repo0。Repo0 在所有設定下均達到最高的功能覆蓋率與通過率。與最強的程式碼庫規劃基線 RPG 相比,Repo0 的功能覆蓋率最多提升了 20.08 個百分點,通過率最多提升了 29.74 個百分點。消融分析與結構演化分析進一步證明了 Dual-DAG 架構狀態、模組化引導的結構演化以及明確的結構收斂的重要性。
English
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.