drawio-diagram-forge
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDraw.io Diagram Forge
Draw.io 图表生成工具
Generate draw.io editable diagrams using AI-powered workflow.
借助AI驱动的工作流生成可编辑的draw.io图表。
When to Use
适用场景
- Creating architecture diagrams (Azure, AWS)
- Converting flowcharts from text descriptions
- Transforming images/screenshots into editable format
- Generating swimlane, sequence diagrams
- 创建架构图(Azure、AWS)
- 从文本描述转换流程图
- 将图片/截图转换为可编辑格式
- 生成泳道图、序列图
Prerequisites
前置条件
| Tool | Required |
|---|---|
| VS Code | Yes |
| Draw.io Integration | Yes |
| GitHub Copilot | Yes |
| 工具 | 是否必需 |
|---|---|
| VS Code | 是 |
| Draw.io Integration | 是 |
| GitHub Copilot | 是 |
Quick Start
快速开始
Create a login flow diagramGenerate an Azure Hub-Spoke architecture diagramFrom inputs/requirements.md, create a system diagramCreate a login flow diagramGenerate an Azure Hub-Spoke architecture diagramFrom inputs/requirements.md, create a system diagramOutput Formats
输出格式
| Extension | Description | When to Use |
|---|---|---|
| Native format | Recommended |
| SVG + metadata | Markdown/Web |
| PNG + metadata | Image with edit |
Output:
outputs/| 扩展名 | 描述 | 使用场景 |
|---|---|---|
| 原生格式 | 推荐使用 |
| SVG+元数据 | 文档/网页展示 |
| PNG+元数据 | 带编辑信息的图片 |
输出目录:
outputs/Workflow
工作流
USER INPUT → ORCHESTRATOR → MANIFEST GATEWAY → SVG FORGE → COMPLETED用户输入 → 协调器 → 清单校验门 → SVG生成器 → 完成Quality Gates
质量校验门
| Score | Action |
|---|---|
| 90-100 | Proceed |
| 70-84 | Fix and retry |
| 50-69 | Simplify |
| 0-29 | Ask user |
| 分数区间 | 操作 |
|---|---|
| 90-100 | 继续执行 |
| 70-84 | 修复后重试 |
| 50-69 | 简化需求 |
| 0-29 | 询问用户补充信息 |
Limits
限制条件
| Limit | Value |
|---|---|
| Manifest revision | 2 |
| SVG revision | 2 |
| Total timeout | 45min |
| 限制项 | 数值 |
|---|---|
| 清单修订次数 | 2次 |
| SVG修订次数 | 2次 |
| 总超时时间 | 45分钟 |
Cloud Icons
云图标
→ references/cloud-icons.md
→ references/cloud-icons.md
Enable in VS Code
在VS Code中启用
- Open file
.drawio - Click "+ More Shapes" (bottom-left)
- Enable: Azure, AWS
- Apply
- 打开文件
.drawio - 点击左下角的**"+ 更多形状"**
- 启用Azure、AWS选项
- 应用设置
Azure Format (Critical)
Azure格式(关键要求)
xml
<!-- WRONG -->
<mxCell style="shape=mxgraph.azure.front_door;..." />
<!-- CORRECT -->
<mxCell style="aspect=fixed;image=img/lib/azure2/networking/Front_Doors.svg;..." />xml
<!-- WRONG -->
<mxCell style="shape=mxgraph.azure.front_door;..." />
<!-- CORRECT -->
<mxCell style="aspect=fixed;image=img/lib/azure2/networking/Front_Doors.svg;..." />References
参考资料
| File | Description |
|---|---|
| mxcell-structure.md | mxCell XML structure |
| cloud-icons.md | Azure/AWS icon guide |
| style-guide.md | Node colors, edge styles |
| 文件 | 描述 |
|---|---|
| mxcell-structure.md | mxCell XML结构说明 |
| cloud-icons.md | Azure/AWS图标指南 |
| style-guide.md | 节点颜色、连线样式规范 |
Scripts
脚本
| Script | Description |
|---|---|
| Validate mxCell structure |
| 脚本 | 描述 |
|---|---|
| 校验mxCell结构 |
Troubleshooting
故障排除
| Issue | Solution |
|---|---|
| Blank in draw.io | Check |
| Edges not visible | Verify node IDs |
| Icons missing | Enable Azure/AWS shapes |
| 问题现象 | 解决方法 |
|---|---|
| draw.io中显示空白 | 检查 |
| 连线不可见 | 验证节点ID是否正确 |
| 图标缺失 | 启用Azure/AWS形状选项 |
Done Criteria
完成标准
- or
.drawiofile generated.drawio.svg - Diagram opens correctly in VS Code Draw.io extension
- All nodes and edges visible
- Quality gate score ≥ 85
- 已生成或
.drawio文件.drawio.svg - 图表可在VS Code的Draw.io扩展中正常打开
- 所有节点和连线均可见
- 质量校验门得分≥85