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: the run, the draw and the reference
Leonxlnxd6d281ee9c07
diff --git a/skills/taste-skill/SKILL.md b/skills/taste-skill/SKILL.mdindex 84b5a4b..cf94908 100644--- a/skills/taste-skill/SKILL.md+++ b/skills/taste-skill/SKILL.md@@ -119,7 +119,7 @@ The command prints a **direction sheet**. It is the art direction for this build- **Adopt it.** Do not blend it with the layout you would have made anyway. If it feels unfamiliar,good: the familiar layout is the one this skill exists to prevent.-- Redraw one slot (`--redraw hero | type | palette | photos | section:<role> | direction`) only for a+- Redraw one slot (`--redraw hero | type | palette | photos | scenes | section:<role> | direction`) only for areason you can state: it contradicts a stated brand constraint, or needs an asset that does notexist. Never redraw to get something more comfortable. Record every redraw in your report.- When a dealt section cannot hold the real content (it compares three plans and there is one price;@@ -170,6 +170,12 @@ right now and how long until the last ferry; choose a size and see it against thfallback without script, it never blocks reading, and it is one thing, not a playground. It isbuilt in step 6 as part of the page, not added as motion in step 9.+**The scenes carry the idea too.** The scroll scenes on the sheet are devices waiting for a subject.+Decide what each one shows from your inventory before building: the fly-through passes through this+studio's own title cards, the route is the road this shipment really takes, the picture that opens to+the whole screen is the room the guest will wake up in. A scene filled with pictures that could belong+to anyone is a screensaver.+### 5. Write the wordsWrite the whole page as a copy deck (plain text) before markup, following `references/copy.md`:@@ -247,11 +253,19 @@ not finished. Order of work:`references/imagery.md` covers searching, licences and credits, video, drawing, crops and treatments.5. **The live thing** from step 4, built into the section where it proves the claim (often the heroor the booking), with real content, a thumb-sized phone version and a plain fallback.-6. **Fullness.** Look at each desktop screen as a poster: one dominant thing and the content it+6. **The scroll scenes** on the sheet (section 9), each with the section it carries: the page's big+ moments, the camera that flies through the work, the picture that opens to the whole screen, the+ word that buckles under the scroll. Copy the shared stage and the scene's files from+ `<skill>/assets/scenes/`, fill the scene with this project's own pictures and words, and set the+ page's tokens so it takes the page's look. A scene is composition: it decides how long the page is+ and what each screen shows, so it is built now and seen in every look round, not added at the end.+ `references/scenes.md` says how to put one on a page, fill it, fit it and check it;+ `assets/scenes/demo/<id>.html` is a working example of each.+7. **Fullness.** Look at each desktop screen as a poster: one dominant thing and the content itcarries. A screen that is mostly empty ground is an underbuilt section, not a rest; one deliberaterest per page is the limit, and the inspector fails a page with two or more near-empty screens.Running text is in the full ink at 16px or more; grey is for secondary notes.-7. **The frame.** The page has one pair of equal outer margins at every width, and every section uses+8. **The frame.** The page has one pair of equal outer margins at every width, and every section usesthe width the page has set up: when its text sits in the left half, the right half holds itspicture, its second column, its list or its figure, never nothing. Asymmetry lives inside the grid,never in the frame: a void is placed only when something closes it on the far side. No stretch of@@ -260,7 +274,7 @@ not finished. Order of work:screen carries the page's title in an `h1`. These are what readers name first when a page lookswrong ("no clear title", "random empty space", "everything is pushed to one side"), and theinspector measures each of them.-8. **States and semantics.** Real links and buttons, visible focus, alt text, a phone layout that is+9. **States and semantics.** Real links and buttons, visible focus, alt text, a phone layout that isits own composition.Read `references/type.md`, `references/colour.md` and `references/layout.md` when you need the detail@@ -271,8 +285,13 @@ behind a decision; the laws below are the short form.```bashnode <skill>/scripts/lint.mjs <source files or folder>node <skill>/scripts/inspect.mjs <url or path/to/index.html>+node <skill>/scripts/scenes.mjs <url or path/to/index.html> # when the page has scroll scenes```+`scenes.mjs` photographs every scroll scene at 0, 10 … 100% of its hold, on desktop and on a phone,+and the reduced-motion page; with scenes on the sheet, `inspect.mjs` also films the whole scroll+(`desktop-film-NN.jpg`). A scene that never started or rests on desktop is a `FAIL`.+`lint.mjs` scans source for banned patterns and stock phrases. `inspect.mjs` opens the page in a realbrowser at 1440, 768 and 390 pixels, measures it (headline line counts, type sizes, fonts actuallyloaded, colours, rules, shadows, gradients, contrast, overflow, and the frame: equal margins, sections@@ -296,9 +315,9 @@ Judge only the pictures. If a problem is visible in a screenshot, it is real, whNow build the motion layer. It is required, and it is more than one fade: the inspector counts theelements that really move while the page loads and is scrolled, and fails a page under eight (it warns-under sixteen). The layer has four parts:+under sixteen). The scroll scenes are already built (step 6); around them the layer has four parts:-1. **The signature move** named on the sheet: one, done well.+1. **The signature move** named on the sheet: one, done well (a dealt scene can be it).2. **An entrance for the parts of every section:** the heading, then the text, then the picture,staggered by 60–90ms, rising 16–32px with opacity, triggered once as the section enters. Not onefade for the whole block, and never content that stays hidden if the script fails.@@ -318,6 +337,8 @@ Do not report until all of these are true; each one was skipped in a test run th- `inspect.mjs` shows **0 FAIL** at 1440, 768 and 390, on the final version of the page.- You opened every screenshot it listed after the last change, not only the first screen.+- With scroll scenes: `scenes.mjs` ran on the final page with no problems, and you read every sheet+ (desktop, phone, reduced motion).- A stranger reading the first screen for five seconds can say what this is and what to do.- Every section has a heading; the margins match on both sides; no stretch of the page is empty.- The critique of your last round is written down in the shape of `references/critique.md` §4.@@ -454,12 +475,15 @@ open collections could not be searched.| `references/layout.md` | Grid, margins, rhythm, section variety, navigation, footer, the phone composition. || `references/imagery.md` | Choosing, finding, crediting, cropping and treating pictures; what to do with none. || `references/motion.md` | Step 9. Budget, tokens, recipes, reduced motion. |+| `references/scenes.md` | Step 6, when the sheet deals scroll scenes: putting one on a page, filling, fitting, the phone, checking, the catalogue. || `references/critique.md` | Step 8. How to look, how to score, what to fix first. || `references/tells.md` | The dated registry of generated-page tells and what each is replaced by. || `references/research.md` | The study: method, numbers, what the best and worst sites do. Cite it, do not guess. || `scripts/draw.mjs` | Deals and reprints the direction; `--photos`, `--site <id>` for more references; `--app` deals an app style instead. || `scripts/assets.mjs` | Step 6: searches open collections for real pictures of the subject's world; `--get` downloads with the credit, `--credits` prints them. || `scripts/lint.mjs` · `scripts/inspect.mjs` | The gate. |+| `scripts/scenes.mjs` | The gate for scroll scenes: each scene at 0-100% of its hold, desktop, phone, reduced motion. || `assets/base.css` · `assets/base.js` | An optional neutral foundation to build on. |+| `assets/scenes/` | The scroll scenes: the shared stage (`stage.js`, `stage.css`), one `.js` and `.css` per scene, and a working demo page of each in `demo/`. || `assets/app.css` · `assets/charts.js` | For app screens: a neutral shell, panels, tables and controls, and small SVG charts drawn to the app rules. |-| `library/` | The data the draw reads: directions, heroes, sections, type systems, palettes, photographs, studied sites, motions, and the app styles, shells and screen patterns (`app.json`). Do not read it whole; use the script. |+| `library/` | The data the draw reads: directions, heroes, sections, type systems, palettes, photographs, studied sites, motions, scroll scenes (`scenes.json`), and the app styles, shells and screen patterns (`app.json`). Do not read it whole; use the script. |diff --git a/skills/taste-skill/references/scenes.md b/skills/taste-skill/references/scenes.mdnew file mode 100644index 0000000..bd9809e--- /dev/null+++ b/skills/taste-skill/references/scenes.md@@ -0,0 +1,173 @@+# Scroll scenes++The big moments of a page: stretches of scroll where the page stops being a column of sections and+becomes a scene. A camera flies through a field of pictures, a picture grows from a window to the whole+screen, a word buckles under the scroll, a set of photographs orbits and lands in a grid. These are what+visitors remember from award sites, and what a page built from tidy sections alone never has.++Every scene in the library was taken apart from recent Awwwards Sites of the Day (October 2026: 43+sites recorded frame by frame while scrolling, 261 scenes described, 30 types), then rebuilt from+scratch in our own code, tested frame by frame at desktop and phone width and under reduced motion, and+reviewed against the scenes it came from. Nothing a site owns is in them.++## Contents++1. What a scene is+2. Putting a scene on a page+3. Filling it+4. Fitting it to the page+5. The phone, reduced motion, no script+6. Checking it+7. Rules for scenes+8. When no scene in the library fits+9. The catalogue++## 1. What a scene is++A tall section whose stage holds still while the page scrolls past it. The stage is+`position: sticky`; the section is (hold + 1) screens tall, so the stage is held for `hold` screens;+a GSAP timeline is scrubbed from 0 to 1 by that scroll. Nothing captures the wheel: the scrollbar always+tells the truth, the keyboard and the trackpad work as everywhere else, and the scene ends.++What a scene is not: a fade-up, a small parallax, a sticky footer, a marquee. Those are the quiet layer+(`references/motion.md`). A scene changes the whole screen.++The direction sheet deals two or three (section 9 of the sheet), from different families, each placed+on the section of the argument it can carry. Build them in step 6, with that section: a scene is+composition, not decoration added at the end.++## 2. Putting a scene on a page++Copy the shared stage and the dealt scene's files into the project (`assets/scenes/stage.css`,+`stage.js`, `<id>.css`, `<id>.js`). Each scene file's header comment lists the markup it expects and+its options; `assets/scenes/demo/<id>.html` is a complete working page to read beside it.++```html+<head>+ <script>document.documentElement.classList.add('js')</script>+ <link rel="stylesheet" href="scenes/stage.css">+ <link rel="stylesheet" href="scenes/<id>.css">+</head>+<body>+ …+ <section class="scene" data-scene="<id>" data-options='{"hold": 3}' aria-label="…">+ <div class="scene-stage">+ <!-- the markup from the scene file's header, filled with this page's content -->+ </div>+ </section>+ …+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ScrollTrigger.min.js"></script>+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/lenis.min.js"></script>+ <script src="scenes/stage.js"></script>+ <script src="scenes/<id>.js"></script>+ <script>Stage.smooth(); Stage.init();</script>+</body>+```++- Load SplitText (`[email protected]/dist/SplitText.min.js`) only when a scene file says it needs it.+- `Stage.smooth()` adds weighted wheel scrolling (Lenis at lerp 0.12). It stays off for touch and for+ reduced motion. Leave it out on a quiet page; the scenes work either way.+- `Stage.init()` starts every `[data-scene]` on the page. A page with two scenes loads both files.+- The versions are pinned. Do not change them to `@latest` or an unpinned major.++## 3. Filling it++A scene is only as strong as what goes in it. The scene file's header and the sheet's "Content" line+say how many pictures and words it takes; these hold for all of them:++- **Pictures of one family.** Same light, same grade, same kind of subject: a field of mismatched stock+ photographs breaks the illusion of one space faster than any timing error. Real pictures of the+ subject's world (`assets.mjs`), the project's own, or the dealt photographs, in that order+ (`references/imagery.md`). Size each to its largest display size, set `width` and `height`.+- **Words that read in a breath.** A held statement is 4 to 12 words; captions are one to four words in+ the text face, sentence case. One statement on screen at a time.+- **The scene says something about the subject.** A fly-through of the studio's work, the route a+ shipment really takes, the four rooms of the house, the product's change of state. A scene filled+ with unrelated pictures is a gimmick and reads as one.+- **Real content only.** If the scene needs eight pictures of the subject and there are three, take the+ `--redraw scenes`, never pad it with stand-ins.++## 4. Fitting it to the page++- The scene files read the page's tokens: `--ground`, `--ink`, `--muted`, `--accent`,+ `--font-display`, `--font-text` (with fallbacks). Set them on `:root` from the sheet and the scene+ takes the page's colour and type. Check the demo against your page, not the other way round.+- Display type in a scene uses the dealt display face and the two-line headline rule; statements stay+ at statement size.+- Leave a quiet section between two scenes (a text section, a list, a plain picture) so each one lands.+ Two scenes back to back read as one long ride and the second loses.+- A scene on the first screen must be readable at progress 0: the title, the sentence and the action are+ there on the first frame (motion rule 1), and the scene starts moving only when the visitor scrolls.+- Give the section a heading. If the design has no visible heading in the scene, the section still+ carries one (`aria-label` on the section and a real heading in the finished composition).++## 5. The phone, reduced motion, no script++- **The phone.** Each scene has a phone plan in its file: the same scene with changed numbers, a+ simpler version, or `phone: 'rest'`, where the phone shows the finished composition. Touch scrolling+ is never smoothed. Look at the phone sheet as carefully as the desktop one.+- **Reduced motion and no script.** The section is an ordinary section showing the finished+ composition: the same content, laid out to read without motion. Nothing is hidden waiting for a+ script. The inspector's `reduced-hidden` check and the reduced sheet of `scenes.mjs` show it.+- **A failed CDN** falls back to the finished composition too (the stage adds `.is-rest`). The+ inspector fails a scene that rests on desktop (`scene-not-live`), so a broken script cannot pass.++## 6. Checking it++```bash+node <skill>/scripts/scenes.mjs <page> # every scene at 0, 10 … 100%, desktop and phone, and reduced motion+node <skill>/scripts/inspect.mjs <page> # the gate; with scenes on the sheet it also films the scroll+```++`scenes.mjs` writes one contact sheet per scene and width to `.taste-skill/scenes/`. Read every one.+At every frame ask: is there one clear thing to look at; can the statement on screen be read; is+anything popping, blank, cut off or crossing the words; is it as bold as it should be? The inspector's+`desktop-film-NN.jpg` shows the whole page's scroll a third of a screen at a time: check that the+scenes and the quiet sections between them make a rhythm, and that nothing between them is empty.++## 7. Rules for scenes++1. **Two or three per page,** from different families, a quiet section between them. The inspector+ warns over four (`many-scenes`) and when scenes hold more than 60% of the page (`scene-heavy`).+2. **Each holds one to four screens:** about one screen per beat of the story; a hold with nothing new+ to show is cut, not padded.+3. **Native scroll only.** No wheel capture, no locking the page, no scenes that only run on a click.+ Smoothing only through `Stage.smooth()`.+4. **Readable at its rest points.** The statement on screen reads whole; nothing passes over text while+ it is being read; text on a picture has a flat scrim or a calm area under it.+5. **Inside a scene the scene's numbers apply** (motion rule 7): a picture may grow from a window to the+ whole screen, type may cross the stage, a camera may fly through pictures. Outside scenes, the quiet+ limits of `references/motion.md` hold.+6. **Transform, opacity, clip-path.** Nothing that forces layout on every frame. Pictures decoded before+ they move.+7. **The house rules hold inside scenes:** no monospace captions, no 01/07 counters (a plain "3 of 7" if+ a count is needed), no gradients (flat scrims), no shadows or glows, no hairline decoration, no+ decorative particles, no violet.+8. **The finished composition is designed,** not an afterthought: it is what reduced motion, a failed+ script and some phones see.++## 8. When no scene in the library fits++Redraw first (`--redraw scenes`). If the brief really needs a scene the library does not have, build it+on the same stage so it inherits the guards:++```js+Scenes['my-scene'] = (root, opts = {}) => Stage.scene(root, {+ hold: opts.hold ?? 2, // screens the stage is held for+ scrub: opts.scrub ?? true, // true when Lenis runs; 0.4-0.8 without it reads as weight+ phone: 'same', // or 'rest', or { hold, build } for a phone plan+ build(tl, { q, phone }) { // positions are fractions of the scene, 0-1+ tl.fromTo(q('.picture'), { clipPath: 'inset(30% 30% 30% 30%)' }, { clipPath: 'inset(0% 0% 0% 0%)', duration: 0.6 }, 0)+ .to(q('.title'), { yPercent: -40, autoAlpha: 0, duration: 0.25 }, 0.7);+ },+});+```++and write its CSS finished composition first, then the live layout under `.scene.is-live`. Check it+with `scenes.mjs` like any other.++## 9. The catalogue++(Generated from `library/scenes.json`; the draw deals from it. `node <skill>/scripts/draw.mjs --list+scenes` prints it.)diff --git a/skills/taste-skill/scripts/draw.mjs b/skills/taste-skill/scripts/draw.mjsindex da94e63..7282a4f 100644--- a/skills/taste-skill/scripts/draw.mjs+++ b/skills/taste-skill/scripts/draw.mjs@@ -13,8 +13,8 @@// [--options 3] show three dealt directions to choose from, write nothing// [--direction <id>] deal the full sheet for the chosen direction// node draw.mjs --show reprint the saved direction sheet-// node draw.mjs --redraw hero|type|palette|photos|section:<role>|direction re-deal one slot-// node draw.mjs --list sectors|directions|roles|tones+// node draw.mjs --redraw hero|type|palette|photos|scenes|section:<role>|direction re-deal one slot+// node draw.mjs --list sectors|directions|roles|tones|scenes// node draw.mjs --site <id> print one studied reference site in full// node draw.mjs --app --kind <kind> ... deal a style for an app screen instead (see lib/app-draw.mjs)//@@ -75,6 +75,7 @@ if (opt('list')) {if (what === 'sectors') console.log(SECTORS.join('\n'));else if (what === 'tones') console.log(TONES.join('\n'));else if (what === 'roles') console.log([...new Set(Object.values(ROLE_ALIAS))].join('\n'));+ else if (what === 'scenes') { const all = existsSync(join(LIB, 'scenes.json')) ? load('scenes') : []; for (const sc of all) console.log(`${sc.id.padEnd(34)} ${sc.name} — ${sc.family}; ${sc.summary.split(/(?<=\.)\s/)[0]}`); if (!all.length) console.log('No scene library yet.'); }else for (const d of load('directions')) console.log(`${d.id.padEnd(30)} ${d.name} — ${d.sectors.join(', ')}`);process.exit(0);}@@ -118,7 +119,7 @@ if (opt('show')) {console.log(render(saved)); process.exit(0);}-const L = { directions: load('directions'), heroes: load('heroes'), sections: load('sections'), type: load('type'), palettes: load('palettes'), photos: load('photos'), sites: load('sites'), motions: load('motions') };+const L = { directions: load('directions'), heroes: load('heroes'), sections: load('sections'), type: load('type'), palettes: load('palettes'), photos: load('photos'), sites: load('sites'), motions: load('motions'), scenes: existsSync(join(LIB, 'scenes.json')) ? load('scenes') : [] };const hist = readHist();const recent = (key, n) => hist.slice(0, n).map((h) => h[key]).filter(Boolean);@@ -154,6 +155,7 @@ if (opt('redraw')) {else if (what === 'type') sheet.type = dealType(dir, [sheet.type?.id]);else if (what === 'palette') sheet.palette = dealPalette(dir, sheet.input, [sheet.palette?.id]);else if (what === 'photos') sheet.photos = dealPhotos(dir, sheet.input);+ else if (what === 'scenes') sheet.scenes = dealScenes(dir, sheet.input, (sheet.scenes || []).map((x) => x.id));else if (what.startsWith('section:')) {// section:<role> re-deals at random; section:<role>=<id> takes a named alternative (see --alternatives)const [roleRaw, wanted] = what.slice(8).split('=');@@ -167,7 +169,7 @@ if (opt('redraw')) {if (!chosen) { console.error(`No blueprint with id ${wanted}. List them with --alternatives <role>.`); process.exit(2); }sheet.sections[i] = chosen.role === role ? chosen : { ...chosen, role, name: `${chosen.name} (borrowed from ${chosen.role})` };} else sheet.sections[i] = dealSection(dir, role, used, sheet.sections[i - 1]?.shape, sheet.sections[i + 1]?.shape, sheet.input) || sheet.sections[i];- } else { console.error('Unknown slot. Use hero, type, palette, photos, section:<role>, section:<role>=<id> or direction.'); process.exit(2); }+ } else { console.error('Unknown slot. Use hero, type, palette, photos, scenes, section:<role>, section:<role>=<id> or direction.'); process.exit(2); }} else {const sector = String(opt('sector', ''));if (!SECTORS.includes(sector)) {@@ -203,7 +205,7 @@ if (opt('redraw')) {mkdirSync(outDir, { recursive: true });writeFileSync(sheetPath, JSON.stringify(sheet, null, 1));-if (!opt('redraw') || String(opt('redraw')) === 'direction') writeHist({ at: sheet.at, direction: sheet.direction.id, type: sheet.type?.id, palette: sheet.palette?.id, hero: sheet.hero?.id, sector: sheet.input.sector });+if (!opt('redraw') || String(opt('redraw')) === 'direction') writeHist({ at: sheet.at, direction: sheet.direction.id, type: sheet.type?.id, palette: sheet.palette?.id, hero: sheet.hero?.id, sector: sheet.input.sector, scenes: (sheet.scenes || []).map((x) => x.id) });console.log(render(sheet));// ---------- dealing ----------@@ -257,8 +259,38 @@ function deal(input, redraws) {if (sec) s.sections.push(sec); else s.sections.push({ id: null, role, shape: null, name: role, blueprint: null });}s.references = dealReferences(dir, input);+ s.scenes = dealScenes(dir, input, []);return s;}+// The page's big scroll moments (references/scenes.md): two or three tested scenes from different+// families, each placed on a section of the argument it can carry. Expressive sectors and tones get three.+function dealScenes(dir, input, exclude) {+ if (!L.scenes.length) return [];+ const has = (need) => input.have.includes(need) || need === 'photography';+ const fits = (sc) => !exclude.includes(sc.id) && (sc.sectors || ['*']).some((x) => x === '*' || x === input.sector) && (sc.needs || []).every(has);+ let pool = L.scenes.filter(fits);+ if (pool.length < 2) pool = L.scenes.filter((sc) => !exclude.includes(sc.id) && (sc.needs || []).every(has));+ if (!pool.length) return [];+ const loud = ['agency', 'studio-portfolio', 'personal-portfolio', 'fashion', 'culture', 'music', 'event', 'architecture', 'physical-product', 'real-estate', 'hospitality'].includes(input.sector) || ['bold', 'playful', 'luxury', 'editorial'].includes(input.tone);+ const quiet = ['quiet', 'technical'].includes(input.tone);+ const n = Math.min(pool.length, quiet ? 2 : loud ? 3 : 2);+ const recentIds = hist.slice(0, 4).flatMap((h) => h.scenes || []);+ let rest = fresh(pool, recentIds);+ const out = []; const families = new Set(); const usedRoles = new Set();+ while (out.length < n) {+ let cands = rest.filter((sc) => !families.has(sc.family) && !(sc.position === 'opening' && out.some((o) => o.position === 'opening')) && !(sc.position === 'closing' && out.some((o) => o.position === 'closing')));+ if (!cands.length) cands = pool.filter((sc) => !out.includes(sc) && !families.has(sc.family));+ if (!cands.length) break;+ const sc = pick(cands); out.push(sc); families.add(sc.family); rest = rest.filter((x) => x !== sc);+ }+ // the section each scene carries: the first role of the argument it suits that no other scene has taken+ const roles = ['hero', ...input.sections];+ return out.map((sc) => {+ const role = sc.position === 'opening' ? 'hero' : roles.find((r) => (sc.roles || []).includes(r) && !usedRoles.has(r) && r !== 'hero') || null;+ if (role) usedRoles.add(role);+ return { ...sc, carries: role };+ }).sort((a, b) => (a.carries ? roles.indexOf(a.carries) : 99) - (b.carries ? roles.indexOf(b.carries) : 99));+}function dealHero(dir, input, exclude) {// the direction's own list, and any hero written for this direction since (the October 2026 study added some)let pool = L.heroes.filter((h) => (dir.heroes || []).includes(h.id) || (h.directions || []).includes(dir.id));@@ -516,10 +548,26 @@ function render(s) {});p();if (s.motion) { p(`## 8. Motion — ${s.motion.name}`); p(s.motion.description); p('This is the signature move, the one loud moment. Around it the page still needs the rest of the motion layer (SKILL.md step 9): an entrance for the parts of every section, feedback on every control, and one moving picture. The inspector fails a page that barely moves. Recipes: references/motion.md.'); p(); }- if (d.richness) { p('## 9. Where the richness comes from'); p(d.richness); p(); }- if (d.pitfalls) { p('## 10. How this direction goes wrong'); p(d.pitfalls); p(); }+ if (s.scenes?.length) {+ p('## 9. Scroll scenes');+ p(`The page's big moments: ${s.scenes.length} scroll scenes, tested and ready to fill. They are part of the composition, so build them in step 6 with the section they carry, not as a motion afterthought. Each runs on the shared stage (assets/scenes/stage.js and stage.css, with GSAP and Lenis from the pinned CDN lines in stage.js) and ships its own finished composition for reduced motion and for phones that rest. How to put one on a page, fill it and check it: references/scenes.md. Check them with \`node <skill>/scripts/scenes.mjs <page>\` and look at every sheet.`);+ for (const sc of s.scenes) {+ p();+ p(`### ${sc.name} (\`${sc.id}\`)${sc.carries ? ` — carries the ${sc.carries === 'hero' ? 'first screen' : sc.carries + ' section'}` : ' — a transition between two sections'}`);+ p(sc.summary);+ if (sc.place) p(`Where: ${sc.place}`);+ if (sc.content) p(`Content: ${sc.content}`);+ if (sc.options) p(`Options (data-options): ${sc.options}`);+ p(`Files: \`<skill>/assets/scenes/${sc.id}.js\` and \`${sc.id}.css\`; a working example: \`<skill>/assets/scenes/demo/${sc.id}.html\`.${sc.phone ? ' On a phone: ' + sc.phone : ''}`);+ }+ p();+ p('Leave a quiet section between two scenes so each one lands. A scene whose content you cannot fill honestly is redrawn (`--redraw scenes`), never faked.');+ p();+ }+ if (d.richness) { p('## 10. Where the richness comes from'); p(d.richness); p(); }+ if (d.pitfalls) { p('## 11. How this direction goes wrong'); p(d.pitfalls); p(); }if (s.references?.length) {- p('## 11. Real references');+ p('## 12. Real references');p('Studied sites that work this way. Take the principle, never the specifics: no names, copy, images or signature assets of theirs.');for (const r of s.references) p(siteCard(r, false));p('Full notes on any of them: `node draw.mjs --site <id>`.'); p();diff --git a/skills/taste-skill/scripts/scenes.mjs b/skills/taste-skill/scripts/scenes.mjsnew file mode 100644index 0000000..7bbde8e--- /dev/null+++ b/skills/taste-skill/scripts/scenes.mjs@@ -0,0 +1,124 @@+#!/usr/bin/env node+// tasteskill / scenes — photograph every scroll scene on a page at exact points of its progress.+//+// node scenes.mjs <url | path/to/file.html> [--out DIR] [--steps 10] [--scene "#id"] [--wait 900]+//+// For each <section class="scene"> (references/scenes.md): the screen before it, 0, 10, … 100% of its+// hold, and the screen after it, on desktop (1440x900) and on a phone (390x844), as labelled contact+// sheets; then the reduced-motion page screen by screen. Prints each scene's height in screens, frame+// timing while the page is wheeled through its scenes, and console errors. Read every sheet it writes.+//+// Exit code 0 = every scene ran; 1 = a scene never started, fell back to rest on desktop, or the page+// logged errors. Zero dependencies: drives an installed Chrome/Edge/Chromium. Node 22+.+import { existsSync, mkdirSync, statSync, createReadStream } from 'node:fs';+import { resolve, join, dirname, extname, sep, relative } from 'node:path';+import { createServer } from 'node:http';+import { Browser, sleep } from './lib/cdp.mjs';++const args = process.argv.slice(2);+const flag = (k, d) => { const i = args.indexOf('--' + k); if (i === -1) return d; const v = args[i + 1]; args.splice(i, 2); return v; };+const outDir = resolve(flag('out', '.taste-skill/scenes'));+const STEPS = Math.max(2, +flag('steps', 10)), WAIT = +flag('wait', 900);+const only = flag('scene', '');+const target = args[0];+if (!target || target.startsWith('--')) { console.error('usage: node scenes.mjs <url | file.html> [--out DIR] [--steps 10] [--scene "#id"] [--wait 900]'); process.exit(2); }++// A local file is served from 127.0.0.1 (the working directory when the file is inside it, else the+// file's folder), so relative assets and CDN scripts behave as they will when the page is hosted.+let url = target, server = null;+if (!/^https?:\/\//.test(target)) {+ const file = resolve(target);+ if (!existsSync(file)) { console.error('No such file: ' + file); process.exit(2); }+ const cwd = resolve('.');+ const root = file.startsWith(cwd + sep) ? cwd : dirname(file);+ const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css; charset=utf-8', '.js': 'text/javascript; charset=utf-8', '.mjs': 'text/javascript; charset=utf-8', '.json': 'application/json', '.svg': 'image/svg+xml', '.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.webp': 'image/webp', '.avif': 'image/avif', '.gif': 'image/gif', '.mp4': 'video/mp4', '.webm': 'video/webm', '.woff': 'font/woff', '.woff2': 'font/woff2' };+ server = createServer((req, res) => {+ try {+ let f = resolve(join(root, decodeURIComponent(new URL(req.url, 'http://x').pathname)));+ if (f !== root && !f.startsWith(root + sep)) { res.writeHead(403); return res.end(); }+ if (statSync(f).isDirectory()) f = join(f, 'index.html');+ res.writeHead(200, { 'content-type': MIME[extname(f).toLowerCase()] || 'application/octet-stream', 'cache-control': 'no-store' });+ createReadStream(f).pipe(res);+ } catch { res.writeHead(404); res.end('not found'); }+ });+ await new Promise((r) => server.listen(0, '127.0.0.1', r));+ url = `http://127.0.0.1:${server.address().port}/${relative(root, file).split(sep).map(encodeURIComponent).join('/')}`;+}+mkdirSync(outDir, { recursive: true });+const browser = await Browser.launch();+const helper = await browser.newPage({ width: 1600, height: 1000 });+const problems = [];++async function sheet(frames, labels, cellW, cellH, cols, path) {+ const rows = Math.ceil(frames.length / cols);+ await helper.setViewport({ width: cols * cellW, height: rows * (cellH + 22), dsf: 1 });+ await helper.eval((a) => {+ document.body.style.cssText = `margin:0;background:#777;display:grid;grid-template-columns:repeat(${a.cols},${a.cellW}px);font:12px/22px system-ui;color:#fff`;+ document.body.innerHTML = a.frames.map((s, i) => `<figure style="margin:0"><img src="data:image/jpeg;base64,${s}" style="width:${a.cellW}px;height:${a.cellH}px;display:block;outline:1px solid #777"><figcaption style="padding-left:6px;background:#111">${a.labels[i]}</figcaption></figure>`).join('');+ return Promise.all([...document.images].map((i) => i.decode().catch(() => {})));+ }, { frames, labels, cellW, cellH, cols });+ await helper.screenshot({ path, quality: 78 });+}++const SCENES = `[...document.querySelectorAll(${JSON.stringify(only || 'section.scene, .scene[data-scene]')})].map((el, i) => { const r = el.getBoundingClientRect(); return { id: el.id || el.dataset.scene || ('scene-' + (i + 1)), top: Math.round(r.top + scrollY), height: Math.round(r.height), live: el.classList.contains('is-live'), rest: el.classList.contains('is-rest') }; })`;+const go = (y) => `(() => { const y = ${y}; if (window.Stage && Stage.lenis) Stage.lenis.scrollTo(y, { immediate: true, force: true }); else window.scrollTo(0, y); return new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))); })()`;+const rel = (p) => relative(process.cwd(), p).split('\\').join('/');++async function run(label, vp) {+ const page = await browser.newPage(vp);+ await page.goto(url, { timeoutMs: 40000, settleMs: 1200 });+ await page.eval('document.fonts.ready.then(() => true)').catch(() => {});+ await sleep(500);+ const scenes = await page.eval(SCENES);+ if (!scenes.length) console.log(`${label}: no <section class="scene"> on the page`);+ const H = vp.height;+ for (const sc of scenes) {+ if (!sc.live && !sc.rest) problems.push(`${label} ${sc.id}: never started (stage.js, the scene file or Stage.init() missing)`);+ if (label === 'desktop' && sc.rest) problems.push(`${label} ${sc.id}: shows its finished composition instead of running (GSAP not loaded, or the scene threw)`);+ const frames = [], labels = [];+ const span = Math.max(0, sc.height - H);+ const points = [{ y: Math.max(0, sc.top - H * 0.5), l: 'before' }, ...Array.from({ length: STEPS + 1 }, (_, k) => ({ y: sc.top + (span * k) / STEPS, l: `${Math.round((k / STEPS) * 100)}%` })), { y: sc.top + span + H * 0.6, l: 'after' }];+ for (const p of points) {+ await page.eval(go(Math.round(p.y))).catch(() => {});+ await sleep(WAIT);+ frames.push(await page.screenshot({ quality: 72 }));+ labels.push(`${sc.id} ${p.l}`);+ }+ const cw = vp.width >= 1000 ? 480 : 240, ch = Math.round((cw * H) / vp.width);+ const path = join(outDir, `${sc.id}-${label}.jpg`);+ await sheet(frames, labels, cw, ch, vp.width >= 1000 ? 4 : 7, path);+ console.log(`${label.padEnd(8)} ${sc.id}: ${(sc.height / H).toFixed(1)} screens tall, ${sc.live ? 'running' : sc.rest ? 'finished composition' : 'not started'} → ${rel(path)}`);+ }+ if (label === 'desktop' && scenes.length) {+ // frame timing while the page is wheeled through its scenes+ await page.eval(go(Math.max(0, scenes[0].top - H))).catch(() => {});+ await sleep(400);+ await page.eval(`(() => { window.__f = []; let last = performance.now(); const tick = (t) => { window.__f.push(t - last); last = t; if (window.__f.length < 600) requestAnimationFrame(tick); }; requestAnimationFrame(tick); })()`);+ await page.wheel(Math.min(scenes.reduce((a, s) => a + s.height, 0), 9000), { step: 120, pauseMs: 16 });+ await sleep(600);+ const f = await page.eval('window.__f.slice(2)');+ const sorted = f.slice().sort((a, b) => a - b);+ console.log(`smoothness: ${f.length} frames, median ${(sorted[Math.floor(f.length / 2)] || 0).toFixed(1)} ms, ${f.filter((d) => d > 34).length} over 34 ms (headless timing is rough; a handful is normal)`);+ }+ if (page.consoleErrors?.length) { problems.push(`${label} console: ${page.consoleErrors.slice(0, 3).join(' | ')}`); }+ await page.close();+}++try {+ await run('desktop', { width: 1440, height: 900, dsf: 1 });+ await run('phone', { width: 390, height: 844, dsf: 1, mobile: true });+ const rp = await browser.newPage({ width: 1440, height: 900, dsf: 1, reducedMotion: true });+ await rp.goto(url, { timeoutMs: 40000, settleMs: 1200 });+ const h = await rp.eval('document.documentElement.scrollHeight');+ const frames = [], labels = [];+ for (let y = 0, k = 0; y < h && k < 16; y += 900, k++) { await rp.eval(`window.scrollTo(0, ${y})`); await sleep(350); frames.push(await rp.screenshot({ quality: 70 })); labels.push(`reduced motion, screen ${k + 1}`); }+ await sheet(frames, labels, 360, 225, 4, join(outDir, 'reduced-desktop.jpg'));+ console.log(`reduced ${frames.length} screens → ${rel(join(outDir, 'reduced-desktop.jpg'))}`);+ await rp.close();+} finally {+ await browser.close();+ if (server) server.close();+}+if (problems.length) { console.log('\nPROBLEMS'); for (const p of problems) console.log(' ' + p); }+console.log(problems.length ? `\nRESULT: ${problems.length} problem(s). Fix them, then look at every sheet.` : '\nRESULT: every scene ran. Now look at every sheet: does each frame read, and is the scene as bold as it should be?');+process.exit(problems.length ? 1 : 0);