@senad-d/drawme 0.1.4 → 0.1.6

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.
@@ -1,24 +1,10 @@
1
- # DrawMe Extension Agent Reference
1
+ # DrawMe Extension Reference
2
2
 
3
- > Official operational reference for AI agents using the DrawMe Pi extension.
3
+ > Catalog of the commands and tools the DrawMe Pi extension provides, for any project or session that uses it.
4
4
 
5
5
  DrawMe turns diagram requirements into editable `.drawio` sources and local PNG, SVG, PDF, or JPG exports. The extension provides commands that start guided workflows and tools for CLI detection, Mermaid conversion, XML layout, structural validation, shape lookup, export, explanation, and file opening.
6
6
 
7
- This document defines the extension's public functionality, options, defaults, decision rules, and expected agent behavior.
8
-
9
- ## Core operating rules
10
-
11
- 1. Treat the `.drawio` file as the source of truth. Exports are derived artifacts.
12
- 2. Call `drawio_check` once before conversion, layout, preview, or final export.
13
- 3. Use DrawMe tools for draw.io CLI operations; do not invoke `drawio` through a shell.
14
- 4. Use `drawio_shapesearch` instead of guessing official shape styles.
15
- 5. Keep hand-authored XML uncompressed and structurally valid.
16
- 6. Run `drawio_validate` after every source edit. Fix every error; fix each warning or explicitly record why it was reviewed and accepted.
17
- 7. Inspect one visual category at a time in this order: canvas/composition, nodes/typography, connectors, semantics/polish, then a holistic regression check.
18
- 8. Use `drawio_export` with `mode: "preview"` for visual inspection. A successful PNG preview returns both text/metadata and the actual image; the text path remains the fallback when a model or run mode cannot consume images.
19
- 9. Require explicit user approval before `mode: "final"`. Each successful preview export removes the previous preview file for the same source, leaving only the latest; a successful final export removes that remaining preview. Cleanup warnings do not invalidate the new export.
20
- 10. Inspect every tool's text result. Several tools return failure text rather than throwing a tool-call error.
21
- 11. Offer `drawio_open` for manual fine-tuning; call it only when the user wants a desktop application opened.
7
+ This document lists the extension's public surface: commands, tools, options, defaults, output behavior, and limitations. It is not a workflow guide — the `/drawme` command injects the full authoring workflow itself, and the registered tool descriptions carry the operational rules. Two conventions apply everywhere: the `.drawio` file is the source of truth (exports are derived artifacts), and several tools report failures as a text result (`Export failed`, `Layout failed`, `Mermaid conversion failed`, `Fit canvas failed`, `Explain failed`, `Open failed`) rather than a tool-call error, so results must always be read.
22
8
 
23
9
  ## Functional availability
24
10
 
@@ -26,6 +12,7 @@ This document defines the extension's public functionality, options, defaults, d
26
12
  | --- | --- | --- |
27
13
  | Write or edit uncompressed `.drawio` XML with normal file tools | No | No |
28
14
  | `drawio_validate` | No | No |
15
+ | `drawio_fit_canvas` | No | No |
29
16
  | `drawio_shapesearch` | No | No |
30
17
  | `drawio_explain` | No | No |
31
18
  | `drawio_open` | No CLI check; requires an OS file handler | No |
@@ -33,17 +20,17 @@ This document defines the extension's public functionality, options, defaults, d
33
20
  | `drawio_from_mermaid` | Yes | Yes |
34
21
  | `drawio_layout` | Yes | Yes |
35
22
 
36
- When the CLI is unavailable, an agent can still author, edit, validate, explain, and search for shapes. It must skip conversion, layout, preview, and final export.
23
+ When the CLI is unavailable, you can still author, edit, validate, explain, and search for shapes. Skip conversion, layout, preview, and final export.
37
24
 
38
25
  When the CLI is older than version 30, export remains available. Mermaid conversion and ELK layout do not.
39
26
 
40
27
  ## Commands
41
28
 
