arXiv:2603.26244cs.SEcs.AI2026-03被引 1

用提示框架辅助领域驱动设计,提升文档效率但不替代专家决策

Automating Domain-Driven Design: Experience with a Prompting Framework

  • 将领域驱动设计拆解为五个可提示的步骤,通过大模型协同生成文档
  • 前三个步骤产出可用成果,后两个步骤因误差累积导致结果不可用
  • 适合架构师做快速原型和讨论,非全自动化工具

领域驱动设计(DDD)是构建复杂软件系统的重要方法。本文提出一种提示框架,通过结构化的大语言模型(LLM)交互自动化实现核心DDD流程。我们将DDD分解为五个连续步骤:(1)建立统一语言,(2)模拟事件风暴,(3)识别限界上下文,(4)设计聚合,(5)映射到技术架构。在对FTAPI企业平台真实需求的案例研究中,前三个步骤持续生成有价值的可用成果,而后续步骤显示微小错误会传播并积累。整体而言,该框架作为协作伙伴在生成术语表、上下文图等可操作文档方面表现优异,但无法实现完全自动化。这使专家能聚焦于关键权衡决策。评估表明,第1至第3步效果良好,但第4与第5步的误差积累导致输出不实用。研究结果表明,LLM可增强但不能替代架构专业知识,提供了一种降低DDD实施成本且保持人为决策主导的实用工具。

原文摘要 · Abstract (English)

Domain-driven design (DDD) is a powerful design technique for architecting complex software systems. This paper introduces a prompting framework that automates core DDD activities through structured large language model (LLM) interactions. We decompose DDD into five sequential steps: (1) establishing an ubiquitous language, (2) simulating event storming, (3) identifying bounded contexts, (4) designing aggregates, and (5) mapping to technical architecture. In a case study, we validated the prompting framework against real-world requirements from FTAPI's enterprise platform. While the first steps consistently generate valuable and usable artifacts, later steps show how minor errors or inaccuracies can propagate and accumulate. Overall, the framework excels as a collaborative sparring partner for building actionable documentation, such as glossaries and context maps, but not for full automation. This allows the experts to concentrate their discussion on the critical trade-offs. In our evaluation, Steps 1 to 3 worked well, but the accumulated errors rendered the artifacts generated from Steps 4 and 5 impractical. Our findings show that LLMs can enhance, but not replace, architectural expertise, offering a practical tool to reduce the effort and overhead of DDD while preserving human-centric decision-making.

领域驱动设计提示工程架构辅助大模型应用

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