π€ AI Summary
Large language models (LLMs) excel at function-level code generation but struggle with repository-scale system synthesis due to the ambiguity and unverifiability of natural language prompts, leading to significantly degraded output quality. To address this limitation, this work proposes Structured Specification-Driven Engineering (SSDE), a novel paradigm that, for the first time, leverages structured artifacts as inputs to guide LLMs in generating high-quality, verifiable repository-level code. The feasibility of SSDE is demonstrated through the successful automatic generation of MVC-architected business logic across three real-world software systems. These results highlight SSDEβs potential for large-scale software automation while also uncovering critical challenges and charting promising directions for future research.
π 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.