42
- Commands are user-facing shortcuts. Agents should use model-callable tools when they need explicit options or structured results.
29
+ Commands are user-facing shortcuts. Use the model-callable tools when you need explicit options or structured results.
43
30
 
44
31
  | Command | Functionality |
45
32
  | --- | --- |
46
- | `/drawme <description>` | Starts the full workflow: check, plan, author, validate, focused quality passes, holistic regression review, approval, and final export. |
33
+ | `/drawme <description>` | Starts the full autonomous workflow: check, plan, author, validate, gated multi-pass visual review (fit/sizing → element placement → connections → holistic confirmation), and final export — no human intervention once started. The command pre-resolves the draw.io CLI and embeds the diagram-types, XML-authoring, and (on v30+) Mermaid references into the injected message, so the run starts without tool calls or file reads; only the troubleshooting reference is read on demand. |
47
34
  | `/drawme-check` | Displays the detected draw.io path and version, or reports that the CLI is unavailable. |
48
35
  | `/drawme-export <file> [png\|svg\|pdf\|jpg]` | Performs a final export of an existing `.drawio`; format defaults to PNG. |
49
36
 
@@ -51,7 +38,7 @@ Commands are user-facing shortcuts. Agents should use model-callable tools when
51
38
 
52
39
  ## Tools
53
40
 
54
- DrawMe registers eight model-callable tools.
41
+ DrawMe registers nine model-callable tools.
55
42
 
56
43
  ### `drawio_check`
57
44
 
@@ -123,7 +110,7 @@ Additional behavior:
123
110
  - An explicit `width` replaces raster scaling.
124
111
  - `scale` is ignored in preview mode and for vector formats.
125
112
  - `transparent` has no effect outside PNG.
126
- - Preview mode defaults to unembedded output suitable for vision inspection. A successful PNG preview tool result contains its normal text/metadata block followed by an `image/png` base64 image block. Text-only models and non-image run modes still receive the usable output path.
113
+ - Preview mode defaults to unembedded output suitable for visual inspection. When the current model can view images, a successful PNG preview tool result contains its normal text/metadata block followed by an `image/png` base64 image block; otherwise the image is omitted. The result text always states which case applies, and the output path in the text stays usable either way. A first preview asks for a critique against the current review pass's checklist; a preview that replaces an earlier one instead asks for a before/after comparison with a fixed / not fixed / regressed verdict per addressed finding.
127
114
  - Final exports stay text-only; final PNG, SVG, and PDF default to embedded/editable output.
128
115
  - JPG cannot carry editable XML; never set `embed: true` for JPG.
129
116
  - Embedded PNG exports are checked for draw.io's known truncated IEND chunk and repaired automatically when necessary.
@@ -133,7 +120,7 @@ Additional behavior:
133
120
  #### Use
134
121
 
135
122
  ```text
136
- # Vision-safe inspection artifact
123
+ # Inspection preview (image attached when the current model can view images)
137
124
  drawio_export({ "input": "architecture.drawio", "mode": "preview" })
138
125
 
139
126
  # Editable final SVG
@@ -207,7 +194,39 @@ Fix every error and rerun validation. Fix each warning or record an explicit rev
207
194
  drawio_validate({ "input": "architecture.drawio" })
208
195
  ```
209
196
 
