diagonaldiagrams 0.9.0__tar.gz

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 (158) hide show
  1. diagonaldiagrams-0.9.0/.agents/skills/diagonaldiagrams-install/SKILL.md +58 -0
  2. diagonaldiagrams-0.9.0/.agents/skills/graph-engine/SKILL.md +119 -0
  3. diagonaldiagrams-0.9.0/.agents/skills/graph-engine/references/schemas.md +364 -0
  4. diagonaldiagrams-0.9.0/.agents/skills/graph-engine/references/taxonomy.md +108 -0
  5. diagonaldiagrams-0.9.0/.agents/skills/graph-engine/references/visual_grammar.md +35 -0
  6. diagonaldiagrams-0.9.0/.agents/skills/graph-engine/scripts/check_drift.py +27 -0
  7. diagonaldiagrams-0.9.0/.agents/skills/graph-engine/scripts/extract_schema.py +30 -0
  8. diagonaldiagrams-0.9.0/LICENSE +21 -0
  9. diagonaldiagrams-0.9.0/MANIFEST.in +5 -0
  10. diagonaldiagrams-0.9.0/PKG-INFO +155 -0
  11. diagonaldiagrams-0.9.0/README.md +128 -0
  12. diagonaldiagrams-0.9.0/diagonaldiagrams/__init__.py +14 -0
  13. diagonaldiagrams-0.9.0/diagonaldiagrams/__main__.py +4 -0
  14. diagonaldiagrams-0.9.0/diagonaldiagrams/_draw.py +534 -0
  15. diagonaldiagrams-0.9.0/diagonaldiagrams/_issues.py +9 -0
  16. diagonaldiagrams-0.9.0/diagonaldiagrams/_lazy.py +21 -0
  17. diagonaldiagrams-0.9.0/diagonaldiagrams/_output.py +144 -0
  18. diagonaldiagrams-0.9.0/diagonaldiagrams/_proc.py +15 -0
  19. diagonaldiagrams-0.9.0/diagonaldiagrams/_text.py +118 -0
  20. diagonaldiagrams-0.9.0/diagonaldiagrams/_theme.py +67 -0
  21. diagonaldiagrams-0.9.0/diagonaldiagrams/_yaml.py +7 -0
  22. diagonaldiagrams-0.9.0/diagonaldiagrams/api.py +184 -0
  23. diagonaldiagrams-0.9.0/diagonaldiagrams/apply.py +73 -0
  24. diagonaldiagrams-0.9.0/diagonaldiagrams/audit/__init__.py +109 -0
  25. diagonaldiagrams-0.9.0/diagonaldiagrams/audit/checks.py +520 -0
  26. diagonaldiagrams-0.9.0/diagonaldiagrams/audit/svg_import.py +335 -0
  27. diagonaldiagrams-0.9.0/diagonaldiagrams/charts/__init__.py +1 -0
  28. diagonaldiagrams-0.9.0/diagonaldiagrams/charts/_base.py +562 -0
  29. diagonaldiagrams-0.9.0/diagonaldiagrams/charts/catalog.py +104 -0
  30. diagonaldiagrams-0.9.0/diagonaldiagrams/charts/kinds.py +2800 -0
  31. diagonaldiagrams-0.9.0/diagonaldiagrams/charts/mathplot.py +902 -0
  32. diagonaldiagrams-0.9.0/diagonaldiagrams/charts/render.py +262 -0
  33. diagonaldiagrams-0.9.0/diagonaldiagrams/cli.py +835 -0
  34. diagonaldiagrams-0.9.0/diagonaldiagrams/config.py +127 -0
  35. diagonaldiagrams-0.9.0/diagonaldiagrams/deco.py +219 -0
  36. diagonaldiagrams-0.9.0/diagonaldiagrams/describe.py +270 -0
  37. diagonaldiagrams-0.9.0/diagonaldiagrams/diagrams.py +639 -0
  38. diagonaldiagrams-0.9.0/diagonaldiagrams/diff.py +236 -0
  39. diagonaldiagrams-0.9.0/diagonaldiagrams/displaylist.py +104 -0
  40. diagonaldiagrams-0.9.0/diagonaldiagrams/doc.py +107 -0
  41. diagonaldiagrams-0.9.0/diagonaldiagrams/drift.py +200 -0
  42. diagonaldiagrams-0.9.0/diagonaldiagrams/errors.py +12 -0
  43. diagonaldiagrams-0.9.0/diagonaldiagrams/export.py +358 -0
  44. diagonaldiagrams-0.9.0/diagonaldiagrams/extract.py +260 -0
  45. diagonaldiagrams-0.9.0/diagonaldiagrams/geo.py +415 -0
  46. diagonaldiagrams-0.9.0/diagonaldiagrams/geom.py +224 -0
  47. diagonaldiagrams-0.9.0/diagonaldiagrams/inputs/__init__.py +1 -0
  48. diagonaldiagrams-0.9.0/diagonaldiagrams/inputs/v1.py +343 -0
  49. diagonaldiagrams-0.9.0/diagonaldiagrams/iso.py +638 -0
  50. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/__init__.py +5 -0
  51. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/bk.py +327 -0
  52. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/channels.py +168 -0
  53. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/layered.py +1263 -0
  54. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/order.py +387 -0
  55. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/rank.py +298 -0
  56. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/room.py +151 -0
  57. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/rows.py +127 -0
  58. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/sequence.py +52 -0
  59. diagonaldiagrams-0.9.0/diagonaldiagrams/layout/wrap.py +244 -0
  60. diagonaldiagrams-0.9.0/diagonaldiagrams/mcp.py +114 -0
  61. diagonaldiagrams-0.9.0/diagonaldiagrams/mermaid.py +445 -0
  62. diagonaldiagrams-0.9.0/diagonaldiagrams/motion.py +537 -0
  63. diagonaldiagrams-0.9.0/diagonaldiagrams/outline.py +241 -0
  64. diagonaldiagrams-0.9.0/diagonaldiagrams/paint.py +971 -0
  65. diagonaldiagrams-0.9.0/diagonaldiagrams/plots.py +636 -0
  66. diagonaldiagrams-0.9.0/diagonaldiagrams/registry.py +45 -0
  67. diagonaldiagrams-0.9.0/diagonaldiagrams/route/__init__.py +4 -0
  68. diagonaldiagrams-0.9.0/diagonaldiagrams/route/labels.py +107 -0
  69. diagonaldiagrams-0.9.0/diagonaldiagrams/sanitize.py +107 -0
  70. diagonaldiagrams-0.9.0/diagonaldiagrams/scene/__init__.py +7 -0
  71. diagonaldiagrams-0.9.0/diagonaldiagrams/scene/ids.py +51 -0
  72. diagonaldiagrams-0.9.0/diagonaldiagrams/scene/model.py +129 -0
  73. diagonaldiagrams-0.9.0/diagonaldiagrams/scene/normalize.py +343 -0
  74. diagonaldiagrams-0.9.0/diagonaldiagrams/scene/patch.py +284 -0
  75. diagonaldiagrams-0.9.0/diagonaldiagrams/story.py +432 -0
  76. diagonaldiagrams-0.9.0/diagonaldiagrams/style/__init__.py +1 -0
  77. diagonaldiagrams-0.9.0/diagonaldiagrams/style/cascade.py +256 -0
  78. diagonaldiagrams-0.9.0/diagonaldiagrams/style/encode.py +114 -0
  79. diagonaldiagrams-0.9.0/diagonaldiagrams/style/parse.py +418 -0
  80. diagonaldiagrams-0.9.0/diagonaldiagrams/style/presets/arch.json +55 -0
  81. diagonaldiagrams-0.9.0/diagonaldiagrams/style/presets/diagram.json +53 -0
  82. diagonaldiagrams-0.9.0/diagonaldiagrams/style/presets/flow.json +58 -0
  83. diagonaldiagrams-0.9.0/diagonaldiagrams/style/presets/iso.json +63 -0
  84. diagonaldiagrams-0.9.0/diagonaldiagrams/style/presets/schema.json +48 -0
  85. diagonaldiagrams-0.9.0/diagonaldiagrams/style/presets/seq.json +58 -0
  86. diagonaldiagrams-0.9.0/diagonaldiagrams/style/select.py +253 -0
  87. diagonaldiagrams-0.9.0/diagonaldiagrams/style/styler.py +383 -0
  88. diagonaldiagrams-0.9.0/diagonaldiagrams/style/themes/core.json +14 -0
  89. diagonaldiagrams-0.9.0/diagonaldiagrams/style/themes/editorial.json +9 -0
  90. diagonaldiagrams-0.9.0/diagonaldiagrams/style/themes/ink.json +9 -0
  91. diagonaldiagrams-0.9.0/diagonaldiagrams/style/themes/print.json +9 -0
  92. diagonaldiagrams-0.9.0/diagonaldiagrams/style/tokens.py +89 -0
  93. diagonaldiagrams-0.9.0/diagonaldiagrams/svgdiff.py +73 -0
  94. diagonaldiagrams-0.9.0/diagonaldiagrams/text/__init__.py +1 -0
  95. diagonaldiagrams-0.9.0/diagonaldiagrams/text/fonts.py +290 -0
  96. diagonaldiagrams-0.9.0/diagonaldiagrams/text/markup.py +42 -0
  97. diagonaldiagrams-0.9.0/diagonaldiagrams/text/measure.py +140 -0
  98. diagonaldiagrams-0.9.0/diagonaldiagrams/text/shaper.py +57 -0
  99. diagonaldiagrams-0.9.0/diagonaldiagrams/validate.py +362 -0
  100. diagonaldiagrams-0.9.0/diagonaldiagrams/web/motion.js +134 -0
  101. diagonaldiagrams-0.9.0/diagonaldiagrams/web/page.js +227 -0
  102. diagonaldiagrams-0.9.0/diagonaldiagrams/web/story.js +198 -0
  103. diagonaldiagrams-0.9.0/diagonaldiagrams.egg-info/PKG-INFO +155 -0
  104. diagonaldiagrams-0.9.0/diagonaldiagrams.egg-info/SOURCES.txt +156 -0
  105. diagonaldiagrams-0.9.0/diagonaldiagrams.egg-info/dependency_links.txt +1 -0
  106. diagonaldiagrams-0.9.0/diagonaldiagrams.egg-info/entry_points.txt +2 -0
  107. diagonaldiagrams-0.9.0/diagonaldiagrams.egg-info/requires.txt +3 -0
  108. diagonaldiagrams-0.9.0/diagonaldiagrams.egg-info/top_level.txt +1 -0
  109. diagonaldiagrams-0.9.0/examples/agent_platform.json +45 -0
  110. diagonaldiagrams-0.9.0/examples/arch.json +1 -0
  111. diagonaldiagrams-0.9.0/examples/bad.json +1 -0
  112. diagonaldiagrams-0.9.0/examples/bad_seq.json +1 -0
  113. diagonaldiagrams-0.9.0/examples/bar_latency.csv +6 -0
  114. diagonaldiagrams-0.9.0/examples/checkout_groups.json +225 -0
  115. diagonaldiagrams-0.9.0/examples/checkout_platform.json +42 -0
  116. diagonaldiagrams-0.9.0/examples/checkout_sequence.mmd +16 -0
  117. diagonaldiagrams-0.9.0/examples/flow_cross.json +1 -0
  118. diagonaldiagrams-0.9.0/examples/flow_decision.json +1 -0
  119. diagonaldiagrams-0.9.0/examples/geo_cities.csv +9 -0
  120. diagonaldiagrams-0.9.0/examples/grammar_act.json +20 -0
  121. diagonaldiagrams-0.9.0/examples/grammar_arch.json +33 -0
  122. diagonaldiagrams-0.9.0/examples/how_it_works.mmd +14 -0
  123. diagonaldiagrams-0.9.0/examples/icons.mmd +10 -0
  124. diagonaldiagrams-0.9.0/examples/iso_platform.json +21 -0
  125. diagonaldiagrams-0.9.0/examples/iso_rows.json +20 -0
  126. diagonaldiagrams-0.9.0/examples/iso_three_tier.json +95 -0
  127. diagonaldiagrams-0.9.0/examples/line_throughput.csv +15 -0
  128. diagonaldiagrams-0.9.0/examples/math.json +14 -0
  129. diagonaldiagrams-0.9.0/examples/palantir_stack.json +33 -0
  130. diagonaldiagrams-0.9.0/examples/scatter.csv +9 -0
  131. diagonaldiagrams-0.9.0/examples/scatter_groups.csv +25 -0
  132. diagonaldiagrams-0.9.0/examples/schema_ecommerce.json +47 -0
  133. diagonaldiagrams-0.9.0/examples/seq_checkout.json +22 -0
  134. diagonaldiagrams-0.9.0/examples/shop_er.mmd +25 -0
  135. diagonaldiagrams-0.9.0/examples/show_canary.json +24 -0
  136. diagonaldiagrams-0.9.0/examples/show_latency.csv +37 -0
  137. diagonaldiagrams-0.9.0/examples/show_ports.csv +13 -0
  138. diagonaldiagrams-0.9.0/examples/show_retrieval.json +26 -0
  139. diagonaldiagrams-0.9.0/examples/show_store.json +58 -0
  140. diagonaldiagrams-0.9.0/examples/show_toolloop.json +25 -0
  141. diagonaldiagrams-0.9.0/examples/showcase/agent_platform_story.json +10 -0
  142. diagonaldiagrams-0.9.0/examples/showcase/ai_stack.json +31 -0
  143. diagonaldiagrams-0.9.0/examples/showcase/ai_stack_story.json +27 -0
  144. diagonaldiagrams-0.9.0/examples/showcase/falcon9_mission.json +39 -0
  145. diagonaldiagrams-0.9.0/examples/showcase/falcon9_story.json +10 -0
  146. diagonaldiagrams-0.9.0/examples/showcase/nvidia_story.json +10 -0
  147. diagonaldiagrams-0.9.0/examples/showcase/nvidia_supply_chain.json +43 -0
  148. diagonaldiagrams-0.9.0/examples/showcase/palantir_platform.json +38 -0
  149. diagonaldiagrams-0.9.0/examples/showcase/palantir_story.json +10 -0
  150. diagonaldiagrams-0.9.0/examples/showcase/three_tier_story.json +22 -0
  151. diagonaldiagrams-0.9.0/examples/signups.csv +19 -0
  152. diagonaldiagrams-0.9.0/examples/story_checkout.json +14 -0
  153. diagonaldiagrams-0.9.0/examples/story_platform.json +21 -0
  154. diagonaldiagrams-0.9.0/llms.txt +51 -0
  155. diagonaldiagrams-0.9.0/pyproject.toml +49 -0
  156. diagonaldiagrams-0.9.0/server.json +29 -0
  157. diagonaldiagrams-0.9.0/setup.cfg +4 -0
  158. diagonaldiagrams-0.9.0/smithery.yaml +9 -0
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: diagonaldiagrams-install
3
+ description: >
4
+ Install diagonaldiagrams, the graphing library for agents. Clones
5
+ https://github.com/lucas19919/diagonaldiagrams, checks that graph.py runs, and
6
+ copies the graph-engine drawing skill into the user skills folder.
7
+ Use when the user says install diagonaldiagrams, set up diagonaldiagrams, add the
8
+ graphing library, or runs /diagonaldiagrams-install.
9
+ license: MIT
10
+ compatibility: Requires git and Python 3
11
+ metadata:
12
+ short-description: Install the diagonaldiagrams agent graphing library
13
+ ---
14
+
15
+ # Install diagonaldiagrams
16
+
17
+ diagonaldiagrams is a graphing library for agents. This skill installs it as a clone plus a check, because the clone also carries the drawing skill. `pip install git+https://github.com/lucas19919/diagonaldiagrams` is the other route: it puts a `diagonaldiagrams` command on PATH, but no skill.
18
+
19
+ The drawing contract is the `graph-engine` skill in the clone. This skill only puts that library on the machine.
20
+
21
+ ## Steps
22
+
23
+ 1. Find Python 3. On Windows run `py -3 --version`. Elsewhere run `python3 --version`. Stop if Python 3 is missing, and say so. Do not install Python unless the user asks.
24
+
25
+ 2. Pick a stable directory outside the current project.
26
+ - Windows: `$env:USERPROFILE\.diagonaldiagrams`
27
+ - Elsewhere: `$HOME/.diagonaldiagrams`
28
+ If `<dir>/graph.py` is already there, keep that checkout. Do not clone a second copy.
29
+
30
+ 3. If the directory is missing, clone it.
31
+
32
+ ```bash
33
+ git clone https://github.com/lucas19919/diagonaldiagrams.git <dir>
34
+ ```
35
+
36
+ If the directory exists and has no `graph.py`, stop. Tell the user what is in it.
37
+
38
+ 4. Check the library. Run `<python> <dir>/graph.py describe`. Require exit 0. The JSON's `types` list must include `flow`, `arch`, `seq`, `schema`, `bar`, `line`, `scatter`, `geo`, `heatmap`, and `sankey`.
39
+ Then run `<python> -m compileall -q <dir>/diagonaldiagrams`, so every later call starts from compiled code even where `PYTHONDONTWRITEBYTECODE` is set. Run it again after each update.
40
+
41
+ 5. Copy `<dir>/.agents/skills/graph-engine` to the user skills folder of the agent you are, so later sessions can draw.
42
+ - Claude Code: `~/.claude/skills/graph-engine`
43
+ - Grok: `~/.grok/skills/graph-engine`
44
+ - Another agent: its user skills folder, if it has one. Otherwise skip this step and say so.
45
+ - If a `graph-engine` skill is already there, leave it. Tell the user both paths.
46
+
47
+ 6. Optional, only if the user wants diagonaldiagrams as tools instead of shell commands: register the MCP server.
48
+ Claude Code: `claude mcp add --scope user diagonaldiagrams -- <python> <dir>/graph.py mcp`, where `<python>` is `py -3` on Windows and `python3` elsewhere.
49
+
50
+ 7. Report the absolute path of `<dir>/graph.py`. Later draws use that path: `py -3 <path>` on Windows, `python3 <path>` elsewhere. Point the user at the `graph-engine` skill for the draw loop.
51
+
52
+ To update later: `git -C <dir> pull`, then the `compileall` line from step 4.
53
+
54
+ Run `<python> <dir>/tests_smoke.py` only when the user asks for a full check.
55
+
56
+ ## Leave alone
57
+
58
+ Do not edit `graph.py` or the `diagonaldiagrams/` package next to it. Do not hand-edit an SVG the library wrote. Do not run `sync --commit` as part of install.
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: graph-engine
3
+ description: Draw charts, flowcharts, sequence diagrams, architecture maps, database schemas, maps, and math plots as SVG with diagonaldiagrams. One command checks the spec, draws, and audits the layout for collisions. Use for any request to chart, plot, diagram, or visualize data, logic, a codebase, or a schema.
4
+ ---
5
+
6
+ # Draw with diagonaldiagrams
7
+
8
+ Run `diagonaldiagrams`, or `py -3 <path>/graph.py` (Windows) / `python3 <path>/graph.py`. Not installed:
9
+ run the `diagonaldiagrams-install` skill.
10
+
11
+ ## One call
12
+
13
+ Write the input and render it in the same shell call. Flowcharts, sequence diagrams, and ER diagrams
14
+ are plain Mermaid, piped in with `-`:
15
+
16
+ ```bash
17
+ diagonaldiagrams mermaid - -o flow.svg <<'EOF'
18
+ flowchart TD
19
+ A([Ticket arrives]) --> B{Sev1?}
20
+ B -->|yes| C[Page on-call]
21
+ B -->|no| D[Queue it]
22
+ EOF
23
+ ```
24
+
25
+ It prints one JSON line:
26
+
27
+ - `"ok": true`: done. The figure is at `svg`. `layout` lists what was drawn: each row's boxes left to
28
+ right and each frame's members (a long flow that wraps says which rows stand in which column), a
29
+ schema's columns of tables, a sequence's messages in order, or a chart's axes and series. Check the
30
+ content against it.
31
+ - `"ok": false`: each error has a `fix`. Change the input and run again. Never edit the SVG.
32
+ - `warnings`: the figure is drawn; act on one only if it matters.
33
+
34
+ `"ok": true` means no text overlaps, nothing spills its box or the canvas, no boxes overlap, and no
35
+ arrow crosses a box or a label. Do not screenshot, open, or grep the SVG to check: answer from the
36
+ verdict. Each extra look costs a full round trip.
37
+
38
+ ## Where it goes
39
+
40
+ Pick `--fit` for where the figure will be read, so its text stays full size there:
41
+
42
+ - `--fit column` for a README, docs page, wiki, notes app or chat: a column about 700 px wide, read by
43
+ scrolling. A long flow stays one tall strip, a wide row splits into rows where that takes less room
44
+ than shrinking the figure, schema tables stack, and the figure is about 640 px wide.
45
+ - `--fit slide` (the default) for a deck or a full-width screen: a long flow wraps into columns.
46
+ - `--fit page` for a printed or PDF page: a long flow wraps toward portrait.
47
+
48
+ In Mermaid, a front matter line does the same (`---`, `fit: column`, `---` above `flowchart TD`); in a
49
+ JSON spec, `"size": {"fit": "column"}`. Sequence diagrams draw the same in every fit.
50
+
51
+ ## Mermaid
52
+
53
+ `([x])` start or end, `[x]` step, `{x}` decision, `[(x)]` store. `-->|label|`, `-.->` dashed,
54
+ `==>` or `:::focal` coral. `subgraph id [Name] ... end` draws a frame. `fa:fa-database` adds an icon.
55
+ An arrow back to an earlier step draws up the outside. Flows draw top-down; arrow labels draw in capitals.
56
+ `sequenceDiagram` (`participant G as Gateway`, `A->>B: call`, `B-->>A: reply`, `A-)B: event`) and
57
+ `erDiagram` (`A ||--o{ B : has`) work too. Not drawn: style and classDef colors, notes, loop or alt
58
+ blocks. A parse error names the line.
59
+
60
+ ## JSON specs and data
61
+
62
+ `flow`, `arch`, `seq`, and `schema` also take a JSON spec: `diagonaldiagrams arch spec.json -o arch.svg`.
63
+ `describe <type>` prints the shape. Use `arch` for services in rows (`layer`), with blue HTTP arrows.
64
+
65
+ `iso` draws a layer stack in isometric 3D: `{"columns", "layers": [{"id", "name", "sub", "items": [{"id", "name",
66
+ "sub", "focal", "col", "row"}]}], "links": [{"from", "to", "label", "async", "focal"}]}`, top layer first. A long
67
+ layer wraps into rows. A link may join any two layers, passing those between through a port; an item stands under
68
+ what it links to above, or in its `col` and `row` (0 at the front). `--style`, `--font` and `--fit` work as on other
69
+ diagrams: a layer is `group`, an item `node`, a link `edge`. The verdict's `layout` lists each layer's items left to
70
+ right. Errors read depth: `hidden` (behind a nearer layer), `spill` (off its block), `through` (a link crossing a
71
+ block): line the linked items up in one `col`. Validate with `validate SPEC.json --type iso`.
72
+
73
+ CSV with a header row:
74
+
75
+ | type | flags |
76
+ | --- | --- |
77
+ | `bar` | `--cat COL --val COL [--group COL --sort desc --unit ms]` |
78
+ | `line` | `--x COL --y COL [--group COL]` |
79
+ | `scatter` | `--x COL --y COL [--group COL]` |
80
+ | `geo` | `--lat COL --lon COL [--label COL]` |
81
+
82
+ All take `--title`, `--subtitle` (state the finding), `--xlabel`, `--ylabel`, and `--highlight VALUE`
83
+ (one series or bar in coral). Line charts name each series at its end; that is the legend.
84
+ `bar` and `line` take `--ref VALUE=label` for a dashed reference line (a target, or 50%); `--unit %` ends a
85
+ bar axis at 100.
86
+ `chart <type> INPUT` draws about 60 more (sankey, gantt, heatmap, treemap, pie, radar, math, ...);
87
+ `describe` lists them.
88
+
89
+ ## Files
90
+
91
+ `-o PATH/NAME.svg` is the file you get (folders are created), with `NAME.html` and
92
+ `NAME.graph.json` beside it. Input given with `-` or `-s TEXT` is saved as `NAME.spec.mmd` or `NAME.spec.json`.
93
+ `export DIR/NAME --to png|pdf|drawio|excalidraw` redraws from the receipt.
94
+
95
+ ## Stories
96
+
97
+ To walk someone through a figure, write a story: the figure, then views that `focus`, `dim`, `hide`,
98
+ `highlight` or `reveal` parts of it by selector, each with a `title`, `text` and `notes`.
99
+ `diagonaldiagrams story STORY.json -o out/story.html` draws every view into one page that animates
100
+ between them. `describe story` has the format; a warning means a selector matched nothing.
101
+
102
+ ## Edits as patches
103
+
104
+ To move, rename or recolor boxes, write a patch: a JSON list like
105
+ `[{"op": "place", "id": "fix", "row": ["review", "fix"]}]` (`place` puts a box in a row, in that order). Write it
106
+ into the spec and draw again at the same `-o` path:
107
+
108
+ ```bash
109
+ diagonaldiagrams apply SPEC.json patch.json
110
+ diagonaldiagrams flow SPEC.json -o out/x.svg
111
+ ```
112
+
113
+ The verdict's `changed` lists what moved, so you can say it in a sentence; the page animates the change.
114
+ Keep edits when you regenerate the spec: `place` writes `rank`, `order` and `same-rank`, which you should
115
+ leave as they are. Keep the patch too: after regenerating, apply it again. Edits that still fit are written in
116
+ (applying twice changes nothing); a `patch-conflict` names an edit the new spec contradicts.
117
+ `diff OLD NEW` compares any two drawings.
118
+
119
+ Titles state the finding. Blue is HTTP, dashed is async, coral marks at most two focal items.
@@ -0,0 +1,364 @@
1
+ # schemas.md — generated from `diagonaldiagrams describe <type>`
2
+ Source of truth: DESCRIBE in diagonaldiagrams/describe.py. Regenerate with `py -3 scripts/schemas_ref.py`; `describe` lists every other type.
3
+
4
+ ## scatter
5
+ ```json
6
+ {
7
+ "input": "CSV with header row. Two numeric columns minimum.",
8
+ "writes": "diagonaldiagrams scatter DATA.csv --x X --y Y -o OUT.svg (+ OUT.html and the OUT.graph.json receipt beside it)",
9
+ "required": [
10
+ "--x",
11
+ "--y"
12
+ ],
13
+ "options": {
14
+ "--title": "finding, not description",
15
+ "--subtitle": "one sentence takeaway",
16
+ "--figure": "Fig. number",
17
+ "--xlabel/--xunit/--ylabel/--yunit": "axis + unit in parens",
18
+ "--group": "categorical col, Okabe-Ito legend",
19
+ "--yerr": "numeric SD/CI col, capped bars",
20
+ "--facet": "categorical col, small multiples A/B (+col layout via export --layout social)",
21
+ "--source": "provenance, n auto-appended",
22
+ "--caption": "kept on the receipt",
23
+ "--corners": "sharp|rounded|editorial",
24
+ "--grid/--no-grid": "tick rules, on by default",
25
+ "--markers/--no-markers": "point dots, on by default",
26
+ "--highlight": "group or x value, repeatable, drawn larger in accent"
27
+ },
28
+ "budgets": {
29
+ "points_rendered": 400,
30
+ "groups": 8,
31
+ "facets": 4,
32
+ "series": "focal rule: 1 accent max"
33
+ },
34
+ "rules": [
35
+ "non-negative data never shows a negative axis",
36
+ "domain includes error bars",
37
+ "ticks are nice numbers aligned to grid",
38
+ "title and subtitle are drawn on the figure; the HTML page and the .svg are the same drawing"
39
+ ],
40
+ "example": "diagonaldiagrams scatter examples/scatter_groups.csv --x dose --y expr --yerr expr_err --group tissue --facet cohort --xlabel Dose --xunit mg --ylabel Expression --yunit 'log2 counts' -o out/s.html"
41
+ }
42
+ ```
43
+
44
+ ## flow
45
+ ```json
46
+ {
47
+ "input": "JSON spec {title, sub, nodes[], edges[], groups[]}",
48
+ "writes": "diagonaldiagrams flow SPEC.json -o OUT.svg",
49
+ "size": "{\"fit\": \"slide|page|column\"}, or --fit. slide (default): a long flow wraps into columns near 4:3. page: a document page, wraps toward portrait. column: a docs or notes column, read by scrolling: no wrap, about 640 px wide (a wide layer splits into rows where that takes less room than shrinking the figure; schema tables stack)",
50
+ "node": {
51
+ "id": "unique",
52
+ "shape": "oval=start/end | rect=step | diamond=decision | dot=merge",
53
+ "name": "2-4 words",
54
+ "tag": "optional kind, e.g. MANUAL (not STEP/START/END: the shape says it)",
55
+ "sub": "mono sublabel",
56
+ "rank": "row, 0 at the top (default: automatic)",
57
+ "lane": "-1 left|0 center|1 right (default 0)",
58
+ "focal": "bool, max 2 per diagram"
59
+ },
60
+ "edge": {
61
+ "from": "id",
62
+ "to": "id",
63
+ "label": "ALWAYS label decision exits",
64
+ "focal": "happy-path bool"
65
+ },
66
+ "rules": [
67
+ "top-down; a decision's branches sit side by side, loops draw back up the outside",
68
+ "diamond ≤3 exits (nest for more)",
69
+ "orthogonal elbows only",
70
+ "labels masked with 6px gap",
71
+ "shape carries type, never color",
72
+ "no ranks needed: longest-path auto-layering + barycenter uncrossing (--auto forces it)"
73
+ ],
74
+ "budgets": {
75
+ "nodes": 9,
76
+ "edges": 12,
77
+ "focal": 2,
78
+ "over": "a warning, not an error; split if it reads badly, or budget false hides it"
79
+ },
80
+ "example": "{\"title\":\"Deploy approval\",\"nodes\":[{\"id\":\"a\",\"shape\":\"oval\",\"name\":\"Push\"},{\"id\":\"d\",\"shape\":\"diamond\",\"name\":\"Risky?\",\"rank\":1,\"focal\":true}],\"edges\":[{\"from\":\"a\",\"to\":\"d\",\"label\":\"pass\"}]}"
81
+ }
82
+ ```
83
+
84
+ ## arch
85
+ ```json
86
+ {
87
+ "input": "JSON spec {title, sub, nodes[], edges[]}",
88
+ "writes": "diagonaldiagrams arch SPEC.json -o OUT.svg",
89
+ "size": "{\"fit\": \"slide|page|column\"}, or --fit. slide (default): a long flow wraps into columns near 4:3. page: a document page, wraps toward portrait. column: a docs or notes column, read by scrolling: no wrap, about 640 px wide (a wide layer splits into rows where that takes less room than shrinking the figure; schema tables stack)",
90
+ "node": {
91
+ "id": "unique",
92
+ "layer": "row int (default 0)",
93
+ "name": "service",
94
+ "sub": "Lang:port e.g. Go:8080",
95
+ "tag": "UI|API|SVC|STORE",
96
+ "focal": "bool, max 2"
97
+ },
98
+ "edge": {
99
+ "from": "id",
100
+ "to": "id",
101
+ "label": "VERB",
102
+ "proto": "https=blue arrow",
103
+ "async": "dashed bool",
104
+ "focal": "bool"
105
+ },
106
+ "rules": [
107
+ "blue=HTTP/API, dashed=async, coral=focal",
108
+ "tech sublabels in mono, names in sans",
109
+ "a wide layer spreads the canvas so boxes do not overlap",
110
+ "set budget false to draw past 9 nodes and 12 edges; focal stays at 2"
111
+ ],
112
+ "budgets": {
113
+ "nodes": 9,
114
+ "edges": 12,
115
+ "over": "a warning, not an error; one view per C4 level, or budget false hides it"
116
+ }
117
+ }
118
+ ```
119
+
120
+ ## seq
121
+ ```json
122
+ {
123
+ "input": "JSON spec {title, sub, actors[], messages[]}",
124
+ "writes": "diagonaldiagrams seq SPEC.json -o OUT.svg",
125
+ "actor": {
126
+ "id": "unique",
127
+ "name": "label",
128
+ "sub": "tech/mono sub",
129
+ "tag": "USER|UI|GATEWAY|SVC|STORE",
130
+ "focal": "bool, max 2"
131
+ },
132
+ "message": {
133
+ "from": "id",
134
+ "to": "id",
135
+ "label": "Call name/payload",
136
+ "proto": "https/grpc",
137
+ "reply": "bool dashed",
138
+ "async": "bool dashed",
139
+ "focal": "bool"
140
+ },
141
+ "rules": [
142
+ "solid=sync, dashed=reply/async, blue=http, coral=focal",
143
+ "top-down sequence order",
144
+ "max 6 lifelines"
145
+ ],
146
+ "budgets": {
147
+ "actors": 6,
148
+ "messages": 16,
149
+ "focal": 2,
150
+ "over": "a warning, not an error; split into sub-sequences, or budget false hides it"
151
+ },
152
+ "example": "{\"title\":\"Auth handshake\",\"actors\":[{\"id\":\"u\",\"name\":\"User\"},{\"id\":\"api\",\"name\":\"API\",\"focal\":true}],\"messages\":[{\"from\":\"u\",\"to\":\"api\",\"label\":\"login\"}]}"
153
+ }
154
+ ```
155
+
156
+ ## schema
157
+ ```json
158
+ {
159
+ "input": "JSON spec {title, sub, tables[], relations[]}",
160
+ "writes": "diagonaldiagrams schema SPEC.json -o OUT.svg",
161
+ "size": "{\"fit\": \"slide|page|column\"}, or --fit. slide (default): a long flow wraps into columns near 4:3. page: a document page, wraps toward portrait. column: a docs or notes column, read by scrolling: no wrap, about 640 px wide (a wide layer splits into rows where that takes less room than shrinking the figure; schema tables stack)",
162
+ "table": {
163
+ "id": "unique",
164
+ "name": "table_name",
165
+ "tag": "AUTH|CORE|AUDIT",
166
+ "focal": "bool, max 2",
167
+ "columns": [
168
+ {
169
+ "name": "col",
170
+ "type": "data_type",
171
+ "pk": "bool",
172
+ "fk": "bool",
173
+ "unique": "bool"
174
+ }
175
+ ]
176
+ },
177
+ "relation": {
178
+ "from": "id",
179
+ "from_col": "col",
180
+ "to": "id",
181
+ "to_col": "col",
182
+ "label": "1:N|1:1|M:N",
183
+ "focal": "bool"
184
+ },
185
+ "rules": [
186
+ "PK coral badge, FK blue badge, columns in mono, types muted",
187
+ "orthogonal elbow routing",
188
+ "max 6 tables per view"
189
+ ],
190
+ "budgets": {
191
+ "tables": 6,
192
+ "columns_per_table": 12,
193
+ "over": "a warning, not an error; split by bounded context, or budget false hides it"
194
+ },
195
+ "example": "{\"title\":\"Users & Teams\",\"tables\":[{\"id\":\"u\",\"name\":\"users\",\"columns\":[{\"name\":\"id\",\"type\":\"uuid\",\"pk\":true}]}],\"relations\":[]}"
196
+ }
197
+ ```
198
+
199
+ ## mermaid
200
+ ```json
201
+ {
202
+ "input": "Mermaid text (.mmd): flowchart/graph, sequenceDiagram, or erDiagram",
203
+ "writes": "diagonaldiagrams mermaid DIAGRAM.mmd -o OUT.svg (flow, seq, or schema; checked and audited like a JSON spec)",
204
+ "flowchart": {
205
+ "nodes": "A[step] A(step) A([start or end]) A((start or end)) A{decision?} A[(store)]",
206
+ "arrows": "A --> B A -->|label| B A -- label --> B A -.-> B (dashed) A ==> B (focal) A & B --> C",
207
+ "groups": "subgraph id [Title] ... end",
208
+ "focal": "A:::focal",
209
+ "icons": "fa:fa-user, fa:fa-database, fa:fa-server, fa:fa-cloud ... in a label draw that glyph in the box"
210
+ },
211
+ "sequenceDiagram": "participant A as Name | actor U as User | A->>B: call | B-->>A: reply | A-)B: async event",
212
+ "erDiagram": "A ||--o{ B : verb | A { type name PK }",
213
+ "fit": "where the figure goes, as --fit: a line fit: column (or slide, page) in the front matter between --- lines",
214
+ "not drawn": "classDef/style colors, notes, loop/alt blocks, LR direction (flows draw top-down)",
215
+ "example": "flowchart TD\n A([Push]) --> B{Risky?}\n B -->|yes| C[Review]\n B -->|no| D([Ship])\n C --> D"
216
+ }
217
+ ```
218
+
219
+ ## bar
220
+ ```json
221
+ {
222
+ "input": "CSV with header row. One categorical column and one numeric column.",
223
+ "writes": "diagonaldiagrams bar DATA.csv --cat CAT --val VAL -o OUT.svg",
224
+ "options": {
225
+ "--cat": "category column",
226
+ "--val": "numeric value column",
227
+ "--group": "subgroup column",
228
+ "--sort": "none|asc|desc",
229
+ "--orientation": "v|h",
230
+ "--unit": "unit string",
231
+ "--title/--subtitle": "drawn on the figure",
232
+ "--grid/--no-grid": "tick rules, on by default",
233
+ "--markers/--no-markers": "value labels, on by default",
234
+ "--highlight": "category or group, repeatable, drawn in accent",
235
+ "--ref": "VALUE or VALUE=label, repeatable: a dashed reference line, such as a target or 50%"
236
+ },
237
+ "budgets": {
238
+ "bars": 24,
239
+ "categories": 12,
240
+ "over": "sort top-N + other"
241
+ },
242
+ "rules": [
243
+ "bar charts must start at zero",
244
+ "value labels sit on the bars",
245
+ "gridlines follow the ticks",
246
+ "--unit % ends the axis at 100 and writes 85%"
247
+ ],
248
+ "example": "diagonaldiagrams bar examples/bar_latency.csv --cat service --val p99_latency_ms --unit ms -o out/bar.html"
249
+ }
250
+ ```
251
+
252
+ ## line
253
+ ```json
254
+ {
255
+ "input": "CSV with header row. Continuous/temporal X column and numeric Y column.",
256
+ "writes": "diagonaldiagrams line DATA.csv --x X --y Y -o OUT.svg",
257
+ "options": {
258
+ "--x": "x column (numeric or timestamp)",
259
+ "--y": "y column (numeric)",
260
+ "--group": "series column",
261
+ "--xlabel/--xunit/--ylabel/--yunit": "axis labels",
262
+ "--title/--subtitle": "drawn on the figure",
263
+ "--grid/--no-grid": "tick rules, on by default",
264
+ "--markers/--no-markers": "point dots, on by default",
265
+ "--highlight": "x value or group, repeatable, drawn larger in accent",
266
+ "--ref": "VALUE or VALUE=label, repeatable: a dashed reference line"
267
+ },
268
+ "budgets": {
269
+ "series": 6,
270
+ "rows": 400,
271
+ "over": "a warning, not an error; a series past 600 points is thinned for drawing"
272
+ },
273
+ "rules": [
274
+ "non-negative data floors at 0",
275
+ "Okabe-Ito series colors",
276
+ "area fill only on a single series"
277
+ ],
278
+ "example": "diagonaldiagrams line examples/line_throughput.csv --x timestamp --y rps --group service -o out/line.html"
279
+ }
280
+ ```
281
+
282
+ ## geo
283
+ ```json
284
+ {
285
+ "input": "CSV with lat/lon columns, or a GeoJSON FeatureCollection of Points and Polygons.",
286
+ "writes": "diagonaldiagrams geo DATA.csv --lat lat --lon lon --label name --val pop -o OUT.svg",
287
+ "options": {
288
+ "--lat/--lon": "column names (guessed from lat/lon/lng when omitted)",
289
+ "--label": "place name",
290
+ "--val": "numeric size",
291
+ "--title/--subtitle": "drawn on the figure",
292
+ "--source": "footer provenance",
293
+ "--grid/--no-grid": "graticule lines, on by default",
294
+ "--markers/--no-markers": "place dots, on by default",
295
+ "--highlight": "place name, repeatable, drawn larger in accent"
296
+ },
297
+ "budgets": {
298
+ "points": 400,
299
+ "over": "crop to the region you mean"
300
+ },
301
+ "rules": [
302
+ "Web Mercator figure with a built-in coastline, not a tiled basemap",
303
+ "GeoJSON polygons are drawn on top of the coastline",
304
+ "graticule, kilometre scale bar, north arrow",
305
+ "dot size follows --val"
306
+ ],
307
+ "example": "diagonaldiagrams geo examples/geo_cities.csv --lat lat --lon lon --label city --val people_m -o out/geo.html"
308
+ }
309
+ ```
310
+
311
+ ## export
312
+ ```json
313
+ {
314
+ "input": "Receipt OUT.graph.json written beside every render.",
315
+ "writes": "diagonaldiagrams export OUT --to png|pdf|svg [--layout figure|wide|slide|social] [--width 1600] [-o FILE]",
316
+ "rules": [
317
+ "svg works everywhere, zero deps (re-render from receipt)",
318
+ "layouts figure/wide/slide/social apply to scatter; other types export single layout",
319
+ "png and pdf use cairosvg when it imports, otherwise headless Edge or Chrome",
320
+ "the HTML page has Export PNG, which saves the figure from the browser"
321
+ ],
322
+ "budgets": {
323
+ "png_width_default": 1600
324
+ },
325
+ "example": "diagonaldiagrams export out/scatter --to svg --layout social"
326
+ }
327
+ ```
328
+
329
+ ## doc
330
+ ```json
331
+ {
332
+ "input": "Markdown document containing ```graph:<type> fenced blocks.",
333
+ "writes": "diagonaldiagrams doc DOC.md [--out-dir assets] [--check]",
334
+ "behavior": "Parses and compiles embedded diagram specs into standalone SVGs in assets/, updates doc links"
335
+ }
336
+ ```
337
+
338
+ ## monitor
339
+ ```json
340
+ {
341
+ "input": "Repository working tree or git history.",
342
+ "writes": "diagonaldiagrams monitor [--base <ref>] [--ci] [--map graph.monitor.json]",
343
+ "behavior": "Scans code changes for data models, routes, and migrations without corresponding diagram updates; outputs JSON drift report. With --map, extracts each changed file and semantically diffs against its spec (no diff = no drift, even if files changed).",
344
+ "map_format": "{\"mappings\": [{\"code\": \"models/*.py\", \"spec\": \"docs/schema.graph.json\", \"kind\": \"schema\", \"domain\": \"database\"}]}"
345
+ }
346
+ ```
347
+
348
+ ## extract
349
+ ```json
350
+ {
351
+ "input": "Code source file (.sql DDL, Python ORM model, FastAPI routes).",
352
+ "writes": "diagonaldiagrams extract schema|routes SOURCE_FILE -o SPEC.json",
353
+ "behavior": "Reverse-extracts architecture or database schema diagram specs directly from source code using AST/token parsing"
354
+ }
355
+ ```
356
+
357
+ ## sync
358
+ ```json
359
+ {
360
+ "input": "Same inputs as monitor (--path, --base, --map).",
361
+ "writes": "diagonaldiagrams sync --map graph.monitor.json [--docs ARCH.md] [--commit]",
362
+ "behavior": "Auto-fix bot: for each mapping-backed drift entry runs extract -o spec, validates, recompiles --docs, audits emitted SVGs. Default touches only the working tree; --commit creates a LOCAL commit (never pushes). Exit 1 if anything is left undone. Heartbeat: cron `0 6 * * * cd repo && diagonaldiagrams sync --map graph.monitor.json --commit`, Windows Task Scheduler, or an Antigravity cron//goal task."
363
+ }
364
+ ```
@@ -0,0 +1,108 @@
1
+ # Graph Taxonomy — CLI Graphing Tool
2
+ Source: session 2026-10-02. Canonical list for `graph/` CLI.
3
+
4
+ ## A. Statistical / Data Plots — from data files
5
+ | # | Type | Shows | Use case | Domain | CLI needs |
6
+ |---|------|-------|----------|--------|-----------|
7
+ | 1 | Scatter plot | 2 vars correlation | dose vs expression | science, ML | title, x/y labels, ticks, marker shape/color/size, legend, trendline, log scales, error bars |
8
+ | 2 | Bubble chart | 3 vars (size=3rd) | pop vs GDP sized by CO2 | economics | size legend, alpha |
9
+ | 3 | Beeswarm | 1 var dot per item | test scores per class | stats, bio | jitter, grouping |
10
+ | 4 | Line chart | trend over continuous x | latency over time | ops, finance | multi-series, markers, fill, log-y |
11
+ | 5 | Step chart | piecewise-constant | feature flag state | infra | sharp/smooth corners |
12
+ | 6 | Slopegraph | change between 2 states | before/after coverage | consulting | label both ends |
13
+ | 7 | Bump chart | rank movement | framework popularity | tech radar | rank inversion |
14
+ | 8 | Ridgeline | distributions per series | latency per service | SRE | overlap, bandwidth |
15
+ | 9 | Bar chart (V/H) | categorical comparison | requests per endpoint | general | grouped/stacked, thickness, padding, sort, value labels |
16
+ | 10 | Grouped + Stacked bar | sub-categories | errors by service x type | ops | totals, legend |
17
+ | 11 | Dumbbell / Lollipop | delta between 2 points | p50 vs p99 | performance | connector line |
18
+ | 12 | Waterfall / Bridge | start->end via contributions | budget bridge | finance | subtotals, +/- colors |
19
+ | 13 | Histogram | binned distribution | request sizes | stats | bins, KDE overlay |
20
+ | 14 | Box plot | quartiles + outliers | build time per runner | QA | grouping, outliers |
21
+ | 15 | Violin plot | KDE + box | response shape | stats | split violins |
22
+ | 16 | Strip / Jitter | raw points per category | flaky tests | testing | alpha |
23
+ | 17 | Pie / Donut | part-of-whole few slices | language share | exec | % labels |
24
+ | 18 | Waffle | proportion 10x10 grid | coverage 87% | dashboards | grid icons |
25
+ | 19 | Treemap | hierarchical sizes | disk/bundle size | infra | nesting, 2nd metric color |
26
+ | 20 | Sunburst / Icicle | hierarchical part-of-whole | dep size tree | packaging | drill-down |
27
+ | 21 | Heatmap / Matrix | 2D values by color | correlation matrix | ML | diverging map, annotations |
28
+ | 22 | Calendar heatmap | day intensity | deploys per day | devprod | year layout |
29
+ | 23 | Contour / Surface / 3D | z(x,y) | loss landscape | ML, geo-science | levels, palette |
30
+ | 24 | Radar / Spider | 3-5 criteria | service scores | arch review | 5 axes max, 1 focal |
31
+ | 25 | Polar cyclic | cyclic categories | traffic by hour | ops | angle=category |
32
+ | 26 | Candlestick / OHLC | open/high/low/close | prices, batch timings | finance | bull/bear colors |
33
+ | 27 | Status grid | health cells | host x check | dashboards | key->color map |
34
+ | 28 | Errorbar / Forest | estimate + CI | benchmarks | science | CI level |
35
+ | 29 | QQ / Residual | model diagnostics | normality check | ML | reference line |
36
+ | 30 | Volcano plot | -log10(p) vs log2FC | diff expression | bio | top-N labels |
37
+ | 31 | Sankey | flow width=amount | CDN->service->DB | data-eng | 3 stages max |
38
+ | 32 | Streamgraph | stacked flows over time | traffic share | analytics | baseline |
39
+ | 33 | Funnel / Pyramid | conversion drop-off | signup->paid | product | % remaining |
40
+
41
+ ## B. Network / Relationship — from code or data
42
+ | # | Type | Shows | Use case | Domain |
43
+ |---|------|-------|----------|--------|
44
+ | 34 | Dependency graph (DAG) | depends-on, cycles | imports, terraform graph | software |
45
+ | 35 | Force-directed / community | Louvain clusters | microservice coupling | architecture |
46
+ | 36 | Radial | center=most-connected | core libs | review |
47
+ | 37 | Tree / Dendrogram | parent->children | file/call tree | docs |
48
+ | 38 | Nested / Containment | containment hierarchy | monorepo map | architecture |
49
+ | 39 | Flow / Execution-order | bootstrap order | startup seq | onboarding |
50
+ | 40 | Knowledge / Entity graph | entities+relations | symbols | code intel |
51
+
52
+ ## C. Software Architecture — from codebases (hero)
53
+ | # | Type | Shows | Use case | CLI needs |
54
+ |---|------|-------|----------|-----------|
55
+ | 41 | C4 L0 Context | black box + actors | stakeholder deck | person shapes |
56
+ | 42 | C4 L1 Container | services+DBs+queues | onboarding | tech labels, async dashed |
57
+ | 43 | C4 L2 Component | classes in container | PR review | ports |
58
+ | 44 | C4 L3 Code/Process | runtime lifecycle | debug auth | sequence overlay |
59
+ | 45 | UML Class | inheritance/composition | API design | 7 classes max |
60
+ | 46 | Deployment | zones/hosts/ports | go-live | 3 zones / 6 nodes |
61
+ | 47 | Layer stack | abstractions | OSI, medallion | 6 layers max |
62
+ | 48 | DP Integration | sources->core->consumers | data platform | source icons |
63
+ | 49 | High-level / IT current-state | legacy by dept | modernization before-shot | dept grouping |
64
+ | 50 | Database schema | tables, FKs, indexes | migration | 6 tables / 8 cols shown / 8 rels (engine budgets, DESCRIBE=schema) |
65
+ | 51 | ER / Data model | entities+relations | domain modeling | crow's foot |
66
+ | 51 | ER / Data model | entities+relations | domain modeling | crow's foot |
67
+ | 52 | Wardley map | value vs evolution | build-vs-buy | 9 comps / 2 moves |
68
+
69
+ ## D. Logic / Process / State — from logic specs
70
+ | # | Type | Use case | Domain |
71
+ |---|------|----------|--------|
72
+ | 53a | Flowchart / Programmablaufplan (PAP, DIN 66001 / ISO 5807) | Oval start/end (rx=20), rect action, diamond decision ≤3 exits, dot merge; top-down, Yes=right No=down, every branch labeled | deploy approval, algorithm, support triage | informatik / ops — shape carries type not color, coral only on happy-path or key decision |
73
+ | 53b | Flowsheet / Process flowsheet | continuous process steps with inputs/outputs per stage | ETL pipeline, chem/process, stage framework | data-eng / process — same primitives as flowchart, emphasis on handoffs |
74
+ | 53c | Decision flowsheet / Entscheidungs-Flussdiagramm | diamond-heavy branching, nested diamonds for 4+ exits | onboarding routing, "Should I…?", access rules | informatik / product — paired policy-evaluation traces, first-divergence highlight |
75
+ | 54 | Swimlane | handoffs dev->review->deploy | process |
76
+ | 55 | Sequence | User->API->Auth->DB | backend — 6 actors / 16 msgs, solid=sync dashed=reply/async, blue=http |
77
+ | 56 | State machine | new->paid->shipped | checkout |
78
+ | 57 | BPMN | auditable process | enterprise |
79
+ | 58 | Decision tree | ML splits | data science |
80
+ | 59 | Fishbone | root-cause grouped | incident — 6x3 |
81
+ | 60 | Loop / Flywheel | feeds-first + hub | growth |
82
+ | 61 | Kanban | WIP + blocked | delivery |
83
+ | 62 | Gantt | tasks on timeline | planning — 12 tasks |
84
+ | 63 | Timeline | events in time | roadmap |
85
+ | 64 | User journey | stages + feeling | product |
86
+ | 65 | Story map | backbone->releases | agile |
87
+ | 66 | Org chart | ownership | team — 4 deep / 12 nodes |
88
+
89
+ ## E. Geospatial — from GeoJSON/shapefiles
90
+ | # | Type | Use case | Stack |
91
+ |---|------|----------|-------|
92
+ | 67 | Point / Cluster map | PoPs, incidents lat/lon | `graph geo` (Web Mercator figure: graticule, scale bar, sized dots; GeoJSON polygons if you pass them). kepler/deck only if you need tiles |
93
+ | 68 | Choropleth | region by metric | geopandas + mapclassify |
94
+ | 69 | Heat / Density | request density | deck.gl hexagon |
95
+ | 70 | Flow / OD map | zone-to-zone traffic | deck.gl arc |
96
+ | 71 | Raster / Terrain | DEM hillshade | GMT, QGIS headless |
97
+ | 72 | Print layout | map+legend+scalebar PDF | qgis layout export-pdf |
98
+
99
+ ## F. Comparison
100
+ | # | Type | Use case |
101
+ |---|------|----------|
102
+ | 73 | Quadrant 2x2 | effort vs impact |
103
+ | 74 | Venn (max 3) | overlap |
104
+ | 75 | Bar+Line combo | revenue + margin |
105
+
106
+ ## Global rules
107
+ - If table does it, don't draw. >9 nodes => split overview+detail.
108
+ - Stunning arch: orthogonal elbows r=8, no diagonals, 6-10px label gap + mask, >=12px fan, max 1-2 coral focal, Geist sans + Mono ports.