2 +name: the-system-mermaid
3 +description: "Use only when current instructions contain The System Markdown contract and a Mermaid diagram has already been selected to explain structure, decisions, interactions, states, entities, cardinality, or conceptual type relationships in the System document."
8 +Do not choose a diagram or create another artifact.
9 +Apply the active System contracts first.
10 +Use one model per `mermaid` fence and introduce its claim in prose.
11 +Never diagram `/system` stage progression or duplicate board state.
13 +##
Select the narrowest model 15 +- `flowchart` for bounded structure, dependencies, or decisions.
16 +- `sequenceDiagram` for interactions ordered over time.
17 +- `stateDiagram-v2` for domain states and transitions.
18 +- `erDiagram` for conceptual entities and cardinality.
19 +- `classDiagram` for conceptual static type relationships.
23 +Use `LR` for a short chain and `TB` for hierarchy or branching.
24 +Separate stable identifiers from quoted human labels.
28 + request["Request"] --> policy{"Valid?"}
29 + policy -->|yes| result["Result"]
30 + policy -->|no| rejection["Rejection"]
35 +Declare participants when their order matters.
36 +Use solid arrows for calls and dashed arrows for replies.
37 +Use `alt` only for a material branch.
41 + participant C as Client
42 + participant S as Service
53 +Use `[*]` for start or terminal state and label meaningful transitions.
54 +Model domain behavior, never plan, spec, issue, or board progress.
59 + Draft --> Published: approve
60 + Published --> [*]: retire
63 +###
Entity relationship 65 +Use singular conceptual entities and label relationships from the first entity's perspective.
66 +Cardinality markers are `o|` zero-or-one, `||` exactly-one, `o{` zero-or-more, and `|{` one-or-more.
67 +Omit storage fields and keys unless the artifact explicitly defines a physical schema.
71 + ACCOUNT ||--o{ INVOICE : receives
76 +Show conceptual types and relationships only.
77 +Omit members, methods, visibility, generics, and implementation types.
81 + Client --> Service : uses
86 +Keep identifiers short, stable, and ASCII; labels may contain human text.
87 +Do not use bare lowercase `end` as a flowchart node or label because Mermaid reserves it.
88 +Split dense diagrams instead of styling around poor structure.
90 +Do not add Mermaid directives, configuration, themes, custom styles, HTML labels, callbacks, clickable nodes, icons, images, or remote assets.