L3 = 一个上下文一张全景泳道(Visio 风格:行=角色·列=阶段·活动落格子);**L4 = 关键场景放大**(按需)。事件引用一律 E 编号(check.sh 校验)。图上文下:上半泳道图(PNG),下半节点×事件对齐表。
| 层 | 文件 | 给谁 |
|---|---|---|
| .drawio 源 | assets/L3-<context>-swimlane.drawio |
人编辑(draw.io 桌面版/网页版) |
| PNG 导出 | assets/L3-<context>-swimlane.png |
人看(嵌入 md) |
| 对齐表 | md 内 节点×事件对齐表 |
AI 读(结构化数据) |
## 泳道图(行=角色 · 列=阶段 · Visio 风格)

> **编辑源**:[L3-<context>-swimlane.drawio](../assets/L3-<context>-swimlane.drawio)
swimlane;horizontal=0;<!-- horizontal=0 → 标题在左侧竖条(Visio 风格·文字竖排) -->
<mxCell id="lane_pm" value="项目经理"
style="swimlane;horizontal=0;startSize=30;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=13;rounded=0;"
vertex="1" parent="1">
<mxGeometry x="120" y="50" width="1220" height="140" as="geometry" />
</mxCell>
horizontal=0 = 左侧竖条标题(**不是** horizontal=1 的顶部横条)startSize=30 = 左侧标题条宽度 30px<mxCell id="ph1" value="立项"
style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontStyle=1;fontSize=13;fontColor=#1656A8;"
vertex="1" parent="1">
<mxGeometry x="155" y="16" width="195" height="28" as="geometry" />
</mxCell>
<mxCell id="sep1" value=""
style="line;strokeWidth=1;dashed=1;strokeColor=#b8cceb;html=1;"
edge="1" parent="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="355" y="50" as="sourcePoint" />
<mxPoint x="355" y="550" as="targetPoint" />
</mxGeometry>
</mxCell>
<!-- parent=泳道ID,x 从 startSize(30) 起避开左侧标题条 -->
<mxCell id="pm_create" value="创建项目
环境三字段·文件空间·保留策略
[E201]"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=11;"
vertex="1" parent="lane_pm">
<mxGeometry x="45" y="25" width="170" height="80" as="geometry" />
</mxCell>
parent=泳道ID(lane_pm 等),坐标**相对于泳道**startSize+15 开始(即 ≥45),避开左侧标题条
(不是 \n)[E201] 方括号格式rhombus; + 黄色(#fff2cc)<mxCell id="e1" value="级联策略"
style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;strokeColor=#999999;fontSize=10;exitX=0.5;exitY=1;entryX=0.5;entryY=0;"
edge="1" parent="1" source="pm_create" target="sys_def_ver">
<mxGeometry relative="1" as="geometry" />
</mxCell>
parent="1"(画布级·不放在泳道内)<mxGeometry relative="1" as="geometry" /> 子元素DRAWIO="/Applications/draw.io.app/Contents/MacOS/draw.io"
"$DRAWIO" --export --format png --scale 2 --border 20 \
--output assets/L3-<context>-swimlane.png \
assets/L3-<context>-swimlane.drawio
--scale 2 = 2 倍分辨率(Retina 清晰)--border 20 = 四周留白 20px<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="drawio" version="26.0.0">
<diagram name="<上下文名>L3泳道" id="l3-<context>-swimlane">
<mxGraphModel dx="1420" dy="600" grid="1" gridSize="10" page="1" pageWidth="1400" pageHeight="600">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- 泳道×N(horizontal=0·左侧竖条) -->
<!-- 阶段列头×N(rounded=0·带底色) -->
<!-- 阶段分隔虚线×N-1 -->
<!-- 活动节点×N(parent=泳道ID·rounded=1) -->
<!-- 跨泳道边×N(parent=1·edge=1) -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
| 角色/阶段 | fillColor | strokeColor | fontColor |
|---|---|---|---|
| 项目经理 | #dae8fc | #6c8ebf | #1656A8 |
| 测试工程师 | #d5e8d4 | #82b366 | #2E7D32 |
| 系统 | #f5f5f5 | #666666 | #333333 |
| AI 网关 | #e1d5e7 | #9673a6 | #7B1FA2 |
| 归档/删除 | #ffe6cc | #d79b00 | #E65100 |
| 定时任务/保留 | #fce4ec | #e8849c | #C2185B |
| 决策/判断 | #fff2cc | #d6b656 | #F57F17 |
L3 放大某个场景/子流程(如 AI 生成、归档处置),同泳道结构(drawio 或 Mermaid 均可),粒度到活动/判断/系统动作。规则:每图必有"与 L3 的关系"一行;事件仍用 E 编号。
Mermaid 边语法约束不变(内联文本与 |标签| 不可混用;边不可指向泳道 subgraph ID),详见 check.sh lint。drawio 边无此限制(XML 坐标控制)。