@diagrammo/dgmo 0.33.0 → 0.35.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/.claude/commands/dgmo.md +17 -32
- package/.github/copilot-instructions.md +1 -1
- package/README.md +7 -1
- package/SKILL.md +1 -1
- package/dist/advanced.cjs +791 -614
- package/dist/advanced.d.cts +8 -51
- package/dist/advanced.d.ts +8 -51
- package/dist/advanced.js +791 -615
- package/dist/auto.cjs +793 -292
- package/dist/auto.js +95 -95
- package/dist/auto.mjs +793 -292
- package/dist/cli.cjs +145 -328
- package/dist/index.cjs +792 -291
- package/dist/index.js +792 -291
- package/docs/ai-integration.md +46 -26
- package/docs/language-reference.md +2 -2
- package/package.json +3 -3
- package/src/advanced.ts +0 -12
- package/src/boxes-and-lines/label-placement.ts +339 -0
- package/src/boxes-and-lines/layout-search.ts +16 -2
- package/src/boxes-and-lines/layout.ts +32 -7
- package/src/boxes-and-lines/renderer.ts +67 -139
- package/src/c4/parser.ts +15 -6
- package/src/chart.ts +1 -1
- package/src/class/parser.ts +6 -2
- package/src/cli-banner.ts +2 -3
- package/src/cli.ts +539 -1223
- package/src/cycle/parser.ts +4 -1
- package/src/dgmo-router.ts +16 -2
- package/src/diagnostics.ts +0 -0
- package/src/echarts.ts +5 -1
- package/src/er/parser.ts +5 -1
- package/src/gantt/parser.ts +13 -4
- package/src/graph/flowchart-parser.ts +5 -1
- package/src/graph/state-parser.ts +5 -1
- package/src/infra/parser.ts +10 -6
- package/src/journey-map/parser.ts +5 -2
- package/src/kanban/parser.ts +6 -2
- package/src/map/context-labels.ts +29 -19
- package/src/map/layout.ts +403 -108
- package/src/map/legend-band.ts +28 -0
- package/src/map/parser.ts +13 -4
- package/src/map/renderer.ts +74 -23
- package/src/map/resolver.ts +2 -2
- package/src/org/parser.ts +8 -2
- package/src/pyramid/parser.ts +4 -1
- package/src/raci/parser.ts +4 -1
- package/src/ring/parser.ts +4 -1
- package/src/sequence/parser.ts +6 -3
- package/src/sitemap/parser.ts +12 -3
- package/src/tech-radar/parser.ts +6 -3
- package/src/utils/parsing.ts +2 -2
- package/src/utils/tag-groups.ts +3 -3
- package/src/visualizations/parse.ts +9 -3
- package/src/migrate/data-comma.ts +0 -117
- package/src/migrate/embedded.ts +0 -238
- package/src/migrate/index.ts +0 -295
- package/src/migrate/line-classifier.ts +0 -128
- package/src/migrate/line-transformer.ts +0 -218
package/.claude/commands/dgmo.md
CHANGED
|
@@ -18,37 +18,15 @@ If the MCP tools are **not** available, run the setup flow below — do not ask
|
|
|
18
18
|
which dgmo || npm install -g @diagrammo/dgmo
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
### Step 2 —
|
|
21
|
+
### Step 2 — Run the one-step installer
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
dgmo install claude-code
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
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
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
> "Where should I configure the MCP server?
|
|
32
|
-
> 1) This project only — write `.mcp.json` here [default]
|
|
33
|
-
> 2) Globally — add to `~/.claude/settings.json` (works in all projects)"
|
|
34
|
-
|
|
35
|
-
**Option 1 (default):** Create or update `.mcp.json` in the current working directory:
|
|
36
|
-
|
|
37
|
-
```json
|
|
38
|
-
{
|
|
39
|
-
"mcpServers": {
|
|
40
|
-
"dgmo": {
|
|
41
|
-
"command": "dgmo-mcp"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If `.mcp.json` already exists and has other servers, merge the `dgmo` entry in — do not overwrite the file.
|
|
48
|
-
|
|
49
|
-
**Option 2 (global):** Add the `dgmo` entry to the `mcpServers` object in `~/.claude/settings.json`. Read the file first and merge — do not overwrite other keys.
|
|
50
|
-
|
|
51
|
-
### Step 4 — Prompt restart
|
|
29
|
+
### Step 3 — Prompt restart
|
|
52
30
|
|
|
53
31
|
Tell the user:
|
|
54
32
|
|
|
@@ -56,7 +34,7 @@ Tell the user:
|
|
|
56
34
|
|
|
57
35
|
Then proceed with the user's original request using CLI fallback (see "Other output options" below).
|
|
58
36
|
|
|
59
|
-
> **
|
|
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.
|
|
60
38
|
|
|
61
39
|
## Project Awareness
|
|
62
40
|
|
|
@@ -89,7 +67,7 @@ For **examples** of real diagrams, call `mcp__dgmo__get_examples("<type>")` —
|
|
|
89
67
|
|
|
90
68
|
### Creating a new diagram
|
|
91
69
|
|
|
92
|
-
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
|
|
70
|
+
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).
|
|
93
71
|
2. **Get syntax + examples** — call `mcp__dgmo__get_language_reference("<type>")` and `mcp__dgmo__get_examples("<type>")`.
|
|
94
72
|
3. **Write the `.dgmo` content** — compose the markup.
|
|
95
73
|
4. **Validate first** — call `mcp__dgmo__validate_diagram(dgmo)` to catch syntax errors before rendering. If errors come back, fix them and validate again.
|
|
@@ -216,19 +194,26 @@ Then tell the user it's been copied. Otherwise, the default is always `open <url
|
|
|
216
194
|
```
|
|
217
195
|
dgmo <input.dgmo> [options]
|
|
218
196
|
cat input.dgmo | dgmo [options]
|
|
197
|
+
dgmo share <input.dgmo> # shareable diagrammo.app URL (copies to clipboard)
|
|
198
|
+
dgmo types # list all supported chart types
|
|
219
199
|
```
|
|
220
200
|
|
|
221
201
|
Key options:
|
|
222
202
|
- `-o <file>` — output file; format inferred from extension (`.svg` → SVG, else PNG)
|
|
223
|
-
- `-o url` — output a shareable diagrammo.app URL
|
|
224
203
|
- `--theme <theme>` — `light` (default), `dark`, `transparent`
|
|
225
204
|
- `--palette <name>` — `slate` (default), `atlas`, `blueprint`, `catppuccin`, `nord`, `tidewater`, `tokyo-night`
|
|
226
|
-
- `--
|
|
227
|
-
- `--chart-types` — list all supported chart types
|
|
205
|
+
- `--json` — output structured JSON
|
|
228
206
|
|
|
229
207
|
## Supported Chart Types
|
|
230
208
|
|
|
231
|
-
|
|
209
|
+
**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.
|
|
210
|
+
|
|
211
|
+
**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:
|
|
212
|
+
|
|
213
|
+
- MCP active: `mcp__dgmo__list_chart_types` (full list + descriptions), and `mcp__dgmo__suggest_chart_type({ prompt })` to pick.
|
|
214
|
+
- MCP unavailable: run `dgmo types` in a terminal.
|
|
215
|
+
|
|
216
|
+
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.
|
|
232
217
|
|
|
233
218
|
## Key Syntax Patterns
|
|
234
219
|
|
|
@@ -573,7 +573,7 @@ The canonical, ordered list lives in `src/chart-types.ts`.
|
|
|
573
573
|
|
|
574
574
|
```bash
|
|
575
575
|
dgmo file.dgmo -o output.svg # SVG
|
|
576
|
-
dgmo file.dgmo
|
|
576
|
+
dgmo share file.dgmo # shareable link (copied to clipboard)
|
|
577
577
|
dgmo file.dgmo --json # structured JSON output
|
|
578
578
|
```
|
|
579
579
|
|
package/README.md
CHANGED
|
@@ -110,7 +110,13 @@ Using a docs framework? First-class plugins wrap all of this:
|
|
|
110
110
|
|
|
111
111
|
## Use it from your AI tool
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
Claude, Cursor, Codex, and other agents can author and render DGMO directly. One command sets up every assistant you have — no second package, no prompts:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
dgmo install
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
It auto-detects Claude Code, Codex, Claude Desktop, Cursor, Windsurf, and Copilot and wires each one to the bundled MCP server. More: **[diagrammo.app/ai](https://diagrammo.app/ai)**.
|
|
114
120
|
|
|
115
121
|
## Chart types
|
|
116
122
|
|
package/SKILL.md
CHANGED