主题
Cynefin 框架图 (v<MERMAID_RELEASE_VERSION>+)
🌐 Cynefin Framework Diagram (v<MERMAID_RELEASE_VERSION>+)
Cynefin 框架是由 Dave Snowden 创建的一个意义构建框架,它将问题分类为五种复杂性字段。它帮助团队根据所面临情况的性质来匹配他们的应对方式。这个名称在威尔士语中意为“地点”或“栖息地”。
你可以在 The Cynefin Co 阅读更多内容。
🌐 You can read more at The Cynefin Co.
介绍
🌐 Introduction
Cynefin 框架将世界分为五个字段,每个字段都有其自己的决策方法:
🌐 The Cynefin framework divides the world into five domains, each with its own decision-making approach:
- 清晰(原名显而易见/简单):因果关系显而易见。感知 → 分类 → 反应。应用最佳实践。
- 繁复:因果关系需要分析或专业知识。感知 → 分析 → 响应。应用良好实践。
- 复杂:因果只能在事后推断。探查 → 感知 → 响应。应用新兴实践。
- 混沌:没有可察觉的因果关系。行动 → 感知 → 反应。应用新颖的方法。
- 混乱(或紊乱):你不知道自己处于哪个字段。目标是将物品从这种状态移到其他四种之一。
其标志性的视觉特性是有序(清晰、复杂)与无序(复杂系统、混沌)两半之间波浪状、有机的边界,以及清晰与混沌之间的“悬崖”,象征自满可能导致危机的风险。
🌐 The signature visual feature is the wavy, organic boundary between the ordered (Clear, Complicated) and unordered (Complex, Chaotic) halves, and the "cliff" between Clear and Chaotic representing the risk of complacency leading to crisis.
语法
🌐 Syntax
Cynefin 图表使用 cynefin-beta 声明,后跟域块和可选的转换。
🌐 A Cynefin diagram is declared with cynefin-beta followed by domain blocks and optional transitions.
md
cynefin-beta
title Optional Diagram Title
complex
"Item label"
"Another item"
complicated
"Expert analysis needed"
clear
"Known procedure"
chaotic
"Crisis response"
confusion
"Item of unknown domain"
complex --> complicated : "Pattern identified"
clear --> chaotic : "Complacency"关键词
🌐 Keywords
| 关键字 | 含义 |
|---|---|
cynefin-beta | 图表类型声明(必填,任何前言内容后的第一行) |
title | 可选图表标题 |
complex | 打开复杂域块 |
complicated | 打开棘手域块 |
clear | 打开清晰域块 |
chaotic | 打开混沌域块 |
confusion | 打开困惑/混乱域块 |
--> | 声明从一个域到另一个域的转换 |
物品
🌐 Items
条目是放置在域块内单独行上的带引号的标签。每个条目都会在域区域内渲染为文本徽章。
🌐 Items are quoted string labels placed on their own lines inside a domain block. Each item renders as a text badge within the domain region.
complex
"Investigate root cause"
"Run chaos experiment"保持每个域的项目列表简短——象限具有固定布局,长列表可能会在视觉上溢出其框。混淆椭圆最多显示三个项目,并显示 +N more 徽章;四象限域不会裁剪,因此每个域最好只有少量项目。
🌐 Keep per-domain item lists short — the quadrants have fixed layout and long lists can visually overflow their boxes. The confusion ellipse caps at three items and shows a +N more badge; the four quadrant domains do not clip, so prefer a handful of items each.
过渡
🌐 Transitions
转换表示项目随时间在域之间的移动。它们在顶层使用两个域名之间的 --> 声明,并可以选择添加标签。
🌐 Transitions represent movement of items between domains over time. They are declared at the top level using --> between two domain names, with an optional label.
complex --> complicated : "Pattern identified"
clear --> chaotic : "Complacency"
chaotic --> complex : "Stabilized"常用过渡词:
🌐 Common transitions:
- 复杂 → 棘手:一种新出现的模式已被理解,现在可以进行分析。
- 混乱 → 复杂:危机已经得到足够的稳定,可以开始探索。
- 清晰 → 混乱:自满或过度约束导致崩溃(“悬崖”)。
- 复杂 → 清晰:分析已将解决方案归纳为标准做法。
示例
🌐 Examples
基本示例
🌐 Basic example
带有过渡
🌐 With transitions
空框架
🌐 Empty framework
这些字段本身即使没有任何项目也可以渲染,非常适合作为教学或工作表模板。
🌐 The domains themselves render even with no items, useful as a teaching or worksheet template.
配置
🌐 Configuration
Cynefin 图在 mermaid 配置中的 cynefin 键下接受以下配置:
🌐 Cynefin diagrams accept the following configuration under the cynefin key in the mermaid config:
| 选项 | 类型 | 默认值 | 描述 |
|---|---|---|---|
width | 数字 | 800 | 图表的宽度(像素) |
height | 数字 | 600 | 图表的高度(像素) |
padding | 数字 | 40 | 图表周围的填充 |
showDomainDescriptions | 布尔值 | true | 是否显示每个字段的决策模型和实践类型副标题 |
boundaryAmplitude | 数字 | 8 | 字段边界的波动幅度(像素)(设置为 0 表示直线) |
示例:
🌐 Example:
%%{init: {'cynefin': {'width': 1000, 'showDomainDescriptions': false}}}%%
cynefin-beta
complex
"Adaptive work"主题化
🌐 Theming
Cynefin 图表使用以下主题变量,这些变量可以通过 themeVariables.cynefin 覆盖:
🌐 Cynefin diagrams use the following theme variables, which can be overridden via themeVariables.cynefin:
| 变量 | 描述 |
|---|---|
complexBg | 复杂字段的背景颜色 |
complicatedBg | 复杂字段的背景颜色 |
clearBg | 清晰字段的背景颜色 |
chaoticBg | 混乱字段的背景颜色 |
confusionBg | 混淆中心区域的颜色 |
boundaryColor | 波浪形字段边界的颜色 |
boundaryWidth | 边界的描边宽度 |
cliffColor | 清晰/混乱悬崖的颜色 |
cliffWidth | 悬崖的描边宽度 |
arrowColor | 转换箭头的颜色 |
arrowWidth | 转换箭头的描边宽度 |
labelColor | 字段名称标签的颜色 |
textColor | 条目和副标题文本的颜色 |
domainFontSize | 字段名称标签的字体大小 |
itemFontSize | 条目徽章和副标题的字体大小 |
注意
🌐 Notes
- 域名是固定的关键词。只有
complex、complicated、clear、chaotic和confusion被识别。 - 字段可以以任何顺序声明;它们在图中的位置始终相同(复杂在左上,困难在右上,混乱在左下,清晰在右下,困惑在中心)。
confusion域有一个紧凑的中心椭圆。在其中最多显示 3 个项目;如果提供的项目更多,则会显示一个+N more溢出徽章。实际上,混淆域应该包含非常少的项目——它的目的是将未知项显示出来,以便可以将它们移到四个主要域中的一个。- 自环转换(例如
complex --> complex)会被默默忽略。转换必须连接两个不同的域。 - 手绘模式目前不支持。
- 波浪形边界渲染是确定性的:相同的输入总是生成相同的图表,因此不同版本之间的差异是稳定的。
可访问性
🌐 Accessibility
Cynefin 图表支持标准的 mermaid 可访问性指令:
🌐 Cynefin diagrams support the standard mermaid accessibility directives:
cynefin-beta
accTitle: Cynefin framework for software delivery decisions
accDescr: A Cynefin map categorizing software tasks by complexity domain
complex
"New feature discovery"