@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.
- package/README.md +1 -1
- package/dist/advanced.d.ts +382 -396
- package/dist/advanced.js +217 -105
- package/dist/auto.js +142 -141
- package/dist/block.js +51 -106
- package/dist/{calculator-ORAKSL5D.js → calculator-M326KQFW.js} +3 -3
- package/dist/{chart-meta-C6UaqhTP.d.ts → chart-meta-D98NbYDp.d.ts} +9 -3
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +44 -46
- package/dist/{charts-d3-FSNSASP7.js → charts-d3-3WMDA5Z5.js} +6 -6
- package/dist/{chunk-ON4MEUC4.js → chunk-23RWHHI5.js} +11 -2
- package/dist/{chunk-SLGHGT76.js → chunk-2CMM36O7.js} +2 -2
- package/dist/{chunk-XVOGT46C.js → chunk-2PTK46E2.js} +2 -2
- package/dist/{chunk-DXSRQLD4.js → chunk-37EHGTQ2.js} +2205 -2019
- package/dist/{chunk-4IFPX4J6.js → chunk-3A2HZBFD.js} +2 -2
- package/dist/{chunk-OJD4FU6H.js → chunk-3A7KMF33.js} +2 -2
- package/dist/{chunk-DKCEG3N6.js → chunk-3HYRJAXO.js} +4 -4
- package/dist/{chunk-V5OBLPLA.js → chunk-3OLO2MZ6.js} +4 -4
- package/dist/{chunk-P3343TTF.js → chunk-3PVUGECM.js} +95 -117
- package/dist/{chunk-Y5KXCKI5.js → chunk-4BEAHH6G.js} +5 -5
- package/dist/{chunk-ZPUVAJTW.js → chunk-4C3BTTOL.js} +4 -4
- package/dist/{chunk-EKKS325Q.js → chunk-4GQ6I46C.js} +2 -2
- package/dist/{chunk-4B5YISOR.js → chunk-536EBUPG.js} +16 -1
- package/dist/{chunk-DKG2ADEN.js → chunk-63WPPHOM.js} +2 -2
- package/dist/{chunk-I53E3L5M.js → chunk-65QX6LYT.js} +3 -3
- package/dist/{chunk-243KZTTS.js → chunk-6BVIZW5N.js} +7 -7
- package/dist/{chunk-6RR4XUOB.js → chunk-7BJQUII6.js} +6 -6
- package/dist/{chunk-X5CJAFZF.js → chunk-7FTGNJQ2.js} +3 -3
- package/dist/{chunk-PTYUSRGT.js → chunk-7QCYHZVO.js} +5 -5
- package/dist/{chunk-ZU2EXJEL.js → chunk-A34FVVVI.js} +2 -2
- package/dist/{chunk-BGBGWFUI.js → chunk-A5FNLWKP.js} +3 -3
- package/dist/{chunk-BG23Y7JD.js → chunk-AFCVHK3G.js} +3 -3
- package/dist/{chunk-QMKFLQL4.js → chunk-AKD3YZ54.js} +3 -3
- package/dist/{chunk-BVPRRSMX.js → chunk-B25BEH3F.js} +3 -3
- package/dist/{chunk-GCZQAT4Z.js → chunk-CHOKOYSC.js} +3 -3
- package/dist/{chunk-2NSR6INI.js → chunk-CSUF6PNF.js} +3 -3
- package/dist/{chunk-ZTSBP3AH.js → chunk-CUYDE77F.js} +3 -3
- package/dist/{chunk-VHO3YBTB.js → chunk-CVVICCSB.js} +24 -2
- package/dist/{chunk-K5L3LXT3.js → chunk-DHIBVN2D.js} +104 -93
- package/dist/{chunk-ZBOSGLES.js → chunk-DJC5M7VC.js} +3 -3
- package/dist/{chunk-6XWZKCVS.js → chunk-DPFCFU2K.js} +3 -3
- package/dist/{chunk-CDIBHGPW.js → chunk-DY4VJYG7.js} +3 -3
- package/dist/{chunk-32G7X6BX.js → chunk-DZZWR6GT.js} +6 -6
- package/dist/{chunk-6YY56KU2.js → chunk-E2GEV3BI.js} +3 -3
- package/dist/{chunk-PSWWCLLI.js → chunk-EK4QX7NQ.js} +3 -3
- package/dist/{chunk-N4NFZIXE.js → chunk-FVYHDZ6Q.js} +2 -2
- package/dist/{chunk-DC3EBYIG.js → chunk-FXLGBUIQ.js} +5 -5
- package/dist/{chunk-VVCYOF3P.js → chunk-HBSKE3ML.js} +3 -3
- package/dist/{chunk-IO436ODZ.js → chunk-HJ6TMHQG.js} +4 -4
- package/dist/{chunk-6F74K4JL.js → chunk-I7IQ2NEJ.js} +3 -3
- package/dist/{chunk-VGFUVFJA.js → chunk-IL5UVUMK.js} +3 -3
- package/dist/{chunk-S5OQWV54.js → chunk-INLEOJIX.js} +2 -2
- package/dist/{chunk-35SOKGIP.js → chunk-JU2VMFYC.js} +2 -2
- package/dist/{chunk-DDQ47BMP.js → chunk-JWJBWNQL.js} +3 -3
- package/dist/{chunk-ZJR2YBVN.js → chunk-KOHIF4LD.js} +2 -2
- package/dist/{chunk-CWOKQSBQ.js → chunk-KRTO7NRK.js} +2 -2
- package/dist/{chunk-TL6WZWSZ.js → chunk-LALFMQ7Q.js} +2 -2
- package/dist/{chunk-MROSEZHE.js → chunk-LFAQ4BLZ.js} +3 -3
- package/dist/{chunk-EYP34TFP.js → chunk-LQR46XGR.js} +2 -2
- package/dist/{chunk-QABZKAKF.js → chunk-LRKGF7RN.js} +6 -6
- package/dist/{chunk-LLA5C2TM.js → chunk-MDI5FMWO.js} +2 -2
- package/dist/{chunk-GZAKQDX7.js → chunk-MRD4QWFK.js} +3 -3
- package/dist/{chunk-EZGWUS5G.js → chunk-NEV5IW33.js} +5 -5
- package/dist/{chunk-HQI7S72D.js → chunk-NKRVFQGO.js} +4 -4
- package/dist/{chunk-V5PHEH2M.js → chunk-NMIWEUIG.js} +2 -2
- package/dist/{chunk-OSXJY6SY.js → chunk-NSJK7F2V.js} +3 -3
- package/dist/{chunk-6KWE5553.js → chunk-O42EAZUV.js} +3 -3
- package/dist/{chunk-LXUBC5H4.js → chunk-OIK6Y2EJ.js} +5 -5
- package/dist/{chunk-EQGLGTU2.js → chunk-OLPWKS5L.js} +3 -3
- package/dist/{chunk-IXY2IPOW.js → chunk-P2PUWV3Y.js} +233 -58
- package/dist/{chunk-4VFQPEC6.js → chunk-PFGJ7SCM.js} +6 -6
- package/dist/{chunk-DNSEG6P2.js → chunk-PJDX4IKR.js} +2 -2
- package/dist/{chunk-JAHV7RFV.js → chunk-PTKCX5ZE.js} +4 -4
- package/dist/{chunk-U5UKFXHB.js → chunk-Q3XVMFVF.js} +2 -2
- package/dist/{chunk-SJT4W23S.js → chunk-QE4GTFZS.js} +2 -2
- package/dist/{chunk-TR7WNZFJ.js → chunk-QFNRHY62.js} +3 -3
- package/dist/{chunk-R53THUTP.js → chunk-QMYJO4EL.js} +4 -4
- package/dist/{chunk-IH3GHOHU.js → chunk-QQADQBKG.js} +4 -4
- package/dist/{chunk-TDZRLG7I.js → chunk-RF5YDIYT.js} +2 -2
- package/dist/{chunk-HFOSP6E2.js → chunk-RKTIIU7Z.js} +3 -3
- package/dist/{chunk-SEDLXFTX.js → chunk-SBOG6R6A.js} +4 -4
- package/dist/{chunk-T7FMXKIG.js → chunk-SF3JAWMY.js} +3 -3
- package/dist/{chunk-GSSCUREO.js → chunk-SMHTYVMK.js} +6 -6
- package/dist/{chunk-SQLVM3G7.js → chunk-SR7NGZNM.js} +4 -4
- package/dist/{chunk-VGCL263O.js → chunk-SSR6JAR3.js} +2 -2
- package/dist/{chunk-HPNOT5GQ.js → chunk-TJCHULP5.js} +2 -2
- package/dist/{chunk-PLDCXGLQ.js → chunk-TRP7PC5Z.js} +5 -5
- package/dist/{chunk-3O3W2JS2.js → chunk-U42ZEK7L.js} +2 -2
- package/dist/{chunk-UYY7MVJK.js → chunk-U7CXUGQS.js} +3 -3
- package/dist/{chunk-IOUUQLDE.js → chunk-UKZ7K5GS.js} +2 -2
- package/dist/{chunk-X5AIFXB7.js → chunk-USHDV2AF.js} +4 -4
- package/dist/{chunk-TJV3J74Y.js → chunk-UTOELEK2.js} +3 -3
- package/dist/{chunk-E5G55SYS.js → chunk-UZ3JPYD3.js} +3 -3
- package/dist/{chunk-ZP2FV4WO.js → chunk-VWCGN2ST.js} +3 -3
- package/dist/{chunk-W2Z4KS72.js → chunk-VXBEG3IB.js} +3 -3
- package/dist/{chunk-Z4RFILRE.js → chunk-W32HMBPW.js} +3 -3
- package/dist/{chunk-KZFAEMQQ.js → chunk-X2X7MTKH.js} +3 -3
- package/dist/{chunk-5USRKIR3.js → chunk-X4FCKGK2.js} +4 -4
- package/dist/{chunk-MM4Z32EH.js → chunk-XC7BUB3P.js} +2 -2
- package/dist/{chunk-XS7CL7NX.js → chunk-XHFXA6RP.js} +2 -2
- package/dist/{chunk-JQDZHYGU.js → chunk-XJZCXNWR.js} +3 -3
- package/dist/{chunk-XZXXSZ7E.js → chunk-YJCILMEA.js} +4 -4
- package/dist/{chunk-GSVHOF3J.js → chunk-YXI6Y7YY.js} +2 -2
- package/dist/cloud-reference.d.ts +24 -4
- package/dist/cloud-reference.js +5 -1
- package/dist/completion-registry.js +5 -7
- package/dist/{registry-C0HvobTb.d.ts → dgmo-router-Dd5PTjxl.d.ts} +271 -98
- package/dist/dgmo-router-Z5N6QLIC.js +89 -0
- package/dist/{dimensions-PC6WLKCC.js → dimensions-ES6O2T4H.js} +6 -6
- package/dist/editor.d.ts +9 -2
- package/dist/editor.js +229 -57
- package/dist/element.js +143 -142
- package/dist/{flowchart-parser-PZQY2UC4.js → flowchart-parser-T4XZRSA7.js} +4 -4
- package/dist/{flowchart-renderer-RS6IRRE7.js → flowchart-renderer-XFDCX7MZ.js} +5 -5
- package/dist/highlight.js +229 -57
- package/dist/index.d.ts +21 -10
- package/dist/index.js +55 -66
- package/dist/{layout-GKWT37FH.js → layout-H4H4OFE4.js} +3 -3
- package/dist/{layout-W423CCED.js → layout-OH4VQ3OI.js} +4 -4
- package/dist/{layout-LH6LNIUV.js → layout-QTZO6CW5.js} +3 -3
- package/dist/{layout-AUAW5U74.js → layout-SKQMIXTG.js} +4 -4
- package/dist/{layout-GU6POUGD.js → layout-UU4VJTOP.js} +4 -4
- package/dist/{layout-MNQZ3Q45.js → layout-WCOEZPOI.js} +4 -4
- package/dist/live-link-resolve.js +1 -1
- package/dist/{parser-NJGZF5MK.js → parser-2BGDJJ2L.js} +5 -5
- package/dist/{parser-3QHLZK6F.js → parser-2K4Z7RNT.js} +3 -3
- package/dist/{parser-6HT34DZ3.js → parser-3KFNCRLD.js} +4 -4
- package/dist/{parser-WXZU47Z4.js → parser-4CMMKTRS.js} +3 -3
- package/dist/{parser-BNGLB2VS.js → parser-56746U6W.js} +4 -4
- package/dist/{parser-56HMQG5C.js → parser-5JS6VM6L.js} +5 -5
- package/dist/{parser-2OJSWKXO.js → parser-5ZUEF4WE.js} +4 -4
- package/dist/{parser-7C5GZCAU.js → parser-63BQDUWB.js} +4 -4
- package/dist/{parser-TPCKCQ4Z.js → parser-6VNVZO5F.js} +4 -4
- package/dist/{parser-6S65S3DX.js → parser-AZZHRVJF.js} +4 -4
- package/dist/{parser-WI2B7IL3.js → parser-BGX5ODHF.js} +3 -3
- package/dist/{parser-TABGTEHH.js → parser-DLUOCPMD.js} +3 -3
- package/dist/{parser-CXLR6MAY.js → parser-DSNINT2K.js} +3 -3
- package/dist/{parser-RMUGOZO3.js → parser-FTC7FZ6Z.js} +4 -4
- package/dist/{parser-5I7W54EA.js → parser-GHLWPCIX.js} +4 -4
- package/dist/{parser-BVC642CN.js → parser-J75RSQFI.js} +4 -4
- package/dist/{parser-IWQQY5VU.js → parser-JZPSIWRC.js} +4 -4
- package/dist/{parser-QCSDU4FU.js → parser-KN7H2RQC.js} +3 -3
- package/dist/{parser-4QYDFXV2.js → parser-KRF4S5RW.js} +4 -4
- package/dist/{parser-4OU5P3BM.js → parser-KSIYWKYF.js} +4 -4
- package/dist/{parser-UB6XGLTC.js → parser-MCUKPCYE.js} +4 -4
- package/dist/{parser-G7KP6LZH.js → parser-MUYBWGUB.js} +3 -3
- package/dist/{parser-QCYEJOLZ.js → parser-NWERESX3.js} +4 -4
- package/dist/{parser-63LK7YBR.js → parser-OEBFJHT4.js} +5 -5
- package/dist/{parser-DROHJTBZ.js → parser-P7T2BGAI.js} +4 -4
- package/dist/{parser-7W7DPIGR.js → parser-RAKD267X.js} +4 -4
- package/dist/{parser-AD5OAVX6.js → parser-RBY2UFTE.js} +3 -3
- package/dist/{parser-5BHZMV3O.js → parser-SRUPRH77.js} +4 -4
- package/dist/{parser-QJ7XK7AB.js → parser-SSUMVOJA.js} +4 -4
- package/dist/{parser-BLCDJB7N.js → parser-UKQC7N6K.js} +4 -4
- package/dist/{parser-AWO3N6YH.js → parser-VMGTNHP2.js} +3 -3
- package/dist/{parser-55CSWK3N.js → parser-WHDC7OV2.js} +4 -4
- package/dist/{parser-453DEZ4P.js → parser-YO2JBE52.js} +4 -4
- package/dist/{renderer-G24W6J6H.js → renderer-2DKA5QXA.js} +4 -4
- package/dist/{renderer-66YB63F4.js → renderer-2PGIIOFN.js} +7 -7
- package/dist/{renderer-RH5OJ6Q6.js → renderer-35F3XMZH.js} +5 -5
- package/dist/{renderer-3Z5MSBWR.js → renderer-4RQ5PGHY.js} +6 -6
- package/dist/{renderer-LGSSP3JI.js → renderer-62FFDWMY.js} +6 -6
- package/dist/{renderer-SHMFNFE4.js → renderer-63MLWS6L.js} +7 -7
- package/dist/{renderer-GFZT6Q5F.js → renderer-6QW5OAJG.js} +5 -5
- package/dist/renderer-A5GFW2XH.js +76 -0
- package/dist/{renderer-H5C2JN62.js → renderer-AMCTCBV3.js} +5 -5
- package/dist/{renderer-PGMTAQIE.js → renderer-AS6LLDZM.js} +5 -5
- package/dist/{renderer-YYG4LYKS.js → renderer-AVR3LBTS.js} +6 -6
- package/dist/{renderer-LPQUBMXZ.js → renderer-BBBN7QNX.js} +4 -4
- package/dist/{renderer-DQLSUTSU.js → renderer-CHHYNEK7.js} +5 -5
- package/dist/{renderer-J76L474X.js → renderer-CU6BEHHV.js} +3 -3
- package/dist/{renderer-NE2GQBAU.js → renderer-CXRSD26Q.js} +7 -7
- package/dist/{renderer-JO27QMZB.js → renderer-DJ5DP3RH.js} +5 -5
- package/dist/{renderer-ZMAPGMF2.js → renderer-DRLZELXM.js} +5 -5
- package/dist/{renderer-BTFZWWIG.js → renderer-GESKWINV.js} +7 -7
- package/dist/{renderer-RB4FJJYN.js → renderer-IG5PQXEM.js} +7 -7
- package/dist/{renderer-PTLCAUC6.js → renderer-JBF2PAVP.js} +5 -5
- package/dist/{renderer-RRIXAQSF.js → renderer-JL7L5Y5M.js} +5 -5
- package/dist/{renderer-A3QD5R2C.js → renderer-JSFWNV37.js} +6 -6
- package/dist/{renderer-U55GLRDJ.js → renderer-M7YOXAGC.js} +3 -3
- package/dist/{renderer-5INUWSXC.js → renderer-Q2YHQQSN.js} +8 -8
- package/dist/{renderer-2HFRMVHO.js → renderer-RN5ZFIEK.js} +6 -6
- package/dist/{renderer-CQWF3JE3.js → renderer-TDFRMG3O.js} +3 -3
- package/dist/{renderer-MFD57VGM.js → renderer-UTXVIAS7.js} +5 -5
- package/dist/{renderer-S7ZTD4XM.js → renderer-VYMTBSF4.js} +7 -7
- package/dist/{renderer-NVT3RP5Q.js → renderer-XSHOMUJQ.js} +7 -7
- package/dist/{renderer-T4DY572A.js → renderer-ZHBFOSK5.js} +5 -5
- package/dist/{renderer-radial-2DDUIUWA.js → renderer-radial-4J2KO4GZ.js} +6 -6
- package/dist/{resolver-W3WKLWDP.js → resolver-ZLYSMILY.js} +3 -3
- package/dist/{state-parser-PNC2IHIA.js → state-parser-3U4232LJ.js} +5 -5
- package/dist/{state-renderer-QGPK55TI.js → state-renderer-GBHDOEXR.js} +7 -7
- package/dist/{themes-l406Vj2z.d.ts → themes-DiUAG4Bf.d.ts} +37 -2
- package/docs/ai-integration.md +5 -5
- package/docs/language-reference.md +1 -1
- package/package.json +2 -21
- package/.claude/commands/dgmo-codebase-report.md +0 -172
- package/.claude/commands/dgmo-diagram-this.md +0 -60
- package/.claude/commands/dgmo-document-project.md +0 -128
- package/.claude/commands/dgmo.md +0 -313
- package/.cursorrules +0 -587
- package/.github/copilot-instructions.md +0 -597
- package/.windsurfrules +0 -587
- package/SKILL.md +0 -573
- package/dist/auto.d.ts +0 -60
- package/dist/auto.mjs +0 -88591
- package/dist/chunk-6MTWIQVO.js +0 -121
- package/dist/chunk-ZEIYC7XO.js +0 -229
- package/dist/cli.cjs +0 -489
- package/dist/dgmo-router-JD7THHB7.js +0 -90
- package/dist/element.d.ts +0 -68
- package/dist/element.mjs +0 -88457
- package/dist/load-data-EHDDZ5ZS.js +0 -8
- package/dist/renderer-MDCH52MC.js +0 -77
package/.claude/commands/dgmo.md
DELETED
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
# dgmo — Diagrammo Diagram Assistant
|
|
2
|
-
|
|
3
|
-
You are helping the user author, render, and share diagrams using the `dgmo` CLI and `.dgmo` file format.
|
|
4
|
-
|
|
5
|
-
## What is dgmo?
|
|
6
|
-
|
|
7
|
-
`dgmo` is a CLI tool and library that renders `.dgmo` diagram files to PNG, SVG, or shareable URLs. Diagrams are written in a plain-text DSL.
|
|
8
|
-
|
|
9
|
-
## Setup Check — Run This First
|
|
10
|
-
|
|
11
|
-
**Before doing anything else**, check whether the MCP tools are available in this session by attempting to call `mcp__dgmo__list_chart_types`. If that tool exists and succeeds, skip this section entirely.
|
|
12
|
-
|
|
13
|
-
If the MCP tools are **not** available, run the setup flow below — do not ask the user, just do it:
|
|
14
|
-
|
|
15
|
-
### Step 1 — Install the CLI (if missing)
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
which dgmo || npm install -g @diagrammo/dgmo
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Step 2 — Run the one-step installer
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
dgmo install claude-code
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
That single command writes this skill, configures the MCP server in `~/.claude/settings.json` (entry: `{ "command": "dgmo", "args": ["mcp"] }`), and ensures the server is available — no prompts, no separate `dgmo-mcp` package to install. (Use `--scope project` to write `.mcp.json` in the current directory instead of the global settings.)
|
|
28
|
-
|
|
29
|
-
### Step 3 — Prompt restart
|
|
30
|
-
|
|
31
|
-
Tell the user:
|
|
32
|
-
|
|
33
|
-
> "Done. **Restart Claude Code** to activate the MCP server — diagram preview and rendering will be available in the next session."
|
|
34
|
-
|
|
35
|
-
Then proceed with the user's original request using CLI fallback (see "Other output options" below).
|
|
36
|
-
|
|
37
|
-
> **One-step from a fresh machine:** `dgmo install` with no target auto-detects and sets up every AI assistant you have (Claude Code, Codex, Claude Desktop, Cursor, Windsurf, Copilot) at once.
|
|
38
|
-
|
|
39
|
-
## Project Awareness
|
|
40
|
-
|
|
41
|
-
At the start of a session (or when the user first invokes `/dgmo`), scan for existing `.dgmo` files:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
find . -name '*.dgmo' -not -path '*/node_modules/*' -not -path '*/.git/*' 2>/dev/null | head -20
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If you find any, mention them briefly: "I see N diagrams in your project (e.g. `diagrams/auth-flow.dgmo`, `diagrams/er-schema.dgmo`). I can edit any of these or create new ones."
|
|
48
|
-
|
|
49
|
-
Don't block on this — if no files found, just proceed.
|
|
50
|
-
|
|
51
|
-
## Getting Syntax Help
|
|
52
|
-
|
|
53
|
-
**Always use the MCP tool first** if it's available in this session:
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
mcp__dgmo__get_language_reference // full reference
|
|
57
|
-
mcp__dgmo__get_language_reference("sequence") // specific chart type
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
This is the authoritative, always-up-to-date syntax reference. Use it before guessing syntax.
|
|
61
|
-
|
|
62
|
-
For **examples** of real diagrams, call `mcp__dgmo__get_examples("<type>")` — these are curated gallery fixtures that show idiomatic DGMO patterns. Use them as few-shot references when generating.
|
|
63
|
-
|
|
64
|
-
## Your Workflow
|
|
65
|
-
|
|
66
|
-
**Primary goal: get the user seeing a visualization as fast as possible — in the desktop app if they have it, otherwise on the web.**
|
|
67
|
-
|
|
68
|
-
### Where the diagram goes — decide this once per session
|
|
69
|
-
|
|
70
|
-
Before showing the first diagram, call `mcp__dgmo__check_app_installed()` **once** and remember the answer for the rest of the session. It decides your default visual output:
|
|
71
|
-
|
|
72
|
-
- **App installed → open the saved file live in the app.** Save the `.dgmo` source first (see "Always save the source"), then `mcp__dgmo__open_in_app({ dgmo, filePath: "<absolute path to the saved file>" })`. The app opens *that file*, so the user edits it in the app and changes autosave back to the same file — one source of truth, live re-render. Do NOT open an online URL and do NOT render a PNG.
|
|
73
|
-
- **App not installed → open the online editor.** `mcp__dgmo__share_diagram(dgmo)` then `open <url>` in the shell. This lands the user on online.diagrammo.app with the chart and the code side-by-side, tweakable and shareable. Don't just print the URL — always `open` it.
|
|
74
|
-
|
|
75
|
-
**Always save the source.** Whether or not the app is installed, write the diagram to `<name>.dgmo` in the current project/working directory so the user always has one editable artifact. Use a short kebab-case name from the diagram's title (e.g. `checkout-flow.dgmo`). This file IS the deliverable; the app or URL just displays it.
|
|
76
|
-
|
|
77
|
-
**Never render an image unless the user explicitly asks** (see "Image output"). A PNG/SVG is not a default output — don't create files the user didn't request.
|
|
78
|
-
|
|
79
|
-
Don't ask the user how they want to view the diagram — the check above decides it. They can ask for a PNG, the desktop app, or a share URL explicitly if they want something else.
|
|
80
|
-
|
|
81
|
-
### Creating a new diagram
|
|
82
|
-
|
|
83
|
-
1. **Pick the right chart type** — always call `mcp__dgmo__suggest_chart_type({ prompt: <user's request> })` first. It returns up to 3 ranked candidates with a confidence banner and matched trigger phrases. Use the top match unless you have a strong reason to override it. If the MCP tool is unavailable (Setup Check fallback path), run `dgmo types` in a terminal and pick from that list — do not pick from memory or assume a requested type is unsupported (see "Supported Chart Types" below).
|
|
84
|
-
2. **Get syntax + examples** — call `mcp__dgmo__get_language_reference("<type>")` and `mcp__dgmo__get_examples("<type>")`.
|
|
85
|
-
3. **Write the `.dgmo` content** — compose the markup.
|
|
86
|
-
4. **Validate first** — call `mcp__dgmo__validate_diagram(dgmo)` to catch syntax errors before rendering. If errors come back, fix them and validate again.
|
|
87
|
-
5. **Save the source** — write the validated markup to `<name>.dgmo` in the working directory.
|
|
88
|
-
6. **Show it** — per "Where the diagram goes": app installed → `mcp__dgmo__open_in_app({ dgmo, filePath })`; not installed → `mcp__dgmo__share_diagram(dgmo)` + `open <url>`.
|
|
89
|
-
|
|
90
|
-
**Exception — image-output intent detected:** if the user's prompt explicitly asks for an image or saved file (phrases like "save as PNG", "export to SVG", "make an image", "render to a file", "give me a png", "I need an SVG"), still save the `.dgmo` source, then go to `mcp__dgmo__render_diagram` (see "Image output") instead of step 6. Detection is intent-based — if in doubt, use the step-6 default and offer "Want me to save as PNG/SVG instead?"
|
|
91
|
-
|
|
92
|
-
**Side-by-side variants** use `mcp__dgmo__preview_diagram` (multi-diagram preview is its killer feature). See "Side-by-side variants" below.
|
|
93
|
-
|
|
94
|
-
### Editing an existing diagram
|
|
95
|
-
|
|
96
|
-
When the user asks to modify a `.dgmo` file or says "update this diagram":
|
|
97
|
-
|
|
98
|
-
1. **Read the file** — use the Read tool to get the current content.
|
|
99
|
-
2. **Understand it** — identify the chart type, key elements, and structure.
|
|
100
|
-
3. **Make the change** — edit the file using the Edit tool. Preserve the user's style and organization.
|
|
101
|
-
4. **Validate** — call `mcp__dgmo__validate_diagram(dgmo)` on the updated content.
|
|
102
|
-
5. **Show it** — per "Where the diagram goes": app installed → `mcp__dgmo__open_in_app({ dgmo, filePath: "<the file you just edited>" })` so it re-renders live in the app; not installed → `mcp__dgmo__share_diagram(dgmo)` + `open <url>`. (Image-output exception applies — if the user asked for a PNG/SVG file explicitly, render to file instead.)
|
|
103
|
-
|
|
104
|
-
Keep the diff minimal — don't rewrite the whole file when adding one element.
|
|
105
|
-
|
|
106
|
-
### Diagramming from code
|
|
107
|
-
|
|
108
|
-
When the user says "diagram this", "diagram this file", or "show me how X works":
|
|
109
|
-
|
|
110
|
-
1. **Read the relevant source code** — the file, function, or module they're pointing at.
|
|
111
|
-
2. **Choose the best diagram type** based on what the code does:
|
|
112
|
-
- API handler / controller → `sequence` showing the request flow
|
|
113
|
-
- Database models / ORM entities → `er` showing relationships
|
|
114
|
-
- State machine / status enum → `state` showing transitions
|
|
115
|
-
- Module imports / service dependencies → `c4` or `flowchart`
|
|
116
|
-
- Infrastructure config (Docker, k8s, terraform) → `infra`
|
|
117
|
-
3. **Extract real names** — use actual function names, service names, model names from the code.
|
|
118
|
-
4. **Generate, validate, preview** — same as creating a new diagram.
|
|
119
|
-
|
|
120
|
-
### Error recovery
|
|
121
|
-
|
|
122
|
-
When `validate_diagram` or `render_diagram` returns errors:
|
|
123
|
-
|
|
124
|
-
1. **Read the error messages** — they include line numbers and descriptions.
|
|
125
|
-
2. **Fix the specific issues** — don't regenerate from scratch unless there are many errors.
|
|
126
|
-
3. **Validate again** — loop until clean.
|
|
127
|
-
4. **Then render** — only call `share_diagram` (default), `preview_diagram` (variants), or `render_diagram` (files) after validation passes.
|
|
128
|
-
|
|
129
|
-
Common fixes:
|
|
130
|
-
- "Unknown directive" → check spelling, remove colons from directives
|
|
131
|
-
- "Expected number" → data rows use spaces not colons: `Label 100` not `Label: 100`
|
|
132
|
-
- Duplicate name → parentheses strip color from display name; `App (TS)` and `App (Rust)` both become `App`
|
|
133
|
-
|
|
134
|
-
### Side-by-side variants
|
|
135
|
-
|
|
136
|
-
When the user asks to compare layouts, themes, or approaches:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
mcp__dgmo__preview_diagram([
|
|
140
|
-
{ title: "Option A — Detailed", dgmo: "..." },
|
|
141
|
-
{ title: "Option B — Simplified", dgmo: "..." }
|
|
142
|
-
])
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
This opens a single page with both diagrams. Use this for:
|
|
146
|
-
- Light vs dark theme comparisons
|
|
147
|
-
- Different levels of detail
|
|
148
|
-
- Alternative structures for the same data
|
|
149
|
-
|
|
150
|
-
### Image output (when the user explicitly asks for an image/file)
|
|
151
|
-
|
|
152
|
-
Trigger phrases: "save as PNG", "export to SVG", "make an image", "render to a file", "give me a PNG", "I need an SVG", "generate an image". For these, skip the share URL and go straight to file output:
|
|
153
|
-
|
|
154
|
-
| Intent | How to do it |
|
|
155
|
-
|---|---|
|
|
156
|
-
| **Save as PNG** | `mcp__dgmo__render_diagram(dgmo, format:"png", theme:"dark", palette:"nord")` → returns temp path; offer to copy to their preferred location. Or CLI: `dgmo file.dgmo -o out.png --theme dark --palette nord` |
|
|
157
|
-
| **Save as SVG** | `mcp__dgmo__render_diagram(dgmo, format:"svg", theme:"dark", palette:"nord")` returns SVG text — write it to the desired path. Or CLI: `dgmo file.dgmo -o out.svg --theme dark --palette nord` |
|
|
158
|
-
| **View in macOS Preview** | `mcp__dgmo__render_diagram(dgmo, format:"png", theme:"dark", palette:"nord")` → get temp path → `open <path>` |
|
|
159
|
-
|
|
160
|
-
### Other output options (when explicitly requested)
|
|
161
|
-
|
|
162
|
-
| What the user wants | How to do it |
|
|
163
|
-
|---|---|
|
|
164
|
-
| **Open in the desktop app (no saved file)** | `mcp__dgmo__open_in_app({ dgmo })` — deep-links an ephemeral copy into Diagrammo. Prefer the `filePath` form (open the saved file) whenever you've saved the source. |
|
|
165
|
-
| **Force the online editor even though the app is installed** | `mcp__dgmo__share_diagram(dgmo)` + `open <url>` |
|
|
166
|
-
| **Local HTML preview (not online.diagrammo.app)** | `mcp__dgmo__preview_diagram([{dgmo, title}])` — useful when the user specifically wants a local file or is offline |
|
|
167
|
-
| **Copy markup to clipboard** | Run `echo '<dgmo markup>' \| pbcopy` |
|
|
168
|
-
|
|
169
|
-
(The default visual output is decided by `check_app_installed` — open the saved file in the app when installed, otherwise the online share URL. See "Where the diagram goes" above. The options here are for when the user explicitly asks for something else.)
|
|
170
|
-
|
|
171
|
-
### Embedding diagrams in docs
|
|
172
|
-
|
|
173
|
-
When the user wants a diagram in a README, PR description, or markdown file:
|
|
174
|
-
|
|
175
|
-
1. **Generate a share URL** — `mcp__dgmo__share_diagram(dgmo)` returns a `diagrammo.app` URL.
|
|
176
|
-
2. **Render a PNG** — `mcp__dgmo__render_diagram(dgmo, format:"png", theme:"light", palette:"nord")` returns a temp path.
|
|
177
|
-
3. **Insert into markdown** — either:
|
|
178
|
-
- Copy the PNG to the project (e.g. `docs/images/auth-flow.png`) and reference it: ``
|
|
179
|
-
- Use the share URL directly: ``
|
|
180
|
-
4. **For PRs** — prefer share URLs (no binary file to commit). For README/docs — prefer committed PNGs (they work offline).
|
|
181
|
-
|
|
182
|
-
Always generate both light and dark variants if the doc will be viewed in both modes, or use `theme:"transparent"` for universal backgrounds.
|
|
183
|
-
|
|
184
|
-
### Batch rendering
|
|
185
|
-
|
|
186
|
-
When the user asks to render all diagrams in a directory:
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
for f in diagrams/*.dgmo; do dgmo "$f" -o "${f%.dgmo}.png" --theme dark --palette nord; done
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
Or for SVG: replace `.png` with `.svg` in the output.
|
|
193
|
-
|
|
194
|
-
### Share link to clipboard (when the user asks for the URL without opening)
|
|
195
|
-
|
|
196
|
-
If the user wants the link in clipboard rather than opened (e.g., they want to paste it into Slack themselves), after generating the share link:
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
echo '<url>' | pbcopy
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Then tell the user it's been copied. Otherwise, the default visual output is the app-aware behavior from "Where the diagram goes" (open the saved file in the app when installed, else `open <url>`).
|
|
203
|
-
|
|
204
|
-
## CLI Reference
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
dgmo <input.dgmo> [options]
|
|
208
|
-
cat input.dgmo | dgmo [options]
|
|
209
|
-
dgmo share <input.dgmo> # shareable diagrammo.app URL (copies to clipboard)
|
|
210
|
-
dgmo types # list all supported chart types
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
Key options:
|
|
214
|
-
- `-o <file>` — output file; format inferred from extension (`.svg` → SVG, else PNG)
|
|
215
|
-
- `--theme <theme>` — `light` (default), `dark`, `transparent`
|
|
216
|
-
- `--palette <name>` — `slate` (default), `atlas`, `blueprint`, `catppuccin`, `nord`, `tidewater`, `tokyo-night`
|
|
217
|
-
- `--json` — output structured JSON
|
|
218
|
-
|
|
219
|
-
## Supported Chart Types
|
|
220
|
-
|
|
221
|
-
**There are ~45 chart types. The authoritative, complete list comes ONLY from the live tool — never from memory and never from any prose list in this skill.** Any chart types named elsewhere in this document (in examples, tips, or the "diagram this" table) are illustrative, NOT the full set. dgmo supports many specialized types people don't expect — including `journey-map`, `mindmap`, `pert`, `raci`, `pyramid`, `wireframe`, `ring`, `tech-radar`, `cycle`, and more.
|
|
222
|
-
|
|
223
|
-
**Hard rule:** before telling the user a chart type "doesn't exist," isn't supported, or that you'll use "the closest fit instead" — you MUST first query the live list:
|
|
224
|
-
|
|
225
|
-
- MCP active: `mcp__dgmo__list_chart_types` (full list + descriptions), and `mcp__dgmo__suggest_chart_type({ prompt })` to pick.
|
|
226
|
-
- MCP unavailable: run `dgmo types` in a terminal.
|
|
227
|
-
|
|
228
|
-
If the user asks for a named visualization (e.g. "user journey", "mind map", "RACI matrix"), assume dgmo supports it and verify against the live list — do not substitute a different type unless the list confirms the requested one is genuinely absent.
|
|
229
|
-
|
|
230
|
-
## Key Syntax Patterns
|
|
231
|
-
|
|
232
|
-
### Common to all diagrams
|
|
233
|
-
|
|
234
|
-
```
|
|
235
|
-
sequence Auth Flow // first line: chart type + optional title
|
|
236
|
-
palette catppuccin // directives are space-separated (no colon)
|
|
237
|
-
|
|
238
|
-
// This is a comment (only // syntax — not #)
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
Inline colors on most elements: append `(colorname)` — e.g. `North(red) 850`, `[Process(blue)]`.
|
|
242
|
-
Named colors: `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `teal`, `cyan`, `gray`.
|
|
243
|
-
|
|
244
|
-
### Per-chart-type syntax
|
|
245
|
-
|
|
246
|
-
For every specific chart type (sequence, flowchart, bar/line/pie, scatter, er, org, infra, slope, timeline, gantt, c4, class, venn, quadrant, sankey/chord, state, boxes-and-lines, and the rest), do not guess from prior knowledge — call the MCP tools:
|
|
247
|
-
|
|
248
|
-
```
|
|
249
|
-
mcp__dgmo__get_language_reference("<type>") // authoritative grammar + directives
|
|
250
|
-
mcp__dgmo__get_examples("<type>") // real starter templates from the gallery
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Both ship inside `@diagrammo/dgmo` and always reflect the installed version, so they never drift from the actual parsers. This replaces the per-type sections that used to live here and went stale every time a chart type's syntax evolved.
|
|
254
|
-
|
|
255
|
-
## Anti-Patterns
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
# comment ❌ use // comment
|
|
259
|
-
async A -> B: msg ❌ use A ~msg~> B
|
|
260
|
-
A <- B ❌ left-pointing arrows removed — use B -> A
|
|
261
|
-
parallel else ❌ not supported — use separate parallel blocks
|
|
262
|
-
== Foo(#ff0000) == ❌ hex colors not supported — use named colors: == Foo(red) ==
|
|
263
|
-
A -routes to /api-> B ❌ -> inside a label is ambiguous — rephrase the label
|
|
264
|
-
end ❌ not needed — indentation closes blocks in sequence diagrams
|
|
265
|
-
chart: sequence ❌ use `sequence Title` as the first line (no colon)
|
|
266
|
-
title: My Diagram ❌ title goes on the first line after chart type
|
|
267
|
-
series: A, B ❌ use `series A, B` (no colon)
|
|
268
|
-
Label: 100 ❌ use `Label 100` (no colon in data rows)
|
|
269
|
-
tag: Group ❌ use `tag Group` (no colon)
|
|
270
|
-
note: text ❌ use `note text` (no colon)
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**Data-chart style (back-compat tolerated, but not idiomatic — don't generate these):**
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
Q1 100, 200, 300 ⚠ prefer space-separated: `Q1 100 200 300`
|
|
277
|
-
series A (red), B (blue), C (green) ⚠ for ≥2 series, prefer the indented block:
|
|
278
|
-
series
|
|
279
|
-
A (red)
|
|
280
|
-
B (blue)
|
|
281
|
-
C (green)
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
## Tips
|
|
285
|
-
|
|
286
|
-
- Output target: call `mcp__dgmo__check_app_installed()` once per session. App installed → save the `.dgmo` and open that file live in the app (`open_in_app` with `filePath`); not installed → online share URL. Always save the source either way; never render a PNG unless asked.
|
|
287
|
-
- Default palette: `slate` — use it unless the user requests otherwise.
|
|
288
|
-
- Always validate before rendering — `validate_diagram` is much faster than a failed render.
|
|
289
|
-
- Always call `get_examples` before generating an unfamiliar chart type — real examples beat guessing.
|
|
290
|
-
- Stdin mode for quick renders: `echo "..." | dgmo -o out.png`
|
|
291
|
-
- When auto-detection picks the wrong chart type, add an explicit type as the first word on the first line.
|
|
292
|
-
- `mcp__dgmo__preview_diagram` accepts multiple diagrams at once — useful for showing variants side by side.
|
|
293
|
-
- When the user says "diagram this" while looking at code, read the code first and pick the chart type yourself — don't ask.
|
|
294
|
-
|
|
295
|
-
## Related Commands
|
|
296
|
-
|
|
297
|
-
Tell the user about these when relevant:
|
|
298
|
-
|
|
299
|
-
- **`/dgmo-diagram-this`** — Point it at a file, function, or module and it generates the right diagram from the code. Use when the user says "diagram this" or "how does this work?"
|
|
300
|
-
- **`/dgmo-document-project`** — Scans the entire codebase and generates a suite of 3–6 architecture diagrams (C4, sequence, ER, infra) as an HTML report. Use when the user wants project documentation.
|
|
301
|
-
|
|
302
|
-
## AI Integrations Beyond Claude Code
|
|
303
|
-
|
|
304
|
-
DGMO works with other AI tools too. If the user asks about using Diagrammo with other editors or AI assistants, point them to **https://diagrammo.app/ai** which covers:
|
|
305
|
-
|
|
306
|
-
- **Cursor** — `.cursorrules` file provides DGMO syntax context to the AI
|
|
307
|
-
- **Windsurf** — `.windsurfrules` file works the same way with Cascade
|
|
308
|
-
- **GitHub Copilot** — `.github/copilot-instructions.md` teaches Copilot the syntax
|
|
309
|
-
- **OpenAI Codex CLI** — `AGENTS.md` + `.codex/config.toml` configuration
|
|
310
|
-
|
|
311
|
-
These context files are already included in the `@diagrammo/dgmo` npm package. For any project using dgmo as a dependency, the AI tool picks them up automatically.
|
|
312
|
-
|
|
313
|
-
The MCP server (`@diagrammo/dgmo-mcp`) also works with **Claude Desktop** and any MCP-compatible client — not just Claude Code.
|