Raw schema
{
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Mermaid source."
},
"options": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://agentic-mermaid.dev/schemas/render-options.schema.json",
"type": "object",
"additionalProperties": false,
"properties": {
"bg": {
"type": "string",
"description": "Background color or CSS variable.",
"default": "#FFFFFF",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "consumed"
},
"fg": {
"type": "string",
"description": "Primary foreground and text color.",
"default": "#27272A",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "consumed"
},
"line": {
"type": "string",
"description": "Connector and secondary-line color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "consumed"
},
"accent": {
"type": "string",
"description": "Arrowhead, highlight, and data accent color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "consumed"
},
"muted": {
"type": "string",
"description": "Secondary text and label color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "projected",
"x-agentic-mermaid-terminal-note": "terminal themes have no dedicated muted-text role"
},
"surface": {
"type": "string",
"description": "Node and group surface color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "projected",
"x-agentic-mermaid-terminal-note": "terminal cells do not paint graphical surfaces"
},
"border": {
"type": "string",
"description": "Node and group border color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint",
"x-agentic-mermaid-terminal": "consumed"
},
"font": {
"type": "string",
"description": "CSS font family or stack.",
"default": "Inter",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily",
"x-agentic-mermaid-terminal": "projected",
"x-agentic-mermaid-terminal-note": "the host terminal owns the font face"
},
"style": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"description": "Registered Style or Palette name."
},
{
"description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
"type": "object",
"additionalProperties": false,
"maxProperties": 24,
"properties": {
"formatVersion": {
"const": 1,
"description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
},
"$schema": {
"type": "string",
"description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
},
"name": {
"type": "string",
"description": "Canonical look:name or palette:name identity; required only when registering a style."
},
"blurb": {
"type": "string",
"description": "Short human-readable description used by discovery surfaces."
},
"colors": {
"type": "object",
"additionalProperties": false,
"maxProperties": 7,
"description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
"properties": {
"bg": {
"type": "string",
"description": "Diagram page background. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"fg": {
"type": "string",
"description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"line": {
"type": "string",
"description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"accent": {
"type": "string",
"description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"muted": {
"type": "string",
"description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"surface": {
"type": "string",
"description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"border": {
"type": "string",
"description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
}
}
},
"font": {
"type": "string",
"description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"roles": {
"type": "object",
"additionalProperties": false,
"description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
"properties": {
"node": {
"type": "object",
"additionalProperties": false,
"maxProperties": 11,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"edge": {
"type": "object",
"additionalProperties": false,
"maxProperties": 8,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"bendRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable connector bend radius."
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"group": {
"type": "object",
"additionalProperties": false,
"maxProperties": 13,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"fontFamily": {
"type": "string",
"description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"headerFillColor": {
"type": "string",
"description": "Group header surface paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"group-header": {
"type": "object",
"additionalProperties": false,
"maxProperties": 11,
"properties": {
"fontFamily": {
"type": "string",
"description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
},
"label": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"actor": {
"type": "object",
"additionalProperties": false,
"maxProperties": 11,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"relationship": {
"type": "object",
"additionalProperties": false,
"maxProperties": 8,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"bendRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable connector bend radius."
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"pie-slice": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
},
"legend": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"bar": {
"type": "object",
"additionalProperties": false,
"maxProperties": 4,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
}
}
},
"series": {
"type": "object",
"additionalProperties": false,
"maxProperties": 3,
"properties": {
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
}
}
},
"point": {
"type": "object",
"additionalProperties": false,
"maxProperties": 4,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
}
}
},
"task": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
},
"milestone": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
}
}
},
"semanticSlots": {
"type": "object",
"description": "Named brand-neutral role-style slots selected by semantic bindings.",
"maxProperties": 4096,
"propertyNames": {
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
"not": {
"enum": [
"__proto__",
"constructor",
"prototype"
]
}
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"maxProperties": 16,
"properties": {
"fontFamily": {
"type": "string",
"description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"bendRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable connector bend radius."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"headerFillColor": {
"type": "string",
"description": "Group header surface paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
}
},
"bindings": {
"type": "array",
"description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
"maxItems": 4096,
"items": {
"type": "object",
"additionalProperties": false,
"maxProperties": 4,
"required": [
"channel",
"value",
"slot"
],
"properties": {
"channel": {
"type": "string",
"enum": [
"category"
]
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\r\\n\\u0000]+$"
},
"slot": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
"not": {
"enum": [
"__proto__",
"constructor",
"prototype"
]
}
},
"role": {
"type": "string",
"enum": [
"group-header",
"actor",
"relationship",
"pie-slice",
"legend",
"bar",
"series",
"point",
"task",
"milestone"
]
}
}
}
},
"constraints": {
"type": "array",
"description": "Closed inspect-only brand constraints with warn or error actions.",
"maxItems": 4096,
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"action"
],
"properties": {
"kind": {
"const": "contrast"
},
"action": {
"type": "string",
"enum": [
"warn",
"error"
]
},
"role": {
"type": "string",
"enum": [
"node",
"edge",
"edge-label",
"group",
"group-header",
"label",
"actor",
"lifeline",
"activation",
"message",
"block",
"note",
"class-box",
"member",
"entity",
"attribute",
"relationship",
"cardinality",
"pie-slice",
"legend",
"bar",
"series",
"point",
"axis",
"grid",
"plate",
"section",
"task",
"milestone",
"marker-line",
"rail",
"period",
"event",
"score",
"actor-pill",
"service",
"junction",
"icon",
"title",
"defs",
"prelude",
"chrome"
]
},
"minimum": {
"type": "number",
"minimum": 1,
"maximum": 21
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"action",
"maxFraction"
],
"properties": {
"kind": {
"const": "accent-area"
},
"action": {
"type": "string",
"enum": [
"warn",
"error"
]
},
"maxFraction": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"action",
"role"
],
"properties": {
"kind": {
"const": "mono-role"
},
"action": {
"type": "string",
"enum": [
"warn",
"error"
]
},
"role": {
"type": "string",
"enum": [
"node",
"edge",
"edge-label",
"group",
"group-header",
"label",
"actor",
"lifeline",
"activation",
"message",
"block",
"note",
"class-box",
"member",
"entity",
"attribute",
"relationship",
"cardinality",
"pie-slice",
"legend",
"bar",
"series",
"point",
"axis",
"grid",
"plate",
"section",
"task",
"milestone",
"marker-line",
"rail",
"period",
"event",
"score",
"actor-pill",
"service",
"junction",
"icon",
"title",
"defs",
"prelude",
"chrome"
]
}
}
}
]
}
},
"stroke": {
"type": "string",
"enum": [
"crisp",
"jittered",
"freehand"
],
"description": "Stroke treatment; crisp is the default renderer."
},
"roughness": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "Rough.js stroke irregularity."
},
"bowing": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "Rough.js line bowing."
},
"passes": {
"type": "integer",
"minimum": 1,
"maximum": 8,
"description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
},
"strokeWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Base stroke width in SVG user units."
},
"fill": {
"type": "string",
"enum": [
"none",
"hachure",
"solid",
"wash"
],
"description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
},
"hachureAngle": {
"type": "number",
"minimum": -360,
"maximum": 360,
"description": "Hachure line angle in degrees; requires fill hachure in the final stack."
},
"hachureGap": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100,
"description": "Gap between hachure lines; requires fill hachure in the final stack."
},
"fillWeight": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Hachure line weight; requires fill hachure in the final stack."
},
"washOpacity": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Watercolor glaze opacity; requires fill wash in the final stack."
},
"washEdge": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
},
"backdrop": {
"type": "string",
"enum": [
"plain",
"paper-ruled",
"grid"
],
"description": "Flat page furniture drawn behind the diagram."
},
"intent": {
"type": "string",
"enum": [
"premium",
"draft",
"lofi"
],
"description": "Advisory intent metadata for pickers and quality tooling."
},
"mono": {
"type": "boolean",
"description": "Advisory monochrome contract: express tone through shading and weight."
}
}
}
],
"x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
},
{
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "Registered Style or Palette name."
},
{
"description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
"type": "object",
"additionalProperties": false,
"maxProperties": 24,
"properties": {
"formatVersion": {
"const": 1,
"description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
},
"$schema": {
"type": "string",
"description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
},
"name": {
"type": "string",
"description": "Canonical look:name or palette:name identity; required only when registering a style."
},
"blurb": {
"type": "string",
"description": "Short human-readable description used by discovery surfaces."
},
"colors": {
"type": "object",
"additionalProperties": false,
"maxProperties": 7,
"description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
"properties": {
"bg": {
"type": "string",
"description": "Diagram page background. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"fg": {
"type": "string",
"description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"line": {
"type": "string",
"description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"accent": {
"type": "string",
"description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"muted": {
"type": "string",
"description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"surface": {
"type": "string",
"description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
},
"border": {
"type": "string",
"description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
"x-agentic-mermaid-runtime-validator": "safeCssColor"
}
}
},
"font": {
"type": "string",
"description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"roles": {
"type": "object",
"additionalProperties": false,
"description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
"properties": {
"node": {
"type": "object",
"additionalProperties": false,
"maxProperties": 11,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"edge": {
"type": "object",
"additionalProperties": false,
"maxProperties": 8,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"bendRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable connector bend radius."
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"group": {
"type": "object",
"additionalProperties": false,
"maxProperties": 13,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"fontFamily": {
"type": "string",
"description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"headerFillColor": {
"type": "string",
"description": "Group header surface paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"group-header": {
"type": "object",
"additionalProperties": false,
"maxProperties": 11,
"properties": {
"fontFamily": {
"type": "string",
"description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
},
"label": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"actor": {
"type": "object",
"additionalProperties": false,
"maxProperties": 11,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"relationship": {
"type": "object",
"additionalProperties": false,
"maxProperties": 8,
"properties": {
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"bendRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable connector bend radius."
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"pie-slice": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
},
"legend": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
}
}
},
"bar": {
"type": "object",
"additionalProperties": false,
"maxProperties": 4,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
}
}
},
"series": {
"type": "object",
"additionalProperties": false,
"maxProperties": 3,
"properties": {
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
}
}
},
"point": {
"type": "object",
"additionalProperties": false,
"maxProperties": 4,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
}
}
},
"task": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
},
"milestone": {
"type": "object",
"additionalProperties": false,
"maxProperties": 5,
"properties": {
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
}
}
},
"semanticSlots": {
"type": "object",
"description": "Named brand-neutral role-style slots selected by semantic bindings.",
"maxProperties": 4096,
"propertyNames": {
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
"not": {
"enum": [
"__proto__",
"constructor",
"prototype"
]
}
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"maxProperties": 16,
"properties": {
"fontFamily": {
"type": "string",
"description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"fontSize": {
"type": "number",
"minimum": 1,
"maximum": 256,
"description": "Font size in SVG user units."
},
"fontWeight": {
"type": "number",
"minimum": 1,
"maximum": 1000,
"description": "CSS numeric font weight."
},
"letterSpacing": {
"type": "number",
"minimum": -2,
"maximum": 4,
"description": "Letter spacing in SVG user units."
},
"textTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Text transformation."
},
"textColor": {
"type": "string",
"description": "Text paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"paddingX": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Horizontal role padding."
},
"paddingY": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Vertical role padding."
},
"cornerRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable corner radius."
},
"lineWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Border or connector width."
},
"bendRadius": {
"type": "number",
"minimum": 0,
"maximum": 256,
"description": "Applicable connector bend radius."
},
"fillColor": {
"type": "string",
"description": "Surface fill paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"borderColor": {
"type": "string",
"description": "Border paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"strokeColor": {
"type": "string",
"description": "Connector stroke paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"headerFillColor": {
"type": "string",
"description": "Group header surface paint.",
"x-agentic-mermaid-runtime-validator": "safeStylePaint"
},
"cue": {
"type": "string",
"enum": [
"none",
"outline",
"double-line",
"pattern"
],
"description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
}
}
}
},
"bindings": {
"type": "array",
"description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
"maxItems": 4096,
"items": {
"type": "object",
"additionalProperties": false,
"maxProperties": 4,
"required": [
"channel",
"value",
"slot"
],
"properties": {
"channel": {
"type": "string",
"enum": [
"category"
]
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[^\\r\\n\\u0000]+$"
},
"slot": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
"not": {
"enum": [
"__proto__",
"constructor",
"prototype"
]
}
},
"role": {
"type": "string",
"enum": [
"group-header",
"actor",
"relationship",
"pie-slice",
"legend",
"bar",
"series",
"point",
"task",
"milestone"
]
}
}
}
},
"constraints": {
"type": "array",
"description": "Closed inspect-only brand constraints with warn or error actions.",
"maxItems": 4096,
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"action"
],
"properties": {
"kind": {
"const": "contrast"
},
"action": {
"type": "string",
"enum": [
"warn",
"error"
]
},
"role": {
"type": "string",
"enum": [
"node",
"edge",
"edge-label",
"group",
"group-header",
"label",
"actor",
"lifeline",
"activation",
"message",
"block",
"note",
"class-box",
"member",
"entity",
"attribute",
"relationship",
"cardinality",
"pie-slice",
"legend",
"bar",
"series",
"point",
"axis",
"grid",
"plate",
"section",
"task",
"milestone",
"marker-line",
"rail",
"period",
"event",
"score",
"actor-pill",
"service",
"junction",
"icon",
"title",
"defs",
"prelude",
"chrome"
]
},
"minimum": {
"type": "number",
"minimum": 1,
"maximum": 21
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"action",
"maxFraction"
],
"properties": {
"kind": {
"const": "accent-area"
},
"action": {
"type": "string",
"enum": [
"warn",
"error"
]
},
"maxFraction": {
"type": "number",
"minimum": 0,
"maximum": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"action",
"role"
],
"properties": {
"kind": {
"const": "mono-role"
},
"action": {
"type": "string",
"enum": [
"warn",
"error"
]
},
"role": {
"type": "string",
"enum": [
"node",
"edge",
"edge-label",
"group",
"group-header",
"label",
"actor",
"lifeline",
"activation",
"message",
"block",
"note",
"class-box",
"member",
"entity",
"attribute",
"relationship",
"cardinality",
"pie-slice",
"legend",
"bar",
"series",
"point",
"axis",
"grid",
"plate",
"section",
"task",
"milestone",
"marker-line",
"rail",
"period",
"event",
"score",
"actor-pill",
"service",
"junction",
"icon",
"title",
"defs",
"prelude",
"chrome"
]
}
}
}
]
}
},
"stroke": {
"type": "string",
"enum": [
"crisp",
"jittered",
"freehand"
],
"description": "Stroke treatment; crisp is the default renderer."
},
"roughness": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "Rough.js stroke irregularity."
},
"bowing": {
"type": "number",
"minimum": 0,
"maximum": 10,
"description": "Rough.js line bowing."
},
"passes": {
"type": "integer",
"minimum": 1,
"maximum": 8,
"description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
},
"strokeWidth": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Base stroke width in SVG user units."
},
"fill": {
"type": "string",
"enum": [
"none",
"hachure",
"solid",
"wash"
],
"description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
},
"hachureAngle": {
"type": "number",
"minimum": -360,
"maximum": 360,
"description": "Hachure line angle in degrees; requires fill hachure in the final stack."
},
"hachureGap": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100,
"description": "Gap between hachure lines; requires fill hachure in the final stack."
},
"fillWeight": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 20,
"description": "Hachure line weight; requires fill hachure in the final stack."
},
"washOpacity": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Watercolor glaze opacity; requires fill wash in the final stack."
},
"washEdge": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
},
"backdrop": {
"type": "string",
"enum": [
"plain",
"paper-ruled",
"grid"
],
"description": "Flat page furniture drawn behind the diagram."
},
"intent": {
"type": "string",
"enum": [
"premium",
"draft",
"lofi"
],
"description": "Advisory intent metadata for pickers and quality tooling."
},
"mono": {
"type": "boolean",
"description": "Advisory monochrome contract: express tone through shading and weight."
}
}
}
],
"x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
},
"description": "Style stack merged from left to right."
}
],
"description": "A registered name, inline StyleSpec, or left-to-right stack of either.",
"x-agentic-mermaid-runtime-validator": "styleInput",
"x-agentic-mermaid-terminal": "consumed"
},
"padding": {
"type": "number",
"description": "Canvas padding in SVG user units.",
"default": 40,
"minimum": 0,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal output uses paddingX, paddingY, and boxBorderPadding",
"x-agentic-mermaid-applicable-builtin-families": [
"flowchart",
"state",
"architecture"
]
},
"nodeSpacing": {
"type": "number",
"description": "Horizontal spacing between sibling nodes.",
"default": 24,
"minimum": 0,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
"x-agentic-mermaid-applicable-builtin-families": [
"flowchart",
"state",
"class",
"er",
"architecture"
]
},
"layerSpacing": {
"type": "number",
"description": "Vertical spacing between graph layers.",
"default": 40,
"minimum": 0,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
"x-agentic-mermaid-applicable-builtin-families": [
"flowchart",
"state",
"class",
"er",
"architecture"
]
},
"wrappingWidth": {
"type": "number",
"description": "Flowchart measured-label wrapping budget in pixels.",
"exclusiveMinimum": 0,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
"x-agentic-mermaid-applicable-builtin-families": [
"flowchart"
]
},
"componentSpacing": {
"type": "number",
"description": "Spacing between disconnected graph components for compatible extension families; no built-in family currently consumes it.",
"minimum": 0,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
"x-agentic-mermaid-applicable-builtin-families": []
},
"transparent": {
"type": "boolean",
"description": "Omit the painted SVG canvas background.",
"default": false,
"x-agentic-mermaid-terminal": "projected",
"x-agentic-mermaid-terminal-note": "terminal output has no painted canvas background"
},
"interactive": {
"type": "boolean",
"description": "Enable hover tooltips for supported chart data points.",
"default": false,
"x-agentic-mermaid-terminal": "projected",
"x-agentic-mermaid-terminal-note": "terminal output is a static semantic projection",
"x-agentic-mermaid-applicable-builtin-families": [
"xychart",
"pie",
"quadrant"
]
},
"shadow": {
"type": "boolean",
"description": "Paint explicit drop shadows on node shapes.",
"default": false,
"x-agentic-mermaid-terminal": "projected",
"x-agentic-mermaid-terminal-note": "elevation projects to borders and labels",
"x-agentic-mermaid-applicable-builtin-families": [
"flowchart",
"state",
"sequence",
"timeline",
"class",
"er",
"journey",
"xychart",
"pie",
"quadrant",
"gantt",
"mindmap",
"gitgraph"
]
},
"class": {
"type": "object",
"description": "Class-diagram rendering controls.",
"additionalProperties": false,
"properties": {
"hierarchicalNamespaces": {
"type": "boolean",
"description": "Nest namespace compounds.",
"default": true
}
},
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "this option configures graphical class layout",
"x-agentic-mermaid-applicable-builtin-families": [
"class"
]
},
"architecture": {
"type": "object",
"description": "Architecture renderer visual metric and paint overrides.",
"additionalProperties": false,
"properties": {
"visual": {
"type": "object",
"description": "Sparse architecture visual overrides merged over resolved defaults.",
"additionalProperties": false,
"properties": {
"groupHeaderHeight": {
"type": "number",
"description": "Architecture group-header height.",
"exclusiveMinimum": 0
},
"groupFontSize": {
"type": "number",
"description": "Architecture group-label font size.",
"exclusiveMinimum": 0
},
"groupFontWeight": {
"type": "number",
"description": "Architecture group-label font weight.",
"minimum": 1,
"maximum": 1000
},
"groupLetterSpacing": {
"type": "number",
"description": "Architecture group-label letter spacing."
},
"groupFont": {
"type": "string",
"description": "Architecture group-label font family.",
"x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
},
"groupTextTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Architecture group-label text transform."
},
"groupPaddingX": {
"type": "number",
"description": "Horizontal padding inside architecture groups.",
"minimum": 0
},
"groupPaddingY": {
"type": "number",
"description": "Vertical padding inside architecture groups.",
"minimum": 0
},
"groupLabelPaddingX": {
"type": "number",
"description": "Horizontal padding around architecture group labels.",
"minimum": 0
},
"groupCornerRadius": {
"type": "number",
"description": "Architecture group corner radius.",
"minimum": 0
},
"groupLineWidth": {
"type": "number",
"description": "Architecture group border width.",
"minimum": 0
},
"groupText": {
"type": "string",
"description": "Architecture group-label color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"serviceFontSize": {
"type": "number",
"description": "Architecture service-label font size.",
"exclusiveMinimum": 0
},
"serviceFontWeight": {
"type": "number",
"description": "Architecture service-label font weight.",
"minimum": 1,
"maximum": 1000
},
"serviceLetterSpacing": {
"type": "number",
"description": "Architecture service-label letter spacing."
},
"serviceTextTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Architecture service-label text transform."
},
"servicePaddingX": {
"type": "number",
"description": "Horizontal padding inside architecture services.",
"minimum": 0
},
"servicePaddingY": {
"type": "number",
"description": "Vertical padding inside architecture services.",
"minimum": 0
},
"serviceCornerRadius": {
"type": "number",
"description": "Architecture service corner radius.",
"minimum": 0
},
"serviceLineWidth": {
"type": "number",
"description": "Architecture service border width.",
"minimum": 0
},
"serviceText": {
"type": "string",
"description": "Architecture service-label color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"edgeFontSize": {
"type": "number",
"description": "Architecture connector-label font size.",
"exclusiveMinimum": 0
},
"edgeFontWeight": {
"type": "number",
"description": "Architecture connector-label font weight.",
"minimum": 1,
"maximum": 1000
},
"edgeLetterSpacing": {
"type": "number",
"description": "Architecture connector-label letter spacing."
},
"edgeTextTransform": {
"type": "string",
"enum": [
"uppercase",
"lowercase",
"capitalize"
],
"description": "Architecture connector-label text transform."
},
"edgeLineWidth": {
"type": "number",
"description": "Architecture connector width.",
"minimum": 0
},
"edgeBendRadius": {
"type": "number",
"description": "Architecture connector bend radius.",
"minimum": 0
},
"edgeStroke": {
"type": "string",
"description": "Architecture connector color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"edgeText": {
"type": "string",
"description": "Architecture connector-label color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"iconSize": {
"type": "number",
"description": "Architecture group icon size.",
"exclusiveMinimum": 0
},
"serviceIconSize": {
"type": "number",
"description": "Architecture service icon size.",
"exclusiveMinimum": 0
},
"junctionOuterRadius": {
"type": "number",
"description": "Architecture junction outer radius.",
"exclusiveMinimum": 0
},
"junctionInnerRadius": {
"type": "number",
"description": "Architecture junction inner radius.",
"minimum": 0
},
"groupSurface": {
"type": "string",
"description": "Architecture group surface color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"groupHeaderSurface": {
"type": "string",
"description": "Architecture group-header surface color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"groupBorder": {
"type": "string",
"description": "Architecture group border color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"serviceSurface": {
"type": "string",
"description": "Architecture service surface color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
},
"serviceBorder": {
"type": "string",
"description": "Architecture service border color.",
"x-agentic-mermaid-runtime-validator": "safeCssPaint"
}
},
"x-agentic-mermaid-runtime-validator": "architectureVisual"
}
},
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "this option configures graphical architecture rendering",
"x-agentic-mermaid-applicable-builtin-families": [
"architecture"
]
},
"timeline": {
"type": "object",
"description": "Timeline layout controls.",
"additionalProperties": false,
"properties": {
"maxWidth": {
"type": "number",
"description": "Best-effort width budget for horizontal timelines.",
"exclusiveMinimum": 0
}
},
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
"x-agentic-mermaid-applicable-builtin-families": [
"timeline"
]
},
"journey": {
"type": "object",
"description": "User-journey graphical controls.",
"additionalProperties": false,
"properties": {
"experienceCurve": {
"type": "boolean",
"description": "Connect journey score markers with an experience curve.",
"default": true
}
},
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "experience curves are graphical-only",
"x-agentic-mermaid-applicable-builtin-families": [
"journey"
]
},
"gantt": {
"type": "object",
"description": "Gantt dependency and critical-path overlays.",
"additionalProperties": false,
"properties": {
"dependencyArrows": {
"type": "boolean",
"description": "Draw scheduled dependency connectors.",
"default": false
},
"criticalPath": {
"type": "boolean",
"description": "Emphasize critical-path tasks and connectors.",
"default": false
}
},
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "graphical Gantt connector emphasis is not represented in cells",
"x-agentic-mermaid-applicable-builtin-families": [
"gantt"
]
},
"mermaidConfig": {
"type": "object",
"description": "Mermaid-style recursive runtime configuration.",
"additionalProperties": {
"$ref": "#/$defs/jsonValue"
},
"x-agentic-mermaid-terminal": "consumed"
},
"embedFontImport": {
"type": "boolean",
"description": "Embed the Google Fonts import in SVG styles; PNG forces this off for offline rasterization.",
"default": false,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal output embeds no web-font import"
},
"compact": {
"type": "boolean",
"description": "Compact SVG serialization while preserving agent hooks.",
"default": false,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "compact controls SVG serialization"
},
"idPrefix": {
"type": "string",
"description": "Non-empty namespace for generated SVG definition IDs and local references.",
"pattern": "^[A-Za-z0-9_.:-]+$",
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal output has no SVG definition ids"
},
"security": {
"type": "string",
"enum": [
"default",
"strict"
],
"description": "Active SVG content is rejected in every mode; strict additionally rejects every external reference. Raw Mermaid themeCSS is rejected in both modes.",
"default": "default",
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal text has its own control-character and HTML-color safety projection"
},
"ganttToday": {
"type": "string",
"description": "Explicit deterministic date for the Gantt today marker.",
"x-agentic-mermaid-terminal": "consumed",
"x-agentic-mermaid-applicable-builtin-families": [
"gantt"
]
},
"seed": {
"type": "number",
"description": "Deterministic re-roll seed for stochastic Styles.",
"default": 0,
"x-agentic-mermaid-terminal": "not-applicable",
"x-agentic-mermaid-terminal-note": "terminal glyph geometry is deterministic and has no stochastic ink"
}
},
"$defs": {
"jsonValue": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/jsonValue"
}
},
{
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/jsonValue"
}
}
],
"description": "A finite, acyclic JSON value without prototype keys.",
"x-agentic-mermaid-validation-expectation": "a finite, acyclic JSON value without prototype keys"
}
},
"description": "Shared advanced RenderOptions object. Styles accept a registered Look (crisp, hand-drawn, excalidraw, pen-and-ink, freehand, watercolor, blueprint, look:tufte, accessible-high-contrast, patent-drawing, status-dashboard, ops-schematic, chalkboard, risograph, architectural-plan, publication-figure), Palette (paper, dusk, zinc-light, zinc-dark, tokyo-night, tokyo-night-storm, tokyo-night-light, catppuccin-mocha, catppuccin-latte, nord, nord-light, dracula, github-light, github-dark, solarized-light, solarized-dark, one-dark, salmon, salmon-dark, tufte-dark), inline record, or left-to-right stack."
}
},
"required": [
"source"
],
"additionalProperties": false
}