210
- Validation is structural rather than rendered. Its static typography checks are deliberately conservative: it cannot guarantee label fit, correct semantic content, valid rendering of a guessed shape, color contrast, visual balance, or clear auto-routed edges. It does not replace focused preview inspection.
197
+ Validation is structural rather than rendered. Its static typography checks are deliberately conservative: it cannot guarantee label fit, correct semantic content, valid rendering of a guessed shape, color contrast, visual balance, or clear auto-routed edges. It does not replace preview inspection when the current model can view images.
198
+
199
+ ---
200
+
201
+ ### `drawio_fit_canvas`
202
+
203
+ Resizes each page's canvas to its visible content plus an outer margin, without launching draw.io.
204
+
205
+ #### Options
206
+
207
+ | Option | Type | Required | Default | Description |
208
+ | --- | --- | --- | --- | --- |
209
+ | `input` | string | Yes | — | Path to the `.drawio` file. |
210
+ | `margin` | number | No | `40` | Outer margin in px between content and page edge. |
211
+ | `output` | string | No | Overwrites `input` | Destination path. |
212
+
213
+ #### Behavior
214
+
215
+ Per page:
216
+
217
+ - computes the visible content bounding box (nested containers, explicit edge waypoints, and separately sized edge labels included);
218
+ - sets `pageWidth`/`pageHeight` to the content size plus twice the margin, honoring `pageScale`;
219
+ - shifts top-level content (absolute vertices, edge waypoints, floating edge endpoints) so the content origin lands exactly at the margin — children of containers and relative geometry move with their parents and are untouched;
220
+ - grows cramped pages and tightens oversized ones; element sizes and relative positions never change;
221
+ - skips compressed pages, intentional infinite canvases (`page="0"`), and pages without measurable content;
222
+ - reports old → new dimensions and any applied shift per page.
223
+
224
+ The result is a source edit: validate afterwards and re-export previews. Use it whenever content overflows the page, margins fall below the minimum, the canvas has excessive empty space, or elements need more room — spread elements apart and refit the canvas instead of shrinking content.
225
+
226
+ ```text
227
+ drawio_fit_canvas({ "input": "architecture.drawio" })
228
+ drawio_fit_canvas({ "input": "architecture.drawio", "margin": 60 })
229
+ ```
211
230
 
212
231
  ---
213
232
 
@@ -254,7 +273,7 @@ drawio_from_mermaid({
254
273
  })
