Diagram Management Policy¶
๐ฏ PlantUML Diagram Standards¶
๐ Diagram Creation Process¶
- Source files: All diagrams MUST be created as
.pumlfiles indocs/diagrams/directory - PNG generation: Run
java -jar plantuml.jar -tpng docs/diagrams/*.pumlto generate PNG files - Documentation references: Markdown files MUST reference PNG files, not PUML source
- Version control: Both
.pumlsource and.pngoutput files are tracked in git
๐๏ธ Directory Structure¶
docs/
โโโ diagrams/ # CANONICAL DIAGRAM DIRECTORY
โ โโโ *.puml # PlantUML source files
โ โโโ *.png # Generated PNG images (auto-generated)
โโโ architecture/ # References: diagrams/name.png
โโโ design/ # References: diagrams/name.png
โโโ developer-guides/ # References: diagrams/name.png
models/
โโโ bss/design-intent/ # References: ../../../docs/diagrams/name.png
๐ Documentation Reference Pattern¶
When referencing diagrams from documentation in docs/ directory:

*Figure: Description of the diagram and its purpose.*
When referencing diagrams from business model documentation in models/ directory:

*Figure: Description of the diagram and its purpose.*
๐ Regeneration Command¶
To regenerate all PNG files from PlantUML sources:
# From repository root
java -jar plantuml.jar -tpng docs/diagrams/*.puml
๐ซ Prohibited Diagram Formats¶
- โ Mermaid charts - All Mermaid must be converted to PlantUML
- โ Inline SVG - Use PNG files for better compatibility
- โ External diagram tools - Use PlantUML for consistency
โ Required PlantUML Structure¶
All PlantUML files MUST include:
@startuml diagram-name
' Your diagram content here
@enduml
๐ Quality Standards¶
- Clear titles: Each diagram must have a descriptive title
- Proper naming: Use kebab-case for file names (e.g.,
bss-signal-flow.puml) - Consistent styling: Follow existing color and styling patterns
- Documentation: Include diagram purpose in referencing markdown
๐ ๏ธ Maintenance Workflow¶
Adding New Diagrams¶
- Create
.pumlfile indocs/diagrams/directory - Generate PNG:
java -jar plantuml.jar -tpng docs/diagrams/new-diagram.puml - Reference PNG in documentation
- Commit both
.pumland.pngfiles
Updating Existing Diagrams¶
- Modify the
.pumlsource file - Regenerate PNG:
java -jar plantuml.jar -tpng docs/diagrams/updated-diagram.puml - Verify documentation references are correct
- Commit updated files
Removing Diagrams¶
- Remove references from documentation first
- Delete both
.pumland.pngfiles - Commit changes
๐ Current Diagram Inventory¶
Architecture Diagrams¶
abs-hub-ecosystem.puml- ABS platform ecosystem overviewdirac-framework.puml- DIRAC framework architectureentities-erd.puml- Entity relationship diagram
Business Model Diagrams¶
bss-signal-flow.puml- Battery Swap Service signal flow
State Diagrams¶
customer-state.puml- Customer state machineasset-owner-state.puml- Asset owner state machineiot-asset-state.puml- IoT asset state machine
Integration Diagrams¶
messaging-platform.puml- Messaging platform architectureinter-platform.puml- Inter-platform communication
๐ Migration Status¶
โ Completed¶
- Consolidated all diagrams in
docs/diagrams/directory - Converted Mermaid sequence diagram to PlantUML (
bss-signal-flow.puml) - Updated documentation to reference PNG files
- Established diagram management workflow
๐ Future Tasks¶
- Generate missing PNG files for all PlantUML diagrams
- Validate all diagram references in documentation
- Establish automated PNG generation in CI/CD
Last Updated: January 2025 Maintained By: Documentation Team