@fugood/bricks-ctor 2.25.0-beta.11 → 2.25.0-beta.13

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 (29) hide show
  1. package/compile/__tests__/util.test.js +278 -0
  2. package/compile/index.ts +2 -0
  3. package/package.json +3 -3
  4. package/skills/bricks-design/SKILL.md +172 -45
  5. package/skills/bricks-design/references/architecture-truths.md +125 -0
  6. package/skills/bricks-design/references/avoiding-complexity.md +91 -0
  7. package/skills/bricks-design/references/design-critique.md +195 -0
  8. package/skills/bricks-design/references/design-languages.md +265 -0
  9. package/skills/bricks-design/references/performance.md +116 -0
  10. package/skills/bricks-design/references/presentation-and-slideshow.md +137 -0
  11. package/skills/bricks-design/references/translating-inputs.md +152 -0
  12. package/skills/bricks-design/references/variations-and-tweaks.md +124 -0
  13. package/skills/bricks-design/references/verification-toolchain.md +213 -0
  14. package/skills/bricks-design/references/when-the-brief-is-branded.md +284 -0
  15. package/skills/bricks-design/references/when-the-brief-is-vague.md +85 -0
  16. package/skills/bricks-design/references/workflow.md +134 -0
  17. package/skills/bricks-ux/SKILL.md +120 -0
  18. package/skills/bricks-ux/references/accessibility.md +162 -0
  19. package/skills/bricks-ux/references/flow-states.md +175 -0
  20. package/skills/bricks-ux/references/interaction-archetypes.md +189 -0
  21. package/skills/bricks-ux/references/monitoring-screens.md +153 -0
  22. package/skills/bricks-ux/references/pressable-composition.md +126 -0
  23. package/skills/bricks-ux/references/user-journey.md +168 -0
  24. package/skills/bricks-ux/references/ux-critique.md +256 -0
  25. package/tools/deploy.ts +4 -0
  26. package/tools/pull.ts +42 -2
  27. package/types/automation.ts +1 -0
  28. package/types/data-calc.ts +1 -0
  29. package/skills/bricks-design/LICENSE.txt +0 -180
