AGENTS.md
Guidance for coding agents working on Draw.io Lite, a lightweight skill for creating and editing draw.io diagrams.
Project Overview
Draw.io Lite converts text, notes, Mermaid, CSV, YAML, screenshots, or existing diagrams into draw.io-ready structure. It is template-first and route-based, with explicit workflows for create, edit, replicate, and convert tasks.
Key paths:
SKILL.md: route, workflow, XML, style, and response rules.assets/templates/flowchart-standard.drawio: default process template.assets/templates/system-architecture-standard.drawio: default architecture template.assets/templates/incident-analysis-standard.drawio: default incident template.
Route Rules
create: build a new diagram from request text.edit: modify an existing.drawiowhile preserving unaffected cells.replicate: reconstruct a reference visual into structured draw.io form.convert: turn Mermaid, CSV, YAML, or notes into nodes, groups, edges, and layout.
Classify the route before editing files.
Workflow
- Summarize the diagram goal in one sentence.
- Extract title, nodes, groups, edges, and layout hint.
- Draft a short ASCII outline when the structure is dense or ambiguous.
- Select the closest template.
- Build or edit XML on top of that template.
- State assumptions, limits, and exact change scope.
XML And Style Rules
- Start from a template by default.
- Keep node labels short and readable.
- Prefer orthogonal edges for process and system diagrams.
- Place containers before child nodes and edges.
- Preserve page IDs and unaffected cells when editing.
- Use semantic built-in shapes before vendor-specific icons.
- Keep default font, palette, and edge style consistent with the skill.
Quality Checks
- Labels are readable.
- Arrow directions match the explanation.
- Containers wrap their child nodes.
- No duplicate IDs or orphan edges exist.
- The file opens in draw.io without recovery warnings.
Security
- Do not embed private screenshots, customer names, local paths, or internal URLs in public example diagrams.
- Treat source diagrams and screenshots as potentially confidential.