@diagrammo/dgmo 0.61.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 +135 -21
- package/dist/auto.js +143 -142
- package/dist/block.js +6 -5
- package/dist/{chart-meta-gUwAzi7N.d.ts → chart-meta-D98NbYDp.d.ts} +1 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +1 -1
- package/dist/{charts-d3-MN6QCYKU.js → charts-d3-3WMDA5Z5.js} +3 -3
- package/dist/{chunk-OPBZYISB.js → chunk-37EHGTQ2.js} +2204 -2018
- package/dist/{chunk-ZDFIY6WX.js → chunk-3PVUGECM.js} +1 -2
- package/dist/{chunk-6CWNVQPW.js → chunk-4C3BTTOL.js} +2 -2
- package/dist/{chunk-4B5YISOR.js → chunk-536EBUPG.js} +16 -1
- package/dist/{chunk-VHO3YBTB.js → chunk-CVVICCSB.js} +24 -2
- package/dist/{chunk-BSJIPMPG.js → chunk-DHIBVN2D.js} +28 -17
- package/dist/{chunk-MOT3NXB5.js → chunk-FVYHDZ6Q.js} +2 -2
- package/dist/{chunk-S23HOUJS.js → chunk-JU2VMFYC.js} +2 -2
- package/dist/{chunk-5PWIV7ZF.js → chunk-LFAQ4BLZ.js} +2 -2
- package/dist/{chunk-DNSEG6P2.js → chunk-PJDX4IKR.js} +2 -2
- package/dist/{chunk-2WPLOS4Q.js → chunk-USHDV2AF.js} +2 -2
- package/dist/{registry-Ch0Umdi1.d.ts → dgmo-router-Dd5PTjxl.d.ts} +98 -98
- package/dist/{dgmo-router-UVYAJCAF.js → dgmo-router-Z5N6QLIC.js} +2 -2
- package/dist/{dimensions-QCPOPPKE.js → dimensions-ES6O2T4H.js} +4 -4
- package/dist/element.js +144 -143
- package/dist/index.d.ts +21 -10
- package/dist/index.js +10 -20
- package/dist/{renderer-IYMA5W7X.js → renderer-A5GFW2XH.js} +4 -4
- package/dist/{renderer-R6OKKSVR.js → renderer-Q2YHQQSN.js} +4 -4
- package/dist/{resolver-W3WKLWDP.js → resolver-ZLYSMILY.js} +3 -3
- package/dist/{themes-DC6u80yr.d.ts → themes-DiUAG4Bf.d.ts} +37 -2
- package/docs/ai-integration.md +5 -5
- 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 -88466
- package/dist/chunk-6MTWIQVO.js +0 -121
- package/dist/cli.cjs +0 -489
- package/dist/element.d.ts +0 -68
- package/dist/element.mjs +0 -88332
- package/dist/load-data-EHDDZ5ZS.js +0 -8
package/.windsurfrules
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`
|