{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"FlowZap Code Machine-Readable Specification","version":"1.0.0","canonicalUrl":"https://flowzap.xyz/flowzap-code.json","humanDocumentation":"https://flowzap.xyz/flowzap-code","guidelines":"https://flowzap.xyz/flowzap-code-guidelines.md","mcpDocumentation":"https://flowzap.xyz/docs/mcp","dataset":"https://huggingface.co/datasets/Jules-OC/flowzap-sequence-workflows/tree/main","sourceExamples":"https://github.com/flowzap-xyz/sequence-workflows","description":"FlowZap Code is a plain-text diagram-as-code DSL for workflow, sequence, and architecture diagrams. It is not Mermaid, PlantUML, BPMN, UML, or Graphviz.","syntax":{"lane":{"pattern":"identifier { # Display Name","description":"Defines a participant or swimlane. The display label must be on the same line as the opening brace.","example":"sales { # Sales Team"},"node":{"pattern":"nX: shape label:\"Text\"","description":"Defines a globally unique sequential node inside a lane.","example":"n1: circle label:\"Start\""},"edge":{"pattern":"nX.handle(direction) -> nY.handle(direction) [label=\"Text\"]","description":"Connects nodes with explicit handle directions. Edge labels use equals syntax.","example":"n1.handle(right) -> n2.handle(left) [label=\"Submit\"]"},"crossLaneEdge":{"pattern":"nX.handle(direction) -> otherLane.nY.handle(direction)","description":"Connects nodes across lanes using the target lane identifier.","example":"n2.handle(bottom) -> approval.n3.handle(top) [label=\"Review\"]"},"loop":{"pattern":"loop [condition] n1 n2 n3","description":"Describes repeating behavior over two or more nodes.","example":"loop [Retry until accepted] n2 n3"}},"constraints":{"characterSet":"UTF-8 plain text only; no emojis or non-printable characters.","nodeIds":"Use n1, n2, n3... globally unique, sequential IDs with no gaps.","shapes":["circle","rectangle","diamond","taskbox"],"attributes":["label","owner","description","system"],"directions":["left","right","top","bottom"],"nodeAttributeSyntax":"Use colon, for example label:\"Text\".","edgeLabelSyntax":"Use equals in brackets, for example [label=\"Text\"]."},"publicEndpoints":{"validate":"https://flowzap.xyz/api/validate","createPlayground":"https://flowzap.xyz/api/playground/create","mcp":"https://flowzap.xyz/mcp"},"examples":{"simpleWorkflow":"process { # Process\n  n1: circle label:\"Start\"\n  n2: rectangle label:\"Process Request\"\n  n3: diamond label:\"Approved?\"\n  n4: circle label:\"End\"\n  n1.handle(right) -> n2.handle(left)\n  n2.handle(right) -> n3.handle(left)\n  n3.handle(right) -> n4.handle(left) [label=\"Yes\"]\n}","twoLaneSequence":"client { # Client\n  n1: circle label:\"Request\"\n  n2: rectangle label:\"Wait for response\"\n  n1.handle(bottom) -> server.n3.handle(top) [label=\"Send request\"]\n}\nserver { # Server\n  n3: rectangle label:\"Process request\"\n  n4: rectangle label:\"Return response\"\n  n3.handle(right) -> n4.handle(left)\n  n4.handle(top) -> client.n2.handle(bottom) [label=\"Response\"]\n}"}}