172-java-diagrams

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Java Diagrams Generator with modular step-based configuration

基于模块化分步配置的Java图生成工具

Generate comprehensive Java project diagrams through a modular, step-based interactive process that covers UML sequence diagrams, UML class diagrams, C4 model diagrams, and UML state machine diagrams using PlantUML syntax. This is an interactive SKILL.
Prerequisites: Run
./mvnw validate
or
mvn validate
before applying any diagram generation. If validation fails, stop immediately — do not proceed until all validation errors are resolved.
Core areas: UML sequence diagram generation for application workflows and API interactions, UML class diagram generation for package structure and class relationships, C4 model diagram generation at Context/Container/Component/Code abstraction levels, UML state machine diagram generation for entity lifecycles and business workflows, PlantUML syntax for all diagram types, file organization strategies (single-file, separate-files, or integrated with existing documentation), and final diagram validation with PlantUML syntax checking.
Multi-step scope: Step 1 assesses diagram preferences through targeted questions to determine which subsequent steps to execute. Step 2 generates UML sequence diagrams for main application flows, API interactions, and complex business logic — conditionally executed if selected. Step 3 generates UML class diagrams for all packages, core business logic packages, or specific packages, showing inheritance, composition, and dependency relationships — conditionally executed if selected. Step 4 generates C4 model diagrams covering System Context, Container, Component, and Code levels — conditionally executed if selected. Step 5 generates UML state machine diagrams for entity lifecycles, business workflows, system behaviors, and user interactions — conditionally executed if selected. Step 6 validates all generated diagrams and produces a comprehensive summary of files created, directory structure, content coverage, and usage instructions for rendering with PlantUML.
Before applying changes: Read the reference for detailed good/bad examples, constraints, and safeguards for each diagram generation pattern.
通过适配特定可视化需求的模块化、分步交互式流程,使用PlantUML语法生成全面的Java项目图,涵盖UML序列图、UML类图、C4模型图和UML状态机图。这是一个交互式SKILL
前置条件:在执行任何图生成操作前,先运行
./mvnw validate
mvn validate
。如果验证失败,请立即停止——在解决所有验证错误前不要继续。
核心覆盖领域:用于应用工作流和API交互的UML序列图生成、用于包结构和类关系的UML类图生成、在Context/Container/Component/Code抽象层级的C4模型图生成、用于实体生命周期和业务工作流的UML状态机图生成、适用于所有图类型的PlantUML语法、文件组织策略(单文件、多文件分离或与现有文档集成),以及通过PlantUML语法检查进行最终图验证。
多步骤范围:步骤1通过针对性问题评估图偏好,以确定后续要执行的步骤。步骤2为主要应用流程、API交互和复杂业务逻辑生成UML序列图——仅在选中时执行。步骤3为所有包、核心业务逻辑包或特定包生成UML类图,展示继承、组合和依赖关系——仅在选中时执行。步骤4生成覆盖System Context、Container、Component和Code层级的C4模型图——仅在选中时执行。步骤5为实体生命周期、业务工作流、系统行为和用户交互生成UML状态机图——仅在选中时执行。步骤6验证所有生成的图,并生成一份包含创建的文件、目录结构、内容覆盖范围以及使用PlantUML渲染的使用说明的综合摘要。
在应用更改前:阅读参考文档,获取每种图生成模式的详细好坏示例、约束和防护措施。

Reference

参考文档

For detailed guidance, examples, and constraints, see references/172-java-diagrams.md.
如需详细指南、示例和约束,请查看references/172-java-diagrams.md