LLM-Assisted Repository-Level Generation with Structured Spec-Driven Engineering
Shuzhao Feng, Boqi Chen, Brett H Meyer, Gunter Mussbacher
TLDR
This paper introduces Structured Spec-Driven Engineering (SSDE) to improve LLM-assisted repository-level code generation using structured specifications.
Key contributions
- LLMs struggle with repository-level code generation due to natural language prompt ambiguity.
- Introduces Structured Spec-Driven Engineering (SSDE) using structured specifications to guide LLMs.
- SSDE aims for high-quality, verifiable repository-level code generation.
- Pilot study validates SSDE feasibility by generating MVC logic for three systems with five LLMs.
Why it matters
LLMs currently struggle with generating complex, repository-level code, limiting their use in large software projects. This paper introduces a novel approach, Structured Spec-Driven Engineering, to overcome these limitations. It offers a path to more reliable and verifiable LLM-assisted system development.
Original Abstract
State-of-the-art Large Language Models (LLMs) excel in code generation at the function level. However, the output quality significantly declines when scaling to repository-level systems. Current workflows relying only on natural language prompts suffer from inherent ambiguity and a lack of verifiability. To address this, we propose structured spec-driven engineering (SSDE), a paradigm that leverages structured artifacts to guide LLM generation. We argue that structured specifications as LLM inputs make high-quality, repository-level code generation a tangible goal, while at the same time offering superior verifiability, leading to significant potential for improvement. We first investigate the feasibility of this vision through a pilot study generating Model-View-Controller (MVC) business logic for three software systems using five LLMs, and then highlight the potential, challenges, and future roadmap for SSDE.
📬 Weekly AI Paper Digest
Get the top 10 AI/ML arXiv papers from the week — summarized, scored, and delivered to your inbox every Monday.