--- name: playground-visual-standard description: "Playground Visual Standard. Governs the visual quality of every playground OrchestKit emits. The difference between a considered product demo and a generic AI dashboard is the specific values in this file." alwaysApply: false --- # Playground Visual Standard > **Load when:** generating **any** single-file HTML artifact — a playground that demonstrates a > feature, user story, flow, or decision, **or** a plan/config/data/architecture **dashboard**. > **Skip for:** the ASCII floor (no pixels, nothing here applies). > > Dashboards used to be exempt here ("their current card layout is fine"). They are not exempt any > more, and the exemption is why they drifted: across 191 shipped artifacts, ~93% were dashboards, > and only 39% carried `--pg-` tokens, 29% a reduced-motion gate, 24% a copy-prompt. The format that > governs almost all output had no template to copy and no self-audit. §0 now routes DASHBOARD to a > first-class archetype with `plan-dashboard.template.html` and its own §10 rows. A playground is not a slide. It is a thing the viewer can *operate*: play a user story, or make a decision by dragging. This standard makes that quality reproducible. Every rule carries a concrete, falsifiable value — a rule without a measurable threshold is not shippable. Reference exemplars (read the one matching your archetype before building): `shared/assets/playground-exemplars/` - `user-story-player.template.html` — canonical gold standard and generalized player scaffold (device mockup + transport + flow, RTL-ready). Study the bar. - `decision-board.template.html` — drag-and-drop prioritization toolkit (the decision archetype). - `release-notes-player.template.html` — player *recipe* for release / changelog notes (release-feed chrome + per-step impact card). A specialization of the player archetype, not a new one: route release / "what's new" notes here; route adoption / triage / verdict views to a **dashboard** (§0). - `decision-router.template.html` — execution-router variant of the decision board: triage (Now/Next/Later) **plus** routing each card to an ork strategy (single/workflow/nested/teams/swarm) + a plan-only invocation. Used by `visualize-plan` for backlogs the user must prioritize and dispatch. - `plan-dashboard.template.html` — **dashboard** (the volume archetype, ~93% of output). Sticky tier-1 header, anchored `
` sections `[0]`–`[5]`, every chart paired with a table twin, 1-click copy-prompt, state in a `plan-state` JSON island. Both palettes are defined side by side so the chrome↔marks seam is visible in the file. Used by `visualize-plan` for plan/config/data views. Copy it; swap `STATE`. - `living-plan.template.html` — **living plan** (dashboard family): a plan that executes over multiple sessions/waves. Carries an embedded `lpp-state` JSON block; the visual layer renders FROM state. Sessions update the SAME file in place (flip item statuses, append changelog) — one plan = one file, never fork a second file for the same slug. Every item has an `evidence` ("done when") check; done without evidence is a contract violation. Used by `visualize-plan` update mode and `brainstorm` Phase 6. --- ## §0 Routing rule — does this standard apply? Decision, not vibe. Count the signals: The standard applies to **every** HTML artifact. §0 picks *which archetype*, never *whether to care*. ``` OPERABLE (player / board) if ≥2 are true: □ device mockup (phone/tablet/app frame) □ playback / step controls (▶ prev next) □ cause→effect flow arrows □ narrative user-story copy □ drag-and-drop decision surface □ copy-prompt bar ("build / decide" affordance) Then pick ONE archetype: • USER-STORY PLAYER → the playground plays a flow over ≥2 steps/screens • DECISION BOARD → the core is prioritization/management via drag-and-drop • (neither, <2 signals) → DASHBOARD → a first-class archetype, not a free pass. Template: plan-dashboard.template.html (copy it; do not free-hand CSS). Required: §2 chrome tokens · sticky tier-1 header · sections as
(anchored, keyboard-native) · a TABLE TWIN for every chart · 1-click copy-prompt · the §6 reduced-motion gate. Data marks follow the CHART-ENCODING standard (/dataviz validated palette — chart-encoding-standard.md). ASCII-card layout is the fallback only when /dataviz is unavailable; the table twin is NOT optional either way. DASHBOARD sub-route — LIVING PLAN if ≥1 is true: □ the plan executes over multiple sessions or waves □ the user will ask "where are we" later □ item completion is verifiable by a command/check → use living-plan.template.html: embedded lpp-state JSON, update-in-place contract, per-item "done when" evidence. One plan = one file, keyed by SLUG not path; git history is the timeline. ``` **Dashboards are the volume case.** ~93% of shipped artifacts are dashboards, so a rule that exempts them governs almost nothing. If you are about to write a card grid from scratch, you are in the wrong branch of this decision — copy the template. --- ## §1 Persona — pick one, up front, and don't mix Aesthetic primes emotion in <100ms, before content is read. The frame's persona is the first *functional* decision. - **warm-glass** ("warm intelligence") — amber/emerald accents, frosted surfaces, rounded. Default for consumer/family/approachable products. Matches the user-story player exemplar. - **cool-glass** ("technical precision") — indigo/violet/teal accents, tighter radii. For developer/enterprise/data products. **Don't** mix warm and cool accents in one playground. **Don't** spend your one bold move on more than one place (§3). --- ## §2 Design tokens Define as CSS custom properties prefixed `--pg-`. **Use HSL, not hex** — you can derive a lighter shade from `hsl(248 84% 68%)` by hand; you cannot from `#7c6cf0`. Every color carries a **role**. | Token | Example (cool) | Role | |---|---|---| | `--pg-bg` | `hsl(232 26% 7%)` | Page background (rich + dark, ≤8% L — never `#000`) | | `--pg-ink` | `hsl(220 18% 93%)` | Primary text (never pure white) | | `--pg-muted` / `--pg-faint` | `…64%` / `…46%` | Secondary / tertiary text | | `--pg-glass` / `--pg-glass-2` | `hsl(0 0% 100% / .05)` / `.08` | Glass fill (see §5) | | `--pg-glass-edge` | `hsl(0 0% 100% / .18)` | Glass border | | `--pg-accent` (+`-deep`) | `hsl(248 84% 68%)` | Primary action / active state / flow arrow | | `--pg-warm` | `hsl(38 95% 60%)` | Secondary accent | - **Spacing:** layout rhythm — section gaps, stacks, card padding — snaps to `4 · 8 · 12 · 16 · 24 · 48 · 96`. Small component-chrome insets (chip / pill / button padding) may take intermediate values, but use **one value per role**. The failure mode this targets is *arbitrary, inconsistent* spacing (`13px` here and `15px` there for the same element), not the existence of an `11px` button inset. - **Radius:** `sm 9px · md 16px · lg 24px · device-bezel 40px · device-outer 54px`. Glass cards ≥16px. - **Shadow (two-part, §5):** ambient `0 20px 60px -22px hsl(… / .7)` + tight `0 4px 12px -6px hsl(… / .5)`. - **Motion:** exactly four durations — `100 / 200 / 300 / 500ms`, ease `cubic-bezier(.2,.8,.25,1)` (§6). - **Gradient mesh background:** 2–3 radial-gradients in accent hues over `--pg-bg`, with `background-attachment: fixed`. **Hue span ≤30°** across the mesh — wider reads as garish. --- ## §3 Visual hierarchy — emphasize by de-emphasizing The most-violated rule in generic AI playgrounds: everything competes at full strength. - **Do** assign every element a tier before styling: Primary (the mockup / the board), Secondary (transport / controls), Tertiary (copy-prompt bar / metadata). - **Values:** competing elements drop to ~60% opacity or `--pg-faint`; remove their borders. Primary text weight 600–700; tertiary 400. - **Don't** give two elements the same visual weight and expect one to read as primary. --- ## §4 Typography - **Do** set roles: a display face used with restraint, a body face, a mono utility face for values/code. Letter-spacing `-.2px…-.3px` on headings; tabular-nums on any live numbers. - **Don't** treat type as a neutral delivery vehicle — it carries the persona. --- ## §5 Glass system Glass reads as glass only against a dark, contrasted backdrop with a visible edge. - **Do:** fill `rgba(255,255,255, .05–.12)`; 1px border `rgba(255,255,255, .15–.25)`; `backdrop-filter: blur(12–20px)` (+ `-webkit-` prefix); top-left light source (inset `0 1px 0 rgba(255,255,255,.1–.2)`); the §2 two-part shadow. - **Don't:** glass on a light background (invisible); >2 stacked glass layers; radius <16px; a glow halo (`box-shadow: 0 0 40px accent` = the "generic AI glowing card"); glass as a hierarchy signal. --- ## §6 Motion budget - **Values:** step/screen transition `300ms`; panel/arrow appear `200ms`; button press/highlight `100ms`; device slide-in on load `500ms`. **Everything else animates `0`.** - **Do** allow exactly **one signature moment** (usually the step transition or the drop-settle). - **Do** ship the reduced-motion gate verbatim: ```css @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } } ``` - **Don't** animate every element — animation everywhere is the fastest path to "AI-generated". --- ## §7 Component specs - **Device frame:** outer radius 54px, bezel 12–16px, inner screen radius 40px (`overflow:hidden`, content never escapes the bezel), shadow level 4. Phone notch optional but consistent. - **Transport bar:** ▶ play / ‹ prev / next ›; primary button = `--pg-accent`; disabled at ends; a "step N of M" hint. - **Flow arrow:** connects cause→effect; uses `--pg-accent`; **RTL-sensitive** — flip with `transform: scaleX(-1)` when `dir="rtl"`. - **Copy-prompt bar:** mono text + one `