Architecture-Aware Multi-Design Generation for Repository-Level Feature Addition

Mingwei Liu, Zhenxi Chen, Zheng Pei, Zihao Wang, Yanlin Wang, Zibin ZhengarXiv 2026 · arXiv

TL;DR

RAIM is a new framework designed to help Large Language Models (LLMs) autonomously add new features to complex, repository-scale codebases without breaking existing functionality. By navigating codebases using architecture-aware code graphs and brainstorming multiple distinct implementation designs, RAIM achieves a new state-of-the-art success rate on the NoCode-bench benchmark, outperforming existing agentic frameworks by significant margins.

What Problem Does This Paper Address?

While LLMs have gotten remarkably good at fixing isolated bugs (reactive maintenance), asking them to implement entirely new features across a massive codebase (proactive evolution) is a different beast. Feature addition requires a deep, holistic understanding of a system's global architecture to ensure new code integrates smoothly without causing subtle, downstream regressions.

Current state-of-the-art code agents suffer from two main flaws:

  1. Architectural Blindness: They treat repositories as unstructured text, often missing cross-file dependencies and inserting code into the wrong architectural layers.
  2. Linear/Greedy Generation: They typically generate a single patch and blindly accept it if it looks plausible, skipping rigorous impact assessments.
Figure 1: Motivating example on instance pylint-dev__pylint-8190.

Methods

To overcome these limitations, the authors introduce RAIM (Repository-level Architecture-aware feature Implementation framework based on Multi-design). The framework operates in four distinct stages:

  1. Architecture-Aware File Localization: RAIM parses the repository into a hierarchical structure tree and builds a file-level call graph based on import relationships to identify an initial set of suspicious files.
  2. Architecture-Aware Iterative Function Localization: It extracts a compact "Feature-relevant Code Subgraph" capturing classes, functions, and their call/inheritance dependencies. It then uses a multi-round vector embedding search combined with LLM-based reranking to pinpoint the exact functions that need modification.
  3. Multi-Design Patch Generation: Instead of jumping straight to coding, RAIM prompts the LLM to act like a software architect and brainstorm $N$ distinct high-level implementation strategies. Specialized line-level localization is then performed independently for each design to generate a diverse pool of candidate patches.
  4. Impact-Aware Patch Selection: Acting as an automated senior code reviewer, RAIM subjects each candidate patch to static dependency tracing and dynamic test execution (running both existing regression tests and newly LLM-generated feature validation tests). It scores each patch across five dimensions to select the most robust, architecturally sound solution.
Overview of the four-stage RAIM framework.

Datasets

The framework was evaluated on the NoCode-bench Verified dataset, a benchmark specifically designed for repository-level feature addition. It consists of 114 high-quality, manually validated problems where the input is a real-world documentation change (like release notes or updated specifications) and the goal is to generate a functional code patch.

Key Insights and Ideas

  • Systemic Layers Matter: Local semantic similarity isn't enough. As shown in the paper's Pylint case study, a baseline agent might correctly identify a file related to data ingestion but fail because the feature actually needed to be implemented in the visualization layer to preserve downstream data structures.
  • Brainstorming Prevents Local Optima: Forcing the LLM to generate multiple distinct architectural designs expands the solution space, making it much more likely that at least one path avoids catastrophic system regressions.
  • Graph Structure Beats Model Scale: Equipping an open-weight model like DeepSeek-v3.2 with RAIM's structural awareness allows it to outperform much larger, proprietary models running on standard linear pipelines.

Key Results

  • State-of-the-Art Performance: When paired with Gemini-2.5-Pro, RAIM achieved a 39.47% success rate, representing a 36.34% relative improvement over the previous best-performing baseline (Agentless).
  • Open-Source Empowerment: RAIM enabled the open-weight DeepSeek-v3.2 to reach a 34.21% success rate, beating baselines powered by premium closed-source models like Claude-4-Sonnet.
  • Cracking Multi-File Modifications: In complex tasks requiring edits across multiple files—where traditional agents usually plummet to single-digit success rates—RAIM achieved an 18.87% success rate, a massive 400.5% relative increase over the baseline.
  • Ablation Validation: Removing the multi-design generation module caused the most severe performance drop (a 38.47% reduction in success rate), proving that exploring diverse design paths is critical for feature addition.

Limitations and Future Work

While the underlying principles of code-graph localization and change impact analysis are language-agnostic, the current implementation and evaluation of RAIM were focused exclusively on Python repositories within the NoCode-bench dataset.

For future work, the authors plan to explore multi-step feature evolution (handling features too large for a single patch) and autonomous self-repair mechanisms to allow the framework to iteratively fix its own candidate patches when test executions fail.

Summary updated

Abstract

Implementing new features across an entire codebase presents a formidable challenge for Large Language Models (LLMs). This proactive task requires a deep understanding of the global system architecture to prevent unintended disruptions to legacy functionalities. Conventional pipeline and agentic frameworks often fall short in this area because they suffer from architectural blindness and rely on greedy single-path code generation. To overcome these limitations, we propose RAIM, a multi-design and architecture-aware framework for repository-level feature addition. This framework introduces a localization mechanism that conducts multi-round explorations over a repository-scale code graph to accurately pinpoint dispersed cross-file modification targets. Crucially, RAIM shifts away from linear patching by generating multiple diverse implementation designs. The system then employs a rigorous impact-aware selection process based on static and dynamic analysis to choose the most architecturally sound patch and avoid system regressions. Comprehensive experiments on the NoCode-bench Verified dataset demonstrate that RAIM establishes a new state-of-the-art performance with a 39.47% success rate, achieving a 36.34% relative improvement over the strongest baseline. Furthermore, the approach exhibits robust generalization across various foundation models and empowers open-weight models like DeepSeek-v3.2 to surpass baseline systems powered by leading proprietary models. Detailed ablation studies confirm that the multi-design generation and impact validation modules are critical to effectively managing complex dependencies and reducing code errors. These findings highlight the vital role of structural awareness in automated software evolution.
BibTeX
@misc{liu2026architecture,
  author = {Mingwei Liu and Zhenxi Chen and Zheng Pei and Zihao Wang and Yanlin Wang and Zibin Zheng},
  title = {{Architecture-Aware Multi-Design Generation for Repository-Level Feature Addition}},
  year = {2026},
  eprint = {2603.01814},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.01814},
}

Loading related content...

Figure