@taloswork/ose-shared 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/mcp/gen/mcp.json +2 -2
  2. package/package.json +3 -3
  3. package/skills/cozy-static-svg/SKILL.md +76 -0
  4. package/skills/cozy-static-svg/references/approved-preview.png +0 -0
  5. package/skills/cozy-static-svg/references/cross-platform.md +73 -0
  6. package/skills/cozy-static-svg/references/moon_keeps_watch.svg +229 -0
  7. package/skills/cozy-static-svg/references/style-anchor.md +271 -0
  8. package/skills/cozy-static-svg/scripts/artkit.py +321 -0
  9. package/skills/cozy-static-svg/scripts/to_png.py +333 -0
  10. package/skills/diagram-design/SKILL.md +568 -0
  11. package/skills/diagram-design/assets/example-architecture-dark.html +182 -0
  12. package/skills/diagram-design/assets/example-architecture-full.html +194 -0
  13. package/skills/diagram-design/assets/example-architecture.html +183 -0
  14. package/skills/diagram-design/assets/example-bar-dark.html +129 -0
  15. package/skills/diagram-design/assets/example-bar-full.html +105 -0
  16. package/skills/diagram-design/assets/example-bar.html +129 -0
  17. package/skills/diagram-design/assets/example-data-flow-dark.html +143 -0
  18. package/skills/diagram-design/assets/example-data-flow-full.html +185 -0
  19. package/skills/diagram-design/assets/example-data-flow.html +143 -0
  20. package/skills/diagram-design/assets/example-datalake-dark.html +243 -0
  21. package/skills/diagram-design/assets/example-datalake-full.html +248 -0
  22. package/skills/diagram-design/assets/example-datalake.html +269 -0
  23. package/skills/diagram-design/assets/example-dp-integration-dark.html +80 -0
  24. package/skills/diagram-design/assets/example-dp-integration-full.html +90 -0
  25. package/skills/diagram-design/assets/example-dp-integration.html +80 -0
  26. package/skills/diagram-design/assets/example-dp-security-matrix-dark.html +31 -0
  27. package/skills/diagram-design/assets/example-dp-security-matrix-full.html +32 -0
  28. package/skills/diagram-design/assets/example-dp-security-matrix.html +88 -0
  29. package/skills/diagram-design/assets/example-er-dark.html +202 -0
  30. package/skills/diagram-design/assets/example-er-full.html +205 -0
  31. package/skills/diagram-design/assets/example-er.html +202 -0
  32. package/skills/diagram-design/assets/example-flowchart-dark.html +156 -0
  33. package/skills/diagram-design/assets/example-flowchart-full.html +159 -0
  34. package/skills/diagram-design/assets/example-flowchart.html +156 -0
  35. package/skills/diagram-design/assets/example-gantt-dark.html +137 -0
  36. package/skills/diagram-design/assets/example-gantt-full.html +127 -0
  37. package/skills/diagram-design/assets/example-gantt.html +137 -0
  38. package/skills/diagram-design/assets/example-high-level-dark.html +251 -0
  39. package/skills/diagram-design/assets/example-high-level-full.html +247 -0
  40. package/skills/diagram-design/assets/example-high-level-vertical-dark.html +274 -0
  41. package/skills/diagram-design/assets/example-high-level-vertical-full.html +252 -0
  42. package/skills/diagram-design/assets/example-high-level-vertical.html +325 -0
  43. package/skills/diagram-design/assets/example-high-level.html +301 -0
  44. package/skills/diagram-design/assets/example-import-drawio.html +185 -0
  45. package/skills/diagram-design/assets/example-import-mermaid.html +70 -0
  46. package/skills/diagram-design/assets/example-it-state-dark.html +90 -0
  47. package/skills/diagram-design/assets/example-it-state-full.html +69 -0
  48. package/skills/diagram-design/assets/example-it-state.html +128 -0
  49. package/skills/diagram-design/assets/example-layers-dark.html +123 -0
  50. package/skills/diagram-design/assets/example-layers-full.html +126 -0
  51. package/skills/diagram-design/assets/example-layers.html +123 -0
  52. package/skills/diagram-design/assets/example-line-dark.html +111 -0
  53. package/skills/diagram-design/assets/example-line-full.html +105 -0
  54. package/skills/diagram-design/assets/example-line.html +111 -0
  55. package/skills/diagram-design/assets/example-loop-dark.html +100 -0
  56. package/skills/diagram-design/assets/example-loop-full.html +137 -0
  57. package/skills/diagram-design/assets/example-loop-terminal.html +347 -0
  58. package/skills/diagram-design/assets/example-loop.html +100 -0
  59. package/skills/diagram-design/assets/example-medallion-dark.html +159 -0
  60. package/skills/diagram-design/assets/example-medallion-full.html +201 -0
  61. package/skills/diagram-design/assets/example-medallion.html +159 -0
  62. package/skills/diagram-design/assets/example-nested-dark.html +132 -0
  63. package/skills/diagram-design/assets/example-nested-full.html +135 -0
  64. package/skills/diagram-design/assets/example-nested.html +136 -0
  65. package/skills/diagram-design/assets/example-org-chart-dark.html +45 -0
  66. package/skills/diagram-design/assets/example-org-chart-full.html +45 -0
  67. package/skills/diagram-design/assets/example-org-chart.html +45 -0
  68. package/skills/diagram-design/assets/example-paved-road-animated.html +546 -0
  69. package/skills/diagram-design/assets/example-policy-trace-animated.html +490 -0
  70. package/skills/diagram-design/assets/example-process-dark.html +64 -0
  71. package/skills/diagram-design/assets/example-process-full.html +74 -0
  72. package/skills/diagram-design/assets/example-process.html +64 -0
  73. package/skills/diagram-design/assets/example-pyramid-dark.html +119 -0
  74. package/skills/diagram-design/assets/example-pyramid-full.html +122 -0
  75. package/skills/diagram-design/assets/example-pyramid.html +119 -0
  76. package/skills/diagram-design/assets/example-quadrant-consultant.html +166 -0
  77. package/skills/diagram-design/assets/example-quadrant-dark.html +135 -0
  78. package/skills/diagram-design/assets/example-quadrant-full.html +138 -0
  79. package/skills/diagram-design/assets/example-quadrant.html +135 -0
  80. package/skills/diagram-design/assets/example-queue-animated.html +577 -0
  81. package/skills/diagram-design/assets/example-radar-dark.html +139 -0
  82. package/skills/diagram-design/assets/example-radar-full.html +135 -0
  83. package/skills/diagram-design/assets/example-radar.html +139 -0
  84. package/skills/diagram-design/assets/example-scatter-dark.html +141 -0
  85. package/skills/diagram-design/assets/example-scatter-full.html +116 -0
  86. package/skills/diagram-design/assets/example-scatter.html +141 -0
  87. package/skills/diagram-design/assets/example-sequence-dark.html +222 -0
  88. package/skills/diagram-design/assets/example-sequence-full.html +388 -0
  89. package/skills/diagram-design/assets/example-sequence-oauth-dark.html +188 -0
  90. package/skills/diagram-design/assets/example-sequence-oauth-full.html +350 -0
  91. package/skills/diagram-design/assets/example-sequence-oauth.html +227 -0
  92. package/skills/diagram-design/assets/example-sequence.html +222 -0
  93. package/skills/diagram-design/assets/example-state-dark.html +147 -0
  94. package/skills/diagram-design/assets/example-state-full.html +150 -0
  95. package/skills/diagram-design/assets/example-state.html +147 -0
  96. package/skills/diagram-design/assets/example-swimlane-dark.html +172 -0
  97. package/skills/diagram-design/assets/example-swimlane-full.html +175 -0
  98. package/skills/diagram-design/assets/example-swimlane.html +172 -0
  99. package/skills/diagram-design/assets/example-timeline-dark.html +135 -0
  100. package/skills/diagram-design/assets/example-timeline-full.html +138 -0
  101. package/skills/diagram-design/assets/example-timeline.html +135 -0
  102. package/skills/diagram-design/assets/example-tree-dark.html +173 -0
  103. package/skills/diagram-design/assets/example-tree-full.html +176 -0
  104. package/skills/diagram-design/assets/example-tree.html +173 -0
  105. package/skills/diagram-design/assets/example-venn-dark.html +132 -0
  106. package/skills/diagram-design/assets/example-venn-full.html +135 -0
  107. package/skills/diagram-design/assets/example-venn.html +110 -0
  108. package/skills/diagram-design/assets/icons.html +230 -0
  109. package/skills/diagram-design/assets/index.html +369 -0
  110. package/skills/diagram-design/assets/template-dark.html +85 -0
  111. package/skills/diagram-design/assets/template-full.html +413 -0
  112. package/skills/diagram-design/assets/template-motion.html +434 -0
  113. package/skills/diagram-design/assets/template-terminal.html +173 -0
  114. package/skills/diagram-design/assets/template.html +86 -0
  115. package/skills/diagram-design/references/animation.md +141 -0
  116. package/skills/diagram-design/references/export.md +136 -0
  117. package/skills/diagram-design/references/import-drawio.md +171 -0
  118. package/skills/diagram-design/references/import-mermaid.md +126 -0
  119. package/skills/diagram-design/references/onboarding.md +297 -0
  120. package/skills/diagram-design/references/output-spec.md +181 -0
  121. package/skills/diagram-design/references/primitive-annotation.md +36 -0
  122. package/skills/diagram-design/references/primitive-icons.md +827 -0
  123. package/skills/diagram-design/references/primitive-sketchy.md +43 -0
  124. package/skills/diagram-design/references/primitive-terminal.md +76 -0
  125. package/skills/diagram-design/references/semantic-patterns.md +122 -0
  126. package/skills/diagram-design/references/style-guide.md +139 -0
  127. package/skills/diagram-design/references/type-architecture.md +78 -0
  128. package/skills/diagram-design/references/type-bar.md +48 -0
  129. package/skills/diagram-design/references/type-data-flow.md +374 -0
  130. package/skills/diagram-design/references/type-dp-integration.md +410 -0
  131. package/skills/diagram-design/references/type-dp-security-matrix.md +379 -0
  132. package/skills/diagram-design/references/type-er.md +23 -0
  133. package/skills/diagram-design/references/type-flowchart.md +23 -0
  134. package/skills/diagram-design/references/type-gantt.md +45 -0
  135. package/skills/diagram-design/references/type-high-level.md +458 -0
  136. package/skills/diagram-design/references/type-it-state.md +470 -0
  137. package/skills/diagram-design/references/type-layers.md +26 -0
  138. package/skills/diagram-design/references/type-line.md +44 -0
  139. package/skills/diagram-design/references/type-loop.md +223 -0
  140. package/skills/diagram-design/references/type-medallion.md +356 -0
  141. package/skills/diagram-design/references/type-nested.md +22 -0
  142. package/skills/diagram-design/references/type-org-chart.md +44 -0
  143. package/skills/diagram-design/references/type-process.md +495 -0
  144. package/skills/diagram-design/references/type-pyramid.md +33 -0
  145. package/skills/diagram-design/references/type-quadrant.md +81 -0
  146. package/skills/diagram-design/references/type-radar.md +80 -0
  147. package/skills/diagram-design/references/type-scatter.md +39 -0
  148. package/skills/diagram-design/references/type-sequence.md +130 -0
  149. package/skills/diagram-design/references/type-state.md +21 -0
  150. package/skills/diagram-design/references/type-swimlane.md +20 -0
  151. package/skills/diagram-design/references/type-timeline.md +20 -0
  152. package/skills/diagram-design/references/type-tree.md +24 -0
  153. package/skills/diagram-design/references/type-venn.md +26 -0
  154. package/skills/diagram-design/scripts/drawio_extract.py +856 -0
  155. package/skills/diagram-design/scripts/mermaid_extract.py +1285 -0
  156. package/skills/diagram-design/scripts/self_check.py +389 -0
  157. package/skills/document/SKILL.md +63 -75
  158. package/skills/document/bin/deck-build.cjs +51 -1
  159. package/skills/document/bin/deck-qa.cjs +18745 -279
  160. package/skills/document/bin/doc-convert.cjs +9280 -76489
  161. package/skills/document/bin/doc-fill.cjs +0 -0
  162. package/skills/document/bin/doc-gen.cjs +3043 -46825
  163. package/skills/document/bin/doc-run.cjs +65095 -1967
  164. package/skills/document/bin/doc-scan.cjs +0 -0
  165. package/skills/document/bin/doc-text.cjs +0 -0
  166. package/skills/document/bin/doc-validate.cjs +18067 -226
  167. package/skills/document/bin/doc-xml.cjs +1 -1
  168. package/skills/document/bin/docx-annotate.cjs +0 -0
  169. package/skills/document/bin/html2pptx.cjs +32498 -145280
  170. package/skills/document/bin/ocr-worker.cjs +0 -0
  171. package/skills/document/bin/ocr.cjs +0 -0
  172. package/skills/document/bin/pdf-form.cjs +0 -0
  173. package/skills/document/bin/pdf-images.cjs +0 -0
  174. package/skills/document/bin/pdf-ops.cjs +0 -0
  175. package/skills/document/bin/pdf-render.cjs +11 -9
  176. package/skills/document/bin/pdf-tables.cjs +0 -0
  177. package/skills/document/bin/pptx-clone.cjs +21 -25
  178. package/skills/document/bin/pptx-embed-fonts.cjs +8 -6
  179. package/skills/document/bin/pptx-set-image.cjs +0 -0
  180. package/skills/document/bin/pptx-slide.cjs +22 -32
  181. package/skills/document/bin/pptx-theme.cjs +1 -20
  182. package/skills/document/bin/pptx-tokenize.cjs +1 -1
  183. package/skills/document/bin/xlsx-query.cjs +0 -0
  184. package/skills/document/bin/xlsx-recalc.cjs +0 -0
  185. package/skills/document/bin-reference.md +35 -0
  186. package/skills/document/content-pipeline.md +19 -18
  187. package/skills/document/deck-design.md +110 -211
  188. package/skills/document/layouts/README.md +4 -33
  189. package/skills/document/motion/README.md +4 -2
  190. package/skills/document/office.md +5 -1
  191. package/skills/document/rewrite.md +43 -99
  192. package/skills/document/styles/README.md +0 -7
  193. package/skills/document/theme-system.md +1 -0
  194. package/skills/document/themes/README.md +5 -5
  195. package/skills/document/themes/anthropic-clay.json +1 -7
  196. package/skills/document/themes/apple-keynote.json +1 -7
  197. package/skills/document/themes/black-gold.json +1 -2
  198. package/skills/document/themes/cinereel.json +1 -2
  199. package/skills/document/themes/cool-tech.json +1 -2
  200. package/skills/document/themes/hand-drawn.json +1 -2
  201. package/skills/document/themes/ivory-gold.json +1 -2
  202. package/skills/document/themes/magazine-ink.json +1 -2
  203. package/skills/document/themes/mckinsey-consulting.json +1 -7
  204. package/skills/document/themes/mono.json +1 -2
  205. package/skills/document/themes/swiss-grid.json +1 -2
  206. package/skills/document/themes/warm-editorial.json +1 -2
  207. package/skills/image-layout/SKILL.md +1 -1
  208. package/skills/image-layout/bin/html2img.cjs +0 -0
