Redraw the Meaning, Not the Source File
Once a diagram's relationship has been chosen, Diagram Design has to translate existing material without importing its accidents. This chapter follows that translation for draw.io, Mermaid, and Excalidraw: what their extractors are allowed to read, what they deliberately refuse to execute, how a fresh layout preserves meaning, and how format, size, detail, and audience choices make loss visible. The practical result is a way to judge an import by semantic fidelity rather than by visual resemblance.
The import boundary is deliberately narrow
An existing diagram is not a trusted program. It may contain labels, links, directives, metadata, click targets, embedded payloads, or styling instructions. Diagram Design treats all of those as data about a diagram, not as instructions for the agent or the browser. The import path is designed to extract a bounded intermediate description—nodes, edges, groups, direction, cycles, hubs, unconnected elements, and budget signals—before any new drawing is made.
That boundary is easiest to understand by source format.
A draw.io file may be ordinary XML, a compressed and base64-encoded payload, or a diagram embedded in a PNG or SVG container. The documented procedure sends it through an extractor rather than asking an author to read the raw file. The digest reports the structural signal and can identify likely type candidates, containers, dangling edges, and groups whose leaf children might be collapsed. A link or tooltip inside the drawing is still just a label or metadata field. It is not a reason to open a URL.
Mermaid is treated as bounded text. The supported grammars include flowcharts, sequence diagrams, state diagrams, and entity-relationship diagrams. The extractor does not evaluate Mermaid, render it, fetch click targets, execute JavaScript, open URLs, or let an initialization directive change the import rules. Its output records the declared direction and meaningful structures such as sequence fragments, state transitions, ER fields, and labeled edges. Mermaid's automatic layout is not considered content.
Excalidraw is treated as bounded JSON. Rectangles, ellipses, diamonds, arrows, bound labels, frames, and groups can become structural elements in the digest. Freedraw strokes, image pixels, embeds, links, and unknown elements are counted as discarded material rather than guessed into meaning. A rectangle labeled “CRM DB” may support an inference that it is a store, but the source format itself does not provide the same role vocabulary as a native database shape. That weaker inference belongs in the fidelity account.
The common boundary protects two things at once. It reduces the risk of crossing from data into execution, and it keeps the redesign focused on what the source actually says. A source label that looks like an instruction remains inert. A source style that looks authoritative remains a style hint, not a constraint on the new diagram.