Condition Graph
Render a view of the map. The JSON or confirmed tables remain the source of truth.
Procedure
- Read
state-map.json, thenSTATEFUL.md, then user-supplied tables in that order. - If no map exists, stop and recommend discovery; do not invent one while graphing.
- Choose the smallest useful cut:
- up to about 25 conditions: one diagram;
- larger maps: in-scope only, one lens, or separate diagrams by lens.
- Create a Mermaid
flowchart TB:- quote every label;
- group categories as Lifecycle, Failure, Interruption context, and Surface;
- style confirmed scope: solid
in, dashedout-with-implication, dimmedout; - draw only recorded relationships;
- label non-transition edges
interrupted by,re-enters as, orprojects to.
- State the cut and that the result is a condition-map view, not an executable statechart.
- Validate Mermaid syntax.
- Ask whether to return inline, write
state-graph.md, or embed under## GraphinSTATEFUL.md.
Output
```mermaid
flowchart TB
classDef inScope stroke-width:2px
classDef owi stroke-dasharray:5 5
classDef outScope opacity:0.4
subgraph Lifecycle
a["Dose overdue"]:::inScope
end
subgraph Interruption["Interruption context"]
i["Timezone changed"]:::inScope
end
a -->|"interrupted by"| i
```
Legend: solid = in · dashed = out-with-implication · dimmed = out
Cut: <description>
This is a condition-map view, not an executable statechart.
Failure modes
- Inventing arrows.
- Flattening typed relationships into unlabeled transitions.
- Treating surfaces or interruptions as lifecycle nodes.
- One unreadable graph for the entire map.
- Allowing the graph to become the source of truth.