@diagrammo/dgmo 0.60.0 → 0.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.d.ts +382 -396
  3. package/dist/advanced.js +217 -105
  4. package/dist/auto.js +142 -141
  5. package/dist/block.js +51 -106
  6. package/dist/{calculator-ORAKSL5D.js → calculator-M326KQFW.js} +3 -3
  7. package/dist/{chart-meta-C6UaqhTP.d.ts → chart-meta-D98NbYDp.d.ts} +9 -3
  8. package/dist/chart-meta.d.ts +2 -2
  9. package/dist/chart-meta.js +44 -46
  10. package/dist/{charts-d3-FSNSASP7.js → charts-d3-3WMDA5Z5.js} +6 -6
  11. package/dist/{chunk-ON4MEUC4.js → chunk-23RWHHI5.js} +11 -2
  12. package/dist/{chunk-SLGHGT76.js → chunk-2CMM36O7.js} +2 -2
  13. package/dist/{chunk-XVOGT46C.js → chunk-2PTK46E2.js} +2 -2
  14. package/dist/{chunk-DXSRQLD4.js → chunk-37EHGTQ2.js} +2205 -2019
  15. package/dist/{chunk-4IFPX4J6.js → chunk-3A2HZBFD.js} +2 -2
  16. package/dist/{chunk-OJD4FU6H.js → chunk-3A7KMF33.js} +2 -2
  17. package/dist/{chunk-DKCEG3N6.js → chunk-3HYRJAXO.js} +4 -4
  18. package/dist/{chunk-V5OBLPLA.js → chunk-3OLO2MZ6.js} +4 -4
  19. package/dist/{chunk-P3343TTF.js → chunk-3PVUGECM.js} +95 -117
  20. package/dist/{chunk-Y5KXCKI5.js → chunk-4BEAHH6G.js} +5 -5
  21. package/dist/{chunk-ZPUVAJTW.js → chunk-4C3BTTOL.js} +4 -4
  22. package/dist/{chunk-EKKS325Q.js → chunk-4GQ6I46C.js} +2 -2
  23. package/dist/{chunk-4B5YISOR.js → chunk-536EBUPG.js} +16 -1
  24. package/dist/{chunk-DKG2ADEN.js → chunk-63WPPHOM.js} +2 -2
  25. package/dist/{chunk-I53E3L5M.js → chunk-65QX6LYT.js} +3 -3
  26. package/dist/{chunk-243KZTTS.js → chunk-6BVIZW5N.js} +7 -7
  27. package/dist/{chunk-6RR4XUOB.js → chunk-7BJQUII6.js} +6 -6
  28. package/dist/{chunk-X5CJAFZF.js → chunk-7FTGNJQ2.js} +3 -3
  29. package/dist/{chunk-PTYUSRGT.js → chunk-7QCYHZVO.js} +5 -5
  30. package/dist/{chunk-ZU2EXJEL.js → chunk-A34FVVVI.js} +2 -2
  31. package/dist/{chunk-BGBGWFUI.js → chunk-A5FNLWKP.js} +3 -3
  32. package/dist/{chunk-BG23Y7JD.js → chunk-AFCVHK3G.js} +3 -3
  33. package/dist/{chunk-QMKFLQL4.js → chunk-AKD3YZ54.js} +3 -3
  34. package/dist/{chunk-BVPRRSMX.js → chunk-B25BEH3F.js} +3 -3
  35. package/dist/{chunk-GCZQAT4Z.js → chunk-CHOKOYSC.js} +3 -3
  36. package/dist/{chunk-2NSR6INI.js → chunk-CSUF6PNF.js} +3 -3
  37. package/dist/{chunk-ZTSBP3AH.js → chunk-CUYDE77F.js} +3 -3
  38. package/dist/{chunk-VHO3YBTB.js → chunk-CVVICCSB.js} +24 -2
  39. package/dist/{chunk-K5L3LXT3.js → chunk-DHIBVN2D.js} +104 -93
  40. package/dist/{chunk-ZBOSGLES.js → chunk-DJC5M7VC.js} +3 -3
  41. package/dist/{chunk-6XWZKCVS.js → chunk-DPFCFU2K.js} +3 -3
  42. package/dist/{chunk-CDIBHGPW.js → chunk-DY4VJYG7.js} +3 -3
  43. package/dist/{chunk-32G7X6BX.js → chunk-DZZWR6GT.js} +6 -6
  44. package/dist/{chunk-6YY56KU2.js → chunk-E2GEV3BI.js} +3 -3
  45. package/dist/{chunk-PSWWCLLI.js → chunk-EK4QX7NQ.js} +3 -3
  46. package/dist/{chunk-N4NFZIXE.js → chunk-FVYHDZ6Q.js} +2 -2
  47. package/dist/{chunk-DC3EBYIG.js → chunk-FXLGBUIQ.js} +5 -5
  48. package/dist/{chunk-VVCYOF3P.js → chunk-HBSKE3ML.js} +3 -3
  49. package/dist/{chunk-IO436ODZ.js → chunk-HJ6TMHQG.js} +4 -4
  50. package/dist/{chunk-6F74K4JL.js → chunk-I7IQ2NEJ.js} +3 -3
  51. package/dist/{chunk-VGFUVFJA.js → chunk-IL5UVUMK.js} +3 -3
  52. package/dist/{chunk-S5OQWV54.js → chunk-INLEOJIX.js} +2 -2
  53. package/dist/{chunk-35SOKGIP.js → chunk-JU2VMFYC.js} +2 -2
  54. package/dist/{chunk-DDQ47BMP.js → chunk-JWJBWNQL.js} +3 -3
  55. package/dist/{chunk-ZJR2YBVN.js → chunk-KOHIF4LD.js} +2 -2
  56. package/dist/{chunk-CWOKQSBQ.js → chunk-KRTO7NRK.js} +2 -2
  57. package/dist/{chunk-TL6WZWSZ.js → chunk-LALFMQ7Q.js} +2 -2
  58. package/dist/{chunk-MROSEZHE.js → chunk-LFAQ4BLZ.js} +3 -3
  59. package/dist/{chunk-EYP34TFP.js → chunk-LQR46XGR.js} +2 -2
  60. package/dist/{chunk-QABZKAKF.js → chunk-LRKGF7RN.js} +6 -6
  61. package/dist/{chunk-LLA5C2TM.js → chunk-MDI5FMWO.js} +2 -2
  62. package/dist/{chunk-GZAKQDX7.js → chunk-MRD4QWFK.js} +3 -3
  63. package/dist/{chunk-EZGWUS5G.js → chunk-NEV5IW33.js} +5 -5
  64. package/dist/{chunk-HQI7S72D.js → chunk-NKRVFQGO.js} +4 -4
  65. package/dist/{chunk-V5PHEH2M.js → chunk-NMIWEUIG.js} +2 -2
  66. package/dist/{chunk-OSXJY6SY.js → chunk-NSJK7F2V.js} +3 -3
  67. package/dist/{chunk-6KWE5553.js → chunk-O42EAZUV.js} +3 -3
  68. package/dist/{chunk-LXUBC5H4.js → chunk-OIK6Y2EJ.js} +5 -5
  69. package/dist/{chunk-EQGLGTU2.js → chunk-OLPWKS5L.js} +3 -3
  70. package/dist/{chunk-IXY2IPOW.js → chunk-P2PUWV3Y.js} +233 -58
  71. package/dist/{chunk-4VFQPEC6.js → chunk-PFGJ7SCM.js} +6 -6
  72. package/dist/{chunk-DNSEG6P2.js → chunk-PJDX4IKR.js} +2 -2
  73. package/dist/{chunk-JAHV7RFV.js → chunk-PTKCX5ZE.js} +4 -4
  74. package/dist/{chunk-U5UKFXHB.js → chunk-Q3XVMFVF.js} +2 -2
  75. package/dist/{chunk-SJT4W23S.js → chunk-QE4GTFZS.js} +2 -2
  76. package/dist/{chunk-TR7WNZFJ.js → chunk-QFNRHY62.js} +3 -3
  77. package/dist/{chunk-R53THUTP.js → chunk-QMYJO4EL.js} +4 -4
  78. package/dist/{chunk-IH3GHOHU.js → chunk-QQADQBKG.js} +4 -4
  79. package/dist/{chunk-TDZRLG7I.js → chunk-RF5YDIYT.js} +2 -2
  80. package/dist/{chunk-HFOSP6E2.js → chunk-RKTIIU7Z.js} +3 -3
  81. package/dist/{chunk-SEDLXFTX.js → chunk-SBOG6R6A.js} +4 -4
  82. package/dist/{chunk-T7FMXKIG.js → chunk-SF3JAWMY.js} +3 -3
  83. package/dist/{chunk-GSSCUREO.js → chunk-SMHTYVMK.js} +6 -6
  84. package/dist/{chunk-SQLVM3G7.js → chunk-SR7NGZNM.js} +4 -4
  85. package/dist/{chunk-VGCL263O.js → chunk-SSR6JAR3.js} +2 -2
  86. package/dist/{chunk-HPNOT5GQ.js → chunk-TJCHULP5.js} +2 -2
  87. package/dist/{chunk-PLDCXGLQ.js → chunk-TRP7PC5Z.js} +5 -5
  88. package/dist/{chunk-3O3W2JS2.js → chunk-U42ZEK7L.js} +2 -2
  89. package/dist/{chunk-UYY7MVJK.js → chunk-U7CXUGQS.js} +3 -3
  90. package/dist/{chunk-IOUUQLDE.js → chunk-UKZ7K5GS.js} +2 -2
  91. package/dist/{chunk-X5AIFXB7.js → chunk-USHDV2AF.js} +4 -4
  92. package/dist/{chunk-TJV3J74Y.js → chunk-UTOELEK2.js} +3 -3
  93. package/dist/{chunk-E5G55SYS.js → chunk-UZ3JPYD3.js} +3 -3
  94. package/dist/{chunk-ZP2FV4WO.js → chunk-VWCGN2ST.js} +3 -3
  95. package/dist/{chunk-W2Z4KS72.js → chunk-VXBEG3IB.js} +3 -3
  96. package/dist/{chunk-Z4RFILRE.js → chunk-W32HMBPW.js} +3 -3
  97. package/dist/{chunk-KZFAEMQQ.js → chunk-X2X7MTKH.js} +3 -3
  98. package/dist/{chunk-5USRKIR3.js → chunk-X4FCKGK2.js} +4 -4
  99. package/dist/{chunk-MM4Z32EH.js → chunk-XC7BUB3P.js} +2 -2
  100. package/dist/{chunk-XS7CL7NX.js → chunk-XHFXA6RP.js} +2 -2
  101. package/dist/{chunk-JQDZHYGU.js → chunk-XJZCXNWR.js} +3 -3
  102. package/dist/{chunk-XZXXSZ7E.js → chunk-YJCILMEA.js} +4 -4
  103. package/dist/{chunk-GSVHOF3J.js → chunk-YXI6Y7YY.js} +2 -2
  104. package/dist/cloud-reference.d.ts +24 -4
  105. package/dist/cloud-reference.js +5 -1
  106. package/dist/completion-registry.js +5 -7
  107. package/dist/{registry-C0HvobTb.d.ts → dgmo-router-Dd5PTjxl.d.ts} +271 -98
  108. package/dist/dgmo-router-Z5N6QLIC.js +89 -0
  109. package/dist/{dimensions-PC6WLKCC.js → dimensions-ES6O2T4H.js} +6 -6
  110. package/dist/editor.d.ts +9 -2
  111. package/dist/editor.js +229 -57
  112. package/dist/element.js +143 -142
  113. package/dist/{flowchart-parser-PZQY2UC4.js → flowchart-parser-T4XZRSA7.js} +4 -4
  114. package/dist/{flowchart-renderer-RS6IRRE7.js → flowchart-renderer-XFDCX7MZ.js} +5 -5
  115. package/dist/highlight.js +229 -57
  116. package/dist/index.d.ts +21 -10
  117. package/dist/index.js +55 -66
  118. package/dist/{layout-GKWT37FH.js → layout-H4H4OFE4.js} +3 -3
  119. package/dist/{layout-W423CCED.js → layout-OH4VQ3OI.js} +4 -4
  120. package/dist/{layout-LH6LNIUV.js → layout-QTZO6CW5.js} +3 -3
  121. package/dist/{layout-AUAW5U74.js → layout-SKQMIXTG.js} +4 -4
  122. package/dist/{layout-GU6POUGD.js → layout-UU4VJTOP.js} +4 -4
  123. package/dist/{layout-MNQZ3Q45.js → layout-WCOEZPOI.js} +4 -4
  124. package/dist/live-link-resolve.js +1 -1
  125. package/dist/{parser-NJGZF5MK.js → parser-2BGDJJ2L.js} +5 -5
  126. package/dist/{parser-3QHLZK6F.js → parser-2K4Z7RNT.js} +3 -3
  127. package/dist/{parser-6HT34DZ3.js → parser-3KFNCRLD.js} +4 -4
  128. package/dist/{parser-WXZU47Z4.js → parser-4CMMKTRS.js} +3 -3
  129. package/dist/{parser-BNGLB2VS.js → parser-56746U6W.js} +4 -4
  130. package/dist/{parser-56HMQG5C.js → parser-5JS6VM6L.js} +5 -5
  131. package/dist/{parser-2OJSWKXO.js → parser-5ZUEF4WE.js} +4 -4
  132. package/dist/{parser-7C5GZCAU.js → parser-63BQDUWB.js} +4 -4
  133. package/dist/{parser-TPCKCQ4Z.js → parser-6VNVZO5F.js} +4 -4
  134. package/dist/{parser-6S65S3DX.js → parser-AZZHRVJF.js} +4 -4
  135. package/dist/{parser-WI2B7IL3.js → parser-BGX5ODHF.js} +3 -3
  136. package/dist/{parser-TABGTEHH.js → parser-DLUOCPMD.js} +3 -3
  137. package/dist/{parser-CXLR6MAY.js → parser-DSNINT2K.js} +3 -3
  138. package/dist/{parser-RMUGOZO3.js → parser-FTC7FZ6Z.js} +4 -4
  139. package/dist/{parser-5I7W54EA.js → parser-GHLWPCIX.js} +4 -4
  140. package/dist/{parser-BVC642CN.js → parser-J75RSQFI.js} +4 -4
  141. package/dist/{parser-IWQQY5VU.js → parser-JZPSIWRC.js} +4 -4
  142. package/dist/{parser-QCSDU4FU.js → parser-KN7H2RQC.js} +3 -3
  143. package/dist/{parser-4QYDFXV2.js → parser-KRF4S5RW.js} +4 -4
  144. package/dist/{parser-4OU5P3BM.js → parser-KSIYWKYF.js} +4 -4
  145. package/dist/{parser-UB6XGLTC.js → parser-MCUKPCYE.js} +4 -4
  146. package/dist/{parser-G7KP6LZH.js → parser-MUYBWGUB.js} +3 -3
  147. package/dist/{parser-QCYEJOLZ.js → parser-NWERESX3.js} +4 -4
  148. package/dist/{parser-63LK7YBR.js → parser-OEBFJHT4.js} +5 -5
  149. package/dist/{parser-DROHJTBZ.js → parser-P7T2BGAI.js} +4 -4
  150. package/dist/{parser-7W7DPIGR.js → parser-RAKD267X.js} +4 -4
  151. package/dist/{parser-AD5OAVX6.js → parser-RBY2UFTE.js} +3 -3
  152. package/dist/{parser-5BHZMV3O.js → parser-SRUPRH77.js} +4 -4
  153. package/dist/{parser-QJ7XK7AB.js → parser-SSUMVOJA.js} +4 -4
  154. package/dist/{parser-BLCDJB7N.js → parser-UKQC7N6K.js} +4 -4
  155. package/dist/{parser-AWO3N6YH.js → parser-VMGTNHP2.js} +3 -3
  156. package/dist/{parser-55CSWK3N.js → parser-WHDC7OV2.js} +4 -4
  157. package/dist/{parser-453DEZ4P.js → parser-YO2JBE52.js} +4 -4
  158. package/dist/{renderer-G24W6J6H.js → renderer-2DKA5QXA.js} +4 -4
  159. package/dist/{renderer-66YB63F4.js → renderer-2PGIIOFN.js} +7 -7
  160. package/dist/{renderer-RH5OJ6Q6.js → renderer-35F3XMZH.js} +5 -5
  161. package/dist/{renderer-3Z5MSBWR.js → renderer-4RQ5PGHY.js} +6 -6
  162. package/dist/{renderer-LGSSP3JI.js → renderer-62FFDWMY.js} +6 -6
  163. package/dist/{renderer-SHMFNFE4.js → renderer-63MLWS6L.js} +7 -7
  164. package/dist/{renderer-GFZT6Q5F.js → renderer-6QW5OAJG.js} +5 -5
  165. package/dist/renderer-A5GFW2XH.js +76 -0
  166. package/dist/{renderer-H5C2JN62.js → renderer-AMCTCBV3.js} +5 -5
  167. package/dist/{renderer-PGMTAQIE.js → renderer-AS6LLDZM.js} +5 -5
  168. package/dist/{renderer-YYG4LYKS.js → renderer-AVR3LBTS.js} +6 -6
  169. package/dist/{renderer-LPQUBMXZ.js → renderer-BBBN7QNX.js} +4 -4
  170. package/dist/{renderer-DQLSUTSU.js → renderer-CHHYNEK7.js} +5 -5
  171. package/dist/{renderer-J76L474X.js → renderer-CU6BEHHV.js} +3 -3
  172. package/dist/{renderer-NE2GQBAU.js → renderer-CXRSD26Q.js} +7 -7
  173. package/dist/{renderer-JO27QMZB.js → renderer-DJ5DP3RH.js} +5 -5
  174. package/dist/{renderer-ZMAPGMF2.js → renderer-DRLZELXM.js} +5 -5
  175. package/dist/{renderer-BTFZWWIG.js → renderer-GESKWINV.js} +7 -7
  176. package/dist/{renderer-RB4FJJYN.js → renderer-IG5PQXEM.js} +7 -7
  177. package/dist/{renderer-PTLCAUC6.js → renderer-JBF2PAVP.js} +5 -5
  178. package/dist/{renderer-RRIXAQSF.js → renderer-JL7L5Y5M.js} +5 -5
  179. package/dist/{renderer-A3QD5R2C.js → renderer-JSFWNV37.js} +6 -6
  180. package/dist/{renderer-U55GLRDJ.js → renderer-M7YOXAGC.js} +3 -3
  181. package/dist/{renderer-5INUWSXC.js → renderer-Q2YHQQSN.js} +8 -8
  182. package/dist/{renderer-2HFRMVHO.js → renderer-RN5ZFIEK.js} +6 -6
  183. package/dist/{renderer-CQWF3JE3.js → renderer-TDFRMG3O.js} +3 -3
  184. package/dist/{renderer-MFD57VGM.js → renderer-UTXVIAS7.js} +5 -5
  185. package/dist/{renderer-S7ZTD4XM.js → renderer-VYMTBSF4.js} +7 -7
  186. package/dist/{renderer-NVT3RP5Q.js → renderer-XSHOMUJQ.js} +7 -7
  187. package/dist/{renderer-T4DY572A.js → renderer-ZHBFOSK5.js} +5 -5
  188. package/dist/{renderer-radial-2DDUIUWA.js → renderer-radial-4J2KO4GZ.js} +6 -6
  189. package/dist/{resolver-W3WKLWDP.js → resolver-ZLYSMILY.js} +3 -3
  190. package/dist/{state-parser-PNC2IHIA.js → state-parser-3U4232LJ.js} +5 -5
  191. package/dist/{state-renderer-QGPK55TI.js → state-renderer-GBHDOEXR.js} +7 -7
  192. package/dist/{themes-l406Vj2z.d.ts → themes-DiUAG4Bf.d.ts} +37 -2
  193. package/docs/ai-integration.md +5 -5
  194. package/docs/language-reference.md +1 -1
  195. package/package.json +2 -21
  196. package/.claude/commands/dgmo-codebase-report.md +0 -172
  197. package/.claude/commands/dgmo-diagram-this.md +0 -60
  198. package/.claude/commands/dgmo-document-project.md +0 -128
  199. package/.claude/commands/dgmo.md +0 -313
  200. package/.cursorrules +0 -587
  201. package/.github/copilot-instructions.md +0 -597
  202. package/.windsurfrules +0 -587
  203. package/SKILL.md +0 -573
  204. package/dist/auto.d.ts +0 -60
  205. package/dist/auto.mjs +0 -88591
  206. package/dist/chunk-6MTWIQVO.js +0 -121
  207. package/dist/chunk-ZEIYC7XO.js +0 -229
  208. package/dist/cli.cjs +0 -489
  209. package/dist/dgmo-router-JD7THHB7.js +0 -90
  210. package/dist/element.d.ts +0 -68
  211. package/dist/element.mjs +0 -88457
  212. package/dist/load-data-EHDDZ5ZS.js +0 -8
  213. package/dist/renderer-MDCH52MC.js +0 -77
