agentic-mermaid 0.1.1 → 0.1.2

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 (336) hide show
  1. package/CHANGELOG.md +144 -4
  2. package/LICENSES/Apache-2.0.txt +202 -0
  3. package/README.md +25 -32
  4. package/THIRD_PARTY_NOTICES.md +29 -0
  5. package/dist/agent-core.d.ts +463 -0
  6. package/dist/agent-core.js +397 -0
  7. package/dist/agent.d.ts +73 -1868
  8. package/dist/agent.js +336 -37325
  9. package/dist/agentic-mermaid-mcp.js +7 -38399
  10. package/dist/am.js +33632 -40445
  11. package/dist/chunk-4QECACIA.js +4702 -0
  12. package/dist/chunk-CDPKJ2BQ.js +37 -0
  13. package/dist/chunk-QKDLMOJJ.js +3487 -0
  14. package/dist/chunk-WI35L7IR.js +615 -0
  15. package/dist/chunk-WN3YDOBG.js +149 -0
  16. package/dist/chunk-ZYMMKQ3I.js +62637 -0
  17. package/dist/index-D54dqSdC.d.ts +6777 -0
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +310 -33014
  20. package/dist/mcp-cli-SBQSTJFC.js +17 -0
  21. package/docs/README.md +14 -6
  22. package/docs/schemas/style-spec.schema.json +1221 -30
  23. package/examples/styles/catalog.json +54 -0
  24. package/examples/styles/cloudflare-workers-inspired-prototype.mmd +9 -0
  25. package/examples/styles/cloudflare-workers-inspired-prototype.style.json +110 -0
  26. package/examples/styles/cupertino-prototype.mmd +10 -0
  27. package/examples/styles/cupertino-prototype.style.json +63 -0
  28. package/examples/styles/mid-century-report.style.json +2 -2
  29. package/examples/styles/star-chart-atlas.style.json +2 -1
  30. package/examples/styles/transit-route-map.style.json +2 -2
  31. package/examples/styles/vercel-inspired-prototype.mmd +6 -0
  32. package/examples/styles/vercel-inspired-prototype.style.json +87 -0
  33. package/package.json +68 -43
  34. package/server.json +2 -2
  35. package/skills/agentic-mermaid-diagram-workflow/SKILL.md +17 -36
  36. package/skills/agentic-mermaid-diagram-workflow/references/cli.md +4 -5
  37. package/skills/agentic-mermaid-diagram-workflow/references/code-mode.md +15 -31
  38. package/skills/agentic-mermaid-diagram-workflow/references/sequence.md +10 -14
  39. package/skills/agentic-mermaid-live-editor/SKILL.md +100 -206
  40. package/AGENT_NATIVE.md +0 -607
  41. package/Instructions_for_agents.md +0 -89
  42. package/TODO.md +0 -684
  43. package/assets/hero.png +0 -0
  44. package/dist/index-wjRjbsP-.d.ts +0 -1102
  45. package/docs/agent-api-cookbook.md +0 -308
  46. package/docs/agent-mutation-policy.md +0 -104
  47. package/docs/agent-workflow-examples.md +0 -46
  48. package/docs/api.md +0 -211
  49. package/docs/ascii.md +0 -103
  50. package/docs/assets/improvements/box-start-connector.png +0 -0
  51. package/docs/assets/improvements/comment-dropped-lint.png +0 -0
  52. package/docs/assets/improvements/er-content-loss.png +0 -0
  53. package/docs/assets/improvements/fan-in-trunks.png +0 -0
  54. package/docs/assets/improvements/gantt-family.png +0 -0
  55. package/docs/assets/improvements/gantt-milestone-clamp.png +0 -0
  56. package/docs/assets/improvements/gantt-verify-seam.png +0 -0
  57. package/docs/assets/improvements/subgraph-container-edges.png +0 -0
  58. package/docs/assets/improvements/wrapper-frontmatter.png +0 -0
  59. package/docs/assets/improvements/wrapper-init-directive.png +0 -0
  60. package/docs/assets/improvements/wrapper-leading-comment.png +0 -0
  61. package/docs/assets/style-cookbook/mid-century-report.png +0 -0
  62. package/docs/assets/style-cookbook/star-chart-atlas.png +0 -0
  63. package/docs/assets/style-cookbook/transit-route-map.png +0 -0
  64. package/docs/comparison.md +0 -94
  65. package/docs/config.md +0 -105
  66. package/docs/contributing/adding-diagram-types.md +0 -144
  67. package/docs/contributing/diagram-family-citizenship.matrix.json +0 -2127
  68. package/docs/contributing/diagram-family-citizenship.md +0 -82
  69. package/docs/contributing/harvesting-upstream-tests.md +0 -126
  70. package/docs/contributing/lessons-learned.md +0 -276
  71. package/docs/contributing/releasing.md +0 -82
  72. package/docs/contributing/visual-review-evidence.md +0 -53
  73. package/docs/custom-style-cookbook.md +0 -154
  74. package/docs/design/families/README.md +0 -26
  75. package/docs/design/families/architecture-beta.md +0 -48
  76. package/docs/design/families/flowchart-parser-conformance.md +0 -22
  77. package/docs/design/families/gantt-research.md +0 -137
  78. package/docs/design/families/gantt.md +0 -329
  79. package/docs/design/families/journey-agentic-cards-before.png +0 -0
  80. package/docs/design/families/journey-experience-curve-implementation.png +0 -0
  81. package/docs/design/families/journey-mermaid-classic-implementation.png +0 -0
  82. package/docs/design/families/journey-mermaid-classic-prototype.png +0 -0
  83. package/docs/design/families/journey-mermaid-classic-prototype.svg +0 -163
  84. package/docs/design/families/journey-mermaid-classic-prototype.svg.png +0 -0
  85. package/docs/design/families/journey-migration-parity.md +0 -439
  86. package/docs/design/families/journey-section-overlap-after.png +0 -0
  87. package/docs/design/families/journey-section-overlap-before.png +0 -0
  88. package/docs/design/families/journey-usage-research.md +0 -423
  89. package/docs/design/families/journey.md +0 -153
  90. package/docs/design/families/xychart.md +0 -85
  91. package/docs/design/system/README.md +0 -45
  92. package/docs/design/system/abstraction-audit.md +0 -224
  93. package/docs/design/system/abstraction-recommendations.md +0 -655
  94. package/docs/design/system/architecture.mmd +0 -29
  95. package/docs/design/system/architecture.svg +0 -137
  96. package/docs/design/system/layout-guarantees-and-robustness.md +0 -351
  97. package/docs/design/system/layout-rubric.md +0 -138
  98. package/docs/design/system/route-contracts.md +0 -848
  99. package/docs/design/system/source-preservation-ladder.md +0 -52
  100. package/docs/design/system/styles-rollout.md +0 -216
  101. package/docs/design/system/ugly-layouts.md +0 -119
  102. package/docs/diagram-families.md +0 -193
  103. package/docs/features.md +0 -147
  104. package/docs/fork-differences.md +0 -130
  105. package/docs/getting-started.md +0 -175
  106. package/docs/issue-derived-test-cases.md +0 -156
  107. package/docs/layout-characterization/README.md +0 -245
  108. package/docs/layout-characterization/contact-sheet-families.md +0 -498
  109. package/docs/layout-characterization/contact-sheet.md +0 -638
  110. package/docs/layout-characterization/properties.md +0 -281
  111. package/docs/layout-characterization/visual-quality.md +0 -160
  112. package/docs/layout-characterization/visual-snapshots/architecture.svg +0 -79
  113. package/docs/layout-characterization/visual-snapshots/class.svg +0 -60
  114. package/docs/layout-characterization/visual-snapshots/er.svg +0 -61
  115. package/docs/layout-characterization/visual-snapshots/flowchart.svg +0 -58
  116. package/docs/layout-characterization/visual-snapshots/gantt.svg +0 -52
  117. package/docs/layout-characterization/visual-snapshots/journey.svg +0 -98
  118. package/docs/layout-characterization/visual-snapshots/pie.svg +0 -36
  119. package/docs/layout-characterization/visual-snapshots/quadrant.svg +0 -47
  120. package/docs/layout-characterization/visual-snapshots/sequence.svg +0 -59
  121. package/docs/layout-characterization/visual-snapshots/state.svg +0 -52
  122. package/docs/layout-characterization/visual-snapshots/timeline.svg +0 -64
  123. package/docs/layout-characterization/visual-snapshots/xychart.svg +0 -97
  124. package/docs/mcp-code-mode-rationale.md +0 -101
  125. package/docs/mcp-http-transport.md +0 -223
  126. package/docs/mermaid-layout-complaints.md +0 -837
  127. package/docs/mutation-testing.md +0 -206
  128. package/docs/project/divergences.md +0 -98
  129. package/docs/project/dogfooding-docs-strategy.md +0 -66
  130. package/docs/project/hosted-mcp-cloudflare-plan.md +0 -338
  131. package/docs/project/lessons-learned.md +0 -1019
  132. package/docs/project/remove-role-styling-plan.md +0 -176
  133. package/docs/quality.md +0 -215
  134. package/docs/react.md +0 -97
  135. package/docs/style-authoring.md +0 -133
  136. package/docs/testing-strategy.md +0 -335
  137. package/docs/theming.md +0 -162
  138. package/examples/agent-improve-auth-flow.ts +0 -206
  139. package/examples/agent-loop.ts +0 -53
  140. package/examples/mcp-vs-cli-complex-diagrams.ts +0 -133
  141. package/llms.txt +0 -104
  142. package/skill-evals/README.md +0 -77
  143. package/skill-evals/fixtures/architecture-cache/input.mmd +0 -5
  144. package/skill-evals/fixtures/class-payment/input.mmd +0 -4
  145. package/skill-evals/fixtures/er-orders/input.mmd +0 -10
  146. package/skill-evals/fixtures/flowchart-cache/input.mmd +0 -3
  147. package/skill-evals/fixtures/gantt-release/input.mmd +0 -7
  148. package/skill-evals/fixtures/journey-checkout/input.mmd +0 -6
  149. package/skill-evals/fixtures/pie-exports/input.mmd +0 -5
  150. package/skill-evals/fixtures/quadrant-priorities/input.mmd +0 -11
  151. package/skill-evals/fixtures/sequence-retry/input.mmd +0 -8
  152. package/skill-evals/fixtures/state-lifecycle/input.mmd +0 -5
  153. package/skill-evals/fixtures/timeline-release/input.mmd +0 -6
  154. package/skill-evals/fixtures/xychart-growth/input.mmd +0 -5
  155. package/skill-evals/shared-benchmark.json +0 -510
  156. package/src/agent/analyze.ts +0 -157
  157. package/src/agent/apply.ts +0 -146
  158. package/src/agent/architecture-body.ts +0 -458
  159. package/src/agent/certificates.ts +0 -110
  160. package/src/agent/class-body.ts +0 -319
  161. package/src/agent/core.ts +0 -207
  162. package/src/agent/create.ts +0 -106
  163. package/src/agent/describe.ts +0 -368
  164. package/src/agent/er-body.ts +0 -224
  165. package/src/agent/facts.ts +0 -360
  166. package/src/agent/families-builtin.ts +0 -920
  167. package/src/agent/families.ts +0 -232
  168. package/src/agent/family-layouts.ts +0 -832
  169. package/src/agent/flowchart-body.ts +0 -372
  170. package/src/agent/flowchart-unsupported.ts +0 -243
  171. package/src/agent/font-coverage.ts +0 -288
  172. package/src/agent/gantt-body.ts +0 -495
  173. package/src/agent/index.ts +0 -10
  174. package/src/agent/journey-body.ts +0 -374
  175. package/src/agent/label-metrics.ts +0 -28
  176. package/src/agent/layout-to-rendered.ts +0 -63
  177. package/src/agent/mutate.ts +0 -97
  178. package/src/agent/mutation-ops.ts +0 -51
  179. package/src/agent/op-schema.ts +0 -443
  180. package/src/agent/parse.ts +0 -223
  181. package/src/agent/pie-body.ts +0 -270
  182. package/src/agent/png.ts +0 -171
  183. package/src/agent/quadrant-body.ts +0 -336
  184. package/src/agent/quality.ts +0 -363
  185. package/src/agent/readability-audit.ts +0 -92
  186. package/src/agent/rendered-route-audit.ts +0 -61
  187. package/src/agent/sequence-body.ts +0 -345
  188. package/src/agent/serialize.ts +0 -214
  189. package/src/agent/state-body.ts +0 -589
  190. package/src/agent/structural-count.ts +0 -150
  191. package/src/agent/timeline-body.ts +0 -280
  192. package/src/agent/trace-log.ts +0 -43
  193. package/src/agent/types.ts +0 -995
  194. package/src/agent/verify.ts +0 -603
  195. package/src/agent/xychart-body.ts +0 -472
  196. package/src/architecture/config.ts +0 -282
  197. package/src/architecture/layout.ts +0 -496
  198. package/src/architecture/parser.ts +0 -375
  199. package/src/architecture/renderer.ts +0 -611
  200. package/src/architecture/types.ts +0 -113
  201. package/src/ascii/ansi.ts +0 -423
  202. package/src/ascii/architecture.ts +0 -210
  203. package/src/ascii/canvas.ts +0 -443
  204. package/src/ascii/class-diagram.ts +0 -697
  205. package/src/ascii/converter.ts +0 -475
  206. package/src/ascii/draw.ts +0 -1693
  207. package/src/ascii/edge-bundling.ts +0 -328
  208. package/src/ascii/edge-routing.ts +0 -330
  209. package/src/ascii/er-diagram.ts +0 -439
  210. package/src/ascii/gantt.ts +0 -276
  211. package/src/ascii/grid.ts +0 -747
  212. package/src/ascii/index.ts +0 -196
  213. package/src/ascii/journey.ts +0 -169
  214. package/src/ascii/meta.ts +0 -244
  215. package/src/ascii/multiline-utils.ts +0 -80
  216. package/src/ascii/pathfinder.ts +0 -301
  217. package/src/ascii/pie.ts +0 -67
  218. package/src/ascii/quadrant.ts +0 -158
  219. package/src/ascii/reverse.ts +0 -216
  220. package/src/ascii/sequence.ts +0 -499
  221. package/src/ascii/shapes/circle.ts +0 -27
  222. package/src/ascii/shapes/corners.ts +0 -143
  223. package/src/ascii/shapes/diamond.ts +0 -27
  224. package/src/ascii/shapes/hexagon.ts +0 -27
  225. package/src/ascii/shapes/index.ts +0 -106
  226. package/src/ascii/shapes/rectangle.ts +0 -168
  227. package/src/ascii/shapes/rounded.ts +0 -27
  228. package/src/ascii/shapes/special.ts +0 -332
  229. package/src/ascii/shapes/stadium.ts +0 -110
  230. package/src/ascii/shapes/state.ts +0 -192
  231. package/src/ascii/shapes/types.ts +0 -73
  232. package/src/ascii/timeline.ts +0 -141
  233. package/src/ascii/types.ts +0 -312
  234. package/src/ascii/validate.ts +0 -120
  235. package/src/ascii/width.ts +0 -81
  236. package/src/ascii/wrap.ts +0 -131
  237. package/src/ascii/xychart.ts +0 -919
  238. package/src/browser.ts +0 -29
  239. package/src/class/layout.ts +0 -240
  240. package/src/class/parser.ts +0 -332
  241. package/src/class/renderer.ts +0 -638
  242. package/src/class/types.ts +0 -129
  243. package/src/cli/agent-instructions.ts +0 -1
  244. package/src/cli/am-bin.ts +0 -6
  245. package/src/cli/exit-codes.ts +0 -18
  246. package/src/cli/index.ts +0 -1132
  247. package/src/cli/init-agent.ts +0 -147
  248. package/src/cli/run-entrypoint.ts +0 -10
  249. package/src/color-resolver.ts +0 -152
  250. package/src/elk-instance.ts +0 -114
  251. package/src/er/layout.ts +0 -187
  252. package/src/er/parser.ts +0 -226
  253. package/src/er/renderer.ts +0 -792
  254. package/src/er/types.ts +0 -99
  255. package/src/family-rubric.ts +0 -425
  256. package/src/font-manifest.ts +0 -31
  257. package/src/gantt/layout.ts +0 -365
  258. package/src/gantt/parser.ts +0 -282
  259. package/src/gantt/pipeline.ts +0 -27
  260. package/src/gantt/renderer.ts +0 -414
  261. package/src/gantt/schedule.ts +0 -513
  262. package/src/gantt/types.ts +0 -255
  263. package/src/index.ts +0 -368
  264. package/src/journey/layout.ts +0 -554
  265. package/src/journey/parse-core.ts +0 -251
  266. package/src/journey/parser.ts +0 -101
  267. package/src/journey/renderer.ts +0 -917
  268. package/src/journey/types.ts +0 -144
  269. package/src/layout/geometry.ts +0 -182
  270. package/src/layout/pass.ts +0 -142
  271. package/src/layout/passes/index.ts +0 -3916
  272. package/src/layout-engine.ts +0 -1565
  273. package/src/layout-rubric.ts +0 -659
  274. package/src/mcp/artifacts.ts +0 -137
  275. package/src/mcp/dynamic-harness.ts +0 -31
  276. package/src/mcp/dynamic-modules.d.ts +0 -7
  277. package/src/mcp/facade.ts +0 -608
  278. package/src/mcp/harness-runtime.ts +0 -203
  279. package/src/mcp/hosted-server.ts +0 -468
  280. package/src/mcp/mcp-bin.ts +0 -3
  281. package/src/mcp/mcp-cli.ts +0 -82
  282. package/src/mcp/protocol.ts +0 -13
  283. package/src/mcp/sandbox.ts +0 -195
  284. package/src/mcp/sdk-decl.ts +0 -391
  285. package/src/mcp/server.ts +0 -362
  286. package/src/mcp/tool-surface.ts +0 -146
  287. package/src/mermaid-source.ts +0 -655
  288. package/src/multiline-utils.ts +0 -228
  289. package/src/parser.ts +0 -1031
  290. package/src/pie/layout.ts +0 -168
  291. package/src/pie/parser.ts +0 -136
  292. package/src/pie/renderer.ts +0 -234
  293. package/src/pie/types.ts +0 -82
  294. package/src/quadrant/layout.ts +0 -191
  295. package/src/quadrant/parser.ts +0 -183
  296. package/src/quadrant/renderer.ts +0 -322
  297. package/src/quadrant/types.ts +0 -113
  298. package/src/render-family-hooks.ts +0 -244
  299. package/src/renderer.ts +0 -1099
  300. package/src/route-contracts.ts +0 -2723
  301. package/src/scene/backend.ts +0 -76
  302. package/src/scene/fidelity.ts +0 -183
  303. package/src/scene/hybrid-backend.ts +0 -174
  304. package/src/scene/ir.ts +0 -181
  305. package/src/scene/marks.ts +0 -127
  306. package/src/scene/rough-backend.ts +0 -378
  307. package/src/scene/seed.ts +0 -46
  308. package/src/scene/style-registry.ts +0 -556
  309. package/src/sequence/layout.ts +0 -456
  310. package/src/sequence/parser.ts +0 -255
  311. package/src/sequence/renderer.ts +0 -604
  312. package/src/sequence/types.ts +0 -154
  313. package/src/shape-clipping.ts +0 -351
  314. package/src/shared/accessibility-directives.ts +0 -22
  315. package/src/shared/batched.ts +0 -61
  316. package/src/shared/color-math.ts +0 -93
  317. package/src/shared/svg-a11y.ts +0 -29
  318. package/src/shared/syntax-error.ts +0 -17
  319. package/src/shared/unicode-ranges.ts +0 -135
  320. package/src/styles.ts +0 -318
  321. package/src/svg-paths.ts +0 -28
  322. package/src/text-metrics.ts +0 -248
  323. package/src/theme.ts +0 -710
  324. package/src/timeline/layout.ts +0 -381
  325. package/src/timeline/parser.ts +0 -215
  326. package/src/timeline/renderer.ts +0 -538
  327. package/src/timeline/types.ts +0 -105
  328. package/src/types.ts +0 -462
  329. package/src/website-worker-modules.d.ts +0 -18
  330. package/src/xychart/axis-utils.ts +0 -109
  331. package/src/xychart/colors.ts +0 -124
  332. package/src/xychart/config.ts +0 -88
  333. package/src/xychart/layout.ts +0 -656
  334. package/src/xychart/parser.ts +0 -504
  335. package/src/xychart/renderer.ts +0 -640
  336. package/src/xychart/types.ts +0 -282
