agentic-mermaid 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/AGENT_NATIVE.md +155 -91
  2. package/CHANGELOG.md +163 -4
  3. package/Instructions_for_agents.md +10 -10
  4. package/LICENSES/Apache-2.0.txt +202 -0
  5. package/README.md +31 -38
  6. package/THIRD_PARTY_NOTICES.md +29 -0
  7. package/assets/hero.png +0 -0
  8. package/dist/agent-core.d.ts +463 -0
  9. package/dist/agent-core.js +397 -0
  10. package/dist/agent.d.ts +73 -1868
  11. package/dist/agent.js +336 -37325
  12. package/dist/agentic-mermaid-mcp.js +7 -38399
  13. package/dist/am.js +33626 -40446
  14. package/dist/chunk-2P5FKUQC.js +3485 -0
  15. package/dist/chunk-2S3VSS6I.js +149 -0
  16. package/dist/chunk-2SILJDW2.js +37 -0
  17. package/dist/chunk-BJYMBT4I.js +61963 -0
  18. package/dist/chunk-FDM43XU7.js +615 -0
  19. package/dist/chunk-MYPDVZCO.js +4702 -0
  20. package/dist/index-DWPa2MJs.d.ts +6780 -0
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +310 -33014
  23. package/dist/mcp-cli-5J47WEY3.js +17 -0
  24. package/docs/README.md +39 -31
  25. package/docs/agent-api-cookbook.md +44 -35
  26. package/docs/agent-mutation-policy.md +1 -1
  27. package/docs/agent-workflow-examples.md +2 -2
  28. package/docs/api.md +284 -77
  29. package/docs/ascii.md +26 -16
  30. package/docs/code-mode-impact.md +214 -0
  31. package/docs/comparison.md +23 -11
  32. package/docs/computational-aesthetics-prototype-plan.md +252 -0
  33. package/docs/config.md +26 -10
  34. package/docs/custom-fonts.md +265 -0
  35. package/docs/custom-style-cookbook.md +130 -9
  36. package/docs/diagram-families.md +48 -23
  37. package/docs/features.md +59 -52
  38. package/docs/fork-differences.md +6 -3
  39. package/docs/getting-started.md +23 -16
  40. package/docs/issue-derived-test-cases.md +29 -22
  41. package/docs/mcp-code-mode-rationale.md +13 -6
  42. package/docs/mcp-http-transport.md +20 -13
  43. package/docs/mermaid-layout-complaints.md +66 -52
  44. package/docs/mutation-testing.md +145 -66
  45. package/docs/quality.md +23 -14
  46. package/docs/react.md +2 -2
  47. package/docs/schemas/style-spec.schema.json +1221 -30
  48. package/docs/style-authoring.md +241 -38
  49. package/docs/svg-semantic-contract.md +49 -0
  50. package/docs/testing-strategy.md +166 -58
  51. package/docs/theming.md +19 -32
  52. package/examples/styles/catalog.json +54 -0
  53. package/examples/styles/cloudflare-workers-inspired-prototype.mmd +9 -0
  54. package/examples/styles/cloudflare-workers-inspired-prototype.style.json +110 -0
  55. package/examples/styles/cupertino-prototype.mmd +10 -0
  56. package/examples/styles/cupertino-prototype.style.json +63 -0
  57. package/examples/styles/mid-century-report.style.json +2 -2
  58. package/examples/styles/star-chart-atlas.style.json +2 -1
  59. package/examples/styles/transit-route-map.style.json +2 -2
  60. package/examples/styles/vercel-inspired-prototype.mmd +6 -0
  61. package/examples/styles/vercel-inspired-prototype.style.json +87 -0
  62. package/package.json +85 -45
  63. package/server.json +2 -2
  64. package/skills/agentic-mermaid-diagram-workflow/SKILL.md +17 -36
  65. package/skills/agentic-mermaid-diagram-workflow/references/cli.md +4 -5
  66. package/skills/agentic-mermaid-diagram-workflow/references/code-mode.md +15 -31
  67. package/skills/agentic-mermaid-diagram-workflow/references/sequence.md +10 -14
  68. package/skills/agentic-mermaid-live-editor/SKILL.md +100 -206
  69. package/TODO.md +0 -684
  70. package/dist/index-wjRjbsP-.d.ts +0 -1102
  71. package/docs/assets/improvements/box-start-connector.png +0 -0
  72. package/docs/assets/improvements/comment-dropped-lint.png +0 -0
  73. package/docs/assets/improvements/er-content-loss.png +0 -0
  74. package/docs/assets/improvements/fan-in-trunks.png +0 -0
  75. package/docs/assets/improvements/gantt-family.png +0 -0
  76. package/docs/assets/improvements/gantt-milestone-clamp.png +0 -0
  77. package/docs/assets/improvements/gantt-verify-seam.png +0 -0
  78. package/docs/assets/improvements/subgraph-container-edges.png +0 -0
  79. package/docs/assets/improvements/wrapper-frontmatter.png +0 -0
  80. package/docs/assets/improvements/wrapper-init-directive.png +0 -0
  81. package/docs/assets/improvements/wrapper-leading-comment.png +0 -0
  82. package/docs/assets/style-cookbook/mid-century-report.png +0 -0
  83. package/docs/assets/style-cookbook/star-chart-atlas.png +0 -0
  84. package/docs/assets/style-cookbook/transit-route-map.png +0 -0
  85. package/docs/contributing/adding-diagram-types.md +0 -144
  86. package/docs/contributing/diagram-family-citizenship.matrix.json +0 -2127
  87. package/docs/contributing/diagram-family-citizenship.md +0 -82
  88. package/docs/contributing/harvesting-upstream-tests.md +0 -126
  89. package/docs/contributing/lessons-learned.md +0 -276
  90. package/docs/contributing/releasing.md +0 -82
  91. package/docs/contributing/visual-review-evidence.md +0 -53
  92. package/docs/design/families/README.md +0 -26
  93. package/docs/design/families/architecture-beta.md +0 -48
  94. package/docs/design/families/flowchart-parser-conformance.md +0 -22
  95. package/docs/design/families/gantt-research.md +0 -137
  96. package/docs/design/families/gantt.md +0 -329
  97. package/docs/design/families/journey-agentic-cards-before.png +0 -0
  98. package/docs/design/families/journey-experience-curve-implementation.png +0 -0
  99. package/docs/design/families/journey-mermaid-classic-implementation.png +0 -0
  100. package/docs/design/families/journey-mermaid-classic-prototype.png +0 -0
  101. package/docs/design/families/journey-mermaid-classic-prototype.svg +0 -163
  102. package/docs/design/families/journey-mermaid-classic-prototype.svg.png +0 -0
  103. package/docs/design/families/journey-migration-parity.md +0 -439
  104. package/docs/design/families/journey-section-overlap-after.png +0 -0
  105. package/docs/design/families/journey-section-overlap-before.png +0 -0
  106. package/docs/design/families/journey-usage-research.md +0 -423
  107. package/docs/design/families/journey.md +0 -153
  108. package/docs/design/families/xychart.md +0 -85
  109. package/docs/design/system/README.md +0 -45
  110. package/docs/design/system/abstraction-audit.md +0 -224
  111. package/docs/design/system/abstraction-recommendations.md +0 -655
  112. package/docs/design/system/architecture.mmd +0 -29
  113. package/docs/design/system/architecture.svg +0 -137
  114. package/docs/design/system/layout-guarantees-and-robustness.md +0 -351
  115. package/docs/design/system/layout-rubric.md +0 -138
  116. package/docs/design/system/route-contracts.md +0 -848
  117. package/docs/design/system/source-preservation-ladder.md +0 -52
  118. package/docs/design/system/styles-rollout.md +0 -216
  119. package/docs/design/system/ugly-layouts.md +0 -119
  120. package/docs/layout-characterization/README.md +0 -245
  121. package/docs/layout-characterization/contact-sheet-families.md +0 -498
  122. package/docs/layout-characterization/contact-sheet.md +0 -638
  123. package/docs/layout-characterization/properties.md +0 -281
  124. package/docs/layout-characterization/visual-quality.md +0 -160
  125. package/docs/layout-characterization/visual-snapshots/architecture.svg +0 -79
  126. package/docs/layout-characterization/visual-snapshots/class.svg +0 -60
  127. package/docs/layout-characterization/visual-snapshots/er.svg +0 -61
  128. package/docs/layout-characterization/visual-snapshots/flowchart.svg +0 -58
  129. package/docs/layout-characterization/visual-snapshots/gantt.svg +0 -52
  130. package/docs/layout-characterization/visual-snapshots/journey.svg +0 -98
  131. package/docs/layout-characterization/visual-snapshots/pie.svg +0 -36
  132. package/docs/layout-characterization/visual-snapshots/quadrant.svg +0 -47
  133. package/docs/layout-characterization/visual-snapshots/sequence.svg +0 -59
  134. package/docs/layout-characterization/visual-snapshots/state.svg +0 -52
  135. package/docs/layout-characterization/visual-snapshots/timeline.svg +0 -64
  136. package/docs/layout-characterization/visual-snapshots/xychart.svg +0 -97
  137. package/docs/project/divergences.md +0 -98
  138. package/docs/project/dogfooding-docs-strategy.md +0 -66
  139. package/docs/project/hosted-mcp-cloudflare-plan.md +0 -338
  140. package/docs/project/lessons-learned.md +0 -1019
  141. package/docs/project/remove-role-styling-plan.md +0 -176
  142. package/examples/agent-improve-auth-flow.ts +0 -206
  143. package/examples/agent-loop.ts +0 -53
  144. package/examples/mcp-vs-cli-complex-diagrams.ts +0 -133
  145. package/llms.txt +0 -104
  146. package/skill-evals/README.md +0 -77
  147. package/skill-evals/fixtures/architecture-cache/input.mmd +0 -5
  148. package/skill-evals/fixtures/class-payment/input.mmd +0 -4
  149. package/skill-evals/fixtures/er-orders/input.mmd +0 -10
  150. package/skill-evals/fixtures/flowchart-cache/input.mmd +0 -3
  151. package/skill-evals/fixtures/gantt-release/input.mmd +0 -7
  152. package/skill-evals/fixtures/journey-checkout/input.mmd +0 -6
  153. package/skill-evals/fixtures/pie-exports/input.mmd +0 -5
  154. package/skill-evals/fixtures/quadrant-priorities/input.mmd +0 -11
  155. package/skill-evals/fixtures/sequence-retry/input.mmd +0 -8
  156. package/skill-evals/fixtures/state-lifecycle/input.mmd +0 -5
  157. package/skill-evals/fixtures/timeline-release/input.mmd +0 -6
  158. package/skill-evals/fixtures/xychart-growth/input.mmd +0 -5
  159. package/skill-evals/shared-benchmark.json +0 -510
  160. package/src/agent/analyze.ts +0 -157
  161. package/src/agent/apply.ts +0 -146
  162. package/src/agent/architecture-body.ts +0 -458
  163. package/src/agent/certificates.ts +0 -110
  164. package/src/agent/class-body.ts +0 -319
  165. package/src/agent/core.ts +0 -207
  166. package/src/agent/create.ts +0 -106
  167. package/src/agent/describe.ts +0 -368
  168. package/src/agent/er-body.ts +0 -224
  169. package/src/agent/facts.ts +0 -360
  170. package/src/agent/families-builtin.ts +0 -920
  171. package/src/agent/families.ts +0 -232
  172. package/src/agent/family-layouts.ts +0 -832
  173. package/src/agent/flowchart-body.ts +0 -372
  174. package/src/agent/flowchart-unsupported.ts +0 -243
  175. package/src/agent/font-coverage.ts +0 -288
  176. package/src/agent/gantt-body.ts +0 -495
  177. package/src/agent/index.ts +0 -10
  178. package/src/agent/journey-body.ts +0 -374
  179. package/src/agent/label-metrics.ts +0 -28
  180. package/src/agent/layout-to-rendered.ts +0 -63
  181. package/src/agent/mutate.ts +0 -97
  182. package/src/agent/mutation-ops.ts +0 -51
  183. package/src/agent/op-schema.ts +0 -443
  184. package/src/agent/parse.ts +0 -223
  185. package/src/agent/pie-body.ts +0 -270
  186. package/src/agent/png.ts +0 -171
  187. package/src/agent/quadrant-body.ts +0 -336
  188. package/src/agent/quality.ts +0 -363
  189. package/src/agent/readability-audit.ts +0 -92
  190. package/src/agent/rendered-route-audit.ts +0 -61
  191. package/src/agent/sequence-body.ts +0 -345
  192. package/src/agent/serialize.ts +0 -214
  193. package/src/agent/state-body.ts +0 -589
  194. package/src/agent/structural-count.ts +0 -150
  195. package/src/agent/timeline-body.ts +0 -280
  196. package/src/agent/trace-log.ts +0 -43
  197. package/src/agent/types.ts +0 -995
  198. package/src/agent/verify.ts +0 -603
  199. package/src/agent/xychart-body.ts +0 -472
  200. package/src/architecture/config.ts +0 -282
  201. package/src/architecture/layout.ts +0 -496
  202. package/src/architecture/parser.ts +0 -375
  203. package/src/architecture/renderer.ts +0 -611
  204. package/src/architecture/types.ts +0 -113
  205. package/src/ascii/ansi.ts +0 -423
  206. package/src/ascii/architecture.ts +0 -210
  207. package/src/ascii/canvas.ts +0 -443
  208. package/src/ascii/class-diagram.ts +0 -697
  209. package/src/ascii/converter.ts +0 -475
  210. package/src/ascii/draw.ts +0 -1693
  211. package/src/ascii/edge-bundling.ts +0 -328
  212. package/src/ascii/edge-routing.ts +0 -330
  213. package/src/ascii/er-diagram.ts +0 -439
  214. package/src/ascii/gantt.ts +0 -276
  215. package/src/ascii/grid.ts +0 -747
  216. package/src/ascii/index.ts +0 -196
  217. package/src/ascii/journey.ts +0 -169
  218. package/src/ascii/meta.ts +0 -244
  219. package/src/ascii/multiline-utils.ts +0 -80
  220. package/src/ascii/pathfinder.ts +0 -301
  221. package/src/ascii/pie.ts +0 -67
  222. package/src/ascii/quadrant.ts +0 -158
  223. package/src/ascii/reverse.ts +0 -216
  224. package/src/ascii/sequence.ts +0 -499
  225. package/src/ascii/shapes/circle.ts +0 -27
  226. package/src/ascii/shapes/corners.ts +0 -143
  227. package/src/ascii/shapes/diamond.ts +0 -27
  228. package/src/ascii/shapes/hexagon.ts +0 -27
  229. package/src/ascii/shapes/index.ts +0 -106
  230. package/src/ascii/shapes/rectangle.ts +0 -168
  231. package/src/ascii/shapes/rounded.ts +0 -27
  232. package/src/ascii/shapes/special.ts +0 -332
  233. package/src/ascii/shapes/stadium.ts +0 -110
  234. package/src/ascii/shapes/state.ts +0 -192
  235. package/src/ascii/shapes/types.ts +0 -73
  236. package/src/ascii/timeline.ts +0 -141
  237. package/src/ascii/types.ts +0 -312
  238. package/src/ascii/validate.ts +0 -120
  239. package/src/ascii/width.ts +0 -81
  240. package/src/ascii/wrap.ts +0 -131
  241. package/src/ascii/xychart.ts +0 -919
  242. package/src/browser.ts +0 -29
  243. package/src/class/layout.ts +0 -240
  244. package/src/class/parser.ts +0 -332
  245. package/src/class/renderer.ts +0 -638
  246. package/src/class/types.ts +0 -129
  247. package/src/cli/agent-instructions.ts +0 -1
  248. package/src/cli/am-bin.ts +0 -6
  249. package/src/cli/exit-codes.ts +0 -18
  250. package/src/cli/index.ts +0 -1132
  251. package/src/cli/init-agent.ts +0 -147
  252. package/src/cli/run-entrypoint.ts +0 -10
  253. package/src/color-resolver.ts +0 -152
  254. package/src/elk-instance.ts +0 -114
  255. package/src/er/layout.ts +0 -187
  256. package/src/er/parser.ts +0 -226
  257. package/src/er/renderer.ts +0 -792
  258. package/src/er/types.ts +0 -99
  259. package/src/family-rubric.ts +0 -425
  260. package/src/font-manifest.ts +0 -31
  261. package/src/gantt/layout.ts +0 -365
  262. package/src/gantt/parser.ts +0 -282
  263. package/src/gantt/pipeline.ts +0 -27
  264. package/src/gantt/renderer.ts +0 -414
  265. package/src/gantt/schedule.ts +0 -513
  266. package/src/gantt/types.ts +0 -255
  267. package/src/index.ts +0 -368
  268. package/src/journey/layout.ts +0 -554
  269. package/src/journey/parse-core.ts +0 -251
  270. package/src/journey/parser.ts +0 -101
  271. package/src/journey/renderer.ts +0 -917
  272. package/src/journey/types.ts +0 -144
  273. package/src/layout/geometry.ts +0 -182
  274. package/src/layout/pass.ts +0 -142
  275. package/src/layout/passes/index.ts +0 -3916
  276. package/src/layout-engine.ts +0 -1565
  277. package/src/layout-rubric.ts +0 -659
  278. package/src/mcp/artifacts.ts +0 -137
  279. package/src/mcp/dynamic-harness.ts +0 -31
  280. package/src/mcp/dynamic-modules.d.ts +0 -7
  281. package/src/mcp/facade.ts +0 -608
  282. package/src/mcp/harness-runtime.ts +0 -203
  283. package/src/mcp/hosted-server.ts +0 -468
  284. package/src/mcp/mcp-bin.ts +0 -3
  285. package/src/mcp/mcp-cli.ts +0 -82
  286. package/src/mcp/protocol.ts +0 -13
  287. package/src/mcp/sandbox.ts +0 -195
  288. package/src/mcp/sdk-decl.ts +0 -391
  289. package/src/mcp/server.ts +0 -362
  290. package/src/mcp/tool-surface.ts +0 -146
  291. package/src/mermaid-source.ts +0 -655
  292. package/src/multiline-utils.ts +0 -228
  293. package/src/parser.ts +0 -1031
  294. package/src/pie/layout.ts +0 -168
  295. package/src/pie/parser.ts +0 -136
  296. package/src/pie/renderer.ts +0 -234
  297. package/src/pie/types.ts +0 -82
  298. package/src/quadrant/layout.ts +0 -191
  299. package/src/quadrant/parser.ts +0 -183
  300. package/src/quadrant/renderer.ts +0 -322
  301. package/src/quadrant/types.ts +0 -113
  302. package/src/render-family-hooks.ts +0 -244
  303. package/src/renderer.ts +0 -1099
  304. package/src/route-contracts.ts +0 -2723
  305. package/src/scene/backend.ts +0 -76
  306. package/src/scene/fidelity.ts +0 -183
  307. package/src/scene/hybrid-backend.ts +0 -174
  308. package/src/scene/ir.ts +0 -181
  309. package/src/scene/marks.ts +0 -127
  310. package/src/scene/rough-backend.ts +0 -378
  311. package/src/scene/seed.ts +0 -46
  312. package/src/scene/style-registry.ts +0 -556
  313. package/src/sequence/layout.ts +0 -456
  314. package/src/sequence/parser.ts +0 -255
  315. package/src/sequence/renderer.ts +0 -604
  316. package/src/sequence/types.ts +0 -154
  317. package/src/shape-clipping.ts +0 -351
  318. package/src/shared/accessibility-directives.ts +0 -22
  319. package/src/shared/batched.ts +0 -61
  320. package/src/shared/color-math.ts +0 -93
  321. package/src/shared/svg-a11y.ts +0 -29
  322. package/src/shared/syntax-error.ts +0 -17
  323. package/src/shared/unicode-ranges.ts +0 -135
  324. package/src/styles.ts +0 -318
  325. package/src/svg-paths.ts +0 -28
  326. package/src/text-metrics.ts +0 -248
  327. package/src/theme.ts +0 -710
  328. package/src/timeline/layout.ts +0 -381
  329. package/src/timeline/parser.ts +0 -215
  330. package/src/timeline/renderer.ts +0 -538
  331. package/src/timeline/types.ts +0 -105
  332. package/src/types.ts +0 -462
  333. package/src/website-worker-modules.d.ts +0 -18
  334. package/src/xychart/axis-utils.ts +0 -109
  335. package/src/xychart/colors.ts +0 -124
  336. package/src/xychart/config.ts +0 -88
  337. package/src/xychart/layout.ts +0 -656
  338. package/src/xychart/parser.ts +0 -504
  339. package/src/xychart/renderer.ts +0 -640
  340. package/src/xychart/types.ts +0 -282
