Skip to content

roxorlt/UEmaster / skills/flow-canvas

flow-canvas

Verified

把业务图渲染成横平竖直的规范 SVG:流程图(正交规范)、架构图(泳道分层)、ER 图、甘特图、时序图。触发:画流程图、业务流程图、架构图、ER 图、甘特图、时序图、把 mermaid 转规范图、流程图横平竖直、评审用图、render flowchart / orthogonal flowchart / architecture diagram / ER diagram / gantt / sequence diagram / draw a clean diagram from mermaid。不适用:只要 mermaid 源码文本、脑图、表格。

FileKindSize
LICENSEother1.0 KB
README.mdmarkdown3.7 KB
SKILL.mdskill md10.2 KB
agents/interface.yamlconfig1.4 KB
contract/archspec-v1.mdmarkdown2.1 KB
contract/archspec-v2.mdmarkdown3.0 KB
contract/archspec-v3.mdmarkdown5.1 KB
contract/archspec-v4.mdmarkdown5.0 KB
contract/archspec-v5.mdmarkdown3.5 KB
contract/blueprintspec-v1.mdmarkdown7.7 KB
contract/blueprintspec-v2.mdmarkdown4.0 KB
contract/blueprintspec-v4.mdmarkdown4.1 KB
contract/erspec-v1.mdmarkdown1.9 KB
contract/erspec-v2.mdmarkdown4.2 KB
contract/flowspec-v1.mdmarkdown3.0 KB
contract/ganttspec-v1.mdmarkdown1.9 KB
contract/seqspec-v1.mdmarkdown1.6 KB
examples/arch-3tier.mmdother289 B
examples/arch-logical.mmdother680 B
examples/arch-microservice.mmdother342 B
examples/arch-portal.mmdother262 B
examples/arch-skip.mmdother337 B
examples/blueprint-enterprise.mmdother2.0 KB
examples/blueprint-layered.mmdother794 B
examples/er-blog.mmdother324 B
examples/er-order.mmdother449 B
examples/er-school.mmdother409 B
examples/gantt-day-schedule.mmdother321 B
examples/gantt-infra.mmdother473 B
examples/gantt-release.mmdother483 B
examples/minimal.mmdother133 B
examples/pet-boarding.mmdother1.2 KB
examples/seq-login-auth.mmdother308 B
examples/seq-oauth-resource.mmdother386 B
examples/seq-order-pay.mmdother338 B
examples/seq-push-notify.mmdother414 B
manifest.jsonconfig288 B
scripts/flowcommon.pyexecutablescript21.3 KB
scripts/flowlayout.pyexecutablescript30.7 KB
scripts/layout_arch.pyexecutablescript60.6 KB
scripts/layout_blueprint.pyscript78.8 KB
scripts/layout_er.pyexecutablescript21.1 KB
scripts/layout_gantt.pyexecutablescript14.4 KB
scripts/layout_seq.pyexecutablescript13.5 KB
scripts/selftest.pyexecutablescript6.0 KB
scripts/selftest_arch.pyexecutablescript18.5 KB
scripts/selftest_blueprint.pyscript22.2 KB
scripts/selftest_er.pyexecutablescript10.5 KB
scripts/selftest_gantt.pyexecutablescript6.7 KB
scripts/selftest_seq.pyexecutablescript6.1 KB

contract/archspec-v3.md

View on GitHub
# archspec/3 契约(架构图)

flow-canvas 多图类型引擎 · 架构图排版契约。v3 对齐 C4 容器级「逻辑容器图」评审规范:一张图先回答一个明确问题(系统边界在哪、请求怎么流转、每条连线是什么语义、哪个是权威数据源),并把「不知道什么」也画出来。v2 → v3 破坏性变更:嵌套 subgraph 引入系统边界与外部实体;新增 title/scope/version/todo 元信息、自动图例、待确认项区、边语义警告。

## 输入:mermaid 子集

### 逻辑容器图(推荐形态)

```
flowchart TB
title 业务系统|逻辑容器图(Web 请求路径)
scope 不描述部署、高可用与安全边界
version 2026-03-02
todo Nginx 职责待确认(反向代理 / API 网关)
subgraph 业务系统
  subgraph 接入层
    N["NGINX|接入组件(职责待确认)"]
  end
  subgraph 应用层
    A["应用服务|业务处理"]
  end
  subgraph 数据层
    D[["数据库|主数据存储(权威数据源)"]]
    R[["Redis|缓存(Cache-Aside)"]]
  end
end
W[["浏览器|外部客户端"]]
W -->|"HTTPS:请求/响应"| N
N -->|"HTTP:反向代理"| A
A -->|"SQL:读写"| D
A -->|"Redis 协议:缓存读写"| R
```

