illustrate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Illustrate

插图绘制

Create visual illustrations as self-contained HTML files with inline SVG and CSS. Use the editorial system by default, or the technical-color family when the user wants its colored component/step grammar or built-in browser export toolbar.
Twenty-seven diagram types. One shared design system, complexity budget, and taste gate. Type-specific conventions live in
references/
and are loaded only when you pick a type.

创建包含内嵌SVG和CSS的独立HTML文件格式的视觉插图。默认使用编辑风格系统,当用户需要彩色组件/步骤语法或内置浏览器导出工具栏时,可切换为技术色彩体系。
支持27种图表类型,共享一套设计系统、复杂度预算和风格规范。每种类型的专属约定存储在
references/
目录下,仅在选择对应类型时加载。

0. Project theme gate

0. 项目主题配置

Before generating a diagram, resolve the project theme from
.github/illustration-theme.yml
:
bash
python scripts/illustration_theme.py --project-root . resolve --format yaml
If the file is missing, initialize it before drawing. In an interactive conversation, ask the user to choose Cobalt Porcelain (recommended and default), Emerald Mist, Sanduq Classic, or a custom theme, then choose light/dark mode and font loading. In non-interactive automation, create
cobalt/light
deterministically:
bash
python scripts/illustration_theme.py --project-root . init --non-interactive
The initializer writes the tracked project policy to
.github/illustration-theme.yml
. Never modify the skill's bundled style guide to customize one consumer project. On every generation, apply the resolved
colors
and
typography
values to the selected template, including SVG text elements and arrow markers. Literal colors and fonts in examples are structural samples only; project tokens win.
For preset selection, custom light/dark themes, local/remote/system font policies, or design-system extraction, load
references/theme-initialization.md
. For URL, installed-skill, and folder extraction, also load
references/onboarding.md
.

生成图表前,需从
.github/illustration-theme.yml
文件解析项目主题:
bash
python scripts/illustration_theme.py --project-root . resolve --format yaml
若该文件缺失,需先初始化主题再绘制图表。在交互式对话中,需询问用户选择钴蓝瓷白(Cobalt Porcelain,推荐默认)翡翠雾绿(Emerald Mist)、**经典沙杜克(Sanduq Classic)**或自定义主题,然后选择明暗模式和字体加载方式。在非交互式自动化场景中,将确定性创建
cobalt/light
主题:
bash
python scripts/illustration_theme.py --project-root . init --non-interactive
初始化工具会将项目的主题策略写入
.github/illustration-theme.yml
文件。请勿修改工具自带的样式指南来定制单个项目。每次生成图表时,需将解析得到的
colors
typography
值应用到所选模板,包括SVG文本元素和箭头标记。示例中的字面颜色和字体仅为结构示例,项目配置的主题令牌优先级更高。
如需选择预设主题、自定义明暗主题、本地/远程/系统字体策略或提取设计系统,请加载
references/theme-initialization.md
。如需通过URL、已安装工具或文件夹进行品牌适配,还需加载
references/onboarding.md

1. Philosophy

1. 设计理念

The highest-quality move is usually deletion.
From
.impeccable.md
: "Confident restraint. Earn every element. One color accent, two families, a small spacing vocabulary. If removing it wouldn't hurt the page, remove it."
Applied to schematics:
  • Every node represents a distinct idea. Two nodes that always travel together are one node.
  • Every connection carries information. If the relationship is obvious from layout, remove the line.
  • The active accent is editorial, not a flag. Use it on 1–2 focal nodes per diagram. Using it on 5 nodes erases the signal.
  • The schematic isn't done when everything is added. It's done when nothing can be removed.
Target density: 4/10. Enough to be technically complete. Not so dense it needs a guide. Above 9 nodes, it's probably two diagrams.

最优的设计往往是做减法。
摘自
.impeccable.md
"自信地克制。让每个元素都有存在的价值。一种强调色、两类字体、少量间距规则。如果移除某个元素不会影响页面理解,那就删掉它。"
该理念应用于示意图绘制:
  • 每个节点代表一个独立的概念。始终关联在一起的两个节点应合并为一个。
  • 每条连线都承载信息。若节点间的关系可通过布局直观体现,则移除连线。
  • 活跃强调色是编辑性的,而非标识性的。每张图表仅用于突出1-2个核心节点。若用于5个节点,会完全失去信号意义。
  • 示意图完成的标志不是添加了所有元素,而是无法再移除任何元素。
目标密度:4/10。既要保证技术完整性,又不至于复杂到需要额外说明。节点超过9个时,应拆分为两张图表。

2. When to Use

2. 使用场景

Use for any of the 27 diagram types (§3) when a reader will learn more from a visual than from prose, a table, or a bulleted list.
Choose the visual family before drawing:
  • Editorial for restrained documentation, product, data, and quantitative visuals across all types.
  • Technical-color architecture for cloud, infrastructure, network, security, and topology maps; this is the merged former
    architecture-diagram
    skill.
  • Technical-color process flow for numbered workflows, approvals, automation, onboarding, and runbooks; this is the merged former
    process-flow-diagram
    skill.
Don't use for:
  • Quick unicode diagrams → use wiretext.
  • Lists of things → table or bullets.
  • Simple before/after → table.
  • One-shape "diagrams" → just write the sentence.
Before drawing, ask: Would the reader learn more from this than from a well-written paragraph? If no, don't draw.

当读者通过可视化内容比通过 prose、表格或项目符号列表能获取更多信息时,可使用27种图表类型中的任意一种(详见第3节)。
绘制前需选择视觉体系:
  • 编辑风格:适用于各类克制风格的文档、产品、数据及量化可视化内容。
  • 技术色彩架构风格:适用于云、基础设施、网络、安全及拓扑图绘制;该风格整合了原有的
    architecture-diagram
    工具能力。
  • 技术色彩流程风格:适用于编号工作流、审批流程、自动化流程、入职流程及操作手册绘制;该风格整合了原有的
    process-flow-diagram
    工具能力。
请勿用于以下场景:
  • 快速绘制unicode图表 → 使用wiretext工具。
  • 事物列表 → 使用表格或项目符号。
  • 简单的前后对比 → 使用表格。
  • 单一形状的"图表" → 直接用文字描述即可。
绘制前请自问:*读者从这张图表中获取的信息会比从一段优质文字中更多吗?*如果答案是否定的,就不要绘制。

3. Diagram Types

3. 图表类型

Selection guide

选型指南