package/TODO.md DELETED
@@ -1,684 +0,0 @@
1
- # Project Backlog
2
-
3
- `TODO.md` is the only active backlog. No other root doc may carry unchecked
4
- project TODOs. Docs map: `docs/features.md` = current capabilities;
5
- `docs/project/divergences.md` = implementation history;
6
- `docs/project/lessons-learned.md` = cumulative fork narrative (loops 1–22);
7
- `docs/contributing/lessons-learned.md` = dated contributor process lessons;
8
- `AGENT_NATIVE.md` = architecture/spec rationale; `Instructions_for_agents.md`
9
- = runtime guide; `CHANGELOG.md` = user-facing release notes; `docs/README.md`
10
- = documentation index; `docs/issue-derived-test-cases.md` = evidence
11
- inventory, not backlog; `docs/mcp-code-mode-rationale.md` = MCP surface
12
- rationale, not backlog; `docs/agent-workflow-examples.md` = runnable example
13
- index, not backlog.
14
-
15
- Status legend: `todo` | `blocked` | `owner-decision` | `parked` | `done`
16
- (checked items record recently completed backlog with their evidence; prune
17
- them once the next release ships).
18
-
19
- Items within each section are sorted by dependencies: prerequisites first,
20
- dependents after. IDs are stable names, not an ordering.
21
-
22
- ## 0. Release / owner decisions
23
-
24
- - [ ] **DEC-1 — Get one real external consumer** (`todo`). Validate
25
- `agentic-mermaid/agent`, `am`, or `agentic-mermaid-mcp` in a real agent,
26
- TUI, CI gate, or editor integration outside this repo. Unblocked
27
- substantially by BUILD-7 (remote MCP reachability).
28
- - [ ] **DEC-2 — Add the WAF rate-limit rule on `POST /mcp` before broadly
29
- promoting the hosted endpoint** (`owner-decision`). The hosted MCP (`#94`,
30
- `https://agentic-mermaid.dev/mcp`) is public, unauthenticated compute. Body /
31
- input / output caps, the batch fan-out cap, edge caching, isolate CPU
32
- budgets, and CORS Origin validation bound each request in code, but the abuse
33
- backstop is a **dashboard** WAF rate-limit rule (e.g. 60 req/min per IP) that
34
- cannot live in the repo. Don't market or broadly promote the endpoint until it
35
- is live. See the promotion checklist in `website/README.md`.
36
- - [x] **DEC-3 — Verify the `worker_loaders` (`LOADER`) binding resolves in
37
- production** (`done`). Live probe against `https://agentic-mermaid.dev/mcp`
38
- on 2026-07-07: `tools/call execute` with code `1 + 41` returned
39
- `{ "ok": true, "value": 42, "logs": [] }`, proving the production Dynamic
40
- Workers `LOADER` binding resolves for hosted Code Mode. The pure tools are no
41
- longer the only production evidence.
42
- - [ ] **DEC-4 — Establish Google and Bing search visibility**
43
- (`owner-decision`). In ownership-verified Google Search Console and Bing
44
- Webmaster Tools, submit `https://agentic-mermaid.dev/sitemap.xml`, request
45
- indexing for the homepage and core docs, and monitor coverage plus exact-name
46
- queries for "Agentic Mermaid" and "agentic-mermaid". Fix crawl/canonical
47
- findings before pursuing relevant external references and backlinks; do not
48
- manufacture low-quality links. These consoles require a signed-in owner and
49
- the anonymous sitemap ping endpoints are retired, so this cannot be automated
50
- in the repo.
51
- - [ ] **DEC-5 — Finish Cloudflare's managed `robots.txt` policy**
52
- (`owner-decision`). Production serves Cloudflare's managed content-signals
53
- file in preference to a repository asset. In **Manage robots.txt**, choose the
54
- intended crawler/content-signals policy, preserve access for the public pages
55
- meant to be indexed, and add
56
- `Sitemap: https://agentic-mermaid.dev/sitemap.xml`. Then verify the live body
57
- and status with `curl` and both search consoles. The repo deliberately ships
58
- no competing `robots.txt`, so the dashboard remains the single source.
59
-
60
- ## 1. Security backlog
61
-
62
- - [ ] **SEC-1 — Sanitize editor share/draft render config before SVG insertion** (`todo`). Audit on 2026-07-09 found that `/editor/` accepts hash/draft `config`, merges it into render options, and inserts rendered SVG with `innerHTML`; malicious color/font/style values can break out of the SVG root `style` attribute and create executable SVG markup under the current CSP. Fix by allowlisting editor-restorable config keys/values, escaping SVG root styles/attrs in `svgOpenTag`, sanitizing preview SVG before insertion, and adding hostile hash/draft/browser regression tests.
63
- - [ ] **SEC-2 — Cap editor share-link decompression and draft restore size** (`todo`). Deflated share links and localStorage drafts currently decode/read without a byte cap, so a crafted hash or stale draft can hang the browser. Add encoded/decoded size limits, streaming abort on overflow, visible too-large errors, and tests for corrupt/oversized links and missing `DecompressionStream`.
64
- - [ ] **SEC-3 — Make editor autosave privacy explicit** (`todo`). The editor persists diagram source, render config, style, and seed in plaintext `localStorage` by default. Add a visible disclosure plus a clear/private-mode option or switch persistent drafts to opt-in/session-only storage.
65
-
66
- ## 2. Ready build backlog
67
-
68
- - [x] **BUILD-7 — MCP reachability: streamable-HTTP/SSE transport + file/URL
69
- outputs** (`done`). Added opt-in HTTP/SSE transport with loopback-default
70
- binding, `--transport http`, direct `/rpc` test endpoint, SSE `/sse` +
71
- `/message` session flow, `/health`, JSON content-type/Origin gates,
72
- remote-bind bearer token requirement, capped request/sandbox sizes, and
73
- managed `/artifacts/<name>` serving. `render_png` now supports
74
- `output: "base64"|"file"|"url"`; file/URL artifacts are generated under a
75
- managed store with safe tracked names, MIME type, byte count, SHA-256, size
76
- limit, and TTL checks. Tests cover file output, URL fetch-back, auth/body
77
- gates, tracked artifact serving, and SSE session lifecycle.
78
- - [ ] **BUILD-27 — MCP Apps support** (`todo`). Expose an interactive
79
- in-agent diagram UI through MCP Apps: `ui://` resources, correct
80
- `text/html;profile=mcp-app` resource MIME type, tool `_meta.ui.resourceUri`
81
- wiring, resource CSP/domain metadata, and tests that the resources are
82
- reachable without leaking secrets. Start with a portable, read-only
83
- preview/verify view before adding an editable surface; keep tool results useful
84
- in MCP hosts that ignore the UI extension.
85
- - [ ] **BUILD-28 — Experimental page-local WebMCP support** (`todo`). The
86
- current Web Machine Learning Community Group report is not a W3C Standard or
87
- Standards Track document. In the browser editor, feature-detect
88
- `document.modelContext` and register a narrow active-document surface with
89
- `document.modelContext.registerTool()` using exact JSON Schemas, truthful
90
- `readOnlyHint` / `untrustedContentHint` annotations, and an `AbortSignal` for
91
- lifecycle cleanup. Start with read source, verify, describe, and render; add
92
- structured mutation only after explicit user-action and state-consistency
93
- tests. Gate it behind supported-browser detection and test with both a shim
94
- and a compatible browser trial. This is not `/.well-known/mcp`, CORS, or
95
- Streamable HTTP parity: the draft is an in-page browser API and does not
96
- prescribe MCP as the browser agent's transport.
97
- - [ ] **BUILD-29 — Submit a ChatGPT app as a plugin** (`todo`, after
98
- BUILD-27; WebMCP is not a dependency). Validate the public MCP + MCP Apps
99
- experience in ChatGPT Developer Mode on web and mobile, define an exact CSP,
100
- and audit tool schemas, `_meta`, instructions, and annotations before scanning
101
- the endpoint. Complete organization verification and `api.apps.write`
102
- access, then prepare the plugin submission's name, logo, description, company
103
- and privacy-policy URLs, screenshots, test prompts/responses, localization,
104
- and review notes. Submit through the plugin portal only when the live endpoint
105
- and UI are stable enough to preserve the reviewed metadata contract.
106
- - [ ] **BUILD-25 — Structured coverage for the last silent-opaque constructs**
107
- (`todo`, needs legacy-renderer support first; tracked as **#118**). The systemic `UNSUPPORTED_SYNTAX`
108
- warning (2026-07) now announces every opaque fallback, so these are visible but
109
- still source-only. Promoting them to structured is blocked on the LEGACY parser/
110
- renderer, which drops them today (verified): class generic type params
111
- (`class Box~T~` → `parseClassDiagram` returns empty), class `namespace {…}`,
112
- state `note … / end note` and `<<choice>>/<<fork>>/<<join>>` pseudostates
113
- (`state-body.ts:27-31` documents the legacy drop). Each needs the legacy
114
- parser/renderer taught first, then a body-type + parser + serializer + mutator +
115
- round-trip test — one family per PR to preserve the determinism/render-parity
116
- contract. NON-goal: accepting UNQUOTED pie labels — Mermaid's pie grammar
117
- requires quotes, so that would accept invalid Mermaid (the fork rejects what
118
- Mermaid rejects); the systemic warning already covers the bare-label trap.
119
- - [ ] **BUILD-24 — Layout hints: rank/group pinning and edge-length
120
- preferences** (`todo`). Direct agent feedback (2026-07): an agent deleted a
121
- real edge because the auto-layout drew its feedback loop as a long,
122
- confusing route — the only lever it had was removing information. Give
123
- agents structural levers instead: per-node rank/layer pinning, "keep these
124
- nodes adjacent" grouping hints, and a "keep this edge short" preference,
125
- carried as typed metadata (not source hacks) and honored by the ELK
126
- pipeline deterministically. Design questions: hint syntax in Mermaid source
127
- (frontmatter? comment directives?) vs. render-option-only; interaction with
128
- the determinism contract (hints must be part of the input, never ambient);
129
- which ELK knobs (`org.eclipse.elk.layered.layering.*`, `priority`,
130
- `desiredEdgeLength`) map cleanly. Scope the first slice to flowchart/state.
131
- - [ ] **BUILD-2 — `process --mode validate|canonicalize` triage** (`todo`).
132
- Current verbs are `verify` and `format`; do not add another command until it
133
- proves agent value. Needed: inventory overlap with `verify`, `format`,
134
- `parse`, `serialize`, `mutate`, and `batch`; write the exact JSON/exit-code
135
- contract for `validate` and `canonicalize`; test whether it reduces agent
136
- routing errors in docs/evals; then either implement as a thin, schema-tested
137
- wrapper or explicitly park/decline it. Independent of other items.
138
- - [ ] **BUILD-26 — Ecosystem issue harvest: Mermaid / Mermaid ASCII /
139
- Beautiful Mermaid migration fixtures** (`todo`). Six-month issue harvest
140
- (created since 2026-01-07) found 214 Mermaid issues, 10 Mermaid ASCII issues,
141
- and 61 Beautiful Mermaid issues; capture them as **fixture seeds and parity
142
- gaps**, not as blanket scope expansion. Priority is direct Agentic Mermaid
143
- relevance: supported-family syntax parity, ASCII semantic preservation,
144
- deterministic layout/text/theming/security, and workflow/API ergonomics.
145
- - **Flowchart syntax + subgraphs**: typed metadata/style interop and parser
146
- safety (`mermaid-js/mermaid#7826`, `#7596`; `lukilabs/beautiful-mermaid#125`),
147
- subgraph direction/order/limits (`mermaid-js/mermaid#7946`, `#7477`, `#7741`,
148
- `#7848`; `lukilabs/beautiful-mermaid#55`). Feed #44 / BUILD-23 and the
149
- subgraph-direction/layout fixture matrix.
150
- - **ER/class/sequence/Gantt/chart parity**: ER aliases/directions/cardinality/
151
- subgraphs (`mermaid-js/mermaid#7482`, `#7472`, `#7351`, `#7417`;
152
- `lukilabs/beautiful-mermaid#131`, `#129`, `#124`); class generics/
153
- namespaces/annotations (`mermaid-js/mermaid#7648`, `#7480`, `#7753`, `#7618`;
154
- feeds BUILD-25/#118); sequence notes/fragments/async arrows (`AlexanderGrooff/mermaid-ascii#69`,
155
- `#68`, `#62`; `mermaid-js/mermaid#7681`, `#7664`, `#7687`;
156
- `lukilabs/beautiful-mermaid#107`, `#108`); Gantt scheduling/compact/
157
- multiline/vertical-marker gaps (`mermaid-js/mermaid#7714`, `#7407`, `#7603`,
158
- `#7602`, `#7564`, `#7339`, `#7300`); XY/pie/quadrant/architecture text or
159
- feature gaps (`mermaid-js/mermaid#7650`, `#7599`, `#7392`, `#7607`, `#7325`,
160
- `#7608`, `#7487`, `#7308`, `#7301`).
161
- - **ASCII/Unicode semantic preservation**: import or reproduce terminal
162
- fixtures for dropped labels, multiple edges, ID-vs-label parsing,
163
- international/fullwidth text, arrowhead attachment, fan-out trunks, ER/class
164
- labels, and semicolon/line-break parsing (`AlexanderGrooff/mermaid-ascii#70`,
165
- `#63`, `#59`, `#56`, `#46`; `lukilabs/beautiful-mermaid#122`, `#121`,
166
- `#119`, `#112`, `#111`, `#109`, `#61`, `#13`, `#12`, `#7`, `#5`). Treat
167
- these as semantic-loss blockers before visual polish.
168
- - **Layout/text/theming/security/workflow**: use Mermaid/Beautiful issues as
169
- quality-rubric seeds for spacing, subgraph overflow, edge crossings, long
170
- text/CJK/PNG clipping, html-label wrapping, consistent theme variables,
171
- contrast, CSS class emission, CSP/Trusted Types, external image blocking,
172
- CLI/API/package exports, minified/output options, and post-render mutation
173
- signals (`mermaid-js/mermaid#7901`, `#7930`, `#7932`, `#7911`, `#7827`,
174
- `#7505`, `#7496`, `#7354`, `#7341`, `#7359`, `#7565`, `#7555`, `#7794`,
175
- `#7873`, `#7815`, `#7695`, `#7645`, `#7517`, `#7556`; `lukilabs/beautiful-mermaid#83`,
176
- `#68`, `#65`, `#64`, `#56`, `#32`, `#25`, `#11`, `#89`, `#43`, `#14`,
177
- `#115`, `#130`, `#100`, `#101`, `#80`, `#79`, `#18`, `#1`, `#20`, `#33`,
178
- `#45`, `#73`, `#76`).
179
- - **Strategic new-family watchlist**: TreeView/filetree, C4/ArchiMate,
180
- mindmap, swimlane, and newer requested families (Domain Storytelling,
181
- Cynefin, DITAA, BPMN, RASCI, Data Pipeline, Use Case, PERT/CPM, Org Chart,
182
- Info) are roadmap signals only. Route TreeView through BUILD-6 first;
183
- do not expand family scope without a focused issue and evidence.
184
- - [x] **BUILD-3 — Family-plugin consolidation** (`done`). parse/serialize/
185
- mutate for sequence, timeline, class, ER, and journey now dispatch through
186
- `FamilyPlugin` hooks registered in `src/agent/families-builtin.ts`; each
187
- family lives in one body module (`sequence-body.ts`, `timeline-body.ts`,
188
- `class-body.ts`, `er-body.ts`, `journey-body.ts`). Flowchart/state remain
189
- registered via `flowchartFamilyHooks` (two plugins, one implementation,
190
- header bound per kind) after the contract gained canonicalSource/
191
- multi-error parse and a buildSourceMap hook — no in-tree exception
192
- remains. Mutation rebuilds `canonicalSource` uniformly. Unblocks
193
- BUILD-5/BUILD-6/BUILD-11 and the mutation roadmap.
194
- - [ ] **BUILD-5 — Common-README family coverage: pie, gantt, mindmap,
195
- gitgraph** (`in-progress`). These families are common in
196
- real-world READMEs/docs and already have authoring syntax references in
197
- `skills/agentic-mermaid-diagram-workflow/references/upstream/`, but the
198
- renderer does not accept them. No public usage statistics exist, so first
199
- gather evidence (count fenced ` ```mermaid ` header families across a
200
- GitHub README corpus), then implement in evidence order. Each addition
201
- follows `docs/contributing/adding-diagram-types.md` and ships
202
- parse/verify/render/round-trip (source-level body is acceptable; structured
203
- mutation only where the IR can preserve semantics). The corpus count also
204
- feeds BUILD-11.
205
- - [x] Evidence step: `eval/family-usage/` counts fenced ` ```mermaid `
206
- header families over a directory of markdown. Golden-fixture tested; smoke
207
- run over the in-repo corpus recorded in `eval/family-usage/RESULTS.md`
208
- with an explicit caveat that the decision-grade README corpus run needs
209
- network (see `eval/family-usage/README.md`).
210
- - [x] Pie family (cheapest target): `src/pie/` (types/parser/layout/SVG +
211
- `src/ascii/pie.ts`), routing, agent surface (detect + extractLabels),
212
- showcase samples, docs, and goldens. Now promoted to structured mutation —
213
- `src/agent/pie-body.ts`, `asPie`, 7 ops (see Unreleased changelog).
214
- - [x] Gantt family (per the [docs/design/families/gantt.md](./docs/design/families/gantt.md)
215
- spec from PR #24): `src/gantt/` (types/parser/schedule/layout/SVG +
216
- `src/ascii/gantt.ts`), routing, segment-preserving typed mutation from day
217
- one (`src/agent/gantt-body.ts`, `asGantt`, 9 ops), pure wall-clock-free
218
- scheduler with named `GANTT_*` errors, critical-path analysis in
219
- `describe`, showcase samples, docs, ASCII/Unicode + SVG goldens,
220
- fast-check properties, a `mermaid-ast` differential, and a targeted
221
- Stryker config (`mutation-test:gantt`).
222
- - [ ] mindmap, gitgraph: still to implement. Order the remaining
223
- two by the real README corpus run (network required) per the evidence
224
- step above — `eval/family-usage/RESULTS.md` does not assert that ordering.
225
- - [x] **BUILD-20 — Upstream test-suite harvests for every current renderable family.** Apply
226
- [docs/contributing/harvesting-upstream-tests.md](./docs/contributing/harvesting-upstream-tests.md)
227
- (the method piloted by `eval/mermaid-gantt-bench/`, which found one real
228
- compat bug, one semantic boundary divergence, and the verify/render seam
229
- that became `UNRESOLVABLE_SCHEDULE`) to the remaining current families. The
230
- [`eval/mermaid-upstream-suite-bench/`](./eval/mermaid-upstream-suite-bench/)
231
- bench now pins upstream Mermaid at `a2d9686451df7c4644a3eeca20535bbd4c5776b0`,
232
- provides `bun run harvest:upstream` and `bun run harvest:upstream:refresh-check`,
233
- records a family-by-family manifest for all 1,170 considered parser/DB
234
- blocks, imports 658 source blocks, accounts for 512 exclusions, and leaves
235
- 0 deferred blocks. The executable gate covers 648 cases including the
236
- 68-case Gantt companion bench. Local compatibility exclusions carry BUILD-20
237
- tracking metadata, exact case assertions are enforced, and `ratchet.json`
238
- prevents imported coverage from falling or local-gap budgets from growing.
239
- - [x] flowchart, state, sequence, class, ER, timeline, journey,
240
- architecture, xychart, pie, quadrant, and gantt all have checked
241
- cases/exclusions/manifest accounting.
242
- - [ ] mindmap, gitgraph: harvest BEFORE implementing (BUILD-5) — these are
243
- future families, so they are outside the current renderable-family BUILD-20
244
- closure.
245
- - [x] **BUILD-22 — Diagram-family citizenship gap backfill** (`done`). The
246
- checked matrix in
247
- [`docs/contributing/diagram-family-citizenship.matrix.json`](./docs/contributing/diagram-family-citizenship.matrix.json)
248
- now has **zero exceptions** across registered renderable families. The
249
- docs-corpus citizenship backfill regenerated the official Mermaid syntax-doc
250
- corpus (271 examples, now including pie/quadrant), added an executable
251
- `eval/mermaid-docs-corpus/divergences.json` ledger, fixed the discovered
252
- flowchart compact-target round-trip bug, and upgraded the matrix/test ratchet
253
- so future gaps fail loudly.
254
- - [x] Stable ASCII/TUI/editor region assertions for every family are pinned
255
- in `src/__tests__/agent-ascii-meta.test.ts`; `src/ascii/meta.ts` now emits
256
- regions for state, timeline, class, ER, journey, architecture, xychart,
257
- pie, quadrant, and Gantt in addition to the earlier flowchart/sequence
258
- coverage.
259
- - [x] Targeted mutation lanes exist for state, sequence, timeline, class,
260
- ER, journey, pie, and quadrant (`stryker.<family>.config.json` plus
261
- `mutation-test:<family>` scripts). Flowchart/link routing,
262
- xychart/architecture, and Gantt keep their existing focused lanes.
263
- - [x] Executable docs-corpus divergence ledger exists for current known
264
- non-Gantt Mermaid-docs divergences; the cross-family parser/DB bench now
265
- accounts for every current renderable-family BUILD-20 upstream block.
266
- - [x] Generated-site/sample family coverage is tied to
267
- `BUILTIN_FAMILY_METADATA` by the existing property generator tests,
268
- including explicit gallery affordance/prefix checks for Pie, Quadrant, and
269
- Gantt.
270
- - [x] **BUILD-11 — QuadrantChart family** (`done`). Promoted
271
- from the PARK-3 fork-audit list. Quadrant charts are missing across the
272
- entire beautiful-mermaid fork network (no port exists upstream or in any
273
- fork), so this is cheap differentiation. Axis/quadrant layout is closer to
274
- xychart than to graph families; shipped as a render body, since promoted to
275
- structured mutation (`src/agent/quadrant-body.ts`, `asQuadrant`, 7 ops).
276
- Evidence: `src/quadrant/` (types/parser/layout/SVG renderer) +
277
- `src/ascii/quadrant.ts`; routing in `src/mermaid-source.ts`, `src/index.ts`,
278
- `src/ascii/index.ts`; agent surface in `src/agent/families-builtin.ts`
279
- (`quadrant` detect + `extractQuadrantLabels`) and `DiagramKind` in
280
- `src/agent/types.ts`. Quadrant numbering matches Mermaid core (upstream
281
- `quadrantChart.md`: 1=top-right, 2=top-left, 3=bottom-left, 4=bottom-right).
282
- Tests: `src/__tests__/quadrant.test.ts` (parser happy/sad, per-quadrant
283
- geometry, deterministic SVG, fast-check property, agent surface) + 2 unicode
284
- / 2 ascii goldens (`testdata/{unicode,ascii}/quadrant_*.txt`). Malformed
285
- lines (out-of-range/non-numeric coords, missing brackets, duplicate labels,
286
- `classDef`/`:::` styling) error loudly. Docs/showcase/CHANGELOG/llms.txt
287
- updated; the then-current family count assertions and detector-drift case
288
- were bumped.
289
- - [ ] **BUILD-6 — New upstream Mermaid families (11.4–11.15)** (`todo`). Mermaid added kanban (11.4), radar (11.6), treemap
290
- (~11.9), Venn (beta, 11.13), Ishikawa/fishbone (beta, 11.13), Wardley Maps
291
- (beta, 11.14), TreeView (11.14), and Event Modeling (11.15). Upstream
292
- syntax references for these already ship in the skill bundle. Prioritize
293
- TreeView first: it is hierarchical, ASCII-friendly, and requested against
294
- the upstream fork network (lukilabs/beautiful-mermaid#114). Treat
295
- beta-grammar families (Venn, Ishikawa, Wardley) as watch-and-wait until
296
- upstream syntax stabilizes. C4 belongs here too: the layout-aesthetic
297
- complaint mermaid-js/mermaid#7492 (C4 overlapping labels/text overflow/
298
- crossing arrows) cannot get a regression fixture until C4 is rendered — the
299
- aesthetic-issue coverage audit
300
- (`docs/issue-derived-test-cases.md`) defers it to this item.
301
- - [x] **BUILD-15 — Journey structured mutation (pilot)** (`done`). Typed
302
- `JourneyBody` (title/sections/tasks with 1..5 scores and actors), 10 ops,
303
- `asJourney` narrower, verify hook, lossless opaque fallback for unmodeled
304
- syntax, round-trip property tests (`agent-journey.test.ts`), and sync
305
- across CLI capabilities, MCP SDK declaration, `Instructions_for_agents.md`,
306
- llms.txt, the skill, and the spec. The per-family checklist it validated
307
- is the template for BUILD-16/BUILD-17.
308
- - [x] **BUILD-16 — XY chart structured mutation** (`done`). Typed `XyChartBody`
309
- (bare title, named/categorical/range x-axis, named/range y-axis, `bar`/`line`
310
- series with optional names + finite values; `horizontal` orientation modeled
311
- from the header), 8 ops (`set_title`, `set_x_axis`, `set_y_axis`, `add_series`,
312
- `remove_series`, `set_series_values`, `set_series_name`, `reorder_series`),
313
- `asXyChart` narrower, verify hook (EMPTY_DIAGRAM + LABEL_OVERFLOW on
314
- title/axis-name/series-name), lossless opaque fallback for quoted text /
315
- multi-statement `;` lines / accTitle/accDescr / `curve basis` / non-orientation
316
- header suffixes, and the `SERIES_NOT_FOUND` error code. Number format is
317
- `String(n)` (finite-only), proven byte-identical round-trip plus a
318
- **differential test** that the canonical output re-parses identically under the
319
- legacy `parseXYChart`. Category/series length mismatch is allowed (legacy
320
- renderer accepts it) and tested. Evidence: `src/agent/xychart-body.ts`,
321
- `src/__tests__/agent-xychart.test.ts` (29 tests, 216 assertions; sabotage check
322
- flipped 19 of 29 red), plus sync across CLI capabilities, MCP SDK declaration,
323
- `Instructions_for_agents.md` + mirror, llms.txt, SKILL.md, and the spec.
324
- Followed the BUILD-15/BUILD-17 checklist verbatim.
325
- - [x] **BUILD-17 — Architecture structured mutation** (`done`). Typed
326
- `ArchitectureBody` (groups/services/junctions + anchored `id:SIDE arrow SIDE:id`
327
- edges), 10 ops (`add_service`, `remove_service` [cascades edges],
328
- `rename_service` [updates edges], `set_service_label`, `set_service_icon`,
329
- `move_service`, `add_group`, `remove_group` [refuses non-empty], `add_edge`,
330
- `remove_edge` [by index or `from->to` id]), `asArchitecture` narrower, verify
331
- hook (EMPTY_DIAGRAM + LABEL_OVERFLOW), lossless opaque fallback for the
332
- `{group}` boundary modifier and accTitle/accDescr, round-trip + fast-check
333
- property tests (`agent-architecture.test.ts`), and sync across CLI
334
- capabilities, MCP SDK declaration, `Instructions_for_agents.md`, llms.txt, the
335
- skill, and the spec. Followed the BUILD-15 journey checklist verbatim.
336
- - [x] **BUILD-18 — Segment-preserving structured body** (`done`, sequence). Ended the
337
- structured-or-opaque cliff for sequence: one unmodeled construct (e.g. a
338
- sequence `alt` block) no longer forces the whole diagram opaque. `SequenceBody`
339
- now carries an ordered `statements: SequenceStatement[]` list that interleaves
340
- structured `participant`/`message` statements (refs into the existing
341
- `participants`/`messages` arrays) with verbatim `opaque-block` segments
342
- preserved positionally, so participant/message ops stay available while
343
- `Note`/`alt`/`loop`/`par`/`activate`/`autonumber`/`title` ride along untouched.
344
- Block constructs are captured start→matching-`end` with nesting tracking;
345
- `remove_message`/`set_message_text` indexes address only top-level messages
346
- (messages inside an opaque block are never touched); un-segmentable input
347
- (stray `end`, unclosed block) still falls back to whole-body opaque. Shipped a
348
- segment-aware parser, order-preserving idempotent serializer, segment-respecting
349
- ops, fast-check properties (interleave round-trip in order; `remove_message`
350
- leaves opaque-block bytes unchanged; segments-or-opaque always lossless), and a
351
- sabotage check on the nesting-depth tracker. MermaidSeqBench (132) and the
352
- mermaid-docs sequence corpus stay 100% lossless.
353
- - [ ] Follow-up: apply the same segment-preserving body to class/ER/timeline
354
- unmodeled-syntax fallbacks. This is the path to "typed mutation for all
355
- diagrams" without ever violating the no-loss guarantee. Also the 2A
356
- destination for in-body `%%` comments in flowchart/state (BUILD-21 ships
357
- the announced-drop interim via the `COMMENT_DROPPED` lint): comments
358
- become positionally-anchored opaque segments that ride through mutations.
359
- - [x] **BUILD-19 — Dedicated `StateBody` IR for state diagrams** (`done`).
360
- State diagrams now own a dedicated structured-or-opaque `StateBody`
361
- (`body.kind: 'state'`) — states, transitions with `[*]` start/end
362
- pseudostates (scoped per composite level), nestable composites, and
363
- `direction` — replacing the flowchart projection. `src/agent/state-body.ts`
364
- ships parse/serialize/mutate/verify; `families-builtin` registers state via
365
- `structuredFamilyHooks('state', …)`. Evidence:
366
- - **Modeled-vs-opaque, legacy-probed**: probed `parseStateDiagram` empirically
367
- (definition-before-use label ordering, `[*]` → `_start`/`_end`, composite
368
- `[\w\p{L}]+` ids reject hyphens, bare `stateId`/notes/`<<fork>>`/`--`/
369
- `classDef`/`:::` are DROPPED by the legacy parser → modeled subset is exactly
370
- what re-parses identically; everything else stays lossless-opaque).
371
- - **8 ops** (`add_state`, `remove_state` [cascade + refuse non-empty composite],
372
- `rename_state` [rewrites transitions], `set_state_label`, `add_transition`,
373
- `remove_transition` [index or from/to], `set_transition_label`,
374
- `make_composite`). New error codes `STATE_NOT_FOUND`, `TRANSITION_NOT_FOUND`,
375
- `DUPLICATE_STATE`.
376
- - **Verify-projection proof**: `verify.ts` projects `StateBody` → `MermaidGraph`
377
- via `stateBodyToGraph` and runs the shared `verifyGraph` (Tier 1 + Tier 2);
378
- differential test proves canonical source re-parses 1:1 under the legacy
379
- parser (states ↔ nodes, transitions ↔ edges, composites ↔ subgraphs).
380
- - **Corpus delta**: state round-trip 5% → 100% (all 20 mermaid-docs samples),
381
- verify floor 0.70 → 0.80; floors raised in `agent-mermaid-corpus.test.ts`.
382
- - `asState` narrower; `asFlowchart` now returns `null` on state (breaking flip,
383
- documented across every agent surface + CHANGELOG breaking note). Tests:
384
- `src/__tests__/agent-state.test.ts` (42 tests: parse, narrow, round-trip,
385
- opaque-fallback table, error-path table, differential, fast-check, verify
386
- projection); state pins in `agent.test.ts` and doc-sync guard flipped.
387
- - [x] **BUILD-13 — Layout before/after comparison harness** (`done`).
388
- Prerequisite for all visual/layout work (BUILD-10, BUILD-9, BUILD-12,
389
- BUILD-1): render the corpus + targeted fixtures on two git states and emit
390
- a side-by-side HTML report with perceptual-metric deltas. Shipped as
391
- `eval/layout-compare/run.ts` (snapshot/report subcommands, regression
392
- exit code), fixtures in `eval/layout-compare/fixtures/`, tests in
393
- `src/__tests__/layout-compare.test.ts`.
394
- - [x] **BUILD-10 — Fan-out trunk sharing / connector alignment** (`done`).
395
- Upstream issue <https://github.com/lukilabs/beautiful-mermaid/issues/111>
396
- (sibling edges from one source don't share a trunk; related connector
397
- displacement is issue #112, upstream fix PR is #113).
398
- The #112 box-start displacement was already fixed (connector anchored on the
399
- node border via `getNodeAttachmentPoint`; `ascii-box-start.test.ts`). The
400
- #111-class TB fan-out detour (a labelled sibling edge took an L-shaped wander
401
- with its label on the horizontal run) is now fixed. Evidence: golden
402
- `src/__tests__/testdata/unicode/td_fanout_labeled.txt` matches the upstream
403
- shape exactly; charset-independent invariants in
404
- `src/__tests__/ascii-fanout-trunk-labeled.test.ts` (single trunk with ┬ tees,
405
- each label on its own vertical drop, no `─label─`, no stray `+`/`◢`).
406
- Port outcome (the Loop 17 lesson, confirmed again): of upstream PR #113's four
407
- parts, only TWO were load-bearing in this fork and only those shipped —
408
- (1a) deterministic FIFO tie-breaking in the pathfinder MinHeap
409
- (`src/ascii/pathfinder.ts`), and (3b) label placement preferring the
410
- per-sibling vertical drop in TD (`determineLabelLine` in
411
- `src/ascii/edge-routing.ts`). The other two — (1b) `preferredDir` A* neighbour
412
- reordering and (2) explicit branch-point re-routing — DESTABILISED trunk
413
- rendering here (stray `+`, `◢` arrowheads, regressed the LR box-start repro),
414
- because this fork already has the trunk machinery upstream lacked
415
- (edge-bundling for unlabelled siblings) plus FIFO determinism, so the reorder
416
- fought the existing routing. `preferredDir` is kept as an unused pathfinder
417
- capability (covered by `ascii-pathfinder-determinism.test.ts`); the re-routing
418
- was dropped. Part (4) collinear-corner-skip in `drawCorners` shipped as a
419
- defensive guard. Corpus delta (BUILD-13): 0 SVG / 0 ASCII / 0 metric changes
420
- across 251 samples (the labelled-fan-out pattern isn't in the corpus). Sabotage
421
- check: reversing the FIFO tie-break re-introduces the `─center*─` detour.
422
- - [x] **BUILD-9 — Fan-in grouping** (`done`). Promoted from PARK-1; upstream
423
- PR <https://github.com/lukilabs/beautiful-mermaid/pull/69>. Implemented in
424
- `src/ascii/grid.ts` `createMapping`: roots grouped contiguously by first
425
- downstream target, fan-in targets aligned under their root group, with
426
- self-loops and 2-cycle toggles excluded from the in-degree (a blanket
427
- in-degree check regressed state-machine corpora — caught by BUILD-13).
428
- Corpus impact: 1 sample improved, 0 regressed. Tests:
429
- `src/__tests__/ascii-fan-in-grouping.test.ts`.
430
- - [x] **BUILD-12 — Subgraph `direction` support** (`done` — it was already
431
- implemented; now pinned). Mermaid ignores `direction` inside a subgraph
432
- when an inner node links outward
433
- (<https://github.com/mermaid-js/mermaid/issues/2509>,
434
- <https://github.com/mermaid-js/mermaid/issues/6438>); our ELK SEPARATE
435
- hierarchy handling and the ASCII grid layout both honor it, including the
436
- #2509 external-link case. Geometry tests pin the differentiator:
437
- `src/__tests__/subgraph-direction.test.ts`.
438
- - [x] **BUILD-14 — ASCII: edges to a subgraph id create a phantom node**
439
- (`done`). `Start --> Pipeline` where `Pipeline` is a subgraph used to render
440
- a duplicate floating node box labeled `Pipeline` instead of attaching the
441
- edge to the container. Fixed in the ASCII converter + draw layer: the
442
- converter (`src/ascii/converter.ts` `resolveSubgraphEdges`) detects phantom
443
- subgraph-id nodes, drops them, and retargets each touching edge onto a
444
- representative container member for routing; the draw layer
445
- (`src/ascii/draw.ts` `drawContainerEdge`) clips the visible polyline to the
446
- container's border rectangle and draws the arrowhead on the border, so the
447
- edge attaches to the container — matching the SVG/ELK hierarchical-port
448
- behavior. Edge semantics are preserved (visible terminal is the container
449
- border, never an arbitrary member node). Evidence: red→green repro suite
450
- `src/__tests__/ascii-subgraph-edge.test.ts` (5 tests, incl. the mermaid#2509
451
- case and an id-collision sad path), golden
452
- `src/__tests__/testdata/unicode/subgraph_edge_to_container.txt`, and the
453
- BUILD-13 layout-compare harness shows 4 ASCII-only changed corpus/fixture
454
- samples (flowchart/96, flowchart/97, flowchart/98, subgraph-direction.mmd)
455
- with 0 regressions / 0 faithfulness deltas. Repro:
456
- `eval/layout-compare/fixtures/subgraph-direction.mmd`.
457
- - [x] **BUILD-21 — Source-wrapper fidelity (1C) + announced in-body comment
458
- policy (2C)** (`done`). Probing the official Mermaid syntax-reference
459
- examples through parse → serialize found three wrapper-fidelity gaps:
460
- `config:`-nested frontmatter flattened to top-level keys Mermaid cannot
461
- read back, `%%{init}%%` directives duplicated into a synthesized
462
- frontmatter block, and leading `%%` comments dropped. Owner decisions:
463
- **1C** (wrapper round-trips byte-verbatim by default — `meta.wrapperSource`
464
- — with canonical config-nested synthesis opt-in via
465
- `serializeMermaid(d, { wrapper: 'canonical' })` / `am format
466
- --canonical-wrapper`) and **2C** (in-body comments remain canonicalized
467
- away by structured bodies but the loss is announced via the new Tier 3
468
- `COMMENT_DROPPED` lint computed by diffing parse comments against the
469
- serialized output; wrapper comments and opaque bodies/segments preserve
470
- comments and never warn). Evidence:
471
- `src/__tests__/agent-wrapper-fidelity.test.ts` (14 tests: verbatim
472
- round-trip per wrapper form incl. multiline directives, mutation keeps the
473
- wrapper, canonical nesting/folding incl. the unparseable-directive raw
474
- fallback, CLI flag e2e, lint fires/doesn't-fire matrix); wrapper law + 2C
475
- policy stated in `docs/contributing/adding-diagram-types.md`; warning code
476
- synced across types/capabilities/llms.txt/SDK declaration/agent guides.
477
- The 2A destination (segment-preserving comment retention) is tracked under
478
- the BUILD-18 follow-up below.
479
- - [x] **BUILD-23 — `@{ ... }` node metadata safety floor** (`done`). Issue
480
- <https://github.com/adewale/agentic-mermaid/issues/29>. Mermaid v11.3+
481
- typed-shape syntax no longer silently drops edges/targets or fabricates
482
- phantom metadata-key nodes in the covered repros: parser/tokenization keeps
483
- metadata attached to the intended node or preserves unsupported forms
484
- opaquely; `src/__tests__/flowchart-metadata.test.ts` pins inline,
485
- standalone, and multiline safety cases plus round-trip behavior. Modeled
486
- support for the full v11 typed-shape vocabulary (ISO 5807/ANSI X3.5 symbols
487
- mapped onto `NodeShape`) remains separate (#44). BUILD-1 still needs
488
- compatible `@{ view: collapsed }` semantics, but no longer starts from a
489
- silent-loss parser floor.
490
- - [ ] **BUILD-1 — Collapsible subgraphs (#7785)** (`todo`, after BUILD-23 metadata safety floor; independent of BUILD-20 harvest). Track Mermaid PR
491
- <https://github.com/mermaid-js/mermaid/pull/7785> (`@{ view: collapsed }`
492
- metadata syntax) and stay syntax-compatible. Large, but a real readability
493
- win for agent-generated architecture diagrams; pairs naturally with typed
494
- `collapse`/`expand` mutation ops. Measure with BUILD-13. (BUILD-14, the
495
- ASCII phantom-node bug that would have interfered with collapsed-subgraph
496
- edge attachment, is now fixed.)
497
- - [x] **BUILD-8 — Tier 3 lint catalogue** (`done`). Added advisory
498
- flowchart/state lint warnings for `DUPLICATE_EDGE` and `UNREACHABLE_NODE`,
499
- exposed them through `WarningCode`, `WARNING_TIER`, `am capabilities`,
500
- `llms.txt`, MCP SDK declarations, tests, and agent-facing docs. Candidates
501
- came from EVAL-2's captured/curated real-agent failure corpus.
502
- - [x] **BUILD-4 — Cloudflare Workers website + hosted MCP** (`done`). The
503
- canonical site runs from `website/` on Cloudflare Workers Static Assets with
504
- `run_worker_first: true`, custom domains, and a stateless hosted MCP endpoint
505
- at `https://agentic-mermaid.dev/mcp`. The MCP surface decision is now pinned:
506
- no REST render API; local MCP stays Code Mode-first (`execute`, `render_png`,
507
- `describe`); hosted MCP exposes eight bounded JSON-RPC tools — `execute`
508
- inside a per-code Dynamic Worker isolate, pure `render_svg` / `render_ascii` /
509
- `render_png` / `verify` / `describe`, and declarative structured-edit
510
- `mutate` / `build`. Hosted file/URL artifacts, accounts, tokens, persistence,
511
- outbound network access from `execute`, and arbitrary REST endpoints remain
512
- non-goals. Remaining dashboard/ops work is tracked by DEC-2 (WAF rate limit);
513
- DEC-3's production `LOADER`/Dynamic Workers execute probe and the shared MCP
514
- code dedup work in CONS-23/CONS-24 are complete.
515
-
516
- - [x] **QUAL-1 — Perceptual-quality coverage for non-graph families**
517
- (`done`). `layoutMermaid` now has `RenderedLayout` adapters for EVERY
518
- renderable family — class, ER, journey, architecture, xychart, pie,
519
- quadrant, and gantt join flowchart/state/sequence/timeline — so `measureQuality` /
520
- `checkQuality` and the BUILD-13 harness see real geometry (not bytes-only)
521
- for each. Adapters live in `src/agent/family-layouts.ts`; they parse
522
- `d.canonicalSource` via the legacy per-family parser+layouter (the same
523
- geometry the SVG renderer draws), so opaque-but-renderable bodies are still
524
- measured and invalid opaque bodies degrade to an empty layout instead of
525
- throwing. Wired into `layoutMermaid` (`src/agent/index.ts`) and `verify.ts`
526
- (verify.layout is now truthful for these families). Evidence: red-green +
527
- property + determinism + opaque-no-throw tests in
528
- `src/__tests__/agent-family-layouts.test.ts`; the harness gained a fixture per
529
- family (`eval/layout-compare/fixtures/`) — every fixture's metrics.nodeCount
530
- > 0 — and `compareSample` now treats an empty→measured transition as an
531
- improvement, not a regression (`src/__tests__/layout-compare.test.ts`). A
532
- before/after run against the base commit shows 0 regressions, 57 improvements,
533
- and zero SVG/ASCII byte changes on the 243 shared corpus samples (measurement
534
- only, no rendering change). `docs/quality.md` honest-gap + LLM-judge grid
535
- updated (now 12 families, including gantt).
536
- - Remaining sub-gaps (kept unchecked — need a non-sandbox browser run):
537
- - [x] mermaid-docs corpus regen to include pie/quadrant docs examples.
538
- `corpus.json` was regenerated from a real `mermaid-js/mermaid` clone and
539
- now includes all 12 registered families (271 examples total). Corpus
540
- entries are never fabricated.
541
- - [ ] the new families have no browser screenshot baselines (needs a local
542
- browser run).
543
-
544
- ## 3. Agent-usage verification backlog
545
-
546
- - [x] **EVAL-1 — Capture subagent-backed release-model transcripts** (`done`).
547
- `eval/agent-usage/transcripts/pi-subagent-release-2026-06-10/` captures a
548
- fresh subagent-backed release-model pass across the six default cases. The
549
- committed transcript replay test gates every pi-subagent transcript directory
550
- through the deterministic sandbox, task oracle, and trace linter. Direct
551
- API-backed Anthropic/OpenAI-compatible captures remain available on demand via
552
- `bun run eval:agent-live` when credentials are present.
553
- - [x] **EVAL-2 — Expand captured real-agent failure corpus** (`done`). Added
554
- `eval/agent-usage/failure-corpus/` with captured pi-subagent failures and
555
- curated executable regressions for markdown-only answers, whole-source
556
- regeneration, CLI misuse, serialize-without-verify, ignored verify results,
557
- and opaque mutation attempts. `agent-usage.test.ts` now classifies/replays
558
- the corpus so known-bad paths stay failing. Fed BUILD-8 lint-code selection.
559
- - [ ] **EVAL-3 — Eval the `agentic-mermaid-diagram-workflow` skill for
560
- helpfulness** (`todo`). The public skill
561
- (`website/public/skills/agentic-mermaid-diagram-workflow/SKILL.md` +
562
- `references/`) is the site's main agent call-to-action, now linked from the
563
- footer. Verify it actually improves outcomes: run agent-usage cases with vs.
564
- without the skill loaded and compare on task success, verify-before-return
565
- discipline, Code-Mode vs. prose answers, and source-level-vs-structured edit
566
- choice — reuse the EVAL-1/EVAL-2 sandbox, task oracle, and trace linter.
567
- Fold any skill gaps back into `SKILL.md`/`references/`; keep or cut the
568
- footer link based on whether it demonstrably helps.
569
-
570
- ## 4. Blocked / external resource needed
571
-
572
- _No active blocked items._
573
-
574
- ## 5. Parked / evidence-required ideas
575
-
576
- - [ ] **PARK-2 — Agent Skills discovery and skills.sh visibility** (`parked`,
577
- experimental draft). Reassess Cloudflare's Agent Skills Discovery draft when
578
- its `agent-skills` well-known suffix is registered or the ecosystem contract
579
- stabilizes. If adopted earlier, generate a v0.2.0
580
- `/.well-known/agent-skills/index.json`, package the workflow skill plus its
581
- references as a safe archive, publish its SHA-256 digest, support GET/HEAD +
582
- JSON/Markdown/archive content types + CORS/cache headers, and test fetch,
583
- extraction, and digest verification against the published schema. Once that
584
- endpoint exists, change the homepage `Link` header from the direct `SKILL.md`
585
- to the index. Separately document `npx skills add adewale/agentic-mermaid`;
586
- skills.sh has no submission API and gains visibility from real CLI installs.
587
- - [ ] **PARK-3 — Fork feature ports** (`parked`). Vercel themes,
588
- browser/package export tweaks, C4, ArchiMate (upstream PR #34), and
589
- animation remain fork-audit ideas. Promote one only with a focused issue
590
- and owner. (QuadrantChart was promoted to BUILD-11; fan-in grouping was
591
- PARK-1, promoted to BUILD-9.)
592
-
593
- ## 6. Consolidation / dedup backlog
594
-
595
- Open items carried over from the 2026-07 consolidation audit (the audit doc has
596
- been retired; its landed items shipped, these remain). Each is a
597
- zero-behavior-change or bounded dedup with a red→green or byte-equivalence gate
598
- expected. `consolidation-gate.test.ts` pins the already-single-sourced
599
- invariants against recurrence.
600
-
601
- - [ ] **CONS-11 — One shape-outline module** (`todo`). Every non-rectangular
602
- flowchart silhouette is authored twice: the emitter in `src/renderer.ts` and
603
- the edge clipper in `src/shape-clipping.ts` (hexagon `h/4`, cylinder `ry=7`,
604
- trapezoid `w*0.15`, asymmetric `12`, diamond, stadium). Extract one
605
- `shapeOutline(shape, x, y, w, h)` returning canonical vertices/cap radii;
606
- renderer maps to SVG, clipper ray-intersects the same vertices.
607
- - [ ] **CONS-16 — Modeling `accTitle`/`accDescr` parser** (`todo`). The
608
- directive regex has drifted (`xychart`/`agent` accept optional colon;
609
- `architecture`/`timeline`/`gantt` require it) and the `accDescr { … }` block
610
- scan is copy-pasted. Extend `src/shared/accessibility-directives.ts` with a
611
- modeling `parseAccessibilityDirective(lines, i)` used by all parsers; pick one
612
- colon rule consciously.
613
- - [x] **CONS-23 — Shared MCP tool descriptions/dispatch** (`done`). Extracted
614
- `src/mcp/tool-surface.ts`: shared MCP server name/version, common JSON-RPC
615
- method dispatch (`initialize`, notifications, `ping`, `tools/list`,
616
- `tools/call`, empty prompts/resources), and shared `execute`, `render_png`,
617
- and `describe` tool definition builders. Local and hosted servers now supply
618
- only their intentional behavior differences and tool handlers.
619
- - [x] **CONS-24 — MCP bin shim** (`done`). Extracted `src/mcp/mcp-cli.ts` with
620
- `runMcpCli(argv)`, shared help text, shared flag parsing, and parseable
621
- `parseMcpCliOptions`; both `src/mcp/mcp-bin.ts` and
622
- `bin/agentic-mermaid-mcp.ts` are thin shebang shims, matching the `am` bin
623
- pattern while preserving stdio process-drain behavior.
624
- - [ ] **CONS-26 — Unify agent vs legacy per-family parsers** (`owner-decision`,
625
- architectural). The agent `*-body.ts` parsers re-encode grammars that
626
- `src/<family>/parser.ts` already owns, kept in sync only by differential
627
- tests. Build agent bodies as a projection of the legacy parser's AST so the
628
- legacy parser is the single grammar authority. Schedule separately.
629
- - [ ] **CONS-27 — Canonical minimal diagram per family** (`todo`). The
630
- "minimal diagram" is authored in 5 places (`families.ts` `example`,
631
- `editor/js/examples.js`, `website/build.ts` `COMPARISON_CASES`, two test
632
- fixture helpers) and has drifted. Make `BUILTIN_FAMILY_METADATA[].example`
633
- canonical and derive `COMPARISON_CASES` + fixtures from it.
634
- - [ ] **CONS-30 — `agent/body-utils.ts` extraction** (`todo`). Mechanical,
635
- high-confidence dedup inside `src/agent/`: the LABEL_OVERFLOW closure (×6), the
636
- id allocator (×5), byte-identical `set_title` (×7), `pie-body` ≡ `quadrant-body`
637
- collection ops, the source-map builders, and the `extractLabels` frame (~12×).
638
- Also FNV-1a hash re-rolled in 6 family renderers → import `seedFrom`
639
- (`scene/seed.ts`), and ~47 hand-built `color-mix(in srgb, …)` strings → a
640
- shared `cssMix`.
641
- - [ ] **CONS-40 — Generate the per-family stryker configs** (`todo`). The ~16
642
- `stryker.<family>.config.json` lanes are pure `family → globs → tests` data.
643
- Generate them from the citizenship matrix. Caveat: the citizenship test and
644
- matrix hard-code the config filenames, so a generator must keep on-disk names
645
- or update both in lockstep.
646
- - [x] **CONS-90 — Website pipelines: Cloudflare chosen as canonical** (`done`).
647
- agentic-mermaid.dev (Cloudflare Workers, `website/build.ts`) is now the
648
- canonical live site: homepage/links/`HOSTED_BASE` repointed,
649
- `.github/workflows/deploy-cloudflare.yml` added (auto-deploys on `main`; needs
650
- `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` repo secrets), and the GitHub
651
- Pages deploy (`pages.yml`, `build:site`) retired. The `scripts/site/*`
652
- generators stay as dev/preview tools (still used by `bun run dev` and
653
- `e2e/browser.test.ts`). (Related audit Tier-4 items already resolved:
654
- `mockups/` deleted, `evals/`→`skill-evals/` renamed, dead scripts +
655
- `stryker.linkrank` removed, `pr11-reviewer-guide.md` retired.)
656
- - [x] **CONS-91b — Un-commit the `website/public` bundle** (`done`). The 6.8MB
657
- Cloudflare bundle is now gitignored and built on demand: at deploy by
658
- `deploy-cloudflare.yml`, and for the five tests that read it by the preload
659
- `src/__tests__/website-public.preload.ts`. `website:check` now pins only the
660
- committed `website/src/generated` worker inputs.
661
- - [x] **CONS-91a-partial — Delete the low-coupling Pages generators** (`done`).
662
- Removed `scripts/site/differences.ts`, `xychart-test.ts`, and their exclusive
663
- data (`xychart-samples-data.ts`, `upstream-layout-snapshots.json`,
664
- `capture-upstream-layout.ts`); rewrote `comparison-differences-sync.test.ts`
665
- to keep the `comparison.md`↔registry guard.
666
- - [x] **CONS-91c — Retire `scripts/site/generate.ts` (samples gallery)**
667
- (`done`). Migrated `e2e/browser.test.ts` down to the editor-only suite (the
668
- editor is built by `editor.ts`, which stays; the gallery-specific blocks were
669
- removed — validated at 10 browser tests passing), pointed `bun run dev` at
670
- `website:dev`, and deleted `generate.ts`, `client-color.ts`, `scripts/dev.ts`,
671
- and `property-html-generator.test.ts` (+ the `samples` script). The
672
- citizenship matrix's `generatedSite` evidence now cites `website/build.ts` +
673
- `website-build.test.ts`. `samples-data.ts` stays (shared with eval tooling).
674
- The GitHub Pages pipeline is fully retired.
675
-
676
- ## 7. Non-goals
677
-
678
- - Do not port Vercel-specific package rename, committed `dist/`, `.vercel`, or Vercel branding.
679
- - Do not fold `zhenhuaa/mdv` wholesale into this package; terminal Markdown
680
- viewing belongs in a separate tool or companion package.
681
- - Do not port old dagre-specific layout code directly; translate only ideas
682
- that still apply to the current ELK/layout-engine architecture.
683
- - Do not treat historical `docs/project/divergences.md` or process notes as
684
- backlog unless an item is promoted here with an ID.