network-flow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNetwork flow
网络流
Produce an interactive diagram using the bundled graph-driven renderer. Treat the
reference's visual language as inspiration; create original code and content.
Keep this file as the invocation entry point. Read the references below on demand;
leave README, CHANGELOG, and meta/MAINTAINERS for maintainers.
使用内置的图驱动渲染器生成交互式图表。以参考资料的视觉语言为灵感;创建原创代码和内容。
将此文件保留为调用入口。按需阅读以下参考资料;README、CHANGELOG 和 meta/MAINTAINERS 留给维护者。
Options and defaults
选项和默认值
Interpret followed by these options:
/network-flow [[ system description ]]| Option | Default | Contract |
|---|---|---|
| | Dark dotted grid, service cards, semantic flow colors. |
| | Route horizontal/vertical segments around cards. |
| Infer from the system | Ordered comma-separated scenario IDs; include |
| | Scripted explanatory animation; never imply measured traffic. |
| | Return one working downloadable HTML file, not code alone. |
The slash-command selects a format. The bundled CLI's
requires an actual path, such as . The bundled renderer
supports only the defaults above. Reject unsupported values clearly rather than
silently substituting. For measured traffic, read
references/telemetry.md and implement an explicitly
requested adapter separately; never label this simulated renderer as telemetry.
--output html--outputoutput/system-flow.html将 解释为后跟以下选项:
/network-flow [[ system description ]]| 选项 | 默认值 | 约定 |
|---|---|---|
| | 深色点状网格、服务卡片、语义化流动颜色。 |
| | 围绕卡片布置水平或垂直线段。 |
| 从系统推断 | 有序、逗号分隔的场景 ID;包含 |
| | 脚本化说明动画;绝不暗示这是实测流量。 |
| | 返回一个可工作的可下载 HTML 文件,而不只是代码。 |
斜杠命令 用于选择格式。内置 CLI 的 要求提供实际路径,例如 。内置渲染器仅支持上述默认值。对于不支持的值,应明确拒绝,而不是静默替换。如需实测流量,请阅读 references/telemetry.md,并单独实现明确要求的适配器;绝不将这个模拟渲染器标记为遥测。
--output html--outputoutput/system-flow.htmlWorkflow
工作流
-
Model the system. Extract components, directed connections, source/destination roles, meaningful scenarios, and failure/recovery branches. Infer routine presentation choices. Ask only if missing information changes system meaning. Identify assumptions and label fictional examples. Keep alternative failure outcomes explicit; do not depict both outcomes as one successful execution.
-
Write graph JSON. Read references/graph-schema.md. Reuse the shape in; replace its content for another system. Attach source provenance to evidence where relevant. Express simulated steps in order. Limit a diagram to 24 nodes; split larger systems into scoped diagrams.
assets/examples/rag/generated/rag.json -
Lay out and validate. Prefer curated wide/medium/narrow positions for complex graphs; use automatic row placement for small graphs. Read references/layout.md for geometry and limitations. Run. Correct invalid identifiers, endpoints, scenario scopes, and overlapping layout cells first.
python3 <skill-dir>/scripts/validate_graph.py <graph.json> -
Render the file. Run:sh
python3 <skill-dir>/scripts/render.py <graph.json> \ --theme dark-grid --routing orthogonal --mode simulated \ --output <output-dir>/system-flow.htmlPassonly when those scenario IDs exist. Work in the requested project/output directory; never edit the installed template to create a particular diagram. Do not overwrite unrelated files.--scenarios ingest,answer,retry,all -
Verify actual behavior. Check desktop and mobile browser renders, card text, attached orthogonal paths, moving packets, scenario captions, pause/resume, replay, node focus, keyboard clear, and reduced-motion behavior. Read references/verification.md and use the bundled browser check when available. Fix failures and rerun relevant checks. If browser verification is unavailable, disclose that limit; do not claim it passed.
-
Deliver completely. Provide the actualfile through the host's file mechanism and a concise description of controls. Show an interactive preview when supported. If the host needs an HTML fragment, extract the body after generating the standalone file, preserve its scoped CSS and scripts, and keep the downloadable document as the deliverable. Do not stop at a static image, Mermaid diagram, unexecuted source snippet, or promised attachment. Never claim a file is hosted or published unless that separate action succeeded.
.html
-
对系统建模。 提取组件、有向连接、源和目标角色、有意义的场景,以及失败和恢复分支。推断常规呈现方式。仅当缺失信息会改变系统含义时才进行询问。明确标识假设,并标注虚构示例。清晰呈现备选的失败结果;不要将两种结果都描绘为一次成功执行。
-
编写图 JSON。 阅读 references/graph-schema.md。沿用中的结构;为其他系统替换其中的内容。在相关证据中附加来源溯源信息。按顺序表达模拟步骤。单张图表最多包含 24 个节点;将更大的系统拆分为限定范围的图表。
assets/examples/rag/generated/rag.json -
布局并验证。 对于复杂图表,优先采用人工整理的宽、中、窄位置;对于小型图表,使用自动按行放置。阅读 references/layout.md 以了解几何规则和限制。运行:sh
python3 <skill-dir>/scripts/validate_graph.py <graph.json>首先修正无效标识符、端点、场景作用域和重叠的布局单元格。 -
渲染文件。 运行:sh
python3 <skill-dir>/scripts/render.py <graph.json> \ --theme dark-grid --routing orthogonal --mode simulated \ --output <output-dir>/system-flow.html仅当、ingest、answer和retry这些场景 ID 确实存在时,才传入all。在请求的项目或输出目录中工作;绝不通过编辑已安装的模板来创建特定图表。不要覆盖无关文件。--scenarios ingest,answer,retry,all -
验证实际行为。 检查桌面端和移动端浏览器渲染、卡片文本、连接正确的正交路径、移动数据包、场景说明、暂停和继续、重新播放、节点聚焦、键盘清除操作,以及减少动态效果时的行为。阅读 references/verification.md,并在可用时使用内置浏览器检查。修复失败项并重新运行相关检查。如果无法进行浏览器验证,应明确说明这一限制;不要声称验证已经通过。
-
完整交付。 通过宿主的文件机制提供实际的文件,并简要说明操作控件。在支持时展示交互式预览。如果宿主需要 HTML 片段,请在生成独立文件后提取 body,保留其限定作用域的 CSS 和脚本,并将可下载文档作为交付物。不要止步于静态图片、Mermaid 图表、未执行的源代码片段,或仅承诺提供但未实际交付的附件。除非单独执行的发布操作确实成功,否则绝不声称文件已托管或发布。
.html
Runtime behavior
运行时行为
- Keep layout stable while changing scenarios; emphasize active edges and nodes.
- Render HTML buttons above an SVG wire layer. Animate packets along actual paths at a consistent speed; keep a thin stationary track visible.
- Select a node to trace immediate incoming/outgoing edges within the active scenario. Select it again or press Escape to clear focus.
- Provide pause/resume and replay. Honor reduced motion without hiding topology.
- Resize and reroute without shrinking labels into unreadable miniature cards.
- Preserve graph text as text, not executable HTML. Keep generated files offline and free of external dependencies by default.
- 切换场景时保持布局稳定;突出显示活动边和节点。
- 在 SVG 连线层上方渲染 HTML 按钮。以一致的速度沿实际路径动画展示数据包;同时保持一条细的静止轨迹可见。
- 选择一个节点,以追踪当前场景中与其直接相连的传入和传出边。再次选择该节点或按 Escape 可清除焦点。
- 提供暂停、继续和重新播放功能。遵循减少动态效果的设置,但不隐藏拓扑结构。
- 调整尺寸并重新布线时,不要将标签缩小成难以阅读的微型卡片。
- 将图中的文本保留为文本,而不是可执行 HTML。默认确保生成的文件可离线使用,且不依赖外部依赖。
Bundled example
内置示例
assets/examples/rag/generated/rag.jsonrag.htmlFor the original delivered visual and its exact invocation, use
and . These are a preserved
example pair; remains the editable renderer fixture.
assets/examples/rag/original/rag_demo.htmlrag_prompt.mdassets/examples/rag/generated/rag.jsonThe design reference is the interactive architecture graphic in
Vercel's Python announcement.
No Vercel source code, logos, or branded assets are bundled.
assets/examples/rag/generated/rag.jsonrag.html对于最初交付的可视化效果及其精确调用方式,请使用 和 。这是一组保留的示例; 仍是可编辑的渲染器测试夹具。
assets/examples/rag/original/rag_demo.htmlrag_prompt.mdassets/examples/rag/generated/rag.json设计参考是 Vercel 的 Python 发布公告中的交互式架构图。未内置任何 Vercel 源代码、Logo 或品牌资产。