If you're showing…UseReference
Components + connections in a systemArchitecturetype-architecture.md
Legacy IT landscape grouped by phase/department; documents the before state in modernization proposalsIT current-statetype-it-state.md
Decision logic with branchesFlowcharttype-flowchart.md
Time-ordered messages between actorsSequencetype-sequence.md
States + transitions + guardsState machinetype-state.md
Entities + fields + relationshipsER / data modeltype-er.md
Events positioned in timeTimelinetype-timeline.md
Cross-functional process with handoffsSwimlanetype-swimlane.md
Two-axis positioning / prioritizationQuadranttype-quadrant.md
Multiple entities scored across 3–5 quantitative criteriaRadar / Spidertype-radar.md
Reinforcing cycle / flywheel where the last step feeds the first and a shared hub accumulates stateLooptype-loop.md
Hierarchy through containment / scopeNestedtype-nested.md
Parent → children relationshipsTreetype-tree.md
Human/agent/team ownership, reporting, routing, escalationOrg charttype-org-chart.md
Stacked abstraction levelsLayer stacktype-layers.md
Overlap between setsVenntype-venn.md
Ranked hierarchy or conversion drop-offPyramid / funneltype-pyramid.md
Quantitative comparison across categoriesBar charttype-bar.md
Continuous trends over timeLine charttype-line.md
Tasks and phases on a timelineGantttype-gantt.md
Distribution and correlation between two variablesScatter plottype-scatter.md
End-to-end data stack on a container clusterHigh-Leveltype-high-level.md
Multi-actor sequential process with data handoffsProcesstype-process.md
Multi-tier data storage with quality levels and access policiesMedalliontype-medallion.md
Role-scoped data flow: who does what at each pipeline stepData flowtype-data-flow.md
Integration topology of a data platform — sources → core → consumersDP integrationtype-dp-integration.md
Per-role / per-component access permissions matrixDP security matrixtype-dp-security-matrix.md
Rules of thumb:
  • If a 3-column table communicates the same thing, pick the table.
  • If you're combining two types, pick the dominant axis — don't hybridize grammars.
  • If you're past the complexity budget (§7), split into an overview + detail.
Always load the relevant
references/type-*.md
before drawing
— it contains layout conventions, anti-patterns, and example files for that type.

若要展示…使用图表类型参考文档
系统中的组件及连接关系架构图type-architecture.md
按阶段/部门分组的遗留IT架构;用于现代化方案中的"现状"展示IT当前状态图type-it-state.md
包含分支的决策逻辑流程图type-flowchart.md
参与者间按时间顺序传递的消息序列图type-sequence.md
状态、转换及守卫条件状态机图type-state.md
实体、字段及关系ER/数据模型图type-er.md
按时间排列的事件时间线图type-timeline.md
包含角色交接的跨职能流程泳道图type-swimlane.md
双轴定位/优先级划分四象限图type-quadrant.md
多个实体在3-5个量化维度上的评分雷达图/蜘蛛图type-radar.md
强化循环/飞轮(最后一步反馈到第一步,共享核心积累状态)循环图type-loop.md
通过包含关系/范围体现层级嵌套图type-nested.md
父→子关系树形图type-tree.md
人员/Agent/团队的归属、汇报、路由及升级流程组织结构图type-org-chart.md
堆叠的抽象层级分层图type-layers.md
集合间的重叠关系维恩图type-venn.md
排名层级或转化漏斗金字塔图/漏斗图type-pyramid.md
跨类别的量化对比柱状图type-bar.md
随时间变化的连续趋势折线图type-line.md
时间线上的任务及阶段甘特图type-gantt.md
两个变量间的分布及相关性散点图type-scatter.md
容器集群上的端到端数据栈高层架构图type-high-level.md
包含数据交接的多角色顺序流程流程示意图type-process.md
包含质量等级及访问策略的多层数据存储数据勋章图type-medallion.md
角色权限范围内的数据流:每个管道步骤的执行者及操作数据流图type-data-flow.md
数据平台的集成拓扑:数据源→核心→消费者数据平台集成图type-dp-integration.md
按角色/组件划分的访问权限矩阵数据平台安全矩阵图type-dp-security-matrix.md
选型经验法则:
  • 若3列表格可以传达相同信息,优先选择表格。
  • 若需要合并两种图表类型,选择主导维度——不要混合语法。
  • 若超出复杂度预算(详见第7节),拆分为概览图+细节图。
绘制前务必加载对应的
references/type-*.md
文档
——其中包含该类型图表的布局规范、反模式及示例文件。

4. Universal Anti-patterns

4. 通用反模式

These mark "AI slop" schematics of any type:
Anti-patternWhy it fails
Dark mode + cyan/purple glowLooks "technical" without design decisions
JetBrains Mono as blanket "dev" font in editorial outputMono is for technical content in the editorial family. The technical-color family intentionally uses JetBrains Mono throughout.
Identical boxes for every nodeErases hierarchy
Legend floating inside the diagram areaCollides with nodes
Arrow labels with no masking rectBleeds through the line
Vertical
writing-mode
text on arrows
Unreadable
3 equal-width summary cards as defaultGeneric grid — vary widths
Shadow on any elementShadows are out. Borders are in.
rounded-2xl
on boxes
Max radius 6–10px or none
Coral on every "important" nodeCoral is 1–2 editorial accents, not a signaling system
Diagonal / slanted connectors between off-axis nodesRounded right-angle (orthogonal) elbows are mandatory — see §6 Mandatory connector rules
Arrow label sitting on or touching its connectorLabel must have a 6–10px gap above the line so the connector stays visible
Two connectors overlapping or running on the same pathEach connection must be independently traceable — bridge crossings, offset parallels
Two connectors sharing a single attach point on a boxFan attach points along the edge (≥12px apart) so every arrow is clearly distinct — see §6 rule 4
Connector routed behind a non-endpoint box without needReroute around intervening boxes; the dashed-transit exception (§6 rule 5) only applies when an unavoidable intervening box sits on the direct path
Type-specific anti-patterns live in each
references/type-*.md
.

