One grammar for every decision diagram
Every flow, topology, and protocol we draw uses the same parts: nodes, edges, states, and layouts. This standard defines them so a diagram from any team reads the same way and maps cleanly back to the product.
Every diagram is built from four parts
No diagram introduces a new shape or a new color outside this vocabulary. If something can't be said with a node, an edge, a container, and a label, it doesn't belong in a DecisionProtocol diagram.
Type by shape, status by fill
A node's shape says what it is; its fill says how it's doing; its size says how much decision load it carries.
Types, shapesDiameter scales with monthly decision volume through the node. Baseline 8px = low load; step to 13 and 20px. Never encode load with color, color is reserved for status.
Four relationships, four line styles
Line weight = volume. Thickness carries how many decisions traverse the edge (1.5 / 3 / 5px). Direction always reads left-to-right or top-to-bottom.
Three ways to arrange a graph
Pick the layout by the question you're answering, where authority sits, where work crosses teams, or how flow changes over time.
Five decision pathologies, drawn the same way every time
These recurring shapes are named in the product. Standardising how we draw them means anyone can spot one on sight.
A pathology is always drawn in tangerine against otherwise teal/outline flow: the problem is the only thing that gets the signal color.
Draw it right
- +Flow reads left-to-right or top-to-bottom
- +Snap nodes to a consistent column/row rhythm
- +Include a legend, bottom-left, in Space Mono
- +Keep ≥ one node-diameter of clear space between nodes
- +Reserve tangerine for the resolved node or the problem
- ×More than the four status colors in one graph
- ×Encode two variables in one channel (e.g. color = load)
- ×Cross edges when a reroute avoids it
- ×Gradients, drop shadows, or 3-D on nodes
- ×New shapes outside the node / edge / container set
Everything sits on a 30px grid. Node centers land on intersections; edges run along grid lines or clean 30°/45° diagonals. Consistent geometry is what makes two diagrams from two teams feel like one system.
A real decision graph, to spec
One topology using the full grammar, types, states, weighted edges, a domain container, a bottleneck, an escalation, and a legend.
Signal token mapping, canonical
Every diagram (inline SVG, motif illustration, legend chip, node glyph) must draw only from these tokens. No raw hex, no hsl(…) literals, no gradients, no drop shadows, no 3-D. If a diagram needs a color that isn’t below, it’s wrong.
| Role | Token | SVG / CSS | Swatch |
|---|---|---|---|
| Node: active | --teal | fill-teal / stroke-teal | |
| Node: bottleneck | --tangerine | fill-tangerine | |
| Node: resolved | --signal | fill-signal | |
| Node: open (outline) | --mist / --line | fill-none stroke-line / stroke-mist | |
| Node: anchor / root | --petrol | fill-petrol | |
| Edge: flow | --teal | stroke-teal, strokeWidth 0.3–1.5 | |
| Edge: escalation | --tangerine | stroke-tangerine, dashed 2 2 | |
| Label: on light | --foreground | fill-foreground | |
| Label: on petrol | --cream | fill-cream | |
| Surface: light | --cream | bg-cream, border-line | |
| Surface: deep | --petrol | bg-petrol, text-cream |
Tangerine ring, not glow
A stalled node gets a concentric outer ring in --tangerine at 30–50% opacity, stroke 0.3–1.5, no feGaussianBlur, no drop shadow. Ring radius = node radius + 1.5–3 units.
Teal radius animation
An active node may pulse by animating r ±0.5 units at 2s, optionally with a matching teal ring fading 0.5 ↔ 0.2. No blur filter, no color shift, no gradient.
- × <linearGradient>, <radialGradient>, stroke="url(#…)", fill="url(#…)"
- × bg-gradient-to-*, from-*, to-* Tailwind utilities on diagram wrappers
- × Raw color literals: #rrggbb, hsl(nn nn% nn%), rgb(…), fill="white"
- × Off-system Tailwind palettes: bg-red-*, text-blue-*, border-green-*, cyan, purple, indigo, amber, emerald, rose, slate, zinc, gray
- × Emoji or pictograph glyphs (U+2600–U+27BF) as icons. Use decision-graph node glyphs from brand-assets/diagram/ or lucide outlines
- × <feGaussianBlur> glow filters, drop shadows, 3-D transforms, isometric perspective
Lint script: scripts/lint-diagrams.mjs, runs against src/components/diagrams/, src/pages/Method.tsx, src/pages/Diagrams.tsx, src/components/home/DecisionGraph.tsx.