@@ -0,0 +1,265 @@
1
+ # Design Languages
2
+
3
+ A curated library of visual languages, each with concrete BRICKS-native execution notes. The library exists because *committing to a system* is what separates polished work from generic output — and an agent without anchors averages toward generic. These anchors give you something specific to commit to.
4
+
5
+ The library does not constrain you. Pick one, blend two, or invent a new one rooted in the same discipline. What it prevents is the no-commitment middle.
6
+
7
+ ## Two orthogonal axes
8
+
9
+ A picked direction is the combination of two independent choices:
10
+
11
+ - **Interaction archetype** — *what the user does* in front of the screen (glance / browse / interact / transact / monitor / dwell). Drives the Subspace structure: Canvas count, state-machine shape, dominant Bricks. See [`when-the-brief-is-vague.md`](when-the-brief-is-vague.md).
12
+ - **Visual language** — *what the design says*. Drives expression: type, color logic, motion vocabulary, signature moves, asset emphasis. This file.
13
+
14
+ A "browse + Kenya Hara emptiness" Subspace is profoundly different from a "browse + Brutalist web" Subspace, even though the user does the same thing. Advisor mode picks 3 candidates spanning both axes.
15
+
16
+ ## The commitment principle — fight your averaging instinct
17
+
18
+ When unsure, do *more* of what defines the chosen language, not less. A style executed at 30% reads as hesitant; at 80% it reads as deliberate.
19
+
20
+ - Swiss Editorial without numbered folios, hairline rules, and oversized headlines is just "generic minimal."
21
+ - Kenya Hara without 70%+ negative space is just "a bit sparse."
22
+ - Brutalist web with rounded corners and gradient accents is just "an unfinished page."
23
+
24
+ If you find yourself softening signature moves to "make it more accessible" — stop. The signature moves are the language. Soften them and you've abandoned the language for no destination.
25
+
26
+ ## How to use the library in Advisor mode
27
+
28
+ 1. **Pick 3 directions from different schools.** Not three minimalist variants. Spread across the schools below so the user sees a real choice.
29
+ 2. **For each direction, give:**
30
+ - One-sentence pitch.
31
+ - A flagship the user is likely to recognize (designer / firm / brand / institution).
32
+ - 3 vibe keywords.
33
+ - The interaction archetypes it fits.
34
+ - One sentence on what it would mean concretely for this brief.
35
+ 3. **Build a 3-cell preview** — three minimal Subspaces (one Canvas each) the user can render. Don't produce finished work; the preview is a chooser.
36
+ 4. **Once the user picks, drop out of Advisor mode** and continue the workflow rooted in that direction.
37
+
38
+ ## Style declaration ritual
39
+
40
+ After the direction is picked, write the committed system as a comment block at the top of the Subspace file. Every subsequent choice should cite this block. Adding a value not in the block requires updating the block first — that's what makes the system structural rather than aspirational.
41
+
42
+ ```ts
43
+ /**
44
+ * System: Swiss Editorial (Pentagram lineage)
45
+ * Archetype: glance
46
+ * Type: <Brand Sans> 4 / 8 / 16 gu · single family · weight contrast
47
+ * Color: ink #1A1A1A on cream #F5F0E6 · accent #FF3C00 (callouts only)
48
+ * Spacing: 2 / 4 / 8 / 16 gu (use only these for inter-Brick gaps)
49
+ * Grid stance: lean (strict alignment, generous margins 4–8 gu)
50
+ * Motion: ease-out 280ms entrance · ease-in 180ms exit · no loops
51
+ * Heroes: logo (id `brand-logo`) · folio (id `folio-num`)
52
+ * Asset emphasis: logo + 1 hero photograph per canvas · no decorative imagery
53
+ */
54
+ ```
55
+
56
+ The grid itself is given by the runtime (Truth #6). What the block commits to is the set of design decisions on top of the grid: type scale, palette, **spacing scale in grid units** (small enumeration so inter-Brick gaps stay consistent across many siblings), grid stance, motion vocabulary, and hero Brick ids. The comment is not for the runtime; it is for *you*, when you next look at the file and consider adding a third colour or a fourth gap value. The block's existence is what holds the line.
57
+
58
+ ---
59
+
60
+ ## School 1 · Structural modernism
61
+
62
+ ### 1. Swiss Editorial (Pentagram / Vignelli lineage)
63
+
64
+ - **Pitch:** Precision, authority, editorial gravity. Type, grid, hairline rule, restraint.
65
+ - **Flagships:** Pentagram, Vignelli's Unimark, MIT Press canon.
66
+ - **Keywords:** structural · monochrome · grid-disciplined · quiet.
67
+ - **Fits:** glance / browse / monitor.
68
+ - **BRICKS execution:**
69
+ - Bricks: large RichText for headlines, smaller Text for body, hairline `Rect` rules (1–2 grid units tall), numbered RichText folios in a corner, `Image` bricks at controlled scale.
70
+ - Heroes: brand wordmark or logo, numbered folio, masthead hairline rule — same id across Canvases.
71
+ - Theme tokens (Data): two grounds (cream + ink), one accent reserved for callouts; single sans family declared as `ApplicationFont`.
72
+ - Spacing scale: `2 / 4 / 8 / 16 gu`. Grid stance: **lean** (strict alignment, generous 4–8 gu margins, body columns at typeset widths).
73
+ - Density rhythm: dense type Canvases broken by wide-margin breathers every 3–4 Canvases.
74
+ - Motion: subtle vertical Standby on entrance (`ease-out` 280ms); shared headers across canvases via same-id Bricks; no `loop` animations.
75
+ - Asset emphasis: real photograph or none; never decorative imagery; logo at restrained scale.
76
+ - **Wrong for:** hospitality warmth, retail playfulness, ambient dwell loops.
77
+
78
+ ### 2. Bauhaus geometric (Müller-Brockmann / Karel Martens lineage)
79
+
80
+ - **Pitch:** Primary, architectural, confident. Geometry as the composition itself, not decoration.
81
+ - **Flagships:** Müller-Brockmann's Zurich Tonhalle posters, Paula Scher's Public Theater identity.
82
+ - **Keywords:** geometric · primary-color · flat · rhythmic.
83
+ - **Fits:** glance / dwell / monitor.
84
+ - **BRICKS execution:**
85
+ - Bricks: oversized `Rect` bricks as primary anchors (circles via `borderRadius`, squares, diagonals via `rotate`), `Text` bricks rotated 90° as composition elements, no photographic imagery.
86
+ - Heroes: one or two large geometric anchors (circle, square, diagonal bar) that re-position and re-scale across Canvases via shared id — the geometry is *the* narrative.
87
+ - Theme tokens: primary RGB or fluorescent accents (`#FF3C00`, `#0019FF`, `#F5E100`) on flat black or white; tri-color palette fixed in Data.
88
+ - Spacing scale: `1 / 3 / 6 / 12 gu`. Grid stance: **lean** (geometric anchors snapped hard to grid).
89
+ - Density rhythm: high-energy geometric Canvases alternating with declarative single-shape pause Canvases.
90
+ - Motion: bold sweep entrances (400–500ms), shared-Brick auto-tween of geometric anchors across canvases.
91
+ - Asset emphasis: logo, geometric forms, type-as-image; no scene photography.
92
+ - **Wrong for:** corporate finance, hospitality, hi-fi product UI.
93
+
94
+ ---
95
+
96
+ ## School 2 · Quiet minimalism
97
+
98
+ ### 3. Kenya Hara emptiness (MUJI / Shiseido editorial lineage)
99
+
100
+ - **Pitch:** Quiet, meditative, reverent, deliberately un-full.
101
+ - **Flagships:** MUJI art direction, Shiseido editorial, Hara's own book design.
102
+ - **Keywords:** generous-whitespace · monochrome · patient · reduced.
103
+ - **Fits:** dwell / glance.
104
+ - **BRICKS execution:**
105
+ - Bricks: a single hero `Image` (real photo, never redrawn), one small `RichText` caption, lots of empty Canvas; `Slideshow` rotation slow (12–24s per item).
106
+ - Heroes: the single hero `Image` shifts subtly in scale/position across Canvases (same id) — the photograph is the constant; everything else is breath.
107
+ - Theme tokens: warm-white ground (`#F8F4ED` or similar), single warm-charcoal ink (never pure black), no accent color.
108
+ - Spacing scale: `8 / 24 / 48 gu`. Grid stance: **breathe** (the grid is there but mostly unused; content islands placed with precision, 70–80% empty).
109
+ - Density rhythm: every Canvas is low-density. Variation is in framing (top-third / bottom-third / centered isolate), not density jumps.
110
+ - Motion: barely perceptible Standby (300–500ms delay, slow opacity easing); no `loop` animations.
111
+ - Asset emphasis: photography is the work — Media Flow asset must score 9–10 on the 5-10-2-8 craft dimension; one image carries the canvas.
112
+ - **Wrong for:** information-dense kiosks, transactional flows, dashboards.
113
+
114
+ ### 4. Dieter Rams industrial (Braun / Vitsœ / pre-2010 Apple)
115
+
116
+ - **Pitch:** Useful, honest, restrained, quietly confident.
117
+ - **Flagships:** Braun catalogs, pre-2010 Apple, Vitsœ.
118
+ - **Keywords:** functional · tactile · unobtrusive · long-lasting.
119
+ - **Fits:** glance / browse / monitor.
120
+ - **BRICKS execution:**
121
+ - Bricks: product `Image` as hero, sparse `RichText` specification blocks, hairline `Rect` grids separating spec columns.
122
+ - Heroes: the product photograph itself — re-framed and re-scaled across Canvases via shared id; spec callouts are auxiliary.
123
+ - Theme tokens: monochrome grey scale + one functional accent (used only where it means something — warning, primary action).
124
+ - Spacing scale: `2 / 4 / 8 gu`. Grid stance: **lean** (tight, even, predictable; nothing breaks rank).
125
+ - Density rhythm: even and measured across Canvases — no dramatic density jumps; pacing comes from Brick weight not layout shifts.
126
+ - Motion: minimal — Standby with linear easing, no spring, no `loop`.
127
+ - Asset emphasis: hero product photography first-class; spec icons as restrained line drawings.
128
+ - **Wrong for:** consumer entertainment, maximalist branding, hospitality warmth.
129
+
130
+ ---
131
+
132
+ ## School 3 · Editorial and narrative
133
+
134
+ ### 5. Magazine editorial (NY Magazine / Bloomberg Businessweek lineage)
135
+
136
+ - **Pitch:** Opinionated, layered, alive. Real editorial hierarchy.
137
+ - **Flagships:** New York Magazine, Bloomberg Businessweek, The California Sunday Magazine.
138
+ - **Keywords:** layered · photographic · type-driven · maximalist-typography.
139
+ - **Fits:** dwell / browse.
140
+ - **BRICKS execution:**
141
+ - Bricks: oversized `RichText` display headlines (a strong serif), second sans family for body, `Image` bricks anchored to text columns, pull-quote `Text` bricks at 2× body scale, color-blocked `Rect` sidebars.
142
+ - Heroes: masthead chrome (publication name + date), pull-quote container, hero photograph — all reposition across Canvases via shared id, giving the layered flip-through feel.
143
+ - Theme tokens: photograph-driven palette, accent values pulled from the hero images themselves and bound as Data; rich supporting neutrals.
144
+ - Spacing scale: `1 / 2 / 4 / 8 / 16 gu` (wider scale for editorial-style overlap and pull-quote breaks).
145
+ - Grid stance: **lean** with deliberate overlaps — content sits on the grid but layers cross gutter lines.
146
+ - Density rhythm: full-bleed portrait → text-heavy spread → pull-quote → image grid → breather — rotate hard, this language *needs* density variation.
147
+ - Motion: rich Standby with stagger (50–100ms increments per Brick); shared chrome animates across canvases.
148
+ - Asset emphasis: editorial-quality photography (full-bleed, scene, portrait); custom display serif as `ApplicationFont`.
149
+ - **Wrong for:** short-attention-span interfaces, transactional kiosks, dashboards.
150
+
151
+ ### 6. Risograph zine (indie print lineage)
152
+
153
+ - **Pitch:** Handmade, immediate, low-fidelity on purpose, warm.
154
+ - **Flagships:** Independent zines, Rough Trade posters, skate-culture print design.
155
+ - **Keywords:** risograph · two-color · textured · hand-placed.
156
+ - **Fits:** dwell / browse.
157
+ - **BRICKS execution:**
158
+ - Bricks: 2–3 spot-color `Rect` grounds, slightly off-grid `Image` bricks (deliberate), `Text` in a distinctive display, halftone overlays as low-opacity `Image` bricks (texture asset in Media Flow).
159
+ - Heroes: a distinctive display-type wordmark or a halftone-textured shape that re-stamps in different positions across Canvases — the hero feels stamped, not placed.
160
+ - Theme tokens: risograph palette (flo-pink, teal, navy, mustard) — saturated, slightly imperfect overprints.
161
+ - Spacing scale: deliberately irregular — `1 / 5 / 13 gu` (hand-placed feel; consistent within scale but not evenly stepped).
162
+ - Grid stance: **break** (Bricks deliberately off-grid by 1–2 units, slight rotations, content kissing edges).
163
+ - Density rhythm: chunky-and-busy alternating with stark single-image Canvases — the zine flip-through feel.
164
+ - Motion: hand-placed feel via tiny rotations on Standby (`rotate: 1–2deg` baseline); avoid the runtime's polished auto-tween for primary entries — use `ease-linear` or even snap on Standby for some elements.
165
+ - Asset emphasis: spot-color illustration, halftone texture, distinctive display type.
166
+ - **Wrong for:** enterprise, premium, anything trust-seeking.
167
+
168
+ ---
169
+
170
+ ## School 4 · Motion and the digital-native
171
+
172
+ ### 7. Field.io motion poetics
173
+
174
+ - **Pitch:** Alive, computational, mesmerizing. Motion is the medium.
175
+ - **Flagships:** Field.io, Active Theory, Universal Everything.
176
+ - **Keywords:** generative · motion-first · particle · light-as-material.
177
+ - **Fits:** dwell / monitor (high-end).
178
+ - **BRICKS execution:**
179
+ - Bricks: dominant `Video` / `VideoStreaming` / `Lottie` / `Rive` / `GenerativeMedia` full-bleed; `RichText` overlays at delicate sizes with semi-transparent backgrounds.
180
+ - Heroes: the brand reel / generative motion piece itself, full-bleed and persistent across Canvases — only the overlaid type changes; the motion is the throughline.
181
+ - Theme tokens: dark indigo to electric gradient ground, or pure monochrome with one light-based accent.
182
+ - Spacing scale: `2 / 8 / 24 gu` (delicate gaps for overlay type, large gaps for breathing room around full-bleed motion).
183
+ - Grid stance: **breathe** — motion is full-bleed; UI sits on the grid but quietly.
184
+ - Density rhythm: every Canvas is low-density overlay on full-bleed motion; variation is in *what the motion is doing* this Canvas, not in layout density.
185
+ - Motion: slow continuous motion via `Animation` `runType: 'loop'` — used sparingly, only on the hero. Cross-canvas transitions use shared-Brick auto-tween of full-bleed elements.
186
+ - Asset emphasis: brand reel video and animated logo Lottie/Rive are first-class — preloaded via Media Flow, hash-verified, offline-safe; the canvas is *driven* by these assets.
187
+ - **Wrong for:** content-heavy displays, purchase funnels, anything requiring careful reading.
188
+
189
+ ### 8. Brutalist web (Are.na / terminal lineage)
190
+
191
+ - **Pitch:** Raw, direct, anti-polish, confident.
192
+ - **Flagships:** Are.na, Bloomberg Terminal, deliberate "unstyled" indie sites.
193
+ - **Keywords:** unstyled · monospace · text-dense · system-typography.
194
+ - **Fits:** browse / monitor.
195
+ - **BRICKS execution:**
196
+ - Bricks: system-font `Text` and `RichText` only (or IBM Plex Mono / Times New Roman as `ApplicationFont`); dense `Items` lists with templated rows; hairline `Rect` borders only; no decorative imagery.
197
+ - Heroes: a single persistent navigation bar or "you are here" address-style label, same id across Canvases.
198
+ - Theme tokens: black on white, occasional single saturated accent, almost no gradients/shadows/rounded corners.
199
+ - Spacing scale: `1 / 2 / 4 gu` (tight, monospaced character cell rhythm).
200
+ - Grid stance: **lean** but ascetic — grid used as a literal table, no decorative breathing.
201
+ - Density rhythm: uniformly dense — variation is in content depth, not visual density. This language earns its weight by *refusing* the density-rotation principle.
202
+ - Motion: snap-cuts allowed and even welcome — but only as deliberate emphasis. Most transitions are shared-Brick auto-tween of typographic chrome.
203
+ - Asset emphasis: type. That's it.
204
+ - **Wrong for:** consumer retail, emotional storytelling, hospitality.
205
+
206
+ ---
207
+
208
+ ## School 5 · Expressive and experimental
209
+
210
+ ### 9. Sagmeister / experimental
211
+
212
+ - **Pitch:** Provocative, hand-made, emotional, attention-grabbing. The concept drives every choice.
213
+ - **Flagships:** Stefan Sagmeister, Paula Scher in expressive mode, Stefan Walz.
214
+ - **Keywords:** expressive · hand-craft · concept-driven · theatrical.
215
+ - **Fits:** dwell / glance (cultural / event contexts).
216
+ - **BRICKS execution:**
217
+ - Bricks: anything goes, but every choice serves the concept — `Sketch` for hand-drawn elements, sourced `Image` for hand-crafted typography photographs, `Text` bricks at extreme scale shifts via `rotate` and large grid frames.
218
+ - Heroes: the conceptual centerpiece (a hand-crafted word, a built-physical-object photograph) re-staged dramatically across Canvases — different angle, different scale, different distance — same id.
219
+ - Theme tokens: saturated, often clashing pairs used deliberately. No fear of "bad taste."
220
+ - Spacing scale: deliberately broken — `0 / 7 / 23 gu` (the irregularity is the point; siblings still share the same set so it doesn't read as drift).
221
+ - Grid stance: **break** — the grid is a foil to push against, not a rule.
222
+ - Density rhythm: extreme oscillation between maximalist Canvases and empty-pause Canvases.
223
+ - Motion: theatrical — long durations (600–1000ms), dramatic easing (`easeInOutBack`, `easeInOutElastic`), deliberate "broken" timings.
224
+ - Asset emphasis: hand-craft photography, custom or modified type, conceptual imagery.
225
+ - **Wrong for:** ongoing systems, B2B utility, any context demanding restraint.
226
+
227
+ ### 10. Y2K / futurist-retro
228
+
229
+ - **Pitch:** Optimistic, technological, nostalgic-for-futures-past.
230
+ - **Flagships:** Early-2000s tech branding, contemporary nostalgia revivals in fashion and music.
231
+ - **Keywords:** chrome · bubble · glossy · iridescent.
232
+ - **Fits:** dwell / interact (gaming / music / Gen Z contexts).
233
+ - **BRICKS execution:**
234
+ - Bricks: chrome-treatment `Image` bricks (sourced or brand-anchored generated); pixel/bitmap font as `ApplicationFont` (Departure Mono, VT323) for HUD overlays; scan-line overlay `Rect` bricks at low opacity.
235
+ - Heroes: HUD frame chrome (scan-line overlay, corner brackets, status readout strip) — persistent across Canvases via shared id, the chrome *is* the throughline; content swaps inside the HUD.
236
+ - Theme tokens: chrome / iridescence, acid green, electric blue, hot pink. Heavy gradients but in a meant-to-be-retro way (declared as Data tokens, never default web gradients).
237
+ - Spacing scale: `2 / 6 / 12 gu` (HUD-style regular intervals).
238
+ - Grid stance: **lean** — HUDs are precise; the chrome stays orthogonal even when content goes psychedelic.
239
+ - Density rhythm: HUD frame is constant; inner content alternates between data-readout dense and hero-render isolate.
240
+ - Motion: HUD-style entrances, cursor / scanner animations via `Animation`, pseudo-CRT glow via `Rect` shadow tokens.
241
+ - Asset emphasis: chrome 3D renders, retro-tech imagery, bubble lettering.
242
+ - **Wrong for:** trust-seeking finance, healthcare, enterprise.
243
+
244
+ ---
245
+
246
+ ## Combining language with archetype
247
+
248
+ The picked language constrains *expression*. The picked archetype constrains *structure*. They multiply, but with constraints:
249
+
250
+ | Archetype | Naturally fits | Resistant to |
251
+ |---|---|---|
252
+ | Glance | Swiss Editorial · Bauhaus · Kenya Hara · Brutalist web | Field.io (motion competes with glance) · Sagmeister (concept needs dwell) |
253
+ | Browse | Magazine editorial · Risograph · Brutalist web · Dieter Rams | Field.io · Y2K (too much motion noise) |
254
+ | Interact | Dieter Rams · Swiss Editorial · Brutalist web · Y2K (gaming) | Kenya Hara (precious quiet doesn't survive a tap) · Sagmeister (instability discourages decision) |
255
+ | Transact | Dieter Rams · Swiss Editorial | Field.io · Sagmeister · Y2K · Risograph (trust deficit) |
256
+ | Monitor | Swiss Editorial · Bauhaus · Brutalist web · Dieter Rams | Magazine editorial · Sagmeister (decoration distracts from data) |
257
+ | Dwell | Field.io · Magazine editorial · Kenya Hara · Sagmeister · Y2K | (any of the above can dwell; least natural is Brutalist web) |
258
+
259
+ When the user picks an awkward combination ("transact + Sagmeister"), surface the tension explicitly. Either talk them into the natural pairing, or commit hard to the awkward one as a deliberate brand statement — but don't middle-ground it into mush.
260
+
261
+ ## Adapting and inventing
262
+
263
+ The 10 directions are anchors. Real work often blends — "Kenya Hara emptiness with one Risograph spot-color accent for the call-to-action" is a legitimate combination if executed deliberately. What's not legitimate is blending three to dilute commitment.
264
+
265
+ When inventing a direction not in the library: write its system declaration block as if it were one of the entries above (pitch / flagship / keywords / fits / BRICKS execution / wrong-for). If you can't, the direction isn't real yet — keep working on it before committing.
@@ -0,0 +1,116 @@
1
+ # Performance
2
+
3
+ Second-order rules that keep a BRICKS Application fast on the actual hardware it deploys to (typically lower-spec than the developer's laptop) and resilient across watchdog reboots and offline windows.
4
+
5
+ ## Throttle at the Generator boundary
6
+
7
+ A high-frequency source (sensor publishing at 100 Hz, MQTT firehose, LLM token stream) written directly to Data will fire `update` / `valueChange` events on every write. Every bound Brick re-renders. Every dependent DataCalc re-runs. The canvas chokes.
8
+
9
+ **Throttle / aggregate inside the Generator**, not after.
10
+
11
+ - For sensor / MQTT: cap the published rate in the Generator (sample to 1–10 Hz, or only emit on Δ).
12
+ - For LLM streaming: write progressive deltas, but emit a `complete` event at the end and let downstream chains key off completion.
13
+ - For HTTP polling: respect a backoff; don't re-emit identical payloads.
14
+
15
+ If the source is upstream of you (a Generator template you can't modify), insert a buffering DataCalc that publishes to a downstream Data on a rate-limited schedule.
16
+
17
+ ## Bound Data history explicitly
18
+
19
+ Data is not a time-series store. If a design needs "the last N values" (a chart series, recent log lines, a conversation history), keep an explicitly bounded array.
20
+
21
+ - Use an `Iterator` Generator or a DataCalc that pushes new values and trims the head when length exceeds the cap.
22
+ - Pick the cap to fit the *visible* need, not "for safety" — 60 points for a 60-second chart, not 10 000.
23
+ - Unbounded arrays are a slow memory leak that watchdog will eventually paper over by killing the Application — and the user will see a reset they don't understand.
24
+
25
+ For longer-term history, push to a backend (Remote Data Bank, GraphQL, HTTP) via a separate Generator and treat the Data side as a recent-window cache.
26
+
27
+ ## `persistData: true` is for survival, not state
28
+
29
+ `Data.persistData: true` causes the Data value to be persisted across launcher restarts. This is the right knob for:
30
+
31
+ - Last-known-good content (the most recent fetched menu, the last cached weather payload).
32
+ - Idempotency keys generated at flow start.
33
+ - Locale preference and other long-lived configuration.
34
+
35
+ It is the *wrong* knob for transient flow state. A half-completed kiosk flow that survives a watchdog reset stuck in the middle is worse than a clean reset to Welcome. Default Path: keep flow Data ephemeral; reset on boot Canvas enter.
36
+
37
+ ## Boot Canvas must render in < 1 second using only cached/persisted Data
38
+
39
+ The boot Canvas is what the user sees on cold start, after a watchdog reset, after every fleet-managed reboot. It must:
40
+
41
+ - Render *something* immediately, with no Generator success required.
42
+ - Read from cached / persisted Data only — no synchronous network dependencies.
43
+ - Provide a self-recovery path (Cancel / Restart accessible from any deeper Canvas) so users stuck in a half-completed Subspace can always return.
44
+ - Reset all transient flow Data and Subspace state on entry.
45
+
46
+ **Failure mode:** boot Canvas waits for an HTTP fetch to render its content; user sees a blank screen on offline cold boot.
47
+
48
+ ## `renderOutOfViewport: false` for legitimate off-grid Bricks
49
+
50
+ By default the runtime auto-culls Bricks fully outside the grid. For Bricks that intentionally sit partly off-grid (overflow effects, anchored at origin) the in-viewport portion still renders.
51
+
52
+ If you have a Brick that is *entirely* off-grid for design reasons (a parked element that animates in via Switch / DynamicAnimation), set `renderOutOfViewport: false` to make the cull explicit and reduce per-frame cost on canvases with many such elements.
53
+
54
+ For Bricks that are off-grid only momentarily during a transition, leave the default — culling mid-tween causes flicker.
55
+
56
+ ## Brick count discipline
57
+
58
+ Every Brick on a Canvas costs render budget; off-screen-but-on-Canvas Bricks still cost something. Lists of 100 small text Bricks for a daily schedule will outrun a low-spec signage panel.
59
+
60
+ - Prefer **Items** Brick (virtualized) over hand-laid lists of repeating Bricks.
61
+ - Prefer **fewer-bigger** decorative Bricks over **many-tiny** ones for purely visual texture.
62
+ - Composite tiles often work better as a single Slideshow / Items frame than as N hand-positioned Brick groups per Canvas.
63
+
64
+ ## Offline-first wrap on every networked Generator
65
+
66
+ The standard wrap for any Generator that touches the network:
67
+
68
+ 1. **Cache layer** — read from local cache (DataBank, File Generator, persisted Data) before / instead of hitting network.
69
+ 2. **Fetch layer** — when network is up, fetch and update cache; emit `data updated` event.
70
+ 3. **Queue layer** — for writes (form submissions, payments), queue locally on offline; flush on reconnect with idempotency keys.
71
+ 4. **Status layer** — expose `network.online` and `data.lastSyncedAt` Data values for the UI to surface.
72
+
73
+ Default canvases read from the cache. Live fetches happen out-of-band; their results land in cache and trigger re-render via Data events.
74
+
75
+ **Failure mode:** a Generator that fetches synchronously on Canvas enter and renders blank on failure. Every networked Generator without this wrap is an outage waiting to ship.
76
+
77
+ ## Media in Media Flow is local-first — image/video/Lottie/Rive does NOT break offline
78
+
79
+ A common misread of "offline-first" is that media-rich designs (lots of images, video loops, Lottie / Rive animations, brand reels) are dangerous for offline deployments. **They are not.** Media bound through Media Flow is **preloaded** to the device at boot (or background-synced when Media Flow content updates) and served from local storage thereafter. Once cached, the media is available with no network at all — that is the whole point of Media Flow.
80
+
81
+ The mechanism:
82
+
83
+ - Each Media Flow asset is referenced from the Subspace by a Data of `kind: { type: 'media-resource-image' | 'media-resource-video' | 'lottie-file-uri' | 'rive-file-uri' | ... }` with a `preload: { type: 'url', hashType, hash }` block.
84
+ - The runtime's preload pass downloads every media asset referenced by the Application before letting the boot Canvas activate (or during a controlled progress state), and verifies integrity via the hash.
85
+ - Subsequent renders read from the local cache; the original URL is no longer needed.
86
+ - Cache survives watchdog restarts and reboots; `Application.runtimeCacheOptions` controls the policy.
87
+
88
+ Implications for design:
89
+
90
+ - **You can build heavy, image-rich, motion-heavy, video-driven Applications for fully-offline kiosks and signage.** The deployment doesn't lose anything by being offline; it loses something only if media isn't bound through Media Flow.
91
+ - **Brick templates that consume Media Flow assets — Image, Video, Slideshow, Lottie, Rive, GenerativeMedia source bricks — are offline-safe by default**, as long as their `source` (or equivalent) binds to a Media Flow Data with `preload` metadata, not to an arbitrary external URL referenced inline.
92
+ - **The offline-first wrap above is for Generators producing dynamic / runtime data** — current menu, train times, sensor readings, LLM responses, server-fed inventory. Not for design-time media. Don't conflate the two.
93
+ - **Do not** drop image / video / motion bricks "to be safe for offline". The result is generic, text-only design that loses the brand and the polish for no real gain.
94
+
95
+ The two failure modes to actually worry about:
96
+
97
+ 1. **Inline URLs that bypass Media Flow.** A Brick prop set to a literal `https://...` image URL is fetched at render time; offline = blank. Bind via Media Flow Data, not inline strings. (Truth #2 + the asset protocol enforce this structurally.)
98
+ 2. **Generators that fetch *content* synchronously**, even when the bricks displaying that content are bound through Media Flow. The content fetch is what fails, not the rendering. Wrap those Generators per the section above.
99
+
100
+ When unsure: ask "is this binary baked into the Application via Media Flow, or fetched at runtime from a server?" The first is offline-safe automatically; the second needs the wrap.
101
+
102
+ ## DataCalc trigger discipline
103
+
104
+ `triggerMode: 'auto'` reruns the calc on every input change. With multiple inputs and multiple downstream consumers, an `auto` calc can fire dozens of times per logical update.
105
+
106
+ - Use `auto` only when the calc is cheap and the consumers genuinely want every result.
107
+ - For expensive calcs (collection reductions, large object transforms), use `manual` and trigger explicitly via `PROPERTY_BANK_COMMAND` from the relevant event chain.
108
+ - Watch for circular dependencies: A's output is B's input is A's input. Auto mode will spin.
109
+
110
+ ## Animation budget
111
+
112
+ Standby Transitions are nearly free. Continuous `loop` animations are not.
113
+
114
+ - Reserve `runType: 'loop'` for genuine attention-draws: alarm pulse, recording-active indicator, "scan in progress" hint.
115
+ - A Canvas with 5+ looping animations on idle bricks burns frame budget for no design payoff.
116
+ - One orchestrated canvas-enter (staggered standby reveals) creates more delight than six scattered loops.
@@ -0,0 +1,137 @@
1
+ # Presentation and slideshow
2
+
3
+ Anything that reads as "a sequence of states the viewer is walked through" — pitch deck, intro presentation, explainer, storyboard, training slides, demo flow, kiosk welcome loop, lobby showcase. The deliverable is a runnable Subspace, not a slide export. The frame is the Application's Canvas graph plus what moves across it.
4
+
5
+ The difference between a real designed presentation and "narrated PowerPoint in a Canvas wrapper" is whether anything *persists* across slides — visually, structurally, narratively. The runtime gives this for free via Shared Brick auto-tween (Truth #3); the design discipline is to use it as a narrative principle, not just a runtime fact.
6
+
7
+ ## Canvas-graph shape — pick one
8
+
9
+ Three viable shapes. Pick once, before placing Bricks; the choice constrains everything downstream.
10
+
11
+ ### Shape A — Slideshow Generator (single Canvas, slides as Data)
12
+
13
+ - One Canvas, one Slideshow Brick, slides as Data list (text content, image refs, timing). Optionally a small Generator that feeds the list from a remote source.
14
+ - Identical or near-identical layout per slide — only content varies.
15
+ - Fits: glanceable signage loops, ambient lobby content, menu rotations, training-slide loops, anything where rhythm is regular and structure is uniform.
16
+ - Cost: cheapest to author and maintain. Adding a slide is adding a Data row.
17
+ - Limit: every slide has the same Brick layout. No bespoke composition per slide.
18
+
19
+ ### Shape B — Multi-Canvas state machine
20
+
21
+ - One Canvas per slide (or per scene). Bricks per Canvas can differ; hero Bricks share ids across Canvases for auto-tween.
22
+ - Transitions are Canvas changes — auto-advance via timed Animation, gesture via `brick_press`, remote/keyboard via on-device DevTools, Data-driven via Switch on a `currentScene` value, external trigger via MQTT / BLE Generator.
23
+ - Fits: pitch decks with bespoke layouts per slide, narrative arcs with chapter shifts, branching demos, interactive storyboards.
24
+ - Cost: heavier to author — each Canvas is a real composition.
25
+ - Win: every slide is its own designed thing while heroes (logo, headline word, brand chrome) carry continuity for free.
26
+
27
+ ### Shape C — Hybrid
28
+
29
+ - A controlling Canvas with a Slideshow Brick for a linear sub-flow (intro montage, product gallery), bracketed by full Canvases for moments of bespoke composition (cover, chapter divider, finale, branching choice).
30
+ - Fits: presentations with a regular middle and dramatic endpoints; explainers that loop a product gallery between narrative beats.
31
+ - Cost: medium. The boundary between the Slideshow Brick's slides and the parent Canvases is the design decision worth thinking about — heroes should persist through both.
32
+
33
+ ### Decision rule
34
+
35
+ ```
36
+ Uniform layout, regular rhythm, content-driven? → Shape A (Slideshow Generator)
37
+ Bespoke layouts, narrative arc, hero continuity? → Shape B (multi-Canvas)
38
+ Regular middle + dramatic endpoints? → Shape C (hybrid)
39
+ ```
40
+
41
+ If you find yourself wanting per-slide bespoke layout inside a Slideshow Brick, you've outgrown Shape A — promote to B or C.
42
+
43
+ ## Navigation patterns
44
+
45
+ How does the viewer (or the runtime) move forward?
46
+
47
+ - **Auto-advance** — an Animation drives a `slideIndex` Data forward on an interval; Switches on Canvas show/hide accordingly. Use for: signage loops, lobby content, ambient screens. Per-slide duration calibrated to the interaction archetype (glanceable: 3–5s; dwell: 8–15s; narrative read: 10–20s).
48
+ - **Gesture** — `brick_press` on a thin left/right zone or full-Canvas `on_press`. Use for: interactive kiosks, touch-driven presentations. Make the affordance visible if the deployment is touch-capable; invisible zones on no-touch are pointless.
49
+ - **Operator remote / keyboard** — via on-device DevTools or a companion app. Map to a `next` / `prev` action that increments `slideIndex`. Use for: pitch decks with a live presenter.
50
+ - **External trigger** — MQTT / BLE / sensor / API Generator writes `slideIndex`. Use for: synchronized screens, event-driven storytelling, sensor-reactive displays.
51
+ - **Data-progress-driven** — a `progress` Data crosses thresholds; Switches reveal scenes. Use for: progress meters, onboarding flows where steps are tied to actual state, not arbitrary advance.
52
+
53
+ **Position memory:** if the deployment can resume (operator break, watchdog reset during a presentation), `persistData: true` on the slide-index Data. Note the trade-off — a watchdog reset half-way through a kiosk loop will resume mid-loop, which is usually wrong for ambient signage. Pick deliberately.
54
+
55
+ ## Visual rhythm and pacing
56
+
57
+ Three Canvases with identical layout in a row is monotony. Three Canvases with wildly different layouts in a row is chaos. The work between those extremes is rhythm.
58
+
59
+ ### Density rotation
60
+
61
+ Across consecutive Canvases, alternate density. Eight layout archetypes worth rotating through:
62
+
63
+ | Archetype | Use for |
64
+ |---|---|
65
+ | Full-bleed image | Cover, chapter break, emotional beat |
66
+ | Big headline + thin body | Single-point slides, declarations |
67
+ | Two-column comparison | Before/after, A vs B, our way vs their way |
68
+ | Data-figure feature | Stat that needs to land |
69
+ | Pull quote | Testimonial, principle, mantra |
70
+ | Stepped list | Process, sequence, recipe |
71
+ | Portrait + caption | Speaker intro, customer face |
72
+ | Negative-space breather | Reset, transition, deliberate pause |
73
+
74
+ In a 10-Canvas deck, hit at least 5 different archetypes. Never three of the same archetype in a row.
75
+
76
+ ### Colour rhythm
77
+
78
+ Mostly your declared ground, occasional inverted Canvas (dark on light or light on dark) to punctuate chapter breaks, rare full-bleed accent to mark a hero moment. Don't alternate ground every Canvas — the rhythm collapses into strobe.
79
+
80
+ ### Pacing tied to archetype
81
+
82
+ - *Glanceable*: 3–5s per slide; viewer catches one idea per moment. Heroes minimal — one image, one headline.
83
+ - *Dwell* (lobby, ambient): 8–15s per slide; viewer absorbs slowly. Heroes can hold the screen.
84
+ - *Presented* (live presenter): operator-driven, but design for ~30–60s per slide; presenter elaborates the Canvas. Heroes can be subtle persistents.
85
+ - *Narrative read* (training, explainer): 10–20s per slide; viewer reads the Canvas in full.
86
+
87
+ ## Hero continuity — the narrative principle
88
+
89
+ This is what separates real presentation design from narrated PowerPoint.
90
+
91
+ Pick **one or two hero Bricks** — typically the logo lockup, a headline word, a product silhouette, or a brand chrome element. Give them the **same id** across every Canvas they appear on. Each Canvas is then a *transformation* of the hero's state (position, scale, opacity, rotation), not a new set of elements appearing and disappearing.
92
+
93
+ The runtime tweens position/size for free between Canvases when ids match (Truth #3). What the designer commits to is *which* Brick is the hero and how its journey reads across the sequence.
94
+
95
+ **Pattern:** open with hero at full scale, centered. Chapter Canvases shrink/dock the hero to a corner as auxiliary content fills the Canvas. Chapter break enlarges/recentres the hero. Finale returns hero to opening scale. Heroes are the thread that makes the sequence feel like one designed thing.
96
+
97
+ **Auxiliary Bricks** — content that only matters to one Canvas (one chart, one quote, one figure) — scope to that Canvas. They appear via Standby Transition and exit when the Canvas leaves. Heroes live above; auxiliaries cycle.
98
+
99
+ This eliminates the failure mode where every Canvas unmounts its entire Brick set and remounts a new one. That is the visual equivalent of slide cuts; runtime expense aside, it tells the viewer the design is a slide deck pretending to be an Application.
100
+
101
+ ## Anti-"narrated PowerPoint" rules
102
+
103
+ - **No bare Canvas changes.** Every Canvas change has a hero that persists, or a deliberate snap-cut for emphasis. Never a full-set unmount + remount as routine navigation.
104
+ - **Standby Transitions cross-fade, not gap.** Standby entrance starts before the previous Canvas's exit completes — overlap. A blank moment between Canvases reads as the runtime hanging.
105
+ - **Per-Canvas content scoped to the Canvas.** Heroes parented above, in the shared id pool. Auxiliaries Canvas-local.
106
+ - **No chrome contamination.** Page counters, progress bars, chapter numbers — if you need them, render them via the runtime's standby/auto-tween of a shared chrome Brick, not by drawing them into Canvas content. Better: drop them entirely unless the audience genuinely needs to know where they are.
107
+ - **Motion vocabulary consistent.** One easing for routine transitions, one for emphasis, one for entry. Six different easings across ten Canvases reads as random.
108
+
109
+ ## Subtitle Brick rules (if narration is in scene)
110
+
111
+ If audio narration plays alongside the Canvas sequence:
112
+
113
+ - Subtitle is a `RichText` Brick bound to a `subtitle` Data, updated by the Generator that drives narration.
114
+ - Contrast: high enough to read against any ground used in the sequence (commit to it across all Canvases). If the chosen language requires light subtitles, hero photography must accommodate.
115
+ - Length: max 12–15 characters per line; max 2 lines.
116
+ - Line breaks at sentence boundaries (`。 ! ?` for CJK, `. ! ?` for Latin), never mid-clause.
117
+ - No full-bleed background. A subtle drop shadow or text outline (via `RichText` styling) is enough — a black bar across the bottom reads as TV captioning, not design.
118
+ - Standby Transition: fade in 200ms before the corresponding narration phrase, fade out 200ms after. Snap-cuts on subtitles look broken.
119
+
120
+ ## First-viewer reaction rubric
121
+
122
+ Use this as a self-check before declaring a presentation done. Predict (or directly ask, if you can) the first reaction:
123
+
124
+ - *"This is narrated PowerPoint."* — Redesign. Hero architecture is missing or broken. Likely full-set unmount per Canvas. Back to Pass 1.
125
+ - *"Things were just moving."* — Motion is present but hierarchy isn't. Heroes exist but compete with auxiliaries. Quiet down everything except the hero.
126
+ - *"I wanted to keep watching."* — Baseline good. Pacing works, hero continuity reads. Polish from here.
127
+ - *"I wanted to screenshot that frame."* — Memorable keyframe achieved. At least one Canvas is doing more than its job. Don't disturb it; check the surrounding Canvases match the bar.
128
+
129
+ A presentation that gets ≤ first reaction has a structural problem; a presentation that gets ≥ third has a craft problem at worst. Aim for fourth on at least one Canvas in any sequence ≥ 5 Canvases.
130
+
131
+ ## Anti-patterns specific to presentations
132
+
133
+ - **Title-slide wrapper.** A "BRICKS Presentation v1" splash before the actual cover is wasted attention. Open in the work.
134
+ - **Decorative bullet rows.** A list with an icon per row is rarely the design. Either commit to icons that mean something or drop them.
135
+ - **Three "key benefits" Canvases in a row, same layout.** Density rotation broken.
136
+ - **Animation `loop` everywhere.** One looped hero motion is fine. Looped sparkle on every accent is noise.
137
+ - **Conventional "Thank You" finale Canvas.** Either make the finale carry weight (a callback to the opening hero state, a single declarative line, a quiet pause) or end on the last meaningful Canvas. A boilerplate close undoes the work.