arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.08293cs.SEcs.AIcs.ET
收藏

CIAO - 代码输入,架构输出 - 利用大语言模型实现自动化软件架构文档生成

CIAO - Code In Architecture Out - Automated Software Architecture Documentation with Large Language Models

University of Naples Federico II(那不勒斯腓特烈二世大学);University of Southern Denmark(南丹麦大学);Gran Sasso Science Institute(格兰萨索科学研究所)

Marco De Luca, Tiziano Santilli, Domenico Amalfitano, Anna Rita Fasolino, Patrizio Pelliccione

AI总结:

本文提出CIAO方法,利用大语言模型从GitHub仓库自动生成系统级架构文档,基于ISO/IEC/IEEE标准模板,评估显示文档被开发者认为有价值且准确,但存在图表质量和高层次上下文建模的局限。

摘要:

软件架构文档对于系统理解至关重要,但往往缺失或不完整。尽管近期基于LLM的技术能从代码生成文档,但通常仅处理局部内容而非生成连贯的系统级架构描述。本文提出一种结构化流程,通过大型语言模型直接从GitHub仓库生成系统级架构文档。该流程称为CIAO(Code In Architecture Out),定义了一个基于LLM的工作流,输入仓库并按照ISO/IEC/IEEE 42010、SEI Views & Beyond和C4模型衍生的模板生成文档。生成的文档可直接添加到目标仓库。通过22名开发者对贡献过的仓库生成文档的评估,结果显示开发者普遍认为生成的文档有价值、易懂且在源代码方面较为准确,但也指出了图表质量、高层次上下文建模和部署视图的局限。此外,评估了该流程的操作成本,发现生成完整架构文档只需几分钟且成本低廉。总体而言,结果表明,一种结构化、标准导向的方法能有效引导LLM生成既实用又经济的系统级架构文档。

英文摘要:

Software architecture documentation is essential for system comprehension, yet it is often unavailable or incomplete. While recent LLM-based techniques can generate documentation from code, they typically address local artifacts rather than producing coherent, system-level architectural descriptions. This paper presents a structured process for automatically generating system-level architectural documentation directly from GitHub repositories using Large Language Models. The process, called CIAO (Code In Architecture Out), defines an LLM-based workflow that takes a repository as input and produces system-level architectural documentation following a template derived from ISO/IEC/IEEE 42010, SEI Views \& Beyond, and the C4 model. The resulting documentation can be directly added to the target repository. We evaluated the process through a study with 22 developers, each reviewing the documentation generated for a repository they had contributed to. The evaluation shows that developers generally perceive the produced documentation as valuable, comprehensible, and broadly accurate with respect to the source code, while also highlighting limitations in diagram quality, high-level context modeling, and deployment views. We also assessed the operational cost of the process, finding that generating a complete architectural document requires only a few minutes and is inexpensive to run. Overall, the results indicate that a structured, standards-oriented approach can effectively guide LLMs in producing system-level architectural documentation that is both usable and cost-effective.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