以下是各类"AI劣质"示意图的典型特征:
反模式问题所在
深色模式+青/紫色光晕看起来"技术感"十足,但缺乏实际设计决策
编辑风格输出中全面使用JetBrains Mono作为"开发"字体等宽字体仅适用于编辑风格体系中的技术内容。技术色彩体系则全程使用JetBrains Mono。
所有节点使用相同样式的方框抹除了层级关系
图例悬浮在图表区域内会与节点发生重叠
箭头标签无遮罩矩形文字会穿透连线
箭头使用垂直
writing-mode
文本
难以阅读
默认使用3个等宽摘要卡片通用网格布局——应调整宽度
元素添加阴影阴影已过时,应使用边框
方框使用
rounded-2xl
圆角
最大圆角为6-10px,或无圆角
所有"重要"节点使用珊瑚色珊瑚色仅作为1-2个编辑性强调色,而非标识系统
非轴对齐节点间使用斜线/倾斜连线必须使用圆角直角(正交)弯头——详见第6节强制连线规则
箭头标签位于或接触连线上标签与连线间需保留6-10px的间隙,确保连线可见
两条连线重叠或走同一路径每条连线必须可独立追踪——交叉处使用桥接,平行连线需偏移
两条连线共用方框上的同一个连接点连接点需沿边缘分散排列(间距≥12px),确保每条箭头清晰可辨——详见第6节规则4
连线无必要地从非端点方框后方穿过默认应绕开中间方框;仅当不可避免的中间方框位于直接路径上时,才可使用虚线穿越例外(第6节规则5)
各类型图表的专属反模式存储在对应的
references/type-*.md
文档中。

5. Design System

5. 设计系统

The design system is skinnable per project. Built-in theme definitions live in
assets/illustration-themes.yml
, and the active project selection lives in
.github/illustration-theme.yml
.
references/style-guide.md
defines the semantic roles (
paper
,
ink
,
muted
,
accent
,
link
, typography, and spacing). The default is Cobalt Porcelain light. Emerald Mist and the former Sanduq Classic palette remain selectable, and project files may define custom light and dark palettes plus font families.
When specs or type references mention a semantic role, use the current resolver output. Resolved project tokens override every literal color or font shown in a historical example.
设计系统可按项目定制。内置主题定义存储在
assets/illustration-themes.yml
,当前项目的主题选择存储在
.github/illustration-theme.yml
references/style-guide.md
定义了语义角色(
paper
ink
muted
accent
link
、排版及间距)。默认主题为钴蓝瓷白浅色。翡翠雾绿及原经典沙杜克调色板仍可选,项目文件也可定义自定义明暗调色板及字体族。
当规范或类型参考文档提及语义角色时,请使用当前解析后的输出值。解析后的项目令牌优先级高于历史示例中的所有字面颜色或字体。

Semantic roles (at a glance)

语义角色概览

RolePurpose
paper
,
paper-2
Page bg and container bg
ink
Primary text / stroke
muted
,
soft
Secondary text, default arrows, sublabels
rule
,
rule-solid
Hairline borders
accent
,
accent-tint
1–2 focal elements per diagram
link
HTTP/API calls, external arrows
Focal rule:
accent
goes on 1–2 elements max. Everything else is
ink
/
muted
/
soft
. If you're tempted to accent 4 things, you haven't decided what's focal yet.
角色用途
paper
,
paper-2
页面背景及容器背景
ink
主文本/描边
muted
,
soft
次要文本、默认箭头、子标签
rule
,
rule-solid
细边框
accent
,
accent-tint
每张图表最多1-2个核心元素
link
HTTP/API调用、外部箭头
核心规则:
accent
最多用于1-2个元素。其余元素均使用
ink
/
muted
/
soft
。若你想强调4个元素,说明还未确定核心内容。

Node type → treatment

节点类型→样式处理

TypeFillStroke
Focal (1–2 max)
accent-tint
accent
Backend / API / Stepwhite
ink
Store / State
ink @ 0.05
muted
External / Cloud
ink @ 0.03
ink @ 0.30
Input / User
muted @ 0.10
soft
Optional / Async
ink @ 0.02
ink @ 0.20
dashed
4,3
Security / Boundary
accent @ 0.05
accent @ 0.50
dashed
4,4
类型填充色描边色
核心节点(最多1-2个)
accent-tint
accent
后端/API/步骤白色
ink
存储/状态
ink @ 0.05
muted
外部/云端
ink @ 0.03
ink @ 0.30
输入/用户
muted @ 0.10
soft
可选/异步
ink @ 0.02
ink @ 0.20
虚线
4,3
安全/边界
accent @ 0.05
accent @ 0.50
虚线
4,4

Typography (summary — full spec in style-guide.md)

排版(摘要——完整规范见style-guide.md)

  • Title — resolved
    serif
    , 1.75rem, 400 — H1 only
  • Node name — resolved
    sans
    , 12px, 600 — human-readable labels
  • Sublabel — resolved
    mono
    , 9px — ports, URLs, field types
  • Eyebrow / tag — resolved
    mono
    , 7–8px, uppercase, tracked — type tags, axis labels
  • Arrow label — resolved
    mono
    , 8px — annotation on arrows
  • Editorial aside — resolved
    serif
    italic, 14px — callouts only
Mono is for technical content. Names use the active sans family. Titles and callouts use the active serif family. Load
remote_css_url
only when
font_loading
resolves to
remote
; otherwise use the tracked stacks with locally installed or system fallbacks. Built-in stacks include Arabic fallbacks so mixed English/Arabic labels remain readable.

  • 标题 — 解析后的
    serif
    字体,1.75rem,400字重 — 仅用于H1
  • 节点名称 — 解析后的
    sans
    字体,12px,600字重 — 便于阅读的标签
  • 子标签 — 解析后的
    mono
    字体,9px — 端口、URL、字段类型
  • 眉栏/标签 — 解析后的
    mono
    字体,7-8px,大写,字间距增大 — 类型标签、轴标签
  • 箭头标签 — 解析后的
    mono
    字体,8px — 箭头注释
  • 编辑旁白 — 解析后的
    serif
    斜体,14px — 仅用于标注
等宽字体仅用于技术内容。节点名称使用当前的无衬线字体族。标题和标注使用当前的衬线字体族。仅当
font_loading
解析为
remote
时加载
remote_css_url
;否则使用本地安装或系统 fallback 的字体栈。内置字体栈包含阿拉伯语 fallback,确保英/阿混合标签仍可读。

6. Core SVG Primitives

6. 核心SVG基元

Universal building blocks. Type-specialized primitives (lifeline, activation bar, region) live in the relevant
references/type-*.md
. Optional primitives:
  • Editorial callouts → primitive-annotation.md
  • Hand-drawn variant → primitive-sketchy.md
  • Icon set (laptop, server, DB, K8s, Docker, AWS, …) → primitive-icons.md. Browse the gallery at
    assets/icons.html
    .
  • Terminal / CLI-window variant → primitive-terminal.md
  • Merged Architecture Diagram family, templates, and examples → technical-color-architecture.md
  • Merged Process Flow Diagram family, templates, and examples → technical-color-process-flow.md
