用大模型自动从代码库生成符合标准的系统架构文档。
CIAO - Code In Architecture Out - Automated Software Architecture Documentation with Large Language Models
- 基于LLM构建流程,输入代码库直接输出结构化架构文档。
- 22名开发者评测认为文档准确易懂,生成仅需数分钟。
- 适合需要快速生成规范架构说明的开发团队使用。
软件架构文档对系统理解至关重要,但常缺失或不完整。现有基于大模型的方法多聚焦局部代码,难以生成连贯的系统级描述。本文提出CIAO(Code In Architecture Out)流程,通过大模型自动从GitHub仓库生成符合ISO/IEC/IEEE 42010、SEI Views & Beyond及C4模型标准的系统级架构文档。该流程将仓库作为输入,输出可直接添加至目标仓库的文档。通过22名开发者的评估发现,生成文档普遍被认为有价值、可读且与源码基本一致,但存在图质量不高、高层上下文建模不足和部署视图欠缺等问题。同时,流程操作成本低,生成完整文档仅需几分钟,运行开销小。结果表明,以标准为导向的结构化方法能有效引导大模型产出可用且经济的系统级架构文档。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。