@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagrammo/dgmo",
3
- "version": "0.60.0",
3
+ "version": "0.62.0",
4
4
  "description": "DGMO diagram markup language — parser, renderer, and color system",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,9 +12,6 @@
12
12
  "engines": {
13
13
  "node": ">=20.6"
14
14
  },
15
- "bin": {
16
- "dgmo": "dist/cli.cjs"
17
- },
18
15
  "main": "./dist/index.js",
19
16
  "module": "./dist/index.js",
20
17
  "types": "./dist/index.d.ts",
@@ -63,14 +60,6 @@
63
60
  "types": "./dist/pert.d.ts",
64
61
  "default": "./dist/pert.js"
65
62
  },
66
- "./auto": {
67
- "types": "./dist/auto.d.ts",
68
- "default": "./dist/auto.mjs"
69
- },
70
- "./element": {
71
- "types": "./dist/element.d.ts",
72
- "default": "./dist/element.mjs"
73
- },
74
63
  "./fonts/*": "./fonts/*",
75
64
  "./block": {
76
65
  "types": "./dist/block.d.ts",
@@ -80,18 +69,12 @@
80
69
  },
81
70
  "files": [
82
71
  "dist/*.js",
83
- "dist/*.mjs",
84
72
  "dist/*.d.ts",
85
73
  "dist/*.css",
86
74
  "dist/map-data/*.json",
87
75
  "fonts",
88
76
  "docs/*.md",
89
- "gallery/fixtures",
90
- ".claude/commands",
91
- ".github/copilot-instructions.md",
92
- ".cursorrules",
93
- ".windsurfrules",
94
- "SKILL.md"
77
+ "gallery/fixtures"
95
78
  ],
96
79
  "sideEffects": [
97
80
  "./src/palettes/*.ts",
@@ -137,12 +120,10 @@
137
120
  "check:size": "pnpm build && node scripts/check-bundle-size.cjs",
138
121
  "check:size:update": "pnpm build && node scripts/check-bundle-size.cjs --update",
139
122
  "check:types": "attw --pack . --ignore-rules no-resolution false-export-default cjs-resolves-to-esm",
140
- "postinstall": "node -e \"console.log('\\n💡 Claude Code user? Run: dgmo install claude-code\\n')\"",
141
123
  "prepare": "husky"
142
124
  },
