@brunosouzas/signwright 0.0.0-stage → 0.19.0

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 (76) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +15 -0
  3. package/README.md +567 -2
  4. package/dist/scripts/cover.d.ts +29 -0
  5. package/dist/scripts/cover.js +186 -0
  6. package/dist/src/fonts/embed.d.ts +7 -0
  7. package/dist/src/fonts/embed.js +221 -0
  8. package/dist/src/pieces/bank-objects.d.ts +12 -0
  9. package/dist/src/pieces/bank-objects.js +52 -0
  10. package/dist/src/pieces/brand-cast.d.ts +105 -0
  11. package/dist/src/pieces/brand-cast.js +221 -0
  12. package/dist/src/pieces/brand-notation-icons.d.ts +12 -0
  13. package/dist/src/pieces/brand-notation-icons.js +79 -0
  14. package/dist/src/pieces/category-icon.d.ts +12 -0
  15. package/dist/src/pieces/category-icon.js +55 -0
  16. package/dist/src/pieces/cover.d.ts +138 -0
  17. package/dist/src/pieces/cover.js +635 -0
  18. package/dist/src/pieces/diagram.d.ts +141 -0
  19. package/dist/src/pieces/diagram.js +201 -0
  20. package/dist/src/pieces/eip-icons.d.ts +12 -0
  21. package/dist/src/pieces/eip-icons.js +468 -0
  22. package/dist/src/pieces/emote.d.ts +13 -0
  23. package/dist/src/pieces/emote.js +88 -0
  24. package/dist/src/pieces/headline.d.ts +11 -0
  25. package/dist/src/pieces/headline.js +37 -0
  26. package/dist/src/pieces/index.d.ts +17 -0
  27. package/dist/src/pieces/index.js +20 -0
  28. package/dist/src/pieces/ink.d.ts +71 -0
  29. package/dist/src/pieces/ink.js +57 -0
  30. package/dist/src/pieces/keyboard.d.ts +9 -0
  31. package/dist/src/pieces/keyboard.js +33 -0
  32. package/dist/src/pieces/library.d.ts +320 -0
  33. package/dist/src/pieces/library.js +355 -0
  34. package/dist/src/pieces/link-icons.d.ts +23 -0
  35. package/dist/src/pieces/link-icons.js +101 -0
  36. package/dist/src/pieces/metro.d.ts +137 -0
  37. package/dist/src/pieces/metro.js +288 -0
  38. package/dist/src/pieces/node.d.ts +29 -0
  39. package/dist/src/pieces/node.js +56 -0
  40. package/dist/src/pieces/paper.d.ts +31 -0
  41. package/dist/src/pieces/paper.js +72 -0
  42. package/dist/src/pieces/params.d.ts +84 -0
  43. package/dist/src/pieces/params.js +158 -0
  44. package/dist/src/pieces/piece.d.ts +9 -0
  45. package/dist/src/pieces/piece.js +28 -0
  46. package/dist/src/pieces/pose.d.ts +16 -0
  47. package/dist/src/pieces/pose.js +30 -0
  48. package/dist/src/pieces/question-token.d.ts +9 -0
  49. package/dist/src/pieces/question-token.js +49 -0
  50. package/dist/src/pieces/react.d.ts +4 -0
  51. package/dist/src/pieces/react.js +13 -0
  52. package/dist/src/pieces/render.d.ts +2 -0
  53. package/dist/src/pieces/render.js +22 -0
  54. package/dist/src/pieces/skin.d.ts +22 -0
  55. package/dist/src/pieces/skin.js +13 -0
  56. package/dist/src/pieces/stamp.d.ts +11 -0
  57. package/dist/src/pieces/stamp.js +29 -0
  58. package/dist/src/pieces/supporting-cast.d.ts +35 -0
  59. package/dist/src/pieces/supporting-cast.js +168 -0
  60. package/dist/src/pieces/symbol.d.ts +13 -0
  61. package/dist/src/pieces/symbol.js +27 -0
  62. package/dist/src/pieces/ui-icons.d.ts +21 -0
  63. package/dist/src/pieces/ui-icons.js +35 -0
  64. package/dist/tokens/generated/tokens.d.ts +299 -0
  65. package/dist/tokens/generated/tokens.js +299 -0
  66. package/fonts/OFL.txt +97 -0
  67. package/fonts/SourceCodePro-Bold.ttf +0 -0
  68. package/fonts/SourceCodePro-Regular.ttf +0 -0
  69. package/fonts/SourceSans3-Black.ttf +0 -0
  70. package/fonts/SourceSans3-Bold.ttf +0 -0
  71. package/fonts/SourceSans3-Regular.ttf +0 -0
  72. package/fonts/SourceSerif4-Bold.ttf +0 -0
  73. package/package.json +88 -4
  74. package/tokens/generated/tokens.css +215 -0
  75. package/tokens/generated/tokens.json +298 -0
  76. package/tokens/generated/tokens.ts +302 -0