通用构建块。各类型专属基元(生命线、激活条、区域)存储在对应的
references/type-*.md
文档中。可选基元:
  • 编辑标注 → primitive-annotation.md
  • 手绘变体 → primitive-sketchy.md
  • 图标集(笔记本电脑、服务器、数据库、K8s、Docker、AWS等)→ primitive-icons.md。可在
    assets/icons.html
    浏览图标库。
  • 终端/CLI窗口变体 → primitive-terminal.md
  • 整合的架构图体系、模板及示例 → technical-color-architecture.md
  • 整合的流程图体系、模板及示例 → technical-color-process-flow.md

Background

背景

Default: clean paper, no dot pattern. Single
<rect>
filled with
paper
. Don't wrap the diagram in a secondary container background — the diagram sits directly on the page.
svg
<rect width="100%" height="100%" fill="#f6f8fc"/>
Optional: dotted paper variant. When a long-form editorial diagram benefits from textured ground (essays, hero diagrams on a dedicated page), opt in by adding the
dots
pattern and a second rect:
svg
<defs>
  <pattern id="dots" width="22" height="22" patternUnits="userSpaceOnUse">
    <circle cx="1" cy="1" r="0.9" fill="rgba(45,49,66,0.10)"/>
  </pattern>
</defs>
<rect width="100%" height="100%" fill="#f6f8fc"/>
<rect width="100%" height="100%" fill="url(#dots)" opacity="0.6"/>
Don't use the dot pattern when the diagram sits inside a product page, slide, or card — the texture compounds with surrounding chrome and reads as noise.
默认:纯色背景,无点阵图案。单个
<rect>
元素填充
paper
颜色。请勿将图表包裹在二级容器背景中——图表直接放置在页面背景上。
svg
<rect width="100%" height="100%" fill="#f6f8fc"/>
可选:点阵背景变体。当长篇编辑图表需要纹理背景时(如文章、专属页面的核心图表),可通过添加
dots
图案和第二个矩形启用:
svg
<defs>
  <pattern id="dots" width="22" height="22" patternUnits="userSpaceOnUse">
    <circle cx="1" cy="1" r="0.9" fill="rgba(45,49,66,0.10)"/>
  </pattern>
</defs>
<rect width="100%" height="100%" fill="#f6f8fc"/>
<rect width="100%" height="100%" fill="url(#dots)" opacity="0.6"/>
当图表位于产品页面、幻灯片或卡片内时,请勿使用点阵图案——纹理会与周围元素冲突,产生噪点感。

Arrow markers (define all three, always)

箭头标记(始终定义全部三种)

svg
<marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
  <polygon points="0 0, 8 3, 0 6" fill="#4f6078"/>
</marker>
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
  <polygon points="0 0, 8 3, 0 6" fill="#2563eb"/>
</marker>
<marker id="arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
  <polygon points="0 0, 8 3, 0 6" fill="#1d4ed8"/>
</marker>
ArrowStrokeWhen
Defaultmuted
#4f6078
Internal, generic
Accentcobalt
#2563eb
Primary / highlighted / headline
Link-blue
#1d4ed8
HTTP/API calls, external systems
Dashed
stroke-dasharray="5,4"
+ any color
Optional, passive, return, async
Draw arrows before boxes so z-order puts lines behind nodes.
svg
<marker id="arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
  <polygon points="0 0, 8 3, 0 6" fill="#4f6078"/>
</marker>
<marker id="arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
  <polygon points="0 0, 8 3, 0 6" fill="#2563eb"/>
</marker>
<marker id="arrow-link" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto">
  <polygon points="0 0, 8 3, 0 6" fill="#1d4ed8"/>
</marker>
箭头类型描边色使用场景
默认muted
#4f6078
内部、通用场景
强调钴蓝
#2563eb
核心/高亮/标题场景
链接蓝
#1d4ed8
HTTP/API调用、外部系统
虚线
stroke-dasharray="5,4"
+ 任意颜色
可选、被动、返回、异步场景
先绘制箭头,再绘制方框,确保连线位于节点后方。

Mandatory connector rules

强制连线规则

These five rules are non-negotiable. Run the pre-output checklist (§9) to verify before producing any diagram.
  1. Rounded right-angle (orthogonal) connectors are mandatory. Never use diagonal
    <line>
    or straight slanted paths between nodes that don't share an x or y axis. Every bend must be a quarter-arc with
    r=8
    (or
    r=6
    minimum for tight layouts). See
    references/type-architecture.md
    for the elbow-path formula. Reserve plain straight
    <line>
    only for connections whose endpoints share the same x or y coordinate. Diagonal connectors are an automatic fail.
  2. Label-to-connector margin: 6–10px gap, always. A label must never sit on its arrow — the connector must remain visible. Place the label centered above (or beside, for vertical segments) the line with a minimum 6px gap between the bottom of the label's mask rect and the connector stroke. The opaque mask rect prevents the arrow from bleeding through, but the visible gap between mask edge and line preserves the reader's ability to trace the connection. If the label is large enough that 6px feels cramped, push it to 8–10px. Never let the mask rect touch or overlap the stroke.
  3. No overlapping connectors. Two connectors must never share the same stroke path, run parallel on top of each other, or be drawn on top of each other for any segment. When two orthogonal arrows must cross at a single point, apply the bridge / hop primitive (see
    references/type-architecture.md
    § Crossing arrows). When two arrows naturally want to overlap, offset their routing by ≥12px so each line is independently traceable. If you find yourself stacking connectors, redesign the layout — it means two nodes are too close, or the diagram is over budget (split into overview + detail).
  4. Shared edge → fan the attach points. When two or more connectors enter or exit the same edge of a box, each must have its own distinct attach point along that edge — no two connectors may share a single point on a box. Spread the attach points evenly along the edge with ≥12px between adjacent points (8px minimum for very small boxes). Routing rules:
    • For N connectors on an edge of length L, attach point
      k
      (1..N) sits at offset
      L * k / (N + 1)
      from the edge's leading corner.
    • When the connectors fan out to destinations on different sides, route each one orthogonally from its own attach point — no merging strokes near the box.
    • When two parallel connectors run in the same direction, keep them ≥12px apart along their entire length, not just at the attach point. Each arrow must remain independently traceable end-to-end.
    No connector may hide another. If you can't tell two arrows apart at a glance, the layout has failed.
  5. A connector must not pass behind a box that isn't its source or destination — except when the box is geometrically unavoidable on a direct orthogonal path. Reroute around intervening boxes by default. The only legitimate exception is when a cross-cutting node (e.g., a footer service, a horizontal layer bar) physically sits between the connector's source and destination on the only straight path between them — for example, a
    METRICS
    arrow exiting an
    Observability
    footer bar and rising into a zone above must cross the
    Active Directory
    footer bar that sits between them. In that exception:
    • The stroke must be dashed (e.g.,
      stroke-dasharray="4,3"
      ) to signal "transit, not interaction" — it tells the reader the intervening box is not an endpoint.
    • The label sits at the visible end of the connector (typically near the source) so it doesn't fall behind the intervening box.
    • No marker (arrowhead) may land on the intervening box's edge — the marker resolves at the true destination only.
    When in doubt, reroute. The exception exists for the narrow case where rerouting is geometrically impossible, not as a shortcut to avoid layout work.
