Skip to main content

Module diagram

Module diagram 

Source
Expand description

Architecture diagram model + deterministic Mermaid/SVG rendering.

Pure Store -> model -> text. Lives in the engine so every transport (CLI, RPC, HTTP, SDKs, FFI) renders the same diagram from the same code; the CLI only parses args and prints. Map/snap/viewer HTML pages stay CLI-local (terminal/HTTP-viewer UX, not model behavior).

Structs§

DiagramEdge
One architectural relationship between diagram nodes.
DiagramModel
L1 architecture nodes plus capped edges, sorted for byte-determinism.
DiagramNode
One architecture-layer entity in the diagram.

Constants§

MAX_DIAGRAM_NODES
MAX_EDGES_PER_NODE

Functions§

build_diagram_model
Build the diagram model from the live store. Same L1 filter as export_ccg; edges limited to architectural predicates between known nodes, capped per node after sorting so output is deterministic.
render_mermaid
Mermaid flowchart: gitdiagram-shaped output, SCC-derived content.
render_svg
Dependency-free SVG: naive grid layout (spec-acknowledged limit), boxes plus lines plus labels, no JS.
truncate_label