Skip to content

Commit db5ffe6

Browse files
ryanjwilkeclaude
andauthored
docs(agents): UI-illustration ruleset + cy-ui-illustration skill (#716)
* docs(agents): add UI-illustration ruleset and cy-ui-illustration skill Codifies how product-UI illustrations are built (measure from the Figma source, design-system 1:1, base-4 spacing, text-is-opt-in gray shapes, bottom-only crop, real assets over hand-drawn substitutes) as .agents/ui-illustrations.md, plus an invocable skill with bundled reference exports from the illustration Figma files and a registry of the full illustration corpus. Derived from an iterative session recreating the accessibility inspect-element and Test Replay illustrations at 800x425; each rule maps to a correction from that session. Pre-commit lint-staged could not run in this worktree (no node_modules, corepack unavailable on Node 25); prettier was run manually on the changed files instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(skills): expand cy-ui-illustration references to cover distinct layout patterns Adds the a11y analytics pair (800x425 + 472x284 — same illustration at two authored sizes), the UI Coverage report, and the Studio recording vector source. SKILL.md now instructs reading only the closest one or two references, choosing from the table instead of loading every image. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(agents): add Window/Browser chrome component spec to UI-illustration rules Both Downscaled variants (40px vs 24px toolbar) with full construction details, sourced from the Component - Windows Figma file. The variants are the origin of the Browser.astro toolbar tiers; picking one is a role decision (hero vs inset window), not a canvas-size transform. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(skills): restore corpus registry clobbered by reference-table rewrite The previous commit's text-range replacement deleted the 'full corpus' section; restores it and adds the Component - Windows file entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(agents): frame the UI-illustration doc around the single-designer standard Leads with the actual goal — every illustration should feel like one lead brand designer made it, close to the product rather than accurate to it, simplified in service of story readability. Positions the skill as the production entry point and the doc as the review standard. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(agents): document the composite mode — UI illustrations over atmospheric backgrounds Social cards and blog heroes layer both illustration languages: the dark house background under a product-UI illustration under a marketing headline/lockup layer, at 1200x630. Registers the pattern in the ruleset and annotates the Social file's corpus entry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(agents): document the two-address-bar URL convention for browser chrome Outer Window/Browser chrome shows where the product runs (localhost for App, cloud.cypress.io for Cloud); the inner bar in App illustrations shows the URL under test. Both appearing together is authored, not a conflict. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(agents): make the cy-ui-illustration skill discoverable from index.md Adds the skill to the index router with an absolute served URL and fixes the ruleset's stale repo-relative link, so cross-repo agents starting from design.cypress.io/agents/index.md find both the standard and the production skill. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 8cb8d15 commit db5ffe6

12 files changed

Lines changed: 673 additions & 1 deletion

.agents/illustrations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ The result should feel intentional, atmospheric, restrained, and softly tied to
149149

150150
## Related
151151

152+
- [ui-illustrations.md](https://design.cypress.io/agents/ui-illustrations.md) — shrinking a product screen into an abstracted UI illustration; a different discipline from the watercolor style above
152153
- [iconography.md](https://design.cypress.io/agents/iconography.md) — Icon-specific rules
153154
- [colors.md](https://design.cypress.io/agents/colors.md) — Exact color tokens referenced in the palette
154155
- [principles/ai.md](https://design.cypress.io/agents/principles/ai.md) — Using AI for generation

.agents/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Several pillars lead with a `## Principles` section that governs the tokens and
2828
- [spacing.md](https://design.cypress.io/agents/spacing.md) — margins, padding, gaps, layout dimensions
2929
- [iconography.md](https://design.cypress.io/agents/iconography.md) — creating or styling icons
3030
- [illustrations.md](https://design.cypress.io/agents/illustrations.md) — illustration principles, style, theme, and guidelines
31+
- [ui-illustrations.md](https://design.cypress.io/agents/ui-illustrations.md) — shrinking a product screen into an abstracted illustration that pairs with a paragraph without going stale when the product changes
32+
- Creating one? Use the [cy-ui-illustration skill](https://design.cypress.io/agents/skills/cy-ui-illustration/SKILL.md) — the production procedure, canonical reference set, and render workflow. The doc above is the standard reviews cite.
3133
- [voice.md](https://design.cypress.io/agents/voice.md) — UI copy, errors, empty states, tone, capitalization, product naming, mechanics (numbers, dates, punctuation)
3234
- [errors.md](https://design.cypress.io/agents/errors.md) — errors, warnings, deprecations, and other system-to-user failure messages; distilled from the cypress-error-messages skill in aihub
3335
- [personas.md](https://design.cypress.io/agents/personas.md) — who uses Cypress and what they need
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
name: cy-ui-illustration
3+
description: Build a Cypress UI illustration — an abstracted, deliberately simplified picture of a product screen that pairs with marketing copy at 16:9 (or Browser-inset sizes like 800×425) without going stale when the product changes. Use when asked to create, resize, or adapt a product-UI illustration for any surface — blog, landing pages, product pages, docs, empty states, social media. Covers the source-first workflow (Figma geometry → tokens → assets → HTML → @2x render), the canonical reference set, and the delivery checklist.
4+
---
5+
6+
# cy-ui-illustration
7+
8+
Build UI illustrations the way the design team builds them: measured from the source Figma component, assembled from real assets, abstracted to gray shapes everywhere text isn't the story, rendered at @2x through headless Chrome, and verified with an element inventory.
9+
10+
The full ruleset lives in [ui-illustrations.md](https://design.cypress.io/agents/ui-illustrations.md) — fetch it first, every time. This skill is the procedure and the reference set.
11+
12+
## Canonical reference illustrations
13+
14+
These are the bar. Before building anything, **Read the bundled reference PNG closest to your target** and study how it abstracts, then open its Figma node for geometry and tokens. All are 16:9-family frames with base-4 spacing, whole-pixel values, and real text only where the feature's story needs it.
15+
16+
Bundled in `references/`. **Read at most the one or two closest to your task** — the table below exists so you can choose from text instead of loading every image:
17+
18+
| File | Source node | What it teaches |
19+
| ----------------------------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
20+
| `a11y-analytics-800x425.png` | `BqeqqHqeczSnbLJZxdnaOO` / `1:3167` | Chart + rules-list layout at the standard size: stat chips, severity tags, element counts |
21+
| `a11y-analytics-472x284.png` | `BqeqqHqeczSnbLJZxdnaOO` / `1:4888` | The same illustration compressed a second tier — what survives at Small |
22+
| `a11y-inspect-element-1216x646.png` | `BqeqqHqeczSnbLJZxdnaOO` / `11:95347` | Large-size source: injected-app surround, DOM highlights, dark tooltip, sidebar over canvas |
23+
| `test-replay-800x425.png` | `YmEYv6Nc5M16JenMpj3i0V` / `1829:32735` | **The team's own downsize of the 1286×680 Test Replay** — the answer key: what got deleted, what reflowed, what stayed 1:1 |
24+
| `test-replay-devtools-800x425.png` | `YmEYv6Nc5M16JenMpj3i0V` / `3482:20320` | Dark theme with devtools Network split at small size |
25+
| `ui-coverage-report-800x425.png` | `SNNT319HHXs6N2qUpgZ9jD` / `1:510` | Analytics-report layout: metric tiles, tables, link lists |
26+
| `app-studio-recording-800x425.svg` | `enlqSvcI3ijlWRVmHtiAzG` / `1:3602` | Cypress App / Studio recording — full vector source, inspectable construction |
27+
28+
Comparing `a11y-analytics-800x425.png` against `a11y-analytics-472x284.png` is the fastest way to internalize the method: same story, two authored sizes, every delta a deliberate deletion or reflow.
29+
30+
## The full corpus
31+
32+
Every UI illustration the team has created (some authored as prototypes for fake product videos) lives in these files. Search here first — for any Cypress product surface, an illustration probably already exists in some size. `get_metadata` with the file key and no node id lists pages; drill from there.
33+
34+
| File | Key | Pages / contents |
35+
| ------------------------------------ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
36+
| Illustrations — Accessibility (v1.x) | `BqeqqHqeczSnbLJZxdnaOO` | Analytics |
37+
| Illustrations — Cypress Cloud (v1.x) | `YmEYv6Nc5M16JenMpj3i0V` | Visual Reviews / Test Replay |
38+
| Illustrations — Cypress App (v1.x) | `enlqSvcI3ijlWRVmHtiAzG` | Studio :: Recording, **Components** (shared parts) |
39+
| Illustrations — UI Coverage (v1.x) | `SNNT319HHXs6N2qUpgZ9jD` | Analytics Report |
40+
| Illustrations — Social (v1.x) | `WXRcsE7gOaNcDi1V8SvXH0` | 2026 / Q1 — 1200×630 composites: dark atmospheric background + UI illustration + headline/lockup layer (see ui-illustrations.md § composite mode) |
41+
| Component — Windows (v1.0) | `EVfe4zg4hZPqZses82RhfI` | `Window / Browser` chrome — `Downscaled` false/true = 40px/24px toolbar; spec in ui-illustrations.md § Frame |
42+
43+
Many illustrations ship in multiple authored sizes (Large 1286×680, Medium/Static 800×425, animated step series). **Before downsizing anything, check whether the design team already authored the small size** — if it exists, it is the spec, not an input to reinterpret.
44+
45+
| Illustration | Figma file | What it demonstrates |
46+
| -------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
47+
| Accessibility — inspect element | `Illustrations - Accessibility (v1.x)` `BqeqqHqeczSnbLJZxdnaOO`, node `11:95347` | Injected-app gray surround, DOM highlight 4-layer overlay, dark selector tooltip, sidebar overlaying app canvas |
48+
| Cloud — Test Replay | `Illustrations - Cypress Cloud (v1.x)` `YmEYv6Nc5M16JenMpj3i0V`, node `1148:7825` | Dark chrome, code panel with error state, replay timeline with progress dot, devtools split |
49+
| Cloud — Branch Review | same file — browse pages for the Branch Review symbols | Two-panel review layout, diff badges (▲2 ▼1), severity tags, selected-row treatment |
50+
| Cloud — Test detail + Cypress AI | same file | Overlay panel over dimmed content, action button row, AI attribution rows |
51+
| Cloud — integrations / settings | same file | Settings list patterns: toggles, tabs, locked inputs |
52+
| Cloud — Run duration chart | same file | Rounded bar chart, commit dots on branch line, callout value pill |
53+
| Heroes App (demo content) | `Heroes App (v1.1)` `nHuTFOXFgAfbS04LqPgK5v`, node `614:2927` | The canonical cy.heroes cast — portraits are exported from here, never regenerated |
54+
55+
What "human-made" looks like in these, beyond the written rules:
56+
57+
- **One story per frame, told left-to-right.** Sidebar states the finding; the canvas shows it. Nothing else competes.
58+
- **Real text is scarce and always narrative** — branch names (`develop`, `feature/new-hero`), counts with deltas, test titles, statuses. Body copy never survives.
59+
- **Numbers are art-directed, not random**: small counts for failures (2, 3), round totals for context (2.8k), believable pairs (55% / 87%). Deltas always have direction and color.
60+
- **Theme accents carry warmth**: hero names, `guild.cy.ts`, `/new-hero/superpowers` — the cy.heroes universe threads through every surface so screens feel like one product being used, not lorem ipsum.
61+
- **Depth is restrained**: 1px `#E1E3ED` borders, one soft shadow per floating card, flat fills everywhere else.
62+
63+
## Procedure
64+
65+
1. **Fetch the rules.** `https://design.cypress.io/agents/ui-illustrations.md`. Non-negotiable rules live there: 16:9 / Browser math, design-system 1:1 (never scale), base-4 spacing, whole pixels, text-is-opt-in, bottom-only crop, element deletion order.
66+
2. **Read the source before producing pixels.** `get_metadata` on the Figma node for geometry; `get_design_context` on key child components for exact tokens, type styles, and construction; `download_assets` for portraits, logos, and baked art. If the symbol is a flattened image, window regions out of the export at 1:1 with `background-position` — don't redraw them.
67+
3. **Plan the reframe.** Most sources are already ~1.88:1, so 800×425 is a proportional reframe: delete navigation, reflow columns (3→2), keep panels at authored width, crop bottom only. Write the element budget down before building.
68+
4. **Build a standalone HTML file** at logical size in the scratchpad. Inline every SVG (no webfonts, no external icon requests), use exact hex from the source tokens, whole pixels, base-4 spacing.
69+
5. **Render @2x:**
70+
```bash
71+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless --disable-gpu --hide-scrollbars --force-device-scale-factor=2 --window-size=800,425 --screenshot=out@2x.png "file://$PWD/illustration.html"
72+
```
73+
6. **Element inventory against the source.** Every source element: present, intentionally removed, or missing. Check icon constructions and colors against the Figma components, not memory. Fix and re-render until the inventory is clean.
74+
7. **Deliver the PNG** with the inventory's intentional removals listed, and flag any judgment calls.
75+
76+
## Failure modes this skill exists to prevent
77+
78+
Each of these happened while developing the ruleset; the review round it cost is the reason it's listed.
79+
80+
- Measuring a screenshot instead of the Figma node → oversized type → cascading layout drift
81+
- Hand-drawing substitutes (CSS avatars, generic icons, invented tooltips/highlights) when the real component or asset exists
82+
- Killing the theme (placeholder avatars, dropped hero names) — abstraction applies to prose, not to the cy.heroes universe
83+
- Missing structural elements that carry meaning: the gray injected-app surround, avatar rings, tooltip icons
84+
- Fixed-width cards leaving remainder strips instead of stretching on the grid
85+
- Fractional pixels, 6–8px radii where the system uses 4px, off-token grays and reds
19.3 KB
Loading
62.5 KB
Loading
651 KB
Loading

0 commit comments

Comments
 (0)