以下五条规则不可协商。生成任何图表前,需运行第9节的输出前检查清单进行验证。
  1. 必须使用圆角直角(正交)连线。非轴对齐节点间绝不能使用斜线
    <line>
    或直线路径。每个弯折处必须是半径为8px的四分之一圆弧(紧凑布局时最小为6px)。详见
    references/type-architecture.md
    中的弯头路径公式。仅当端点共享同一x或y坐标时,才可使用纯直
    <line>
    。斜线连线直接判定为不合格。
  2. 标签与连线间必须保留6-10px间隙。标签绝不能位于箭头上——必须保证连线可见。标签需居中放置在连线上方(垂直线段则放在侧边),且遮罩矩形底部与连线描边间需保留至少6px的间隙。不透明遮罩矩形可防止箭头穿透文字,但遮罩边缘与连线间的可见间隙可保证读者能追踪连线。若标签较大,6px间隙显得拥挤,可调整为8-10px。绝不能让遮罩矩形接触或重叠描边。
  3. 禁止连线重叠。两条连线绝不能共享同一描边路径、平行重叠或任何段重叠。当两条正交箭头必须交叉时,需应用桥接/跳跃基元(详见
    references/type-architecture.md
    § 交叉箭头)。当两条箭头自然会重叠时,需将路径偏移≥12px,确保每条连线可独立追踪。若发现需要堆叠连线,需重新设计布局——这意味着两个节点距离过近,或图表超出复杂度预算(拆分为概览图+细节图)。
  4. 同一边缘→分散连接点。当两条或多条连线进入或离开方框的同一边缘时,每条连线必须在该边缘上有独立的连接点——两条连线不能共用方框上的同一个点。连接点需沿边缘均匀分布,相邻点间距**≥12px**(极小方框可最小为8px)。路由规则:
    • 若某边缘长度为L,有N条连线,则第k个(1..N)连接点位于边缘起始角偏移
      L * k / (N + 1)
      的位置。
    • 当连线向不同方向的目标发散时,每条连线需从自身连接点正交路由——不得在方框附近合并描边。
    • 当两条平行连线同向延伸时,全程需保持≥12px的间距,而非仅在连接点处。每条箭头必须全程可独立追踪。
    绝不能让一条连线遮挡另一条。若无法一眼区分两条箭头,说明布局失败。
  5. 连线不得从非端点方框后方穿过——除非该方框位于唯一正交直线路径上,且几何上无法避开。默认应绕开中间方框。唯一合法例外是当横向节点(如底部服务栏、水平分层栏)物理上位于连线的源节点和目标节点之间的唯一直线路径上——例如,
    METRICS
    箭头从
    Observability
    底部栏出发,向上进入上方区域,必须穿过位于中间的
    Active Directory
    底部栏。这种情况下:
    • 描边必须为虚线(如
      stroke-dasharray="4,3"
      ),以标识"穿越,而非交互"——告知读者中间方框并非端点。
    • 标签需放置在连线的可见端(通常靠近源节点),避免落在中间方框后方。
    • 箭头标记不得落在中间方框的边缘上——标记仅在真实目标处显示。
    如有疑问,优先绕开。该例外仅适用于几何上无法绕开的极端情况,而非简化布局的捷径。

Node box — full pattern

节点方框——完整模板

svg
<!-- 1. Opaque paper mask — prevents arrows bleeding through transparent fills -->
<rect x="X" y="Y" width="W" height="H" rx="6" fill="#f6f8fc"/>
<!-- 2. Styled box -->
<rect x="X" y="Y" width="W" height="H" rx="6" fill="FILL" stroke="STROKE" stroke-width="1"/>
<!-- 3. Rectangular type tag (rx=2, NOT a pill) -->
<rect x="X+8" y="Y+6" width="28" height="12" rx="2" fill="transparent" stroke="STROKE@0.40" stroke-width="0.8"/>
<text x="X+22" y="Y+15" fill="STROKE@0.8" font-size="7" font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace"
      text-anchor="middle" letter-spacing="0.08em">API</text>
<!-- 4. Node name (resolved sans — human-readable) -->
<text x="CX" y="CY+2" fill="#15233c" font-size="12" font-weight="600"
      font-family="'IBM Plex Sans', 'Noto Sans Arabic', sans-serif" text-anchor="middle">Node Name</text>
<!-- 5. Technical sublabel (resolved mono) -->
<text x="CX" y="CY+18" fill="#4f6078" font-size="9"
      font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace" text-anchor="middle">tech:port</text>
svg
<!-- 1. 不透明背景遮罩 — 防止箭头穿透透明填充 -->
<rect x="X" y="Y" width="W" height="H" rx="6" fill="#f6f8fc"/>
<!-- 2. 样式化方框 -->
<rect x="X" y="Y" width="W" height="H" rx="6" fill="FILL" stroke="STROKE" stroke-width="1"/>
<!-- 3. 矩形类型标签(rx=2,非胶囊形) -->
<rect x="X+8" y="Y+6" width="28" height="12" rx="2" fill="transparent" stroke="STROKE@0.40" stroke-width="0.8"/>
<text x="X+22" y="Y+15" fill="STROKE@0.8" font-size="7" font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace"
      text-anchor="middle" letter-spacing="0.08em">API</text>
