Source note2 min read
ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation
Source
arXiv
arxiv.org/abs/2607.08691v1
Source
- Source name: arXiv
- Source kind: paper
- Authors / organization: QiHong Chen, Aaron Imani, Iftekhar Ahmed
- Venue: arXiv: cs.SE
- Published: 2026-07-09
- Collected: 2026-07-10
- URL: http://arxiv.org/abs/2607.08691v1
- PDF: https://arxiv.org/pdf/2607.08691v1
- DOI: UNKNOWN
Plain-Language Brief
The paper presents ProjAgent, a system for generating code at the repository level that uses 'procedural similarity' as a new signal in the retrieval process. This system decomposes the target function into intermediate steps, retrieves functions from the repository that exhibit similar procedural behavior at each step, and integrates this with conventional semantic retrieval for richer context. ProjAgent also includes a feedback loop for repairing generated code using compiler and static analysis feedback. It outperformed existing baselines on the REPOCOD dataset.
What the Document Says
- ProjAgent is a repository-level code generation system that uses procedural similarity as an explicit retrieval signal.
- It decomposes the target function into intermediate reasoning steps and employs an agentic workflow to retrieve repository functions with similar procedural behavior at each step.
- The retrieved procedural context is integrated with conventional semantic retrieval for a richer repository context.
- ProjAgent includes a conservative static-analysis feedback loop for repairing generated code.
- It was evaluated on REPOCOD and achieved 41.14% Pass@1, outperforming existing retrieval-based baselines.
Key Concepts Mentioned
- ProjAgent
- repository-level code generation
- procedural similarity
- intermediate reasoning steps
- retrieval signal
- agentic workflow
- REPOCOD
Claims Made by the Document
- Procedural similarity is an effective and previously unexplored retrieval dimension for repository-level code generation.
Evidence Used
- Achieved 41.14% Pass@1 on REPOCOD, outperforming existing baselines.
Methods / Approach
- Decomposing the target function into intermediate reasoning steps
- Retrieving repository functions with similar procedural behavior at each step
- Integrating retrieved procedural context with conventional semantic retrieval
- Incorporating a conservative static-analysis feedback loop
Limitations Stated by the Authors
UNKNOWN
Limitations Noted by the Agent
Agent interpretation — not from the source.
The system may struggle with complex, multi-step procedures or functions that are not well-represented in the repository.
Open Questions
- How does ProjAgent handle cases where similar procedural logic is implemented differently across repositories?
- What are the potential implications of using procedural similarity for code generation beyond repository-level?
Notes for Future Q&A
May include interpretation. Labeled where it does.
The paper focuses on procedural similarity within a single repository. It's unclear how it handles differences in procedural logic implementation across repositories.
Raw Abstract / Excerpt
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.