255
274
  ```
256
275
 
257
- Continue with validation, the ordered focused visual passes, holistic regression review, explicit approval, and final export.
276
+ The converted file is a normal `.drawio` source: it can be validated, previewed, and exported like any other.
258
277
 
259
278
  ---
260
279
 
@@ -386,112 +405,14 @@ drawio_open({ "path": "architecture.drawio" })
386
405
  | Existing diagram only needs validation | `drawio_validate`; no CLI check is necessary. |
387
406
  | Existing diagram only needs export | `drawio_check` → `drawio_export`; do not rebuild it. |
388
407
 
389
- DrawMe does not expose a single natural-language-to-file tool. The agent authors or edits Mermaid/XML with normal file tools, then uses DrawMe for conversion, layout, validation, rendering, explanation, or opening.
390
-
391
- ## Creation workflow
392
-
393
- ### 1. Check
394
-
395
- Call `drawio_check` and record whether export is available and whether Mermaid/layout features are supported.
396
-
397
- ### 2. Plan
398
-
399
- Choose:
400
-
401
- - diagram type;
402
- - components and relations;
403
- - groups or containers;
404
- - top-to-bottom or left-to-right direction;
405
- - Mermaid or XML authoring mode;
406
- - source path, finite page dimensions (or an intentional infinite canvas), pages, and final formats.
407
-
408
- Call `drawio_shapesearch` during planning whenever an exact library shape is required.
409
-
410
- ### 3. Author
411
-
412
- For Mermaid, write concise valid Mermaid and convert it with `drawio_from_mermaid`.
413
-
414
- For XML, use an uncompressed `<mxGraphModel>`. The minimum authoring contract is:
415
-
416
- - include root cells `id="0"` and `id="1"`;
417
- - reserve IDs `0` and `1` for those root cells;
418
- - assign every other cell a unique ID and valid parent;
419
- - assign every vertex positive geometry;
420
- - use explicit `page="1"`, `pageScale="1"`, `pageWidth`, and `pageHeight` for deliverables, sized to visible content with at least 20px outer margin (40px recommended); use `page="0"` only for an intentional infinite canvas;
421
- - assign every edge valid source and target IDs;
422
- - include `<mxGeometry relative="1" as="geometry" />` in every edge;
423
- - escape XML attribute characters and use `&#xa;` for label line breaks;
424
- - use coordinates relative to the actual parent container;
425
- - leave spacing and routing corridors for labels, edges, and arrowheads.
426
-
427
- For large XML graphs on draw.io 30+, run `drawio_layout` and continue using its returned path.
428
-
429
- ### 4. Validate after every source edit
430
-
431
- Run `drawio_validate` immediately after initial authoring, Mermaid conversion, layout, and every later XML/source edit. Fix every error before previewing. Every warning must be fixed or explicitly recorded as reviewed and acceptable with a reason; unresolved or unreviewed warnings block final export.
432
-
433
- ### 5. Focused visual quality passes
434
-
435
- Inspect exactly one category at a time and keep this order. For each pass, export its predictable PNG, inspect only its listed acceptance checks, make a targeted source correction if needed, validate, then replace/re-export that pass preview before advancing:
436
-
437
- 1. **Canvas and composition** — `<name>.review-canvas.png`: page bounds, margins, clipping, excessive empty space, aspect ratio, major alignment, and balance.
438
- 2. **Nodes and typography** — `<name>.review-nodes.png`: overlap, clipping, wrapping, font readability, contrast, padding, sizing, and alignment.
439
- 3. **Connectors** — `<name>.review-connectors.png`: endpoints, arrowheads, line stacking, crossings, routes through unrelated elements, connector labels, and routing corridors.
440
- 4. **Semantics and final polish** — `<name>.review-semantics.png`: requested components/relationships, hierarchy, consistency, legends, grouping, and remaining regressions.
441
- 5. **Holistic regression check** — `<name>.review.png`: recheck all prior categories and confirm later fixes introduced no regression. This is the one review image retained for approval.
442
-
443
- A successful PNG preview result already includes the image block. If the selected model/run mode cannot consume it, use the text path to read or present the artifact. When a new preview for the same source succeeds, the prior preview file is removed automatically; at any point only the latest review artifact should remain. A full-diagram preview is capped at 2000px; if that scaling makes labels unreadable, tighten/simplify the layout, split pages, or use focused review rather than approving unreadable typography.
444
-
445
- The five required inspection passes do not consume correction retries. Allow at most **5 automatic correction retries total** across the workflow. One retry is exactly one targeted source edit → `drawio_validate` → replacement preview cycle. Count retries explicitly. At the limit, stop automatic editing, identify the unresolved category, request focused feedback, and offer `drawio_open` instead of looping.
446
-
447
- ### 6. Human approval and final export
448
-
449
- Present the holistic preview, validation status, and reasons for any reviewed/accepted warnings. User feedback triggers a targeted edit, validation, the affected focused pass, and another holistic regression preview. Receive explicit user approval before calling `drawio_export` with `mode: "final"`.
450
-
451
- After approval, export each requested format and page. The first successful final export automatically removes the one remaining latest preview for that source. Report:
452
-
453
- - source `.drawio` path;
454
- - validation status and reasons for retained reviewed warnings;
455
- - focused-pass and holistic-regression outcomes;
456
- - every final output path and format;
457
- - whether each output embeds editable XML;
458
- - preview cleanup warnings, plus any unavailable or skipped functionality.
459
-
460
- ## Existing-diagram workflows
461
-
462
- ### Explain
463
-
464
- Use `drawio_explain` for a structured read-back. For exact edits, inspect the XML after obtaining the summary.
465
-
466
- ### Validate
467
-
468
- Use `drawio_validate` directly. A CLI check is unnecessary unless an export will follow.
469
-
470
- ### Edit
471
-
472
- 1. Preserve the original unless replacement was requested.
473
- 2. Explain and inspect the source.
474
- 3. Make the smallest targeted XML change.
475
- 4. Validate the edited source and resolve/review every warning.
476
- 5. Rerun the affected focused preview, then a holistic regression preview.
477
- 6. Obtain explicit approval and export to a new path unless in-place replacement was requested.
478
-
479
- Do not blindly edit compressed pages. The validator and explainer cannot inspect them; they must first be saved as uncompressed XML through a compatible editor.
480
-
481
- ### Export
482
-
483
- Check the CLI, then call `drawio_export` with the requested format and options. Do not reconstruct a valid existing source merely to export it.
484
-
485
- ### Re-layout
486
-
487
- Use `drawio_layout` only for XML-authored or existing native diagrams on draw.io 30+. Preserve the original by using a distinct output unless replacement is intentional. Validate and preview the layout result.
408
+ DrawMe does not expose a single natural-language-to-file tool. Author or edit Mermaid/XML with normal file tools, then use DrawMe for conversion, layout, validation, rendering, explanation, or opening.
488
409
 