@@ -1,281 +0,0 @@
1
- # Load-bearing properties of the layout characterisation
2
-
3
- This is the **smallest set of properties that characterise and determine** the
4
- hand-written ASCII grid + A\* layout algorithm
5
- (`src/ascii/grid.ts`, `pathfinder.ts`, `edge-routing.ts`, `edge-bundling.ts`).
6
- Each property is encoded as a property-based test in
7
- [`src/__tests__/characterization-layout.test.ts`](../../src/__tests__/characterization-layout.test.ts)
8
- and motivated by a worked example in [`contact-sheet.md`](./contact-sheet.md).
9
-
10
- The renderer breadth layer is intentionally smaller and more conservative:
11
- [`src/__tests__/characterization-families.test.ts`](../../src/__tests__/characterization-families.test.ts)
12
- extends only the universal assumptions that hold across every diagram family
13
- and public output surface. It is motivated by
14
- [`contact-sheet-families.md`](./contact-sheet-families.md).
15
-
16
- The visual-quality layer
17
- ([`visual-quality.md`](./visual-quality.md)) is an approval artifact rather than
18
- part of the minimal property kernel: it records SVG snapshots, SVG/PNG hashes,
19
- and review metrics for crossings, bends, route length, canvas area, label fit,
20
- and edge-label overlap risk. After PR 30, the hard route-quality oracle lives in
21
- `src/layout-rubric.ts` and `src/__tests__/layout-rubric.test.ts`; this document
22
- does not duplicate those assertions.
23
-
24
- "Load-bearing" has a precise operational meaning here (see
25
- [§ Minimality](#minimality)): a property is load-bearing if removing it lets a
26
- plausible single-edit mutation of the layout code survive — i.e. it is the
27
- property that *kills* that class of mutant. Properties that kill no unique
28
- mutant are redundant and excluded.
29
-
30
- These are **characterisation** properties in Michael Feathers' sense (*Working
31
- Effectively with Legacy Code*, ch. 13): they pin **what the algorithm does
32
- today**, not what it ideally should do. A passing suite means behaviour is
33
- unchanged; it is not a correctness oracle. When an intended change flips one of
34
- them, that is the signal to update the characterisation deliberately.
35
-
36
- ---
37
-
38
- ## Why there are three tiers
39
-
40
- The algorithm is a **best-effort heuristic layout**, not a solver. Empirically
41
- (over thousands of generated graphs) its guarantees fall into three bands:
42
-
43
- - **Tier A — universal invariants.** True for *every* valid flowchart/state
44
- input, including cycles, self-loops, and dense graphs. These are the hard
45
- contract.
46
- - **Tier B — structural properties on well-behaved subclasses.** True for
47
- trees / DAGs / linear chains, where placement is unambiguous. The algorithm
48
- does **not** extend these guarantees to cyclic or dense graphs — and *that
49
- boundary is itself a characterisation* (Tier C, P10).
50
- - **Tier C — metamorphic relations & known limits.** Relations between two
51
- renders (BT vs TD, RL vs LR, relabelled vs original) that pin specific design
52
- decisions, plus an explicit pin of a place where Tier B *fails*.
53
-
54
- This mirrors the literature's split between **invariants** (oracle-grade, exact
55
- assertions) and **quality heuristics** (graded, only safe to assert as
56
- metamorphic/monotonic relations). Crossing count, edge length, and compactness
57
- are quality heuristics and are deliberately **not** asserted here — they are
58
- brittle golden values, not load-bearing invariants.
59
-
60
- PR 30 adds one important refinement to that split: some visual qualities have
61
- become hard, computable route-contract assertions for graph-projected families
62
- (flowchart, state, architecture). Hitches, diagonal routed segments,
63
- off-outline endpoints, edge-through-node routes, label-off-route ambiguity, and
64
- stale straight-route certificates are no longer mere approval signals there;
65
- they are correctness failures in `layout-rubric.test.ts` and
66
- `contact-sheet.test.ts`. The characterisation suite therefore treats those
67
- tests as the correctness layer and uses this directory to record approved
68
- observable baselines around it.
69
-
70
- ---
71
-
72
- ## Tier A — universal invariants
73
-
74
- | ID | Property | Statement (holds ∀ valid input) | Kills mutants in |
75
- |----|----------|----------------------------------|------------------|
76
- | **P1** | Totality | `render(src)` never throws and is non-empty. | A\* iteration cap (`pathfinder.ts`), multi-pass safety break (`grid.ts:582`), index guards |
77
- | **P2** | Determinism | `render(src)` is byte-identical across runs. | MinHeap FIFO tie-break (`pathfinder.ts:16-27,60-63`), label/segment tie-breaks (`edge-routing.ts:299-305`), stable root sort (`grid.ts:469-470`) |
78
- | **P3** | Orthogonality | Output contains no diagonal connector glyphs (`/ \ ╱ ╲`). | A\* move set (`pathfinder.ts:124-129`), `mergePath` (`pathfinder.ts:266-301`) |
79
- | **P4** | Rectangularity | Every output line has the same display width. | canvas sizing (`canvas.ts setCanvasSizeToGrid`), row/column padding (`grid.ts setColumnWidth`) |
80
-
81
- P2 is the **keystone**: it is what makes the golden/approval corpus
82
- (`src/__tests__/testdata/`) valid at all, and it is the property the whole
83
- determinism apparatus (FIFO heap `seq`, ELK-free pure code, insertion-ordered
84
- maps) exists to provide. P3 is the **defining** invariant — "orthogonal A\*
85
- router" *is* the algorithm; a diagonal is by definition a bug
86
- (`assertNoDiagonals`, `validate.ts`).
87
-
88
- ## Tier B — structural properties (trees & chains)
89
-
90
- | ID | Property | Statement | Scope | Kills mutants in |
91
- |----|----------|-----------|-------|------------------|
92
- | **P5** | Node conservation | Every declared node is drawn. | out-trees | placement multi-pass (`grid.ts:515-583`) |
93
- | **P6** | Box non-overlap | Drawn node boxes are pairwise disjoint. | out-trees | 3×3 reservation + stride-4 collision shift (`grid.ts:76-104`) |
94
- | **P7** | Monotone layering | For each forward edge `u→v`, `v`'s box is strictly downstream of `u` on the flow axis (below for TD, right for LR). | trees | layer stride (`grid.ts:539`), flow-axis direction (`grid.ts:496-571`) |
95
- | **P8** | Structural round-trip | `asciiToMermaid(render(chain))` recovers the same node and edge counts. | linear chains | edge emission (`converter.ts`), routing reaching endpoints (`edge-routing.ts:222-228`) |
96
-
97
- P7 is the **Sugiyama layer-assignment essence** in character space: it is the
98
- single property that says "this is a layered downward/rightward drawing." P8 is
99
- the only property that checks **edges connect the right endpoints** end-to-end,
100
- dogfooding the repo's own documented round-trip contract (`reverse.ts`).
101
-
102
- ## Tier C — metamorphic relations & known limits
103
-
104
- | ID | Property | Statement | Pins |
105
- |----|----------|-----------|------|
106
- | **P9a** | BT = flip(TD) | An ASCII BT render equals the vertical flip (with arrowhead remap) of the TD render. | `index.ts:179-194` (BT laid out as TD then flipped) |
107
- | **P9b** | RL = LR | An RL render is byte-identical to the LR render. | `index.ts:179-181` (RL "not yet implemented", treated as LR) |
108
- | **P9c** | Relabel invariance | Replacing labels with same-length labels leaves the layout skeleton unchanged. | placement depends on label *width*, not identity |
109
- | **P10** | Known limit | A 2-cycle does **not** conserve all nodes (P5 fails). | placement multi-pass safety break (`grid.ts:582`) — pins that this is *currently* lossy |
110
-
111
- P9b and P10 are "canary" characterisations: they currently pin a *limitation*.
112
- If someone implements real RL support or makes cyclic placement lossless, these
113
- tests flip — which is exactly when a human should look and re-approve.
114
-
115
- ---
116
-
117
- ## Renderer-family breadth properties
118
-
119
- These properties answer the "all renderers" part of the prompt. They do **not**
120
- claim that every renderer shares the grid algorithm's structural invariants;
121
- sequence, class, ER, timeline, journey, xychart, pie, quadrant, and
122
- architecture each have their own layout strategy. Instead, they pin the
123
- cross-family contracts that make the render surface usable and refactorable.
124
-
125
- | ID | Property | Statement | Scope |
126
- |----|----------|-----------|-------|
127
- | **F1** | Dispatch totality | Each of the 12 built-in families renders non-empty text/SVG and a valid PNG signature. | flowchart, state, sequence, class, ER, timeline, gantt, journey, xychart, pie, quadrant, architecture |
128
- | **F2** | Sentinel label conservation | Representative labels survive on the text and SVG surfaces, proving family dispatch did not fall through to an empty/adjacent renderer. | all 12 families |
129
- | **F3** | Renderer determinism | Representative text, SVG, and PNG renders are byte-stable across repeated calls. | all 12 families |
130
- | **F4** | Output hygiene | Plain text has no ANSI escapes when color is disabled, and text/SVG do not leak `NaN`, `Infinity`, or `undefined`. | all 12 families |
131
- | **F5** | Text orthogonality / block-only output | Generated text renders contain no diagonal connector glyphs. | all non-grid families, with flowchart/state covered by P3 |
132
- | **F6** | Rectangularity boundary | Rectangular text output holds for box/graph families only; chart/list/architecture families are intentionally ragged. | sequence, class, ER are rectangular; pie pins the ragged boundary |
133
-
134
- F1-F4 are finite matrix properties because the renderer surface is a dispatch
135
- contract: one canonical specimen per family catches missing switch branches,
136
- misdetected families, broken PNG rasterization, and accidental text/SVG leakage.
137
- F5-F6 are generated where a family has a compact valid-input generator and the
138
- invariant is meaningful.
139
-
140
- ---
141
-
142
- ## Visual-quality approval signals
143
-
144
- The graph-drawing literature treats crossings, bends, route length, canvas area,
145
- and label overlap as aesthetic objectives or optimization costs. They are
146
- important, but they are not invariant in the same way as totality,
147
- determinism, or orthogonality. PR 30's route-contract work promoted a subset of
148
- these signals to hard checks when a clear geometric contract exists; the
149
- remaining cross-family metrics stay in a generated approval artifact instead of
150
- being folded into the minimal PBT kernel:
151
-
152
- | ID | Signal | What changes mean |
153
- |----|--------|-------------------|
154
- | **V1** | SVG snapshots | Human-visible visual drift in any renderer family. |
155
- | **V2** | SVG/PNG fingerprints | Byte-level drift on both vector and raster public surfaces. |
156
- | **V3** | Quality metrics | Changes in crossings, bends, route length, area fill, label fit, or edge-label overlap risk. |
157
- | **V4** | Generator drift check | A stale contact sheet or visual report fails `characterization-generated-artifacts.test.ts` / `bun run characterization:check`. |
158
-
159
- These signals should trigger review, not panic. A quality metric can improve,
160
- degrade, or simply change because a layout strategy changed. The review question
161
- is whether the new visual behaviour is intended and whether the generated
162
- artifact was updated deliberately.
163
-
164
- The PR 30 rebase is the model case. The generated-artifact check identified
165
- only the flowchart and state snapshots as stale after the route-contract merge,
166
- which matches the observed layout surface of that PR in this canonical family
167
- set. Drift in class, ER, sequence, chart, pie, quadrant, timeline, journey, or
168
- architecture snapshots would have required a separate explanation unless the PR
169
- explicitly claimed and reviewed that family. Architecture is graph-projected
170
- through route contracts, so the important fact here is not that PR 30 could
171
- never affect it; it is that this rebase did not.
172
-
173
- ---
174
-
175
- ## <a id="minimality"></a>Minimality: why this set, and no smaller
176
-
177
- The target is *the smallest set of properties whose removal lets a previously
178
- killed mutant survive* (the operational definition of "load-bearing" from
179
- property-based mutation testing, Bartocci et al. 2023). The reasoning per
180
- property:
181
-
182
- - Drop **P2 (determinism)** → a mutant that swaps the deterministic heap
183
- tie-break for an order-dependent one survives every other property (output is
184
- still total, orthogonal, rectangular, correctly shaped) but breaks the golden
185
- corpus non-reproducibly. Only P2 catches it.
186
- - Drop **P3 (orthogonality)** → a mutant adding a diagonal A\* move survives P1/P2/P4
187
- (still total, deterministic, rectangular) but produces `\`/`/`. Only P3 catches it.
188
- - Drop **P4 (rectangularity)** → an off-by-one in row/column padding can ragged-edge
189
- the canvas while staying total, deterministic, and diagonal-free.
190
- - Drop **P7 (monotone layering)** → a mutant that flips the flow axis or zeroes the
191
- `+4` level stride still renders *something* total/orthogonal/rectangular;
192
- P5/P6 (conservation, non-overlap) can still hold. Only P7 sees that children
193
- no longer go downstream of parents.
194
- - Drop **P8 (round-trip)** → a mutant that drops or duplicates an edge keeps every
195
- geometric invariant; only the end-to-end node/edge-count check notices.
196
- - Drop **P5/P6** → conservation and non-overlap are independent failure modes
197
- (a node can be dropped *or* two boxes can collide); neither implies the other.
198
- - Drop **P9a/P9c** → BT-flip and relabel mutants are otherwise invisible: a broken
199
- flip still yields a valid TD-shaped diagram; a label leaking into placement
200
- still yields a valid diagram for the original labels.
201
- - **P1 (totality)** is the cheap floor that every other property silently assumes
202
- (they can't assert on a throw).
203
- - Drop **F1/F2** → a renderer-family dispatch branch can disappear, fall through,
204
- or return a placeholder while the deep grid tests remain green.
205
- - Drop **F3/F4** → renderer-specific nondeterminism or leaked layout sentinels can
206
- escape outside the grid engine, invalidating contact sheets, snapshots, and PNG
207
- raster output.
208
- - Drop **F5/F6** → the breadth layer stops recording which text renderers share
209
- the grid-like contracts and which intentionally do not.
210
-
211
- Conversely, the set does **not** include redundant properties:
212
-
213
- - "Edges are 4-adjacent paths" is already implied by **P3** at the output level.
214
- - "Same-level nodes share a flow-axis coordinate" is the converse of **P7** and is
215
- not independently load-bearing for trees.
216
- - Crossing count / edge length / compactness are **quality heuristics**, not
217
- invariants — asserting exact values is brittle and they are intentionally
218
- left to the visual approval layer, not this kernel.
219
-
220
- The unit-level A\* invariants (shortest Manhattan path on an empty grid,
221
- obstacle avoidance, `mergePath` idempotence, bounded search) are *also*
222
- load-bearing but already covered by the existing
223
- [`property-ascii-routing.test.ts`](../../src/__tests__/property-ascii-routing.test.ts);
224
- this kernel deliberately sits one level up, at the whole-render contract, to
225
- avoid duplicating them.
226
-
227
- ---
228
-
229
- ## Academic grounding (one line each)
230
-
231
- - **Layered drawing / Sugiyama–Tagawa–Toda (1981); Gansner et al. (1993, `dot`).**
232
- The 4-phase model (cycle removal → layer assignment → crossing minimisation →
233
- coordinate assignment) this algorithm approximates on a character grid; P7 is
234
- the layer-assignment phase made observable.
235
- - **Brandes–Köpf (2002).** Horizontal coordinate assignment with a hard "≤2
236
- bends per edge" bound — an example of an invariant that *is* assertable, vs.
237
- crossing count which is not.
238
- - **Hart, Nilsson & Raphael (1968), A\*.** `f = g + h`; the router's heuristic is
239
- Manhattan distance plus a `+1` corner penalty (prefers straight runs).
240
- - **Tamassia (1968→1987) bend minimisation; Wybrow–Marriott–Stuckey (2009)
241
- Orthogonal Connector Routing.** Orthogonality (P3) is a hard invariant of the
242
- search space; bend/length minimisation are *objectives* (penalties), not
243
- invariants — hence not asserted exactly.
244
- - **Feathers (2004), characterisation tests; Falco, approval/golden tests.** The
245
- whole framing: pin actual behaviour, review diffs, approve changes.
246
- - **Bartocci et al. (2023), property-based mutation testing.** The "load-bearing
247
- = kills a unique mutant" criterion used in [§ Minimality](#minimality);
248
- Stryker (`stryker.characterization.config.json` for fast PR evidence,
249
- `stryker.ascii.config.json` for the exhaustive run) is the tool that can
250
- verify it.
251
-
252
- The fast characterization Stryker config is a smoke gate over selected mutation
253
- ranges, not a substitute for the exhaustive ASCII run. Surviving mutants in the
254
- smoke report are useful backlog signals for future deeper characterisation; the
255
- full ASCII config remains the expensive overnight-style audit.
256
-
257
- ## How to use this
258
-
259
- ```bash
260
- # Run the characterisation kernels
261
- bun test src/__tests__/characterization-layout.test.ts
262
- bun test src/__tests__/characterization-families.test.ts
263
-
264
- # Verify PR 30 route-contract correctness before approving visual drift
265
- bun test src/__tests__/contact-sheet.test.ts src/__tests__/layout-rubric.test.ts
266
- bun run track
267
-
268
- # Regenerate the worked-examples contact sheets (approval workflow)
269
- bun run scripts/characterization/contact-sheet.ts
270
- bun run scripts/characterization/contact-sheet-families.ts
271
- bun run scripts/characterization/visual-quality.ts
272
-
273
- # CI-friendly generated-artifact drift check
274
- bun run characterization:check
275
-
276
- # Quick mutation evidence for the load-bearing ranges
277
- bun run mutation-test:characterization
278
-
279
- # Exhaustive but slow: mutates the whole ASCII layout core
280
- bun run mutation-test:ascii
281
- ```
@@ -1,160 +0,0 @@
1
- # Visual quality characterisation
2
-
3
- > Generated by `scripts/characterization/visual-quality.ts`. Do not edit by hand.
4
-
5
- This is the approval layer for visual/layout quality. The SVG files are
6
- human-inspectable snapshots; the hashes fingerprint the SVG and PNG surfaces;
7
- the metrics are graph-drawing review signals (crossings, bends, canvas area,
8
- label fit, and label-overlap risk), not standalone correctness laws.
9
- For graph-projected route correctness, pair this report with PR 30's hard
10
- gates: `src/__tests__/contact-sheet.test.ts`,
11
- `src/__tests__/layout-rubric.test.ts`, and `bun run track`.
12
-
13
- | Family | SVG snapshot | SVG SHA | PNG SHA | PNG bytes | SVG size | Layout bounds | Nodes/edges | Crossings | Bends | Route px | Area fill | Label fit | Label overlaps | Edge-label clearance | Aspect |
14
- |--------|--------------|---------|---------|----------:|----------|---------------|-------------|----------:|------:|---------:|----------:|----------:|---------------:|---------------------:|-------:|
15
- | Flowchart | [flowchart.svg](./visual-snapshots/flowchart.svg) | `ec1b1ca9443d` | `115eeaf5a982` | 9018 | 279.6835x434.582 | 280x435 | 4/4 | 0 | 0 | 533 | 15.5% | 100.0% | 0 | 7 | 0.64 |
16
- | State diagram | [state.svg](./visual-snapshots/state.svg) | `8e9deb92ba71` | `171ef8b10734` | 7326 | 241.14266666666668x375.15000000000003 | 241x375 | 5/5 | 0 | 6 | 628 | 11.3% | 100.0% | 0 | n/a | 0.64 |
17
- | Sequence diagram | [sequence.svg](./visual-snapshots/sequence.svg) | `23717c64433e` | `fc934d1a2e01` | 7135 | 420x280 | 420x280 | 3/4 | 0 | 0 | 560 | 8.2% | 100.0% | 0 | 10 | 1.50 |
18
- | Class diagram | [class.svg](./visual-snapshots/class.svg) | `d14da80c1cb7` | `ea089943c1dc` | 3950 | 360x237.8 | 360x238 | 3/2 | 0 | 2 | 240 | 20.6% | 100.0% | 0 | n/a | 1.51 |
19
- | ER diagram | [er.svg](./visual-snapshots/er.svg) | `be65847067be` | `e16cb6c925da` | 9649 | 951.768x136 | 952x136 | 3/2 | 0 | 0 | 452 | 18.2% | 100.0% | 0 | 115 | 7.00 |
20
- | Timeline | [timeline.svg](./visual-snapshots/timeline.svg) | `c07cd647b657` | `c01793e9745b` | 8031 | 380x286.6 | 380x287 | 4/0 | 0 | 0 | 0 | 13.2% | 100.0% | 0 | n/a | 1.32 |
21
- | Gantt chart | [gantt.svg](./visual-snapshots/gantt.svg) | `784dedd3d334` | `21ee1716da07` | 9321 | 703x282 | 703x282 | 4/0 | 0 | 0 | 0 | 6.9% | 75.0% | 0 | n/a | 2.49 |
22
- | User journey | [journey.svg](./visual-snapshots/journey.svg) | `b47e71e142ea` | `3069450b8529` | 15279 | 530x482.3 | 530x482 | 2/0 | 0 | 0 | 0 | 5.9% | 100.0% | 0 | n/a | 1.10 |
23
- | XY chart | [xychart.svg](./visual-snapshots/xychart.svg) | `bdcb4e4ce1b2` | `d7df7b4f86de` | 15427 | 700x500 | 700x500 | 6/0 | 0 | 0 | 0 | 37.6% | 50.0% | 0 | n/a | 1.40 |
24
- | Pie chart | [pie.svg](./visual-snapshots/pie.svg) | `fc3f5d7bfc34` | `dde9d49be7a7` | 10784 | 368.79x276 | 369x276 | 3/0 | 0 | 0 | 0 | 4.1% | 100.0% | 0 | n/a | 1.34 |
25
- | Quadrant chart | [quadrant.svg](./visual-snapshots/quadrant.svg) | `d75d9de8aea3` | `63b16868b93e` | 9305 | 456x492 | 456x492 | 2/0 | 0 | 0 | 0 | 0.1% | 100.0% | 0 | n/a | 0.93 |
26
- | Architecture diagram | [architecture.svg](./visual-snapshots/architecture.svg) | `56fce2e98409` | `777507a15f7a` | 4182 | 414x188 | 414x188 | 2/1 | 0 | 0 | 78 | 14.8% | 100.0% | 0 | n/a | 2.20 |
27
-
28
- ## Sources
29
-
30
- ### Flowchart
31
-
32
- ```mermaid
33
- graph TD
34
- Start[Start] --> Check{Check}
35
- Check -->|yes| Done[Done]
36
- Check -->|no| Retry[Retry]
37
- Retry --> Check
38
- ```
39
-
40
- ### State diagram
41
-
42
- ```mermaid
43
- stateDiagram-v2
44
- [*] --> Idle
45
- Idle --> Running
46
- Running --> Failed
47
- Failed --> Idle
48
- Running --> [*]
49
- ```
50
-
51
- ### Sequence diagram
52
-
53
- ```mermaid
54
- sequenceDiagram
55
- participant Alice
56
- participant Bob
57
- participant DB
58
- Alice->>Bob: Request
59
- Bob->>DB: Query
60
- DB-->>Bob: Rows
61
- Bob-->>Alice: Response
62
- ```
63
-
64
- ### Class diagram
65
-
66
- ```mermaid
67
- classDiagram
68
- class Animal
69
- class Dog
70
- class Cat
71
- Animal <|-- Dog
72
- Animal <|-- Cat
73
- ```
74
-
75
- ### ER diagram
76
-
77
- ```mermaid
78
- erDiagram
79
- CUSTOMER ||--o{ ORDER : places
80
- ORDER ||--|{ LINE_ITEM : contains
81
- ```
82
-
83
- ### Timeline
84
-
85
- ```mermaid
86
- timeline
87
- title Release Plan
88
- section Build
89
- 2025 : Prototype
90
- 2026 : Launch
91
- ```
92
-
93
- ### Gantt chart
94
-
95
- ```mermaid
96
- gantt
97
- title Launch plan
98
- dateFormat YYYY-MM-DD
99
- axisFormat %b %d
100
- excludes weekends
101
- section Build
102
- Spec :done, spec, 2024-01-01, 2d
103
- Implement :active, impl, after spec, 3d
104
- section Ship
105
- QA :crit, qa, after impl, 2d
106
- Launch :milestone, launch, after qa, 0d
107
- Release line :vert, release, 2024-01-10, 0d
108
- ```
109
-
110
- ### User journey
111
-
112
- ```mermaid
113
- journey
114
- title Checkout
115
- section Cart
116
- Review basket: 4: Shopper
117
- Pay: 5: Shopper
118
- ```
119
-
120
- ### XY chart
121
-
122
- ```mermaid
123
- xychart
124
- title Sales
125
- x-axis [Jan, Feb, Mar]
126
- y-axis Revenue 0 --> 10
127
- bar [3, 7, 5]
128
- line [2, 6, 8]
129
- ```
130
-
131
- ### Pie chart
132
-
133
- ```mermaid
134
- pie title Pets
135
- "Cats" : 4
136
- "Dogs" : 6
137
- "Birds" : 2
138
- ```
139
-
140
- ### Quadrant chart
141
-
142
- ```mermaid
143
- quadrantChart
144
- title Priorities
145
- x-axis Low --> High
146
- y-axis Risk --> Reward
147
- quadrant-1 Invest
148
- A: [0.7, 0.8]
149
- B: [0.3, 0.4]
150
- ```
151
-
152
- ### Architecture diagram
153
-
154
- ```mermaid
155
- architecture-beta
156
- group api(cloud)[API]
157
- service app(server)[App] in api
158
- service db(database)[DB]
159
- app:R --> L:db
160
- ```
@@ -1,79 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 414 188" width="414" height="188" style="--bg:#FFFFFF;--fg:#27272A;--font:Inter;background:#FFFFFF">
2
- <style>
3
- text { font-family: var(--font, 'Inter'), system-ui, sans-serif; }
4
- svg {
5
- /* Derived from --bg and --fg (overridable via --line, --accent, etc.) */
6
- --_text: #27272A;
7
- --_text-sec: #575759;
8
- --_text-muted: #707072;
9
- --_text-faint: #8a8a8c;
10
- --_line: #939395;
11
- --_arrow: #47474a;
12
- --_node-fill: #f9f9f9;
13
- --_node-stroke: #d4d4d4;
14
- --_group-fill: #FFFFFF;
15
- --_group-hdr: #f4f4f4;
16
- --_inner-stroke: #e5e5e5;
17
- --_key-badge: #e9e9ea;
18
- }
19
- </style>
20
- <style>
21
- .architecture-group-frame { fill: #fafafa; stroke: none; }
22
- .architecture-group-band { fill: #f6f6f6; stroke: none; }
23
- .architecture-group-outline { fill: none; stroke: #d4d4d4; stroke-width: 1; }
24
- .architecture-group-label { fill: #575759; }
25
- .architecture-service-card { fill: #f9f9f9; stroke: none; }
26
- .architecture-service-outline { fill: none; stroke: #d4d4d4; stroke-width: 1; }
27
- .architecture-service-label { fill: #27272A; }
28
- .architecture-edge { fill: none; stroke: #939395; stroke-width: 1; stroke-linejoin: round; }
29
- .architecture-edge-label-bg { fill: #fefefe; stroke: #ececec; stroke-width: 0.75; }
30
- .architecture-edge-label-text { fill: #707072; }
31
- .architecture-junction-ring { fill: #FFFFFF; stroke: #47474a; stroke-width: 1.25; }
32
- .architecture-junction-core { fill: #d3d3d4; stroke: #47474a; stroke-width: 0.75; }
33
- .architecture-icon-mark { fill: none; stroke: #47474a; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
34
- .architecture-icon-glyph { fill: #47474a; }
35
- </style>
36
- <defs>
37
- <marker id="char-architecture-architecture-arrow-end" markerWidth="8" markerHeight="5" refX="7" refY="2.5" orient="auto">
38
- <polygon points="0 0, 8 2.5, 0 5" fill="#47474a" stroke="#47474a" stroke-width="0.75" stroke-linejoin="round" />
39
- </marker>
40
- <marker id="char-architecture-architecture-arrow-start" markerWidth="8" markerHeight="5" refX="1" refY="2.5" orient="auto-start-reverse">
41
- <polygon points="8 0, 0 2.5, 8 5" fill="#47474a" stroke="#47474a" stroke-width="0.75" stroke-linejoin="round" />
42
- </marker>
43
- </defs>
44
- <g class="architecture-group" data-id="api" data-label="API">
45
- <rect class="architecture-group-frame" x="38" y="40" width="156" height="110" rx="0" ry="0" />
46
- <path class="architecture-group-band" d="M38,40 H194 V68 H38 Z" />
47
- <rect class="architecture-group-outline" x="38" y="40" width="156" height="110" rx="0" ry="0" />
48
- <g class="architecture-icon" data-icon="cloud">
49
- <circle class="architecture-icon-mark" cx="53.3504" cy="54.2944" r="2.3552" />
50
- <circle class="architecture-icon-mark" cx="56.2944" cy="52.8224" r="2.9440000000000004" />
51
- <circle class="architecture-icon-mark" cx="58.944" cy="54.2944" r="2.208" />
52
- <path class="architecture-icon-mark" d="M 50.9952 56.355199999999996 H 60.8576" />
53
- </g>
54
- <text x="74" y="54" class="architecture-group-label" text-anchor="start" font-size="12" font-weight="600" dy="4.199999999999999">API</text>
55
- </g>
56
- <polyline class="architecture-edge" data-from="app" data-to="db" data-from-side="R" data-to-side="L" data-from-boundary="item" data-to-boundary="item" points="176,108 254,108" marker-end="url(#char-architecture-architecture-arrow-end)" />
57
- <g class="architecture-service" data-id="db" data-label="DB">
58
- <rect class="architecture-service-card" x="254" y="84" width="120" height="48" rx="0" ry="0" />
59
- <rect class="architecture-service-outline" x="254" y="84" width="120" height="48" rx="0" ry="0" />
60
- <g class="architecture-icon" data-icon="database">
61
- <ellipse class="architecture-icon-mark" cx="283" cy="105.12" rx="4.32" ry="1.8" />
62
- <path class="architecture-icon-mark" d="M 278.68 105.12 V 111.6" />
63
- <path class="architecture-icon-mark" d="M 287.32 105.12 V 111.6" />
64
- <ellipse class="architecture-icon-mark" cx="283" cy="108.36" rx="4.32" ry="1.8" />
65
- <ellipse class="architecture-icon-mark" cx="283" cy="111.6" rx="4.32" ry="1.8" />
66
- </g>
67
- <text x="306" y="108" class="architecture-service-label" text-anchor="start" font-size="13" font-weight="500" dy="4.55">DB</text>
68
- </g>
69
- <g class="architecture-service" data-id="app" data-label="App">
70
- <rect class="architecture-service-card" x="56" y="84" width="120" height="48" rx="0" ry="0" />
71
- <rect class="architecture-service-outline" x="56" y="84" width="120" height="48" rx="0" ry="0" />
72
- <g class="architecture-icon" data-icon="server">
73
- <rect class="architecture-icon-mark" x="81.04" y="103.68" width="7.92" height="8.64" rx="0" ry="0" />
74
- <path class="architecture-icon-mark" d="M 82.12 106.56 H 87.88" />
75
- <path class="architecture-icon-mark" d="M 82.12 109.08 H 87.88" />
76
- </g>
77
- <text x="108" y="108" class="architecture-service-label" text-anchor="start" font-size="13" font-weight="500" dy="4.55">App</text>
78
- </g>
79
- </svg>
@@ -1,60 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 237.8" width="360" height="237.8" style="--bg:#FFFFFF;--fg:#27272A;--font:Inter;background:#FFFFFF">
2
- <style>
3
- text { font-family: var(--font, 'Inter'), system-ui, sans-serif; }
4
- .mono { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace; }
5
- svg {
6
- /* Derived from --bg and --fg (overridable via --line, --accent, etc.) */
7
- --_text: #27272A;
8
- --_text-sec: #575759;
9
- --_text-muted: #707072;
10
- --_text-faint: #8a8a8c;
11
- --_line: #939395;
12
- --_arrow: #47474a;
13
- --_node-fill: #f9f9f9;
14
- --_node-stroke: #d4d4d4;
15
- --_group-fill: #FFFFFF;
16
- --_group-hdr: #f4f4f4;
17
- --_inner-stroke: #e5e5e5;
18
- --_key-badge: #e9e9ea;
19
- }
20
- </style>
21
- <defs>
22
- <marker id="char-class-cls-inherit" markerWidth="12" markerHeight="10" refX="12" refY="5" orient="auto-start-reverse">
23
- <polygon points="0 0, 12 5, 0 10" fill="#FFFFFF" stroke="#47474a" stroke-width="1.5" />
24
- </marker>
25
- <marker id="char-class-cls-composition" markerWidth="12" markerHeight="10" refX="0" refY="5" orient="auto-start-reverse">
26
- <polygon points="6 0, 12 5, 6 10, 0 5" fill="#47474a" stroke="#47474a" stroke-width="1" />
27
- </marker>
28
- <marker id="char-class-cls-aggregation" markerWidth="12" markerHeight="10" refX="0" refY="5" orient="auto-start-reverse">
29
- <polygon points="6 0, 12 5, 6 10, 0 5" fill="#FFFFFF" stroke="#47474a" stroke-width="1.5" />
30
- </marker>
31
- <marker id="char-class-cls-arrow" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto-start-reverse">
32
- <polyline points="0 0, 8 3, 0 6" fill="none" stroke="#47474a" stroke-width="1.5" />
33
- </marker>
34
- </defs>
35
- <polyline class="class-relationship" data-from="Animal" data-to="Dog" data-type="inheritance" data-marker-at="from" points="100,88.9 100,148.9" fill="none" stroke="#939395" stroke-width="1" marker-start="url(#char-class-cls-inherit)" />
36
- <polyline class="class-relationship" data-from="Animal" data-to="Cat" data-type="inheritance" data-marker-at="from" points="140,88.9 140,98.9 260,98.9 260,148.9" fill="none" stroke="#939395" stroke-width="1" marker-start="url(#char-class-cls-inherit)" />
37
- <g class="class-node" data-id="Animal" data-label="Animal">
38
- <rect x="60" y="40" width="120" height="48.900000000000006" rx="0" ry="0" fill="#f9f9f9" stroke="#d4d4d4" stroke-width="1" />
39
- <path d="M60,40 H180 V72.9 H60 Z" fill="#f4f4f4" stroke="#d4d4d4" stroke-width="1" />
40
- <text x="120" y="56.45" text-anchor="middle" font-size="13" font-weight="700" fill="#27272A" dy="4.55">Animal</text>
41
- <line x1="60" y1="72.9" x2="180" y2="72.9" stroke="#d4d4d4" stroke-width="0.75" />
42
- <line x1="60" y1="80.9" x2="180" y2="80.9" stroke="#d4d4d4" stroke-width="0.75" />
43
- </g>
44
- <g class="class-node" data-id="Dog" data-label="Dog">
45
- <rect x="40" y="148.9" width="120" height="48.900000000000006" rx="0" ry="0" fill="#f9f9f9" stroke="#d4d4d4" stroke-width="1" />
46
- <path d="M40,148.9 H160 V181.8 H40 Z" fill="#f4f4f4" stroke="#d4d4d4" stroke-width="1" />
47
- <text x="100" y="165.35000000000002" text-anchor="middle" font-size="13" font-weight="700" fill="#27272A" dy="4.55">Dog</text>
48
- <line x1="40" y1="181.8" x2="160" y2="181.8" stroke="#d4d4d4" stroke-width="0.75" />
49
- <line x1="40" y1="189.8" x2="160" y2="189.8" stroke="#d4d4d4" stroke-width="0.75" />
50
- </g>
51
- <g class="class-node" data-id="Cat" data-label="Cat">
52
- <rect x="200" y="148.9" width="120" height="48.900000000000006" rx="0" ry="0" fill="#f9f9f9" stroke="#d4d4d4" stroke-width="1" />
53
- <path d="M200,148.9 H320 V181.8 H200 Z" fill="#f4f4f4" stroke="#d4d4d4" stroke-width="1" />
54
- <text x="260" y="165.35000000000002" text-anchor="middle" font-size="13" font-weight="700" fill="#27272A" dy="4.55">Cat</text>
55
- <line x1="200" y1="181.8" x2="320" y2="181.8" stroke="#d4d4d4" stroke-width="0.75" />
56
- <line x1="200" y1="189.8" x2="320" y2="189.8" stroke="#d4d4d4" stroke-width="0.75" />
57
- </g>
58
-
59
-
60
- </svg>
@@ -1,61 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 951.768 136" width="951.768" height="136" style="--bg:#FFFFFF;--fg:#27272A;--font:Inter;background:#FFFFFF">
2
- <style>
3
- text { font-family: var(--font, 'Inter'), system-ui, sans-serif; }
4
- .mono { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, monospace; }
5
- svg {
6
- /* Derived from --bg and --fg (overridable via --line, --accent, etc.) */
7
- --_text: #27272A;
8
- --_text-sec: #575759;
9
- --_text-muted: #707072;
10
- --_text-faint: #8a8a8c;
11
- --_line: #939395;
12
- --_arrow: #47474a;
13
- --_node-fill: #f9f9f9;
14
- --_node-stroke: #d4d4d4;
15
- --_group-fill: #FFFFFF;
16
- --_group-hdr: #f4f4f4;
17
- --_inner-stroke: #e5e5e5;
18
- --_key-badge: #e9e9ea;
19
- }
20
- </style>
21
- <defs>
22
- </defs>
23
- <polyline class="er-relationship" data-entity1="CUSTOMER" data-entity2="ORDER" data-cardinality1="one" data-cardinality2="zero-many" data-identifying="true" data-label="places" points="180,68 401.726,68" fill="none" stroke="#939395" stroke-width="1" />
24
- <polyline class="er-relationship" data-entity1="ORDER" data-entity2="LINE_ITEM" data-cardinality1="one" data-cardinality2="many" data-identifying="true" data-label="contains" points="541.726,68 771.768,68" fill="none" stroke="#939395" stroke-width="1" />
25
- <g class="entity" data-id="CUSTOMER" data-label="CUSTOMER">
26
- <rect x="40" y="40" width="140" height="56" rx="0" ry="0" fill="#f9f9f9" stroke="#d4d4d4" stroke-width="1" />
27
- <path d="M40,40 H180 V74 H40 Z" fill="#f4f4f4" stroke="#d4d4d4" stroke-width="1" />
28
- <text x="110" y="57" text-anchor="middle" font-size="13" font-weight="700" fill="#27272A" dy="4.55">CUSTOMER</text>
29
- <line x1="40" y1="74" x2="180" y2="74" stroke="#d4d4d4" stroke-width="0.75" />
30
- <text x="110" y="85" text-anchor="middle" dy="0.35em" font-size="11" fill="#8a8a8c" font-style="italic">(no attributes)</text>
31
- </g>
32
- <g class="entity" data-id="ORDER" data-label="ORDER">
33
- <rect x="401.726" y="40" width="140" height="56" rx="0" ry="0" fill="#f9f9f9" stroke="#d4d4d4" stroke-width="1" />
34
- <path d="M401.726,40 H541.726 V74 H401.726 Z" fill="#f4f4f4" stroke="#d4d4d4" stroke-width="1" />
35
- <text x="471.726" y="57" text-anchor="middle" font-size="13" font-weight="700" fill="#27272A" dy="4.55">ORDER</text>
36
- <line x1="401.726" y1="74" x2="541.726" y2="74" stroke="#d4d4d4" stroke-width="0.75" />
37
- <text x="471.726" y="85" text-anchor="middle" dy="0.35em" font-size="11" fill="#8a8a8c" font-style="italic">(no attributes)</text>
38
- </g>
39
- <g class="entity" data-id="LINE_ITEM" data-label="LINE_ITEM">
40
- <rect x="771.768" y="40" width="140" height="56" rx="0" ry="0" fill="#f9f9f9" stroke="#d4d4d4" stroke-width="1" />
41
- <path d="M771.768,40 H911.768 V74 H771.768 Z" fill="#f4f4f4" stroke="#d4d4d4" stroke-width="1" />
42
- <text x="841.768" y="57" text-anchor="middle" font-size="13" font-weight="700" fill="#27272A" dy="4.55">LINE_ITEM</text>
43
- <line x1="771.768" y1="74" x2="911.768" y2="74" stroke="#d4d4d4" stroke-width="0.75" />
44
- <text x="841.768" y="85" text-anchor="middle" dy="0.35em" font-size="11" fill="#8a8a8c" font-style="italic">(no attributes)</text>
45
- </g>
46
- <line x1="184" y1="62" x2="184" y2="74" stroke="#939395" stroke-width="1.25" />
47
- <line x1="188" y1="62" x2="188" y2="74" stroke="#939395" stroke-width="1.25" />
48
- <line x1="397.726" y1="75" x2="385.726" y2="68" stroke="#939395" stroke-width="1.25" />
49
- <line x1="397.726" y1="68" x2="385.726" y2="68" stroke="#939395" stroke-width="1.25" />
50
- <line x1="397.726" y1="61" x2="385.726" y2="68" stroke="#939395" stroke-width="1.25" />
51
- <circle cx="381.726" cy="68" r="4" fill="#FFFFFF" stroke="#939395" stroke-width="1.25" />
52
- <line x1="545.726" y1="62" x2="545.726" y2="74" stroke="#939395" stroke-width="1.25" />
53
- <line x1="549.726" y1="62" x2="549.726" y2="74" stroke="#939395" stroke-width="1.25" />
54
- <line x1="767.768" y1="75" x2="755.768" y2="68" stroke="#939395" stroke-width="1.25" />
55
- <line x1="767.768" y1="68" x2="755.768" y2="68" stroke="#939395" stroke-width="1.25" />
56
- <line x1="767.768" y1="61" x2="755.768" y2="68" stroke="#939395" stroke-width="1.25" />
57
- <rect x="270" y="57.85" width="41.726000000000006" height="20.3" rx="2" ry="2" fill="#FFFFFF" stroke="#e5e5e5" stroke-width="0.5" />
58
- <text x="290.863" y="68" text-anchor="middle" font-size="11" font-weight="400" fill="#707072" dy="3.8499999999999996">places</text>
59
- <rect x="631.7260000000001" y="57.85" width="50.04200000000001" height="20.3" rx="2" ry="2" fill="#FFFFFF" stroke="#e5e5e5" stroke-width="0.5" />
60
- <text x="656.7470000000001" y="68" text-anchor="middle" font-size="11" font-weight="400" fill="#707072" dy="3.8499999999999996">contains</text>
61
- </svg>