# Blueprint2Code: a multi-agent pipeline for reliable code generation via blueprint planning and repair

**Authors:** Kehao Mao, Baokun Hu, Ruixin Lin, Zewen Li, Guanyu Lu, Zhengyu Zhang

PMC · DOI: 10.3389/frai.2025.1660912 · 2025-10-17

## TL;DR

Blueprint2Code is a multi-agent system that improves code generation by mimicking human programming workflows, leading to better performance on complex tasks.

## Contribution

Introduces a novel multi-agent framework that enhances code generation through coordinated task planning, implementation, and debugging.

## Key findings

- Blueprint2Code outperforms existing methods on benchmark datasets like HumanEval and MBPP.
- It achieves high pass@1 scores, including 96.3% on HumanEval and 88.4% on MBPP.
- The system shows robustness on extended and complex programming tasks.

## Abstract

Automated programming has become a powerful tool for solving real-world problems. Code generation, in particular, plays a key role in improving developer productivity and reducing the entry barrier to software development. Recent advances in large language models (LLMs) have significantly improved program synthesis, enabling high-quality code generation from natural language. However, LLMs still struggle with complex tasks, especially in understanding problem intent, conducting multi-step reasoning, and producing code that passes all test cases. As task difficulty increases, existing models often fail to devise complete and reliable generation strategies, leading to reduced accuracy and robustness. To address these limitations, we propose Blueprint2Code, an innovative multi-agent framework for code generation. It emulates the human programming workflow through the coordinated interaction of four agents—Previewing, Blueprint, Coding, and Debugging—forming a closed-loop system from task comprehension to planning, implementation, and iterative refinement. Compared to existing methods, Blueprint2Code shows superior performance on complex programming tasks. Extensive experiments on benchmark datasets—HumanEval, MBPP, their extended versions (HumanEval-ET, MBPP-ET), and the APPS competition dataset—demonstrated its effectiveness, achieving strong pass@1 results: HumanEval 96.3%, MBPP 88.4%, HumanEval-ET 86.5%, MBPP-ET 59.4%, and APPS 24.6%. The related code is available at https://github.com/MKH99918/Blueprint2Code.

## Full-text entities

- **Genes:** CTSB (cathepsin B) [NCBI Gene 1508] {aka APPS, CPSB, KWE, RECEUP}
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Figures

3 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12575318/full.md

---
Source: https://tomesphere.com/paper/PMC12575318