package/README.md CHANGED
@@ -1,3 +1,568 @@
1
- # Temporary Holding Version
1
+ # signwright
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/brunosouzas/signwright/actions/workflows/ci.yml/badge.svg)](https://github.com/brunosouzas/signwright/actions/workflows/ci.yml)
4
+ [![OpenSpec](https://github.com/brunosouzas/signwright/actions/workflows/openspec.yml/badge.svg)](https://github.com/brunosouzas/signwright/actions/workflows/openspec.yml)
5
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
6
+
7
+ The visual identity of [brunosouzas.com](https://brunosouzas.com): design tokens, and animated explainers made with code.
8
+
9
+ ![Four frames of the animated circuit-breaker state machine: CLOSED collecting call results, the arrow to OPEN, HALF_OPEN testing calls, and the full loop back to CLOSED.](docs/spikes/2026-10-22-motion-pilot/contact-sheet-16x9-en.png)
10
+
11
+ ## Contents
12
+
13
+ - [Status](#status)
14
+ - [What it is](#what-it-is)
15
+ - [How it works](#how-it-works)
16
+ - [Install](#install)
17
+ - [Commands](#commands)
18
+ - [How a scene is built](#how-a-scene-is-built)
19
+ - [Illustration pieces and covers](#illustration-pieces-and-covers)
20
+ - [Decisions](#decisions)
21
+ - [How this project is built](#how-this-project-is-built)
22
+ - [Security](#security)
23
+ - [Contributing](#contributing)
24
+ - [Licence](#licence)
25
+
26
+ ## Status
27
+
28
+ Early. The first change of the [roadmap](docs/roadmap.md) is implemented: the token source and its CSS, TypeScript and JSON exports, the motion components, and the circuit-breaker state machine as the first catalogue scene (16:9 and 4:5, Portuguese and English), with commands to render its stills and videos. The first variety scene, `publish-subscribe`, is implemented with independent message copies, Publish acceptance, two ACKs and a local invoice NACK. Its owner stills/video approval is pending; implementation is not visual approval. The illustration pieces (roadmap item 3), the metro and diagram pieces (item 6) stackledger's map markers, zones and icons (AB#167, 0.3.0) and the body diagram pieces (AB#141, 0.3.2) are implemented: the static drawing library that covers, banners, diagrams and scenes share, with a command that builds a blog cover from a JSON spec. The published covers are not ported to it yet (item 5). Mira, the four pillar characters, the two supporting characters (Balão and Chaves, 0.13.0), the bank objects and the emotes are pieces too ([ADR 0007](docs/adr/0007-mira-and-the-pillar-cast.md)); new videos are language-neutral by default ([ADR 0005](docs/adr/0005-neutral-videos-and-the-cast.md)). Since 0.7.0 every piece follows one grammar ([ADR 0009](docs/adr/0009-one-piece-grammar.md)) and every written SVG carries its Source faces ([ADR 0008](docs/adr/0008-type-inside-the-image.md)); see [Upgrading to 0.7.0](#upgrading-to-070). 0.8.0 maps the site palette onto the brand roles and adds the category badges; see [Upgrading to 0.8.0](#upgrading-to-080). 0.8.1 adds stackledger's accent, retunes the city backdrop to the v2 neutrals and redraws `ledgerMark` as a white page; see [Upgrading to 0.8.1](#upgrading-to-081).
29
+
30
+ ## What it is
31
+
32
+ The blog's articles explain how systems behave: a circuit breaker opening, a pipeline promoting a build, a message being retried. Static diagrams show the states; an animation shows the change. This repository keeps both in one visual language, so a reader recognises the site in an article, on LinkedIn and on a slide.
33
+
34
+ - **Design tokens, one source.** Colours with fixed meanings (green healthy, orange blocked, yellow transitional, red the failure path, under `color.state.*`), the brand palette, the Source type stacks (Source Sans 3, Source Code Pro, Source Serif 4), the thick ink outline, radii, and motion timings. Exported as CSS variables for the site, TypeScript for the animations and JSON for anything else (the SVG generators of the static diagrams).
35
+ - **Motion components.** React components for [Remotion](https://www.remotion.dev): an ink block, a pill label, an arrow that draws itself, a token travelling along a transition, call-result squares, a countdown ring. Flow primitives in `src/brand/flow-components.tsx` add a white hexagonal `Exchange`, rail-ended `Queue`, white-tab `TaggedContainer` and persistent `PositionedToken` (stationary or path-positioned; an optional `radius`, 17 by default). `FailureRateBar` (`src/brand/rate-bar.tsx`, its pure shapes in `rate-bar-shape.ts`) draws a failure rate against a threshold: a white track, a `color.state.failure` fill at least as wide as its height and never wider than the track, and an ink tick; a rate outside [0, 1], a threshold outside (0, 1) or a size that is not a positive finite number throws a `RangeError` naming the prop. Copy identities, splits and ACK/NACK rules belong to scenes, not to a generic message engine.
36
+ - **Illustration pieces.** The objects the blog's covers and diagrams draw again and again (pill label, sheet, code panel, robot, server stack, gear, road, the 27 EIP icons and more), each a pure TypeScript function that returns an SVG node tree from the tokens. The same tree becomes an SVG file for a cover and React elements for a scene, and a scene animates a piece by recomputing its parameters every frame. See [Illustration pieces and covers](#illustration-pieces-and-covers).
37
+ - **A cast and emotes.** Mira, four pillar characters (Visor, Drone, Kiu, Sinal) and two supporting characters for the human roles (Balão, the requester and approver; Chaves, the developer), six bank objects for scenery, and eight reaction symbols with a fixed meaning, so a video can tell its story without words. See [The cast and the emotes](#the-cast-and-the-emotes).
38
+ - **A catalogue of scenes.** Each scene animates something a published article already says. The first two are in 16:9 (article) and 4:5 (LinkedIn), in Portuguese and English from one text table; new scenes are one language-neutral 16:9 video ([ADR 0005](docs/adr/0005-neutral-videos-and-the-cast.md)). The first is the [circuit-breaker state machine](docs/spikes/2026-10-22-motion-pilot/README.md).
39
+
40
+ The style started from the illustration covers of the [Spotify Engineering blog](https://engineering.atspotify.com/) and, since 0.7.0, follows the brand's own grammar: flat shapes, one rounded ink outline, no hard shadow, white bodies on a warm page, one orange accent, and colour only where it means something ([ADR 0009](docs/adr/0009-one-piece-grammar.md)).
41
+
42
+ ## How it works
43
+
44
+ The context, the flows and the module map are in [docs/architecture.md](docs/architecture.md).
45
+
46
+ ```text
47
+ tokens/source.json ──► tokens/generated/tokens.css ──► brunosouzas.com (site repository)
48
+ ├─► tokens/generated/tokens.ts ──► src/brand (motion components) ──► src/scenes ──► MP4 per format (and language, for a localised scene)
49
+ └─► tokens/generated/tokens.json ──► other scripts
50
+
51
+ src/pieces (pure functions → SVG node tree) ──► toSvg ──► covers (npm run cover), diagrams
52
+ └─► toReact ──► Remotion scenes
53
+ ```
54
+
55
+ The generated files are committed, so a consumer can read them without running Node. CSS custom properties carry the prefix `--ds-` (for example `--ds-color-ink`, `--ds-motion-pop-damping`) so they do not clash with the site's own theme names.
56
+
57
+ ## Install
58
+
59
+ The tokens and the illustration pieces are published on npm as [`@brunosouzas/signwright`](https://www.npmjs.com/package/@brunosouzas/signwright), with provenance; releases follow [docs/release.md](docs/release.md). Its one runtime dependency is `harfbuzzjs`, pinned exactly, which subsets the fonts it ships in `fonts/` (Source Sans 3 and Source Code Pro, under the [SIL Open Font License](fonts/OFL.txt)); Remotion, the motion components and the scenes stay in this repository.
60
+
61
+ ```bash
62
+ npm install @brunosouzas/signwright
63
+ ```
64
+
65
+ | Import | What it gives |
66
+ |---|---|
67
+ | `@brunosouzas/signwright` | the pieces, `toSvg`, `pose`, the cover spec helpers and `tokens` |
68
+ | `@brunosouzas/signwright/react` | `toReact`, for React and Remotion (needs `react` 19) |
69
+ | `@brunosouzas/signwright/fonts` | `embedFonts`, for Node: embeds the Source faces a tree's text uses (reads `fonts/`, loads WebAssembly) |
70
+ | `@brunosouzas/signwright/tokens` | the typed `tokens` object |
71
+ | `@brunosouzas/signwright/tokens.css` | the `--ds-*` custom properties |
72
+ | `@brunosouzas/signwright/tokens.json` | the plain values |
73
+
74
+ ```ts
75
+ import { pill, toSvg, tokens } from "@brunosouzas/signwright";
76
+ const label = pill({ x: 60, y: 30, text: "main" });
77
+ ```
78
+
79
+ The package also installs the cover command as `signwright-cover <spec.json> --out <file.svg>`.
80
+
81
+ ### Type in a written image
82
+
83
+ An SVG shown through `<img>` cannot load web fonts, so a written image carries its own: `embedFonts(tree)` adds one `<style>` after the `<desc>` with a `@font-face` per Source face the tree's text uses (the package ships Source Sans 3 Regular, Bold and Black, Source Code Pro Regular and Bold, and, since 0.9.0, Source Serif 4 Bold for `headline`), each a subset holding only the glyphs drawn ([ADR 0008](docs/adr/0008-type-inside-the-image.md)). The cover command and `npm run pieces:sheet` call it before they write; a tree without Source text is returned unchanged. It is async, reads only the faces it needs, and rejects naming the font file or `harfbuzzjs` when one fails to load. It lives in its own entry so the root entry stays importable in a browser. Its output is for written files and `<img>`: when you inline a piece's SVG in an HTML page, skip `embedFonts` and let the page's fonts apply, because an inline `<style>` with `@font-face` applies to the whole document and would replace the page's Source faces with a subset.
84
+
85
+ ```ts
86
+ import { coverTree, toSvg } from "@brunosouzas/signwright";
87
+ import { embedFonts } from "@brunosouzas/signwright/fonts";
88
+ const svg = toSvg(await embedFonts(coverTree(spec)));
89
+ ```
90
+
91
+ ## Commands
92
+
93
+ Requirements: Node.js 22.12 or later. Rendering also needs the network: Remotion downloads its headless browser on first use, and every render fetches Source Sans 3 and Source Code Pro from Google Fonts.
94
+
95
+ ```bash
96
+ npm ci # install the pinned dependencies
97
+ npm run tokens # validate tokens/source.json and write tokens/generated/
98
+ npm run tokens:check # fail if tokens/generated/ is stale (CI runs this)
99
+ npm run typecheck # tsc over src/, scripts/ and test/
100
+ npm test # unit and integration tests (no rendering, no network)
101
+ npm run stills -- circuit-breaker-states # key-frame PNGs to out/stills/<composition>/<frame>.png
102
+ npm run render -- circuit-breaker-states # out/master/<id>.mp4 and the web copy out/web/<id>.mp4
103
+ npm run stills -- publish-subscribe # 24 phase/final PNGs (six per composition)
104
+ npm run stills -- publish-subscribe --dry-run # print 24 commands, no effects
105
+ npm run render -- publish-subscribe --dry-run # print eight commands; real video waits for owner stills approval
106
+ npm run stills -- circuit-breaker-topology # 14 PNGs: the 13 phase ends and the last frame
107
+ npm run render -- circuit-breaker-topology # one master and one web copy (64 s), after the owner approves the stills
108
+ npm run stills -- sdd-request-relay # 14 PNGs: the 13 phase ends and the last frame
109
+ npm run render -- sdd-request-relay # one master and one web copy (36 s), after the owner approves the stills
110
+ npm run stills -- sdd-scene-2-files # 12 PNGs: the 11 phase ends and the last frame
111
+ npm run render -- sdd-scene-2-files # one master and one web copy (29 s), after the owner approves the stills
112
+ npm run stills -- sdd-scene-3-archive # 10 PNGs: the 9 phase ends and the last frame
113
+ npm run render -- sdd-scene-3-archive # one master and one web copy (20 s), after the owner approves the stills
114
+ npm run stills -- idempotent-receiver-book # 14 PNGs: the 13 phase ends and the last frame
115
+ npm run render -- idempotent-receiver-book # one master and one web copy (30 s), after the owner approves the stills
116
+ npm run stills -- idempotent-receiver-mule # 18 PNGs: the 17 phase ends and the last frame
117
+ npm run render -- idempotent-receiver-mule # one master and one web copy (45 s), after the owner approves the stills
118
+ npm run build # compile the package into dist/ (the package test needs it)
119
+ npm run cover -- cover.json --out card.svg # build a blog cover (or a banner, diagram or icon) from its spec
120
+ npm run pieces:sheet -- --out out/pieces.svg # every piece once, labelled, for review
121
+ npm run pieces:sheet -- --out out/dark.svg --surface dark # the same on the dark surface
122
+ npm run png -- card.svg --out card.png # a written SVG as PNG, through Chrome (repository only)
123
+ npm run studio # Remotion Studio, for frame-by-frame review
124
+ ```
125
+
126
+ - Change a token value in `tokens/source.json` and run `npm run tokens`; never edit `tokens/generated/` by hand. An invalid source prints every problem and writes nothing.
127
+ - `stills` and `render` take one scene name and an optional `--dry-run`, which prints the commands without running them. A render writes a hardware-encoded master (about 28 MB for 33 s) and an x264 web copy (under 1 MB) made with the ffmpeg bundled with Remotion, and prints one line per composition with its time and sizes. The four circuit-breaker clips take about four to five minutes on an Apple M3.
128
+ - Everything rendered goes to `out/`, which Git ignores.
129
+ - `npm run png -- <file.svg> --out <file.png> [--width <px>] [--ground <#rrggbb>] [--zones]` shows a written SVG through one `<img>` in headless Chrome (the renderer that honours the embedded faces, [ADR 0008](docs/adr/0008-type-inside-the-image.md)) and saves the screenshot at the SVG's own size, device scale 1. `--width` shows it smaller (the height follows), `--ground` puts it on a page of that colour with a 24 px margin, `--zones` draws LinkedIn's profile photo zones over a LinkedIn banner (in the page, never in the image). It is a repository script, not part of the package or of `signwright-cover`, and needs Google Chrome or Chromium: the macOS applications, `google-chrome` or `chromium` on `PATH`, or `SIGNWRIGHT_CHROME` set to the executable. A browser that fails, takes over 60 s or writes the wrong size exits 1 and leaves the target as it was.
130
+
131
+ ## How a scene is built
132
+
133
+ The catalogue contains:
134
+
135
+ | Scene | Sources | Review status |
136
+ |---|---|---|
137
+ | `circuit-breaker-states` | [EN](https://brunosouzas.com/blog/circuit-breaker-in-mulesoft), [PT](https://brunosouzas.com/pt/blog/circuit-breaker-in-mulesoft) | approved pilot, unchanged |
138
+ | `publish-subscribe` | [EN](https://brunosouzas.com/wiki/publish-subscribe-in-mulesoft/), [PT](https://brunosouzas.com/pt/wiki/publish-subscribe-in-mulesoft/) and their Anypoint MQ diagrams | owner media gate pending |
139
+ | `circuit-breaker-topology` | [EN](https://brunosouzas.com/blog/circuit-breaker-in-mulesoft), [PT](https://brunosouzas.com/pt/blog/circuit-breaker-in-mulesoft) (one neutral video for both) | owner media gate pending ([stills and video sheets](docs/spikes/2026-11-12-circuit-breaker-topology/README.md)) |
140
+ | `sdd-request-relay` | [EN](https://brunosouzas.com/blog/spec-driven-development-in-practice), [PT](https://brunosouzas.com/pt/blog/spec-driven-development-in-practice) (one neutral video for both) | owner media gate pending ([stills and video sheets](docs/spikes/2026-11-12-sdd-request-relay/)) |
141
+ | `sdd-scene-2-files` | [EN](https://brunosouzas.com/blog/spec-driven-development-in-practice), [PT](https://brunosouzas.com/pt/blog/spec-driven-development-in-practice) (one neutral video for both) | owner media gate pending ([stills and video sheets](docs/spikes/2026-11-13-sdd-scene-2-files/)) |
142
+ | `sdd-scene-3-archive` | [EN](https://brunosouzas.com/blog/spec-driven-development-in-practice), [PT](https://brunosouzas.com/pt/blog/spec-driven-development-in-practice) (one neutral video for both) | owner media gate pending ([stills and video sheets](docs/spikes/2026-11-13-sdd-scene-3-archive/)) |
143
+ | `idempotent-receiver-book` | [EN](https://brunosouzas.com/wiki/idempotent-receiver-in-mulesoft/), [PT](https://brunosouzas.com/pt/wiki/idempotent-receiver-in-mulesoft/) and their book diagram (one neutral video for both) | owner media gate pending ([stills and video sheets](docs/spikes/2026-11-27-idempotent-receiver-book/README.md)) |
144
+ | `idempotent-receiver-mule` | [EN](https://brunosouzas.com/wiki/idempotent-receiver-in-mulesoft/), [PT](https://brunosouzas.com/pt/wiki/idempotent-receiver-in-mulesoft/) and their charge-flow diagram (one neutral video for both) | owner media gate pending ([stills and video sheets](docs/spikes/2026-11-28-idempotent-receiver-mule/README.md)) |
145
+
146
+ Studio lists the compositions of each scene in catalogue order: one per format and language for a localised scene, one per format for a neutral one. Pub-sub runs for 1000 frames at 30 fps, with the final 90 frames static. It depicts the article's AUTO acknowledgment case with a propagated invoice error, not every acknowledgment mode. Publish confirms exchange acceptance, not queue delivery. No redelivery is animated. After owner stills approval, `npm run render -- publish-subscribe` produces the four masters and four web copies; do not run it before that gate.
147
+
148
+ A scene lives in `src/scenes/<scene>/` with:
149
+
150
+ - `scene.ts`: the scene data, with no React: id, formats, languages, the timeline in frames, the text table per language (every string taken from the article; a neutral scene has one `en` table) and the source article URL per language.
151
+ - `layout.ts`: one layout per format, in composition pixels; the 4:5 layout has its own arrow routes.
152
+ - `Scene.tsx`: the composition, which arranges the components from `src/brand/`.
153
+
154
+ `src/scenes/index.ts` lists the scenes and `src/Root.tsx` registers each one as a Studio folder; a localised scene has one composition per format and language (`<scene>-16x9-pt`, `-16x9-en`, `-4x5-pt`, `-4x5-en`), a neutral scene one per format (below). The tests check every registered scene: for a localised scene the same text keys in both languages, and for every scene phases inside the composition and in order, events inside phases, and a reading hold of at least three seconds at the end.
155
+
156
+ **Neutral scenes.** A scene with `neutral: true` is one video for both pages ([ADR 0005](docs/adr/0005-neutral-videos-and-the-cast.md), amended 2026-11-09): one composition per format, `<scene>-<format>` with no language suffix (its `lang` is `en` and the scene ignores it), `languages: ["en"]`, its few words in one English table `text.en`, and both pages' sources `sources.pt` and `sources.en`. The catalogue rejects a neutral scene with a `pt` table, another language, a missing or non-`https` source, or an empty word. `circuit-breaker-topology` is the first registered neutral scene; `test/fixtures/takes-scene.ts` is a test-only one.
157
+
158
+ **The `takes` kind.** A comparison of two runs of the same stage (`kind: "takes"`, `src/scenes/takes-kind.ts`): take-1 phases, one rewind phase, take-2 phases. It is always neutral. Besides the common rules, the catalogue checks the take order; that every phase cites at least one line of the English article (`cites`, MOT-1); that acts of different characters never overlap (CAST-4); that every emote enters on its character's expression change, one at a time, and is gone (10 frames after `leaveAt`) before the next act (CAST-3); and that nothing moves from the outro on: every act, face, trip arrival, fade, leave and cue before it, and every pop-in at least `motion.fps` frames before it, so it is settled (SCN-4).
159
+
160
+ **The circuit-breaker topology scene** (`circuit-breaker-topology`, AB#334, a `takes` scene) shows the article's comparison: Checkout calls Payment with `retry ×3` and 20 requests become 60 backend calls while Payment goes down (take 1); a rewind; then `circuit-breaker:execute` wraps the call, fills a sliding window of five, opens at 5 of 5 failures (4 of 5 is the 80% threshold and stays CLOSED), fails the next 15 requests fast with `CIRCUIT-BREAKER:OPEN` and the customer's message, runs a compressed `resetTimeout 10s` clock, sends one test call in each HALF_OPEN, closes, ignores one timeout and a `400`, and holds a healthy end for 4 s. 1920 frames (64 s), one 16:9 composition, no character, caption or sound. Its files:
161
+
162
+ - `scene.ts`: the entry and the `text.en` word table;
163
+ - `timeline.ts`: `buildTimeline()`, the beat table of the change's design §4 generated from its formulas (156 legs, counters, lights, tags, state swaps, window results, ramps, clock runs), every movement end also a cue;
164
+ - `frame.ts`: `frameAt(f)`, the whole stage at a frame from `f` and the rewind's object frame `objectFrame(f)`, as plain data;
165
+ - `layout.ts`: positions and routes in 960 × 540 stage units, drawn × 2;
166
+ - `stage.ts`: the two stage SVG layers built from the pieces, and the component props (window squares, failure-rate bar, clock, tokens);
167
+ - `Scene.tsx`: only draws them, in the layer order rings, drop path, arrows and blocks, window, tokens, labels.
168
+
169
+ Its words are at least 33 stage units (36 for state names, the take number and the counters), 11.7 px in the site's 341 px column on a 360 px phone; `test/scenes/circuit-breaker-topology-layout.test.ts` measures them with harfbuzzjs on `fonts/` and checks their placement at every frame. The pieces name Source Sans 3 "Source Sans 3" while `@remotion/google-fonts` registers it as "Source Sans Three", so `Scene.tsx` maps the stage trees' sans stack to the loaded family through `withSansFamily` (`src/brand/svg-fonts.ts`, shared with the request-relay scene below; `stage.ts` re-exports it so its own import path is unedited); without it the SVG words fall back to Helvetica.
170
+
171
+ **The SDD request-relay scene** (`sdd-request-relay`, AB#144, a `takes` scene) shows one request played twice on one stage, with Balão (the logistics team, requester and approver) and Chaves (the developer) as the supporting cast beside Visor (the AI agent) at their shared laptop. Take 1: Balão asks, Chaves relays it to Visor, Visor writes the code alone with the six open questions sunk into it, and the first error comes back to Balão, who never saw those decisions. A rewind (badge `1` → `2`). Take 2: the same relay, then Visor lists the six questions in `proposal.md` instead of choosing; Chaves carries the sheet to Balão; Balão answers each question, stamps `GO`; Chaves carries it back, and only then does Visor implement. 1080 frames (36 s), one 16:9 composition, no caption or sound. Its files:
172
+
173
+ - `scene.ts`: the entry and the `text.en` word table (`proposal.md`, `GO`, `?`, the take numbers);
174
+ - `timeline.ts`: `makeTimeline(travel, fade)`, the beat table of the change's design §4 (acts, faces, emotes, trips, pops, fades, leaves, cues, the rewind's reverse entries), derived from `motion.travel` and `motion.fade` so a token change fails the pinned beat-table test;
175
+ - `frame.ts`: `frameAt(f)` and the rewind's object frame `objectFrame(f)`, the whole stage as plain data; from the outro (980) every frame reads as frame 980, so the final hold (to 1079) is byte-identical;
176
+ - `layout.ts`: positions and routes in 960 × 540 stage units, drawn × 2;
177
+ - `stage.ts`: the five stage SVG layers built from the pieces (below, cast, sheet, tokens, above), words passed through `withSansFamily`;
178
+ - `Scene.tsx`: only draws them, with the `Rings` and the `MotionPath` guides (P1, P2, P4).
179
+
180
+ `SceneContract<TTimeline>` supplies common metadata and phase ranges (`from`, `to`, events with `at`), duration and outro. `SceneData` remains the legacy state-machine alias with `Timeline`: states, slots, call results and transition fires retain their window checks. `CatalogueScene` also accepts `FlowSceneData` with `kind: "flow"`; it needs no active states or slots. It accepts `TakesSceneData` with `kind: "takes"` and `SequenceSceneData` with `kind: "sequence"` too (above). The flow validator rejects unknown endpoints, invalid frames/ranges, trips crossing the outro, and impossible copy ownership/handoffs. There is no plug-in or graph-interpreter API.
181
+
182
+ **The `sequence` kind.** A neutral scene whose phases run once, in order, with no take and no rewind (`kind: "sequence"`, `src/scenes/sequence-kind.ts`). The catalogue checks what it checks for a `takes` scene except the take order: every phase cites an article line, the cast rules (CAST-3, CAST-4) and the reading hold (SCN-4), through the same `checkCast` and `checkHold` that `takes-kind.ts` exports.
183
+
184
+ **The SDD files scene** (`sdd-scene-2-files`, AB#144, a `sequence` scene) is the article's second scene, on scene 1's stage: Chaves types and the `openspec/` folder appears; Visor points and the change's four files (`proposal.md`, `design.md`, `tasks.md`, `spec.md`) come out of it; `proposal.md` lists six `?` and Balão answers them. Then, with nobody on stage acting (the reviewer is another agent), the first review flags four rows of `spec.md` and `tasks.md` (a `?` on the row and a jolt of the file) and a red `NO-GO` lands; the next version checks them; the second review flags two more rows and a second `NO-GO` lands; the fourth version checks them. Balão's `GO` stamp travels to the change, and only then does Visor write the code (the DataWeave `if`/`else if` chain as six code lines). 870 frames (29 s), one 16:9 composition, no caption or sound. Its files follow the request-relay scene's: `scene.ts` (the `text.en` table: the folder and file names, `NO-GO`, `GO`, `?`), `timeline.ts` (`makeTimeline(travel, fade)`, the beat table with every row change of the four files), `frame.ts` (`frameAt(f)`; from the outro, 770, every frame reads as 770), `layout.ts`, `stage.ts` (six stage layers: below, folder, files, cast, verdicts, above) and `Scene.tsx`.
185
+
186
+ **The SDD archive scene** (`sdd-scene-3-archive`, AB#144, a `sequence` scene) is the article's third scene, on the earlier scenes' stage: with no cast member acting, the first change's folder travels off stage to a parked position and the living `book` gains an "exactly two fields" line; days later Balão speaks a second request with no text on screen, Visor points and a second folder pops, and the `book` jolts once as the proposal's impact section surfaces a breaking fact; with no actor acting, a single `?` finding is flagged on the second folder and then cleared (no `NO-GO` anywhere); Balão's `GO` stamp travels to the second folder and lands; Visor's `worked` emote plays the implementation; with no actor acting, the landed `GO` fades and the second folder travels off stage to park beside the first, and only then does the field-count pill read "exactly three fields"; Chaves, beside the book throughout, settles into `done`. 600 frames (20 s), one 16:9 composition, no caption or sound. Its files follow the earlier scenes': `scene.ts` (the `text.en` table: the field-count phrases, `GO`, `?`), `timeline.ts` (`makeTimeline(travel, fade)`, the beat table with every pop, trip, jolt, fade, leave and cue), `frame.ts` (`frameAt(f)`; from the outro, 500, every frame reads as 500), `layout.ts`, `stage.ts` (five stage layers: book, folders, cast, verdict, above) and `Scene.tsx`.
187
+
188
+ **The Idempotent Receiver book scene** (`idempotent-receiver-book`, SW-160, a `takes` scene) shows the pattern as the book describes it, on the wiki page's book diagram: the Sender, the message channel (a `queueNode` without words, as the diagram draws it), the Idempotent Receiver's EIP icon and its store of processed IDs, empty at first. Take 1: the Sender sends order `42` once and the channel delivers it once; the receiver looks up the store (`?`: not there), processes it (green, checked) and stores `42`. A rewind (badge `1` → `2`). Take 2: the same order, sent once; a copy appears in the channel and both reach the receiver in turn; the first is processed and stored as before, the second finds `42` (the store comes into focus) and is set aside (orange); take 1's result fades in beside take 2's, the same effect. 900 frames (30 s), one 16:9 composition, no cast, caption or sound. Its files follow the earlier scenes' (`scene.ts`, `timeline.ts`, `frame.ts`, `layout.ts`, `stage.ts` with four layers: below, nodes, tokens, above, and `Scene.tsx`).
189
+
190
+ **The EIP book scene type** (`src/scenes/eip-book.ts`) holds what every pattern's book scene draws, so the next ones (Dead Letter Channel, Correlation Identifier, Publish-Subscribe Channel) add mostly data: the lane (`LANE`), the text sizes (`BOOK_TEXT`), a message channel on the lane (`channelOnLane`), an EIP icon with its message arrow on the lane (`iconOnLane`, from `ICON_ARROW_Y`), the message token (`messageToken`), and the store empty or holding an ID (`emptyStore`, `storedId`). It draws only through the package's pieces. A generic stage and frame builder waits for the second book scene, when two patterns show what is common.
191
+
192
+ **The Idempotent Receiver Mule scene** (`idempotent-receiver-mule`, SW-160, a `takes` scene) shows the page's caveat: the Idempotent Message Validator stores the ID when it accepts the message and does not remove it if the flow fails afterward. On the page's charge-flow diagram, left to right: Balão (the client), the `HTTP Listener`, the `Idempotent Message Validator` with its object store under it, and the `Simulated charge` with its statement of charges under it. Take 1: Balão asks for the charge of an order; the validator looks up its store (`?`: not there), stores the `orderId` and lets the request through; the charge goes through (one statement row, count `1`), `200` comes back and Balão is pleased (`worked`). Balão asks again: the validator finds the `orderId` (the store comes into focus), the request turns orange and `409` comes back; still one charge. A rewind (badge `1` → `2`). Take 2: the same request and lookup; the validator stores the `orderId`; storing the charge fails (the request turns red), `500` comes back and Balão shows the `problem` emote; the `orderId` stays in the store, the retry gets the same `409`, and the statement ends at `0`, take 1's `1` faded in beside it: the order is never charged. 1350 frames (45 s), one 16:9 composition, Balão the one cast member, no caption or sound. Its files follow the book scene's (`scene.ts`, `timeline.ts`, `frame.ts`, `layout.ts`, `stage.ts` with five layers: below, nodes, cast, tokens, above, and `Scene.tsx`).
193
+
194
+ **The EIP Mule scene type** (`src/scenes/eip-mule.ts`) holds what every pattern's Mule scene draws: a component box with the diagram's name at 33 units (`component`, `MULE_TEXT`), a token's rest above a component (`restAbove`, `ABOVE_GAP`), and the client, Balão facing the flow (`client`). It reuses the book scene type's token and store and draws only through the package's pieces. A generic Mule stage and frame builder waits for the second Mule scene.
195
+
196
+ Pub-sub separates `text.ts`, `timeline.ts` and pure `flow.ts` from its data entry. Half-open ownership intervals transfer each token atomically at split/arrival/ACK/NACK boundaries. Caption windows use phase ids internally, never as visible labels; captions and labels are frozen against source fixtures. Both media scripts consume only common phase ends and duration, without React or fonts.
197
+
198
+ The components take every colour and size from the tokens, and what is visible at a frame (arrow progress, travelling tokens, focus and dimming, captions, countdown, call results) comes from pure functions in `src/brand/motion.ts`, which the tests check without rendering.
199
+
200
+ The stage every scene shares is in the `scene.*` tokens (0.12.0), in composition pixels (the 16:9 composition is 1920 x 1080) and the same in every format:
201
+
202
+ | Token | Value | What |
203
+ |---|---|---|
204
+ | `scene.ringRadius`, `scene.ringStep`, `scene.ringWidth` | 100, 34, 2.5 | the stage rings: first radius, gap, stroke width |
205
+ | `scene.ringReach` | 1.2 | the rings reach the frame's larger side times this ratio |
206
+ | `scene.pathDash`, `scene.pathGap`, `scene.pathWidth` | 4, 18, 6 | the dashed motion path a travelling object follows, drawn with round caps, so each dash reads as a dot |
207
+ | `scene.pathColor` | `#5C5852` | the path's colour on the light stage, equal to `brand.light.textMuted` (a test keeps the two equal) |
208
+
209
+ `stageRingRadii(width, height, values = tokens.scene)` in `src/brand/motion.ts` gives the ring radii for a frame (65 for 1920 x 1080, 45 for 1080 x 1350), and the `Rings` component draws them; it refuses a size that is not a positive finite number and more than 1000 rings.
210
+
211
+ `MotionPath` (`src/brand/components.tsx`) draws the dashed motion path: a scene-supplied SVG path `d`, in composition pixels, with no fill, stroked `scene.pathColor` at `scene.pathWidth`, dashed `scene.pathDash` / `scene.pathGap` with round caps, at the `opacity` the scene gives. It reads no frame of its own, so a scene can draw it at any frame (a rewind feeds its object frame). `motionPathAt(frame, fadeIn, fadeOut?)` in `src/brand/motion.ts` gives that opacity: 0 before `fadeIn`, rising linearly to 1 over it, falling linearly to 0 over the optional `fadeOut`; at opacity 0 nothing is drawn. It throws a `RangeError` naming `frame`, `fadeIn` or `fadeOut` when one is not finite or not in order.
212
+
213
+ ## Illustration pieces and covers
214
+
215
+ `src/pieces/` holds the drawing library. A piece is a function from plain parameters to `{ body, text }`: `body` holds the shapes, drawn inside the outlined group, and `text` the words and glyphs, drawn after every shape so the outline never strokes a letter. Pieces read only the generated tokens and never a file, so a Remotion scene can import them.
216
+
217
+ - `toSvg(node)` writes a tree as SVG text; `toReact(node)` turns the same tree into React elements. Both describe the same elements, attributes and text, which the tests check.
218
+ - `pose(node, { x, y, tilt, squash, hop, scale, shake, opacity })` animates any piece around its base point; a scene recomputes the numbers every frame.
219
+ - Every colour parameter is a token path (`"color.state.healthy"`, `"illustration.accent"`), never a hex value, except the three data fills of the map pieces below. Each piece checks its parameters before drawing and names the first wrong one. Positions and points take any finite number, because a map has no edge; sizes stay within 10000. A drawing that would hold a non-finite number throws `<piece>: the drawing overflows`.
220
+ - The 67 pieces, with their anchors, parameters and defaults, are listed in [design §4](openspec/changes/archive/2026-10-23-illustration-pieces/design.md) (the 26 cover pieces), in [design §3](openspec/changes/archive/2026-10-23-metro-and-diagram-pieces/design.md) of `metro-and-diagram-pieces` (the nine map and diagram pieces) and in [design §3, §5 and §6](openspec/changes/archive/2026-10-23-stackledger-map-and-link-pieces/design.md) of `stackledger-map-and-link-pieces` (the six markers, zones and icons) and in [design §3 to §5](openspec/changes/archive/2026-10-23-body-diagram-pieces/design.md) of `body-diagram-pieces` (the ten body diagram pieces), plus `stateStart` ([design §4](openspec/changes/archive/2026-10-24-designer-formats/design.md) of `designer-formats`), `headline`, `questionToken`, `balao`, `chaves` and `keyboard` (below); the rules are in [`openspec/specs/illustration-pieces/`](openspec/specs/illustration-pieces/spec.md). `npm run pieces:sheet -- --out <file.svg>` draws them all, and `--surface dark` draws every piece that takes `surface` on the dark surface.
221
+
222
+ ### Maps and diagrams
223
+
224
+ Thirteen pieces draw a metro map and its page diagrams, for [stackledger](https://github.com/brunosouzas/stackledger) and any other map in this style: `lineBadge`, `stationMarker` (stop, interchange as a capsule, deprecated), `pipe`, `countBadge`, `nodeBlock`, `pillNode`, `hexNode` (normal, focus, placeholder), `messageArrow` (curved, straight or through two `controls` points, with a head and an optional label; `kind` `reply`, `failure` or `failFast` dashes it and paints it as ADR 0003 says; `heads: "start"` or `"both"` puts heads at `from`, `dashed` overrides the kind's dash), `ledgerMark` (stackledger's mark: a white page with one outline, ink on light and `surface.dark.muted` on `surface: "dark"`, with the bent line and two stations), `renewalRing` (orange bands round a station), `suggestedHalo` (a dashed muted circle), `licenceMark` (a 10-unit disc, green when held, white to buy) and `zone` (the outline the caller gives, widened by a round 32-unit stroke at the surface's zone opacity, with an optional title). They paint what the caller lays out: positions, hulls, text measurement and truncation stay with the map engine.
225
+
226
+ - A `placeholder` node may have a `subtitle` (drawn like a normal node's, all muted), and `lineBadge` may have no `text` (the pill alone, 30 wide by default).
227
+ - The licence's disc is small, so it has its own room rule: `size` at least three outlines (9 at ink scale 1).
228
+
229
+ - `surface: "light" | "dark"` picks the background they sit on (`surface.*` tokens); every map and diagram piece takes it except `pipe`; `ledgerMark` takes only `surface`. On dark, ink strokes on the background or on a dark face take `surface.dark.muted`, since ink vanishes on black; marks over a light or state fill stay ink ([ADR 0009](docs/adr/0009-one-piece-grammar.md)).
230
+ - `inkScale` (0.25 to 8) thickens the outline without changing the geometry, on `lineBadge`, `stationMarker`, `countBadge` and the three nodes; the map uses 1, the page diagrams 1.6. A shape's height (a marker's diameter) must be at least four outlines; a placeholder node, which draws no ink, is exempt.
231
+ - `countBadge` takes `textSize` (6 to 48, default 11): without `height`, the height, width and baseline grow with it.
232
+ - A line's colour comes from the map's data, so `pipe.fill`, `lineBadge.fill` and `zone.fill` also accept `#RRGGBB`. Every other colour is a token path, and a cover spec rejects any hex.
233
+ - `map.bendRadius` (32) is the radius of a bundle's centre line at a 45° or 90° bend; no piece reads it, the map engine draws the arcs (`pipe.d` takes `A`).
234
+ - The `map.*` tokens hold the measures (outline 3, shadow 0, line 12, casing 6, badge 20, node 46, ring 3, halo 1.5, licence 10, zone padding 32, bend radius 32…), `surface.*.zoneOpacity` the zone's opacity (0.12, dark 0.22), `surface.*.backdropWater`, `backdropWaterEdge`, `backdropPark` and `backdropCredit` the colours of a city backdrop behind a map and its OpenStreetMap credit (no piece draws it; stackledger does): since 0.8.1 the v2 neutrals, water `#C7DAEA` / `#1C2733`, its edge `#A9C4DA` / `#2A3846`, parks `#D6E4CF` / `#1A241D`, and the credit the muted text role, `brand.<theme>.textMuted` (`#5C5852` / `#ADA79D`), checked equal by a test. `site.*` holds the page palette, fonts and type scale of brunosouzas.com in light and dark. Since 0.8.0 each `site` colour is the brand role it stands for (ADR 0006, amended): `primary`, `dark`, `text` and `textDark` are `brand.<theme>.text`, `body` is `bg`, `light` is `cardBg`, `border` is `border`, `textLight` is `textMuted` and `link` is `accentText`; `site.font` names Source Sans 3 (`primary`), Source Serif 4 (`secondary`) and Source Code Pro (`mono`). Against body text a link is 3.25:1 in light and 2.23:1 in dark, so a page keeps its link underline: colour alone does not mark a link (WCAG 1.4.1). `brand.<theme>.stackledgerAccent` (`#3B5BDB` / `#7D8CFF`, `--ds-brand-<theme>-stackledger-accent`) is stackledger's product accent, at least 4.5:1 on `site.<theme>.body` and `site.<theme>.light` (ADR 0006, amended 2026-11-07); no piece draws it by default, a spec names it where the product's line is meant (`pipe` `fill: "brand.light.stackledgerAccent"`).
235
+
236
+ ```ts
237
+ import { lineBadge, pipe, stationMarker, toSvg } from "@brunosouzas/signwright";
238
+ const line = pipe({ d: "M20,40 L220,40", fill: "#7B3FE4" });
239
+ const stop = stationMarker({ cx: 120, cy: 40, surface: "dark" });
240
+ const badge = lineBadge({ x: 250, y: 40, text: "SH", fill: "#7B3FE4", surface: "dark" });
241
+ ```
242
+
243
+ ### Body diagrams
244
+
245
+ Ten pieces draw what the blog's body diagrams need beyond the map pieces: `diagramBox` (a box or pill with a fill and centred lines), `decisionNode` (diamond), `storeNode` (cylinder), `queueNode` (box with two rails), `exchangeNode` (hexagon), `taggedContainer` (a frame with its name on a tab), `lifeline` (dashed, or sparse dots once nothing calls it), `phaseBand` (a pill across a sequence in its state's colour), `altFrame` (alt/else frame with a tag and condition per part) and `edgeLabel` (words next to an arrow, optionally on a backdrop). They take `surface` and, the stickers, `inkScale`, like the map pieces, and paint what the caller lays out. The words of `storeNode` and `queueNode` are optional, so a store or a queue can be drawn empty: the same body with no text, and `subtitle` or `textSize` without `text` is an error.
246
+
247
+ - The shapes take one to three centred lines (`text`), an optional `subtitle` and `textSize`. Without `fill` the face is the surface's panel; with a fill, every word is ink.
248
+ - Backticks mark code: `` "adopts a `correlationId`" `` draws `correlationId` in the monospace stack, as a `tspan`. An odd number of backticks is drawn as is. The cover `pill` follows the same rule (`` "`main`" ``).
249
+ - `milestonePin` takes `size`, the head's radius (6 to 48, default 18); the head, its outline and the label scale with it.
250
+ - Widths the piece estimates (`tagWidth`, `conditionWidth`, a label's `width`) can be passed by a caller that measures its text.
251
+ - A body diagram is 800 wide. Lay it out in 560 units and show it 800 wide: the pieces then come out at the sizes of the published diagrams (text about 18, outline about 4). The cover command does this for you with `"format": "diagram"` (below).
252
+ - `stateStart({ cx, cy, r, surface })` draws the filled start dot of a state machine (7.7 units, 11 at 800), in the surface's text colour, with no outline and no shadow.
253
+
254
+ ### The cast and the emotes
255
+
256
+ The cast of [ADR 0007](docs/adr/0007-mira-and-the-pillar-cast.md) shares one skin (white body, ink outline, a near-black visor with the amber idle eyes, `cast.eyes`); a character's identity is its shape, never a colour. Each takes `x`, `y` (the centre of its ground line), `scale`, `surface`, `expression` (`idle`, `done`, `waiting`, `failed`) and `view` (`front`, `back`):
257
+
258
+ | Character | Piece | Role (ADR 0007) | Actions | Hood tip |
259
+ |---|---|---|---|---|
260
+ | Mira | `mira` | the protagonist, an astrolabe with a screen face | `needleAngle` points the route, `carries` rides a message on the needle's tip, `stride` | yes |
261
+ | Visor | `visor` | AI engineering: the AI agent | `holds`, `holdsSheet`, `points`, `facing` | yes |
262
+ | Drone | `drone` | delivery: DevOps, shipping and running a system | `carries` | yes |
263
+ | Kiu | `kiu` | wiki and series | `steps` | yes |
264
+ | Sinal | `sinal` | stackledger | none | no (the product's own identity) |
265
+ | Balão | `balao` | supporting: the requester and approver | `speaks`, `holdsStamp`, `facing` | yes |
266
+ | Chaves | `chaves` | supporting: the developer, who works with Visor | `types`, `points`, `holdsSheet`, `facing` | yes |
267
+
268
+ `bankObject({ name, x, y, scale, surface })` draws six objects for scenery, `courier`, `lume`, `carga`, `anel`, `modulo`, `hub`, with the cast's idle eyes on their screen and no expression.
269
+
270
+ Visor's two actions of 0.12.0, for the SDD scene of AB#144:
271
+
272
+ - `holdsSheet: { width, height, rows, top, step, label }` puts a sheet in Visor's left hand instead of the card: the `sheet` piece's page (`width` 80 to 300, `height` 80 to 400, 1 to 8 `rows` with `lead`, `bar`, `tail`) and, with `label`, a `pill` on its top edge (a file name such as `proposal.md`). The hand sits over the page's edge; the page's `?` and the label are Visor's `text`, with their own font, so they read the same in a scene. With `holds: true` or `view: "back"` it is refused. The label takes `pill`'s width (150 for `proposal.md`), so give the page at least that width.
273
+ - `facing: "right" | "left"` (default `right`, the drawing of 0.11.0): facing left is the mirror image, so `points` reaches left and the hand holds on the right. Only the body is mirrored: the outline keeps its colour and width, and a held sheet and its words are never mirrored.
274
+
275
+ `questionToken({ cx, cy, scale, surface })` is the open question as an object: the white disc and `?` of a sheet's question row (radius 13, outline `outline.small`, ink on light and `surface.dark.muted` on dark), sized with `scale` (above 0, at most 10). It takes no colour and no text. `countBadge` stays the map's number sticker.
276
+
277
+ ```ts
278
+ import { questionToken, visor } from "@brunosouzas/signwright";
279
+ const agent = visor({ x: 480, y: 440, scale: 1.15, facing: "left", holdsSheet: { width: 150, height: 204, rows: [{ lead: "question", bar: 44 }], label: "proposal.md" } });
280
+ const question = questionToken({ cx: 300, cy: 120, scale: 1.5 });
281
+ ```
282
+
283
+ The supporting characters of 0.13.0 (card 337, the concept the owner chose in the identity studio of 2026-11-12) are glyphs of their trade on Mira's legs, for the human roles of a scene. Both take the shared parameters and `facing: "right" | "left"` (default `right`; facing left is the mirror image of the body only, and a held prop and its words are never mirrored), do one action at a time and do nothing unless an action is set ([model sheet](docs/spikes/2026-11-12-supporting-characters/README.md)):
284
+
285
+ - `balao`, the requester and approver: a speech balloon whose tail points at the listener (the side it faces). `speaks: true` lights the request line on its belly in the accent. `holdsStamp: { word }` holds the `stamp` piece in the front hand with the caller's word (the SDD scene's `GO`); the held stamp is always the approval green (`color.state.healthy`), so its word says yes (`GO`, `OK`), never a refusal; the stamp is 24 in radius and draws its word at 27 whatever its length, so keep the word to two or three letters. Refused with `speaks` or from behind. Balão answering is a `sheet` the scene places beside its front hand.
286
+ - `chaves`, the developer: a `{ }` body with sharp brace points and a waist (it reads as a brace at 24 px), and the cursor in the accent. `types: true` puts the `keyboard` under the front hand; the screen above it is a `codePanel` the scene places. `points: true` swaps the front hand for Visor's pointing hand. `holdsSheet` hands a sheet over, as Visor's (`width` 80 to 300, `height` 80 to 400, 1 to 8 `rows`, `label`), held out in the front hand. `types` and `holdsSheet` are refused from behind.
287
+ - `keyboard({ x, y, width, surface })`, the laptop's base: a white slab (`width` 80 to 300, default 150, 16 high, top-left corner at `x`, `y`) with ink key marks, outlined on both surfaces. It takes no colour and no text; a cover can draw it under a `codePanel`.
288
+
289
+ ```ts
290
+ import { balao, chaves, codePanel } from "@brunosouzas/signwright";
291
+ // A cover (a still). In a scene one character acts at a time (motion CAST-4): Balão speaks, then Chaves types.
292
+ const requester = balao({ x: 300, y: 450, scale: 1.25, speaks: true });
293
+ // The developer's screen above the keyboard, drawn before Chaves so the typing hand stays in front: in Chaves's
294
+ // units at scale 1 a panel 132 x 62 at (-238, -148) facing left ((106, -148) facing right), low enough to clear the emote spot.
295
+ const screen = codePanel({ x: 680 - 238 * 1.25, y: 450 - 148 * 1.25, width: 165, height: 77.5, top: 25, step: 25, lines: [{ indent: 0, w: 105, color: "white" }, { indent: 0, w: 50, color: "white", tall: true }] });
296
+ const developer = chaves({ x: 680, y: 450, scale: 1.25, facing: "left", types: true });
297
+ ```
298
+
299
+ **Emote spot.** An emote for Balão or Chaves sits beside the head on the front side, at the character's `scale` (about the head's size, motion CAST-3): its centre at (`x` + 116·`scale`, `y` − 200·`scale`) facing right and (`x` − 116·`scale`, `y` − 200·`scale`) facing left. There every emote, its burst included, clears the body, the hood tip, the hands, the pointing hand, the held stamp, the keyboard and the screen of the example above (a taller screen, like a panel reaching y −178, covers the spot). A sheet Chaves holds taller than 114 reaches the spot, and so does one taller than 96 whose label pill is at least as wide as the page (a narrower pill reaches it only higher: check the stills): then the scene moves the emote or the sheet, on its stills. The five pillar characters have no documented spot.
300
+
301
+ `emote({ kind, x, y, scale, burst, surface })` draws a reaction beside a head, never over the face. Each kind keeps one meaning in every video, like the colours:
302
+
303
+ | `kind` | Shape | Meaning |
304
+ |---|---|---|
305
+ | `idea` | amber bulb with rays | an idea |
306
+ | `doubt` | ? | doubt, not understood |
307
+ | `problem` | ! in a red triangle | a problem appears |
308
+ | `worked` | green check | it worked |
309
+ | `refused` | red cross | refused |
310
+ | `pressure` | white sweat drops | under pressure |
311
+ | `liked` | heart in the accent | liked |
312
+ | `waiting` | white Z Z Z | waiting |
313
+
314
+ In a scene, an emote pops in on the frame the face changes (`emotePop` in `src/brand/cast-motion.ts`, with `leave`, `blinking`, `breathe`, `squashAfter` and `hop`), one at a time, and the body acts through `pose`. On a dark page pass `surface: "dark"`: the outlines, rays and Z casings take `surface.dark.muted`, the marks over a fill stay ink.
315
+
316
+ ### A cover
317
+
318
+ A cover is a JSON spec kept with its article, outside this repository: drafts are private, and only the pieces are public. `npm run cover -- <spec.json> --out <file.svg>` validates it, reports every problem with its JSON path, and writes an 800x420 SVG; the same spec always gives the same bytes. With `"format": "banner"` the same command writes a site banner instead (see below).
319
+
320
+ ```json
321
+ {
322
+ "id": "sdd",
323
+ "title": "A one-line request becomes a reviewed spec before any code",
324
+ "description": "Illustration. On the left, a small slip …",
325
+ "background": "trackAi",
326
+ "rings": { "cx": 400, "cy": 220, "radius": 96 },
327
+ "pieces": [
328
+ { "piece": "speechBubble", "x": 52, "y": 174, "width": 160, "height": 74 },
329
+ { "piece": "pill", "x": 132, "y": 174, "text": "request", "width": 104 }
330
+ ]
331
+ }
332
+ ```
333
+
334
+ - `background` names one pair in `coverBackground` (a background and its ring colour). Since 0.7.0 the pairs are track families (ADR 0006, amended 2026-11-06): each track has a default `track<Name>` and named tones `<track><Tone>`, and each article picks one tone of its track, so a series varies and the track stays recognisable; `neutral` (the brand background) is for a cover with no track. These twelve are the only pairs. Which cover takes which tone is the `illustration` skill's rule, not the package's.
335
+
336
+ | Track | Name | Tone | Fill | Ring |
337
+ |---|---|---|---|---|
338
+ | Integration | `trackIntegration` | peach, default | `#F7C6A1` | `#E3AB84` |
339
+ | Integration | `integrationClay` | clay | `#E9CDBE` | `#D3B3A3` |
340
+ | Integration | `integrationSand` | sand | `#EED7A8` | `#D8BF8C` |
341
+ | Delivery | `trackDelivery` | sage, default | `#B9DEC3` | `#98C6A5` |
342
+ | Delivery | `deliveryMint` | mint | `#A9DCD6` | `#88C4BD` |
343
+ | Delivery | `deliveryOlive` | olive | `#D3DFA8` | `#B9C78A` |
344
+ | AI | `trackAi` | periwinkle, default | `#C5CDF2` | `#A5AEDA` |
345
+ | AI | `aiSky` | sky | `#B5D5F2` | `#94BBDE` |
346
+ | AI | `aiLilac` | lilac | `#DCC7F0` | `#C3A9DC` |
347
+ | Personal tools | `trackPersonal` | butter, default (new) | `#F4DD8E` | `#DDC46C` |
348
+ | Personal tools | `personalRose` | rose | `#F5C9DA` | `#E0ABC0` |
349
+ | no track | `neutral` | cream (unchanged) | `#F6F3EC` | `#D8D6D0` |
350
+
351
+ - `pieces` are drawn in order; their words go on top.
352
+ - The `rings` centre stays within ±10000 in a cover spec, and a piece that overflows is reported at its entry (`pieces[1]: the drawing overflows`).
353
+ - `custom` (optional) is the cover's one free-form object, a JSON node tree limited to drawing tags and a fixed list of attributes, with no external references. An object that repeats becomes a piece instead. It is painted after every piece's shapes; `customAt: <i>` paints it before `pieces[i]` instead, so a pill can sit on top of it (words always stay on top).
354
+ - The three published covers that proved the pieces are the test fixtures in `test/fixtures/covers/`.
355
+
356
+ ### Banners
357
+
358
+ A spec with `"format": "banner"` (the default is `"cover"`) builds a home banner for a site: `banner.width` x `banner.height` (1200x420) with corners rounded at `banner.radius` (20), the measures of brunosouzas.com's published banner. Same pieces, validation and command. Two things differ from a cover:
359
+
360
+ - the rings go on until they reach the frame's farthest corner (22 rings for a centre at 600, 225 with radius 60), where a cover draws 14;
361
+ - pieces and labels are clipped to the rounded frame too, so nothing pokes past a corner.
362
+
363
+ The banner is one image that scales down as a whole. Words in it become small on a phone (a 19px label is about 6px at 375px wide), so keep them few or none. `test/fixtures/covers/home-banner.json` is the brunosouzas.com home banner redrawn from the pieces.
364
+
365
+ ### Signature lockup
366
+
367
+ A cover, banner, LinkedIn card or og spec takes an optional `"signature": true`: Mira (scale 0.25) and the symbol, anchored to the frame's bottom-right corner by `cover.signatureMargin` from both edges. Omit it and nothing is added. A diagram, favicon, avatar, icon or `linkedin-banner` spec refuses the key (an icon accepted it and drew nothing before 0.7.0; on a LinkedIn banner the profile's own photo and name sign the page, and the lockup would show about 12 pt tall on a phone).
368
+
369
+ ### Social and platform formats
370
+
371
+ Five more formats hold the symbol or a reduced cover frame, fixed size, no `height`:
372
+
373
+ - `"format": "linkedin-card"` — 1080x1080, cover frame conventions (`background`, `rings`, `pieces`, `custom`, `signature`). The "new piece" announcement card.
374
+ - `"format": "og"` — 1200x630, cover frame conventions. The site's generic social-preview image (not an article's own cover, which already serves as its og:image).
375
+ - `"format": "favicon"` — 32x32, no `pieces`: the symbol drawn twice, a light-theme group and a dark-theme group switched by a `prefers-color-scheme` media query. This command writes the SVG only; a favicon PNG set (16/32/48/180/192/512) is the consuming site's own build step.
376
+ - `"format": "avatar"` — 500x500, no `pieces` or `rings`: the symbol filling the frame on an accent-coloured ground (`brand.light.accentText`), or, with an optional `"background"` naming a cover background, on that pair's fill. One static image (GitHub profile, a GitHub App's logo), not theme-switching. Without `background` the image is byte-identical to 0.9.1's. The release App's icon is `{ "id": "release-app", "format": "avatar", "background": "neutral", … }`, the symbol on the cream ground; `npm run png` makes its PNG.
377
+ - `"format": "linkedin-banner"` — 1584x396, a LinkedIn profile background; see the next section.
378
+
379
+ ### LinkedIn banner
380
+
381
+ A spec with `"format": "linkedin-banner"` builds the background of a LinkedIn personal profile: 1584x396 (`viewBox="0 0 1584 396"`, LinkedIn's recommended upload, 4:1), square corners (LinkedIn rounds its own card), with cover frame conventions: `background` (required), `rings`, `pieces`, `custom` and `customAt`; pieces and labels are not clipped, as on a cover. The rings go on to the farthest corner, as on a banner (42 rings for a centre at 1188, 198 with radius 60). `height` and `signature` are refused. `test/fixtures/covers/linkedin-banner.json` is the fixture, a banner with no words.
382
+
383
+ **The profile photo covers part of it.** LinkedIn publishes the upload size, not the layout around it. The zones were measured by the owner on 2026-11-11 from screenshots of his own profile, converted to banner units, the photo's white ring included, about ±2 units. Each safe radius adds `LINKEDIN_PHOTO_MARGIN` (16) for the measuring error and small drift:
384
+
385
+ | Zone | How the banner is shown | Photo centre | Photo radius | Safe radius | Safe area covers (x, y) |
386
+ |---|---|---|---|---|---|
387
+ | `desktop` | the 792 px profile card, the banner at 0.5 | (207, 362) | 160 | 176 | 31 to 383, 186 to 396 |
388
+ | `ios` | full phone width, not cropped, about 0.28 on a 440-pt phone; the centre lies below the image's bottom edge | (244, 409) | 187 | 203 | 41 to 447, 206 to 396 |
389
+
390
+ **Not measured:** the Android app, and desktop windows narrow enough to change the card's width. The numbers are exported, frozen, as `LINKEDIN_PHOTO_ZONES` (`{ name, cx, cy, r, safeRadius }`) and `LINKEDIN_PHOTO_MARGIN`. The command does not check a spec against them: keep every piece right of x 447 or above y 186, and check it on a render with the zones drawn:
391
+
392
+ ```sh
393
+ npm run cover -- linkedin.json --out out/linkedin.svg
394
+ npm run png -- out/linkedin.svg --out out/linkedin-zones.png --width 792 --zones # review, zones drawn over it
395
+ npm run png -- out/linkedin.svg --out out/linkedin.png # the 1584x396 upload
396
+ ```
397
+
398
+ ![The LinkedIn banner fixture at 792 wide with the photo zones drawn over it](docs/spikes/2026-11-11-presence-formats/linkedin-banner-light.png)
399
+
400
+ **Words: few, large, in English.** On a phone the banner shows at about 0.28 scale: a cover label (19 units) at about 5 pt, a 44-unit `headline` at about 12 pt, a 64-unit one at about 18 pt (at 0.5 on desktop, a label is about 9.5 px). So words, if any, come from `headline` at 44 units or more, in English (STY-8), from an approved source (ADR 0004). A `text` table is accepted for `en` only: any other language is reported at `text.<lang>` as "a LinkedIn banner's words are English".
401
+
402
+ ### Body diagrams and icons from a spec
403
+
404
+ The same command draws the blog's body diagrams and icons, so a consumer needs no script and no local install:
405
+
406
+ ```sh
407
+ npx --yes --package @brunosouzas/signwright@<version> signwright-cover design/<topic>.json --lang pt --out images/<topic>-pt.svg
408
+ ```
409
+
410
+ - `"format": "diagram"` takes a `height` in layout units (1 to 10000) and no `background`: the spec is laid out 560 wide and written 800 wide, on the `color.panel` panel with rounded corners (`bodyDiagram.radius`, 14 at 800) and rings in `color.ring` that show at step 28 and width 2, out to the farthest corner. Pieces get the map outline (3) and label size (13), which show at 4.3 and 18.6. `test/fixtures/covers/circuit-breaker-states.json` is the circuit breaker article's state diagram.
411
+ - `"format": "icon"` holds one `eipIcon`, `uiIcon`, `linkIcon` or `categoryIcon` at 0,0 and writes it in a box of its own size (64x40 for an EIP icon, 42 × `scale` for a category badge). An EIP icon takes its title and description, with the CC BY 4.0 credit, from the icon's data, so its spec has neither; a UI, link or category icon spec needs both. No `background`, `rings`, `custom` or `signature`.
412
+ - **Text tables.** `"text": { "pt": { "open": ["taxa de falha", "> limite"] }, "en": { ... } }` holds one table per language with the same keys; any string `"@open"` elsewhere in the spec (pieces, `title`, `description`, even `id`) is replaced by that key's value for the language passed with `--lang <code>`. Every language must define every key, and the ids in the output gain the language (`<id>-pt`). Without `text`, strings are drawn as written, so `"@home"` stays a label.
413
+ - Like a cover, a diagram or icon is a standalone image: `uiIcon` `colour: "currentColor"` is refused in every format.
414
+
415
+ ### Titles
416
+
417
+ `headline({ x, y, lines, size, anchor, surface })` writes a title of one to four `lines` in Source Serif 4 Bold (`font.serif`), the first baseline at (`x`, `y`), the next ones 1.1 × `size` lower; `size` is an integer from 24 to 160 (default 64), `anchor` is `start` (default), `middle` or `end`, and the colour is `brand.<surface>.text`. It draws only words (`text`), so a cover, banner, LinkedIn card, og or diagram spec writes it outside the outlined group, and the written image embeds the serif subset. With `text` tables, `"lines": "@slogan"` takes a line array per language. `test/fixtures/covers/og-headline.json` is brunosouzas.com's default share image.
418
+
419
+ ### A new piece
420
+
421
+ Add it to `src/pieces/library.ts` (or `src/pieces/metro.ts` for a map or diagram piece) with `definePiece(name, schema, draw)`, take its colours and sizes from the tokens (a new colour goes to `tokens/source.json` first), register it in `PIECES`, and give it a sample in `scripts/pieces-sheet.ts`. The catalogue test then checks that it draws with only its required parameters and uses token colours only.
422
+
423
+ ### UI and link icons
424
+
425
+ - `uiIcon({ name, x, y, size, colour })` draws one of seven glyphs of the sites' chrome in a 24-unit box and one token colour: `sun`, `moon`, `zoomIn`, `zoomOut`, `reset`, `calendar`, `download` (data in `UI_ICONS`). `colour: "currentColor"` makes the icon follow its element's text colour (a button that inverts on hover, say); it only works when the SVG is inline in the page, since an `<img>` does not inherit the page's colour, and a cover spec refuses it.
426
+ - `linkIcon({ icon, x, y, size, surface })` draws a link sticker in a 46-unit box, a white face with its outline and no frame (on dark the outline takes `surface.dark.muted`): `github`, `linkedin`, `email`, `website`, `stackledger` and `brunosouzas` (data in `LINK_ICONS`, names in `LINK_ICON_NAMES`). `stackledger` is the product's mark on the white face: `ledgerMark`'s bent line in `illustration.accent` through its two white stations with ink outlines, the face being the page, so one outline. `brunosouzas` is the brand symbol, the b with the moon of the favicon and the avatar (`symbol`'s own shapes, at 0.875 and centred on the face), in the light symbol's colours on both surfaces; title `brunosouzas.com`. Use it for every link to brunosouzas.com, so the link needs no words; `website` stays the generic globe for any other site. Every link icon is its own piece and its own file (an icon spec with one `linkIcon` writes it alone); the package has no combined icon or row, so a consumer lays out the separate icons itself. The GitHub mark is from [Font Awesome](https://fontawesome.com/), licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
427
+ - `categoryIcon({ category, x, y, scale })` draws the site's category badge in a 42-unit box: a disc in the default tone of the category's track (`coverBackground.<track>.fill`, ringed in its `.ring`) with a glyph on it, the same on light and dark pages. `integration` (`trackIntegration`, the notation's `pointToPointChannel`), `delivery` (`trackDelivery`, `gateToProduction`), `aiEngineering` (`trackAi`, `contextWindow`), `personalTools` (`trackPersonal`, its own wrench and screwdriver), and the projects page's `mulesoft` (`trackIntegration`, its own systems joined by an API) and `contributions` (`trackDelivery`, its own pull request); names in `CATEGORY_ICON_NAMES`. At `scale` 4 it is the 168-pixel badge the site shows.
428
+ - None holds a link, a style, a script or a URL, so a consumer can write one with `toSvg` inside its own `<svg xmlns=…>` and ship it as a static file.
429
+
430
+ ```ts
431
+ import { el, linkIcon, toSvg } from "@brunosouzas/signwright";
432
+ const github = toSvg(el("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 46 46", width: 28, height: 28 }, ...linkIcon({ icon: "github", x: 0, y: 0, surface: "dark" }).body));
433
+ ```
434
+
435
+ ### EIP icons
436
+
437
+ `src/pieces/eip-icons.ts` holds 27 Enterprise Integration Patterns icons as data. They are redrawn from the icons by Gregor Hohpe and Bobby Woolf ([enterpriseintegrationpatterns.com](https://www.enterpriseintegrationpatterns.com/)), licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); each icon keeps that credit in its description. Like every other piece, they draw no hard offset shadow (ADR 0009): the 46 ink copies the published notation drew under its faces were removed in change `flat-eip-icons-and-empty-queue`, so `eipIcon`, `nameTag` and any cover or scene that draws an icon look flat from the next release. The tests in `test/pieces/eip-icons.test.ts` and "Every cover piece is flat" in `test/pieces/node.test.ts` apply the rule in `test/pieces/eip-shadows.ts` and find any such copy again.
438
+
439
+ ## Upgrading to 0.19.0
440
+
441
+ 0.19.0 is a breaking release: the package is `@brunosouzas/signwright` ([ADR 0011](docs/adr/0011-scoped-package-name.md)). The drawn output does not change.
442
+
443
+ | From | Change |
444
+ |---|---|
445
+ | `@brunosouzas/design-system` (0.17.0 and earlier) | depend on `@brunosouzas/signwright`, change every import (the subpaths are the same), run `signwright-cover` instead of `brunosouzas-cover` |
446
+ | `signwright` (0.18.0) | depend on `@brunosouzas/signwright` and change every import and `npx --package`; the command stays `signwright-cover` |
447
+
448
+ ## Upgrading to 0.13.0
449
+
450
+ 0.13.0 (card 337, change `supporting-characters`) adds the supporting cast. Nothing is removed or renamed, and every 0.12.0 call, spec and scene draws the same: the five cast pieces stay pinned against their 0.11.0 drawings (`test/fixtures/cast-0.11.0.json`), `stamp` against its 0.12.0 drawings (`test/fixtures/stamp-0.12.0.json`), and every other fixture and golden is unchanged.
451
+
452
+ | Added | What |
453
+ |---|---|
454
+ | `balao`, `chaves` | the supporting characters (see The cast and the emotes), with `BalaoParams`, `ChavesParams`, `CAST_FACINGS` and `CastFacing` from the root entry |
455
+ | `keyboard` | the laptop's base, a prop piece, with `KeyboardParams` |
456
+ | `HeldSheet` | the held-sheet object of Visor and Chaves; `VisorHeldSheet` stays as its alias, and `VISOR_FACINGS` and `VisorFacing` stay |
457
+ | `PIECE_NAMES` | 67 names, ending with `headline`, `questionToken`, `balao`, `chaves`, `keyboard`: a check of the exact list or an exhaustive `switch` over `PieceName` must add them; every other name keeps its index |
458
+
459
+ `stamp` moved from `src/pieces/library.ts` to `src/pieces/stamp.ts` unchanged; the root entry exports it as before.
460
+
461
+ ## Upgrading to 0.12.0
462
+
463
+ 0.12.0 (card 333, change `sdd-scene-pieces`) adds what the SDD scene of AB#144 needs. Nothing is removed or renamed, and every 0.11.0 call, spec and scene draws the same: the five cast pieces are pinned against their 0.11.0 drawings (`test/fixtures/cast-0.11.0.json`) and the circuit-breaker and publish-subscribe stills are byte-identical.
464
+
465
+ | Added | What |
466
+ |---|---|
467
+ | `visor` `holdsSheet`, `facing` | Visor holds a sheet and faces left or right (see The cast and the emotes); `VISOR_FACINGS`, `VisorFacing` and `VisorHeldSheet` from the root entry |
468
+ | `questionToken` | the open question as an object; `PIECE_NAMES` has 64 names, ending with `headline`, `questionToken`, so a check of the exact list or an exhaustive `switch` over `PieceName` must add it |
469
+ | `scene.*` tokens | the stage rings and the dashed motion path (see How a scene is built), the seventeenth token group: `tokens.scene` and `--ds-scene-*` in `tokens.css` |
470
+
471
+ `pill` and `sheet` moved from `src/pieces/library.ts` to `src/pieces/paper.ts` unchanged; the root entry exports them as before.
472
+
473
+ ## Upgrading to 0.10.0
474
+
475
+ 0.10.0 (card 325, change `presence-formats`) adds a LinkedIn banner format and the stackledger link icon. Nothing is removed or renamed, and every 0.9.1 spec builds byte-identical.
476
+
477
+ | Added | What |
478
+ |---|---|
479
+ | `"format": "linkedin-banner"` | a 1584x396 LinkedIn profile background (see LinkedIn banner, above); `FORMATS` has nine names, so a check of the exact list must add it |
480
+ | `LINKEDIN_PHOTO_ZONES`, `LINKEDIN_PHOTO_MARGIN` | the profile photo's measured zones and the 16-unit margin of their safe areas, frozen, from the root entry |
481
+ | avatar `background` | an optional cover background name for the avatar's ground; without it the avatar is unchanged |
482
+ | `bannerRingCount(cx, cy, radius, width, height)` | the frame size as two optional parameters after `radius`, defaulting to the banner's 1200x420; every existing call keeps its result |
483
+ | `stackledger` link icon | the product's mark as a link sticker; `LINK_ICON_NAMES` has five names (`github`, `linkedin`, `email`, `website`, `stackledger`) |
484
+
485
+ `npm run png` is new too, but as a repository script: it is not in the package.
486
+
487
+ ## Upgrading to 0.9.0
488
+
489
+ 0.9.0 (card 307) adds a serif title. Nothing is removed or renamed, and every 0.8.1 spec builds byte-identical.
490
+
491
+ | Added | What |
492
+ |---|---|
493
+ | `headline` | a title in Source Serif 4 Bold, one to four lines (see Titles, above); `PIECES` has 63 names, so a check of the exact list must add it |
494
+ | `fonts/SourceSerif4-Bold.ttf` | Adobe's Source Serif 4 4.005R Bold, unmodified, its SHA-256 pinned; an image embeds only the glyphs it draws ([ADR 0008](docs/adr/0008-type-inside-the-image.md), amended) |
495
+
496
+ ## Upgrading to 0.8.1
497
+
498
+ 0.8.1 (card 303) adds stackledger's product layer. Nothing is removed or renamed; images and pages that use the backdrop tokens or `ledgerMark` change appearance on rebuild.
499
+
500
+ | Changed | Before | Now |
501
+ |---|---|---|
502
+ | `brand.light.stackledgerAccent`, `brand.dark.stackledgerAccent` (`--ds-brand-<theme>-stackledger-accent`) | absent | `#3B5BDB`, `#7D8CFF`; a check of the exact list of brand roles must add it |
503
+ | `surface.light.backdropWater`, `backdropWaterEdge`, `backdropPark`, `backdropCredit` | `#C9D8FF`, `#B5C7F5`, `#D4F2DF`, `#5A6385` | `#C7DAEA`, `#A9C4DA`, `#D6E4CF`, `#5C5852` |
504
+ | `surface.dark.backdropWater`, `backdropWaterEdge`, `backdropPark`, `backdropCredit` | `#1E3175`, `#2A3F8A`, `#183F52`, `#9AA6D6` | `#1C2733`, `#2A3846`, `#1A241D`, `#ADA79D` |
505
+ | `ledgerMark` | an ink square (on dark, lined by a band in `surface.dark.muted`) | a white page with one outline, ink on light and `surface.dark.muted` on dark |
506
+
507
+ ## Upgrading to 0.8.0
508
+
509
+ 0.8.0 (card 302) changes what the site palette holds and the category icon's call.
510
+
511
+ | Changed | Before | Now |
512
+ |---|---|---|
513
+ | `site.light.*`, `site.dark.*` colours (`--ds-site-*`) | the Astroplate palette (`body` `#FFFFFF` / `#1C1C1C`, `text` `#444444` / `#B4AFB6`…) | the brand roles above (`body` `#F6F3EC` / `#121110`, `text` `#121212` / `#F1EEE8`…); same names |
514
+ | `site.light.link`, `site.dark.link`, `site.font.mono` | absent | `#B83A0C`, `#FF7A45`, `'Source Code Pro', monospace` |
515
+ | `categoryIcon` | `personalTools` only, a glyph with `surface` | four category badges on a track-tone disc; `surface` is refused |
516
+ | `icon` format | `eipIcon`, `uiIcon`, `linkIcon` | also `categoryIcon` |
517
+
518
+ A page that reads `--ds-site-*` changes colour when it moves to 0.8.0. With `primary` equal to `text`, a hover that turns text-coloured links `primary` no longer shows: move it to `link`.
519
+
520
+ ## Upgrading to 0.7.0
521
+
522
+ 0.7.0 is a breaking release (cards 300 and 301). Rebuild every image once on it; the output changes appearance (ADR 0009) and carries its fonts (ADR 0008).
523
+
524
+ | Removed | Use instead |
525
+ |---|---|
526
+ | `color.healthy`, `color.blocked`, `color.transitional`, `color.caller`, `color.backend`, `color.failure`, `color.failFast` (and their `--ds-color-*` variables) | the same values at `color.state.*` (`--ds-color-state-*`); a spec that passes `"color.healthy"` is refused, pass `"color.state.healthy"` |
527
+ | the 21 `coverBackground` pairs from before 0.6.0 (`blush`, `peach`, `lavender`, `navy`, `mustard`, …) | a tone of the cover's track family (`trackIntegration`, `integrationClay`, `deliveryMint`, `aiSky`, `trackPersonal`, … see "Cover spec") or `neutral` |
528
+ | `mascot`, `MASCOTS`, `MASCOT_ACTIONS`, `MASCOT_FACES`, the types `MascotName`, `MascotFace`, `MascotAction`, `MascotParams` and the seven-role `cast.*` colours | Mira, the pillar characters or a bank object (ADR 0007); `emote` and `EMOTE_KINDS` stay |
529
+ | `illustration.healthyShade`, `illustration.transitionalShade` | nothing reads them; pass a token path if a drawing needs a shade |
530
+ | `"signature"` in an icon spec | remove it (it drew nothing) |
531
+ | the `cast-motion-test` composition | none; the cast timing helpers in `src/brand/cast-motion.ts` stay |
532
+
533
+ Other changes a consumer sees: `font.sans` and `font.mono` name Source Sans 3 and Source Code Pro first, and the new `font.serif` names Source Serif 4; `cover.labelWeight` is 700 (Source Sans 3 has no static 800); the `shadow` tokens and `map.shadow` are 0; `color.ink`, `color.panel`, `color.ring`, `illustration.*` and `surface.*` take the v2 values; several pieces have new defaults (a white `taggedContainer` tab, an ink `arcArrow`, white bodies), listed in [ADR 0009](docs/adr/0009-one-piece-grammar.md) and the change's design.
534
+
535
+ ## Decisions
536
+
537
+ Project-wide decisions are recorded as ADRs in [`docs/adr/`](docs/adr/README.md).
538
+
539
+ - **Animations are code, made with Remotion.** A scene is React components and data, so a correction is a re-render and every format and language comes from one composition. AI video generators were rejected because their outputs are not consistent between clips. [ADR 0001](docs/adr/0001-remotion-for-motion.md)
540
+ - **One token source.** Colours, type, outline, shadow and motion timings live in one file; the site, the animations and the SVG scripts read generated exports instead of keeping their own copies. [ADR 0002](docs/adr/0002-one-token-source.md)
541
+ - **One visual language, fixed colour meanings.** Green is always healthy, orange always blocked, red always the failure path, so a reader learns the code once. Rotated text is allowed since the 2026-10-23 amendment. [ADR 0003](docs/adr/0003-visual-language-and-colour-meaning.md)
542
+ - **Scenes illustrate an approved source.** Every string on screen comes from a published article, or from a post or page the owner approved, so a scene or piece never says more than the reviewed text. Catalogue scenes still come from published articles. [ADR 0004](docs/adr/0004-scenes-illustrate-published-articles.md)
543
+ - **Neutral videos, told by a fixed cast.** One video for both languages, no words on screen, a caption only when the motion cannot explain itself, and every gesture tied to an article line. [ADR 0005](docs/adr/0005-neutral-videos-and-the-cast.md)
544
+ - **Three token layers.** Primitive, semantic and component tokens, with the brand palette measured for AA contrast in both themes and the states under `color.state.*`. [ADR 0006](docs/adr/0006-three-layer-tokens-and-brand-colour.md)
545
+ - **Mira and the pillar cast.** A protagonist and four pillar characters replace the engineering-role cast; since its amendment of 2026-11-12, two supporting characters, Balão and Chaves, tell the requester and the developer. [ADR 0007](docs/adr/0007-mira-and-the-pillar-cast.md)
546
+ - **Type inside the image.** Every written SVG embeds a subset of the Source faces its text uses, so readers see Source through `<img>`. [ADR 0008](docs/adr/0008-type-inside-the-image.md)
547
+ - **One piece grammar.** No hard shadow, white bodies, one accent, colour only where it means something, ink muted on dark; a test checks every piece. [ADR 0009](docs/adr/0009-one-piece-grammar.md)
548
+
549
+ ## How this project is built
550
+
551
+ - Changes are specified first with [OpenSpec](https://github.com/Fission-AI/OpenSpec): active changes in [`openspec/changes/`](openspec/changes/), the current behaviour in [`openspec/specs/`](openspec/specs/).
552
+ - Decisions: [`docs/adr/`](docs/adr/README.md).
553
+ - Order of work: [`docs/roadmap.md`](docs/roadmap.md).
554
+ - Evidence from experiments: [`docs/spikes/`](docs/spikes/).
555
+
556
+ ## Security
557
+
558
+ No secrets, credentials or telemetry belong in this repository. Report a vulnerability privately: see [SECURITY.md](SECURITY.md).
559
+
560
+ ## Contributing
561
+
562
+ Issues and pull requests are welcome, especially corrections and ideas for the components. The scenes illustrate the author's own articles, so new scenes come from the blog.
563
+
564
+ ## Licence
565
+
566
+ Code and tokens: [Apache-2.0](LICENSE). The identity (the look of brunosouzas.com) is also the look of the author's other products, such as [stackledger](https://github.com/brunosouzas/stackledger), whose generated sites carry it. The licence does not grant use of the name or of the brunosouzas.com identity as someone else's brand: to build your own, fork it and change the token values.
567
+
568
+ The animations use [Remotion](https://www.remotion.dev), which has its own licence: free for individuals and for companies of up to three people, a company licence above that ([terms](https://www.remotion.dev/docs/license)). Check it before you render with this code at work.