microsoft/RPG-ZeroRepo
Python
Captured source
source ↗microsoft/RPG-ZeroRepo
Description: [ICLR 2026] RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation
Language: Python
License: MIT
Stars: 614
Forks: 35
Open issues: 15
Created: 2025-11-26T07:59:18Z
Pushed: 2026-06-11T02:31:36Z
Default branch: main
Fork: no
Archived: no
README:
RPG-ZeroRepo
RPG-ZeroRepo turns Repository Planning Graphs into a control layer for long-horizon AI coding agents.
🔥 New: [CoderMind](CoderMind/) is now open source for Claude Code and GitHub Copilot.
Coding agents often lose repository-level context across long tasks: requirements drift, architecture decisions disappear, and edits miss hidden dependencies.
CoderMind gives agents a persistent RPG workspace so they can plan, generate, understand, and update repositories through a shared graph instead of transient chat history and file search.
The repository also includes the research code: [ZeroRepo](#zerorepo-requirements--rpg--repository) implements the forward pipeline (requirements → RPG → repository), and [RPG-Encoder](#rpg-encoder-repository--rpg) implements the reverse pipeline (repository → RPG).
---
News
- [2026-05-15] 🚀 CoderMind is now open source for Claude Code and GitHub Copilot. It uses Repository Planning Graphs as a control layer for long-horizon coding agents, including planning, multi-file generation, repository understanding, and graph-aware updates.
- [2026-05-01] 🎉 RPG-Encoder (*Closing the Loop: Universal Repository Representation with RPG-Encoder*) has been accepted to ICML 2026.
- [2026-03-02] 🚀 We have open-sourced the EpiCoder Feature Tree at Hugging Face, providing structured knowledge for repository planning in ZeroRepo.
- [2026-02-27] 🚀 We released the code for [RPG-Encoder](zerorepo/rpg_encoder/) and [RepoCraft](repocraft/).
- [2026-02-02] 🔥 Our paper "Closing the Loop: Universal Repository Representation with RPG-Encoder" has been released on arXiv.
- [2026-01-26] 🎉 RPG-ZeroRepo was accepted as a poster at ICLR 2026.
- [2025-09-19] 🔥 Our paper "RPG: A Repository Planning Graph for Unified and Scalable Codebase Generation" has been released on arXiv.
---
Documentation
- [CoderMind Guide](CoderMind/README.md) — setup, slash commands, MCP tools
- [CoderMind Commands Reference](CoderMind/docs/commands.md)
- [CoderMind CLI Reference](CoderMind/docs/cli-reference.md)
- [CoderMind Configuration](CoderMind/docs/configuration.md)
- [ZeroRepo Pipeline Details](docs/zerorepo-pipeline.md) — Phase 1/2/3, checkpoint files, configuration
- [RPG-Encoder Module](zerorepo/rpg_encoder/README.md)
- [RepoCraft Benchmark](repocraft/README.md)
---
CoderMind
CoderMind turns Repository Planning Graphs into a control layer for long-horizon AI coding agents.
> Good planning for coding agents should be grounded, executable, verifiable, and reusable. CoderMind makes the plan a graph, not a transient chat artifact.
CoderMind gives agents such as Claude Code and GitHub Copilot a persistent RPG workspace for planning, generation, repository understanding, and graph-aware editing.
Why CoderMind?
Coding agents are strong at local edits, but repository-level work requires durable context: requirements, architecture, implementation progress, and dependencies must stay aligned across many steps.
| Without CoderMind | With CoderMind | |---|---| | The agent relies on chat history and file search. | The agent works against a structured RPG workspace. | | Requirements and design decisions drift over long tasks. | Requirements, features, architecture, and files stay connected in the graph. | | Multi-file generation can become inconsistent. | Generation follows an explicit planning graph. | | Updates are often local edits without impact analysis. | Edits are planned through affected RPG nodes and dependencies. | | The repository map is rebuilt mentally every time. | The RPG is searchable, explorable, and reusable across tasks. |
What can I do with CoderMind?
| Task | Start from | CoderMind workflow | Benefit | |---|---|---|---| | Build a new repository | A natural-language requirement | Create an RPG plan, refine it into architecture/tasks, then generate code. | A persistent plan for long-horizon multi-file generation. | | Understand an existing repository | An existing codebase | Encode the repo into an RPG workspace, then search, explore, and explain through MCP tools (search_rpg, explore_rpg, get_node_detail). | A structured repository map beyond chat history and file search. | | Update an existing repository | A codebase + change request | Use the RPG to locate affected nodes, plan the edit, and update code and graph together (/cmind.rpg_edit "..."). | Graph-aware edits that account for cross-file dependencies. |
Quick Start
uv tool install cmind-cli \ --from "git+https://github.com/microsoft/RPG-ZeroRepo.git#subdirectory=CoderMind" cmind check
On an existing repository:
cd your-existing-repo cmind init . --encode # In Claude Code or GitHub Copilot: # /cmind.rpg_edit "Add rate limiting to all API endpoints"
Generate a new repository:
cmind init my-project cd my-project # In Claude Code or GitHub Copilot: # /cmind.feature_spec Build a CLI tool for managing Docker containers # /cmind.feature_build → /cmind.feature_refactor → ... → /cmind.code_gen
See [CoderMind/README.md](CoderMind/README.md) for the full setup, slash commands, and MCP tools. Also available in [简体中文](CoderMind/README.zh-CN.md) · [日本語](CoderMind/README.ja-JP.md) · [한국어](CoderMind/README.ko-KR.md) · [हिन्दी](CoderMind/README.hi-IN.md).
Overview
CoderMind gives Claude Code and GitHub Copilot a persistent RPG workspace for repository-level tasks. Instead of relying only on chat history, file search, and local context, the agent can carry repository-level planning state across long tasks.
CoderMind exposes the RPG workspace through three interfaces:
- CLI setup — initialize CoderMind in a new or existing repository with
cmind init. - Slash commands — run build, understand, and update workflows inside the coding agent (
/cmind.feature_spec,/cmind.code_gen,/cmind.encode,/cmind.rpg_edit, and more). - **MCP…
Excerpt shown — open the source for the full document.