Skip to content

Agent skill that turns natural language, code, Terraform/K8s, SQL, OpenAPI, AsyncAPI, Protobuf and GraphQL sources into editable, tested draw.io architecture diagrams: incremental sync, multi-view projection, drift diff, CI architecture tests, whiteboard derasterize, interactive HTML/PPTX/Mermaid exports.

feat: add 7 enhancements from ClawHub competitor analysis (v1.1.0)

Agents365-ai817ad97ac685
diff --git a/README.md b/README.md
index 6d9e5c2..b8ece8c 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,13 @@
- Generates `.drawio` XML files from natural language descriptions
- Exports diagrams to PNG, SVG, PDF, or JPG using the native draw.io desktop CLI
-- Supports multi-page diagrams and layered grouping
+- **6 diagram type presets**: ERD, UML Class, Sequence, Architecture, ML/Deep Learning, Flowchart — with preset shapes, styles, and layout conventions
+- **Animated connectors** (`flowAnimation=1`) for data-flow and pipeline diagrams (visible in SVG and draw.io desktop)
+- **ML model diagram support** with tensor shape annotations `(B, C, H, W)` — ideal for NeurIPS/ICML/ICLR papers
+- **Grid-aligned layout** — all coordinates snap to 10px multiples for clean alignment
+- **Browser fallback** — generates diagrams.net URLs when the desktop CLI is unavailable
- Iterative design: preview, get feedback, and refine diagrams until they look right
+- **Auto-launch** draw.io desktop after export for manual fine-tuning
- Triggers automatically when diagrams would help explain complex systems
## Multi-Platform Support
@@ -33,11 +38,16 @@ Works with all major AI coding agents that support the [Agent Skills](https://ag
| Iterative review loop | No — must manually re-prompt | Yes — targeted edits, 5-round safety valve |
| Proactive triggers | No — only when explicitly asked | Yes — auto-suggests when 3+ components |
| Layout guidelines | None — varies by run | Complexity-scaled spacing, routing corridors, hub placement |
+| Grid alignment | No | Yes — all coordinates snap to 10px multiples |
+| Diagram type presets | No | Yes — 6 presets (ERD, UML, Sequence, Architecture, ML/DL, Flowchart) |
+| Animated connectors | No | Yes — `flowAnimation=1` for data-flow visualization |
+| ML model diagrams | No | Yes — tensor shape annotations, layer-type color coding |
| Color palette | Random/inconsistent | 7-color semantic system (blue=services, green=DB, purple=auth...) |
| Edge routing rules | Basic | Pin entry/exit points, distribute connections, waypoint corridors |
| Container/group patterns | None | Swimlane, group, custom container with parent-child nesting |
| Embed diagram in export | No | Yes — `--embed-diagram` keeps exported PNG/SVG/PDF editable |
-| Chinese language triggers | No | Yes — "画图", "架构图", "流程图" |
+| Browser fallback | No | Yes — generates diagrams.net URL when CLI unavailable |
+| Auto-launch desktop app | No | Yes — opens `.drawio` file after export for fine-tuning |
### vs Other draw.io Skills & Tools
@@ -48,28 +58,35 @@ Works with all major AI coding agents that support the [Agent Skills](https://ag
| **Multi-agent** | ✅ 5 platforms | ❌ Claude Code only | ❌ Claude Code only | ❌ |
| **Self-check** | ✅ 2-round auto-fix | ❌ | ❌ | ❌ screenshot |
| **Iterative review** | ✅ 5-round loop | ❌ generate once | ✅ 3 workflows | ❌ |
-| **Layout guidance** | ✅ complexity-scaled | ✅ basic spacing | ❌ relies on MCP | ❌ |
+| **Layout guidance** | ✅ complexity-scaled + grid snap | ✅ basic spacing | ❌ relies on MCP | ❌ |
+| **Diagram presets** | ✅ 6 types (ERD, UML, Seq, Arch, ML, Flow) | ❌ | ❌ | ❌ |
+| **Animated edges** | ✅ `flowAnimation=1` | ❌ | ❌ | ❌ |
+| **ML/DL diagrams** | ✅ tensor shapes, layer colors | ❌ | ❌ | ❌ |
| **Color system** | ✅ 7-color semantic | ❌ | ✅ 5 themes | ❌ |
| **Container/group** | ✅ swimlane + group | ✅ detailed | ❌ | ❌ |
| **Embed diagram** | ✅ `--embed-diagram` | ✅ | ❌ | ❌ |
| **Edge routing** | ✅ corridors + waypoints | ✅ arrowhead rules | ❌ | ❌ |
-| **Chinese support** | ✅ triggers + docs | ❌ | ❌ | ✅ |
+| **Browser fallback** | ✅ diagrams.net URL | ❌ | ❌ | ❌ |
+| **Auto-launch** | ✅ opens desktop app | ❌ | ❌ | ❌ |
| **Cloud icons** | AWS basic | ❌ | ✅ AWS/GCP/Azure/K8s | ❌ |
| **Zero-config** | ✅ copy SKILL.md | ✅ | ❌ needs `npx` | ❌ needs plugin install |
### Key advantages
1. **Self-check + iterative loop** — the only pure-SKILL.md solution that reads its own output and auto-fixes before showing the user, then supports multi-round refinement
-2. **Multi-agent, zero-config** — works across 5 platforms with just one `SKILL.md` file + draw.io desktop. No MCP server, no Python, no Node.js, no browser
-3. **Production-grade layout** — complexity-scaled spacing, routing corridors, hub-center strategy, connection distribution rules
-4. **Full Chinese support** — proactive triggers ("画图", "架构图"), bilingual documentation
+2. **6 diagram type presets** — ERD, UML Class, Sequence, Architecture, ML/Deep Learning, Flowchart — each with preset shapes, styles, and layout conventions
+3. **ML/DL model diagrams** — tensor shape annotations, layer-type color coding, encoder/decoder swimlanes — built for academic papers
+4. **Multi-agent, zero-config** — works across 5 platforms with just one `SKILL.md` file + draw.io desktop. No MCP server, no Python, no Node.js, no browser
+5. **Production-grade layout** — grid-aligned coordinates, complexity-scaled spacing, routing corridors, hub-center strategy, animated connectors
+6. **Browser fallback** — generates diagrams.net URLs when the desktop CLI is unavailable, plus auto-launch for desktop editing
## Supported diagram types
-- **Architecture**: microservices, cloud (AWS/GCP/Azure), network topology, deployment
-- **Flowcharts**: business processes, workflows, decision trees, state machines
-- **UML**: class diagrams, sequence diagrams, use case diagrams
-- **Data**: ER diagrams, data flow diagrams (DFD)
+- **Architecture**: microservices, cloud (AWS/GCP/Azure), network topology, deployment — with tier-based swimlanes and hub-center strategy
+- **ML / Deep Learning**: Transformer, CNN, LSTM, GRU architectures — with tensor shape annotations and layer-type color coding
+- **Flowcharts**: business processes, workflows, decision trees, state machines — with semantic shape types (parallelogram I/O, diamond decisions)
+- **UML**: class diagrams (inheritance/composition/aggregation arrows), sequence diagrams (lifelines, activation boxes)
+- **Data**: ER diagrams (table containers, PK/FK notation), data flow diagrams (DFD)
- **Other**: org charts, mind maps, wireframes
## How it works
diff --git a/README_CN.md b/README_CN.md
index f1ba8f7..52ae274 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -6,8 +6,13 @@
- 根据自然语言描述生成 `.drawio` XML 文件
- 使用 draw.io 桌面版原生 CLI 将图表导出为 PNG、SVG、PDF 或 JPG
-- 支持多页图表和分层分组
+- **6 种图表类型预设**:ERD、UML 类图、序列图、架构图、ML/深度学习、流程图 — 包含预设形状、样式和布局规范
+- **动画连接线** (`flowAnimation=1`) 适用于数据流和管道图(在 SVG 和 draw.io 桌面版中可见)
+- **ML 模型图支持** 带张量形状标注 `(B, C, H, W)` — 适合 NeurIPS/ICML/ICLR 论文
+- **网格对齐布局** — 所有坐标对齐到 10px 倍数,确保整洁对齐
+- **浏览器降级方案** — 当桌面 CLI 不可用时生成 diagrams.net URL
- 迭代设计:预览、获取反馈、反复优化直到图表满意为止
+- **自动启动** draw.io 桌面版,导出后可直接精修
- 当图表有助于解释复杂系统时自动触发
## 多平台支持
@@ -33,11 +38,16 @@
| 迭代反馈循环 | 否 — 需手动重新提问 | 是 — 定向编辑,5 轮安全阀 |
| 主动触发 | 否 — 仅在明确要求时 | 是 — 3+ 组件时自动建议画图 |
| 布局规范 | 无 — 每次结果不一致 | 按复杂度分级间距、路由走廊、hub 居中策略 |
+| 网格对齐 | 否 | 是 — 所有坐标对齐到 10px 倍数 |
+| 图表类型预设 | 否 | 是 — 6 种预设(ERD、UML、序列图、架构图、ML/DL、流程图) |
+| 动画连接线 | 否 | 是 — `flowAnimation=1` 数据流可视化 |
+| ML/DL 模型图 | 否 | 是 — 张量形状标注、层类型配色 |
| 配色方案 | 随机/不一致 | 7 色语义系统(蓝=服务、绿=数据库、紫=安全…) |
| 连线路由规则 | 基础 | 锚点分配、连接分布、走廊绕行 |
| 容器/分组 | 无 | Swimlane、Group、自定义容器 + 父子嵌套 |
| 嵌入式导出 | 否 | 是 — `--embed-diagram` 保持导出文件可编辑 |
-| 中文支持 | 否 | 是 — "画图"、"架构图"、"流程图" |
+| 浏览器降级 | 否 | 是 — CLI 不可用时生成 diagrams.net URL |
+| 自动启动桌面版 | 否 | 是 — 导出后自动打开 `.drawio` 文件精修 |
### 与其他 draw.io Skills / 工具对比
@@ -48,28 +58,35 @@
| **多智能体** | ✅ 5 个平台 | ❌ 仅 Claude Code | ❌ 仅 Claude Code | ❌ |
| **自检** | ✅ 2 轮自动修复 | ❌ | ❌ | ❌ 截图 |
| **迭代审查** | ✅ 5 轮循环 | ❌ 一次生成 | ✅ 3 种工作流 | ❌ |
-| **布局指南** | ✅ 按复杂度分级 | ✅ 基础间距 | ❌ 依赖 MCP | ❌ |
+| **布局指南** | ✅ 按复杂度分级 + 网格对齐 | ✅ 基础间距 | ❌ 依赖 MCP | ❌ |
+| **图表预设** | ✅ 6 种(ERD、UML、序列、架构、ML、流程) | ❌ | ❌ | ❌ |
+| **动画连线** | ✅ `flowAnimation=1` | ❌ | ❌ | ❌ |
+| **ML/DL 图** | ✅ 张量标注、层配色 | ❌ | ❌ | ❌ |
| **配色系统** | ✅ 7 色语义 | ❌ | ✅ 5 种主题 | ❌ |
| **容器/分组** | ✅ swimlane + group | ✅ 详细 | ❌ | ❌ |
| **嵌入式导出** | ✅ `--embed-diagram` | ✅ | ❌ | ❌ |
| **连线路由** | ✅ 走廊 + waypoints | ✅ 箭头间距规则 | ❌ | ❌ |
-| **中文支持** | ✅ 触发词 + 文档 | ❌ | ❌ | ✅ |
+| **浏览器降级** | ✅ diagrams.net URL | ❌ | ❌ | ❌ |
+| **自动启动** | ✅ 打开桌面版 | ❌ | ❌ | ❌ |
| **云图标** | AWS 基础 | ❌ | ✅ AWS/GCP/Azure/K8s | ❌ |
| **零配置** | ✅ 复制 SKILL.md | ✅ | ❌ 需要 `npx` | ❌ 需安装插件 |
### 核心优势
1. **自检 + 迭代循环** — 唯一纯 SKILL.md 方案中能自动读取输出、修复问题、支持多轮优化的
-2. **多智能体、零配置** — 跨 5 个平台运行,仅需一个 `SKILL.md` 文件 + draw.io 桌面版,无需 MCP、Python、Node.js、浏览器
-3. **专业级布局** — 按复杂度分级间距、路由走廊、hub 居中、连接分布规则
-4. **完整中文支持** — 主动触发词("画图"、"架构图")、双语文档
+2. **6 种图表类型预设** — ERD、UML 类图、序列图、架构图、ML/深度学习、流程图 — 每种都有预设形状、样式和布局规范
+3. **ML/DL 模型图** — 张量形状标注、层类型配色、编码器/解码器泳道 — 专为学术论文打造
+4. **多智能体、零配置** — 跨 5 个平台运行,仅需一个 `SKILL.md` 文件 + draw.io 桌面版,无需 MCP、Python、Node.js、浏览器
+5. **专业级布局** — 网格对齐坐标、按复杂度分级间距、路由走廊、hub 居中策略、动画连接线
+6. **浏览器降级** — 桌面 CLI 不可用时生成 diagrams.net URL,导出后自动启动桌面版编辑
## 支持的图表类型
-- **架构图**:微服务架构、云架构(AWS/GCP/Azure)、网络拓扑、部署架构
-- **流程图**:业务流程、工作流、决策树、状态机
-- **UML**:类图、序列图、用例图
-- **数据图**:ER 图、数据流图(DFD)
+- **架构图**:微服务架构、云架构(AWS/GCP/Azure)、网络拓扑、部署架构 — 带分层泳道和 hub 居中策略
+- **ML / 深度学习**:Transformer、CNN、LSTM、GRU 架构 — 带张量形状标注和层类型配色
+- **流程图**:业务流程、工作流、决策树、状态机 — 带语义形状(平行四边形 I/O、菱形判断)
+- **UML**:类图(继承/组合/聚合箭头)、序列图(生命线、激活框)
+- **数据图**:ER 图(表容器、PK/FK 标记)、数据流图(DFD)
- **其他**:组织架构图、思维导图、线框图
## 工作流程
diff --git a/SKILL.md b/SKILL.md
index 1b8d311..ed3141c 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -4,7 +4,7 @@ description: Use when user requests diagrams, flowcharts, architecture charts, o
license: MIT
compatibility: Requires draw.io desktop app CLI on PATH (macOS/Linux/Windows)
platforms: [macos, linux, windows]
-metadata: {"openclaw":{"requires":{"anyBins":["draw.io","drawio"]},"emoji":"📐","os":["darwin","linux","win32"],"install":[{"id":"brew-drawio","kind":"brew","formula":"drawio","bins":["draw.io"],"label":"Install draw.io via Homebrew","os":["darwin"]}]},"hermes":{"tags":["drawio","diagram","flowchart","architecture","visualization","uml"],"category":"design","requires_tools":["draw.io"],"related_skills":["mermaid","excalidraw","plantuml"]},"author":"Agents365-ai","version":"1.0.0"}
+metadata: {"openclaw":{"requires":{"anyBins":["draw.io","drawio"]},"emoji":"📐","os":["darwin","linux","win32"],"install":[{"id":"brew-drawio","kind":"brew","formula":"drawio","bins":["draw.io"],"label":"Install draw.io via Homebrew","os":["darwin"]}]},"hermes":{"tags":["drawio","diagram","flowchart","architecture","visualization","uml"],"category":"design","requires_tools":["draw.io"],"related_skills":["mermaid","excalidraw","plantuml"]},"author":"Agents365-ai","version":"1.1.0"}
---
# Draw.io Diagrams
@@ -19,7 +19,7 @@ PNG, SVG, and PDF exports support `--embed-diagram` (`-e`) — the exported file
## When to Use
-**Explicit triggers:** user says "画图", "diagram", "visualize", "flowchart", "draw", "架构图", "流程图"
+**Explicit triggers:** user says "diagram", "visualize", "flowchart", "draw", "architecture diagram", "process flow", "ER diagram", "UML", "sequence diagram", "class diagram", "neural network", "model architecture"
**Proactive triggers:**
- Explaining a system with 3+ interacting components
@@ -100,7 +100,7 @@ After self-check, show the exported image and ask the user for feedback.
- For layout-wide changes (e.g., swap LR↔TB, "start over"): regenerate full XML
- Overwrite the same `{name}.png` each iteration — do not create `v1`, `v2`, `v3` files
- After applying edits, re-export and show the updated image
-- Loop continues until user says approved / done / LGTM / 完成
+- Loop continues until user says approved / done / LGTM
- **Safety valve:** after 5 iteration rounds, suggest the user open the `.drawio` file in draw.io desktop for fine-grained adjustments
### Step 7: Final Export
@@ -108,6 +108,7 @@ After self-check, show the exported image and ask the user for feedback.
Once the user approves:
- Export to all requested formats (PNG, SVG, PDF, JPG) — default to PNG if not specified
- Report file paths for both the `.drawio` source file and exported image(s)
+- **Auto-launch:** offer to open the `.drawio` file in draw.io desktop for fine-tuning — `open diagram.drawio` (macOS), `xdg-open` (Linux), `start` (Windows)
- Confirm files are saved and ready to use
## Draw.io XML Structure
@@ -136,6 +137,7 @@ Once the user approves:
- All text uses `html=1` in style for proper rendering
- **Never use `--` inside XML comments** — it's illegal per XML spec and causes parse errors
- Escape special characters in attribute values: `&`, `<`, `>`, `"`
+- **Multi-line text in labels:** use `
` for line breaks inside `value` attributes (not literal `\n`). Example: `value="Line 1
Line 2"`
### Shape types (vertex)
@@ -222,6 +224,7 @@ For architecture diagrams with nested elements, use draw.io's parent-child conta
```
**Edge style rules:**
+- **Animated connectors:** add `flowAnimation=1;` to any edge style to show a moving dot animation along the arrow. Works in SVG export and draw.io desktop — ideal for data-flow and pipeline diagrams. Example: `style="edgeStyle=orthogonalEdgeStyle;flowAnimation=1;rounded=1;..."`
- **Always** include `rounded=1;orthogonalLoop=1;jettySize=auto` — these enable smart routing that avoids overlaps
- Pin `exitX/exitY/entryX/entryY` on every edge when a node has 2+ connections — distributes lines across the shape perimeter
- Add `<Array as="points">` waypoints when an edge must detour around an intermediate shape
@@ -266,6 +269,8 @@ When multiple edges connect to the same shape, assign different entry/exit point
**Routing corridors:** between shape rows/columns, leave an extra ~80px empty corridor where edges can route without crossing shapes. Never place a shape in a gap that edges need to traverse.
+**Grid alignment:** snap all `x`, `y`, `width`, `height` values to **multiples of 10** — this ensures shapes align cleanly on draw.io's default grid and makes manual editing easier.
+
**General rules:**
- Plan a grid before assigning x/y coordinates — sketch node positions on paper/mentally first
- Group related nodes in the same horizontal or vertical band
@@ -317,6 +322,23 @@ draw.io -x -f pdf -o diagram.pdf input.drawio
- `-t` — transparent background (PNG only)
- `--page-index 0` — export specific page (default: all)
+### Browser fallback (no CLI needed)
+
+When the draw.io desktop CLI is unavailable, generate a browser-editable URL by deflate-compressing and base64-encoding the XML:
+
+```bash
+# Encode .drawio XML into a diagrams.net URL
+python3 -c "
+import zlib, base64, urllib.parse, sys
+xml = open(sys.argv[1]).read()
+compressed = zlib.compress(xml.encode('utf-8'), 9)
+encoded = base64.urlsafe_b64encode(compressed).decode('utf-8')
+print('https://viewer.diagrams.net/?tags=%7B%7D&lightbox=1&edit=_blank#R' + urllib.parse.quote(encoded, safe=''))
+" input.drawio
+```
+
+This produces a URL that opens the diagram in the browser for viewing and editing — useful when the user cannot install the desktop app.
+
### Checking if draw.io is in PATH
```bash
@@ -347,3 +369,84 @@ fi
| Self-closing edge `mxCell` | Always use expanded form with `<mxGeometry>` child — self-closing edges won't render |
| `--` inside XML comments | Illegal per XML spec — use single hyphens or rephrase |
| Arrowhead overlaps bend | Final edge segment before target must be ≥20px — increase spacing or add waypoints |
+| Literal `\n` in label text | Use `&#xa;` for line breaks in `value` attributes |
+
+## Diagram Type Presets
+
+When the user requests a specific diagram type, apply the matching preset below for shapes, styles, and layout conventions.
+
+### ERD (Entity-Relationship Diagram)
+
+| Element | Style | Notes |
+|---------|-------|-------|
+| Table | `shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;strokeColor=#6c8ebf;fillColor=#dae8fc;` | Each table is a container |
+| Row (column) | `shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;` | Child of table, `parent=tableId` |
+| PK column | Bold text: `fontStyle=1` on the row | Mark with `PK` prefix or key icon |
+| FK relationship | Dashed edge: `dashed=1;endArrow=ERmandOne;startArrow=ERmandOne;` | Use ER notation arrows |
+| Layout | TB, tables spaced 300px apart | Group related tables vertically |
+
+### UML Class Diagram
+
+| Element | Style | Notes |
+|---------|-------|-------|
+| Class box | `swimlane;fontStyle=1;align=center;startSize=26;html=1;` | 3-section: title / attributes / methods |
+| Separator | `line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=10;rotatable=0;labelPosition=left;points=[];portConstraint=eastwest;` | Between sections |
+| Inheritance | `endArrow=block;endFill=0;` | Hollow triangle arrow |
+| Implementation | `endArrow=block;endFill=0;dashed=1;` | Dashed + hollow triangle |
+| Composition | `endArrow=diamondThin;endFill=1;` | Filled diamond |
+| Aggregation | `endArrow=diamondThin;endFill=0;` | Hollow diamond |
+| Layout | TB, classes 250px apart | Interfaces above implementations |
+
+### Sequence Diagram
+
+| Element | Style | Notes |
+|---------|-------|-------|
+| Actor/Object | `shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;portConstraint=eastwest;` | Lifeline with dashed vertical line |
+| Sync message | `html=1;verticalAlign=bottom;endArrow=block;` | Solid line, filled arrowhead |
+| Async message | `html=1;verticalAlign=bottom;endArrow=open;dashed=1;` | Dashed line, open arrowhead |
+| Return message | `html=1;verticalAlign=bottom;endArrow=open;dashed=1;strokeColor=#999999;` | Grey dashed |
+| Activation box | `shape=umlFrame;whiteSpace=wrap;` on the lifeline | Narrow rectangle on lifeline |
+| Layout | LR, lifelines spaced 200px apart | Time flows top to bottom |
+
+### Architecture Diagram
+
+| Element | Style | Notes |
+|---------|-------|-------|
+| Layer/tier | `swimlane;startSize=30;` | Containers for grouping: Client / API / Service / Data |
+| Service | `rounded=1;whiteSpace=wrap;html=1;` + tier color | Use color palette by tier |
+| Database | `shape=cylinder3;whiteSpace=wrap;html=1;` | Green palette |
+| Queue/Bus | `rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;` | Yellow — place centrally for hub pattern |
+| Gateway/LB | `shape=mxgraph.aws4.resourceIcon;` or `rounded=1;` with orange | Orange palette |
+| External | `rounded=1;dashed=1;fillColor=#f5f5f5;strokeColor=#666666;` | Dashed border for external systems |
+| Layout | TB or LR by tier count; ≥4 tiers → TB | Hub nodes centered |
+
+### ML / Deep Learning Model Diagram
+
+For neural network architecture diagrams — ideal for papers targeting NeurIPS, ICML, ICLR.
+
+| Element | Style | Notes |
+|---------|-------|-------|
+| Layer block | `rounded=1;whiteSpace=wrap;html=1;` + type color | Main building block |
+| Input/Output | `fillColor=#d5e8d4;strokeColor=#82b366;` | Green |
+| Conv / Pooling | `fillColor=#dae8fc;strokeColor=#6c8ebf;` | Blue |
+| Attention / Transformer | `fillColor=#e1d5e7;strokeColor=#9673a6;` | Purple |
+| RNN / LSTM / GRU | `fillColor=#fff2cc;strokeColor=#d6b656;` | Yellow |
+| FC / Linear | `fillColor=#ffe6cc;strokeColor=#d79b00;` | Orange |
+| Loss / Activation | `fillColor=#f8cecc;strokeColor=#b85450;` | Red/Pink |
+| Skip connection | `dashed=1;endArrow=block;curved=1;` | Dashed curved arrow |
+| Tensor shape label | Add shape annotation as secondary label: `value="Conv2D&#xa;(B, 64, 32, 32)"` | Use `&#xa;` for multi-line |
+| Layout | TB (data flows top→bottom), layers 150px apart | Group encoder/decoder as swimlanes |
+
+**Tensor shape convention:** annotate each layer with input/output tensor dimensions in `(B, C, H, W)` or `(B, T, D)` format. Place dimensions as the second line of the label using `&#xa;`.
+
+### Flowchart (enhanced)
+
+| Element | Style | Notes |
+|---------|-------|-------|
+| Start/End | `ellipse;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;` | Green oval |
+| Process | `rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;` | Blue rectangle |
+| Decision | `rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;` | Yellow diamond |
+| I/O | `shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;` | Orange parallelogram |
+| Subprocess | `rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;` + double border | Purple |
+| Yes/No labels | `value="Yes"` / `value="No"` on decision edges | Always label decision branches |
+| Layout | TB, 200px vertical gap | Decisions branch LR, merge back to center |