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/flowspec-v1.md

View on GitHub
# flowspec/1 契约

flow-canvas 的中间格式与产物契约。下游(如 flow-walkthrough)只依赖本契约,不依赖布局器实现。契约破坏性变更时主版本 +1。

## 输入:flowspec JSON

```json
{
  "spec": "flowspec/1",
  "title": "可选标题",
  "start": "A",
  "nodes": [
    { "id": "A",  "type": "process",  "label": ["进入寄养频道"] },
    { "id": "B",  "type": "decision", "label": ["是否登录?"] },
    { "id": "I2", "type": "external", "label": ["支付平台 · 收银台"] },
    { "id": "G",  "type": "backend",  "label": ["门店接单后台"] }
  ],
  "edges": [
    { "from": "A", "to": "B", "label": [] },
    { "from": "B", "to": "C", "label": ["是"] }
  ]
}
```

- `type`:`process` 实线框(本产品页面/状态)|`decision` 扁菱形(判断,不可点)|`external` 虚线框(外部系统/已有页面)|`backend` 双边线灰底(后台/非前端环节)
- `label` / 边 `label`:字符串数组,一项一行;禁止 emoji
- `start` 可省略:布局器按"声明序首节点标回边 → DAG 入度 0 且非后台类型的最靠前节点"推断
- 判断节点出边应带"是/否"类标签——主干选择的第一判据是标签语义(是/通过/有效/已绑定 等为主干方向)

## 等价 mermaid 子集

`A["文本"]`=process;`A{"文本"}`=decision;`A[["文本"]]`=backend;`class I2,L external` / `class G,M backend` 标注类型;`-->|label|` 边;`<br>` 换行;label 含"(外部)"自动识别为 external。

## 输出:SVG 结构契约

- 根元素:`<svg id="flowsvg" data-flowspec="1" viewBox="0 0 W H">`
- 可交互节点:`<g class="node" id="flowchart-{id}-{n}" data-node="{id}">`;判断节点无 `data-node`
- 选中框:`<rect id="sel-ring" visibility="hidden"/>`(下游按目标节点 `getBBox()` 外扩 7px 定位)
- 交叉检测:布局报告 JSON 的 `crossings` 为 0 是合格产物的必要条件

## 布局规则(无 python3 时的手工降级依据)

1. 主干节点排纵向主列;判断菱形扁形(宽约为高的 3 倍)
2. 判断出线端口:主干方向走底部顶点垂直出线;分支走右侧水平顶点,分支首节点与判断垂直居中(水平直线)
3. 分支链沿右列垂直向下;汇回主干时——目标为判断节点:T 形汇入主干线段(无箭头);目标为普通节点:进右侧端口
4. 回边走最右侧通道,90 度折线,入目标右侧端口;同一节点多入口错位 ±9px(前向汇入在上、回边在下)
5. 无入边旁路源节点排左列,与目标水平对齐直线接入
6. 主干跳级边(首尾都在主干、非相邻的前向边):目标为判断节点时走右侧前向通道(回边通道外侧)T 形汇入目标顶部上方;其余走左侧远端通道进目标左端口
7. 分支链可指定放左列(与右链镜像):从锚点左侧出线,链沿左列向下,经左侧远端通道汇入目标左端口;多条左侧通道按目标深度分配(越深越靠外)
8. 线与线不得交叉
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