Capture diagrams into the architecture second brain
Diagrams live inside OKF concept Markdown as fenced mermaid or plantuml /
puml listings — portable, LLM-readable, and scannable.
Types
| Type | Typical format |
|---|---|
Wireframe |
PlantUML salt |
ArchitectureDiagram |
Mermaid / PlantUML / C4 |
ComponentDiagram |
Mermaid / PlantUML |
SequenceDiagram |
Mermaid sequenceDiagram |
ActivityDiagram |
Mermaid flowchart / PlantUML activity |
StateMachineDiagram |
Mermaid stateDiagram-v2 |
ClassDiagram |
Mermaid classDiagram |
ErdDiagram |
Mermaid erDiagram |
DeploymentDiagram |
PlantUML deployment |
DataFlowDiagram |
Mermaid flowchart |
C4Diagram |
PlantUML C4 / Mermaid |
Diagram |
Umbrella only when kind unknown |
Process
- Discover existing diagrams in the repo:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_scan_diagrams.py" --root . --json
- Materialize via full capture (or orchestrate):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_orchestrate.py" --scan-root . --system "MySystem"
# domains include diagrams + code by default
Author new design diagrams (when designing features/apps):
- Create concept under
diagrams/using the right type. - Put the listing in a
## Diagramsection insidemermaid orplantuml fences. - Link with
visualizes/diagrams/wireframes/modelsto Service, WebApp, ApiContract, Database, Class, etc.
- Create concept under
Code structure (modules / classes / methods / functions):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sac_scan_code_structure.py" --root .
Package= build unit (npm/maven/gradle/…)Module= source module / namespace inside a packageClass/Interface/Enum/Method/Function= code-level concepts for design and blast radius
Rules
- Prefer specific diagram types over bare
Diagram. - Always keep the diagram source in the Markdown (never only as a PNG link).
- One primary listing per concept; extra variants can be additional sections.
- After writing, link related topology and run
sac_validate.py --schema. - For UI work, use PlantUML salt wireframes linked to
WebApp/MobileApp/Channel.
For C4 level views and Structurizr, use skill sac-c4 (docs/c4-integration.md).