489
410
  ## Output and editability semantics
490
411
 
491
412
  - `.drawio` is always the canonical editable source.
492
413
  - Final PNG, SVG, and PDF embed XML by default and can be reopened in draw.io where supported.
493
414
  - JPG cannot embed XML.
494
- - Preview PNG is intentionally clean and unembedded for vision compatibility. Its successful tool result includes the actual image plus a text-path fallback. Each successful replacement removes the prior same-source preview file, and final export removes the latest remaining preview.
415
+ - Preview PNG is intentionally clean and unembedded for visual inspection. Its successful tool result includes the image when the current model can view images, and the text always states whether it was attached and reports the output path. Each successful replacement removes the prior same-source preview file, and final export removes the latest remaining preview.
495
416
  - A final embedded PNG normally uses the `.drawio.png` double extension.
496
417
  - Multi-page exports should use `pageIndex` and explicit unique output names.
497
418
  - `drawio_explain` returns Markdown as text; it does not write a documentation file.
@@ -502,7 +423,7 @@ Use `drawio_layout` only for XML-authored or existing native diagrams on draw.io
502
423
 
503
424
  - Validation cannot inspect compressed pages.
504
425
  - Explanation cannot describe compressed pages.
505
- - Deterministic validation cannot replace focused visual inspection; rendered clipping, wrapping, contrast, and automatic routes remain vision concerns.
426
+ - Deterministic validation cannot replace visual inspection; rendered clipping, wrapping, contrast, and automatic routes can only be judged from the preview image. When the current model cannot view images, these remain unverified and must be reported as such.
506
427
  - Removing a superseded preview file does not rewrite Pi session history: image blocks already stored in earlier tool-result messages can remain visible in the transcript even though only the latest preview file remains on disk.
507
428
  - Route-through and crossing analysis is limited to edges with explicit waypoints; dense auto-routed graphs can validate without connector-route warnings.
508
429
  - Shape search covers bundled official draw.io shapes, not arbitrary third-party logos.
@@ -190,7 +190,7 @@ Acceptance criteria:
190
190
  Files:
191
191
 
192
192
  - `README.md`
193
- - `docs/agent-guide.md`
193
+ - `docs/reference.md`
194
194
  - `CHANGELOG.md`
195
195
  - `example/drawme-how-it-works.drawio`
196
196
  - `example/drawme-how-it-works.drawio.png`
