Examples: ai-agent-system
Examples: ai-agent-system
Copy and paste, or save a file and hand it over. For a machine with no network, one “Everything” file is enough.
Everything in this panel, including the contents behind each URL, in one Markdown file — Large, so it goes as a file (copy is for 32 KB and under)
I need a "Architecture" diagram. It is published as text and vectors, so taking the published one and editing it beats redrawing it. ## What this diagram says Places a system's parts and the traffic between them on one canvas, grouped by boundary. ## When it fits - Explaining a system that already exists to someone new to it. - Making traffic that crosses a trust or network boundary visible. - Working through adding or removing a component on the drawing itself. ## When it does not - Explaining an interaction in time order — use Sequence. - When the hosting hierarchy is the subject — use Deployment / Network. ## What this kind validates - Carries system, network, trust, organization and runtime boundaries as meaning, and keeps them through a GUI edit. - Detects overlapping nodes, non-orthogonal routes, edges crossing a node, and edges crossing each other. - Accepts semantic add, remove and update of nodes and edges. How that compares to other kinds is answered by the operation list, not by this sentence. ## What it does not - Does not check that the drawn system exists. The diagram is a claim, not an observation. - Does not check that a connection points the right way. ## What you can take - https://design-vault.pages.dev/designs/diagram-architecture/samples/ai-agent-system/architecture.drawio - https://design-vault.pages.dev/designs/diagram-architecture/samples/ai-agent-system/architecture.png - https://design-vault.pages.dev/designs/diagram-architecture/samples/ai-agent-system/architecture.svg - https://design-vault.pages.dev/designs/diagram-architecture/samples/ai-agent-system/diagram-spec.json - https://design-vault.pages.dev/designs/diagram-architecture/samples/ai-agent-system/layout.json - https://design-vault.pages.dev/ai/assets/diagram-architecture.json ## What you can edit The published `.drawio` is uncompressed XML. Open it in draw.io and edit it, or diff it as text. Operations this kind accepts through the engine: addBoundary, addEdge, addNode, alignNodes, distributeNodes, moveBoundary, moveNode, removeBoundary, removeEdge, removeNode, resizeBoundary, resizeNode, updateBoundary, updateEdge, updateNode ## Writing a new one A `diagram-spec.json` can be written against the schema below. - https://design-vault.pages.dev/schemas/diagram-spec.schema.json - https://design-vault.pages.dev/schemas/layout.schema.json ## What cannot be done here **A spec you write cannot be validated here, and `layout.json` cannot be computed here.** The generator that does both is not published; what is published is the artifacts, the inputs and the schemas. Place the geometry yourself, or hand the spec to someone who has the engine. ## Licence The diagram and its inputs are CC BY 4.0 — carry the credit when you use them. > "Architecture" by zawa, licensed under CC BY 4.0. https://creativecommons.org/licenses/by/4.0/ The schemas are MIT.
/designs/diagram-architecture/samples/ai-agent-system/architecture.drawio
<?xml version="1.0" encoding="UTF-8"?> <mxfile host="app.diagrams.net" compressed="false"> <diagram id="ai-agent-system" name="Architecture" syncFormat="1.0" inputHash="b203fd0b72480c6cacf728b574ae6675e0a41874954984f5a9770b893be3a74e" generatorVersion="0.4.0"> <mxGraphModel dx="1200" dy="820" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="820" math="0" shadow="0"> <root> <mxCell id="0"/> <mxCell id="1" parent="0"/> <mxCell id="diagram-title" value="GPT-Live system architecture" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=23;fontStyle=1;fontColor=#292E35;spacing=0;align=left;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="32" y="22" width="720" height="42" as="geometry"/></mxCell> <mxCell id="legend-0-mark" value="" style="ellipse;html=1;aspect=fixed;fillColor=#FFFFFF;strokeColor=#343A42;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="32" y="85" width="10" height="10" as="geometry"/></mxCell> <mxCell id="legend-0-text" value="Real-time media path" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=13;fontStyle=0;fontColor=#292E35;spacing=0;align=left;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="49" y="77" width="170" height="28" as="geometry"/></mxCell> <mxCell id="legend-1-mark" value="" style="ellipse;html=1;aspect=fixed;fillColor=#FFFFFF;strokeColor=#59697D;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="254" y="85" width="10" height="10" as="geometry"/></mxCell> <mxCell id="legend-1-text" value="Async delegation path" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=13;fontStyle=0;fontColor=#292E35;spacing=0;align=left;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="271" y="77" width="176.24" height="28" as="geometry"/></mxCell> <object id="user-audio" label="" componentId="user-audio" componentType="edge" edgeType="realtime-stream" variant="realtime" direction="forward" protocol="WebRTC"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#343A42;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=1;exitY=0.35;exitDx=0;exitDy=0;exitPerimeter=1;entryX=0;entryY=0.35;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="user" target="media-frontend"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <mxCell id="user-audio--label" value="USER AUDIO" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=1;fontColor=#292E35;spacing=0;labelBackgroundColor=#FFFFFF;" vertex="1" parent="1" syncRole="edge-label" ownerId="user-audio"><mxGeometry x="332.42" y="185" width="85.16" height="22" as="geometry"/></mxCell> <object id="assistant-audio" label="" componentId="assistant-audio" componentType="edge" edgeType="realtime-stream" variant="realtime" direction="forward" protocol="WebRTC"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#343A42;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=0;exitY=0.68;exitDx=0;exitDy=0;exitPerimeter=1;entryX=1;entryY=0.68;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="media-frontend" target="user"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <mxCell id="assistant-audio--label" value="ASSISTANT AUDIO" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=1;fontColor=#292E35;spacing=0;labelBackgroundColor=#FFFFFF;" vertex="1" parent="1" syncRole="edge-label" ownerId="assistant-audio"><mxGeometry x="313.82" y="264" width="122.36" height="22" as="geometry"/></mxCell> <object id="media-to-live" label="" componentId="media-to-live" componentType="edge" edgeType="realtime-stream" variant="realtime" direction="forward" protocol="WebRTC"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#343A42;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=1;exitY=0.35;exitDx=0;exitDy=0;exitPerimeter=1;entryX=0;entryY=0.35;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="media-frontend" target="live-model"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <object id="live-to-media" label="" componentId="live-to-media" componentType="edge" edgeType="realtime-stream" variant="realtime" direction="forward" protocol="WebRTC"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#343A42;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=0;exitY=0.68;exitDx=0;exitDy=0;exitPerimeter=1;entryX=1;entryY=0.68;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="live-model" target="media-frontend"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <object id="delegation-request" label="" componentId="delegation-request" componentType="edge" edgeType="async-request" variant="delegated" direction="forward"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#59697D;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=0.25;exitY=1;exitDx=0;exitDy=0;exitPerimeter=1;entryX=0.08;entryY=0;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="media-frontend" target="application-server"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="552.5" y="390"/><mxPoint x="71.8" y="390"/></Array></mxGeometry></mxCell></object> <mxCell id="delegation-request--label" value="DELEGATION REQUEST" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=1;fontColor=#292E35;spacing=0;labelBackgroundColor=#FFFFFF;" vertex="1" parent="1" syncRole="edge-label" ownerId="delegation-request"><mxGeometry x="257.66" y="357" width="144.68" height="22" as="geometry"/></mxCell> <object id="guidance-to-frontend" label="" componentId="guidance-to-frontend" componentType="edge" edgeType="async-request" variant="delegated" direction="forward"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#59697D;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=0.25;exitY=0;exitDx=0;exitDy=0;exitPerimeter=1;entryX=0.75;entryY=1;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="reasoning-model" target="media-frontend"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="547.5" y="495"/><mxPoint x="647.5" y="495"/></Array></mxGeometry></mxCell></object> <mxCell id="guidance-to-frontend--label" value="RESULTS / GUIDANCE" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=1;fontColor=#292E35;spacing=0;labelBackgroundColor=#FFFFFF;" vertex="1" parent="1" syncRole="edge-label" ownerId="guidance-to-frontend"><mxGeometry x="414.28" y="504" width="141.44" height="22" as="geometry"/></mxCell> <object id="app-request" label="" componentId="app-request" componentType="edge" edgeType="async-request" variant="delegated" direction="forward"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#59697D;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=1;exitY=0.34;exitDx=0;exitDy=0;exitPerimeter=1;entryX=0;entryY=0.34;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="application-server" target="reasoning-model"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <mxCell id="app-request--label" value="REQUEST" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=1;fontColor=#292E35;spacing=0;labelBackgroundColor=#FFFFFF;" vertex="1" parent="1" syncRole="edge-label" ownerId="app-request"><mxGeometry x="346.96" y="601" width="66.08" height="22" as="geometry"/></mxCell> <object id="model-result" label="" componentId="model-result" componentType="edge" edgeType="async-request" variant="delegated" direction="forward"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#59697D;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=0;exitY=0.72;exitDx=0;exitDy=0;exitPerimeter=1;entryX=1;entryY=0.72;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="reasoning-model" target="application-server"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <mxCell id="model-result--label" value="RESULTS / GUIDANCE" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=1;fontColor=#292E35;spacing=0;labelBackgroundColor=#FFFFFF;" vertex="1" parent="1" syncRole="edge-label" ownerId="model-result"><mxGeometry x="309.28" y="694" width="141.44" height="22" as="geometry"/></mxCell> <object id="model-to-tools" label="" componentId="model-to-tools" componentType="edge" edgeType="async-request" variant="delegated" direction="forward"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#59697D;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=1;exitY=0.34;exitDx=0;exitDy=0;exitPerimeter=1;entryX=0;entryY=0.355;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="reasoning-model" target="tools"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <object id="tools-to-model" label="" componentId="tools-to-model" componentType="edge" edgeType="async-request" variant="delegated" direction="forward"><mxCell style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#59697D;strokeWidth=1.6;endArrow=open;endFill=0;endSize=8;startArrow=none;exitX=0;exitY=0.638;exitDx=0;exitDy=0;exitPerimeter=1;entryX=1;entryY=0.72;entryDx=0;entryDy=0;entryPerimeter=1;" edge="1" parent="1" source="tools" target="reasoning-model"><mxGeometry relative="1" as="geometry"></mxGeometry></mxCell></object> <object id="user" label="" componentId="user" componentType="actor" variant="realtime" status="stable" icon="user"><mxCell style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#343A42;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="55" y="165" width="190" height="135" as="geometry"/></mxCell></object> <mxCell id="user--icon" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23292E35%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%227.5%22%20r%3D%223.5%22%2F%3E%3Cpath%20d%3D%22M5%2021a7%207%200%200%201%2014%200%22%2F%3E%3C%2Fsvg%3E;" vertex="1" parent="user" syncRole="icon"><mxGeometry x="82.5" y="17.5" width="25" height="25" as="geometry"/></mxCell> <mxCell id="user--title" value="USER" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=15;fontStyle=1;fontColor=#292E35;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="user" syncRole="title" ownerId="user"><mxGeometry x="8" y="53" width="174" height="24" as="geometry"/></mxCell> <object id="media-frontend" label="" componentId="media-frontend" componentType="frontend" variant="realtime" status="stable" icon="monitor"><mxCell style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#343A42;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="505" y="165" width="190" height="135" as="geometry"/></mxCell></object> <mxCell id="media-frontend--icon" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23292E35%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2213%22%20rx%3D%221.5%22%2F%3E%3Cpath%20d%3D%22M8%2021h8M12%2017v4%22%2F%3E%3C%2Fsvg%3E;" vertex="1" parent="media-frontend" syncRole="icon"><mxGeometry x="82.5" y="17.5" width="25" height="25" as="geometry"/></mxCell> <mxCell id="media-frontend--title" value="MEDIA<br>FRONTEND" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=15;fontStyle=1;fontColor=#292E35;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="media-frontend" syncRole="title" ownerId="media-frontend"><mxGeometry x="8" y="51" width="174" height="41" as="geometry"/></mxCell> <object id="live-model" label="" componentId="live-model" componentType="model" variant="realtime" status="stable" icon="waveform"><mxCell style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#343A42;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="955" y="165" width="190" height="135" as="geometry"/></mxCell></object> <mxCell id="live-model--icon" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23292E35%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2013v-2M8%2016V8M12%2019V5M16%2016V8M20%2013v-2%22%2F%3E%3C%2Fsvg%3E;" vertex="1" parent="live-model" syncRole="icon"><mxGeometry x="82.5" y="17.5" width="25" height="25" as="geometry"/></mxCell> <mxCell id="live-model--title" value="GPT-LIVE-1<br>MODEL INSTANCE" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=15;fontStyle=1;fontColor=#292E35;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="live-model" syncRole="title" ownerId="live-model"><mxGeometry x="8" y="51" width="174" height="41" as="geometry"/></mxCell> <mxCell id="live-model--subtitle" value="Voice model" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=0;fontColor=#58616C;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="live-model" syncRole="subtitle" ownerId="live-model"><mxGeometry x="8" y="99" width="174" height="24" as="geometry"/></mxCell> <object id="application-server" label="" componentId="application-server" componentType="backend" variant="delegated" status="stable" icon="database"><mxCell style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#EDF3FF;strokeColor=#59697D;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="55" y="585" width="210" height="145" as="geometry"/></mxCell></object> <mxCell id="application-server--icon" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23292E35%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cellipse%20cx%3D%2212%22%20cy%3D%225%22%20rx%3D%228%22%20ry%3D%223%22%2F%3E%3Cpath%20d%3D%22M4%205v6c0%201.7%203.6%203%208%203s8-1.3%208-3V5M4%2011v6c0%201.7%203.6%203%208%203s8-1.3%208-3v-6%22%2F%3E%3C%2Fsvg%3E;" vertex="1" parent="application-server" syncRole="icon"><mxGeometry x="92.5" y="17.5" width="25" height="25" as="geometry"/></mxCell> <mxCell id="application-server--title" value="APPLICATION<br>SERVER" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=15;fontStyle=1;fontColor=#292E35;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="application-server" syncRole="title" ownerId="application-server"><mxGeometry x="8" y="51" width="194" height="41" as="geometry"/></mxCell> <mxCell id="application-server--subtitle" value="Delegation and business logic" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=0;fontColor=#58616C;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="application-server" syncRole="subtitle" ownerId="application-server"><mxGeometry x="8" y="109" width="194" height="24" as="geometry"/></mxCell> <object id="reasoning-model" label="" componentId="reasoning-model" componentType="model" variant="delegated" status="stable" icon="spark"><mxCell style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#EDF3FF;strokeColor=#59697D;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="495" y="585" width="210" height="145" as="geometry"/></mxCell></object> <mxCell id="reasoning-model--icon" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23292E35%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203l1.8%205.2L19%2010l-5.2%201.8L12%2017l-1.8-5.2L5%2010l5.2-1.8L12%203z%22%2F%3E%3Cpath%20d%3D%22M19%2016l.8%202.2L22%2019l-2.2.8L19%2022l-.8-2.2L16%2019l2.2-.8L19%2016z%22%2F%3E%3C%2Fsvg%3E;" vertex="1" parent="reasoning-model" syncRole="icon"><mxGeometry x="92.5" y="17.5" width="25" height="25" as="geometry"/></mxCell> <mxCell id="reasoning-model--title" value="REASONING<br>MODEL INSTANCE" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=15;fontStyle=1;fontColor=#292E35;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="reasoning-model" syncRole="title" ownerId="reasoning-model"><mxGeometry x="8" y="51" width="194" height="41" as="geometry"/></mxCell> <mxCell id="reasoning-model--subtitle" value="Text model" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=12;fontStyle=0;fontColor=#58616C;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="reasoning-model" syncRole="subtitle" ownerId="reasoning-model"><mxGeometry x="8" y="109" width="194" height="24" as="geometry"/></mxCell> <object id="tools" label="" componentId="tools" componentType="tool" variant="delegated" status="stable" icon="tools"><mxCell style="rounded=1;arcSize=4;whiteSpace=wrap;html=1;fillColor=#EDF3FF;strokeColor=#59697D;strokeWidth=1.6;" vertex="1" parent="1"><mxGeometry x="955" y="565" width="190" height="195" as="geometry"/></mxCell></object> <mxCell id="tools--icon" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23292E35%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14.7%206.3a4%204%200%200%200-5%205L4%2017l3%203%205.7-5.7a4%204%200%200%200%205-5l-2.4%202.4-3-3%202.4-2.4z%22%2F%3E%3C%2Fsvg%3E;" vertex="1" parent="tools" syncRole="icon"><mxGeometry x="82.5" y="12.5" width="25" height="25" as="geometry"/></mxCell> <mxCell id="tools--title" value="TOOLS" style="text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;rounded=0;fontFamily=Meiryo UI;fontSize=15;fontStyle=1;fontColor=#292E35;spacing=0;align=center;verticalAlign=middle;" vertex="1" parent="tools" syncRole="title" ownerId="tools"><mxGeometry x="8" y="39" width="174" height="24" as="geometry"/></mxCell> <mxCell id="tools--control-1" value="Search" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#59697D;strokeWidth=1.2;fontFamily=Meiryo UI;fontSize=12;fontColor=#292E35;align=center;verticalAlign=middle;" vertex="1" parent="tools" syncRole="control" controlIndex="0"><mxGeometry x="14" y="70" width="162" height="31" as="geometry"/></mxCell> <mxCell id="tools--control-2" value="Code" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#59697D;strokeWidth=1.2;fontFamily=Meiryo UI;fontSize=12;fontColor=#292E35;align=center;verticalAlign=middle;" vertex="1" parent="tools" syncRole="control" controlIndex="1"><mxGeometry x="14" y="111" width="162" height="31" as="geometry"/></mxCell> <mxCell id="tools--control-3" value="Retrieval" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#59697D;strokeWidth=1.2;fontFamily=Meiryo UI;fontSize=12;fontColor=#292E35;align=center;verticalAlign=middle;" vertex="1" parent="tools" syncRole="control" controlIndex="2"><mxGeometry x="14" y="152" width="162" height="31" as="geometry"/></mxCell> </root> </mxGraphModel> </diagram> </mxfile>
/designs/diagram-architecture/samples/ai-agent-system/diagram-spec.json
{
"$schema": "../../../../schemas/diagram-spec.schema.json",
"schemaVersion": "1.0",
"id": "ai-agent-system",
"title": "GPT-Live system architecture",
"description": "Reference-style architecture diagram for a realtime media path and delegated reasoning path.",
"language": "en",
"legend": [
{
"label": "Real-time media path",
"variant": "realtime"
},
{
"label": "Async delegation path",
"variant": "delegated"
}
],
"nodes": [
{
"id": "user",
"type": "actor",
"variant": "realtime",
"status": "stable",
"title": "USER",
"icon": "user"
},
{
"id": "media-frontend",
"type": "frontend",
"variant": "realtime",
"status": "stable",
"title": "MEDIA\nFRONTEND",
"icon": "monitor"
},
{
"id": "live-model",
"type": "model",
"variant": "realtime",
"status": "stable",
"title": "GPT-LIVE-1\nMODEL INSTANCE",
"subtitle": "Voice model",
"icon": "waveform"
},
{
"id": "application-server",
"type": "backend",
"variant": "delegated",
"status": "stable",
"title": "APPLICATION\nSERVER",
"subtitle": "Delegation and business logic",
"icon": "database"
},
{
"id": "reasoning-model",
"type": "model",
"variant": "delegated",
"status": "stable",
"title": "REASONING\nMODEL INSTANCE",
"subtitle": "Text model",
"icon": "spark"
},
{
"id": "tools",
"type": "tool",
"variant": "delegated",
"status": "stable",
"title": "TOOLS",
"icon": "tools",
"controls": [
"Search",
"Code",
"Retrieval"
]
}
],
"edges": [
{
"id": "user-audio",
"from": "user",
"to": "media-frontend",
"type": "realtime-stream",
"variant": "realtime",
"label": "USER AUDIO",
"direction": "forward",
"protocol": "WebRTC"
},
{
"id": "assistant-audio",
"from": "media-frontend",
"to": "user",
"type": "realtime-stream",
"variant": "realtime",
"label": "ASSISTANT AUDIO",
"direction": "forward",
"protocol": "WebRTC"
},
{
"id": "media-to-live",
"from": "media-frontend",
"to": "live-model",
"type": "realtime-stream",
"variant": "realtime",
"direction": "forward",
"protocol": "WebRTC"
},
{
"id": "live-to-media",
"from": "live-model",
"to": "media-frontend",
"type": "realtime-stream",
"variant": "realtime",
"direction": "forward",
"protocol": "WebRTC"
},
{
"id": "delegation-request",
"from": "media-frontend",
"to": "application-server",
"type": "async-request",
"variant": "delegated",
"label": "DELEGATION REQUEST",
"direction": "forward"
},
{
"id": "guidance-to-frontend",
"from": "reasoning-model",
"to": "media-frontend",
"type": "async-request",
"variant": "delegated",
"label": "RESULTS / GUIDANCE",
"direction": "forward"
},
{
"id": "app-request",
"from": "application-server",
"to": "reasoning-model",
"type": "async-request",
"variant": "delegated",
"label": "REQUEST",
"direction": "forward"
},
{
"id": "model-result",
"from": "reasoning-model",
"to": "application-server",
"type": "async-request",
"variant": "delegated",
"label": "RESULTS / GUIDANCE",
"direction": "forward"
},
{
"id": "model-to-tools",
"from": "reasoning-model",
"to": "tools",
"type": "async-request",
"variant": "delegated",
"direction": "forward"
},
{
"id": "tools-to-model",
"from": "tools",
"to": "reasoning-model",
"type": "async-request",
"variant": "delegated",
"direction": "forward"
}
]
}
/designs/diagram-architecture/samples/ai-agent-system/layout.json
{
"$schema": "../../../../schemas/layout.schema.json",
"schemaVersion": "1.0",
"canvas": {
"width": 1200,
"height": 820
},
"nodes": {
"user": {
"x": 55,
"y": 165,
"width": 190,
"height": 135
},
"media-frontend": {
"x": 505,
"y": 165,
"width": 190,
"height": 135
},
"live-model": {
"x": 955,
"y": 165,
"width": 190,
"height": 135
},
"application-server": {
"x": 55,
"y": 585,
"width": 210,
"height": 145
},
"reasoning-model": {
"x": 495,
"y": 585,
"width": 210,
"height": 145
},
"tools": {
"x": 955,
"y": 565,
"width": 190,
"height": 195
}
},
"edges": {
"user-audio": {
"source": {
"side": "right",
"offset": 0.35
},
"target": {
"side": "left",
"offset": 0.35
},
"label": {
"x": 375,
"y": 196
}
},
"assistant-audio": {
"source": {
"side": "left",
"offset": 0.68
},
"target": {
"side": "right",
"offset": 0.68
},
"label": {
"x": 375,
"y": 275
}
},
"media-to-live": {
"source": {
"side": "right",
"offset": 0.35
},
"target": {
"side": "left",
"offset": 0.35
}
},
"live-to-media": {
"source": {
"side": "left",
"offset": 0.68
},
"target": {
"side": "right",
"offset": 0.68
}
},
"delegation-request": {
"source": {
"side": "bottom",
"offset": 0.25
},
"target": {
"side": "top",
"offset": 0.08
},
"waypoints": [
{
"x": 552.5,
"y": 390
},
{
"x": 71.8,
"y": 390
}
],
"label": {
"x": 330,
"y": 368
}
},
"guidance-to-frontend": {
"source": {
"side": "top",
"offset": 0.25
},
"target": {
"side": "bottom",
"offset": 0.75
},
"waypoints": [
{
"x": 547.5,
"y": 495
},
{
"x": 647.5,
"y": 495
}
],
"label": {
"x": 485,
"y": 515
}
},
"app-request": {
"source": {
"side": "right",
"offset": 0.34
},
"target": {
"side": "left",
"offset": 0.34
},
"label": {
"x": 380,
"y": 612
}
},
"model-result": {
"source": {
"side": "left",
"offset": 0.72
},
"target": {
"side": "right",
"offset": 0.72
},
"label": {
"x": 380,
"y": 705
}
},
"model-to-tools": {
"source": {
"side": "right",
"offset": 0.34
},
"target": {
"side": "left",
"offset": 0.355
}
},
"tools-to-model": {
"source": {
"side": "left",
"offset": 0.638
},
"target": {
"side": "right",
"offset": 0.72
}
}
}
}
/schemas/diagram-spec.schema.json — Large, so it goes as a file (copy is for 32 KB and under)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.local/schemas/diagram-spec.schema.json",
"title": "Editorial diagram semantic specification",
"oneOf": [
{ "$ref": "#/$defs/legacyArchitectureSpec" },
{ "$ref": "#/$defs/architectureSpec" },
{ "$ref": "#/$defs/c4SystemContextSpec" },
{ "$ref": "#/$defs/c4ContainerSpec" },
{ "$ref": "#/$defs/dataFlowSpec" },
{ "$ref": "#/$defs/deploymentSpec" },
{ "$ref": "#/$defs/bpmnLiteSpec" },
{ "$ref": "#/$defs/sequenceSpec" },
{ "$ref": "#/$defs/erSpec" },
{ "$ref": "#/$defs/stateSpec" },
{ "$ref": "#/$defs/decisionTreeSpec" },
{ "$ref": "#/$defs/timelineSpec" },
{ "$ref": "#/$defs/roadmapSpec" },
{ "$ref": "#/$defs/capabilityMapSpec" },
{ "$ref": "#/$defs/executiveViewSpec" }
],
"$defs": {
"baseSpec": {
"type": "object",
"required": ["schemaVersion", "id", "title", "language", "legend", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "type": "string" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"legend": {
"type": "array",
"maxItems": 8,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["label", "variant"],
"properties": {
"label": { "type": "string", "minLength": 1, "maxLength": 60 },
"variant": { "$ref": "#/$defs/variant" }
}
}
},
"boundaries": {
"type": "array",
"maxItems": 50,
"items": { "$ref": "#/$defs/boundary" }
},
"nodes": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/node" }
},
"edges": {
"type": "array",
"items": { "$ref": "#/$defs/edge" }
}
}
},
"legacyArchitectureSpec": {
"type": "object",
"allOf": [
{ "$ref": "#/$defs/baseSpec" },
{
"type": "object",
"properties": {
"schemaVersion": { "const": "1.0" }
}
}
],
"unevaluatedProperties": false
},
"architectureSpec": {
"type": "object",
"allOf": [
{ "$ref": "#/$defs/baseSpec" },
{
"type": "object",
"required": ["diagramKind"],
"properties": {
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "architecture" }
}
}
],
"unevaluatedProperties": false
},
"c4SystemContextSpec": {
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion", "diagramKind", "id", "title", "language", "scopeSystemId",
"scopeBoundaryId", "boundaries", "nodes", "edges"
],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "c4-system-context" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"scopeSystemId": { "$ref": "#/$defs/id" },
"scopeBoundaryId": { "$ref": "#/$defs/id" },
"boundaries": {
"type": "array",
"minItems": 1,
"maxItems": 8,
"items": { "$ref": "#/$defs/c4SystemBoundary" }
},
"nodes": {
"type": "array",
"minItems": 2,
"maxItems": 50,
"items": { "$ref": "#/$defs/c4Element" }
},
"edges": {
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": { "$ref": "#/$defs/c4Relationship" }
}
}
},
"c4SystemBoundary": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "system-boundary" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"c4Element": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["person", "software-system", "external-system"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"c4Relationship": {
"type": "object",
"additionalProperties": false,
"required": ["id", "from", "to", "type", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"type": { "const": "relationship" },
"description": { "type": "string", "minLength": 3, "maxLength": 160 },
"technology": { "type": "string", "minLength": 1, "maxLength": 64 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"c4ContainerSpec": {
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion", "diagramKind", "id", "title", "language", "contextDiagramId",
"scopeSystemId", "scopeBoundaryId", "boundaries", "nodes", "edges"
],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "c4-container" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"contextDiagramId": { "$ref": "#/$defs/id" },
"scopeSystemId": { "$ref": "#/$defs/id" },
"scopeBoundaryId": { "$ref": "#/$defs/id" },
"boundaries": {
"type": "array",
"minItems": 1,
"maxItems": 8,
"items": { "$ref": "#/$defs/c4SystemBoundary" }
},
"nodes": {
"type": "array",
"minItems": 1,
"maxItems": 80,
"items": { "$ref": "#/$defs/c4ContainerElement" }
},
"edges": {
"type": "array",
"minItems": 1,
"maxItems": 160,
"items": { "$ref": "#/$defs/c4Relationship" }
}
}
},
"c4ContainerElement": {
"oneOf": [
{ "$ref": "#/$defs/c4ContainerPrimary" },
{ "$ref": "#/$defs/c4ContainerSupportingElement" }
]
},
"c4ContainerPrimary": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "containerKind", "title", "description", "technology"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "container" },
"containerKind": { "enum": ["application", "data-store"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"technology": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"c4ContainerSupportingElement": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["person", "external-system"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"bpmnLiteSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "pool", "lanes", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "bpmn-lite" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"pool": { "$ref": "#/$defs/bpmnPool" },
"lanes": {
"type": "array",
"minItems": 2,
"maxItems": 16,
"items": { "$ref": "#/$defs/bpmnLane" }
},
"nodes": {
"type": "array",
"minItems": 4,
"maxItems": 160,
"items": { "$ref": "#/$defs/bpmnFlowNode" }
},
"edges": {
"type": "array",
"minItems": 3,
"maxItems": 320,
"items": { "$ref": "#/$defs/bpmnSequenceFlow" }
}
}
},
"bpmnPool": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "pool" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"bpmnLane": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "lane" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"bpmnFlowNode": {
"oneOf": [
{ "$ref": "#/$defs/bpmnSimpleFlowNode" },
{ "$ref": "#/$defs/bpmnGateway" }
]
},
"bpmnSimpleFlowNode": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "laneId"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["start-event", "end-event", "task"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"laneId": { "$ref": "#/$defs/id" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"bpmnGateway": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "laneId", "gatewayRole"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["exclusive-gateway", "parallel-gateway"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"laneId": { "$ref": "#/$defs/id" },
"gatewayRole": { "enum": ["split", "join"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"bpmnSequenceFlow": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "from", "to"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "sequence-flow" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"condition": { "type": "string", "minLength": 1, "maxLength": 160 },
"isDefault": { "type": "boolean" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"sequenceSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "nodes", "fragments", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "sequence" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"nodes": { "type": "array", "minItems": 2, "maxItems": 32, "items": { "$ref": "#/$defs/sequenceLifeline" } },
"fragments": { "type": "array", "maxItems": 24, "items": { "$ref": "#/$defs/sequenceFragment" } },
"edges": { "type": "array", "minItems": 1, "maxItems": 320, "items": { "$ref": "#/$defs/sequenceMessage" } }
}
},
"sequenceLifeline": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "occurrenceIds"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "lifeline" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"occurrenceIds": { "type": "array", "minItems": 1, "maxItems": 320, "uniqueItems": true, "items": { "$ref": "#/$defs/id" } },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"sequenceFragment": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "operator", "title", "operands"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "combined-fragment" },
"operator": { "enum": ["alt", "opt", "par"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"operands": { "type": "array", "minItems": 1, "maxItems": 8, "items": { "$ref": "#/$defs/sequenceOperand" } },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"sequenceOperand": {
"type": "object",
"additionalProperties": false,
"required": ["id", "occurrenceIds"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"guard": { "type": "string", "minLength": 1, "maxLength": 120 },
"occurrenceIds": { "type": "array", "minItems": 1, "maxItems": 160, "uniqueItems": true, "items": { "$ref": "#/$defs/id" } }
}
},
"sequenceMessage": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "from", "to", "title", "sendOccurrenceId", "receiveOccurrenceId"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["sync-message", "async-message", "return-message"] },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"sendOccurrenceId": { "$ref": "#/$defs/id" },
"receiveOccurrenceId": { "$ref": "#/$defs/id" },
"replyTo": { "$ref": "#/$defs/id" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"erSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "er" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"nodes": { "type": "array", "minItems": 2, "maxItems": 120, "items": { "$ref": "#/$defs/erEntity" } },
"edges": { "type": "array", "maxItems": 240, "items": { "$ref": "#/$defs/erForeignKey" } }
}
},
"erEntity": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "attributes", "primaryKey", "uniqueKeys"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "entity" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"attributes": { "type": "array", "minItems": 1, "maxItems": 80, "items": { "$ref": "#/$defs/erAttribute" } },
"primaryKey": { "$ref": "#/$defs/erKey" },
"uniqueKeys": { "type": "array", "maxItems": 24, "items": { "$ref": "#/$defs/erKey" } },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"erAttribute": {
"type": "object",
"additionalProperties": false,
"required": ["id", "name", "dataType", "nullable"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
"dataType": { "type": "string", "minLength": 1, "maxLength": 80 },
"nullable": { "type": "boolean" }
}
},
"erKey": {
"type": "object",
"additionalProperties": false,
"required": ["id", "attributeIds"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"attributeIds": { "type": "array", "maxItems": 16, "items": { "$ref": "#/$defs/id" } }
}
},
"erForeignKey": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "from", "to", "fromAttributeIds", "toAttributeIds", "fromCardinality", "toCardinality", "identifying"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "foreign-key" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"fromAttributeIds": { "type": "array", "maxItems": 16, "items": { "$ref": "#/$defs/id" } },
"toAttributeIds": { "type": "array", "maxItems": 16, "items": { "$ref": "#/$defs/id" } },
"fromCardinality": { "$ref": "#/$defs/erCardinality" },
"toCardinality": { "$ref": "#/$defs/erCardinality" },
"identifying": { "type": "boolean" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"erCardinality": { "enum": ["zero-or-one", "one", "zero-or-many", "one-or-many"] },
"stateSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "initialStateId", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "state" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"initialStateId": { "$ref": "#/$defs/id" },
"nodes": { "type": "array", "minItems": 2, "maxItems": 120, "items": { "$ref": "#/$defs/stateNode" } },
"edges": { "type": "array", "minItems": 1, "maxItems": 240, "items": { "$ref": "#/$defs/stateTransition" } }
}
},
"stateNode": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["state", "final-state"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"stateTransition": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "from", "to", "event"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "transition" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"event": { "type": "string", "minLength": 1, "maxLength": 120 },
"guard": { "type": "string", "minLength": 1, "maxLength": 160 },
"action": { "type": "string", "minLength": 1, "maxLength": 160 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"decisionTreeSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "rootNodeId", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "decision-tree" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"rootNodeId": { "$ref": "#/$defs/id" },
"nodes": { "type": "array", "minItems": 3, "maxItems": 160, "items": { "$ref": "#/$defs/decisionTreeNode" } },
"edges": { "type": "array", "minItems": 2, "maxItems": 320, "items": { "$ref": "#/$defs/decisionBranch" } }
}
},
"decisionTreeNode": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["decision", "outcome"] },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"decisionBranch": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "from", "to", "isDefault"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "branch" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"condition": { "type": "string", "minLength": 1, "maxLength": 160 },
"isDefault": { "type": "boolean" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"timelineSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "windowStart", "windowEnd", "workstreams", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "timeline" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"windowStart": { "$ref": "#/$defs/isoDate" },
"windowEnd": { "$ref": "#/$defs/isoDate" },
"workstreams": { "type": "array", "minItems": 1, "maxItems": 6, "items": { "$ref": "#/$defs/timelineWorkstream" } },
"nodes": { "type": "array", "minItems": 1, "maxItems": 40, "items": { "$ref": "#/$defs/timelineItem" } },
"edges": { "type": "array", "maxItems": 80, "items": { "$ref": "#/$defs/timelineDependency" } }
}
},
"timelineWorkstream": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "workstream" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"timelineItem": {
"oneOf": [
{ "$ref": "#/$defs/timelineTask" },
{ "$ref": "#/$defs/timelineMilestone" }
]
},
"timelineTask": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "workstreamId", "startDate", "endDate", "status"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "task" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"workstreamId": { "$ref": "#/$defs/id" },
"startDate": { "$ref": "#/$defs/isoDate" },
"endDate": { "$ref": "#/$defs/isoDate" },
"status": { "$ref": "#/$defs/timelineStatus" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"timelineMilestone": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "workstreamId", "date", "status"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "milestone" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"workstreamId": { "$ref": "#/$defs/id" },
"date": { "$ref": "#/$defs/isoDate" },
"status": { "$ref": "#/$defs/timelineStatus" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"timelineDependency": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "from", "to"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "finish-to-start" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"timelineStatus": { "enum": ["planned", "active", "blocked", "done"] },
"isoDate": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
"roadmapSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "vision", "horizons", "themes", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "roadmap" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"vision": { "type": "string", "minLength": 8, "maxLength": 180 },
"horizons": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "$ref": "#/$defs/roadmapHorizon" } },
"themes": { "type": "array", "minItems": 1, "maxItems": 5, "items": { "$ref": "#/$defs/roadmapTheme" } },
"nodes": { "type": "array", "minItems": 1, "maxItems": 24, "items": { "$ref": "#/$defs/roadmapInitiative" } },
"edges": { "type": "array", "maxItems": 0 }
}
},
"roadmapHorizon": {
"type": "object",
"additionalProperties": false,
"required": ["id", "kind", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"kind": { "enum": ["now", "next", "later"] },
"title": { "type": "string", "minLength": 1, "maxLength": 40 },
"description": { "type": "string", "minLength": 3, "maxLength": 120 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"roadmapTheme": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "theme" },
"title": { "type": "string", "minLength": 1, "maxLength": 60 },
"description": { "type": "string", "minLength": 3, "maxLength": 160 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"roadmapInitiative": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "outcome", "themeId", "horizonId", "status"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "initiative" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 200 },
"outcome": { "type": "string", "minLength": 8, "maxLength": 220 },
"themeId": { "$ref": "#/$defs/id" },
"horizonId": { "$ref": "#/$defs/id" },
"status": { "enum": ["exploring", "planned", "active", "delivered"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"capabilityMapSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "scope", "domains", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "capability-map" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"scope": { "type": "string", "minLength": 8, "maxLength": 220 },
"domains": { "type": "array", "minItems": 2, "maxItems": 6, "items": { "$ref": "#/$defs/capabilityDomain" } },
"nodes": { "type": "array", "minItems": 2, "maxItems": 30, "items": { "$ref": "#/$defs/capability" } },
"edges": { "type": "array", "maxItems": 0 }
}
},
"capabilityDomain": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "domain" },
"title": { "type": "string", "minLength": 1, "maxLength": 60 },
"description": { "type": "string", "minLength": 3, "maxLength": 160 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"capability": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "domainId", "strategicImportance"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "capability" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 200 },
"domainId": { "$ref": "#/$defs/id" },
"strategicImportance": { "enum": ["low", "medium", "high"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"executiveViewSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "asOfDate", "objective", "recommendation", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "executive-view" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"asOfDate": { "$ref": "#/$defs/isoDate" },
"objective": { "type": "string", "minLength": 8, "maxLength": 220 },
"recommendation": { "type": "string", "minLength": 8, "maxLength": 240 },
"nodes": { "type": "array", "minItems": 4, "maxItems": 13, "items": { "$ref": "#/$defs/executiveItem" } },
"edges": { "type": "array", "maxItems": 0 }
}
},
"executiveItem": {
"oneOf": [
{ "$ref": "#/$defs/executiveIndicator" },
{ "$ref": "#/$defs/executiveRisk" },
{ "$ref": "#/$defs/executiveDecision" }
]
},
"executiveIndicator": {
"type": "object", "additionalProperties": false,
"required": ["id", "type", "title", "description", "value", "target", "trend", "status"],
"properties": {
"id": { "$ref": "#/$defs/id" }, "type": { "const": "indicator" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 200 },
"value": { "type": "string", "minLength": 1, "maxLength": 60 },
"target": { "type": "string", "minLength": 1, "maxLength": 60 },
"trend": { "enum": ["improving", "steady", "declining"] },
"status": { "enum": ["on-track", "at-risk", "off-track"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"executiveRisk": {
"type": "object", "additionalProperties": false,
"required": ["id", "type", "title", "description", "impact", "response", "status"],
"properties": {
"id": { "$ref": "#/$defs/id" }, "type": { "const": "risk" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 200 },
"impact": { "enum": ["low", "medium", "high"] },
"response": { "type": "string", "minLength": 3, "maxLength": 220 },
"status": { "enum": ["open", "watch", "mitigated"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"executiveDecision": {
"type": "object", "additionalProperties": false,
"required": ["id", "type", "title", "description", "recommendation", "status"],
"properties": {
"id": { "$ref": "#/$defs/id" }, "type": { "const": "decision" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 200 },
"recommendation": { "type": "string", "minLength": 3, "maxLength": 220 },
"status": { "enum": ["open", "approved", "deferred"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"dataFlowSpec": {
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "diagramKind", "id", "title", "language", "boundaries", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "data-flow" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"boundaries": {
"type": "array",
"maxItems": 32,
"items": { "$ref": "#/$defs/dataFlowTrustBoundary" }
},
"nodes": {
"type": "array",
"minItems": 2,
"maxItems": 120,
"items": { "$ref": "#/$defs/dataFlowNode" }
},
"edges": {
"type": "array",
"minItems": 1,
"maxItems": 240,
"items": { "$ref": "#/$defs/dataFlowEdge" }
}
}
},
"dataFlowTrustBoundary": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "trustLevel"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "trust-boundary" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"trustLevel": { "enum": ["external", "controlled", "restricted"] },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"dataFlowNode": {
"oneOf": [
{ "$ref": "#/$defs/dataFlowSimpleNode" },
{ "$ref": "#/$defs/dataFlowProcess" },
{ "$ref": "#/$defs/dataFlowDataStore" }
]
},
"dataFlowSimpleNode": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["source", "sink", "external-system"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"dataFlowProcess": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "transformation"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "process" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"transformation": { "type": "string", "minLength": 3, "maxLength": 160 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"dataFlowDataStore": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "classification"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "data-store" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"classification": { "$ref": "#/$defs/dataClassification" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"dataFlowEdge": {
"type": "object",
"additionalProperties": false,
"required": ["id", "from", "to", "type", "dataName", "format", "frequency", "mode", "classification"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"type": { "const": "data-flow" },
"dataName": { "type": "string", "minLength": 1, "maxLength": 100 },
"format": { "type": "string", "minLength": 1, "maxLength": 80 },
"frequency": { "type": "string", "minLength": 1, "maxLength": 80 },
"mode": { "enum": ["batch", "streaming", "request-response"] },
"classification": { "$ref": "#/$defs/dataClassification" },
"trustBoundaryIds": {
"type": "array",
"maxItems": 32,
"uniqueItems": true,
"items": { "$ref": "#/$defs/id" }
},
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"dataClassification": { "enum": ["public", "internal", "confidential", "restricted"] },
"deploymentSpec": {
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion", "diagramKind", "id", "title", "language", "environment",
"entryNodeIds", "boundaries", "nodes", "edges"
],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "2.0" },
"diagramKind": { "const": "deployment" },
"id": { "$ref": "#/$defs/id" },
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
"description": { "type": "string", "maxLength": 500 },
"language": { "enum": ["en", "ja", "mixed"] },
"metadata": { "$ref": "#/$defs/metadata" },
"environment": { "type": "string", "minLength": 1, "maxLength": 80 },
"entryNodeIds": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"uniqueItems": true,
"items": { "$ref": "#/$defs/id" }
},
"boundaries": {
"type": "array",
"minItems": 4,
"maxItems": 64,
"items": { "$ref": "#/$defs/deploymentBoundary" }
},
"nodes": {
"type": "array",
"minItems": 2,
"maxItems": 160,
"items": { "$ref": "#/$defs/deploymentNode" }
},
"edges": {
"type": "array",
"minItems": 1,
"maxItems": 320,
"items": { "$ref": "#/$defs/deploymentCommunication" }
}
}
},
"deploymentBoundary": {
"oneOf": [
{ "$ref": "#/$defs/deploymentCloudProvider" },
{ "$ref": "#/$defs/deploymentRegion" },
{ "$ref": "#/$defs/deploymentNetworkBoundary" }
]
},
"deploymentCloudProvider": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "cloud-provider" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"deploymentRegion": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "parentId"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "region" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"parentId": { "$ref": "#/$defs/id" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"deploymentNetworkBoundary": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "parentId", "exposure"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["network", "subnet"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"parentId": { "$ref": "#/$defs/id" },
"exposure": { "$ref": "#/$defs/networkExposure" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"deploymentNode": {
"oneOf": [
{ "$ref": "#/$defs/deploymentExternalSystem" },
{ "$ref": "#/$defs/deploymentManagedNode" }
]
},
"deploymentExternalSystem": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "technology", "exposure"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "const": "external-system" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"technology": { "type": "string", "minLength": 1, "maxLength": 100 },
"exposure": { "const": "public" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"deploymentManagedNode": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "title", "description", "technology", "exposure", "boundaryId"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["gateway", "load-balancer", "firewall", "host", "service", "database"] },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"description": { "type": "string", "minLength": 3, "maxLength": 240 },
"technology": { "type": "string", "minLength": 1, "maxLength": 100 },
"exposure": { "$ref": "#/$defs/networkExposure" },
"boundaryId": { "$ref": "#/$defs/id" },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"deploymentCommunication": {
"type": "object",
"additionalProperties": false,
"required": ["id", "from", "to", "type", "description", "protocol", "port"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"type": { "const": "communication" },
"description": { "type": "string", "minLength": 3, "maxLength": 160 },
"protocol": { "type": "string", "minLength": 1, "maxLength": 40 },
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
"boundaryIds": {
"type": "array",
"maxItems": 64,
"uniqueItems": true,
"items": { "$ref": "#/$defs/id" }
},
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"networkExposure": { "enum": ["public", "private", "restricted"] },
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,63}$" },
"variant": { "enum": ["realtime", "delegated", "external", "warning", "critical"] },
"status": { "enum": ["planned", "experimental", "beta", "stable", "deprecated", "retired"] },
"metadata": {
"type": "object",
"additionalProperties": { "type": "string", "maxLength": 200 }
},
"boundary": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "variant", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": { "enum": ["system", "network", "trust", "organization", "runtime"] },
"variant": { "$ref": "#/$defs/variant" },
"title": { "type": "string", "minLength": 1, "maxLength": 80 },
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"node": {
"type": "object",
"additionalProperties": false,
"required": ["id", "type", "variant", "status", "title"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"type": {
"enum": [
"actor", "client", "frontend", "backend", "api", "service", "model", "agent",
"tool", "database", "cache", "queue", "event-bus", "storage", "batch-job",
"external-service", "observability", "security", "network", "note"
]
},
"variant": { "$ref": "#/$defs/variant" },
"status": { "$ref": "#/$defs/status" },
"title": { "type": "string", "minLength": 1, "maxLength": 60 },
"subtitle": { "type": "string", "maxLength": 100 },
"icon": { "$ref": "#/$defs/id" },
"controls": {
"type": "array",
"maxItems": 8,
"items": { "type": "string", "minLength": 1, "maxLength": 32 }
},
"metadata": { "$ref": "#/$defs/metadata" }
}
},
"edge": {
"type": "object",
"additionalProperties": false,
"required": ["id", "from", "to", "type", "variant", "direction"],
"properties": {
"id": { "$ref": "#/$defs/id" },
"from": { "$ref": "#/$defs/id" },
"to": { "$ref": "#/$defs/id" },
"type": {
"enum": [
"sync-request", "async-request", "realtime-stream", "event", "batch", "data-read",
"data-write", "control", "monitoring", "authentication"
]
},
"variant": { "$ref": "#/$defs/variant" },
"label": { "type": "string", "maxLength": 80 },
"direction": { "enum": ["forward", "bidirectional"] },
"protocol": { "type": "string", "maxLength": 32 },
"metadata": { "$ref": "#/$defs/metadata" }
}
}
}
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.local/schemas/layout.schema.json",
"title": "Architecture diagram layout",
"type": "object",
"additionalProperties": false,
"required": ["schemaVersion", "canvas", "nodes", "edges"],
"properties": {
"$schema": { "type": "string" },
"schemaVersion": { "const": "1.0" },
"canvas": {
"type": "object",
"additionalProperties": false,
"required": ["width", "height"],
"properties": {
"width": { "type": "integer", "minimum": 320, "maximum": 10000 },
"height": { "type": "integer", "minimum": 240, "maximum": 10000 }
}
},
"boundaries": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/boundaryGeometry" }
},
"nodes": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/nodeGeometry" }
},
"edges": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/edgeGeometry" }
}
},
"$defs": {
"point": {
"type": "object",
"additionalProperties": false,
"required": ["x", "y"],
"properties": {
"x": { "type": "number", "minimum": 0, "maximum": 10000 },
"y": { "type": "number", "minimum": 0, "maximum": 10000 }
}
},
"port": {
"type": "object",
"additionalProperties": false,
"required": ["side", "offset"],
"properties": {
"side": { "enum": ["top", "right", "bottom", "left"] },
"offset": { "type": "number", "minimum": 0, "maximum": 1 }
}
},
"nodeGeometry": {
"type": "object",
"additionalProperties": false,
"required": ["x", "y", "width", "height"],
"properties": {
"x": { "type": "number", "minimum": 0, "maximum": 10000 },
"y": { "type": "number", "minimum": 0, "maximum": 10000 },
"width": { "type": "number", "minimum": 40, "maximum": 3000 },
"height": { "type": "number", "minimum": 30, "maximum": 3000 }
}
},
"boundaryGeometry": {
"type": "object",
"additionalProperties": false,
"required": ["x", "y", "width", "height"],
"properties": {
"x": { "type": "number", "minimum": 0, "maximum": 10000 },
"y": { "type": "number", "minimum": 0, "maximum": 10000 },
"width": { "type": "number", "minimum": 120, "maximum": 10000 },
"height": { "type": "number", "minimum": 80, "maximum": 10000 }
}
},
"edgeGeometry": {
"type": "object",
"additionalProperties": false,
"required": ["source", "target"],
"properties": {
"source": { "$ref": "#/$defs/port" },
"target": { "$ref": "#/$defs/port" },
"waypoints": {
"type": "array",
"maxItems": 20,
"items": { "$ref": "#/$defs/point" }
},
"label": { "$ref": "#/$defs/point" }
}
}
}
}