Skip to content

ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation

Jul 2026 · arXiv.org · Vol abs/2607.08691 · 0 citations · 49 references
Computer Science

TL;DR

ProjAgent is a repository-level code generation system that introduces procedural similarity as an explicit retrieval signal and decomposes the target function into intermediate reasoning steps and employs an agentic workflow to retrieve repository functions that exhibit similar procedural behavior at each step.

Abstract

Repository-level code generation requires implementing target functions while accounting for complex cross-file dependencies and project-specific conventions. Existing retrieval methods predominantly rely on lexical, structural, or semantic similarity, often overlooking repository functions that implement similar procedural logic despite differing in identifiers or application domains. We propose ProjAgent, a repository-level code generation system that introduces procedural similarity as an explicit retrieval signal. ProjAgent decomposes the target function into intermediate reasoning steps and employs an agentic workflow to retrieve repository functions that exhibit similar procedural behavior at each step. The retrieved procedural context is integrated with conventional semantic retrieval to construct a richer repository context for code generation. ProjAgent further incorporates a conservative static-analysis feedback loop that iteratively repairs generated code using compiler and static-analysis feedback. Evaluated on REPOCOD, ProjAgent achieves 41.14% Pass@1, outperforming existing retrieval-based baselines. These results demonstrate that procedural similarity is an effective and previously unexplored retrieval dimension for repository-level code generation.

View source

Similar papers

Preprint Sep 2026

Beyond Repository Boundaries: Cross-Repository Graph Retrieval for Code Generation

CrossCoder is proposed, a cross-repository code generation framework that explicitly incorporates external libraries into the retrieval context through a unified knowledge graph over repository and library entities that consistently improves both functional correctness and robustness to dependency-version changes.

Minh Le-Anh, Nam Le Hai, Quyen Tran et al. · 0 citations
#artificial intelligence Preprint Sep 2026

FeatLens: Feature-Guided Dynamic Code Graph Construction and Retrieval for Repository-Level Code Generation

FeatLens builds a feature index that links natural-language feature descriptions to function-level code entities and dynamically constructs a task-specific seed graph from the feature index and applies semantic-structural graph reasoning with personalized PageRank to select a compact reasoning graph.

Xu-Tian Li, Bo Xiong, Yi-Feng Zhu et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation

ACToR identifies critical tokens during generation and triggers targeted retrieval on demand to provide repository context at these decisive positions, and designs a position-aware weighting method for dense retrievers to prioritize context that is more informative for generation.

Ke-Feng Duan, De-Wu Zheng, Yan-Lin Wang et al. · 0 citations
Preprint Aug 2026

A Unified Issue Resolution Benchmark for Requirement Clarification, Planning, and Code Generation for Coding Agents

SWE-RPG is introduced, a repository-level benchmark that combines executable patch evaluation with validated ground-truth references (GTs) for Requirement Clarification and Implementation Planning, and suggests implicit-requirement recovery as a key candidate direction for improving coding agents.

Xin Zhou, Chun-Yong Chong, Kisub Kim et al. · 0 citations
#artificial intelligence Preprint Aug 2026

Super Library Agent: Joint Generation and Maintenance of Multiple Applications Beyond the Single Codebase

This work introduces the Super Library Agent problem, where an agent sequentially generates a portfolio of N related applications while maintaining a shared Super Library of reusable cross-application components, and addresses candidate-guided extraction over code chunk summaries, pre-extraction codebase consolidation,...

Daegyu Sung, Yukyeong Lee, Geon Park et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.