@@ -0,0 +1,43 @@
1
+ # Sketchy Filter (hand-drawn variant)
2
+
3
+ Optional displacement filter that wobbles every stroke and edge slightly — turns any minimal variant into a hand-drawn "editorial" register without changing layout. Use when the diagram accompanies an essay rather than technical docs.
4
+
5
+ ## Grammar
6
+
7
+ ```svg
8
+ <defs>
9
+ <filter id="sketchy" x="-2%" y="-2%" width="104%" height="104%">
10
+ <feTurbulence type="fractalNoise" baseFrequency="0.02" numOctaves="2" seed="4"/>
11
+ <feDisplacementMap in="SourceGraphic" scale="1.5"/>
12
+ </filter>
13
+ </defs>
14
+
15
+ <!-- Apply to a group wrapping shapes — NOT text -->
16
+ <g filter="url(#sketchy)">
17
+ <!-- rects, paths, circles, lines go here -->
18
+ </g>
19
+
20
+ <!-- Text sits OUTSIDE the filtered group — legibility stays crisp -->
21
+ <text ...>Labels go here</text>
22
+ ```
23
+
24
+ ## Tuning
25
+
26
+ | Parameter | Range | Effect |
27
+ |---|---|---|
28
+ | `baseFrequency` | 0.01–0.04 | Lower = lazy wavy lines; higher = jittery. 0.02 default. |
29
+ | `numOctaves` | 1–3 | More = more noise detail. 2 is plenty. |
30
+ | `scale` | 1–6 | 1 barely-there, 1.5 default, 2 visible, 4+ cartoon. |
31
+ | `seed` | integer | Swap for a different random pattern. |
32
+
33
+ ## Critical rule
34
+ Filter shapes, NOT text. Displacement-mapped text becomes illegible. Structure your SVG so text is in a sibling group outside the filtered group.
35
+
36
+ ## When to use
37
+ - Essay / blog post / newsletter where the diagram is the hero of a narrative page.
38
+ - "Working sketch" register — showing something is mid-thought, not final architecture.
39
+
40
+ ## When not to use
41
+ - Technical documentation (precision matters).
42
+ - Diagrams with dense labels or tight alignments (filter reads as noise).
43
+ - Dark variants — wobble reads as artifact on dark backgrounds. Test first.
@@ -0,0 +1,76 @@
1
+ # Terminal Window (CLI-chrome variant)
2
+
3
+ Optional full-page skin that wraps any diagram in a fake terminal window — titlebar with three dots, a `$` prompt line, monospace type throughout. Use for dev-tool announcements, CLI-product posts, and technical social cards where a screenshot needs to read as "terminal," not "editorial doc."
4
+
5
+ This is a **second, fixed skin** — see [style-guide.md § Terminal skin](style-guide.md#terminal-skin-opt-in-alternate) for the token table. It does not inherit from `onboarding.md` brand tokens and isn't part of the light/dark inversion rule; every terminal example uses the same nine tokens regardless of the host site's brand.
6
+
7
+ ## Grammar
8
+
9
+ ```html
10
+ <div class="terminal">
11
+ <div class="titlebar">
12
+ <div class="dot accent"></div>
13
+ <div class="dot"></div>
14
+ <div class="dot"></div>
15
+ <div class="titlebar-name">loop.sh — self-improving-loop</div>
16
+ </div>
17
+ <main class="frame">
18
+ <p class="prompt">
19
+ <span class="sign">$</span> diagram-design render --type loop
20
+ </p>
21
+ <h1># The self-improving loop</h1>
22
+ <svg>...</svg>
23
+ </main>
24
+ </div>
25
+ ```
26
+
27
+ ```css
28
+ body {
29
+ background: var(--terminal-page);
30
+ }
31
+ .terminal {
32
+ background: var(--terminal-paper);
33
+ border: 1px solid var(--terminal-border);
34
+ border-radius: 12px;
35
+ }
36
+ .titlebar {
37
+ background: var(--terminal-bar);
38
+ border-bottom: 1px solid var(--terminal-border);
39
+ }
40
+ .dot {
41
+ background: var(--terminal-soft);
42
+ }
43
+ .dot.accent {
44
+ background: var(--terminal-accent);
45
+ }
46
+ ```
47
+
48
+ Inside the SVG, swap the default light/dark tokens 1:1 for their `terminal-*` equivalents: `paper` → `terminal-paper`, `ink` → `terminal-ink`, `muted`/`soft` → `terminal-muted`/`terminal-soft`, `accent`/`accent-tint` → `terminal-accent`/`terminal-accent-tint`. The hub/focal-node pattern (inverted fill for the one highlighted element) still applies.
49
+
50
+ ## Typography
51
+
52
+ **Everything is monospace** — this is the one variant where that's correct. Drop Instrument Serif and Geist sans entirely; set the page title in mono, bold, prefixed with `# ` (reads as a comment line). The eyebrow becomes a shell prompt: `$ ` in `terminal-accent`, the command in `terminal-muted`.
53
+
54
+ Run every text role about **1–2px above** the default type scale in `style-guide.md` (e.g. `node-name` 12px → 14px, `sublabel`/`arrow-label` 8–9px → 9–10px, hub label 16px → 18px). Monospace at the default sizes reads small next to the sans/serif mix it's replacing, and these cards are usually viewed at social-feed scale, not full-bleed.
55
+
56
+ ## Titlebar dots
57
+
58
+ Three 10px circles, macOS-style. The **1-accent rule caps the color use here too**: one dot is `terminal-accent`, the other two are `terminal-soft`. Do not use a red/yellow/green traffic-light triad — that's a second and third hue, which the palette forbids.
59
+
60
+ ## Critical rules
61
+
62
+ - No pure black (`#000000`) — use `terminal-page` (`#0a0a0a`) / `terminal-paper` (`#141414`). Same rule as the default skin, same reason: true black clips on OLED and in print.
63
+ - One accent only. If a diagram needs a second focal element, use `terminal-ink` (white) for emphasis via weight/size, not a second color.
64
+ - Background dot-grid pattern (if used) stays `rgba(255,255,255,0.06–0.08)` — barely visible texture, not a visual competitor to the titlebar chrome.
65
+
66
+ ## When to use
67
+
68
+ - Dev-tool / CLI-product launch posts (npm package, CLI flag, terminal-based workflow).
69
+ - Technical social cards where "this is a tool for engineers" is part of the message.
70
+ - Screenshots meant to pop in a dark-mode-heavy feed (X, Discord, dev blogs).
71
+
72
+ ## When not to use
73
+
74
+ - Editorial / long-form posts — pair with the default light or full-editorial variant instead.
75
+ - Brand-matched output from `onboarding.md` — terminal is a fixed skin, not brand-tokenized. Don't try to reconcile the two.
76
+ - Any diagram where the audience isn't developer-coded to read `$`/`#`/titlebar-dots as chrome rather than content.
@@ -0,0 +1,122 @@
1
+ # Semantic patterns
2
+
3
+ Semantic patterns describe **what a system does**; the 27 visual types describe **how information is arranged**. Choose a pattern first when behavior, state, enforcement, or risk is load-bearing, then use its nearest visual type as the layout grammar. If no pattern matches, choose a visual type directly.
4
+
5
+ Use one primary pattern per figure. A second pattern may supply at most one supporting primitive; if both need full treatment, split overview and detail. Labels and outcomes must remain complete in a static frame.
6
+
7
+ ## Routing table
8
+
9
+ | The reader must understand… | Semantic pattern | Nearest visual type |
10
+ |---|---|---|
11
+ | Many arrivals competing for finite service capacity | **Fan-in queue / bottleneck** | Data flow |
12
+ | Repeated questions, inputs, controls, and outputs across stages | **Stage framework with semantic slots** | Process |
13
+ | A loose conversation becoming a durable structured record | **Unstructured input → structured artifact** | Data flow |
14
+ | Why two policy decisions differ and where they first diverge | **Paired policy-evaluation traces** | Flowchart |
15
+ | Which routes cross a trust boundary and which routes are blocked | **Secure paved road** | Architecture |
16
+ | Which controls apply at each enforcement surface | **Governance / control catalog** | Layer stack |
17
+ | How defenses reduce risk and what risk remains | **Compensating security layers** | Layer stack |
18
+
19
+ ## 1. Fan-in queue / bottleneck
20
+
21
+ **Selection triggers:** Several producers converge on one reviewer, service, gate, or constrained resource; the story depends on arrival rate, queue depth, wait, capacity, or backpressure.
22
+
23
+ **Required primitives:** Distinct sources; fanned ingress; an ordered queue with visible slots and count; a capacity/service-rate label; one constrained service point; admitted and deferred/rejected outcomes. Label units (`8/hour`, `3 slots`), not just “high.”
24
+
25
+ **Complexity budget:** ≤5 sources, ≤5 queue slots, one bottleneck, two outcomes, and ≤9 primary nodes. Aggregate excess sources as a named cohort.
26
+
27
+ **Anti-patterns:** Equal-width pipeline that hides contention; arrows merged before they can be traced; capacity implied only by box size; decorative pile-up; animation that changes item order; red alone meaning overloaded.
28
+
29
+ **Static fallback:** Show the representative final queue, numeric count/capacity, bottleneck label, and both outcome paths. A still must reveal why work waits.
30
+
31
+ **Nearest visual type:** **Data flow** by default; use **Process** when service stages, rather than sources, dominate.
32
+
33
+ ## 2. Stage framework with semantic slots
34
+
35
+ **Selection triggers:** A lifecycle or operating model repeats the same semantic questions across stages, commonly Question, Input, Governance, and Output. Cross-stage comparability matters more than message timing.
36
+
37
+ **Required primitives:** Ordered stage headers; a consistent slot grid; explicit empty/not-applicable slots; stage-to-stage handoff; stable slot labels; one primary output per stage. Preserve slot order in every stage.
38
+
39
+ **Complexity budget:** 3–6 stages, 3–4 slot kinds, ≤20 populated cells, ≤2 lines per cell. Split detail when a cell needs prose.
40
+
41
+ **Anti-patterns:** Each stage invents a different internal layout; slot meaning encoded by position with no labels; fake precision from dozens of cells; confusing stage order with ownership lanes; shrinking text to keep one canvas.
42
+
43
+ **Static fallback:** Render the full stage × slot matrix with handoffs and explicit `—` or `Not applicable` entries. Do not depend on staged reveal to teach the schema.
44
+
45
+ **Nearest visual type:** **Process**; use **Swimlane** only when the repeated rows represent owners rather than semantic slots.
46
+
47
+ ## 3. Unstructured input → structured artifact
48
+
49
+ **Selection triggers:** Dialogue, notes, prompts, or a rambling request are elicited, normalized, and written into a durable brief, ticket, record, schema, or other structured artifact.
50
+
51
+ **Required primitives:** Source utterance(s); clarifying questions; extracted field/value pairs; a named transformation; the durable artifact boundary; provenance links from representative statements to fields; missing/unknown state.
52
+
53
+ **Complexity budget:** ≤4 exchanges, ≤6 artifact fields, one transformation, and ≤3 provenance links. Show representative content, not a transcript.
54
+
55
+ **Anti-patterns:** “AI magic” sparkle between two boxes; artifact shown as another chat bubble; fields appearing without sources; inventing certainty for missing facts; typing animation as the only readable copy.
56
+
57
+ **Static fallback:** Show a short source excerpt beside the completed labeled artifact, with at least one provenance mapping and any unknown fields visible.
58
+
59
+ **Nearest visual type:** **Data flow**; use **Process** when elicitation has several ordered gates.
60
+
61
+ ## 4. Paired policy-evaluation traces
62
+
63
+ **Selection triggers:** Two otherwise similar requests reach different outcomes; the reader needs rule-by-rule `PASS`, `FAIL`, `SKIPPED`, or `NOT REACHED` state and the first divergence.
64
+
65
+ **Required primitives:** The same ordered rules on both traces; explicit status text plus symbol/shape; inputs that differ; final outcomes; a labeled first-divergence marker; a distinction between `SKIPPED` (applicable flow intentionally bypassed) and `NOT REACHED` (evaluation stopped earlier).
66
+
67
+ **Complexity budget:** Exactly 2 traces, 3–6 rules, one first divergence, ≤12 status cells, and one outcome per trace. Move rule prose to notes if labels exceed one line.
68
+
69
+ **Anti-patterns:** Comparing two independently ordered flows; green/red dots without words; treating skipped and not-reached as synonyms; highlighting every difference; continuing a denied trace as if downstream rules ran.
70
+
71
+ **Static fallback:** Show all rule states and both outcomes at once; use a persistent bracket/line and label for the first divergence.
72
+
73
+ **Nearest visual type:** **Flowchart** for ordered decision logic; use **Sequence** only when messages between actors and time are also load-bearing.
74
+
75
+ ## 5. Secure paved road
76
+
77
+ **Selection triggers:** A supported architecture creates a bounded route from intake/build to deployment; trust boundaries, privileged moments, permitted ingress, forbidden ingress, and approved versus blocked deploy paths are the point.
78
+
79
+ **Required primitives:** Labeled trust boundaries; actors and identities; permitted ingress with a positive text label; forbidden ingress terminating at the boundary; approved deployment path; blocked bypass path; privileged gate; isolated runtime; audit destination. Use different line styles and stop symbols in addition to color.
80
+
81
+ **Complexity budget:** ≤3 trust zones, ≤8 components, ≤10 paths, ≤2 forbidden paths, and one privileged gate. Split control detail into a catalog figure.
82
+
83
+ **Anti-patterns:** Dashed box called “security” with no route semantics; forbidden arrow crossing into the protected zone; secrets or identity implied but unlabeled; every component styled as trusted; a bypass path that visually rejoins the approved route.
84
+
85
+ **Static fallback:** Render every boundary and both permitted/forbidden routes. Blocked paths must visibly stop before entry or deployment.
86
+
87
+ **Nearest visual type:** **Architecture**.
88
+
89
+ ## 6. Governance / control catalog
90
+
91
+ **Selection triggers:** A control inventory must be understood by where it is enforced: authoring, workspace, merge/CI, deploy/runtime, or another named surface. A single checklist would hide those enforcement points.
92
+
93
+ **Required primitives:** Enforcement-surface groups; named controls; enforcement actor (`code`, `platform`, `human`); timing (`write`, `merge`, `deploy`, `run`); bypassability or exception route; coverage/gap notation.
94
+
95
+ **Complexity budget:** 3–5 surfaces, 3–7 controls per surface, ≤24 controls total, and ≤3 attributes per control. Summarize counts only when the item list exists elsewhere.
96
+
97
+ **Anti-patterns:** 35 tiny pills; grouping by vague themes instead of enforcement point; mixing aspirations with enforced controls; icons without control names; claiming defense-in-depth without showing surface coverage.
98
+
99
+ **Static fallback:** Show the complete grouped catalog with surface headers and text labels for actor and enforcement timing; preserve gaps and exceptions.
100
+
101
+ **Nearest visual type:** **Layer stack**; use **DP security matrix** when role permissions, not enforcement surfaces, are the dominant comparison.
102
+
103
+ ## 7. Compensating security layers
104
+
105
+ **Selection triggers:** No layer is perfect; each defense covers a failure left by the previous layer, and residual risk must visibly narrow, transfer, or remain through the stack.
106
+
107
+ **Required primitives:** Ordered threat/risk input; named defensive layers; each layer's mitigation; explicit limitation or escape; residual-risk carrier between layers; final residual risk and consequence/response. Use labels or decreasing measures, never area alone.
108
+
109
+ **Complexity budget:** 3–5 layers, one primary risk thread, ≤2 mitigations per layer, and one final residual-risk statement. Split multiple unrelated threats into separate figures.
110
+
111
+ **Anti-patterns:** Implying the final layer makes risk zero; equal opaque slabs with no propagation; treating audit as prevention; shrinking shapes without numeric or verbal meaning; reversing prevention/detection/recovery order without explanation.
112
+
113
+ **Static fallback:** Show the complete propagation chain: initial risk → mitigation → escaped risk at every layer → final residual risk and response.
114
+
115
+ **Nearest visual type:** **Layer stack**; use **Nested** when containment boundaries, rather than ordered compensation, carry the meaning.
116
+
117
+ ## Composition rules
118
+
119
+ - The semantic pattern may specialize status, boundary, queue, or propagation primitives; the selected type still owns page axis, connector grammar, spacing, and type-specific limits.
120
+ - Apply the stricter of the pattern budget and visual-type budget. Semantic cells/statuses are not permission to exceed the nine-node overview target.
121
+ - Use stable text for states and outcomes. Color, motion, and position reinforce meaning but never carry it alone.
122
+ - Optional animation is a presentation layer, not another pattern. Load [`animation.md`](animation.md) only when motion is requested or materially clarifies ordered change.
@@ -0,0 +1,139 @@
1
+ # Style Guide
2
+
3
+ **The single source of truth for colors, typography, and tokens.** Every diagram draws from this — not from hex values inlined in other reference files. If you want to change the visual skin of Diagram Design, change this file.
4
+
5
+ Default skin is a cool editorial palette — white-smoke paper, jet-black ink, atomic-tangerine accent, blue-slate muted. It's designed to look good out of the box; swap these values (or run [`onboarding.md`](onboarding.md)) and every new diagram inherits the new skin without touching any type-specific logic.
6
+
7
+ To generate your own from a website URL, see [`onboarding.md`](onboarding.md).
8
+
9
+ ---
10
+
11
+ ## Tokens
12
+
13
+ ### Semantic roles
14
+
15
+ Every token is referred to by **semantic role**, not by its hex value. Type references (`type-*.md`) and SKILL.md say `accent`, not `#f7591f`.
16
+
17
+ | Role | Purpose | Default (light) | Default (dark) |
18
+ |---|---|---|---|
19
+ | `paper` | Page background, default node fill | `#f5f5f5` (white-smoke) | `#2d3142` (jet-black) |
20
+ | `paper-2` | Diagram container bg, secondary fill | `#ececec` | `#393e53` |
21
+ | `ink` | Primary text, primary stroke | `#2d3142` (jet-black) | `#f5f5f5` (white-smoke) |
22
+ | `muted` | Secondary text, default arrow stroke | `#4f5d75` (blue-slate) | `#bfc0c0` (silver) |
23
+ | `soft` | Sublabels, boundary labels | `#7a8399` | `#8e98ac` |
24
+ | `rule` | Hairline borders | `rgba(45,49,66,0.12)` | `rgba(245,245,245,0.12)` |
25
+ | `rule-solid` | Stronger borders, baselines | `#bfc0c0` (silver) | `rgba(191,192,192,0.25)` |
26
+ | `accent` | Focal / 1–2 max per diagram | `#eb6c36` (atomic-tangerine) | `#f08a59` |
27
+ | `accent-tint` | Fill for accent-bordered boxes | `rgba(235,108,54,0.08)` | `rgba(240,138,89,0.10)` |
28
+ | `link` | HTTP/API calls, external arrows | `#2e5aa8` | `#6a95d8` |
29
+
30
+ > **Brand palette source:** this skin maps to a five-color brand palette — `jet-black #2d3142`, `silver #bfc0c0`, `white-smoke #f5f5f5`, `atomic-tangerine #eb6c36`, `blue-slate #4f5d75`. The `soft`, `rule`, and `link` tokens are derived (lighter slate, ink-at-opacity, and a saturated variant in the blue-slate hue family) to cover roles the brand palette doesn't name directly.
31
+
32
+ > **Note:** The pre-baked example HTML files in `assets/` were built under an earlier skin. Regenerating them against the current `style-guide.md` is a v5.1 task. New diagrams the skill produces will use the tokens above.
33
+
34
+ ### Inversion rule (light → dark)
35
+
36
+ Any `rgba(28,25,23, X)` in light becomes `rgba(250,247,242, X)` in dark. Same opacities, RGB flipped. The accent gets a slight hue-shift brighter to read on dark paper.
37
+
38
+ ### Series palette (multi-series chart types only)
39
+
40
+ A small set of desaturated, editorial-tone colors for chart types that genuinely need to distinguish multiple overlapping entities (currently: **radar**). The "1-focal" rule still holds — `accent` is reserved for the focal series; the palette below covers the rest.
41
+
42
+ | Token | Light | Dark | Notes |
43
+ |---|---|---|---|
44
+ | `series-1` | `#7c8f6f` (sage) | `#9caf8f` | Non-focal series |
45
+ | `series-2` | `#5e7a9b` (dusty-blue) | `#82a0c0` | Non-focal series |
46
+ | `series-3` | `#b8915a` (mustard) | `#d3ad7a` | Non-focal series |
47
+ | `series-4` | `#9c6b50` (rust-brown) | `#b88670` | Non-focal series |
48
+ | `series-5` | `#6e6479` (slate) | `#8d8298` | Non-focal series |
49
+
50
+ Fills sit at `0.18` opacity light, `0.22` dark; strokes use the full color. **Don't backfill these tokens to non-chart types** — architecture, swimlane, etc. continue to use muted-ink variants. The series palette is opt-in for diagrams where overlapping shapes demand distinguishable color, not a license to add color elsewhere.
51
+
52
+ ### Terminal skin (opt-in alternate)
53
+
54
+ A self-contained palette for the terminal-window primitive (see [primitive-terminal.md](primitive-terminal.md)) — a CLI-chrome register for dev-tool posts and technical social cards. It does not replace the default skin above and isn't affected by onboarding; it's a second, fixed skin you opt into per-diagram.
55
+
56
+ | Token | Hex | Purpose |
57
+ |---|---|---|
58
+ | `terminal-page` | `#0a0a0a` | Page background behind the window |
59
+ | `terminal-paper` | `#141414` | Window body, node fill |
60
+ | `terminal-bar` | `#1b1b1b` | Titlebar strip |
61
+ | `terminal-border` | `#2b2b2b` | Window border, hairlines |
62
+ | `terminal-ink` | `#f5f5f5` | Primary text, primary stroke (same white-smoke as default `ink`) |
63
+ | `terminal-muted` | `#9a9a9a` | Secondary text, sublabels, ring stroke |
64
+ | `terminal-soft` | `#5c5c5c` | Tertiary — inactive dots, spokes |
65
+ | `terminal-accent` | `#ff5a36` | The one accent — focal station, prompt sign, active dot |
66
+ | `terminal-accent-tint` | `rgba(255,90,54,0.12)` | Fill for accent-bordered boxes |
67
+
68
+ **1-accent rule still holds.** Everything that isn't `terminal-ink` or `terminal-muted`/`terminal-soft` should be `terminal-accent` — never introduce a second hue.
69
+
70
+ ---
71
+
72
+ ## Typography
73
+
74
+ | Role | Family | Size | Weight | Usage |
75
+ |---|---|---|---|---|
76
+ | `title` | Instrument Serif | 1.75rem | 400 | Page H1 |
77
+ | `node-name` | Geist (sans) | 12px | 600 | Human-readable labels |
78
+ | `sublabel` | Geist Mono | 9px | 400 | Port, protocol, URL, field type |
79
+ | `eyebrow` | Geist Mono | 7–8px | 500, tracked 0.18em, uppercase | Type tags, axis labels |
80
+ | `arrow-label` | Geist Mono | 8px | 400, tracked 0.06em | Arrow annotations |
81
+ | `callout` | Instrument Serif *italic* | 14px | 400 | Editorial asides only |
82
+
83
+ ### Font stack
84
+
85
+ ```html
86
+ <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
87
+ ```
88
+
89
+ **Load-bearing rule:** Mono is for *technical* content (ports, commands, URLs, field types). Names go in Geist sans. Page title is Instrument Serif. Italic Instrument Serif is reserved for annotation callouts (see [primitive-annotation.md](primitive-annotation.md)). **Never JetBrains Mono** as a blanket "dev" font.
90
+
91
+ ---
92
+
93
+ ## Stroke, radius, spacing
94
+
95
+ | Token | Value | Use |
96
+ |---|---|---|
97
+ | `stroke-thin` | `0.8` | Tag-box outlines, leaf nodes |
98
+ | `stroke-default` | `1` | Most strokes |
99
+ | `stroke-strong` | `1.2` | Emphasis strokes |
100
+ | `radius-sm` | `4` | Small tags |
101
+ | `radius-md` | `6` | Node boxes |
102
+ | `radius-lg` | `8` | Containers, rings |
103
+ | `grid` | `4` | Every coord, size, and gap is divisible by 4 (hard rule) |
104
+
105
+ ---
106
+
107
+ ## Node type → treatment
108
+
109
+ Semantic role combinations — reference these by name in type specs.
110
+
111
+ | Type | Fill | Stroke |
112
+ |---|---|---|
113
+ | `focal` (1–2 max) | `accent-tint` | `accent` |
114
+ | `backend` | `#ffffff` (white) | `ink` |
115
+ | `store` | `ink @ 0.05` | `muted` |
116
+ | `external` | `ink @ 0.03` | `ink @ 0.30` |
117
+ | `input` | `muted @ 0.10` | `soft` |
118
+ | `optional` | `ink @ 0.02` | `ink @ 0.20` dashed `4,3` |
119
+ | `security` | `accent @ 0.05` | `accent @ 0.50` dashed `4,4` |
120
+
121
+ ---
122
+
123
+ ## Customizing the skin
124
+
125
+ Three options:
126
+
127
+ 1. **Run onboarding** — see [`onboarding.md`](onboarding.md). Drop a URL; the skill extracts the palette + fonts and rewrites this file.
128
+ 2. **Edit by hand** — change the hex values in the tables above. Run the pre-output taste gate afterward to verify the accent still reads as "focal" against the new paper color.
129
+ 3. **Brand handoff** — paste your existing design-token JSON into a new section here and map its tokens to the semantic roles above.
130
+
131
+ ### Constraints (don't break these)
132
+
133
+ - **Contrast**: `ink` must hit WCAG AA on `paper`. `muted` must hit AA on `paper` for 11px+ text.
134
+ - **One accent**: pick one color for `accent`. Two accents erases the focal signal.
135
+ - **No rainbow palette**: if your brand ships 8 colors, pick 3 (paper, ink, accent). The rest become `muted` variants.
136
+ - **Serif + sans + mono**: three families, not more. If brand typography is all sans, keep Instrument Serif for `title` and `callout` anyway — the contrast is load-bearing.
137
+ - **Paper is warm-neutral, not pure white**: pure white turns the design sterile. Pick a cream, bone, or light grey with a hint of warmth.
138
+ - **Dot pattern is optional, not default**: the 22×22 dot pattern is an opt-in "dotted paper" variant (good for long-form editorial hero diagrams). The default background is a clean `paper` fill, no pattern. When the pattern is enabled, it should sit at ~10% opacity of `ink` on `paper` — visible but quiet.
139
+ - **Container is clean by default**: the diagram sits directly on the page paper, no secondary container background or border. A framed variant (`paper-2` bg + `rule` border + 8px radius + padding) is available as an opt-in for card-heavy layouts, but don't reach for it by default — the extra chrome fights the figure.
@@ -0,0 +1,78 @@
1
+ # Architecture
2
+
3
+ **Best for:** system overviews, data-flow diagrams, integration maps, infra topology.
4
+
5
+ ## Layout conventions
6
+ - Group components by tier or trust boundary (frontend → backend → data; public → private).
7
+ - Primary flow runs left→right or top→down. Pick one and hold it.
8
+ - Draw arrows before boxes so z-order puts connections behind components.
9
+ - 1–2 coral focal nodes: the primary integration point, the primary data store, or the key decision node.
10
+ - Dashed boundary rectangles mark regions (VPC, security group, trust zone); labels sit on a paper-colored mask over the boundary line.
11
+
12
+ ## Connector style
13
+
14
+ **Rounded right-angle (orthogonal) connectors are MANDATORY** for all non-horizontal/vertical connections — diagonal `<line>` between off-axis nodes is a hard fail (see SKILL.md §6 Mandatory connector rules). Two-bend elbow path with `r=8`:
15
+
16
+ ```svg
17
+ <!-- right+down: from (x1,y1) to (x2,y2), mid = (x1+x2)/2 -->
18
+ <path d="M x1,y1 H mid-8 Q mid,y1 mid,y1+8 V y2-8 Q mid,y2 mid+8,y2 H x2"
19
+ fill="none" stroke="…" stroke-width="1.2" marker-end="url(#arrow)"/>
20
+ ```
21
+
22
+ Flip the vertical signs for right+up. Use a plain `<line>` only when endpoints share the same x or y. Arrow labels sit on the vertical segment, centered horizontally on `mid` and vertically between the two corners.
23
+
24
+ **Port selection — use top/bottom for vertical connectors.** When the destination is noticeably above or below the source, exit the source's top/bottom edge and enter the destination's top/bottom edge. Use a single-bend L-path (horizontal → corner → vertical into the node), not a left/right side port:
25
+
26
+ ```svg
27
+ <!-- entering a node from its bottom (destination above source) -->
28
+ <path d="M x1,y_src H x2-8 Q x2,y_src x2,y_src-8 V y_dst"
29
+ fill="none" stroke="…" stroke-width="1.2" marker-end="url(#arrow)"/>
30
+ ```
31
+
32
+ Reserve left/right ports for connections that travel primarily horizontally. Entering a node from the side on a mainly-vertical path looks like the arrow punctures the node face rather than arriving from above or below.
33
+
34
+ **Dashed paths — same routing rules.** Optional, return, async, and passive flows use `stroke-dasharray="4,3"` and a lighter stroke weight (`stroke-width="1"`). Apply the **same orthogonal routing, port-selection, and bridge/hop rules** as solid paths — the dash pattern only communicates semantic weight, not a different routing grammar. When a dashed path and a solid path must cross, bridge the dashed one (it is by definition the less important connection).
35
+
36
+ **Zone label margin.** Leave ≥16px between the bottom of the zone eyebrow label and the top of the first enclosed node. Size the zone rect tall enough to contain this header gap (zone `y` = node_top − 32; label mask `y` = zone_y + 4).
37
+
38
+ ## Crossing arrows — bridge / hop
39
+
40
+ When two orthogonal arrows must cross, add a small arc (hop/bridge) on the **less important** arrow at the crossing point. The more important arrow is drawn uninterrupted.
41
+
42
+ ```svg
43
+ <!-- Horizontal hop over a vertical crossing at x=cx, on a line at y -->
44
+ <path d="M x1,y H cx-8 a 8,8 0 0,1 16,0 H x2"
45
+ fill="none" stroke="…" stroke-width="1.2" marker-end="url(#arrow)"/>
46
+ ```
47
+
48
+ `a 8,8 0 0,1 16,0` is an SVG arc: rx=ry=8, large-arc=0, sweep=1 (curves visually upward), advancing 16px right — creating an 8px-radius semicircular bump over the crossing. For a vertical hop over a horizontal, use `a 8,8 0 0,0 0,16` on the vertical path.
49
+
50
+ Decide which arrow to bridge: bridge the one that is less semantically important (passive, secondary, write-back), or the one with lighter stroke weight (dashed, muted). Never bridge both.
51
+
52
+ ## Zone grouping
53
+
54
+ Group 2+ nodes that serve the same tier or trust boundary with a zone rect — drawn **before** arrows and nodes (z-order: bg → zones → arrows → nodes):
55
+
56
+ ```svg
57
+ <rect x="{x}" y="{y}" width="{w}" height="{h}" rx="8"
58
+ fill="rgba(45,49,66,0.02)" stroke="rgba(45,49,66,0.10)" stroke-width="0.8"/>
59
+ <rect x="{label_x}" y="{y+4}" width="{label_w}" height="12" rx="2" fill="{paper}"/>
60
+ <text x="{label_cx}" y="{y+13}" fill="rgba(45,49,66,0.40)" font-size="7"
61
+ font-family="'Geist Mono', monospace" text-anchor="middle" letter-spacing="0.14em">LAYER</text>
62
+ ```
63
+
64
+ Rules:
65
+ - Leave 12–16px above the first enclosed node — the eyebrow label sits in this margin.
66
+ - Zone fill: `rgba(45,49,66,0.02)` (2% ink wash). Any stronger competes with node fills.
67
+ - Max 3 zones per diagram. More and it reads like a swimlane (use that type instead).
68
+ - Dark mode: swap `rgba(45,49,66,…)` → `rgba(245,245,245,…)` same opacities; label mask fill = `paper` (dark).
69
+
70
+ ## Anti-patterns
71
+ - Every box in coral ("this is important too") — hierarchy collapses.
72
+ - Bidirectional arrow when one direction is obvious from context.
73
+ - Legend floating inside the diagram area.
74
+
75
+ ## Examples
76
+ - `assets/example-architecture.html` — minimal light
77
+ - `assets/example-architecture-dark.html` — minimal dark
78
+ - `assets/example-architecture-full.html` — full editorial
@@ -0,0 +1,48 @@
1
+ # Bar / Column Chart
2
+
3
+ **Best for:** comparing discrete quantities across categories or time intervals — sprint velocity, monthly revenue, feature adoption, cohort counts. Use when each category has a single numeric value and the comparison between bars is the primary message.
4
+
5
+ ## Layout conventions
6
+
7
+ - **Orientation:** Vertical bars (columns) are default. Horizontal bars are appropriate when category labels are long or you have more than 8 categories.
8
+ - **Plot area margins:** left 80px (y-axis labels), bottom 60px (x-axis labels), top 40px, right 40px — inside a `0 0 1000 500` viewBox.
9
+ - **Bar count cap:** 4–8 bars. More than 8 → group into periods or split into two charts.
10
+ - **Bar width:** ≥ 50% of the column pitch (the gap should never exceed the bar). Typical: pitch=110px, bar=72px.
11
+ - **Y-axis gridlines:** 4–6 horizontal lines at regular intervals. Stroke `rgba(45,49,66,0.08)` (very faint), 0.8px. X-axis baseline at `rgba(45,49,66,0.25)`, 1px.
12
+ - **Y-axis labels:** right-aligned Geist Mono 8px muted, at x=72 (8px left of the plot area).
13
+ - **X-axis labels:** centered below each bar, Geist sans 11px 600 for category names.
14
+ - **Value labels:** Geist Mono 8px above each bar. Focal bar label in accent; others in muted.
15
+ - **Focal bar:** 1 bar max in accent fill/stroke. All others in `muted @ 0.15` fill + `muted` stroke.
16
+ - **Y-axis line:** thin vertical `<line>` at x=80 from y=40 to y=420.
17
+
18
+ ### Bar element pattern
19
+
20
+ ```svg
21
+ <!-- Opaque paper mask prevents bleed from background -->
22
+ <rect x="X" y="Y" width="W" height="H" fill="#f5f5f5"/>
23
+ <!-- Bar body -->
24
+ <rect x="X" y="Y" width="W" height="H" fill="rgba(79,93,117,0.15)" stroke="#4f5d75" stroke-width="1"/>
25
+ <!-- Value label above bar -->
26
+ <text x="X+W/2" y="Y-8" fill="#4f5d75" font-size="8" font-family="'Geist Mono', monospace" text-anchor="middle">VALUE</text>
27
+ ```
28
+
29
+ Focal bar: replace fill with `rgba(235,108,54,0.12)`, stroke with `#eb6c36`, label fill with `#eb6c36`.
30
+
31
+ ## Anti-patterns
32
+
33
+ - More than 8 bars without grouping (illegible at normal scale).
34
+ - Truncated y-axis (not starting at 0) — distorts the magnitude comparison.
35
+ - Accent on more than 1 bar ("everything is important" = nothing is).
36
+ - 3-D bar extrusion — no shadows, no depth.
37
+ - Category labels rotated more than 45°; prefer short labels or horizontal chart instead.
38
+
39
+ ## Variants
40
+
41
+ - **Grouped bars:** two bars per category, side by side. Use `accent` for the primary series and `series-1` for the secondary. Max 2 groups.
42
+ - **Stacked bars:** segments stacked to total. Use `accent` for the focal segment; muted tints for others. Document the total at the top of each stack.
43
+
44
+ ## Examples
45
+
46
+ - `assets/example-bar.html` — minimal light
47
+ - `assets/example-bar-dark.html` — minimal dark
48
+ - `assets/example-bar-full.html` — full editorial