<!-- 4. 节点名称(解析后的无衬线字体 — 便于阅读) -->
<text x="CX" y="CY+2" fill="#15233c" font-size="12" font-weight="600"
      font-family="'IBM Plex Sans', 'Noto Sans Arabic', sans-serif" text-anchor="middle">Node Name</text>
<!-- 5. 技术子标签(解析后的等宽字体) -->
<text x="CX" y="CY+18" fill="#4f6078" font-size="9"
      font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace" text-anchor="middle">tech:port</text>

Arrow labels — always mask, always with margin

箭头标签——始终添加遮罩,始终保留间隙

Every arrow label needs an opaque rect behind it. Without one it bleeds through the line. And the label must sit with a visible gap above the connector — never on top of it.
svg
<!-- Mask sits 14px above the arrow (8px text height + 6px gap). Stroke is at ARROW_Y. -->
<rect x="MID_X-18" y="ARROW_Y-20" width="36" height="12" rx="2" fill="#f6f8fc"/>
<text x="MID_X" y="ARROW_Y-11" fill="#6b7a90" font-size="8"
      font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace" text-anchor="middle" letter-spacing="0.06em">WRITE</text>
Rules:
  • ≤14 characters, all-caps, centered on segment midpoint.
  • Mandatory 6–10px gap between the bottom of the mask rect and the arrow stroke. The connector must remain visible — a label that hides its own arrow is a hard fail.
  • Never
    writing-mode
    vertical.
  • For vertical segments, place the label to the side (not on the line) with the same 6–10px horizontal gap.
每个箭头标签后方需添加不透明矩形。否则文字会穿透连线。且标签需与连线保持可见间隙——绝不能放在连线上
svg
<!-- 遮罩位于箭头上方14px处(8px文字高度 + 6px间隙)。描边位于ARROW_Y位置。 -->
<rect x="MID_X-18" y="ARROW_Y-20" width="36" height="12" rx="2" fill="#f6f8fc"/>
<text x="MID_X" y="ARROW_Y-11" fill="#6b7a90" font-size="8"
      font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace" text-anchor="middle" letter-spacing="0.06em">WRITE</text>
规则:
  • ≤14个字符,全大写,居中放置在线段中点。
  • 必须保留6-10px间隙在遮罩矩形底部与箭头描边之间。连线必须可见——遮挡自身连线的标签直接判定为不合格。
  • 禁止使用垂直
    writing-mode
  • 垂直线段的标签需放在侧边(而非线上),并保持6-10px的水平间隙。

Legend — horizontal strip at the bottom

图例——底部水平条

Never put the legend inside the diagram area. Place as a horizontal strip after all nodes, with a hairline separator:
svg
<line x1="30" y1="LEGEND_Y-8" x2="VIEWBOX_W-30" y2="LEGEND_Y-8"
      stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
<text x="30" y="LEGEND_Y+8" fill="#4f6078" font-size="8" font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace"
      letter-spacing="0.14em">LEGEND</text>
<!-- Items — horizontal row, ~160px apart -->
Expand SVG
viewBox
height by ~60px.

绝不能将图例放在图表区域内。需放置在所有节点下方,作为水平条,上方添加细分隔线:
svg
<line x1="30" y1="LEGEND_Y-8" x2="VIEWBOX_W-30" y2="LEGEND_Y-8"
      stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
<text x="30" y="LEGEND_Y+8" fill="#4f6078" font-size="8" font-family="'IBM Plex Mono', 'Noto Sans Arabic', monospace"
      letter-spacing="0.14em">LEGEND</text>
<!-- 图例项 — 水平排列,间距约160px -->
需将SVG的
viewBox
高度增加约60px。

7. Layout & Spacing

7. 布局与间距

4px grid

4px网格

All values — font sizes, padding, node dimensions, gaps, x/y coords — divisible by 4. Non-negotiable.
CategoryAllowed values
Font sizes8, 12, 16, 20, 24, 28, 32, 40
Node width / height80, 96, 112, 120, 128, 140, 144, 160, 180, 200, 240, 320
x / y coordinatesmultiples of 4
Gap between nodes20, 24, 32, 40, 48
Padding inside boxes8, 12, 16
Border radius4, 6, 8
Exempt: stroke widths (0.8, 1, 1.2), opacity values, and the 22×22 dot-pattern.
Quick check: if a coordinate ends in 1, 2, 3, 5, 6, 7, 9 — fix it.
所有值——字体大小、内边距、节点尺寸、间隙、x/y坐标——必须能被4整除。不可协商。
类别允许值
字体大小8, 12, 16, 20, 24, 28, 32, 40
节点宽/高80, 96, 112, 120, 128, 140, 144, 160, 180, 200, 240, 320
x/y坐标4的倍数
节点间间隙20, 24, 32, 40, 48
方框内边距8, 12, 16
圆角半径4, 6, 8
例外:描边宽度(0.8, 1, 1.2)、透明度值及22×22点阵图案。
快速检查:若坐标末尾为1、2、3、5、6、7、9——修改为4的倍数。

Complexity budget (per diagram)

复杂度预算(每张图表)

LimitRule
Max nodes9
Max arrows / transitions12
Max accent elements2
Max lifelines (sequence)5
Max lanes (swimlane)5
Max items (quadrant)12
Max entities (ER)8
Max nesting levels (nested)6
Max tree depth4
Max org chart depth4
Max org chart nodes12
Max layers (layer stack)6
Max circles (venn)3
Max layers (pyramid)6
Max radar axes5
Max radar series5
Max focal radar series1
Max bars (bar chart)8
Max series (line chart)5
Max tasks (Gantt)12
Max points (scatter plot)30
Max annotation callouts2
If you exceed, split into two diagrams (overview + detail).
限制规则
最大节点数9
最大箭头/转换数12
最大强调元素数2
最大生命线数(序列图)5
最大泳道数(泳道图)5
最大项数(四象限图)12
最大实体数(ER图)8
最大嵌套层级(嵌套图)6
最大树形深度(树形图)4
最大组织架构深度(组织结构图)4
最大组织架构节点数(组织结构图)12
最大分层数(分层图)6
最大圆圈数(维恩图)3
最大分层数(金字塔图)6
最大雷达轴数(雷达图)5
最大雷达系列数(雷达图)5
最大核心雷达系列数(雷达图)1
最大柱状数(柱状图)8
最大系列数(折线图)5
最大任务数(甘特图)12
最大点数(散点图)30
最大标注数2
若超出限制,拆分为两张图表(概览图+细节图)。

Page layout

