Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
JavaScript agent-skillsai-agentsanti-slopclaude-codecodexcursordesign-systemfrontendlanding-pageui-designweb-design
Scroll scenes: inspector checks, motion rules loosened for scenes
Leonxlnxe37f888c8121
diff --git a/skills/taste-skill/references/motion.md b/skills/taste-skill/references/motion.mdindex b4fee03..5fd7568 100644--- a/skills/taste-skill/references/motion.md+++ b/skills/taste-skill/references/motion.md@@ -19,7 +19,13 @@ Read this before adding any animation. The static page must already be finished## 1. The budgetA page that does not move reads as a mock-up; the inspector counts what moves while the page loads and-scrolls, and fails it under eight elements. The motion layer has four parts:+scrolls, and fails it under eight elements. The motion layer has five parts:++- **Two or three scroll scenes:** the big, scroll-driven moments award sites are remembered for (a+ camera flying through a field of pictures, a picture that grows from a window to the whole screen,+ type that crosses a held stage, cards that deal out and stack). The direction sheet deals them from+ `library/scenes.json`; `references/scenes.md` says how to fill and fit them. They are where the page+ is bold; everything else stays quiet so they land.- **One signature moment:** the thing a visitor would describe an hour later: the headline that risesout of a mask, the image that opens like a shutter, the wordmark that scales with the scroll. The@@ -47,8 +53,10 @@ the transitions, tweens and scroll triggers recorded while each page loaded andthe gallery does something the house rules ban, the house version follows.- **The stack.** Two in three use a smooth-scroll library and three in five ship Three.js; GSAP is- named on 56. None of that is needed for what follows. Only 3 use CSS scroll-driven animations and- 6 use view transitions, which now do most of what the libraries are loaded for.+ named on 56. The quiet layer below (reveals, line rises, the ink fill) needs none of it: CSS scroll+ timelines and view transitions do that work, though only 3 and 6 of the sites use them. The big+ scroll scenes are built on GSAP ScrollTrigger, as on the award sites, through the shared stage in+ `assets/scenes/` (`references/scenes.md`).- **Curves.** The curves that really ran are strong ease-outs: expo out (`.16,1,.3,1` and`.19,1,.22,1`) ran on 14 sites, cubic out on 13, quint out on 7, and by number of transitions thequint and expo outs lead every chosen curve. In-out curves are kept for wipes and things that@@ -136,11 +144,11 @@ How the study bears on each:| Behaviour | Pages of 99 | What it serves | House version || --- | --- | --- | --- |-| Smooth-scroll library | 67 | A feeling of weight; makes scrubbed scenes easier to build | Not used. Native scroll; scroll timelines do the linking |-| Held (sticky or pinned) stage | 44 | One picture or object carries several claims; chapters | Yes: sticky only, at most two per page, about one screen per step, three per stage, every held screen carries a line of text |+| Smooth-scroll library | 67 | A feeling of weight; makes scrubbed scenes easier to build | Optional, through `Stage.smooth()`: Lenis at lerp 0.1-0.14, off for touch and reduced motion |+| Held (sticky or pinned) stage | 44 | One picture or object carries several claims; chapters | Yes: the scroll scenes (`references/scenes.md`), two or three per page, one to four screens each; other sticky stages three screens at most || Split text | 40 | Lines and words arriving as they are read; hover rolls | Lines for headings and statements; words only for the ink fill; characters only for a heading of one to three words || Colour by chapter | 34 | Tells chapters apart without padding bands | Yes, as hard cuts at section edges; the header ink follows in 300ms |-| Scroll-scrubbed scene (camera, object, image sequence) | 26 | Explains a product by moving it | Only with real frames (photographs, a short image sequence), capped at two screens, with a static fallback |+| Scroll-scrubbed scene (camera, object, image sequence) | 26 | Explains a product by moving it | Yes, from the scene library, built on the shared stage with a finished composition for reduced motion || Parallax depth | 24 | Depth in collages; pictures drifting inside oversized frames | Travel under 8% of the element, pictures held at 106-110% in their frames || Marquee | 21 | Life on a static band | Existing "Edge-to-edge marquee": one per page, pausable || Masked line or word rise | 18 | Headings that arrive like set type | Yes: "Masked line reveal" on load, "Lines that rise on scroll" below the fold |@@ -875,8 +883,9 @@ both built.element that moves.- `will-change` only on an element that is about to animate, removed afterwards.- Pause loops when off screen or when the tab is hidden.-- No scroll hijacking, no smooth-scroll library by default, no custom cursor. They cost usability,- which is 30% of an Awwwards score and the line most winners score lowest on.+- No scroll hijacking and no custom cursor. They cost usability, which is 30% of an Awwwards score and+ the line most winners score lowest on. Smoothing only through `Stage.smooth()`, which stays off for+ touch and reduced motion.## 9. What gives generated motion away@@ -935,7 +944,9 @@ hard cuts; monospace HUD labels become small text in the text face.1. **First frame.** The headline, the sentence and the picture are in the HTML and painted on the firstframe. The load sequence starts without waiting for the load event and is settled by 1.2 s, withfour elements at most.-2. **No preloader, no counter, no gate, no smooth-scroll library, no custom cursor, no wheel capture.**+2. **No preloader, no counter, no gate, no custom cursor, no wheel capture.** Smoothing only through+ `Stage.smooth()` (Lenis at lerp 0.1-0.14, off for touch and reduced motion): weight, never a page+ that keeps sliding after the hand stops.3. **Curves.** `--ease-out` for anything under 600ms; `--ease-expo` for reveals of 800ms or more;`--ease-in-out` for wipes and things that travel; `--ease-exit` only for things leaving for good;`linear` for scroll-linked motion and loops; plain `ease` for colour. No overshoot.@@ -946,11 +957,18 @@ hard cuts; monospace HUD labels become small text in the text face.6. **Reveals.** Fire once, when the element's top is 85-90% of the way down the viewport; rise 12-32pxor from a line mask; nothing in view stays hidden for more than 900ms; nothing above the fold waitsfor scroll.-7. **Held stages.** Sticky, at most two per page, about one screen per step, three screens per stage,- a count when there are more than two steps, a line of text on every held screen.-8. **Scroll-linked travel.** Linear and locked to the scrollbar; parallax under 8% of the element;- scale between 0.94 and 1.15; built with scroll timelines inside `@supports`, static without them.-9. **One of each.** One signature move; one scrubbed statement; one moving picture; one marquee at most.+7. **Scroll scenes are where the page is bold.** The big moves come from the scene library+ (`references/scenes.md`): the direction sheet deals two or three per page, each built on+ `assets/scenes/stage.js`, each held for one to four screens, each with a phone version and a+ finished composition. Inside a scene the scene's own numbers apply (a picture may grow from a+ window to the whole screen, type may cross the stage, a camera may fly through a field of+ pictures); rules 8 and 10 still hold for the text a visitor is reading.+8. **Outside the scenes, scroll-linked travel stays quiet.** Linear and locked to the scrollbar;+ parallax under 8% of the element; scale between 0.94 and 1.15; built with scroll timelines inside+ `@supports`, static without them. Other held stages: sticky, about one screen per step, three+ screens at most, a line of text on every held screen.+9. **One of each.** One signature move (a dealt scene can be it); one moving picture; one marquee at+ most. A quiet section between two scenes, so each one lands.10. **Text stays readable.** Fills start at 45% ink; dims no lower than 40%; blur at most 8px and goneonce settled; nothing moves across text being read.11. **Colour by chapter** as hard cuts at section edges; the fixed header's ink follows in 300ms.diff --git a/skills/taste-skill/scripts/inspect.mjs b/skills/taste-skill/scripts/inspect.mjsindex a8f0b6e..105b0e5 100644--- a/skills/taste-skill/scripts/inspect.mjs+++ b/skills/taste-skill/scripts/inspect.mjs@@ -150,6 +150,19 @@ try {const appM = appMode ? await page.eval(app).catch(() => null) : null;if (appM) appM.colourShare = await helper.eval(colourShare, 'data:image/jpeg;base64,' + frames[0]).catch(() => null);+ // scroll scenes (assets/scenes): each must have started, run live on desktop, and leave the page room+ const sceneState = w >= 1100 && !appMode ? await page.eval(`[...document.querySelectorAll('section.scene, .scene[data-scene]')].map((s) => ({ id: s.dataset.scene || s.id || 'scene', live: s.classList.contains('is-live'), rest: s.classList.contains('is-rest'), h: Math.round(s.getBoundingClientRect().height) }))`).catch(() => []) : [];+ const sceneFindings = [];+ if (sceneState.length) {+ const idle = sceneState.filter((s) => !s.live && !s.rest);+ if (idle.length && !allow.includes('scene-not-started')) sceneFindings.push({ level: 'FAIL', id: 'scene-not-started', width: w, message: `${idle.length} scene(s) never started: ${idle.map((s) => s.id).join(', ')}.`, fix: 'Load assets/scenes/stage.js and the scene file for each data-scene, then call Stage.smooth(); Stage.init(); at the end of <body> (references/scenes.md, "Putting a scene on a page").' });+ const atRest = sceneState.filter((s) => s.rest);+ if (atRest.length && !allow.includes('scene-not-live')) sceneFindings.push({ level: 'FAIL', id: 'scene-not-live', width: w, message: `${atRest.length} scene(s) show their finished composition on desktop instead of running: ${atRest.map((s) => s.id).join(', ')}.`, fix: 'GSAP or ScrollTrigger did not load (check the pinned CDN lines and the console), or the scene threw while building. The scene must run where motion is allowed.' });+ if (sceneState.length > 4 && !allow.includes('many-scenes')) sceneFindings.push({ level: 'WARN', id: 'many-scenes', width: w, message: `${sceneState.length} scroll scenes on one page.`, fix: 'Two or three scenes, with quiet sections between them, so each one lands. Cut the weakest.' });+ const held = sceneState.reduce((a, s) => a + Math.max(0, s.h - h), 0);+ if (held > (metrics.page.height || 1) * 0.6 && !allow.includes('scene-heavy')) sceneFindings.push({ level: 'WARN', id: 'scene-heavy', width: w, message: `Scenes hold ${Math.round(held / h)} of the page's ${Math.round((metrics.page.height || 0) / h)} screens.`, fix: 'Shorten the holds (one screen per beat) or cut a scene; the reading sections need room between them.' });+ }+// --film: the scroll as a visitor sees it. Real wheel input and a frame every third of a screen, so a// scroll scene shows its in-between states, not only where each screen lands.const filmSheets = [];@@ -182,7 +195,7 @@ try {await sheet(frames.slice(i, i + perSheet), cols, cellW, cellH, p);sheets.push(p);}- let findings = judge(m, { width: w, allow });+ let findings = [...judge(m, { width: w, allow }), ...sceneFindings];if (dealtFonts.length && w >= 1100 && !allow.includes('font-not-dealt')) {const norm = (f) => String(f).toLowerCase().replace(/["']/g, '').replace(/\s+variable$/, '').trim();const used = m.type.families.filter((f) => f.share >= 0.1).map((f) => norm(f.family));diff --git a/skills/taste-skill/scripts/lib/probe.mjs b/skills/taste-skill/scripts/lib/probe.mjsindex ceb714b..911094e 100644--- a/skills/taste-skill/scripts/lib/probe.mjs+++ b/skills/taste-skill/scripts/lib/probe.mjs@@ -499,7 +499,8 @@ export function frame() {if (srOnly) continue;// the boxes that clip this text (overflow other than visible, or a clip-path)const clips = []; for (let p = el.parentElement; p && p !== document.body; p = p.parentElement) { const pcs = getComputedStyle(p); if (pcs.overflowY !== 'visible' || pcs.overflowX !== 'visible' || pcs.clipPath !== 'none') clips.push(p.getBoundingClientRect()); }- const pinned = size >= 32 && pinnedLow(el);+ // a scroll scene moves pictures across its own held stage by design; its text is judged by the scene rules+ const pinned = size >= 32 && pinnedLow(el) && !el.closest('.scene.is-live');// lines of one heading set as separate spans overlap each other's glyph boxes; that is not a collisionconst unit = el.closest('h1, h2, h3, h4, h5, h6, p, blockquote');const range = document.createRange(); let total = 0, hidden = 0, cutTop = false, area = 0, over = 0;@@ -548,7 +549,7 @@ export function frame() {}}// 3. the large text in view, to spot one statement held on screen for screen after screen- const big = [...new Set([...document.querySelectorAll('h1, h2, h3, h4, h5, h6, p, blockquote')].filter((el) => { const r = el.getBoundingClientRect(); return parseFloat(getComputedStyle(el).fontSize) >= 32 && r.top >= -4 && r.bottom <= H + 4 && r.height > 0; }).map((el) => (el.innerText || '').replace(/\s+/g, ' ').trim().slice(0, 60)).filter((t) => t.length >= 4))];+ const big = [...new Set([...document.querySelectorAll('h1, h2, h3, h4, h5, h6, p, blockquote')].filter((el) => { const r = el.getBoundingClientRect(); return !el.closest('.scene.is-live') && parseFloat(getComputedStyle(el).fontSize) >= 32 && r.top >= -4 && r.bottom <= H + 4 && r.height > 0; }).map((el) => (el.innerText || '').replace(/\s+/g, ' ').trim().slice(0, 60)).filter((t) => t.length >= 4))];return { covered, clipped, pinnedOver, filled: Math.round((filled / samples) * 100) / 100, big, y: Math.round(scrollY) };}diff --git a/skills/taste-skill/scripts/lib/rules.mjs b/skills/taste-skill/scripts/lib/rules.mjsindex e2a5473..558fccc 100644--- a/skills/taste-skill/scripts/lib/rules.mjs+++ b/skills/taste-skill/scripts/lib/rules.mjs@@ -240,4 +240,4 @@ export function judgeApp(A, m, { width = A.viewport.w, allow = [] } = {}) {return out;}-export const RULE_IDS = ['headline-lines', 'statement-length', 'focal-point', 'hero-words', 'mixed-font-headline', 'eyebrow', 'mono', 'numbering', 'micro-label', 'emoji', 'gradient', 'gradient-text', 'shadow', 'text-shadow', 'button-fx', 'hairline', 'outlined-box', 'dashed', 'glass', 'icon-cards', 'card-rows', 'pill-nav', 'palette-claude', 'palette-terracotta', 'palette-cream', 'palette-purple', 'default-link', 'contrast', 'font-count', 'font-fallback', 'size-count', 'body-size', 'measure', 'small-text', 'all-centred', 'ui-wrapper', 'overflow', 'broken-image', 'no-hero', 'first-action', 'grey-body', 'blend-text', 'covered-text', 'clipped-text', 'pinned-over-picture', 'empty-screens', 'long-pin', 'side-scroll', 'few-pictures', 'no-real-pictures', 'no-footage', 'still-page', 'off-centre', 'lopsided', 'blank-gap', 'no-title', 'small-title', 'many-h1', 'name-only-title', 'empty-middle', 'untitled-section', 'edge-text', 'ragged-edges', 'sidebar-phone', 'unused-canvas', 'heavy-shadow', 'heavy-borders', 'radius-mix', 'icon-chips', 'numeric-align', 'tabular', 'rainbow-chart', 'placeholder-data', 'tiny-text', 'colour-sprawl', 'ragged-row', 'below-fold', 'app-title-size', 'kpi-size', 'icon-tiles', 'late-title', 'reduced-hidden', 'no-poster', 'hero-void', 'one-sided-bleed', 'font-not-dealt', 'panel-void', 'no-data-hue'];+export const RULE_IDS = ['headline-lines', 'statement-length', 'focal-point', 'hero-words', 'mixed-font-headline', 'eyebrow', 'mono', 'numbering', 'micro-label', 'emoji', 'gradient', 'gradient-text', 'shadow', 'text-shadow', 'button-fx', 'hairline', 'outlined-box', 'dashed', 'glass', 'icon-cards', 'card-rows', 'pill-nav', 'palette-claude', 'palette-terracotta', 'palette-cream', 'palette-purple', 'default-link', 'contrast', 'font-count', 'font-fallback', 'size-count', 'body-size', 'measure', 'small-text', 'all-centred', 'ui-wrapper', 'overflow', 'broken-image', 'no-hero', 'first-action', 'grey-body', 'blend-text', 'covered-text', 'clipped-text', 'pinned-over-picture', 'empty-screens', 'long-pin', 'side-scroll', 'few-pictures', 'no-real-pictures', 'no-footage', 'still-page', 'off-centre', 'lopsided', 'blank-gap', 'no-title', 'small-title', 'many-h1', 'name-only-title', 'empty-middle', 'untitled-section', 'edge-text', 'ragged-edges', 'sidebar-phone', 'unused-canvas', 'heavy-shadow', 'heavy-borders', 'radius-mix', 'icon-chips', 'numeric-align', 'tabular', 'rainbow-chart', 'placeholder-data', 'tiny-text', 'colour-sprawl', 'ragged-row', 'below-fold', 'app-title-size', 'kpi-size', 'icon-tiles', 'late-title', 'reduced-hidden', 'no-poster', 'hero-void', 'one-sided-bleed', 'font-not-dealt', 'panel-void', 'no-data-hue', 'scene-not-started', 'scene-not-live', 'many-scenes', 'scene-heavy'];