143
125
  "dependencies": {
144
126
  "@dagrejs/dagre": "^3.0.0",
145
- "@resvg/resvg-js": "^2.6.2",
146
127
  "d3-array": "^3.2.4",
147
128
  "d3-cloud": "^1.2.9",
148
129
  "d3-geo": "^3.1.1",
@@ -1,172 +0,0 @@
1
- # /dgmo-codebase-report — Visual Architecture Report for a Codebase
2
-
3
- You are producing a **single, committable Markdown report** that explains how a codebase works, using embedded DGMO diagrams. The report is a real engineering deliverable — an onboarding / architecture document a new teammate could read top-to-bottom and understand the system. The diagrams are there to do work, not decoration.
4
-
5
- ## Output contract (read this first)
6
-
7
- - **One Markdown file.** Default path `docs/architecture-report.md` (create `docs/` if missing). If the user named a path, use it.
8
- - **Diagrams are embedded as fenced code blocks**, not images:
9
-
10
- ````
11
- ```dgmo
12
- c4 System Context
13
- ...
14
- ```
15
- ````
16
-
17
- Rendering surfaces (diagrammo app, online.diagrammo.app, the remark/astro/docusaurus/fumadocs wrappers, the Obsidian plugin) render these fences live. In a plain viewer (e.g. GitHub) the reader sees the DGMO source, which is still readable. Do **not** inline PNG/SVG — the fence is the source of truth and stays diffable in git.
18
- - **Prose carries the report.** Every diagram is wrapped in explanation: what it shows, why it matters, the non-obvious bits. A diagram with no surrounding analysis is a failure.
19
- - **Everything is real.** Use actual module, file, service, table, and endpoint names pulled from the code. No invented components, no placeholder "ServiceA".
20
-
21
- ## Prerequisites (optional, graceful)
22
-
23
- You can produce the report with **no tools at all** — it is just Markdown. But validate the DGMO if you can:
24
-
25
- - **MCP available?** (you can call `mcp__dgmo__list_chart_types`) → use `mcp__dgmo__get_language_reference(type)`, `mcp__dgmo__get_examples(type)`, and `mcp__dgmo__validate_diagram(dgmo)`.
26
- - **No MCP, `dgmo` CLI installed?** → `dgmo types` lists chart types; validate a fence by writing it to a temp file and running `dgmo /tmp/x.dgmo -o /tmp/x.svg` (it exits non-zero and prints diagnostics on a syntax error).
27
- - **Neither?** → lean on the `dgmo-diagramming` skill for syntax. Still ship the report; tell the user it was not machine-validated and how to install the CLI (`npm i -g @diagrammo/dgmo` or `brew install diagrammo/dgmo/dgmo`).
28
-
29
- Never block the report on tooling. Never `dgmo install` or render images unless the user asks.
30
-
31
- ## Step 1 — Map the codebase
32
-
33
- Read enough to be accurate, not everything. Prioritize:
34
-
35
- 1. **README / docs** — stated purpose, vocabulary, intended architecture.
36
- 2. **Manifest(s)** — `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `pom.xml`, `*.csproj`, etc. → language, framework, key deps, scripts, workspaces/monorepo layout.
37
- 3. **Source tree** — top-level of `src/` / `app/` / `cmd/` / `lib/` and the package/module boundaries. Identify the real seams (layers, services, domains).
38
- 4. **Entry points** — `main`, server bootstrap, CLI entry, route registration, job/worker registration.
39
- 5. **Data layer** — ORM models, migrations, `schema.sql`, prisma/drizzle/typeorm/ent/sqlalchemy definitions.
40
- 6. **Infra & integrations** — `Dockerfile`, `docker-compose.yml`, `k8s/`, `terraform/`, `.env.example`, queue/cache/3rd-party clients.
41
-
42
- Write down (for your own use): one-sentence purpose, tech stack, the 5–12 top-level components and how they depend on each other, the 1–3 most important runtime flows, the data model, external dependencies.
43
-
44
- ## Step 2 — Choose the diagrams (fit, not formula)
45
-
46
- A good report is 3–7 diagrams that form a **narrative**: zoom from the outside in, then show behavior, then data. Pick from this matrix based on what the code actually has — skip anything that doesn't apply.
47
-
48
- | Signal in the codebase | Chart type | Section it anchors |
49
- |---|---|---|
50
- | Any system with external users/deps | `c4` (context, then container) | "System at a glance" — almost always include one |
51
- | Internal modules/packages with dependencies | `boxes-and-lines` | "Module map" — the dependency graph, grouped by layer/domain via tags |
52
- | REST/GraphQL/RPC handlers, key workflows | `sequence` | "Key flows" — 1–3 important request/event paths |
53
- | DB models / migrations / schema | `er` | "Data model" |
54
- | Docker / k8s / cloud / LB / queues | `infra` | "Infrastructure & traffic" |
55
- | Status fields, workflow/state machines | `state` | "Lifecycle" |
56
- | Class/interface hierarchies that matter | `class` | "Core types" |
57
- | Cross-team / cross-service process | `swimlane` | "End-to-end process" |
58
-
59
- Rules:
60
- - **Always** open with a `c4` context or container view — the high-level orientation.
61
- - **Always** include a `boxes-and-lines` **module/dependency map** for any non-trivial repo — this is the highest-value diagram for understanding code and the main reason this report exists.
62
- - Behavior → `sequence`. Don't ship more than 3 sequences; pick the flows that teach the system.
63
- - `er` only if there's a real schema. `infra` only if there's real infra config. Don't force-fit.
64
- - Small repo (a script, a single-file lib)? 1–2 diagrams is the right answer. Don't pad.
65
-
66
- ## Step 3 — Pull syntax for each type
67
-
68
- For every chart type you'll use, fetch idiomatic syntax before writing it:
69
-
70
- - MCP: `mcp__dgmo__get_language_reference("<type>")` + `mcp__dgmo__get_examples("<type>")`.
71
- - No MCP: consult the `dgmo-diagramming` skill.
72
-
73
- DGMO syntax reminders (common mistakes):
74
- - First line is `type Title` (e.g. `c4 System Context`) — no colon.
75
- - No colons in chart-type declarations, tag declarations, or directives.
76
- - Arrows carry inline labels: `User -POST /login-> API` (sync), `API ~publish~> Queue` (async). Never Mermaid-style `-->`/`->>`.
77
- - Tags color groups: `tag Layer as l` then indented `Frontend blue`. Color is a trailing token, no parens, no hex.
78
- - ER columns are space-separated: `id int pk` (the one carve-out). Infra node props need a colon (`latency-ms: 50`).
79
- - Lean on inference: `User` → actor, `PostgresDB` → database; only declare a type when the name won't infer it.
80
-
81
- ## Step 4 — Write the report
82
-
83
- Build the Markdown around the diagrams. Structure:
84
-
85
- ```markdown
86
- # <Project> — Architecture Report
87
-
88
- > Generated from a codebase walkthrough on <date>. Diagrams are DGMO fences —
89
- > view in the Diagrammo app, online.diagrammo.app, or any DGMO-enabled docs site
90
- > to see them rendered; the raw source is readable as-is.
91
-
92
- ## TL;DR
93
- - **What it is:** <one sentence>
94
- - **Stack:** <language / framework / db / infra>
95
- - **Shape:** <monolith | modular monolith | services | library | CLI> with <N> top-level modules.
96
- - **Read next:** the Module map below is the fastest way in.
97
-
98
- ## System at a glance
99
- <2–4 sentences framing the system and its external dependencies.>
100
-
101
- ```dgmo
102
- c4 System Context
103
- ...
104
- ```
105
- <1–3 sentences reading the diagram: what each actor/system is, the key boundary.>
106
-
107
- ## Module map
108
- <What the internal pieces are and how they depend on each other. Call out the
109
- seams, the direction of dependencies, and anything surprising (cycles, a god
110
- module, a layer that reaches around another).>
111
-
112
- ```dgmo
113
- boxes-and-lines Module Dependencies
114
- tag Layer as l
115
- api blue
116
- domain green
117
- data orange
118
- ...
119
- ```
120
- <Analysis: the layering, the hotspots, where new code tends to go.>
121
-
122
- ## Key flows
123
- <For each important runtime path: a sentence of setup, the sequence, a sentence
124
- on the tricky part (auth, retries, async handoff).>
125
-
126
- ```dgmo
127
- sequence <Flow name>
128
- ...
129
- ```
130
-
131
- ## Data model ← only if there's a real schema
132
- ...
133
-
134
- ## Infrastructure & traffic ← only if there's real infra
135
- ...
136
-
137
- ## Notes & gotchas
138
- <Non-obvious constraints, tech debt, conventions a newcomer must know. Pull these
139
- from comments, config, and naming you noticed while reading.>
140
- ```
141
-
142
- Writing standards:
143
- - Keep each diagram **focused** — 5–9 nodes reads; 25 nodes is a wall. Split or summarize instead of cramming.
144
- - Every section: prose → diagram → reading of the diagram. Never a bare fence.
145
- - Use the codebase's real vocabulary. If the team calls it a "broker," call it a broker.
146
- - Group with tags to encode meaning (layer, domain, team), not just color.
147
-
148
- ## Step 5 — Validate every fence (do not skip)
149
-
150
- Before saving, validate each DGMO fence:
151
- - MCP: `mcp__dgmo__validate_diagram(dgmo)` for each block; fix until clean.
152
- - CLI: write each block to a temp `.dgmo` and run `dgmo <tmp> -o <tmp>.svg`; a non-zero exit means a syntax error — read the diagnostic and fix.
153
-
154
- A report that ships broken DGMO fails its primary job. If you could not validate (no tools), say so explicitly in your summary.
155
-
156
- ## Step 6 — Save and hand off
157
-
158
- Write the file (default `docs/architecture-report.md`). Then report to the user:
159
-
160
- 1. **What was produced** — the path, the section list, how many diagrams and of which types.
161
- 2. **How it's organized** — one line on the narrative arc (context → modules → flows → data).
162
- 3. **How to view it rendered** — open in the Diagrammo app, paste into online.diagrammo.app, or render through a DGMO docs wrapper; raw Markdown shows the source.
163
- 4. **What's next** — which diagram would most benefit from depth, or a flow/section worth adding.
164
-
165
- ## Quality bar / anti-patterns
166
-
167
- - ❌ Generic boxes ("Service", "Module 1") → ✅ real names from the code.
168
- - ❌ One giant everything-diagram → ✅ several focused, layered views.
169
- - ❌ Fences with no prose → ✅ each diagram is explained and "read aloud."
170
- - ❌ Forcing `er`/`infra` with nothing to show → ✅ only diagram what exists.
171
- - ❌ Inlining rendered PNG/SVG → ✅ DGMO fences (diffable, editable, the point of the format).
172
- - ❌ Asking the user which diagrams to make → ✅ decide from the code; they can adjust after.
@@ -1,60 +0,0 @@
1
- # /dgmo-diagram-this — Generate Diagrams from Code
2
-
3
- You are reading the user's code and generating DGMO diagrams that document what it does. Don't ask what kind of diagram — figure it out from the code.
4
-
5
- ## Prerequisites
6
-
7
- Verify DGMO MCP tools are available by calling `mcp__dgmo__list_chart_types`. If not available, tell the user to run `/dgmo` first to set up the MCP server.
8
-
9
- ## Step 1 — Determine Scope
10
-
11
- The user may provide:
12
- - **A file path** — diagram that specific file
13
- - **A function/class name** — diagram that specific piece
14
- - **A directory** — diagram the module/package
15
- - **Nothing** — look at the current working directory and diagram the overall project structure
16
-
17
- If scope is unclear, read the project root (`package.json`, `README.md`, `src/` listing) and pick the most interesting thing to diagram.
18
-
19
- ## Step 2 — Read the Code
20
-
21
- Read the relevant source files. Look for:
22
- - Function signatures and call chains
23
- - API endpoints and request handlers
24
- - Database models, schemas, ORM entities
25
- - State machines, status enums, workflow transitions
26
- - Service-to-service calls, message passing
27
- - Infrastructure config (Docker, k8s, terraform)
28
- - Import graphs and module dependencies
29
-
30
- ## Step 3 — Pick the Diagram Type
31
-
32
- | What you found | Diagram type |
33
- |---|---|
34
- | API handler calling other services/DB | `sequence` |
35
- | Multiple models with relationships | `er` |
36
- | Service/module dependency graph | `c4` (container level) |
37
- | State enum, FSM, workflow transitions | `state` |
38
- | Decision logic, branching control flow | `flowchart` |
39
- | Docker/k8s/cloud infra config | `infra` |
40
- | Class hierarchy with methods | `class` |
41
- | Team/org structure data | `org` |
42
-
43
- If a single file contains multiple diagrammable things (e.g., models AND an API handler), generate multiple diagrams.
44
-
45
- ## Step 4 — Generate
46
-
47
- 1. Call `mcp__dgmo__get_language_reference("<type>")` for syntax.
48
- 2. Call `mcp__dgmo__get_examples("<type>")` for idiomatic patterns.
49
- 3. Write the DGMO using **real names from the code** — actual function names, model names, service names, field types.
50
- 4. Call `mcp__dgmo__validate_diagram(dgmo)` — fix any errors.
51
- 5. Call `mcp__dgmo__preview_diagram([{dgmo, title}])` to show the result.
52
- 6. Save to `<descriptive-name>.dgmo` in the project.
53
-
54
- ## Rules
55
-
56
- - **Use real names** — `UserService`, `orders` table, `POST /api/auth/login` — not generic placeholders
57
- - **Keep it focused** — a sequence diagram with 5-8 messages is better than one with 30. Show the main flow, not every edge case.
58
- - **Lean on inference** — don't declare `PostgresDB is a database` (the name auto-infers). Only use `is a` when the name doesn't match.
59
- - **No colons in directives** — `sequence Auth Flow`, not `chart: sequence`
60
- - **Multiple diagrams are fine** — if the code has both a schema and an API flow, generate both and use `preview_diagram` with multiple entries
@@ -1,128 +0,0 @@
1
- # /dgmo-document-project — Generate Diagrams for a Codebase
2
-
3
- You are generating a suite of DGMO diagrams that document the user's project. Your goal is to read the codebase, understand its architecture, and produce 3–6 diagrams that capture how the system works.
4
-
5
- ## Prerequisites
6
-
7
- Before starting, verify that the DGMO MCP tools are available by calling `mcp__dgmo__list_chart_types`. If the tools are not available, tell the user to run `/dgmo` first to set up the MCP server, then come back to this command.
8
-
9
- ## Step 1 — Understand the Project
10
-
11
- Read these files (skip any that don't exist):
12
-
13
- 1. **README.md** or **README** — project purpose and overview
14
- 2. **package.json** / **Cargo.toml** / **go.mod** / **pyproject.toml** / **requirements.txt** — tech stack and dependencies
15
- 3. **docker-compose.yml** / **Dockerfile** / **k8s/** / **terraform/** — infrastructure
16
- 4. **src/** or **app/** directory listing — code structure
17
- 5. **.env.example** or config files — external services and integrations
18
-
19
- From this, determine:
20
- - What the project does (one sentence)
21
- - The tech stack (language, framework, database, message broker, etc.)
22
- - Key modules or services
23
- - External dependencies and integrations
24
- - Data models (if database-backed)
25
-
26
- ## Step 2 — Decide Which Diagrams to Generate
27
-
28
- Pick 3–6 diagrams based on what the project actually has. Don't force a diagram type that doesn't fit. Use this decision matrix:
29
-
30
- | Signal in codebase | Diagram type | What to show |
31
- |---|---|---|
32
- | Multiple services, APIs, or modules | **c4** (context or container) | System components and their relationships |
33
- | REST/GraphQL endpoints, API handlers | **sequence** | 1–2 key request flows (e.g., auth, main business operation) |
34
- | Database models, ORM entities, schema files | **er** | Entity relationships and key fields |
35
- | Docker, k8s, cloud infra, load balancers | **infra** | Traffic flow and infrastructure components |
36
- | State machines, workflow engines, status fields | **state** | Key state transitions |
37
- | Multiple packages or layers | **flowchart** | Request lifecycle or data flow |
38
- | Microservices with message queues | **sequence** | Async event flow between services |
39
-
40
- **Rules:**
41
- - Always include a C4 context or container diagram — every project benefits from a high-level view
42
- - Prefer sequence diagrams for showing **behavior** (how things interact at runtime)
43
- - Prefer ER diagrams only if there's a real database schema to document
44
- - Don't generate infra diagrams for projects without infrastructure config
45
- - Don't generate more than 2 sequence diagrams — pick the most important flows
46
-
47
- ## Step 3 — Get Syntax Help
48
-
49
- For each diagram type you'll generate, call:
50
-
51
- ```
52
- mcp__dgmo__get_language_reference("<type>")
53
- ```
54
-
55
- Also call `mcp__dgmo__get_examples("<type>")` to see real examples of that chart type. Use these as patterns — they show idiomatic DGMO style.
56
-
57
- ## Step 4 — Generate the Diagrams
58
-
59
- Write the DGMO markup for each diagram. Follow these rules:
60
-
61
- - **Keep diagrams focused** — a C4 diagram with 5–8 components is better than one with 20
62
- - **Use real names from the codebase** — actual service names, model names, endpoint paths
63
- - **Lean on inference** — don't declare participant types unless the name doesn't match (e.g., `User` auto-infers as actor, `PostgresDB` as database)
64
- - **Add tags for color coding** when there are natural groupings (teams, domains, layers)
65
- - **Title every diagram** — the title goes on the first line after the chart type
66
-
67
- ### Syntax reminders (no colons in directives or data):
68
- ```
69
- sequence Auth Flow // first line: type + title
70
- tag Layer as l // tag declaration (use `as`)
71
- Frontend blue // color is trailing token (no parens)
72
- Backend green
73
-
74
- User -POST /login-> API // sync arrow
75
- API ~publish~> Queue // async arrow
76
- note Validates JWT // note (no colon)
77
- ```
78
-
79
- ## Step 5 — Validate Before Rendering
80
-
81
- For each diagram, call `mcp__dgmo__validate_diagram(dgmo)` to check for errors. Fix any issues before proceeding.
82
-
83
- ## Step 6 — Generate the Report
84
-
85
- Once all diagrams validate, bundle them into a report:
86
-
87
- ```
88
- mcp__dgmo__generate_report({
89
- title: "<Project Name> — Architecture Diagrams",
90
- subtitle: "Auto-generated from codebase analysis",
91
- sections: [
92
- { title: "System Context (C4)", description: "High-level view of ...", dgmo: "..." },
93
- { title: "Auth Flow", description: "How authentication works", dgmo: "..." },
94
- ...
95
- ],
96
- theme: "dark",
97
- palette: "slate",
98
- include_source: true,
99
- open: true
100
- })
101
- ```
102
-
103
- ## Step 7 — Save Source Files
104
-
105
- Write each diagram to a `diagrams/` directory in the project root:
106
-
107
- - `diagrams/c4-context.dgmo`
108
- - `diagrams/sequence-auth.dgmo`
109
- - `diagrams/er-schema.dgmo`
110
- - etc.
111
-
112
- Use descriptive filenames. Create the `diagrams/` directory if it doesn't exist.
113
-
114
- ## Step 8 — Report to the User
115
-
116
- Summarize what was generated:
117
-
118
- 1. List each diagram with a one-line description
119
- 2. Mention the HTML report was opened in the browser
120
- 3. Note the saved `.dgmo` files in `diagrams/`
121
- 4. Suggest which diagrams might be worth expanding or adding next
122
-
123
- ## Important Notes
124
-
125
- - This skill works with **any** project — not just TypeScript or JavaScript
126
- - Don't ask the user what diagrams to generate — make the decision based on what you find in the code. They can request changes after.
127
- - If the project is very small (single file, script), generate just 1–2 diagrams instead of forcing 6
128
- - If you can't determine the project structure, ask the user to point you at the main source directory