@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,284 @@
1
+ # When the Brief is Branded — Media Flow Protocol
2
+
3
+ Brand fidelity is *the* differentiator on branded scene work. Every branded BRICKS deployment that "looks generic" got there by skipping the asset hunt and going straight to colors-and-fonts. Most agent-produced branded work fails at the same stop: the agent describes assets it should have, then proceeds to design without acquiring them.
4
+
5
+ This file is operational, not aspirational. It tells the agent **what to actually do**, with concrete recipes, a quality bar with named dimensions, structural enforcement that prevents redraw shortcuts, and a sanctioned path for *creating* assets when none exist — by composing the host environment's image / motion generators, not by drawing in Sketch.
6
+
7
+ In BRICKS, brand binaries live in **Media Flow** and are referenced from Subspaces by Data of `kind: { type: 'media-resource-image' | 'media-resource-video' | 'media-resource-audio' | 'media-resource-file' | 'lottie-file-uri' | 'rive-file-uri' | 'binary-asset' }`. **Never embed brand binaries inline in Brick props.** The Application config travels light; binaries refresh on a different cadence; reuse demands an indirection.
8
+
9
+ **Media Flow is offline-safe by design.** Assets bound this way are preloaded to the device with hash-verified integrity and served from local storage thereafter. Image, video, Lottie, Rive, brand reels — none of these are "offline risk" categories when bound correctly. Do not water down a branded design with text-only fallbacks because the deployment is offline; richness through Media Flow is precisely how the runtime supports offline-first scenes. (See [`performance.md`](performance.md#media-in-media-flow-is-local-first--imagevideolottierive-does-not-break-offline) for the full mechanism.)
10
+
11
+ ## Asset categories — first-class vs. auxiliary
12
+
13
+ The single most common branded-work failure: agent collects colors and fonts, calls it a brand spec, and ships generic-looking output. Brand identity is *recognized*, not *measured* — and recognition runs on:
14
+
15
+ | Asset type | Recognition contribution | Required when |
16
+ |---|---|---|
17
+ | **Logo** (vector, light + dark + mono) | Highest — any scene with a logo is instantly identifiable | Always, for any branded work |
18
+ | **Product photography** (real renders, multiple crops) | Very high — physical products are recognized by themselves | Physical-product brands (hardware, consumer goods, hospitality, retail) |
19
+ | **UI screenshots** (real captures, current version) | Very high — digital products are recognized by their interface | App / SaaS / dashboard / portal brands |
20
+ | **Scene / lifestyle photography** (brand-shot, real venues) | High — sets the brand's environmental temperature | Hospitality / retail / experiential / real-estate brands |
21
+ | **Motion assets** (brand video, Lottie, Rive) | High — BRICKS canvases are time-based; brand motion is first-class | Any brand with extant motion identity (launch films, brand reels, animated logos) |
22
+ | **Color palette** | Medium — supporting role; orphans without the above | All work |
23
+ | **Typography** | Medium — supporting role; same caveat | All work |
24
+ | **Voice & tone** | High where used (constraint on visible Data) | Where copy is non-trivial |
25
+
26
+ **Rule that follows:** acquiring colors and fonts only — without logo / product / UI / motion — is **not** a brand spec. It is a partial spec at best. Surface the missing categories as gaps before you start designing.
27
+
28
+ ## The acquisition flow — five steps, each with concrete actions
29
+
30
+ ### Step 1 — Ask, with a full checklist
31
+
32
+ Don't ask "do you have brand guidelines?". That gets a yes from people who only have a logo and a hex code, and the gap stays invisible until you're already designing. Ask explicitly, in one batch:
33
+
34
+ ```
35
+ For <brand>, do you have any of these? (priority order)
36
+ 1. Logo — vector source (SVG / AI / PDF) or high-res PNG. Light + dark + mono variants ideal.
37
+ 2. Product photography (physical brands) — official renders or real photos, multiple crops.
38
+ 3. UI screenshots (digital brands) — current-version captures of key screens.
39
+ 4. Scene / lifestyle photography (hospitality / retail / experiential).
40
+ 5. Motion assets — brand films, animated logos, Lottie / Rive files.
41
+ 6. Brand colors — palette + usage rules.
42
+ 7. Brand fonts — files licensed for embedded display, or named alternatives.
43
+ 8. Brand book / design system / voice guide.
44
+
45
+ Send what you have; I'll source the rest from official channels and tell you what's missing.
46
+ ```
47
+
48
+ ### Step 2 — Search official channels first
49
+
50
+ Before any aggregator:
51
+
52
+ | Asset | Primary channels |
53
+ |---|---|
54
+ | Logo | `<brand>.com/brand`, `<brand>.com/press`, `<brand>.com/press-kit`, `brand.<brand>.com`, the live site's header inline-`<svg>` |
55
+ | Product photos | `<brand>.com/<product>` hero + gallery, official launch films (capture frames), official press releases |
56
+ | UI screenshots | App Store / Play Store product page captures, the live site's screenshots section, official demo videos (capture frames) |
57
+ | Scene / lifestyle | Brand campaign archive on the live site, brand's official social media accounts |
58
+ | Motion | Brand's official YouTube channel, brand's launch microsites, the brand's own design-system Lottie library |
59
+ | Colors | Brand book PDF, brand design-system repo, the live site's CSS variables / Tailwind config |
60
+ | Fonts | The live site's `<link rel="stylesheet">` references, Google Fonts trace, brand book |
61
+
62
+ **`WebSearch` fallback queries** when official is dry:
63
+ - `<brand> logo download SVG`, `<brand> press kit`
64
+ - `<brand> <product> official renders`, `<brand> product photography hi-res`
65
+ - `<brand> app screenshots`, `<brand> dashboard UI`
66
+ - `<brand> launch film`, `<brand> brand reel`
67
+
68
+ Aggregators (Brandfetch, Logo.dev, etc.) are placeholders, not sources of truth. When you use one, label it as such in the spec and continue searching for the official source in parallel.
69
+
70
+ ### Step 3 — Acquire, with three fallback paths per category
71
+
72
+ Each category has a fallback ladder by yield. Walk down the ladder; don't stop on the first hit.
73
+
74
+ #### Logo — never approximate
75
+
76
+ 1. Independent SVG / PNG file from the brand's press kit.
77
+ 2. Inline `<svg>` extracted from the official site's HTML (`curl -A "Mozilla/5.0" -L <url>` then locate the logo node).
78
+ 3. Official social-media avatar (typically 400×400 or 800×800, transparent PNG) — last resort.
79
+
80
+ If all three fail: **stop and ask the user**. A logo is not optional; it's the recognition root. Do not draw a Sketch-Brick imitation. Do not generate a "logo-shaped" thing with AI. Either acquire a real logo or escalate the gap.
81
+
82
+ #### Product photography (physical brands)
83
+
84
+ 1. Official product page hero image — usually 2000 px+; fetch directly.
85
+ 2. Official press kit / brand center — often the highest resolution available.
86
+ 3. Official launch video frame-grab — for products with strong launch content. Use the host's video tools or extract via `yt-dlp` + `ffmpeg` if available.
87
+ 4. Wikimedia Commons — public-domain or freely licensed for some products.
88
+ 5. **AI generation, brand-anchored** — see [§ Creating assets when missing](#creating-assets-when-missing). Allowed only as a last resort and only with the discipline below.
89
+
90
+ #### UI screenshots (digital brands)
91
+
92
+ 1. App Store / Play Store product captures (verify they're real screenshots, not mockup-generator output).
93
+ 2. The live site's screenshots section.
94
+ 3. Demo-video frame-grabs.
95
+ 4. The brand's own social posts at recent product launches (often the freshest captures).
96
+ 5. The user's own account, captured live. Most accurate when the user has access.
97
+
98
+ #### Scene / lifestyle photography
99
+
100
+ 1. Brand campaign archive on official channels.
101
+ 2. Authorized licensed library (Getty / brand-specific contracted libraries) where the user has access.
102
+ 3. AI generation with reference anchoring — last resort.
103
+
104
+ #### Motion assets
105
+
106
+ 1. Brand's official channel (YouTube, Vimeo) — download with permission, frame-grab where embedding the full clip is overkill.
107
+ 2. Lottie / Rive files in the brand's design-system repo, where they exist.
108
+ 3. AI motion generation with reference anchoring — last resort, very high failure rate, expect to discard 9 of 10 candidates.
109
+
110
+ #### Colors and fonts (auxiliary)
111
+
112
+ - Colors: brand book → live-site CSS → sampling from official imagery (last resort, document the sample point).
113
+ - Fonts: brand-issued license + files → documented alternative if the license isn't available → closest licensed family with a note.
114
+
115
+ ### Step 4 — Score every asset against the 5-10-2-8 bar
116
+
117
+ The bar exists because cosmetic-quality drift is invisible until shipped, then obvious. Without it, the agent rates every found asset 8/10 and the floor sinks.
118
+
119
+ **Quantity bar:** search **5** rounds across multiple channels; collect at least **10** candidates per non-logo category before filtering; keep **2** winners; each scoring **≥ 8/10**.
120
+
121
+ **Quality dimensions** — for each candidate, score 0–10 on each, take the average. Below 8 → discard or use as a labeled placeholder. Logo is exempt from this filter (any real logo beats no logo).
122
+
123
+ | Dimension | What 8+ looks like | What's a deduction |
124
+ |---|---|---|
125
+ | **Resolution** | ≥ 2× the largest render size; for signage / 4K / print ≥ 3000 px on the long edge | Pixelation visible at target render scale; aliasing on transparent edges |
126
+ | **Provenance** | Official source, dated, license-clear; press-kit asset > brand-controlled aggregator > public-domain repository | Aggregator-only, undated, or third-party-redistributed; suspected scraped copy |
127
+ | **Brand fit** | Matches the spec's vibe keywords; matches campaign era you're working from | Off-era (2018 logo for a 2024 rebrand); wrong product variant; sub-brand bleed |
128
+ | **Composition / craft** | Lighting, framing, background all consistent with the rest of the asset set | Mixed lighting across "set"; orphan background colors; visible artifacts |
129
+ | **Narrative weight** | Carries one story alone; can be a hero on its own merits | Only works as decoration / filler; needs surrounding chrome to read |
130
+
131
+ **Logging the scores** in `brand-spec.md` (per category) is what makes the bar real. If you didn't log a score, you didn't apply the bar.
132
+
133
+ ### Step 5 — Bind into Media Flow + persist `brand-spec.md`
134
+
135
+ Upload acquired assets into a Media Flow workspace (use the host's Media Flow MCP tools where available — `list_media_workspaces`, `get_media_workspace`, `media_box_upload`, `update_media_file_meta`). Reference each from the Subspace via Data with the appropriate `kind`:
136
+
137
+ - Image → `kind: { type: 'media-resource-image', preload: { type: 'url', hashType, hash } }`
138
+ - Video → `media-resource-video`
139
+ - Audio → `media-resource-audio`
140
+ - Lottie → `lottie-file-uri`
141
+ - Rive → `rive-file-uri`
142
+ - General binary → `media-resource-file` or `binary-asset`
143
+
144
+ Bricks bind via DataLink: `Image.property.source = linkData(() => brandLogoData)`. Refreshing an asset is a Media Flow operation; the Subspace doesn't need to know the URL changed.
145
+
146
+ Fonts: declare each as an `ApplicationFont` entry in `Application.applicationSettings.fonts` (`name`, `url`, optional `md5`). Reference by name in Brick `property.fontFamily`.
147
+
148
+ `brand-spec.md` lives next to the Subspace. Use this template verbatim — every section is required, even the gap section:
149
+
150
+ ```markdown
151
+ # Brand spec — <brand name>
152
+ > Captured: <YYYY-MM-DD>
153
+ > Sources: <list>
154
+ > Coverage: <complete / partial / inferred>
155
+
156
+ ## First-class assets
157
+
158
+ ### Logo
159
+ - Primary (dark ground): <Media Flow ID> → Data: brandLogoDark
160
+ - Primary (light ground): <Media Flow ID> → Data: brandLogoLight
161
+ - Mono / reverse: <Media Flow ID> → Data: brandLogoMono
162
+ - Clearspace: <e.g., 1× cap-height>
163
+ - Minimum size: <e.g., 96 px wide>
164
+ - Source: <press-kit URL / inline-svg from <url> / file from user>
165
+
166
+ ### Product photography (if physical brand)
167
+ - Hero front: <Media Flow ID> → Data: productHero (3000×2000, transparent) [score: R9 P9 B8 C9 N9]
168
+ - Detail crop A: ... [score: ...]
169
+ - Scene context: ... [score: ...]
170
+
171
+ ### UI screenshots (if digital brand)
172
+ - Home: ... [score: ...]
173
+ - Core feature A: ... [score: ...]
174
+
175
+ ### Scene / lifestyle (if relevant)
176
+ - ...
177
+
178
+ ### Motion
179
+ - Brand reel clip: <Media Flow ID> → Data: brandReel (1920×1080, 12s, h264)
180
+ - Animated logo: <Media Flow ID> → Data: brandLogoLottie
181
+
182
+ ## Auxiliary
183
+
184
+ ### Colors (theme tokens — exposed as Data when shared)
185
+ - --brand-primary #XXXXXX OKLCH(...) source: <where>
186
+ - --brand-accent #XXXXXX
187
+ - --brand-neutral-100 / -900
188
+ - Forbidden: <colors the brand explicitly does not use>
189
+
190
+ ### Fonts (ApplicationFont entries)
191
+ - Display: <family / weights / file location / license>
192
+ - Body: <family / weights / file location / license>
193
+
194
+ ### Voice & tone
195
+ - Register: <e.g., confident, terse, never effusive>
196
+ - Capitalization: <e.g., sentence case>
197
+ - Banned phrases: <e.g., "innovative", "revolutionary", "AI-powered">
198
+
199
+ ### Signature details
200
+ - <One or two design moves the brand is known for — a specific corner radius, a hairline rule, a particular typographic treatment.>
201
+
202
+ ## Gaps & placeholders
203
+ - <category>: <why missing> → <action: ask user / AI generate / accept placeholder> [as of <date>]
204
+
205
+ ## Score log (for non-logo assets)
206
+ - <asset>: R<n> P<n> B<n> C<n> N<n> = <avg>/10
207
+ ```
208
+
209
+ ## Structural enforcement — assets are referenced, not redrawn
210
+
211
+ Once `brand-spec.md` exists, the discipline that keeps the design honest is structural, not behavioural. Encode it in the build:
212
+
213
+ - **Every brand visual** is a Brick reading from a Media Flow Data via DataLink. No `Image.property.source` set to a literal URL or path. No `Sketch` Brick drawing a "logo-shaped" graphic. No `Svg` Brick reproducing the logo as a path. The pattern enforces "you cannot ship a redrawn logo because the project structure doesn't allow it."
214
+ - **Brand colors used in 2+ places** become theme-token Data, bound via DataLink. Single-use decorative colors can stay hardcoded (Truth #2's loose convention).
215
+ - **Theme tokens are the single source of truth.** Want to add a new color? Add a Data entry first, then bind. The "first" is what makes it a system instead of an accumulation.
216
+ - **Every Brick that uses a brand asset** has its source traceable to a `brand-spec.md` line. Reviewing the spec is reviewing the design.
217
+
218
+ ## Creating assets when missing
219
+
220
+ When a category has no acquirable real asset and the user has no plan to provide one, **do not** quietly substitute a placeholder and proceed. Three options, in priority order:
221
+
222
+ 1. **Stop and ask.** For logo, this is the only allowed option.
223
+ 2. **Compose the host environment's generative tools.** If a canvas-design / imagen / image-generation MCP / motion-generation MCP / Banana-style tool is available in the host, use it — *anchored on a verified brand reference*. This skill does not duplicate them; it composes them.
224
+ 3. **Accept a labeled placeholder Brick** with the gap tracked in `brand-spec.md`. Use this when generation is unavailable or known to fail for the asset type (e.g., generating a "real product photo" for a niche industrial product almost always fails).
225
+
226
+ ### Generative discipline (when option 2)
227
+
228
+ - **Anchor on real brand material.** Feed at least one verified brand asset — the logo, a verified product photo, a brand color sample — as conditioning to the generator. Generation from "the brand's general vibe" produces uncanny-valley assets that feel adjacent to the brand without being the brand. Almost always recognized as fake by reviewers.
229
+ - **Generate at the 5-10-2-8 quantity bar.** 8–10 candidates per slot, scored on the same 5 dimensions, keep 2.
230
+ - **Persist generation metadata** in `brand-spec.md`: prompt, seed (where supported), reference assets used, model version. Reproducibility matters when the user later asks for a refresh in the same style.
231
+ - **Never generate logos, wordmarks, or named characters.** These are identity, not imagery — generation produces look-alikes that legal will reject.
232
+ - **Avoid AI-design tells.** Gradient orbs as "AI". Glassy translucent panels with no source. Generic happy-diverse-people-in-a-bright-office. Tech-y blue-purple gradients as backgrounds. Float / hover dot patterns. Watch for these in generated output and re-generate or discard.
233
+ - **Motion generation is high-failure.** For Lottie / Rive / video, expect to discard 9 of 10 outputs. Budget the iteration; don't ship the first plausible result.
234
+
235
+ ### What "compose, don't rebuild" looks like in practice
236
+
237
+ - This skill does **not** teach typography pairing, color theory, image composition, or generative prompting from scratch. Those domains are deep and other skills cover them well.
238
+ - This skill **does** insist that when the host has a canvas-design / imagen / image-generation skill available, the agent invoke it for the relevant sub-task — generation, motion, composition — rather than substitute its own freehand work or skip with a placeholder.
239
+ - Where the host has none, surface that constraint to the user. "There's no image generator available in this environment; we have three options: (a) you supply, (b) we accept labeled placeholders, (c) you bring a generator skill / MCP into the environment." Don't silently degrade.
240
+
241
+ ## Anti-patterns — recurring failures
242
+
243
+ - **Colors-and-fonts-only branding.** Visual identity lives in photography and logo treatment, not hex codes. If logo + product/scene aren't acquirable, surface it as a blocker before continuing.
244
+ - **Aggregator-as-source-of-truth.** Brandfetch is a placeholder; not a final source.
245
+ - **Eyeballing a hero color from a competitor's site or a stylistic neighbour.** Leaks the wrong brand into the work; reviewers catch it immediately.
246
+ - **CSS-drawn imitations of real assets.** A gradient orb is not a logo. A Sketch path is not a product photo. Source or generate-with-anchor or labeled-placeholder. There is no fourth option.
247
+ - **Embedding base64 in Brick props.** Pollutes the Subspace, defeats Media Flow refresh, balloons the file. Lift to Media Flow.
248
+ - **Generating without a brand-reference anchor.** Produces uncanny-valley assets adjacent to the brand. Always anchor.
249
+ - **Demo-content color contamination.** A Stripe-style hero from an aggregator site that has a third-party brand's accent color baked in. Either request a clean asset or note the contamination in the spec.
250
+ - **Skipping the score log.** Without it, the bar is aspirational. Log scores per non-logo asset; commit the log alongside the spec.
251
+
252
+ ## When the brand has nothing
253
+
254
+ Some BRICKS deployments are for venues with no prior brand work — small clinics, community lobbies, one-off pop-ups. In that case:
255
+
256
+ - Skip the protocol; admit the gap up front.
257
+ - Switch into Direction Advisor mode ([`when-the-brief-is-vague.md`](when-the-brief-is-vague.md)) and propose 3 differentiated visual directions.
258
+ - The picked direction *becomes* the brand spec for this Application. Persist the picked direction's tokens, motion language, photography style guidelines, and (if any) generated assets via the same `brand-spec.md` template — even when invented from scratch. Treat it as a real spec, not a working note. The next person to touch the deployment will need it.
259
+
260
+ ## Voice & tone as a constraint on user-visible Data
261
+
262
+ Voice and tone don't live in Bricks; they live in the strings inside Data values. The brand spec's voice section becomes a **content-author constraint**:
263
+
264
+ - All user-visible Data values follow the register (sentence case, no exclamation marks, banned phrases avoided, length budget respected).
265
+ - Translations follow the register in their target language — work with a localizer who understands the voice.
266
+ - Generator-produced strings (LLM responses, formatted dates, error messages) need explicit prompts or templates that respect the voice. Do not trust default LLM phrasing; constrain it.
267
+
268
+ Surface this to whoever maintains content post-deploy so it doesn't quietly drift.
269
+
270
+ ## Coverage checklist before declaring asset work complete
271
+
272
+ You cannot move from this protocol back into design until all of the following are true:
273
+
274
+ 1. Logo — present in Media Flow with light + dark + mono where applicable; bound via Data.
275
+ 2. Product / UI / scene category appropriate to the brand type — present, scored ≥ 8/10 on each kept asset, bound via Data.
276
+ 3. Motion category — present where the brand has motion identity; absent and noted otherwise.
277
+ 4. Colors — palette declared as theme-token Data (for shared colors) and / or as `brand-spec.md` entries.
278
+ 5. Fonts — declared as `ApplicationFont` entries; license confirmed.
279
+ 6. Voice & tone — captured as constraint or marked TBD with stakeholder + date.
280
+ 7. Gaps — every missing or placeholder asset listed under "Gaps & placeholders" with action and date.
281
+ 8. Score log — every non-logo asset scored on the 5 dimensions and logged.
282
+ 9. Spec committed — `brand-spec.md` exists alongside the Subspace; not in a chat scrollback or a working file that will be lost.
283
+
284
+ If any item is incomplete, name it in your reply and either resolve it or pause for user input. Don't proceed silently.
@@ -0,0 +1,85 @@
1
+ # When the Brief is Vague — Direction Advisor
2
+
3
+ If the brief is too open to execute ("design me a signage app", "make something for the lobby", "I don't know what kind of kiosk I want"), do not improvise on generic intuition. That's how every signage screen ends up looking like every other signage screen.
4
+
5
+ Switch into **Direction Advisor** mode. The output of this mode is *a chooser*, not a design — a small set of differentiated directions the user can pick or blend. Once they pick, drop out of Advisor mode and continue the normal workflow.
6
+
7
+ ## What "differentiated" means
8
+
9
+ Pick directions that disagree on a real axis. Three minimalist variants is not three directions; it is one direction at three opacities.
10
+
11
+ The strongest axis is **interaction archetype** — what the user *does* in front of the screen. Six archetypes:
12
+
13
+ | Archetype | The user... | Dominant Brick(s) | Generator load | Canvas count |
14
+ |---|---|---|---|---|
15
+ | Glance | reads in 1–2 seconds while passing | Slideshow, RichText, Video | Light — content fetch only | 1 |
16
+ | Browse | scans options without commitment | Items, Slideshow, Maps | Light to medium | 1–3 |
17
+ | Interact | drives a flow, taps to choose | Items, BrickRect tiles, TextInput | Light | 2–5 |
18
+ | Transact | completes a task with stakes (payment, identity) | TextInput, BrickRect, Camera, payment | Heavy — peripheral generators | 4–8 |
19
+ | Monitor | watches changing state | Chart, Items bound to live Data | Heavy — MQTT/HTTP/MCP | 1–2 |
20
+ | Dwell | inhabits the space; the screen is ambient | Video, Slideshow, Lottie | Light — looped media | 1 |
21
+
22
+ Full rule sets per archetype (what carries forward, failure modes, which UX disciplines weight strongest) live in the companion skill — see `bricks-ux/references/interaction-archetypes.md`. Use the table above to pick at Advisor time; consult the companion file when the picked archetype needs to drive structural decisions.
23
+
24
+ For most vague briefs you can spread three options across this set — e.g., "lobby screen" reasonably maps to {Glance, Dwell, Interact}, "retail aisle screen" to {Glance, Browse, Transact}, "transit platform" to {Glance, Monitor, Browse}.
25
+
26
+ You can also differentiate on:
27
+ - **Visual system** — Editorial / Cinematic / Brutalist / Soft minimalist / Maximalist. Useful when the deployment is fixed and the conversation is about expression.
28
+ - **Brick set** — what the design is *built from* (image-led / type-led / map-led / video-led / chart-led).
29
+ - **Motion language** — calm vs. cinematic vs. snappy.
30
+
31
+ But interaction archetype is the most useful starting axis because it changes the entire shape of the Subspace, not just its skin.
32
+
33
+ ## What to deliver in Advisor mode
34
+
35
+ A direction is the combination of three choices — two axes the user perceives, and one structural decision that flows from them:
36
+
37
+ - **Interaction archetype** (above) — *what the user does*. Drives Subspace structure.
38
+ - **Visual language** — *what the design says*. Drives expression: type, color, motion, signature moves, asset emphasis. Pick from the curated library in [`design-languages.md`](design-languages.md) (Swiss Editorial / Kenya Hara emptiness / Field.io motion poetics / Brutalist web / Y2K futurist-retro / etc.) or invent one rooted in the same discipline.
39
+ - **Canvas-graph shape** — when the brief reads as a presentation / pitch deck / introduction / explainer / slideshow / storyboard / demo / training-loop / kiosk-welcome, the choice between **Shape A** (Slideshow Generator — uniform layout, content-driven), **Shape B** (multi-Canvas state machine — bespoke layouts, hero continuity), and **Shape C** (hybrid) is a real direction differentiator. See [`presentation-and-slideshow.md`](presentation-and-slideshow.md). When the brief is not sequenced (single Canvas signage, dashboard, dwell loop), this collapses to "single Canvas" and isn't a real axis.
40
+
41
+ For each of 3 directions, write:
42
+
43
+ - **One-sentence pitch** combining the axes ("Glanceable signage in the Kenya Hara emptiness register — a single hero photograph holding the canvas, captions smaller than instinct demands.").
44
+ - **A real-world flagship** for the visual language (the user is unlikely to recognize an interaction archetype on its own, but they will recognize "MUJI lobby loops" or "Bloomberg Terminal").
45
+ - **3 vibe keywords**.
46
+ - **Interaction archetype + visual language pairing**, named explicitly so the user can refer back.
47
+ - **Canvas-graph shape** (only for sequenced work — Shape A / B / C).
48
+ - **Dominant Brick / Generator** the work will be built from.
49
+ - **Canvas-count shape** — single canvas / 2–3 / state machine.
50
+ - **Trade-off** — what this direction gives up.
51
+
52
+ Keep each direction to ~5 lines. The chooser is the artefact, not finished work.
53
+
54
+ **Spread across the axes.** Three directions all in the same archetype but different languages is a thin spread. Three different archetypes paired with the same language is also thin. For sequenced work, also spread across Canvas-graph shapes when it changes the user's experience meaningfully (Slideshow Generator vs multi-Canvas state machine is a different *kind* of presentation, not just a different look). Aim for at least two different archetypes and at least two different language schools across the three options.
55
+
56
+ ## The 3-cell preview
57
+
58
+ Build a lightweight preview that lets the user compare side by side:
59
+
60
+ - **Best**: 3 minimal Subspaces (one Canvas each, placeholder content, real Brick layout) loadable in `bricks-ctor` `preview`. The user can render each.
61
+ - **Good**: 3 sketches in a single Canvas — three frames within one Subspace, each labelled. Use this when speed matters more than fidelity.
62
+ - **Acceptable**: 3 hand-drawn or screenshot-style images placed as Image Bricks with captions.
63
+
64
+ Don't build full Subspaces. Direction Advisor is a 5–10 minute cycle. If you're 30 minutes in, ship what you have and let the user redirect.
65
+
66
+ ## When the user picks
67
+
68
+ Once they pick (or pick a blend):
69
+
70
+ 1. **Drop out of Advisor mode.** Stop offering alternatives. Commit.
71
+ 2. **Re-confirm deployment context.** The pick changes some assumptions (e.g., picking Transact when the deployment is no-touch is wrong; surface that and renegotiate).
72
+ 3. **Continue the normal workflow.** Declare a system, build a runnable skeleton, iterate, ship variations within the chosen direction (variants on visual / motion / content rhythm — not on archetype anymore).
73
+
74
+ ## Anti-patterns
75
+
76
+ - **Three options that all want the same archetype.** Three "elegant minimalist" variants is not a chooser. The user can't decide because the options haven't disagreed yet.
77
+ - **Naming the visual style without naming the interaction.** "Editorial / Brutalist / Soft" tells the user nothing about what they'll do in front of the screen. Lead with archetype.
78
+ - **Building all three to high fidelity.** You're spending design budget you should spend after the user picks.
79
+ - **Skipping Advisor when the brief is "kind of vague" but you have a strong opinion.** State your opinion in plain language ("I'd default to a glanceable signage loop because of the lobby context — want me to start there, or see two other options?") and let them redirect. Skipping the chooser without checking is how design budgets get burned on the wrong direction.
80
+
81
+ ## When to skip Advisor mode
82
+
83
+ - The user supplied concrete references (a Figma render, an HTML mockup, a competitor URL). The translation rules in [`translating-inputs.md`](translating-inputs.md) take over; Advisor is unnecessary.
84
+ - The brief is concrete enough to act on — specific screen, specific interaction, specific brand. Don't manufacture ambiguity.
85
+ - The user is impatient and named a clear preference. State your default and proceed; offer to revisit if they want options later.
@@ -0,0 +1,134 @@
1
+ # Workflow — questions and staged delivery
2
+
3
+ Two disciplines bundled because they're both about how the work moves through time: deciding when to ask vs. when to build, and pacing the build itself so misalignment is caught early instead of after twelve Canvases.
4
+
5
+ ## Ask vs. build
6
+
7
+ Ask when the design space has too many free variables. Build when constraints are already pinned.
8
+
9
+ **Ask** if any of these are unclear:
10
+
11
+ - Hardware / scene / network / language / brand (Priority #0 — never improvise on these).
12
+ - Fidelity expectation — rough Canvas with tokens only, fully lit single scene, or full system across all Canvases.
13
+ - Variation scope — one direction or multiple to choose from.
14
+ - Variation axes — visual language, palette, density, motion, Canvas-graph shape.
15
+ - Content provenance — does the user have copy/assets, or should you write placeholder in a declared voice?
16
+
17
+ **Build** if:
18
+
19
+ - Deployment context is concrete, brief names a recognisable shape, brand is supplied or absent-by-design.
20
+ - Reference material was supplied (Figma / HTML / screenshot / website) — translation rules in [`translating-inputs.md`](translating-inputs.md) take over; ask only the residual.
21
+ - The user named a strong preference. State your default, build, offer to revisit.
22
+
23
+ **Batch the asks.** Single round of questions, not staged. Volleys cost user momentum. Aim for 5–10 well-targeted questions per round; fewer than 3 means you're missing problem-specific depth; more than 12 means you're stalling.
24
+
25
+ ## Question playbook by axis
26
+
27
+ When you do ask, cover these axes — in one batch, omitting any already pinned:
28
+
29
+ **Deployment context** (Priority #0 — covered in SKILL.md, repeat checklist if any is missing).
30
+
31
+ **Output shape**
32
+
33
+ - Single Canvas / multi-Canvas state machine / Slideshow Generator / hybrid?
34
+ - How many Canvases roughly? (Calibrates effort, not a contract.)
35
+
36
+ **Fidelity**
37
+
38
+ - Rough skeleton with tokens declared / one fully-lit hero Canvas / full system across every Canvas?
39
+ - Is the deliverable for review, for handoff to another designer, or for direct deployment?
40
+
41
+ **Variations**
42
+
43
+ - One direction, or three to pick from?
44
+ - Axes that should vary — visual language, palette, density, motion, Canvas-graph shape, interaction archetype?
45
+ - Conservative spread or one bold option included?
46
+
47
+ **Tone and content**
48
+
49
+ - Audience for the deployed Application (passersby / customers / employees / operators / VIPs)?
50
+ - Tone register (formal / warm / playful / technical / quiet / loud)?
51
+ - Copy supplied or placeholder-in-voice?
52
+
53
+ **Problem-specific** (3–5 questions tailored to output shape — examples below):
54
+
55
+ - *Slideshow / pitch deck*: how many slides, target duration per slide, narration or silent, branching or linear, who advances (auto-timer / operator remote / interaction).
56
+ - *Kiosk / interactive*: peripherals attached, identity capture, payment terminal, queue/wait behaviour, idle reset interval.
57
+ - *Dashboard / monitor*: data sources, refresh cadence, alert thresholds, what action a viewer might take from each state.
58
+ - *Signage / glanceable*: dwell-time at the screen, day/night cycle, ambient sound, fleet vs. single-instance, content feed.
59
+
60
+ ## Staged delivery — five passes
61
+
62
+ Don't sprint to a finished Subspace. Stage the work so wrong direction is caught at the cheapest point.
63
+
64
+ ### Pass 0 — Deployment context + style declaration
65
+
66
+ Confirm Priority #0 verbatim. Write the style declaration block at the top of the Subspace file before placing any Brick:
67
+
68
+ ```ts
69
+ /**
70
+ * System: <picked design language, e.g., Swiss Editorial>
71
+ * Archetype: <interaction archetype, e.g., glance>
72
+ * Type: <font family> · <size scale in grid units, e.g., 2 / 4 / 8 / 16 gu>
73
+ * Color: <ground> on <ink> · accent <#hex> (used only for …)
74
+ * Spacing: <scale in grid units, e.g., 2 / 4 / 8 / 16 gu>
75
+ * Grid stance: lean / break / breathe
76
+ * Motion: <Standby easing + ms> entrance · <ms> exit · loops only on <element>
77
+ * Heroes: <Brick id(s) that persist across Canvases via auto-tween>
78
+ * Asset emphasis: <real photography / type-only / hero video / …>
79
+ */
80
+ ```
81
+
82
+ The grid substrate is given (Truth #6). What you commit to is type scale, palette, **spacing scale in grid units**, motion vocabulary, grid stance, and hero Bricks. The spacing scale is a small enumeration (3–5 values); inter-Brick gaps come from this set, not arbitrary integers. This block keeps the agent's arithmetic consistent across many Bricks and is what the design-critique pass cites.
83
+
84
+ ### Pass 1 — Showcase Canvas (the lockdown moment)
85
+
86
+ Build **one** Canvas, fully lit, that represents the work at its highest fidelity. Choose the hardest Canvas — the boot screen, the most content-dense state, or the moment that carries the brand most. Run through Verification (compile + screenshot + view back). Show the user.
87
+
88
+ This is the cheapest point to discover the direction is wrong. If the user wants the type bigger, the photography swapped, the rhythm slower, the language different — fix the Canvas and the style declaration, not twelve Canvases.
89
+
90
+ **Do not** build the full Canvas graph before this checkpoint. The temptation is real because state-machine work feels productive; resist it. Sign-off on one Canvas first.
91
+
92
+ ### Pass 2 — Full Canvas graph
93
+
94
+ After Pass 1 sign-off, build the remaining Canvases and the Switch / Data wiring that connects them. Hero Bricks use the same id across Canvases (Truth #3). Every visible Brick has a Standby Transition (Truth #7).
95
+
96
+ Mid-review checkpoint partway through: show the user 3–4 representative Canvases (not all of them) and the navigation flow. Caught here is still cheap. Wait until everything is finished and you've spent the budget.
97
+
98
+ ### Pass 3 — Polish, edge cases, content rhythm
99
+
100
+ Pass over every Canvas for:
101
+
102
+ - Spacing-scale adherence (every gap from the declared set).
103
+ - Density rhythm across consecutive Canvases (not three identical layouts in a row).
104
+ - Standby Transitions consistent vocabulary, not 6 different easings.
105
+ - Asset fidelity at the 5-10-2-8 bar (per `when-the-brief-is-branded.md`).
106
+ - Multilingual content fits without breaking layout, if relevant.
107
+
108
+ ### Pass 4 — Verification + self-critique
109
+
110
+ The non-negotiable Definition of done from SKILL.md plus the 5-dimension self-critique in [`design-critique.md`](design-critique.md). Compile, screenshot every Canvas, view back, critique pass, fix anything < 8 or surface as an accepted trade-off.
111
+
112
+ Only after Pass 4 do you declare done.
113
+
114
+ ## When to compress passes
115
+
116
+ Smaller deliverables don't need all five.
117
+
118
+ - **Single-Canvas glanceable signage**: Pass 0 + a one-pass build + Pass 4. Pass 1 *is* the deliverable.
119
+ - **Iterative changes on existing Subspace**: skip to the affected passes; don't re-declare the system.
120
+ - **Direction Advisor mode**: 3 lightweight Pass 1 candidates, no Pass 2/3 until the user picks.
121
+
122
+ Don't compress passes on:
123
+
124
+ - Multi-Canvas state machines (3+ Canvases).
125
+ - Anything with branding (Pass 1 lockdown catches asset-bar problems before they propagate).
126
+ - Anything with peripherals, payment, or identity (Path 2 verification mandatory in Pass 4).
127
+
128
+ ## Anti-patterns
129
+
130
+ - **Sprinting to a finished Subspace and showing it.** The user can't easily redirect a finished thing. Pass 1 is for redirection.
131
+ - **Asking one question at a time.** Burns volleys, drains user energy.
132
+ - **Asking nothing and inferring.** The five Priority #0 items are not inferrable; trying to is the most expensive mistake.
133
+ - **Declaring done after Pass 2.** Pass 4 critique is what separates "runs" from "good."
134
+ - **Re-declaring the style block on every iteration.** If you find yourself updating five values at once mid-Pass-3, you're rebuilding the system — back up to Pass 1.
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: bricks-ux
3
+ description: >-
4
+ Interaction design and end-user experience for any Application or
5
+ Subspace built on Canvases, Bricks, Generators, Data, DataCalculation.
6
+ TRIGGER on usability / flow / interaction / journey / state /
7
+ affordance / feedback / recovery / accessibility audits and design
8
+ work — "audit this flow", "improve usability", "design the wait
9
+ state", "fix the error path", "make the kiosk usable", "what does the
10
+ user do when X breaks", "design the QR scan UX", "design the payment
11
+ flow", "design the mic / listening state", "design the monitor's
12
+ alarm state", "design for multilingual", "design for low vision",
13
+ "design idle and attractor states". Also triggers in parallel with
14
+ visual-design work for end-to-end deliverables (kiosk / signage /
15
+ dashboard / interactive screen / pitch deck) where the interaction
16
+ shape matters as much as the look. SKIP for purely visual / aesthetic
17
+ / system / style / brand-asset / typography / palette work — those
18
+ are visual design, not interaction design. Encodes a universal
19
+ user-journey spine, interaction archetypes, pressable composition,
20
+ monitoring-screen discipline, designed flow states, accessibility,
21
+ and a tiered UX critique. Hardware floors are deployment-relative;
22
+ web habits (hover affordances, modal-as-default, scroll, page-submit
23
+ forms) do not transfer.
24
+ ---
25
+
26
+ # BRICKS UX
27
+
28
+ You are a BRICKS interaction designer. Your output is a **designed user journey** expressed through Canvas graphs, Brick affordances, Standby Transitions, Switch thresholds, and Data states. The deliverable is a Subspace whose interaction shape, not just its visual surface, is intentional.
29
+
30
+ Web interaction habits do not transfer. There is no hover, no scroll, no `<form>` submit, no modal-as-default, no semantic link, no document flow. Hardware varies wildly — a phone-shaped PWA, a 32" landscape kiosk, a 75" portrait signage panel, a curved retail display. **Floors and discipline are deployment-relative**; pinning pixel measurements is the wrong altitude. Express discipline in grid units, viewing distances, fractions of viewport, deployment-shape categories.
31
+
32
+ ## Priority #0 — Verify the end user
33
+
34
+ Before designing any flow, confirm:
35
+
36
+ - **Who** uses the screen — passersby, customers, employees, operators, VIPs, mixed.
37
+ - **What they're doing** in front of it — passing through, queuing, ordering, paying, monitoring, dwelling, troubleshooting.
38
+ - **What state they arrive in** — fresh / mid-task / returning / interrupted / under time pressure / under emotional pressure (payment, identity).
39
+ - **What stress they're under** — daylight glare, queue behind them, low literacy, accessibility need, multilingual mix, watchdog reset just happened.
40
+ - **How they leave** — completion, abandonment, idle timeout, peripheral disconnect, someone else taking over.
41
+
42
+ If any of the first four is missing, stop and ask in a single batch. UX without a named end user is decoration.
43
+
44
+ ## Priority #0.5 — Walk the journey end-to-end before designing
45
+
46
+ Before placing Bricks for a flow, narrate the journey step-by-step out loud in your reply. Every step gets:
47
+
48
+ - **Who's acting** — the user, the runtime, a peripheral, an operator.
49
+ - **What they see** — Canvas + dominant Bricks at that moment.
50
+ - **What they feel** — confident / hesitant / waiting / stuck / relieved.
51
+ - **What can go wrong** — including the silent failures (peripheral delay, network blip, watchdog reset, language fallback).
52
+
53
+ A flow you cannot narrate is a flow you cannot design. This step catches the missing-state cases (no in-flight visibility, no error recovery, no closure) before they ship.
54
+
55
+ ## The universal user-journey spine
56
+
57
+ Every interaction — touch, peripheral, remote, external trigger — follows the same seven steps. Skipping any of them is the most common failure mode. Full file: [`references/user-journey.md`](references/user-journey.md).
58
+
59
+ 1. **Affordance** — "Can I do something here?"
60
+ 2. **Instruction** — "What do I do?"
61
+ 3. **Immediate feedback** — "Did I do it?"
62
+ 4. **In-flight visibility** — "Is it being handled?"
63
+ 5. **Continuation** — "What's next?"
64
+ 6. **Recovery** — "What if it went wrong?"
65
+ 7. **Closure** — "When can I leave?"
66
+
67
+ This scaffold replaces device-specific recipes. QR scan, face detection, BLE proximity, NFC tap, payment, voice mic, touch — all the same seven steps, expressed through different Brick families and Generator events.
68
+
69
+ ## Interaction archetypes
70
+
71
+ The user does one of six things in front of a BRICKS screen. The archetype determines Subspace structure (Canvas count, Brick dominance, motion vocabulary, what carries forward across Canvases).
72
+
73
+ Glance · Browse · Interact · Transact · Monitor · Dwell.
74
+
75
+ Each has its own rule set, what reads as fail, and which UX disciplines weight strongest. See [`references/interaction-archetypes.md`](references/interaction-archetypes.md).
76
+
77
+ ## Flow states are first-class
78
+
79
+ Idle, loading, empty, error, attractor, boot, maintenance — these are not afterthoughts. They are states the deployment will spend real time in. A flow whose error state is a stack of red text in a corner is a flow that fails in the field. See [`references/flow-states.md`](references/flow-states.md).
80
+
81
+ ## Pressable composition
82
+
83
+ Every composite (multi-element) button needs a deliberate decision about where `on_press` sits and how overlapping press chains resolve. Pressable-capable Bricks with no press events auto-bypass at the runtime, so the trivial wrapper case works without ceremony; explicit `pressable: 'bypass'` matters when inner Bricks carry their own chains. Affordance is a UX signal — the user must be able to *see* what's pressable before discovering it by accident. See [`references/pressable-composition.md`](references/pressable-composition.md).
84
+
85
+ ## Monitoring screens have their own discipline
86
+
87
+ Calm state must be readable and forgettable. Change must be detectable without being demanding. Demand must compel response without crying wolf. Stale data is worse than no data. See [`references/monitoring-screens.md`](references/monitoring-screens.md).
88
+
89
+ ## Accessibility is non-optional, deployment-relative
90
+
91
+ Universal access is not a checkbox; it's a deployment-floor commitment. Contrast, scale, motor, reduced-motion, color-not-only, predictable navigation, audio cues — each applies at a deployment-specific floor (viewing distance, ambient light, user posture, hardware capability). See [`references/accessibility.md`](references/accessibility.md).
92
+
93
+ ## Verification — UX critique
94
+
95
+ Verification proves the flow *runs*. UX critique proves the flow is *usable*. Tiered by deployment risk (CRITICAL on transact / identity / safety-critical; HIGH on interact / monitor with alarms; MEDIUM on browse / dwell; LOW on glance / loop) with Must Have / Anti-Pattern pairs per section. See [`references/ux-critique.md`](references/ux-critique.md).
96
+
97
+ UX critique runs alongside visual-design critique (in `bricks-design`), not after. The two are concurrent; a Canvas can fail one and pass the other, and both block ship.
98
+
99
+ ## Boundaries
100
+
101
+ - Do not design flows for users not yet identified — Priority #0 must be answered first.
102
+ - Do not invent peripheral behaviour — if a peripheral's behaviour at threshold is unknown, the journey has an unsafe step; surface it before designing past it.
103
+ - Do not declare a flow done after testing only the golden path. Edge states (timeout, error, abandon, watchdog reset, peripheral disconnect) are part of the design.
104
+ - Do not import web interaction patterns — hover affordances, scroll-to-reveal, modal overlays, page-submit forms — to no-touch or peripheral-bound hardware without translation.
105
+
106
+ ## Companion skill
107
+
108
+ For visual design — type, palette, asset acquisition, design language, system commitment, visual rhythm — use `bricks-design` (companion skill). Most end-to-end briefs ("design a kiosk for X", "build a presentation about Y") invoke both in parallel.
109
+
110
+ ## Reference index
111
+
112
+ | When you need to... | Read |
113
+ |---|---|
114
+ | Walk the universal interaction journey | [`references/user-journey.md`](references/user-journey.md) |
115
+ | Pick the right interaction archetype + apply its rule set | [`references/interaction-archetypes.md`](references/interaction-archetypes.md) |
116
+ | Compose a button so taps land where intended | [`references/pressable-composition.md`](references/pressable-composition.md) |
117
+ | Design monitoring / dashboard / status-board UX | [`references/monitoring-screens.md`](references/monitoring-screens.md) |
118
+ | Design idle / loading / empty / error / attractor / boot / maintenance states | [`references/flow-states.md`](references/flow-states.md) |
119
+ | Ensure universal access at deployment-relative floors | [`references/accessibility.md`](references/accessibility.md) |
120
+ | UX critique before declaring done | [`references/ux-critique.md`](references/ux-critique.md) |