package/.cursorrules DELETED
@@ -1,587 +0,0 @@
1
- # DGMO Diagram Language
2
-
3
- When the user asks for a diagram, visualization, or chart, generate a `.dgmo` file. DGMO is a text-based diagram markup language that renders to SVG/PNG.
4
-
5
- <!-- GENERATED by dgmo/scripts/gen-ai-core.mjs from docs/language-reference.md — DO NOT EDIT between the DGMO-AI-CORE markers; run `node scripts/gen-ai-core.mjs` (or sync-language-ref.sh) to regenerate. -->
6
- <!-- DGMO-AI-CORE:START -->
7
- ## DGMO AI Core
8
-
9
- _Generated from `language-reference.md` — the anti-patterns and 50-type index below are identical across every DGMO AI surface._
10
-
11
- ### Disambiguation — where DGMO diverges from LLM priors
12
-
13
- LLMs default to Mermaid / PlantUML habits; DGMO differs. These rules prevent the most common parse errors:
14
-
15
- - **No colons in declarations, directives, tags, or data rows.** `bar Revenue` (not `bar: Revenue`); `series Cloud blue, Legacy red` (not `series: ...`); `North 850` (not `North: 850`); `tag Team as t` (not `tag: Team`). A colon binds a value only in metadata (`key: value`), class/function type separators, and a few scoped spots — see §26.
16
- - **No Mermaid arrow-labels.** Put the label _between_ the dashes: `A -Login-> B`, never `A -> B: Login`. Sequence: `->` sync, `~>` async; left-to-right only — no `<-` / `<~`.
17
- - **No indented edges on a map.** Every map connection is ONE full line — `JFK ~daily~> LAX`; for a hub repeat the origin per spoke (`JFK ~daily~> LHR`, …). A bare source with indented `-> dest` legs errors as `Malformed edge`; indented legs are valid ONLY inside a `route` block (an ordered stop→stop voyage). Edge endpoints auto-create their POIs — don't add separate `poi` lines for places already in an edge.
18
- - **No `|` metadata delimiter** (removed 0.18.0 → `E_PIPE_OPERATOR_REMOVED`). Use same-line `Name key: value, k2: v2` or indented `key: value`. (`|` survives only in wireframe `{A | B}` dropdowns, in-arrow label text, and quoted names.)
19
- - **No removed participant keywords.** Do not write `X is a service` / `external` / `frontend` / `networking` / `gateway` — these were removed and error. A bare name renders the default shape; for a typed glyph use `is a person` / `is a database` / `is a queue`.
20
- <!-- COLORS start -->
21
- - **Colors are a closed set of EXACTLY these 11 — nothing else is a color.** Valid colors, the complete list: `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `teal`, `cyan`, `gray`, `black`, `white`. That is the entire universe of DGMO colors — there are no others. Do NOT use hex (`#1f77b4`), `rgb(...)`, `hsl(...)`, or ANY CSS color name: `crimson`, `royalblue`, `navy`, `pink`, `lime`, `magenta`, `indigo`, `gold`, `salmon`, `turquoise`, `violet`, etc. are ALL invalid — they are rejected and the element falls back to an auto-assigned color. When you want a color outside the 11, map it to the nearest one: crimson/scarlet→`red`, royalblue/navy/cobalt→`blue`, pink/magenta/violet/indigo→`purple`, lime/olive→`green`, gold/amber→`yellow`, turquoise→`teal`. Apply a color as a trailing token (`Done green`) or after a category/group bracket (`[North America] red`). Named colors are mandatory because they re-resolve per active palette + light/dark theme; a hardcoded value never would.
22
- <!-- COLORS end -->
23
- - **Show-everything is the default.** Every label / value / percent renders by default. Emit `no-name` / `no-value` / `no-percent` / `no-*` ONLY when the user explicitly asks to hide something — never defensively.
24
- - **`//` comments only** (never `#`). **Indentation closes blocks** — never `end`.
25
- - **Declare before reference.** An edge target must be declared on a prior line; put metadata and edges on/under one declaration to avoid `Duplicate node` warnings.
26
- - **No reference scaffolding in output.** Emit only DGMO source. This doc is organized with HTML-comment anchors (the `TYPE`, `TIPS`, and `AI-CORE` markers, each wrapped in comment delimiters); never copy any such `<!-- … -->` comment into a diagram. They mark sections of the docs, not DGMO syntax; the parser flags a stray HTML comment as an `Unexpected line` warning. (DGMO's only comment form is `//`.)
27
-
28
- Two traps in the _other_ direction (DGMO wants a colon / a space where you might not expect):
29
-
30
- - **Infra node properties REQUIRE the colon** — `cache-hit: 80%`, `instances: 3`, `max-rps: 8000`, `latency-ms: 45`. But top-level infra **options** are space-separated (`default-rps 100`). Don't conflate them.
31
- - **ER columns are space-separated** — `id int pk`, `email varchar` (the one SQL-DDL carve-out; everything else indented-typed uses a colon).
32
-
33
- Idiomatic example — color via tags, metadata on the declaration line, indented edges:
34
-
35
- ```dgmo
36
- boxes-and-lines Service Map
37
- tag Team as t
38
- Platform blue
39
- Product green
40
- active-tag Team
41
-
42
- API Gateway t: Platform
43
- -routes-> Orders
44
- -routes-> Billing
45
- Orders t: Product
46
- Billing t: Product
47
- ```
48
-
49
- ### Make it look good — authoring guidance
50
-
51
- Valid markup is the floor, not the goal. A good diagram reads at a glance. Apply these unless the prompt says otherwise:
52
-
53
- <!-- TITLE start -->
54
-
55
- - **Always title it.** Every diagram gets a short title on the type-declaration line (`flowchart Checkout Flow`, `sequence Checkout`, `boxes-and-lines Service Map`) so it is self-describing — never leave the bare type keyword alone. Infer a fitting title from the request when the user gives none.
56
- <!-- TITLE end -->
57
- <!-- CATEGORIZE start -->
58
- - **Categorize and color — by default, not only when obvious.** Before drawing, find the axis that sorts the items into kinds and color by it: layer (frontend / backend / data), role (client / service / datastore), trust zone (internal / external / third-party), status (done / active / blocked), owner/team, or read-path vs write-path. Almost every diagram has such an axis — actively look for one rather than leaving everything monochrome. Express it with a **tag group**, never ad-hoc per-node colors: declare `tag <Axis> as t` (the name is a single word — `tag TrustZone as tz` — or quote a multi-word name: `tag "Trust Zone" as tz`), indent the category values (a trailing color is optional — bare values auto-pick a palette color), set `active-tag <Axis>`, then assign each item `Node t: <Category>` (see the tag-group syntax in the per-type section below). Only the 11 named palette colors exist, and they re-resolve per palette/theme. Color the grouping so the categories — and the boundaries between them — read at a glance. **Buckets, not name tags — never 1:1.** A tag group must have _fewer_ values than it has members: each color should bucket two or more items so the palette compresses the diagram into a few meaningful kinds (aim for ~2–4 categories, and keep distinct colors well under half the item count). If you find yourself giving nearly every item its own value, you've enumerated, not categorized — merge the singletons up a level until each color groups at least two (a `cache` and a `database` are both `datastore`; a caller and a gateway are both `client`; two microservices are both `service`). One color per item is the same visual noise as random colors — the grouping only earns its place when a color means "these belong together." Leave items uncolored only when they genuinely form a single undifferentiated kind, or the user asked for no color.
59
- <!-- CATEGORIZE end -->
60
- - **Keep labels short.** A few words per node. Move detail into notes or metadata, never a full sentence inside a label.
61
- - **Let the defaults show.** Don't add `no-*` opt-outs unless the user asked to hide or disable something — they strip helpful labels, values, and color.
62
- - **Pick a fitting direction.** Top-to-bottom for hierarchies and processes; left-to-right for pipelines and flows (where the type supports a direction).
63
-
64
- ### Chart-type index (45) — pick the type, then fetch its section
65
-
66
- | id | when to use |
67
- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
- | `sequence` | message / interaction flows over time |
69
- | `flowchart` | decision trees and process flows |
70
- | `state` | state-machine / lifecycle transitions |
71
- | `class` | UML class hierarchies |
72
- | `er` | database schemas and relationships |
73
- | `c4` | system architecture (context / container / component / deployment) |
74
- | `infra` | infrastructure traffic flow with RPS computation |
75
- | `boxes-and-lines` | general-purpose node-edge diagrams with groups and tags |
76
- | `sitemap` | site / app navigation structure |
77
- | `mindmap` | radial hierarchy of ideas from a central topic |
78
- | `org` | reporting hierarchy |
79
- | `family` | family tree / genealogy: unions (couples), children, remarriage, adoption, GEDCOM-style metadata |
80
- | `bracket` | single-elimination tournament bracket: winners auto-advance; seed the field for a day-0 skeleton or list results casually; two sides mirror to a championship |
81
- | `kanban` | task-board columns |
82
- | `gantt` | project scheduling with task dependencies and milestones |
83
- | `pert` | project network with three-point estimates and critical path |
84
- | `swimlane` | cross-functional process flow with lanes, phases and gateways (BPMN-style) |
85
- | `version-control` | git / version-control branch-and-merge graph: commits, branches, merges, rebase, HEAD and remote-tracking (gitGraph-style) |
86
- | `timeline` | events, eras, and date ranges |
87
- | `event-line` | annotated narrative timeline — events on a line with descriptions, optionally not to scale (NOT the date-scaled `timeline`) |
88
- | `body` | human anatomy figure annotated by muscle name — for medical, exercise, and educational diagrams |
89
- | `journey-map` | UX flow with emotion scores, phases, annotations |
90
- | `cycle` | cyclical process (PDCA, OODA, DevOps loops) |
91
- | `raci` | tasks × roles responsibility matrix; variant (RACI / RASCI / DACI) is inferred from the markers used |
92
- | `tech-radar` | technology adoption quadrants (adopt / trial / assess / hold) |
93
- | `quadrant` | 2×2 positioning matrix |
94
- | `pyramid` | stacked hierarchy of layers (Maslow, DIKW) |
95
- | `ring` | concentric rings of nested categories |
96
- | `treemap` | nested rectangles sized by value (budgets, disk usage, portfolios) |
97
- | `block` | author-controlled grid of nested, collapsible blocks (system / architecture layouts) |
98
- | `sketch` | GUI-first free-placement canvas: uniform shapes on a snap grid, arrows, tags (markup is app-generated) |
99
- | `goal` | single progress-toward-a-target value (`now` vs `target`) as a progress bar, thermometer, or gauge — KPIs, fundraising, quotas |
100
- | `countdown` | live "N days until X" that ticks every second and is accurate on every load — trip dates, launches, deadlines; the only dynamic chart type |
101
- | `clock` | live world-clock board: current time for people/places across time zones, ticking every second, with optional working-hours status and sundown line |
102
- | `map` | geographic concept map: regions, points, routes |
103
- | `wireframe` | low-fidelity UI layout with panels and controls |
104
- | `bar` | categorical comparisons (multi-series via `stack` / `group`) |
105
- | `line` | trends over time (multiple series via a `series` block; filled via `fill`; dual y-axes via `y-label` / `y-right-label`) |
106
- | `pie` | part-to-whole proportions (ring/doughnut via `hole`) |
107
- | `radar` | multi-dimensional metrics |
108
- | `polar-area` | radial bar chart |
109
- | `scatter` | 2D points or bubble chart |
110
- | `heatmap` | matrix intensity |
111
- | `funnel` | conversion pipeline |
112
- | `sankey` | flow / allocation |
113
- | `arc` | network relationships (linear, or circular via `layout chord`) |
114
- | `slope` | change between two periods |
115
- | `venn` | set overlaps |
116
- | `wordcloud` | term-frequency |
117
- | `function` | mathematical expressions (colon required: `f(x): x^2`) |
118
-
119
- **Need more than the index gives you?** Fetch the per-type section: MCP `get_language_reference(type)` / `get_examples(type)`, or read that type's section below. The `suggest_chart_type` tool returns the chosen type's section automatically.
120
-
121
- **When the type isn't obvious, ask — don't guess.** Call `suggest_chart_type` first. If it returns an `⚠️ ASK THE USER` directive (the request is ambiguous between candidates, or nothing matched), present those candidate options to the user and wait for their pick before generating — never silently choose. A confident result (high/medium) you can proceed with.
122
-
123
- ### Common examples (curated, parse-clean)
124
-
125
- _The most common types, inline so you can generate them without a fetch. For the other 42, get the per-type section (see below)._
126
-
127
- #### journey-map
128
-
129
- ```dgmo
130
- journey-map A Cabin Boy's First Voyage
131
-
132
- persona Squidlips Sam color: blue
133
- Greenhorn cabin boy, first time at sea
134
- Sworn to the crew but quietly terrified
135
-
136
- [Signing On]
137
- Sign the articles score: 4, emotion: Hopeful
138
- description: Captain reads the code aloud — pay shares, no women aboard, lights out at 8
139
-
140
- [The Tempest]
141
- Caught in a squall off the reef score: 1, emotion: Terrified
142
- pain: Two crewmates lost overboard before dawn
143
- thought: Maybe the merchant fleet wasn't so bad after all
144
- Dawn, and she still floats score: 3, emotion: Relieved
145
-
146
- [The Prize]
147
- Strike the colors score: 5, emotion: Triumphant
148
- description: Heavy with silver from the Veracruz mines
149
-
150
- [Homecoming]
151
- Bury a share on the island score: 5, emotion: Proud
152
- thought: Three doubloons hidden where only he can find them
153
- Back to the Rusty Anchor score: 4, emotion: Content
154
- opportunity: Next time he signs on as a full hand, not a boy
155
- ```
156
- #### c4
157
-
158
- ```dgmo
159
- c4 Pirate Treasure Map System
160
-
161
- tag Scope as sc
162
- Crew blue
163
- External gray
164
-
165
- Captain is a person description: Commands the fleet and plans raids
166
-
167
- TreasureMap is a system description: Tracks buried treasure locations and raid intelligence
168
- -Views treasure locations-> Captain
169
- -Sends raid alerts [carrier pigeon]-> Lookout
170
-
171
- containers
172
- ChartRoom is a container description: Interactive sea chart with treasure markers, tech: Parchment
173
- -Queries treasure data [secret code]-> Vault
174
-
175
- Vault is a container description: Encrypted treasure ledger and coordinates, tech: Iron Chest
176
- -Reads/writes [quill and ink]-> TreasureLog
177
-
178
- TreasureLog is a container description: "Stores locations, guard counts, and loot inventories", tech: Leather-Bound Tome
179
-
180
- Lookout is an external description: Crow's nest spotter on allied ships, sc: External
181
- ~Relays sightings to~> Captain
182
-
183
- deployment
184
- Flagship
185
- container ChartRoom
186
- container Vault
187
- SecretCave
188
- container TreasureLog
189
- ```
190
- #### er
191
-
192
- ```dgmo
193
- er Pirate Fleet
194
-
195
- ships
196
- id int pk
197
- name varchar
198
- ship_type varchar
199
- cannons int
200
- 1-aboard-* crew_members
201
- 1-1 captains
202
- 1-carries-* treasure
203
-
204
- captains
205
- id int pk
206
- name varchar
207
- ship_id int fk
208
- bounty int
209
- ?-frequents-1 ports
210
- *-has-1 crew_members
211
-
212
- crew_members
213
- id int pk
214
- name varchar
215
- ship_id int fk
216
- role varchar nullable
217
-
218
- treasure
219
- id int pk
220
- name varchar
221
- value int
222
- ship_id int fk, nullable
223
-
224
- ports
225
- id int pk
226
- name varchar
227
- region varchar unique
228
- 1-docks-* ships
229
- ```
230
- #### class
231
-
232
- ```dgmo
233
- class Ship Class Hierarchy
234
-
235
- interface Vessel
236
- + sail(): void
237
- + anchor(): void
238
-
239
- abstract Ship implements Vessel
240
- # name: string
241
- # crew: number
242
- + getName(): string
243
-
244
- Galleon extends Ship
245
- - cannons: number
246
- + fire(): void
247
-
248
- Sloop extends Ship
249
- - speed: number
250
- + flee(): void
251
-
252
- enum ShipType
253
- Galleon
254
- Sloop
255
- Frigate
256
-
257
- Ship
258
- -> ShipType has type
259
- ```
260
- #### sequence
261
-
262
- ```dgmo
263
- sequence Treasure Hunt App
264
-
265
- tag Concern as c
266
- Search blue
267
- Claims green
268
- Notifications orange
269
-
270
- User is an actor
271
-
272
- [Treasure Service]
273
- TreasureAPI
274
- MapDB is a database
275
- NotifyQueue is a queue
276
-
277
- User -Search nearby loot-> WebApp
278
- WebApp -GET /treasures?nearby-> TreasureAPI c: Search
279
- TreasureAPI -Find within 5nm-> MapDB c: Search
280
- note
281
- - check location
282
- - use compass
283
- MapDB -3 results-> TreasureAPI
284
- TreasureAPI -locations-> WebApp
285
- WebApp -Show treasure map-> User
286
-
287
- == Claim ==
288
-
289
- User -Claim chest #42-> WebApp
290
- WebApp -POST /claim-> TreasureAPI c: Claims
291
- if chest available
292
- TreasureAPI -Set status = claimed-> MapDB c: Claims
293
- MapDB -OK-> TreasureAPI
294
- TreasureAPI ~treasure.claimed~> NotifyQueue c: Notifications
295
- TreasureAPI -Claim accepted-> WebApp
296
- WebApp -500 doubloons earned!-> User
297
- else
298
- TreasureAPI -409 Already claimed-> WebApp
299
- WebApp -Too slow, matey!-> User
300
- ```
301
- #### state
302
-
303
- ```dgmo
304
- state Ship Battle Lifecycle
305
-
306
- [*] -> Sailing
307
-
308
- Sailing
309
- -enemy spotted-> BattleStations
310
-
311
- [Losses] gray
312
- Captured -> [*]
313
- Sinking -> [*]
314
-
315
- [Aftermath] teal
316
- Victorious
317
- -loot taken-> Sailing
318
-
319
- Retreating
320
- -escaped-> Sailing
321
- -caught-> Captured
322
-
323
- [Combat] red
324
- Engaging
325
- -alongside-> Boarding
326
- -hull breach-> Sinking
327
- -outgunned-> Retreating
328
-
329
- Boarding
330
- -crew wins-> Victorious
331
- -crew loses-> Captured
332
-
333
- BattleStations
334
- -in range-> Engaging
335
- -enemy retreats-> Sailing
336
- ```
337
- #### infra
338
-
339
- ```dgmo
340
- infra Pirate Communication Network
341
-
342
- tag Fleet as f
343
- Blackbeard red
344
- Bonny purple
345
- Rackham blue
346
-
347
- Edge
348
- rps: 200
349
- -> SignalFlags
350
-
351
- SignalFlags f: Blackbeard
352
- description: Flag semaphore relay — ship-to-ship messaging
353
- latency-ms: 30000
354
- -> Flagship
355
- -> ScoutShip
356
-
357
- Flagship f: Blackbeard
358
- description: Command vessel — decrypts and routes all intelligence
359
- instances: 1
360
- max-rps: 50
361
- latency-ms: 5000
362
- -> CarrierPigeons
363
- -> RumRunner
364
-
365
- ScoutShip f: Bonny
366
- description: Fast sloop for reconnaissance
367
- instances: 2
368
- max-rps: 30
369
- latency-ms: 8000
370
- -> Flagship
371
-
372
- CarrierPigeons f: Rackham
373
- description: Long-range bird relay — messages to allied ports
374
- buffer: 100
375
- drain-rate: 12
376
- retention-hours: 72
377
- -> TavernNetwork
378
-
379
- [Allied Ports]
380
- instances: 3
381
-
382
- TavernNetwork f: Rackham
383
- description: Dockside tavern informants across the Caribbean
384
- max-rps: 20
385
- latency-ms: 86400000
386
-
387
- RumRunner f: Bonny
388
- description: Smuggler supply line — moves coded messages in rum barrels
389
- concurrency: 4
390
- duration-ms: 172800000
391
- -> TavernNetwork
392
- ```
393
- #### gantt
394
-
395
- ```dgmo
396
- gantt Blackbeard's Blockade — 1718
397
-
398
- start-date 1718-05-01
399
- today-marker 1718-05-15
400
-
401
- tag Role as r
402
- Command red
403
- Crew blue
404
- Captives orange
405
-
406
- marker 1718-05-14 Ransom Deadline red
407
- era 1718-05-08 -> 1718-05-17 Blockade Active blue
408
-
409
- [Preparation] r: Command
410
- Provision Ship 3d r: Crew, progress: 100
411
- -> Anchor Fleet 2d r: Crew, progress: 100
412
- Scout Harbor 3d r: Crew, progress: 100
413
- -> Position Cannons 3d r: Crew, progress: 100
414
- Recruit Hands 5d r: Crew, progress: 100
415
-
416
- +7d [Blockade] r: Crew
417
- Seize Merchants 4d progress: 100
418
- -> Hold Hostages 5d r: Captives, progress: 60
419
- Patrol Perimeter 9d progress: 75
420
- Demand Medicine 4d r: Command, progress: 100
421
- -> Threaten Executions 3d? r: Command, progress: 90
422
-
423
- +17d [Resolution] r: Command
424
- Receive Ransom 2d r: Captives
425
- -> Release Prisoners 1d r: Captives
426
- -> Set Sail 0d
427
- Burn Evidence 2d r: Crew
428
- ```
429
-
430
- **Fetch more:** the full per-type reference is at https://diagrammo.app/docs — fetch a type's section when the index + anti-patterns above aren't enough.
431
- <!-- DGMO-AI-CORE:END -->
432
-
433
- ## When to suggest DGMO
434
-
435
- - Architecture diagrams, sequence diagrams, flowcharts
436
- - Data charts (bar, line, pie, scatter, heatmap, etc.)
437
- - ER diagrams, class diagrams, org charts
438
- - Project roadmaps, kanban boards, timelines
439
-
440
- ## Quick syntax reference
441
-
442
- ### Sequence diagram
443
- ```dgmo
444
- sequence Auth Flow
445
-
446
- User -Login-> API
447
- API -Find user-> DB
448
- DB -user-> API
449
- if valid
450
- API -200 OK-> User
451
- else
452
- API -401-> User
453
- ```
454
-
455
- ### Flowchart
456
- ```dgmo
457
- flowchart Process
458
-
459
- (Start) -> <Valid?>
460
- -yes-> [Process] -> (Done)
461
- -no-> /Get Input/ -> <Valid?>
462
- ```
463
-
464
- ### Bar chart
465
- ```dgmo
466
- bar Revenue
467
-
468
- North 850
469
- South 620
470
- East 1100
471
- ```
472
-
473
- ### ER diagram
474
- ```dgmo
475
- er Schema
476
-
477
- users
478
- id int pk
479
- email varchar
480
-
481
- posts
482
- id int pk
483
- user_id int fk
484
-
485
- users 1-writes-* posts
486
- ```
487
-
488
- ### Org chart
489
- ```dgmo
490
- org
491
-
492
- CEO
493
- VP Engineering
494
- Team Lead A
495
- Team Lead B
496
- VP Marketing
497
- ```
498
-
499
- ### C4 architecture
500
- ```dgmo
501
- c4 System
502
-
503
- User is a person
504
- -Browses-> Web App
505
- Web App is a container description: SPA, tech: React
506
- -Uses-> API
507
- API is a container description: REST backend, tech: Node
508
- ```
509
-
510
- ### Infra chart
511
- ```dgmo
512
- infra
513
-
514
- edge
515
- rps: 10000
516
- -> CDN
517
-
518
- CDN
519
- cache-hit: 80%
520
- -> LB
521
-
522
- LB
523
- -/api-> API split: 70%
524
- -/web-> Web split: 30%
525
-
526
- API
527
- instances: 3
528
- max-rps: 500
529
- latency-ms: 45
530
- ```
531
-
532
- Properties (colon required): `cache-hit`, `firewall-block`, `ratelimit-rps`, `max-rps`, `instances` (N or N-M), `latency-ms`, `cb-error-threshold`. Groups: `[Name]` with children. Roles are inferred from behavior.
533
-
534
- ### Boxes and lines
535
- ```dgmo
536
- boxes-and-lines Architecture
537
- tag Team as t
538
- Backend blue
539
- Frontend green
540
- active-tag Team
541
- direction LR
542
-
543
- API Gateway t: Backend
544
- -routes-> AuthService
545
- -queries-> DB
546
-
547
- [Cloud]
548
- API Gateway
549
- AuthService
550
- ```
551
-
552
- Nodes: implicit from edges or explicit with same-line metadata (`Name key: value`). Edges: `A -label-> B`, `A <-label-> B` (bidi). Groups: `[Name]` with indented children (max 2 levels). Tags: `tag Name as alias` with indented values, `active-tag`, `hide`. Options: `direction LR|TB`.
553
-
554
- ## Supported chart types
555
-
556
- If the dgmo MCP server is configured, call `list_chart_types` for the authoritative list (with descriptions) and `suggest_chart_type({ prompt })` to pick the best match for a request. Otherwise run `dgmo --chart-types` in a terminal. The static list previously here drifted with every new chart type — the MCP tool / CLI is the source of truth.
557
-
558
- ## Common patterns
559
-
560
- - `TYPE Title` — first line declares chart type and optional title (no colon)
561
- - `directive value` — directives are space-separated (no colon)
562
- - `// comment` — only `//` comments (not `#`)
563
- - `(colorname)` — inline colors: `Label(red) 100`
564
- - `series A(red), B(blue)` — multi-series with colors
565
- - `tag Group as g` with indented values — universal tag declaration
566
-
567
- ## Rendering
568
-
569
- ```bash
570
- dgmo file.dgmo -o output.svg # SVG
571
- dgmo file.dgmo -o url # shareable link
572
- dgmo file.dgmo --json # structured JSON output
573
- ```
574
-
575
- Install: `brew install diagrammo/dgmo/dgmo` or `npm install -g @diagrammo/dgmo`
576
-
577
- ## Mistakes to avoid
578
-
579
- - Don't use `#` for comments — use `//`
580
- - Don't use `end` to close sequence blocks — indentation closes them
581
- - Don't use hex colors — use named colors from the palette (red, orange, yellow, green, blue, purple, teal, cyan, gray, black, white)
582
- - Don't use colons in chart type, title, directives, or data rows — use spaces
583
- - Don't use `|` to delimit metadata — it was removed in 0.18.0; use same-line `key: value` per the universal metadata grammar
584
- - Don't use `tag Name alias` or bare `tag Name x` — use `tag Name as alias`
585
- - Sequence arrows: `->` (sync), `~>` (async) — always left-to-right; no leftward `<-` or `<~`
586
-
587
- Full reference: `docs/language-reference.md`