跳到正文

宝玉:技术图表与结构说明

根据技术说明或代码关系规划图表,组织图形结构、主题和渲染步骤,用于解释流程与系统关系。

开源精选知识加工10 个文件26,681 Stars浏览次数 0JimLiu/baoyu-skills MIT版本 1567581
开始使用

下载前阅读 SKILL.md 中的使用条件,并确认所用工具支持对应能力。

输入资料
技术资料与图表目标 图表类型和输出要求 阅读本节完整说明
交付内容
结构化图表 图表源文件与说明 阅读本节完整说明
  1. 获取完整包,保留配套文件的目录结构。
  2. 按照原文准备所需工具、依赖与输入资料。
  3. 阅读对应使用步骤与输入输出说明,在自己的环境中验证结果。

使用提示摘自原文,配套文件保留来源版本;实际运行条件以各包说明为准。

正文

获取原文件

references/flowchart.md

Shape Vocabulary

Shape Meaning SVG Element
Rounded rect (large radius) Start / End <rect rx="25">
Rectangle Process / Action <rect rx="6">
Diamond Decision <polygon> rotated 45°
Parallelogram Input / Output <polygon> with skew
Cylinder Data store Ellipse + rect combo

Flow Direction

Primary flow: top to bottom. Branch flows go left/right from decisions.

Layout Algorithm

  1. Identify the main path (happy path / most common flow) — this runs straight down the center
  2. Branch from decisions: "Yes" continues down center, "No" branches right (or left if space is tight)
  3. Merge paths: Route branches back to the main path using L-shaped connectors
  4. Loop-backs: Route upward on the far left/right side of the diagram with curved paths

Spacing

  • Step-to-step vertical gap: 60-80px (enough for arrow + optional label)
  • Decision diamond height: 70px (point to point)
  • Decision diamond width: 100px (point to point)
  • Branch horizontal offset: 200px from center
  • Merge connector clearance: 20px from any box

Decision Labels

Place "Yes" / "No" (or "True" / "False", "是" / "否") labels directly on the exit arrows, 10px from the diamond edge:

<!-- Decision diamond at center (400, 200) -->
<!-- Yes: downward -->
<line x1="400" y1="235" x2="400" y2="300" stroke="#64748b" marker-end="url(#arrow)"/>
<text x="412" y="260" fill="#34d399" font-size="8">Yes</text>

<!-- No: rightward -->
<line x1="450" y1="200" x2="550" y2="200" stroke="#64748b" marker-end="url(#arrow)"/>
<text x="480" y="193" fill="#fb7185" font-size="8">No</text>

Coloring Strategy

  • Start/End nodes: Highlight color (blue)
  • Process steps: Primary (cyan) or Secondary (emerald)
  • Decision diamonds: Accent (amber) — they draw the eye naturally
  • Error/exception paths: Alert (rose) dashed arrows
  • Happy path arrows: Slightly brighter than branch arrows (stroke-opacity difference)

Complex Flowcharts

For flowcharts with 10+ steps:

  • Group related steps into swim lanes (vertical columns with header bars)
  • Add a "phase" row header at the top of each swim lane
  • Use the region boundary pattern from Architecture for swim lanes

CONTACT HAONAN

联系haonan

医疗 AI · 产品与独立开发

刘浩南

关注医疗 AI 从 demo 到真实落地,聚焦产品化、商业化与院内工作流效率提升。

12年医疗产研经验,大湾区头部医疗AI公司前产品总监,独立开发者

医疗 AI 产品化医疗 AI 商业化院内工作流效率
刘浩南的微信联系二维码
微信扫一扫,联系 haonan