- **元信息指令**(可选,逐行):`title …` 图标题(建议「系统名|图类型(视角)」);`scope …` 范围/排除项(如「不描述部署与高可用」);`version …` 版本或日期;`todo …` 待确认项(可多行,渲染进「待确认项」区)。未知内容必须写 todo,不得伪造结论。
- **系统边界**:最外层 subgraph = 系统边界(虚线大框 + 框内左上角标题);内层 subgraph = 逻辑层(自上而下声明序);直接写在边界内的节点归入无标题层(排在最后)。
- **外部实体**:边界外(顶层)的节点 = 系统外部(如浏览器),置于边界上方,阅读方向统一自上而下。
- 节点:`A["文本"]` 矩形、`A[["文本"]]` 外部系统(虚线)、`A("文本")` 圆角矩形;`class X,Y backend` 数据存储(灰底双线);命名规范建议「名称|类型/职责」(如「应用服务|业务处理」)。
- 边:`-->|"语义标签"|`——每条边必须带方向与语义(协议/行为),如「HTTPS:请求/响应」「SQL:读写」。**无标签的边会写入报告 warnings**(提醒,不阻断产出)。
- **不支持**:decision 菱形 `{}`、subgraph 嵌套超过两层、多个最外层 subgraph(多系统边界)、边界外独立泳道层 → 报「形态超限」错误降级。

### 传统泳道分层图(v2 兼容)

无嵌套 subgraph 时按 v2 规则:顶层 subgraph = 泳道(纵向分层、自上而下),无 subgraph 的节点归入默认泳道「其他」,无系统边界与外部实体。

## 布局规则

1. 页眉:标题(左上,加粗)+ 范围 · 版本(小字);图例(右上,自动按实际用到的类渲染:外部系统/组件容器/数据存储/系统边界/逻辑层)。
2. 外部实体:边界上方一行(左对齐,间距 40);外部 ↔ 内部边走顶部走廊带 + 右侧线廊(目标在顶层泳道时直接经顶部走廊入顶端口)。
3. 边界内:泳道纵向分层(声明序自上而下)、泳道内横向;相邻泳道边走水平总线;泳道内跳级走泳道上侧间隙走廊;跨多泳道走右侧线廊;外部实体长边与跨泳道边共享线廊列,按纵向跨度升序由内向外分配(嵌套跨度零交叉)。
4. 走廊 y 在候选集中搜索(顶部带/间隙上半部/间隙下半部),占用登记避免共线重叠;全部候选产生交叉 → 报「形态超限」。
5. 待确认项:底部左侧灰框(标题「待确认项」+ 逐行条目)。
6. 画布宽高按实际渲染内容计算:任何元素不越 viewBox(含图例、待确认项、边界框、边标签)。

## 输出 SVG 契约

- 根元素:`<svg data-archspec="3" viewBox="0 0 W H">`
- 节点:`<g class="node" id="arch-{id}" data-node="{id}">`
- 系统边界:`<g class="boundary" id="arch-boundary">` + `<text class="boundary-title">`
- 泳道:`<g class="lane" id="arch-lane-{i}">` + `<text class="lane-title">`(带左侧表头)
- 图例:`<g class="legend" id="arch-legend">`;待确认项:`<g class="todo" id="arch-todo">`

## 质检

统一 `--check` 报告字段(nodes/edges/crossings/overlaps/textOverflow/warnings/canvas)。
`crossings` / `overlaps` / `textOverflow` 任一非 0 即不合格:拒绝产出并降级。
泳道数 > 6、交叉无法消除、形态超限输入 → 报「形态超限」错误降级。

## 架构图评审验收映射(对齐 Codex AC)

引擎硬保证:AC-07(无连线穿越节点/文字、无裁切、无重叠标签——零交叉/零溢出/越界扫描)。引擎辅助:AC-04(无标签边 → warnings)、AC-01(title 指令承载系统名/图类型/视角)、AC-02(边界/外部/泳道样式可区分 + 自动图例)、AC-03(节点命名规范经 SKILL.md 指引)、AC-05(待确认项区承载未知项)。AC-06/AC-08 与部署图/IA 图区分属绘制方职责(见 SKILL.md 工作规则)。
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall