@brunosouzas/design-system 0.13.0 → 0.14.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 (2) hide show
  1. package/README.md +26 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -103,6 +103,12 @@ npm run stills -- publish-subscribe --dry-run # print 24 commands, no effect
103
103
  npm run render -- publish-subscribe --dry-run # print eight commands; real video waits for owner stills approval
104
104
  npm run stills -- circuit-breaker-topology # 14 PNGs: the 13 phase ends and the last frame
105
105
  npm run render -- circuit-breaker-topology # one master and one web copy (64 s), after the owner approves the stills
106
+ npm run stills -- sdd-request-relay # 14 PNGs: the 13 phase ends and the last frame
107
+ npm run render -- sdd-request-relay # one master and one web copy (36 s), after the owner approves the stills
108
+ npm run stills -- sdd-scene-2-files # 12 PNGs: the 11 phase ends and the last frame
109
+ npm run render -- sdd-scene-2-files # one master and one web copy (29 s), after the owner approves the stills
110
+ npm run stills -- sdd-scene-3-archive # 10 PNGs: the 9 phase ends and the last frame
111
+ npm run render -- sdd-scene-3-archive # one master and one web copy (20 s), after the owner approves the stills
106
112
  npm run build # compile the package into dist/ (the package test needs it)
107
113
  npm run cover -- cover.json --out card.svg # build a blog cover (or a banner, diagram or icon) from its spec
108
114
  npm run pieces:sheet -- --out out/pieces.svg # every piece once, labelled, for review
@@ -125,6 +131,9 @@ The catalogue contains:
125
131
  | `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 |
126
132
  | `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 |
127
133
  | `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)) |
134
+ | `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/)) |
135
+ | `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/)) |
136
+ | `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/)) |
128
137
 
129
138
  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.
130
139
 
@@ -149,9 +158,24 @@ A scene lives in `src/scenes/<scene>/` with:
149
158
  - `stage.ts`: the two stage SVG layers built from the pieces, and the component props (window squares, failure-rate bar, clock, tokens);
150
159
  - `Scene.tsx`: only draws them, in the layer order rings, drop path, arrows and blocks, window, tokens, labels.
151
160
 
152
- 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 (`withSansFamily`); without it the SVG words fall back to Helvetica.
161
+ 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.
153
162
 
154
- `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"` 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.
163
+ **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:
164
+
165
+ - `scene.ts`: the entry and the `text.en` word table (`proposal.md`, `GO`, `?`, the take numbers);
166
+ - `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;
167
+ - `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;
168
+ - `layout.ts`: positions and routes in 960 × 540 stage units, drawn × 2;
169
+ - `stage.ts`: the five stage SVG layers built from the pieces (below, cast, sheet, tokens, above), words passed through `withSansFamily`;
170
+ - `Scene.tsx`: only draws them, with the `Rings` and the `MotionPath` guides (P1, P2, P4).
171
+
172
+ `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.
173
+
174
+ **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.
175
+
176
+ **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`.
177
+
178
+ **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`.
155
179
 
156
180
  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.
157
181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brunosouzas/design-system",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Design tokens and illustration pieces of brunosouzas.com: tokens as CSS, JSON and TypeScript, pieces that draw SVG (and React), and a cover command.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {