microsoft/RPG-ZeroRepo
[ICLR 2026] RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation
What it solves
Coding agents often struggle with long-horizon tasks because they rely on transient chat histories and simple file searches, leading to "requirements drift," lost architectural decisions, and inconsistent multi-file edits. RPG-ZeroRepo introduces a persistent Repository Planning Graph (RPG) that acts as a durable control layer, ensuring that requirements, architecture, and implementation remain aligned across the entire lifecycle of a codebase.
How it works
The system operates through three primary components:
- CoderMind: An agent-facing layer that integrates with tools like Claude Code and GitHub Copilot. It provides a persistent RPG workspace via CLI setup, slash commands (e.g.,
/cmind.code_gen), and MCP (Model Context Protocol) tools for searching and traversing the graph. - ZeroRepo: A forward pipeline that transforms natural-language requirements into a structured feature tree, then into an architectural RPG, and finally into a complete repository generated in dependency-aware order.
- RPG-Encoder: A reverse pipeline that analyzes existing codebases to extract an RPG, capturing semantic intent and structural dependencies. It includes an evolution mechanism to incrementally update the graph based on commit diffs.
Who it’s for
It is designed for developers using AI coding agents (specifically Claude Code and GitHub Copilot) who need to build new repositories from scratch, understand complex existing codebases, or perform large-scale, graph-aware updates to existing projects.
Highlights
- Persistent Planning: Replaces transient chat artifacts with a structured, searchable graph of the repository's design.
- Bidirectional Pipeline: Supports both generating code from requirements (ZeroRepo) and extracting plans from existing code (RPG-Encoder).
- Agent Integration: Provides specialized slash commands and MCP tools for seamless use within modern AI IDEs.
- Incremental Updates: Uses commit-level diff parsing to keep the planning graph in sync with code changes without requiring full re-encoding.
- RepoCraft Benchmark: Includes a specialized evaluation suite with over 1,000 tasks across major Python projects to measure repository-level generation quality.
Related
- Project
- Project
- Project
- Project
- Project