页面布局

  1. Header — eyebrow (resolved mono), title (resolved serif), optional subtitle (resolved sans + muted).
  2. Diagram container — default: clean, borderless, no background — the SVG sits directly on the page paper. Optional framed variant (for card-heavy layouts or hero placements):
    paper-2
    bg + 1px
    rule
    border + 8px radius +
    1.5rem
    padding +
    overflow-x: auto
    .
  3. Summary cards — 2–3 col grid with varied widths (e.g.,
    1.1fr 1fr 0.9fr
    ).
  4. Footer — colophon in resolved mono, muted, hairline top border.

  1. 页眉 — 眉栏(解析后的等宽字体)、标题(解析后的衬线字体)、可选副标题(解析后的无衬线字体+ muted颜色)。
  2. 图表容器 — 默认:简洁、无边框,无背景——SVG直接放置在页面背景上。可选带框变体(适用于卡片密集布局或核心展示):
    paper-2
    背景 + 1px
    rule
    边框 + 8px圆角 +
    1.5rem
    内边距 +
    overflow-x: auto
  3. 摘要卡片 — 2-3列网格,宽度各不相同(如
    1.1fr 1fr 0.9fr
    )。
  4. 页脚 — 解析后的等宽字体,muted颜色,顶部添加细边框。

8. Summary Card Pattern

8. 摘要卡片模板

Don't use 3 identical generic cards. Vary the treatment:
html
<div class="card">
  <p class="eyebrow">SECTION LABEL</p>
  <div class="card-header">
    <span class="card-dot accent"></span>
    <h3>Card Title</h3>
  </div>
  <ul><li>Item</li></ul>
</div>
Rules:
  • background: #ffffff
    (not paper — slight lift without shadow)
  • border: 1px solid rgba(45,49,66,0.12)
  • border-radius: 6px
    ,
    padding: 1.25rem
  • No
    box-shadow
  • Card dots: 7px,
    border-radius: 50%
    — ink / muted / accent / link / soft variants

请勿使用3个相同的通用卡片。需调整样式:
html
<div class="card">
  <p class="eyebrow">SECTION LABEL</p>
  <div class="card-header">
    <span class="card-dot accent"></span>
    <h3>Card Title</h3>
  </div>
  <ul><li>Item</li></ul>
</div>
规则:
  • background: #ffffff
    (非paper颜色——轻微凸起效果,无阴影)
  • border: 1px solid rgba(45,49,66,0.12)
  • border-radius: 6px
    ,
    padding: 1.25rem
  • 禁止使用
    box-shadow
  • 卡片圆点:7px,
    border-radius: 50%
    — 可选ink/muted/accent/link/soft变体

9. Pre-Output Checklist (Taste Gate)

9. 输出前检查清单(风格验证)

