illustrate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIllustrate
插图绘制
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 and are loaded only when you pick a type.
references/创建包含内嵌SVG和CSS的独立HTML文件格式的视觉插图。默认使用编辑风格系统,当用户需要彩色组件/步骤语法或内置浏览器导出工具栏时,可切换为技术色彩体系。
支持27种图表类型,共享一套设计系统、复杂度预算和风格规范。每种类型的专属约定存储在目录下,仅在选择对应类型时加载。
references/0. Project theme gate
0. 项目主题配置
Before generating a diagram, resolve the project theme from :
.github/illustration-theme.ymlbash
python scripts/illustration_theme.py --project-root . resolve --format yamlIf 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
deterministically:
cobalt/lightbash
python scripts/illustration_theme.py --project-root . init --non-interactiveThe initializer writes the tracked project policy to . Never modify
the skill's bundled style guide to customize one consumer project. On every generation, apply the
resolved and 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.
.github/illustration-theme.ymlcolorstypographyFor preset selection, custom light/dark themes, local/remote/system font policies, or design-system
extraction, load . For URL,
installed-skill, and folder extraction, also load .
references/theme-initialization.mdreferences/onboarding.md生成图表前,需从文件解析项目主题:
.github/illustration-theme.ymlbash
python scripts/illustration_theme.py --project-root . resolve --format yaml若该文件缺失,需先初始化主题再绘制图表。在交互式对话中,需询问用户选择钴蓝瓷白(Cobalt Porcelain,推荐默认)、翡翠雾绿(Emerald Mist)、**经典沙杜克(Sanduq Classic)**或自定义主题,然后选择明暗模式和字体加载方式。在非交互式自动化场景中,将确定性创建主题:
cobalt/lightbash
python scripts/illustration_theme.py --project-root . init --non-interactive初始化工具会将项目的主题策略写入文件。请勿修改工具自带的样式指南来定制单个项目。每次生成图表时,需将解析得到的和值应用到所选模板,包括SVG文本元素和箭头标记。示例中的字面颜色和字体仅为结构示例,项目配置的主题令牌优先级更高。
.github/illustration-theme.ymlcolorstypography如需选择预设主题、自定义明暗主题、本地/远程/系统字体策略或提取设计系统,请加载。如需通过URL、已安装工具或文件夹进行品牌适配,还需加载。
references/theme-initialization.mdreferences/onboarding.md1. Philosophy
1. 设计理念
The highest-quality move is usually deletion.
From : "Confident restraint. Earn every element. One color accent, two families, a small spacing vocabulary. If removing it wouldn't hurt the page, remove it."
.impeccable.mdApplied 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 skill.
architecture-diagram - Technical-color process flow for numbered workflows, approvals, automation, onboarding, and runbooks; this is the merged former skill.
process-flow-diagram
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… | Use | Reference |
|---|---|---|
| Components + connections in a system | Architecture | type-architecture.md |
| Legacy IT landscape grouped by phase/department; documents the before state in modernization proposals | IT current-state | type-it-state.md |
| Decision logic with branches | Flowchart | type-flowchart.md |
| Time-ordered messages between actors | Sequence | type-sequence.md |
| States + transitions + guards | State machine | type-state.md |
| Entities + fields + relationships | ER / data model | type-er.md |
| Events positioned in time | Timeline | type-timeline.md |
| Cross-functional process with handoffs | Swimlane | type-swimlane.md |
| Two-axis positioning / prioritization | Quadrant | type-quadrant.md |
| Multiple entities scored across 3–5 quantitative criteria | Radar / Spider | type-radar.md |
| Reinforcing cycle / flywheel where the last step feeds the first and a shared hub accumulates state | Loop | type-loop.md |
| Hierarchy through containment / scope | Nested | type-nested.md |
| Parent → children relationships | Tree | type-tree.md |
| Human/agent/team ownership, reporting, routing, escalation | Org chart | type-org-chart.md |
| Stacked abstraction levels | Layer stack | type-layers.md |
| Overlap between sets | Venn | type-venn.md |
| Ranked hierarchy or conversion drop-off | Pyramid / funnel | type-pyramid.md |
| Quantitative comparison across categories | Bar chart | type-bar.md |
| Continuous trends over time | Line chart | type-line.md |
| Tasks and phases on a timeline | Gantt | type-gantt.md |
| Distribution and correlation between two variables | Scatter plot | type-scatter.md |
| End-to-end data stack on a container cluster | High-Level | type-high-level.md |
| Multi-actor sequential process with data handoffs | Process | type-process.md |
| Multi-tier data storage with quality levels and access policies | Medallion | type-medallion.md |
| Role-scoped data flow: who does what at each pipeline step | Data flow | type-data-flow.md |
| Integration topology of a data platform — sources → core → consumers | DP integration | type-dp-integration.md |
| Per-role / per-component access permissions matrix | DP security matrix | type-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 before drawing — it contains layout conventions, anti-patterns, and example files for that type.
references/type-*.md| 若要展示… | 使用图表类型 | 参考文档 |
|---|---|---|
| 系统中的组件及连接关系 | 架构图 | 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-*.md4. Universal Anti-patterns
4. 通用反模式
These mark "AI slop" schematics of any type:
| Anti-pattern | Why it fails |
|---|---|
| Dark mode + cyan/purple glow | Looks "technical" without design decisions |
| JetBrains Mono as blanket "dev" font in editorial output | Mono is for technical content in the editorial family. The technical-color family intentionally uses JetBrains Mono throughout. |
| Identical boxes for every node | Erases hierarchy |
| Legend floating inside the diagram area | Collides with nodes |
| Arrow labels with no masking rect | Bleeds through the line |
Vertical | Unreadable |
| 3 equal-width summary cards as default | Generic grid — vary widths |
| Shadow on any element | Shadows are out. Borders are in. |
| Max radius 6–10px or none |
| Coral on every "important" node | Coral is 1–2 editorial accents, not a signaling system |
| Diagonal / slanted connectors between off-axis nodes | Rounded right-angle (orthogonal) elbows are mandatory — see §6 Mandatory connector rules |
| Arrow label sitting on or touching its connector | Label must have a 6–10px gap above the line so the connector stays visible |
| Two connectors overlapping or running on the same path | Each connection must be independently traceable — bridge crossings, offset parallels |
| Two connectors sharing a single attach point on a box | Fan 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 need | Reroute 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。 |
| 所有节点使用相同样式的方框 | 抹除了层级关系 |
| 图例悬浮在图表区域内 | 会与节点发生重叠 |
| 箭头标签无遮罩矩形 | 文字会穿透连线 |
箭头使用垂直 | 难以阅读 |
| 默认使用3个等宽摘要卡片 | 通用网格布局——应调整宽度 |
| 元素添加阴影 | 阴影已过时,应使用边框 |
方框使用 | 最大圆角为6-10px,或无圆角 |
| 所有"重要"节点使用珊瑚色 | 珊瑚色仅作为1-2个编辑性强调色,而非标识系统 |
| 非轴对齐节点间使用斜线/倾斜连线 | 必须使用圆角直角(正交)弯头——详见第6节强制连线规则 |
| 箭头标签位于或接触连线上 | 标签与连线间需保留6-10px的间隙,确保连线可见 |
| 两条连线重叠或走同一路径 | 每条连线必须可独立追踪——交叉处使用桥接,平行连线需偏移 |
| 两条连线共用方框上的同一个连接点 | 连接点需沿边缘分散排列(间距≥12px),确保每条箭头清晰可辨——详见第6节规则4 |
| 连线无必要地从非端点方框后方穿过 | 默认应绕开中间方框;仅当不可避免的中间方框位于直接路径上时,才可使用虚线穿越例外(第6节规则5) |
各类型图表的专属反模式存储在对应的文档中。
references/type-*.md5. Design System
5. 设计系统
The design system is skinnable per project. Built-in theme definitions live in
, and the active project selection
lives in .
defines the semantic roles (, , , , , 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.
assets/illustration-themes.yml.github/illustration-theme.ymlreferences/style-guide.mdpaperinkmutedaccentlinkWhen 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.ymlreferences/style-guide.mdpaperinkmutedaccentlink当规范或类型参考文档提及语义角色时,请使用当前解析后的输出值。解析后的项目令牌优先级高于历史示例中的所有字面颜色或字体。
Semantic roles (at a glance)
语义角色概览
| Role | Purpose |
|---|---|
| Page bg and container bg |
| Primary text / stroke |
| Secondary text, default arrows, sublabels |
| Hairline borders |
| 1–2 focal elements per diagram |
| HTTP/API calls, external arrows |
Focal rule: goes on 1–2 elements max. Everything else is / / . If you're tempted to accent 4 things, you haven't decided what's focal yet.
accentinkmutedsoft| 角色 | 用途 |
|---|---|
| 页面背景及容器背景 |
| 主文本/描边 |
| 次要文本、默认箭头、子标签 |
| 细边框 |
| 每张图表最多1-2个核心元素 |
| HTTP/API调用、外部箭头 |
核心规则:最多用于1-2个元素。其余元素均使用//。若你想强调4个元素,说明还未确定核心内容。
accentinkmutedsoftNode type → treatment
节点类型→样式处理
| Type | Fill | Stroke |
|---|---|---|
| Focal (1–2 max) | | |
| Backend / API / Step | white | |
| Store / State | | |
| External / Cloud | | |
| Input / User | | |
| Optional / Async | | |
| Security / Boundary | | |
| 类型 | 填充色 | 描边色 |
|---|---|---|
| 核心节点(最多1-2个) | | |
| 后端/API/步骤 | 白色 | |
| 存储/状态 | | |
| 外部/云端 | | |
| 输入/用户 | | |
| 可选/异步 | | |
| 安全/边界 | | |
Typography (summary — full spec in style-guide.md)
排版(摘要——完整规范见style-guide.md)
- Title — resolved , 1.75rem, 400 — H1 only
serif - Node name — resolved , 12px, 600 — human-readable labels
sans - Sublabel — resolved , 9px — ports, URLs, field types
mono - Eyebrow / tag — resolved , 7–8px, uppercase, tracked — type tags, axis labels
mono - Arrow label — resolved , 8px — annotation on arrows
mono - Editorial aside — resolved italic, 14px — callouts only
serif
Mono is for technical content. Names use the active sans family. Titles and callouts use the
active serif family. Load only when resolves to ; otherwise
use the tracked stacks with locally installed or system fallbacks. Built-in stacks include Arabic
fallbacks so mixed English/Arabic labels remain readable.
remote_css_urlfont_loadingremote- 标题 — 解析后的字体,1.75rem,400字重 — 仅用于H1
serif - 节点名称 — 解析后的字体,12px,600字重 — 便于阅读的标签
sans - 子标签 — 解析后的字体,9px — 端口、URL、字段类型
mono - 眉栏/标签 — 解析后的字体,7-8px,大写,字间距增大 — 类型标签、轴标签
mono - 箭头标签 — 解析后的字体,8px — 箭头注释
mono - 编辑旁白 — 解析后的斜体,14px — 仅用于标注
serif
等宽字体仅用于技术内容。节点名称使用当前的无衬线字体族。标题和标注使用当前的衬线字体族。仅当解析为时加载;否则使用本地安装或系统 fallback 的字体栈。内置字体栈包含阿拉伯语 fallback,确保英/阿混合标签仍可读。
font_loadingremoteremote_css_url6. Core SVG Primitives
6. 核心SVG基元
Universal building blocks. Type-specialized primitives (lifeline, activation bar, region) live in the relevant . Optional primitives:
references/type-*.md- 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 filled with . Don't wrap the diagram in a secondary container background — the diagram sits directly on the page.
<rect>papersvg
<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 pattern and a second rect:
dotssvg
<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>papersvg
<rect width="100%" height="100%" fill="#f6f8fc"/>可选:点阵背景变体。当长篇编辑图表需要纹理背景时(如文章、专属页面的核心图表),可通过添加图案和第二个矩形启用:
dotssvg
<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>| Arrow | Stroke | When |
|---|---|---|
| Default | muted | Internal, generic |
| Accent | cobalt | Primary / highlighted / headline |
| Link-blue | | HTTP/API calls, external systems |
| Dashed | | 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 | 内部、通用场景 |
| 强调 | 钴蓝 | 核心/高亮/标题场景 |
| 链接蓝 | | HTTP/API调用、外部系统 |
| 虚线 | | 可选、被动、返回、异步场景 |
先绘制箭头,再绘制方框,确保连线位于节点后方。
Mandatory connector rules
强制连线规则
These five rules are non-negotiable. Run the pre-output checklist (§9) to verify before producing any diagram.
-
Rounded right-angle (orthogonal) connectors are mandatory. Never use diagonalor straight slanted paths between nodes that don't share an x or y axis. Every bend must be a quarter-arc with
<line>(orr=8minimum for tight layouts). Seer=6for the elbow-path formula. Reserve plain straightreferences/type-architecture.mdonly for connections whose endpoints share the same x or y coordinate. Diagonal connectors are an automatic fail.<line> -
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.
-
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§ 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).
references/type-architecture.md -
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 (1..N) sits at offset
kfrom the edge's leading corner.L * k / (N + 1) - 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. - For N connectors on an edge of length L, attach point
-
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, aarrow exiting an
METRICSfooter bar and rising into a zone above must cross theObservabilityfooter bar that sits between them. In that exception:Active Directory- The stroke must be dashed (e.g., ) to signal "transit, not interaction" — it tells the reader the intervening box is not an endpoint.
stroke-dasharray="4,3" - 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. - The stroke must be dashed (e.g.,
以下五条规则不可协商。生成任何图表前,需运行第9节的输出前检查清单进行验证。
-
必须使用圆角直角(正交)连线。非轴对齐节点间绝不能使用斜线或直线路径。每个弯折处必须是半径为8px的四分之一圆弧(紧凑布局时最小为6px)。详见
<line>中的弯头路径公式。仅当端点共享同一x或y坐标时,才可使用纯直references/type-architecture.md。斜线连线直接判定为不合格。<line> -
标签与连线间必须保留6-10px间隙。标签绝不能位于箭头上——必须保证连线可见。标签需居中放置在连线上方(垂直线段则放在侧边),且遮罩矩形底部与连线描边间需保留至少6px的间隙。不透明遮罩矩形可防止箭头穿透文字,但遮罩边缘与连线间的可见间隙可保证读者能追踪连线。若标签较大,6px间隙显得拥挤,可调整为8-10px。绝不能让遮罩矩形接触或重叠描边。
-
禁止连线重叠。两条连线绝不能共享同一描边路径、平行重叠或任何段重叠。当两条正交箭头必须交叉时,需应用桥接/跳跃基元(详见§ 交叉箭头)。当两条箭头自然会重叠时,需将路径偏移≥12px,确保每条连线可独立追踪。若发现需要堆叠连线,需重新设计布局——这意味着两个节点距离过近,或图表超出复杂度预算(拆分为概览图+细节图)。
references/type-architecture.md -
同一边缘→分散连接点。当两条或多条连线进入或离开方框的同一边缘时,每条连线必须在该边缘上有独立的连接点——两条连线不能共用方框上的同一个点。连接点需沿边缘均匀分布,相邻点间距**≥12px**(极小方框可最小为8px)。路由规则:
- 若某边缘长度为L,有N条连线,则第k个(1..N)连接点位于边缘起始角偏移的位置。
L * k / (N + 1) - 当连线向不同方向的目标发散时,每条连线需从自身连接点正交路由——不得在方框附近合并描边。
- 当两条平行连线同向延伸时,全程需保持≥12px的间距,而非仅在连接点处。每条箭头必须全程可独立追踪。
绝不能让一条连线遮挡另一条。若无法一眼区分两条箭头,说明布局失败。 - 若某边缘长度为L,有N条连线,则第k个(1..N)连接点位于边缘起始角偏移
-
连线不得从非端点方框后方穿过——除非该方框位于唯一正交直线路径上,且几何上无法避开。默认应绕开中间方框。唯一合法例外是当横向节点(如底部服务栏、水平分层栏)物理上位于连线的源节点和目标节点之间的唯一直线路径上——例如,箭头从
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 vertical.
writing-mode - 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 height by ~60px.
viewBox绝不能将图例放在图表区域内。需放置在所有节点下方,作为水平条,上方添加细分隔线:
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的高度增加约60px。
viewBox7. Layout & Spacing
7. 布局与间距
4px grid
4px网格
All values — font sizes, padding, node dimensions, gaps, x/y coords — divisible by 4. Non-negotiable.
| Category | Allowed values |
|---|---|
| Font sizes | 8, 12, 16, 20, 24, 28, 32, 40 |
| Node width / height | 80, 96, 112, 120, 128, 140, 144, 160, 180, 200, 240, 320 |
| x / y coordinates | multiples of 4 |
| Gap between nodes | 20, 24, 32, 40, 48 |
| Padding inside boxes | 8, 12, 16 |
| Border radius | 4, 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)
复杂度预算(每张图表)
| Limit | Rule |
|---|---|
| Max nodes | 9 |
| Max arrows / transitions | 12 |
| Max accent elements | 2 |
| Max lifelines (sequence) | 5 |
| Max lanes (swimlane) | 5 |
| Max items (quadrant) | 12 |
| Max entities (ER) | 8 |
| Max nesting levels (nested) | 6 |
| Max tree depth | 4 |
| Max org chart depth | 4 |
| Max org chart nodes | 12 |
| Max layers (layer stack) | 6 |
| Max circles (venn) | 3 |
| Max layers (pyramid) | 6 |
| Max radar axes | 5 |
| Max radar series | 5 |
| Max focal radar series | 1 |
| Max bars (bar chart) | 8 |
| Max series (line chart) | 5 |
| Max tasks (Gantt) | 12 |
| Max points (scatter plot) | 30 |
| Max annotation callouts | 2 |
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
页面布局
- Header — eyebrow (resolved mono), title (resolved serif), optional subtitle (resolved sans + muted).
- 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): bg + 1px
paper-2border + 8px radius +rulepadding +1.5rem.overflow-x: auto - Summary cards — 2–3 col grid with varied widths (e.g., ).
1.1fr 1fr 0.9fr - Footer — colophon in resolved mono, muted, hairline top border.
- 页眉 — 眉栏(解析后的等宽字体)、标题(解析后的衬线字体)、可选副标题(解析后的无衬线字体+ muted颜色)。
- 图表容器 — 默认:简洁、无边框,无背景——SVG直接放置在页面背景上。可选带框变体(适用于卡片密集布局或核心展示):背景 + 1px
paper-2边框 + 8px圆角 +rule内边距 +1.5rem。overflow-x: auto - 摘要卡片 — 2-3列网格,宽度各不相同(如)。
1.1fr 1fr 0.9fr - 页脚 — 解析后的等宽字体,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:
- (not paper — slight lift without shadow)
background: #ffffff border: 1px solid rgba(45,49,66,0.12)- ,
border-radius: 6pxpadding: 1.25rem - No
box-shadow - Card dots: 7px, — ink / muted / accent / link / soft variants
border-radius: 50%
请勿使用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>规则:
- (非paper颜色——轻微凸起效果,无阴影)
background: #ffffff border: 1px solid rgba(45,49,66,0.12)- ,
border-radius: 6pxpadding: 1.25rem - 禁止使用
box-shadow - 卡片圆点:7px,— 可选ink/muted/accent/link/soft变体
border-radius: 50%
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 ()? No diagonal
r=8slants?<line> - 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 token behind it?
paper - Legend is a horizontal bottom strip, not floating?
- No vertical text?
writing-mode - expanded for the legend strip (~60px)?
viewBox - 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 - 是否为图例条扩展了高度(约60px)?
viewBox - 所有字体大小、坐标、宽度、高度、间隙是否能被4整除?
排版规范:
- 便于阅读的节点名称是否使用了解析后的无衬线字体,而非等宽字体?
- 技术子标签(端口、命令、URL)是否使用了解析后的等宽字体?
- 页面标题是否使用了解析后的衬线字体?
- 标注是否使用了解析后的衬线斜体字体?(详见primitive-annotation.md)
- 是否仅在明确选择技术色彩体系时才全面使用JetBrains Mono字体?
10. Templates & Variants
10. 模板与变体
Every first-class diagram ships in four core variants (see ):
assets/| Variant | File pattern | When to use |
|---|---|---|
| Minimal light (default) | | Screenshot-ready. Diagram + title. Uses the active project's light palette. |
| Minimal dark | | Dark mode sites, slides, high-contrast posts. |
| Full editorial | | Long-form posts where the diagram is the hero. |
| Hand-drawn | | Deterministic Rough.js rendering for essays, workshops, and working-sketch presentation. |
| Consultant special (quadrant only) | | 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 | | Cloud, infrastructure, security, and topology illustrations with semantic component colors and built-in Copy/PNG/PDF. |
| 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
files are generated from every minimal example with Rough.js; do not edit them manually.
-handTerminal variant (optional, replaces any of the above) — see primitive-terminal.md. , . 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.
template-terminal.htmlexample-<type>-terminal.html每种一等图表都提供四种核心变体(详见目录):
assets/| 变体 | 文件模板 | 使用场景 |
|---|---|---|
| 极简浅色(默认) | | 适合截图。仅包含图表+标题。使用当前项目的浅色调色板。 |
| 极简深色 | | 深色模式网站、幻灯片、高对比度文章。 |
| 完整编辑风格 | | 图表为核心内容的长篇文章。 |
| 手绘风格 | | 使用Rough.js生成的确定性手绘效果,适用于文章、研讨会及工作草图展示。 |
| 顾问专用(仅四象限图) | | BCG/麦肯锡风格的2×2场景矩阵。临床无衬线字体、白色背景、粗体蓝色双端轴、命名场景单元格。详见type-quadrant.md。 |
| 技术色彩架构风格 | | 云、基础设施、安全及拓扑插图,包含语义组件颜色及内置复制/PNG/PDF导出功能。 |
| 技术色彩流程风格 | | 审批、自动化、操作手册及决策工作流,包含编号步骤及内置复制/PNG/PDF导出功能。 |
手绘风格生成——详见primitive-sketchy.md。已提交的文件是通过Rough.js从每个极简示例生成的;请勿手动编辑。
-hand终端变体(可选,可替代上述任意变体)——详见primitive-terminal.md。文件模板为, 。炭黑色CLI窗口样式、等宽字体、单一红橙色强调色。适用于开发工具/CLI产品文章及技术社交卡片;未进行品牌令牌化,因此品牌适配场景下请勿使用。
template-terminal.htmlexample-<type>-terminal.htmlTo create a new diagram
创建新图表步骤
- Resolve ; initialize Cobalt when the project has no selection.
.github/illustration-theme.yml - Choose editorial, merged technical-color architecture, or merged technical-color process flow.
- Load for editorial output; load the matching
references/type-<name>.mdreference for either merged family.technical-color-*.md - 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.
- Run , audit the output for stale default literals, then run the §9 taste gate.
illustration_theme.py validate
- 解析;若项目未选择主题,初始化钴蓝主题。
.github/illustration-theme.yml - 选择编辑风格、整合的技术色彩架构风格或整合的技术色彩流程风格。
- 编辑风格输出需加载;任一整合风格输出需加载对应的
references/type-<name>.md参考文档。technical-color-*.md - 复制最接近的模板/示例,替换内容,并应用所有解析后的颜色和字体令牌,同时保留所选风格的视觉及导出语法。
- 运行,检查输出是否存在过时的默认字面量,然后运行第9节的风格验证。
illustration_theme.py validate
11. Output
11. 输出格式
Always produce a single self-contained file:
.html- 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 or ,
load and follow the procedure there. The portable
command source is . Both formats deliver
the diagram only (the node)—editorial wrappers like cards and headers are dropped by
design. Export is manual—never produce export files unprompted.
.png.svgreferences/export.mdcommands/export-diagram.md<svg>当用户要求导出、保存、光栅化或转换生成的图表为或格式时,需加载并遵循其中的流程。可移植命令源为。两种格式仅导出图表部分(节点)——编辑风格的包装元素(如卡片、页眉)会被主动移除。导出为手动操作——请勿主动生成导出文件。
.png.svgreferences/export.mdcommands/export-diagram.md<svg>