Closing the Loop: Universal Repository Representation with RPG-Encoder

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Luo, Jane, Yin, Chengyu, Zhang, Xin, Li, Qingtao, Liu, Steven, Huang, Yiming, Wu, Jie, Liu, Hao, Huang, Yangyu, Kang, Yu, Yang, Fangkai, Xin, Ying, Li, Scarlett
Format: Preprint
Veröffentlicht: 2026
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866917245245980672
author Luo, Jane
Yin, Chengyu
Zhang, Xin
Li, Qingtao
Liu, Steven
Huang, Yiming
Wu, Jie
Liu, Hao
Huang, Yangyu
Kang, Yu
Yang, Fangkai
Xin, Ying
Li, Scarlett
author_facet Luo, Jane
Yin, Chengyu
Zhang, Xin
Li, Qingtao
Liu, Steven
Huang, Yiming
Wu, Jie
Liu, Hao
Huang, Yangyu
Kang, Yu
Yang, Fangkai
Xin, Ying
Li, Scarlett
contents Current repository agents encounter a reasoning disconnect due to fragmented representations, as existing methods rely on isolated API documentation or dependency graphs that lack semantic depth. We consider repository comprehension and generation to be inverse processes within a unified cycle: generation expands intent into implementation, while comprehension compresses implementation back into intent. To address this, we propose RPG-Encoder, a framework that generalizes the Repository Planning Graph (RPG) from a static generative blueprint into a unified, high-fidelity representation. RPG-Encoder closes the reasoning loop through three mechanisms: (1) Encoding raw code into the RPG that combines lifted semantic features with code dependencies; (2) Evolving the topology incrementally to decouple maintenance costs from repository scale, reducing overhead by 95.7%; and (3) Operating as a unified interface for structure-aware navigation. In evaluations, RPG-Encoder establishes state-of-the-art localization performance on SWE-bench Verified with 93.7% Acc@5 and exceeds the best baseline by over 10% in localization accuracy on SWE-bench Live Lite. These results highlight our superior fine-grained precision in complex codebases. Furthermore, it achieves 98.5% reconstruction coverage on RepoCraft, confirming RPG's high-fidelity capacity to mirror the original codebase and closing the loop between intent and implementation.
format Preprint
id arxiv_https___arxiv_org_abs_2602_02084
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Closing the Loop: Universal Repository Representation with RPG-Encoder
Luo, Jane
Yin, Chengyu
Zhang, Xin
Li, Qingtao
Liu, Steven
Huang, Yiming
Wu, Jie
Liu, Hao
Huang, Yangyu
Kang, Yu
Yang, Fangkai
Xin, Ying
Li, Scarlett
Computation and Language
Software Engineering
Current repository agents encounter a reasoning disconnect due to fragmented representations, as existing methods rely on isolated API documentation or dependency graphs that lack semantic depth. We consider repository comprehension and generation to be inverse processes within a unified cycle: generation expands intent into implementation, while comprehension compresses implementation back into intent. To address this, we propose RPG-Encoder, a framework that generalizes the Repository Planning Graph (RPG) from a static generative blueprint into a unified, high-fidelity representation. RPG-Encoder closes the reasoning loop through three mechanisms: (1) Encoding raw code into the RPG that combines lifted semantic features with code dependencies; (2) Evolving the topology incrementally to decouple maintenance costs from repository scale, reducing overhead by 95.7%; and (3) Operating as a unified interface for structure-aware navigation. In evaluations, RPG-Encoder establishes state-of-the-art localization performance on SWE-bench Verified with 93.7% Acc@5 and exceeds the best baseline by over 10% in localization accuracy on SWE-bench Live Lite. These results highlight our superior fine-grained precision in complex codebases. Furthermore, it achieves 98.5% reconstruction coverage on RepoCraft, confirming RPG's high-fidelity capacity to mirror the original codebase and closing the loop between intent and implementation.
title Closing the Loop: Universal Repository Representation with RPG-Encoder
topic Computation and Language
Software Engineering
url https://arxiv.org/abs/2602.02084