Prevent LLMs from using literal \n in value attributes, which renders
as backslash-n text instead of a newline. Recommend 
 (universal)
or <br> (html=1 only).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Edge examples lacked html=1, causing LLMs to generate edges without
it. When edge labels contain HTML tags, they render as literal text
without this flag. Also add guidance on fontStyle vs HTML tags: use
fontStyle for whole-label formatting, HTML tags for partial formatting,
never both.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without html=1 in the style, draw.io renders HTML tags (<b>, <br>,
<font>, etc.) as literal text instead of formatting them. Added html=1
to all code examples and a new "HTML labels" section documenting the
requirement.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add explicit decision step: skip search_shapes for flowcharts, UML, ERD,
org charts, mind maps etc. that use basic geometric shapes. Only use it
for industry-specific icons (cloud, P&ID, network, electrical, Cisco, K8s).
Updated in xml-reference.md (single source of truth), search_shapes tool
description, and CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a shape search system that lets LLMs discover correct draw.io style
strings for domain-specific shapes (AWS, Azure, GCP, P&ID, electrical,
Cisco, Kubernetes, UML, BPMN, etc.) before generating XML.
- shape-search/generate-index.js: loads app.min.js via jsdom, runs all
sidebar palette initializations, intercepts createVertexTemplateEntry
and createEdgeTemplateEntry to capture {style, w, h, title, tags}
for every shape. Produces search-index.json (10,440 shapes).
- mcp-app-server/src/shared.js: adds soundex(), buildTagMap(), and
searchShapes() implementing the same search algorithm as draw.io's
Sidebar (exact + phonetic matching, AND across terms). Registers
search_shapes tool in createServer() when shapeIndex is provided.
- Build pipeline: build-html.js embeds the index in generated-html.js,
worker.js and index.js pass it through to createServer().
- xml-reference.md: guides LLMs to use search_shapes for domain shapes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nudge LLMs to use semantically correct draw.io shapes and to match
the user's language in diagram labels.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move mxfile.xsd from www.diagrams.net-source to the public repo so
all references can point here. Update XSD links in xml-reference.md
and drawio-style-reference.md to use the GitHub URL.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move drawio-style-reference.md from drawusaurus to shared/ (public
repo so it can be referenced from the docs site). Update the style
reference link in xml-reference.md to point to the new location.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the draw.io XML generation reference to shared/xml-reference.md
and wire all four consumers to use it instead of duplicating the
content. Add layers, tags, and metadata/placeholders documentation.
- MCP app server: reads at startup (Node.js) or pre-builds into
generated-html.js (Workers) via build-html.js
- MCP tool server: reads at startup with fallback to local copy;
prepack script bundles the file before npm publish
- Skill: references the GitHub raw URL so it works after install
- Project instructions: tells users to copy from GitHub
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>