arXiv:2605.02455cs.SEcs.AI2026-05中稿 · the 34th ACM Joint…被引 1

用结构化规范指导大模型生成完整项目代码,提升质量与可验证性。

LLM-Assisted Repository-Level Generation with Structured Spec-Driven Engineering

论文配图:LLM-Assisted Repository-Level Generation with Structured Spec-Driven Engineering
图 1 · 摘自论文原文
  • 以结构化规格说明书替代自然语言提示,引导大模型生成代码。
  • 在3个系统上测试,五种大模型均实现可运行的MVC业务逻辑。
  • 适合需要高可靠代码生成的工程团队和自动化开发场景。

当前最先进的大型语言模型(LLMs)在函数级代码生成方面表现优异,但在扩展到整个项目级别的系统时,输出质量显著下降。仅依赖自然语言提示的现有工作流存在固有的模糊性和缺乏可验证性。为解决此问题,我们提出结构化规范驱动工程(SSDE)范式,利用结构化产物引导LLM生成。我们认为,将结构化规格作为LLM输入,使高质量的项目级代码生成成为可行目标,同时提供更优的可验证性,具有巨大改进潜力。我们通过试点研究,在三个软件系统中使用五种LLMs生成Model-View-Controller(MVC)业务逻辑,验证了该设想的可行性,并指出其潜力、挑战及未来路线图。

原文摘要 · Abstract (English)

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.

代码生成LLM应用结构化规范

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。