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-v2.md

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

flow-canvas 多图类型引擎 · 架构图(分层/泳道)排版契约。v2 相对 v1 的破坏性变更:泳道改为**纵向分层**(自下而上的层级习惯:声明序自上而下,底层基础设施放下方),泳道内节点横向排列;跳级边走廊改为泳道间隙/右侧线廊;画布按实际渲染范围计算(v1 最右泳道带溢出画布右侧的缺陷已根除)。

## 输入:mermaid 子集

flowchart TD + subgraph 泳道(与 v1 相同):

```
flowchart TD
subgraph 接入层
  A["负载均衡"]
  B["网关"]
end
subgraph 应用层
  C["用户服务"]
  D["订单服务"]
end
subgraph 数据层
  F[["数据库"]]
end
A --> C
B --> D
C --> F
```

- 节点:`A["文本"]` 矩形、`A[["文本"]]` 外部系统(虚线)、`A("文本")` 圆角矩形;`<br>` 换行;`class X,Y external|backend` 标类型(backend 灰底双线)。
- subgraph:`subgraph 标题` … `end`;节点按 subgraph 归组;无 subgraph 的节点归入默认泳道「其他」。
- 边:`-->` / `-.->`,带 `|label|` 标签。
- **不支持**:decision 菱形 `{}` → 报「形态超限」错误降级,不产图。

## 布局规则

1. **泳道纵向分层**:泳道 = subgraph,自上而下按声明序堆叠(惯例:接入/应用在上、数据/基础设施在下);泳道内节点横向排列(左→右按声明序),行高 = 泳道内最高节点 + 边距;泳道带左侧为泳道标题(表头列)。
2. **泳道内相邻边**:两节点相向侧边中点直线连接;相邻对间隙 = max(30, 边标签宽 + 16)。
3. **相邻泳道边**:走泳道间水平总线(间隙中线):源底端口垂直入线 → 总线水平段 → 目标顶端口垂直入(目标在上则反向走顶端口);同端口多边错位 ±8px。
4. **跳级边**:
   - 泳道内跳级:走泳道上侧间隙走廊(顶部泳道走顶部空白带);垂直段从两节点顶端口引出,走廊 y 在间隙上半部或下半部的候选集中搜索,取零交叉者。
   - 跨多泳道跳级:走右侧线廊——源/目标底端口先垂直入各自下方间隙(候选 y 同上搜索),水平引出到线廊列,线廊垂直连接两间隙;线廊列按纵向跨度升序由内向外分配(嵌套跨度零交叉)。
   - 候选走廊 y 全部产生交叉 → 报「形态超限」错误降级。
5. **画布范围**:宽高按实际渲染内容计算(节点、泳道带、线廊、边标签均不越界);质检保证无元素落在 viewBox 之外。

## 输出 SVG 契约

- 根元素:`<svg data-archspec="2" viewBox="0 0 W H">`
- 节点:`<g class="node" id="arch-{id}" data-node="{id}">`
- 泳道:`<g class="lane" id="arch-lane-{i}">` 含横向背景带与 `<text class="lane-title">`(泳道带左侧)

## 质检

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