Repo0: Design-Driven Zero-to-All Code Generation
Organizations: Shanghai Jiao Tong University · Chongqing University
Abstract
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.
Figures & tables
| Real Repo | Para. Name | #Files | LOC | Task Counts |
|---|---|---|---|---|
| scikit-learn | MLKit-Py | 185 | 65,972 | 236 |
| pandas | TableKit | 217 | 106,447 | 175 |
| sympy | SymbolicMath | 699 | 218,924 | 192 |
| statsmodels | StatModeler | 271 | 83,325 | 234 |
| requests | HttpEasy | 17 | 2,793 | 50 |
| django | PyWebEngine | 681 | 109,457 | 165 |
| Model | Method | requests | statsmodels | django | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Cov. (%) | Nov. (%) | Pass./Vot. (%) | Cov. (%) | Nov. (%) | Pass./Vot. (%) | Cov. (%) | Nov. (%) | Pass./Vot. (%) | ||
| GPT-5 mini | mini-SWE-agent | 68.18 | 2.63 | 4.11 / 27.40 | 18.18 | 9.09 | 0.00 / 31.86 | 47.92 | 6.96 | 37.04 / 44.44 |
| Paper2Code | 95.50 | 7.20 | 24.66 / 24.66 | 44.32 | 24.13 | 4.42 / 30.09 | 66.67 | 15.30 | 30.04 / 78.60 | |
| RPG | 90.91 | 13.70 | 31.51 / 95.89 | 70.40 | 13.80 | 77.90 / 92.00 | 60.42 | 11.58 | 47.33 / 74.07 | |
| Repo0 | 100.00 | 18.20 | 50.98 / 100.00 | 80.68 | 11.48 | 85.51 / 98.65 | 80.50 | 13.59 | 74.36 / 97.12 | |
| DeepSeek V3.2 | mini-SWE-agent | 86.36 | 15.34 | 21.92 / 47.95 | 59.09 | 23.39 | 2.65 / 53.98 | 33.33 | 9.38 | 10.70 / 47.33 |
| Repository | Setting | Cov. (%) | Nov. (%) | Pass./Vot. (%) |
|---|---|---|---|---|
| requests | Repo0 | 100.00 | 18.20 | 50.98 / 100.00 |
| w/o Requirement Context | 95.45 (-4.55) | 9.05 (-9.15) | 45.39 (-5.59) / 87.86 (-12.14) | |
| w/o Component-Graph Ordering | 100.00 (0.00) | 12.85 (-5.35) | 50.98 (0.00) / 100.00 (0.00) | |
| w/o Dual-DAG | 95.45 (-4.55) | 9.14 (-9.06) | 48.72 (-2.26) / 87.86 (-12.14) | |
| w/o Structural Evolution | 94.32 (-5.68) | 8.94 (-9.26) | 42.51 (-8.47) / 82.14 (-17.86) | |
| statsmodels | Repo0 | 80.68 | 11.48 | 85.51 / 98.65 |
Code Generation
Code generation studies methods for turning natural-language, visual, or formal specifications into executable programs and code edits.
See all 304 papers