Run before producing any diagram.
Type fit:
  • Right type for what I'm showing? (§3 selection guide)
  • Would a table / paragraph do the same job? (If yes — don't draw.)
  • Loaded the matching
    references/type-*.md
    ?
Remove test:
  • Can I remove any node? (Would a reader still understand?)
  • Can I merge any two nodes? (Do they always travel together?)
  • Can I remove any arrow? (Is the relationship obvious from layout?)
  • Can I remove any label? (Does color or shape already signal it?)
Signal:
  • Active accent used on ≤2 elements? If more, which actually deserve focal status?
  • Legend covers every type used — and nothing extra?
  • Within the type's complexity budget (§7)?
Technical:
  • Arrows drawn before boxes?
  • Every connector between off-axis nodes uses a rounded right-angle elbow (
    r=8
    )? No diagonal
    <line>
    slants?
  • Every arrow label has a visible 6–10px gap above its connector? (Mask rect not touching the stroke.)
  • No two connectors overlap, share a stroke path, or run on top of each other? Crossings use the bridge/hop primitive?
  • When several connectors enter or exit the same edge of a box, each has its own attach point (≥12px apart)? No connector hides another?
  • No connector passes behind a non-endpoint box, except the unavoidable-intervening-box case (§6 rule 5) — and in that case, the stroke is dashed and the label sits at the visible end?
  • Every arrow label has an opaque rect filled with the resolved
    paper
    token behind it?
  • Legend is a horizontal bottom strip, not floating?
  • No vertical
    writing-mode
    text?
  • viewBox
    expanded for the legend strip (~60px)?
  • Every font size, coord, width, height, gap divisible by 4?
Typography:
  • Human-readable names use the resolved sans family, not the mono family?
  • Technical sublabels (ports, commands, URLs) use the resolved mono family?
  • Page title uses the resolved serif family?
  • Annotation callouts use the resolved serif family in italic? (see primitive-annotation.md)
  • No blanket JetBrains Mono unless the technical-color family was explicitly selected?

生成任何图表前需运行以下检查。
类型适配:
  • 是否选择了适合展示内容的图表类型?(第3节选型指南)
  • 表格/文字段落是否能传达相同信息?(如果是——不要绘制图表。)
  • 是否加载了对应的
    references/type-*.md
    文档?
减法测试:
  • 是否可以移除任何节点?(移除后读者仍能理解内容吗?)
  • 是否可以合并任何两个节点?(它们始终关联在一起吗?)
  • 是否可以移除任何箭头?(节点间的关系可通过布局直观体现吗?)
  • 是否可以移除任何标签?(颜色或形状已能传达信息吗?)
信号传递:
  • 活跃强调色是否仅用于≤2个元素?如果超过,哪些元素真正值得突出?
  • 图例是否覆盖了所有使用的类型——无多余内容?
  • 是否在该类型图表的复杂度预算内?(第7节)
技术规范:
  • 是否先绘制箭头再绘制方框?
  • 非轴对齐节点间的所有连线是否使用了圆角直角弯头(
    r=8
    )?无斜线
    <line>
  • 每个箭头标签与连线间是否有可见的6-10px间隙?(遮罩矩形未接触描边。)
  • 是否无连线重叠、共享描边路径或重叠绘制?交叉处是否使用了桥接/跳跃基元?
  • 当多条连线进入或离开方框的同一边缘时,每条连线是否有独立的连接点(间距≥12px)?无连线被遮挡?
  • 是否无连线从非端点方框后方穿过,除非是不可避免的中间方框情况(第6节规则5)——且这种情况下描边为虚线,标签位于可见端?
  • 每个箭头标签后方是否有填充了解析后
    paper
    令牌的不透明矩形?
  • 图例是否为底部水平条,而非悬浮在图表内?
  • 是否无垂直
    writing-mode
    文本?
  • 是否为图例条扩展了
    viewBox
    高度(约60px)?
  • 所有字体大小、坐标、宽度、高度、间隙是否能被4整除?
排版规范:
  • 便于阅读的节点名称是否使用了解析后的无衬线字体,而非等宽字体?
  • 技术子标签(端口、命令、URL)是否使用了解析后的等宽字体?
  • 页面标题是否使用了解析后的衬线字体?
  • 标注是否使用了解析后的衬线斜体字体?(详见primitive-annotation.md
  • 是否仅在明确选择技术色彩体系时才全面使用JetBrains Mono字体?

10. Templates & Variants

10. 模板与变体

Every first-class diagram ships in four core variants (see
assets/
):
VariantFile patternWhen to use
Minimal light (default)
template.html
,
example-<type>.html
Screenshot-ready. Diagram + title. Uses the active project's light palette.
Minimal dark
template-dark.html
,
example-<type>-dark.html
Dark mode sites, slides, high-contrast posts.
Full editorial
template-full.html
,
example-<type>-full.html
Long-form posts where the diagram is the hero.
Hand-drawn
template-hand.html
,
example-<type>-hand.html
Deterministic Rough.js rendering for essays, workshops, and working-sketch presentation.
Consultant special (quadrant only)
example-quadrant-consultant.html
BCG/McKinsey-style 2×2 scenario matrix. Clinical sans-serif, white bg, bold blue double-ended axes, named scenario cells. See type-quadrant.md.
Technical-color architecture
assets/technical-color/architecture/
Cloud, infrastructure, security, and topology illustrations with semantic component colors and built-in Copy/PNG/PDF.
Technical-color process flow
assets/technical-color/process-flow/
Approval, automation, runbook, and decision workflows with numbered steps and built-in Copy/PNG/PDF.
Hand-drawn generation — see primitive-sketchy.md. The committed
-hand
files are generated from every minimal example with Rough.js; do not edit them manually.
Terminal variant (optional, replaces any of the above) — see primitive-terminal.md.
template-terminal.html
,
example-<type>-terminal.html
. Charcoal-black CLI-window chrome, monospace type, one red-orange accent. Good for dev-tool / CLI-product posts and technical social cards; not brand-tokenized, so skip it for onboarded/brand-matched output.
每种一等图表都提供四种核心变体(详见
assets/
目录):
变体文件模板使用场景
极简浅色(默认)
template.html
,
example-<type>.html
适合截图。仅包含图表+标题。使用当前项目的浅色调色板。
极简深色
template-dark.html
,
example-<type>-dark.html
深色模式网站、幻灯片、高对比度文章。
完整编辑风格
template-full.html
,
example-<type>-full.html
图表为核心内容的长篇文章。
手绘风格
template-hand.html
,
example-<type>-hand.html
使用Rough.js生成的确定性手绘效果,适用于文章、研讨会及工作草图展示。
顾问专用(仅四象限图)
example-quadrant-consultant.html
BCG/麦肯锡风格的2×2场景矩阵。临床无衬线字体、白色背景、粗体蓝色双端轴、命名场景单元格。详见type-quadrant.md
技术色彩架构风格
assets/technical-color/architecture/
云、基础设施、安全及拓扑插图,包含语义组件颜色及内置复制/PNG/PDF导出功能。
技术色彩流程风格
assets/technical-color/process-flow/
审批、自动化、操作手册及决策工作流,包含编号步骤及内置复制/PNG/PDF导出功能。
手绘风格生成——详见primitive-sketchy.md。已提交的
-hand
文件是通过Rough.js从每个极简示例生成的;请勿手动编辑。
终端变体(可选,可替代上述任意变体)——详见primitive-terminal.md。文件模板为
template-terminal.html
,
example-<type>-terminal.html
。炭黑色CLI窗口样式、等宽字体、单一红橙色强调色。适用于开发工具/CLI产品文章及技术社交卡片;未进行品牌令牌化,因此品牌适配场景下请勿使用。

To create a new diagram

创建新图表步骤

  1. Resolve
    .github/illustration-theme.yml
    ; initialize Cobalt when the project has no selection.
  2. Choose editorial, merged technical-color architecture, or merged technical-color process flow.
  3. Load
    references/type-<name>.md
    for editorial output; load the matching
    technical-color-*.md
    reference for either merged family.
  4. Copy the closest template/example, replace its content, and apply every resolved color and font token while preserving the selected family's visual and export grammar.
  5. Run
    illustration_theme.py validate
    , audit the output for stale default literals, then run the §9 taste gate.

  1. 解析
    .github/illustration-theme.yml
    ;若项目未选择主题,初始化钴蓝主题。
  2. 选择编辑风格、整合的技术色彩架构风格或整合的技术色彩流程风格。
  3. 编辑风格输出需加载
    references/type-<name>.md
    ;任一整合风格输出需加载对应的
    technical-color-*.md
    参考文档。
  4. 复制最接近的模板/示例,替换内容,并应用所有解析后的颜色和字体令牌,同时保留所选风格的视觉及导出语法。
  5. 运行
    illustration_theme.py validate
    ,检查输出是否存在过时的默认字面量,然后运行第9节的风格验证。

11. Output

11. 输出格式

Always produce a single self-contained
.html
file:
  • Embedded CSS (no external except Google Fonts)
  • Inline SVG (no external images)
  • Editorial variants require no JavaScript; technical-color variants preserve their pinned export scripts
Renders correctly in any modern browser.
始终生成单个独立的
.html
文件:
  • 内嵌CSS(除Google Fonts外无外部依赖)
  • 内嵌SVG(无外部图片)
  • 编辑风格变体无需JavaScript;技术色彩变体保留其固定的导出脚本
可在任何现代浏览器中正确渲染。

Exporting to PNG / SVG

导出为PNG/SVG

When the user asks to export, save, rasterize, or convert a generated diagram to
.png
or
.svg
, load
references/export.md
and follow the procedure there. The portable command source is
commands/export-diagram.md
. Both formats deliver the diagram only (the
<svg>
node)—editorial wrappers like cards and headers are dropped by design. Export is manual—never produce export files unprompted.
当用户要求导出、保存、光栅化或转换生成的图表为
.png
.svg
格式时,需加载
references/export.md
并遵循其中的流程。可移植命令源为
commands/export-diagram.md
。两种格式仅导出图表部分(
<svg>
节点)——编辑风格的包装元素(如卡片、页眉)会被主动移除。导出为手动操作——请勿主动生成导出文件。