RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation
Not on the map. Why?
Abstract (arXiv)
Large language models excel at generating individual functions or single files of code, yet generating complete repositories from scratch remains a fundamental challenge. This capability is key to building coherent software systems from high-level specifications and realizing the full potential of automated code generation. The process requires planning at two levels: deciding what features and modules to build (proposal stage) and defining their implementation details (implementation stage). Current approaches rely on natural language planning, which often produces unclear specifications, misaligned components, and brittle designs due to its inherent ambiguity and lack of structure. To address these limitations, we introduce the Repository Planning Graph (RPG), a structured representation that encodes capabilities, file structures, data flows, and functions in a unified graph. By replacing free-form natural language with an explicit blueprint, RPG enables consistent long-horizon planning for repository generation. Building on RPG, we develop ZeroRepo, a graph-driven framework that operates in three stages: proposal-level planning, implementation-level construction, and graph-guided code generation with test validation. To evaluate, we construct RepoCraft, a benchmark of six real-world projects with 1,052 tasks. On RepoCraft, ZeroRepo produces nearly 36K Code Lines and 445K Code Tokens, on average 3.9× larger than the strongest baseline (Claude Code), and 68× larger than other baselines. It achieves 81.5% coverage and 69.7% test accuracy, improving over Claude Code by 27.3 and 35.8 points. Further analysis shows that RPG models complex dependencies, enables more sophisticated planning through near-linear scaling, and improves agent understanding of repositories, thus accelerating localization. Our data and code are available at https://github.com/microsoft/RPG-ZeroRepo.
Key facts. Cited by 19 papers in the map (data through 14 Oct 2026). Builds on 32 of its 47 references that are in the map. First posted on arXiv 19 Sep 2025.
Builds on
32 of 47 references.
References · 32
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2024GPT-4o System Cardcited by 4,588
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,796
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,988
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,808
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agentscited by 1,002
- 2023ChatDev: Communicative Agents for Software Developmentcited by 919
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 886
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2025PaperBench: Evaluating AI's Ability to Replicate AI Researchcited by 321
20 more
- 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 196
- 2025ACECODER: Acing Coder RL via Automated Test-Case Synthesiscited by 93
- 2023On the Planning Abilities of Large Language Models (A Critical Investigation with a Proposed Benchmark)cited by 85
- 2024Planning In Natural Language Improves LLM Search For Code Generationcited by 83
- 2025Paper2Code: Automating Code Generation from Scientific Papers in Machine Learningcited by 70
- 2024DA-Code: Agent Data Science Code Generation Benchmark for Large Language Modelscited by 58
- 2025FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementationcited by 58
- 2024Commit0: Library Generation from Scratchcited by 52
- 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
- 2025rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale Verified Datasetcited by 51
- 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Codecited by 30
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 20
- 2025AutoP2C: An LLM-Based Agent Framework for Code Repository Generation from Multimodal Content in Academic Paperscited by 20
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latencycited by 9
- 2025Guided Code Generation with LLMs: A Multi-Agent Framework for Complex Code Taskscited by 8
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generationcited by 8
- 2025How Far Are LLMs from Symbolic Planners? An NLP-Based Perspectivecited by 6
- 2025GATE: Graph-based Adaptive Tool Evolution Across Diverse Taskscited by 3
- 2025MRG-Bench: Evaluating and Exploring the Requirements of Context for Repository-Level Code Generationcited by 3
Built on by
Citing papers per year: 2025: 3; 2026: 16.
19 papers.
Sort:
By area:
- 2026Code as Agent Harnesscited by 47
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
- 2026TestExplora: Benchmarking LLMs for Proactive Bug Discovery via Repository-Level Test Generationcited by 5
- 2026NERFIFY: A Multi-Agent Framework for Turning NeRF Papers into Codecited by 3
- 2026Constraint Decay: The Fragility of LLM Agents in Backend Code Generationcited by 3
- 2026Scientific reasoning does not reliably translate into scientific forecasting in frontier AIcited by 3
- 2026Repo0: Design-Driven Zero-to-All Code Generationcited by 3
- 2025Towards Iterative End-to-End Software Development: A Feature-Driven Multi-Agent Frameworkcited by 2
- 2026MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesiscited by 2
- 2025Enhancing Automated Paper Reproduction via Prompt-Free Collaborative Agentscited by 1
- 2026X-Coder: Advancing Competitive Programming with Synthetic Tasks, Solutions, and Testscited by 1
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generationcited by 1
7 more
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generationcited by 1
- 2026TraceDev: A Traceability-Driven Multi-agent Framework for Requirement-to-Code Developmentcited by 1
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026DPIAgent: Divide, Protocol, Isolate for Agentic Reproduction Test Generationcited by 0
- 2026The Thousand-Graph Hypothesis: A Testable Hypothesis of Task-Conditioned Relation Materialization in Repository-Level Code Reasoningcited by 0
- 2026SWE-Serve: Benchmarking Agentic Engineering For Production Inference Servingcited by 0
- 2026Don't Guess, Just Ask: Evaluating Interactive Requirement Clarification for Repository-Level Software Developmentcited by 0
- 2026Don't Guess, Just Ask: Evaluating Interactive Requirement Clarification for Repository-Level Software Development9 Oct 2026
- 2026SWE-Serve: Benchmarking Agentic Engineering For Production Inference Serving22 Sep 2026
- 2026The Thousand-Graph Hypothesis: A Testable Hypothesis of Task-Conditioned Relation Materialization in Repository-Level Code Reasoning27 Aug 2026
- 2026DPIAgent: Divide, Protocol, Isolate for Agentic Reproduction Test Generation24 Aug 2026
- 2026Repo0: Design-Driven Zero-to-All Code Generation20 Aug 2026
- 2026MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesis29 Jul 2026
- 2026TraceDev: A Traceability-Driven Multi-agent Framework for Requirement-to-Code Development21 Jul 2026
- 2026Scientific reasoning does not reliably translate into scientific forecasting in frontier AI21 May 2026
- 2026Code as Agent Harness18 May 2026
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026Constraint Decay: The Fragility of LLM Agents in Backend Code Generation7 May 2026
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generation4 Apr 2026
7 more
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation26 Mar 2026
- 2026NERFIFY: A Multi-Agent Framework for Turning NeRF Papers into Code28 Feb 2026
- 2026TestExplora: Benchmarking LLMs for Proactive Bug Discovery via Repository-Level Test Generation11 Feb 2026
- 2026X-Coder: Advancing Competitive Programming with Synthetic Tasks, Solutions, and Tests11 Jan 2026
- 2025Enhancing Automated Paper Reproduction via Prompt-Free Collaborative Agents2 Dec 2025
- 2025Towards Iterative End-to-End Software Development: A Feature-Driven Multi-Agent Framework4 Nov 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2026Code as Agent Harnesscited by 47
- 2026NERFIFY: A Multi-Agent Framework for Turning NeRF Papers into Codecited by 3
- 2026Constraint Decay: The Fragility of LLM Agents in Backend Code Generationcited by 3
- 2026Repo0: Design-Driven Zero-to-All Code Generationcited by 3
- 2025Towards Iterative End-to-End Software Development: A Feature-Driven Multi-Agent Frameworkcited by 2
- 2026MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesiscited by 2
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generationcited by 1
- 2026TraceDev: A Traceability-Driven Multi-agent Framework for Requirement-to-Code Developmentcited by 1
- 2026Documentation-Guided Agentic Codebase Migration from C to Rustcited by 0
- 2026DPIAgent: Divide, Protocol, Isolate for Agentic Reproduction Test Generationcited by 0
- 2026SWE-Serve: Benchmarking Agentic Engineering For Production Inference Servingcited by 0
- 2026SWE-Serve: Benchmarking Agentic Engineering For Production Inference Serving22 Sep 2026
- 2026DPIAgent: Divide, Protocol, Isolate for Agentic Reproduction Test Generation24 Aug 2026
- 2026Repo0: Design-Driven Zero-to-All Code Generation20 Aug 2026
- 2026MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesis29 Jul 2026
- 2026TraceDev: A Traceability-Driven Multi-agent Framework for Requirement-to-Code Development21 Jul 2026
- 2026Code as Agent Harness18 May 2026
- 2026Documentation-Guided Agentic Codebase Migration from C to Rust14 May 2026
- 2026Constraint Decay: The Fragility of LLM Agents in Backend Code Generation7 May 2026
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation26 Mar 2026
- 2026NERFIFY: A Multi-Agent Framework for Turning NeRF Papers into Code28 Feb 2026
- 2025Towards Iterative End-to-End Software Development: A Feature-Driven Multi-Agent Framework4 Nov 2025
- 2026TestExplora: Benchmarking LLMs for Proactive Bug Discovery via Repository-Level Test Generationcited by 5
- 2025Enhancing Automated Paper Reproduction via Prompt-Free Collaborative Agentscited by 1
- 2026X-Coder: Advancing Competitive Programming with Synthetic Tasks, Solutions, and Testscited by 1
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generationcited by 1
- 2026The Thousand-Graph Hypothesis: A Testable Hypothesis of Task-Conditioned Relation Materialization in Repository-Level Code Reasoningcited by 0
- 2026Don't Guess, Just Ask: Evaluating Interactive Requirement Clarification for Repository-Level Software Developmentcited by 0
- 2026Don't Guess, Just Ask: Evaluating Interactive Requirement Clarification for Repository-Level Software Development9 Oct 2026
- 2026The Thousand-Graph Hypothesis: A Testable Hypothesis of Task-Conditioned Relation Materialization in Repository-Level Code Reasoning27 Aug 2026
- 2026Persistent Cross-Attempt State Optimization for Repository-Level Code Generation4 Apr 2026
- 2026TestExplora: Benchmarking LLMs for Proactive Bug Discovery via Repository-Level Test Generation11 Feb 2026
- 2026X-Coder: Advancing Competitive Programming with Synthetic Tasks, Solutions, and Tests11 Jan 2026
- 2025Enhancing Automated Paper Reproduction via Prompt-Free Collaborative Agents2 Dec 2025