@@ -0,0 +1,72 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <mxfile host="drawio" version="31.1.5">
3
+ <diagram id="drawme-waterfall" name="High-level overview">
4
+ <mxGraphModel dx="1640" dy="1040" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1640" pageHeight="1040" math="0" shadow="0">
5
+ <root>
6
+ <mxCell id="0" />
7
+ <mxCell id="1" parent="0" />
8
+
9
+ <mxCell id="title" value="DrawMe Pi Extension" style="text;html=1;whiteSpace=wrap;align=left;verticalAlign=middle;fontSize=30;fontStyle=1;fontColor=#173B67;strokeColor=none;fillColor=none;spacing=0;" vertex="1" parent="1">
10
+ <mxGeometry x="60" y="40" width="900" height="40" as="geometry" />
11
+ </mxCell>
12
+ <mxCell id="subtitle" value="High-level waterfall overview | request &#8594; governed authoring &#8594; editable deliverables" style="text;html=1;whiteSpace=wrap;align=left;verticalAlign=middle;fontSize=16;fontColor=#52657A;strokeColor=none;fillColor=none;spacing=0;" vertex="1" parent="1">
13
+ <mxGeometry x="60" y="90" width="980" height="30" as="geometry" />
14
+ </mxCell>
15
+ <mxCell id="cli-badge" value="draw.io CLI 31.1.5 | v30+ features active" style="rounded=1;arcSize=24;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=13;fontStyle=1;fontColor=#23623B;fillColor=#E8F6EC;strokeColor=#3A9D5D;strokeWidth=1;spacing=8;" vertex="1" parent="1">
16
+ <mxGeometry x="1300" y="50" width="300" height="40" as="geometry" />
17
+ </mxCell>
18
+
19
+ <mxCell id="stage-01" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;01&lt;/font&gt;&#160;&#160;Request&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#40566F&quot;&gt;Natural-language intent arrives through &lt;b&gt;/drawme&lt;/b&gt; in the Pi agent.&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#173B67;fillColor=#EAF2FF;strokeColor=#4C78C2;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
20
+ <mxGeometry x="60" y="170" width="280" height="110" as="geometry" />
21
+ </mxCell>
22
+ <mxCell id="stage-02" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;02&lt;/font&gt;&#160;&#160;Guided orchestration&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#40566F&quot;&gt;&lt;b&gt;workflow.ts&lt;/b&gt; injects the nine-step autonomous process.&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#173B67;fillColor=#EAF2FF;strokeColor=#4C78C2;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
23
+ <mxGeometry x="270" y="290" width="280" height="110" as="geometry" />
24
+ </mxCell>
25
+ <mxCell id="stage-03" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;03&lt;/font&gt;&#160;&#160;Author editable source&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#6B4A21&quot;&gt;Uncompressed XML or Mermaid; exact shape search and optional ELK layout.&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#7A4515;fillColor=#FFF1E6;strokeColor=#E67E22;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
26
+ <mxGeometry x="480" y="410" width="280" height="110" as="geometry" />
27
+ </mxCell>
28
+ <mxCell id="stage-04" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;04&lt;/font&gt;&#160;&#160;Validate every revision&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#66551D&quot;&gt;&lt;b&gt;validate.ts&lt;/b&gt; blocks broken IDs, geometry, bounds, overlap, and explicit routes.&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#66500E;fillColor=#FFF8DD;strokeColor=#C89B1D;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
29
+ <mxGeometry x="690" y="530" width="280" height="110" as="geometry" />
30
+ </mxCell>
31
+ <mxCell id="stage-05" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;05&lt;/font&gt;&#160;&#160;Preview, critique, refine&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#66551D&quot;&gt;Clean PNG review across four categories; targeted fixes are revalidated (max 5).&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#66500E;fillColor=#FFF8DD;strokeColor=#C89B1D;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
32
+ <mxGeometry x="900" y="650" width="280" height="110" as="geometry" />
33
+ </mxCell>
34
+ <mxCell id="stage-06" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;06&lt;/font&gt;&#160;&#160;Holistic confirmation&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#66551D&quot;&gt;The latest holistic preview is re-checked across all categories; the run continues straight to final export.&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#66500E;fillColor=#FFF8DD;strokeColor=#C89B1D;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
35
+ <mxGeometry x="1110" y="770" width="280" height="110" as="geometry" />
36
+ </mxCell>
37
+ <mxCell id="stage-07" value="&lt;b&gt;&lt;font style=&quot;font-size:18px&quot;&gt;07&lt;/font&gt;&#160;&#160;Export deliverables&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#2B5D3C&quot;&gt;&lt;b&gt;drawio.ts&lt;/b&gt; invokes the local CLI &#8594; editable PNG / SVG / PDF / JPG and preview cleanup.&lt;/font&gt;" style="rounded=1;arcSize=18;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=14;fontColor=#23623B;fillColor=#E8F6EC;strokeColor=#3A9D5D;strokeWidth=2;spacing=14;shadow=1;" vertex="1" parent="1">
38
+ <mxGeometry x="1320" y="890" width="280" height="110" as="geometry" />
39
+ </mxCell>
40
+
41
+ <mxCell id="edge-01-02" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=blockThin;endFill=1;endSize=10;strokeColor=#60738A;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="stage-01" target="stage-02">
42
+ <mxGeometry relative="1" as="geometry" />
43
+ </mxCell>
44
+ <mxCell id="edge-02-03" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=blockThin;endFill=1;endSize=10;strokeColor=#60738A;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="stage-02" target="stage-03">
45
+ <mxGeometry relative="1" as="geometry" />
46
+ </mxCell>
47
+ <mxCell id="edge-03-04" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=blockThin;endFill=1;endSize=10;strokeColor=#60738A;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="stage-03" target="stage-04">
48
+ <mxGeometry relative="1" as="geometry" />
49
+ </mxCell>
50
+ <mxCell id="edge-04-05" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=blockThin;endFill=1;endSize=10;strokeColor=#60738A;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="stage-04" target="stage-05">
51
+ <mxGeometry relative="1" as="geometry" />
52
+ </mxCell>
53
+ <mxCell id="edge-05-06" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=blockThin;endFill=1;endSize=10;strokeColor=#60738A;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="stage-05" target="stage-06">
54
+ <mxGeometry relative="1" as="geometry" />
55
+ </mxCell>
56
+ <mxCell id="edge-06-07" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=blockThin;endFill=1;endSize=10;strokeColor=#60738A;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="stage-06" target="stage-07">
57
+ <mxGeometry relative="1" as="geometry" />
58
+ </mxCell>
59
+
60
+ <mxCell id="surface-note" value="&lt;b&gt;&lt;font style=&quot;font-size:17px&quot;&gt;Extension surface&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;3 commands&lt;/b&gt; /drawme &#183; /drawme-check &#183; /drawme-export&lt;br&gt;&lt;b&gt;8 model tools&lt;/b&gt; check &#183; export &#183; validate &#183; shapes &#183; Mermaid &#183; layout &#183; explain &#183; open&lt;br&gt;&lt;b&gt;Pure TypeScript&lt;/b&gt; validation &#183; shape search &#183; explanation&lt;br&gt;&lt;b&gt;CLI adapter&lt;/b&gt; render &#183; convert &#183; layout &#183; open &#183; PNG repair" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;align=left;verticalAlign=top;fontSize=13;fontColor=#34495E;fillColor=#F7F9FC;strokeColor=#A9B7C6;strokeWidth=1;spacing=16;shadow=0;" vertex="1" parent="1">
61
+ <mxGeometry x="60" y="450" width="400" height="220" as="geometry" />
62
+ </mxCell>
63
+ <mxCell id="legend" value="&lt;b&gt;Color key&lt;/b&gt;&lt;br&gt;&lt;font color=&quot;#4C78C2&quot;&gt;&#9632;&lt;/font&gt; Interface and control&#160;&#160;&#160;&lt;font color=&quot;#E67E22&quot;&gt;&#9632;&lt;/font&gt; Authoring&lt;br&gt;&lt;font color=&quot;#C89B1D&quot;&gt;&#9632;&lt;/font&gt; Quality and confirmation&#160;&#160;&#160;&lt;font color=&quot;#3A9D5D&quot;&gt;&#9632;&lt;/font&gt; Deliverable" style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=13;fontColor=#34495E;fillColor=#FFFFFF;strokeColor=#C8D1DC;strokeWidth=1;spacing=14;" vertex="1" parent="1">
64
+ <mxGeometry x="60" y="710" width="420" height="100" as="geometry" />
65
+ </mxCell>
66
+ <mxCell id="trust-note" value="&lt;b&gt;Trust boundary&lt;/b&gt;&lt;br&gt;Pi may use the configured model; diagram files, structural validation, the shape index, and draw.io CLI execution remain on the local machine." style="rounded=1;arcSize=12;whiteSpace=wrap;html=1;align=left;verticalAlign=middle;fontSize=13;fontColor=#44546A;fillColor=#F4F6F8;strokeColor=#8996A5;strokeWidth=1;dashed=1;dashPattern=6 4;spacing=14;" vertex="1" parent="1">
67
+ <mxGeometry x="60" y="850" width="720" height="100" as="geometry" />
68
+ </mxCell>
69
+ </root>
70
+ </mxGraphModel>
71
+ </diagram>
72
+ </mxfile>