Visuals & diagrams
System docs · visuals
Binding rule: sections that convey a process, structure/relationship, or change over time must carry a diagram — see Writing style → Visuals.
Start here
Section titled “Start here” Doc components (live gallery) RuntimeOwnership, LayerStack, StepStack, …
Warrant test + tool table Process vs structure vs timeline → pick tool
Authoring capabilities Full plugin + diagram inventory
Shipped diagram components
Section titled “Shipped diagram components”| Component | Use when |
|---|---|
DiagramFigure | Frame + caption for inline SVG |
RuntimeOwnership | Single runtime / request authority |
PackageBoundary | What talks to what |
StageFlow | Horizontal pipeline |
LayerStack | Tiers / layers |
StepStack | Vertical numbered procedure |
Timeline | Phases over time |
PatternPair | Before ↔ after |
ContentDecisionTree | Branching classification |
Import from ~/components/diagrams/… in .mdx only. Styles: .zaj-diagram-* in src/styles/diagrams.css.
Mermaid (plain .md or .mdx)
Section titled “Mermaid (plain .md or .mdx)”Default edge style: orthogonal (stepAfter in astro.config.mjs). Use for arbitrary graphs when no bespoke layout is needed.
Worked examples with strong visuals
Section titled “Worked examples with strong visuals”| Page | Visuals used |
|---|---|
| Build an MCP server | 2× Mermaid + <FileTree> |
| Content architecture | Mermaid reader-moment graph |
| System docs home | ContentDecisionTree component |
When to create a new component
Section titled “When to create a new component”Add under src/components/diagrams/ when:
- The same editorial layout will appear on 3+ pages
- Mermaid cannot hit layout/styling requirements
- You need token-themed, accessible, responsive SVG (never screenshots)
Run the visual QC gate in AGENTS.md before merge.