Loading...
Loading...
Compare original and translation side by side
ai-workspace/rules/visualizations.mdai-workspace/rules/visualizations.md/visualize # visualize the last discussed concept
/visualize <topic or file> # visualize specific content
/visualize --format mermaid <topic> # force a specific format/visualize # 可视化最后讨论的概念
/visualize <topic or file> # 可视化特定内容
/visualize --format mermaid <topic> # 强制使用特定格式| Content shape | Signal | Format |
|---|---|---|
| Graph with nodes + edges | architecture, dependencies, flow between components | Mermaid |
| Sequence / interaction | request flow, API calls, multi-step protocol | Mermaid |
| State transitions | modes, lifecycle, status changes | Mermaid |
| Comparison (3+ items) | options, tradeoffs, feature matrix | Markdown table |
| Hierarchy / tree | file structure, org chart, simple nesting | ASCII art |
| Contrast (2 items) | before/after, good/bad, do/don't | Inline pairs |
| Entity relationships | data model, schema | Mermaid |
.mdmermaidnode --import tsx scripts/render-mermaid.ts --input <mermaid-file> --output <png-path> --width 2400 --height 1800--format| 内容形态 | 特征 | 格式 |
|---|---|---|
| 带节点和边的图 | 架构、依赖关系、组件间流程 | Mermaid |
| 序列/交互 | 请求流程、API调用、多步骤协议 | Mermaid |
| 状态转换 | 模式、生命周期、状态变化 | Mermaid |
| 对比(3个及以上项) | 选项、权衡、功能矩阵 | Markdown表格 |
| 层级/树状 | 文件结构、组织结构图、简单嵌套 | ASCII艺术图 |
| 对比(2个项) | 前后对比、优劣对比、该做/不该做 | 内联配对 |
| 实体关系 | 数据模型、模式 | Mermaid |
.mdmermaidnode --import tsx scripts/render-mermaid.ts --input <mermaid-file> --output <png-path> --width 2400 --height 1800--format| Condition | Behavior |
|---|---|
| Content shape ambiguous | Ask: "This could be a [X] or [Y] — which fits better?" |
| Mermaid syntax error | Show the error, offer to fix |
| mmdc not available | Fall back to fenced Mermaid block (renders on GitHub/web) |
| 条件 | 行为 |
|---|---|
| 内容形态模糊 | 询问:“这可以渲染为[X]或[Y]——哪种更合适?” |
| Mermaid语法错误 | 显示错误信息,提供修复选项 |
| mmdc不可用 | 回退到带围栏的Mermaid代码块(可在GitHub/网页上渲染) |
scripts/render-mermaid.tsscripts/render-mermaid.ts