ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation

QiHong Chen, Aaron Imani, Iftekhar Ahmed
7/9/2026
cs.SEcs.AIcs.IR

No confident code implementation found for this paper.

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 on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2026projagent,
  title  = {ProjAgent: Procedural Similarity Retrieval for Repository-Level Code Generation},
  author = {QiHong Chen and Aaron Imani and Iftekhar Ahmed},
  year   = {2026},
  eprint = {2607.08691},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.08691v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.08691.svg)](https://codeofpaper.com/paper/2607.08691)

Discussion