Skip to content

Commit 739b77f

Browse files
committed
merge: CinematicBench — passive scroll-craft benchmark, 61-site leaderboard, npx funnel (bench_version 1.1)
2 parents 940152c + b2d34b2 commit 739b77f

82 files changed

Lines changed: 4804 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,6 @@ assets/video/flagship-dancer.*
228228
assets/video/reel2-hero.*
229229
assets/video/studio-scroll-demo.mp4
230230
assets/video/studio-scroll-demo.poster.jpg
231+
232+
# SDD scratch (subagent-driven-development ledger/handoffs)
233+
.superpowers/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
> **New in v2.6.0 — the skill can now *learn*.** A new **Learn mode** ([`learn-mode.md`](./learn-mode.md)) distills sites you own or are authorized to study into original, reusable, IR-validated recipes on a pointer-first **learned shelf** (`references/learned/`) — turning a static knowledge base into a self-improving one, behind an enforced originality firewall (no copied code/assets/brand). It's the sibling to **audit mode**: audit *scores* a URL, learn *distills* it — and both now share one detection pipeline. This release ships the **compiler core** (Phase 1: Pattern-IR gate, four zero-dep tools, CI-enforced shelf integrity, tag-based dedup — no embeddings) — a free *preview* of the Motif Engine. The learned shelf ships **empty**; the full self-learning engine is paid (see *Upgrade* below).
2727
28+
> **New — [CinematicBench](https://mustbesimo.github.io/cinematic-scroll-skill/bench/).** A reproducible, passive benchmark of scroll craft: 61 well-known sites scored 0–100 on Pacing / Performance / Accessibility / Motion Craft by a deterministic rubric ([methodology](./tools/bench/README.md)). Score your own site: `npx -p cinematic-scroll-skill cinematic-bench <url>` — same rubric family as the skill's [taste engine](./bench-mode.md).
29+
2830
> **⬆ Upgrade — [Cinematic Scroll Studio](#) (paid).** This open-source skill **builds** cinematic, scroll-driven sites and **scores** them (the Taste Engine: doctor + hygiene gate). **Cinematic Scroll Studio** **learns your visual language and compounds it** — the full immersive **art-direction engine**: the complete **Motif Engine** (accumulated visual-language library + reuse telemetry + governed promotion + semantic dedup), motif-driven **storyboard / asset-direction / depth & motion** compilers, **variant generation**, and the full **web→video** pipeline. *Cinematic Scroll builds cinematic sites and scores them. Cinematic Scroll Studio learns your visual language and compounds it.* One-time purchase — download from the author's site.
2931
3032
> **New in v2.4.0 — a machine-readable design system under the hood.** A DTCG **token contract** (`design.md` + `tokens/`), **visual systems** as one-file themes (swap one, or author your own), and a **9-component library** (Mode A `.html` + Mode B `.tsx`) make output deterministic and gated, not improvised — hardened by an adversarial self-review ([`REVIEW.md`](./REVIEW.md)). See **[Design system](#-design-system-one-token-contract--a-living-system--a-component-library)** below.

SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Read this section first; read the rest as the route demands. Three rules:
7777
| "a launch film / video of the site" | Compile the scroll choreography to a fixed-time timeline (Basic): `node compile-choreography.mjs scene.json --target video`. The full web→video render pipeline ships in **Cinematic Scroll Studio**. | `scroll-choreography-compilation.md` |
7878
| "score / review an existing URL's scroll experience" | **Audit mode**: analyze the user-supplied URL (only sites they own or are authorized to test) and score Pacing / Performance / Accessibility / Emotional Arc, then emit a remediation plan. | `audit-mode.md` |
7979
| "learn from / study / distill patterns from an existing URL" | **Learn mode**: study a user-authorized URL and distill reusable recipes (technique / visual system / archetype / taste rule) onto the learned shelf via the Pattern IR gate — never copying code/assets/brand. | `learn-mode.md` |
80+
| "bench / score a public URL against the leaderboard" | **Bench mode**: passive, Lighthouse-style scoring of a public URL's scroll experience — `node tools/bench/cli.mjs <url>` (median-of-3, deterministic rubric). Passive observation only; deep remediation stays in audit mode. | `bench-mode.md` · `tools/bench/README.md` |
8081
| "audit / improve a page I'm building" | Run the doctor first, fix what it flags, re-run; pair with the verify orchestrator. | `tools/cinematic-doctor/README.md` · `tools/verify/README.md` |
8182
| "an immersive brand world / 'constant wow' / world-building / make it look like the reference" | Run **Phase 1.5 Asset Direction** before the storyboard — design the world premise, hero concept, motif system, material language, and per-asset sourcing; then clear the **Wow Gate** (reject generic *before* building). | `references/asset-direction.md` · `references/wow-gate.md` |
8283
| "Awwwards-tier / image distortion / kinetic type / custom cursor / preloader / page transitions" | The five second-generation techniques, each with its degrade contract; all five live in `examples/atelier/`. | `references/awwwards-techniques.md` |

audit-mode.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
> login, you must supply credentials or a pre-authenticated session — doing so
2525
> exposes that authenticated context to the audit run. Prefer a throwaway/test
2626
> account over real credentials, and never audit a site whose terms forbid it.
27+
> - **Benching is different from auditing.** Passive, Lighthouse-style scoring of a public
28+
> URL's rendered scroll experience is [bench mode](./bench-mode.md) — one ordinary page load,
29+
> no authorization needed. Audit mode's deep remediation analysis still requires it.
2730
> - Confirm before auditing `localhost`/internal URLs (see Input Validation below).
2831
2932
---

bench-mode.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Bench Mode — CinematicBench
2+
3+
> **Activation:** the user asks to *bench / benchmark / score a public URL's scroll experience*
4+
> or to compare a site against the CinematicBench leaderboard.
5+
6+
**Bench ≠ audit.** Bench mode is **passive render observation of a public URL**: one ordinary
7+
page load (what any visitor's browser does), one `prefers-reduced-motion` probe load, a standard
8+
6-second scroll, and passive measurement of what the site publicly serves — the same posture as
9+
Google PageSpeed or WebPageTest. Bench never bypasses auth, never load-tests, honors
10+
`robots.txt`, and sends a truthful `CinematicBench/1.0` user agent.
11+
[Audit mode](./audit-mode.md) is different: deep, interactive remediation analysis, and it
12+
remains **authorization-only** (sites you own or are authorized to test).
13+
14+
## Run it
15+
16+
node tools/bench/cli.mjs <https://url> # or: npx -p cinematic-scroll-skill cinematic-bench <url>
17+
--runs 3 capture runs (median taken; default 3)
18+
--json machine-readable result
19+
--out <file> also write the result JSON
20+
21+
Exit codes: 0 = scored (a report, not a gate) · 1 = could not score (unmeasurable / no browser)
22+
· 2 = usage error.
23+
24+
## What it scores
25+
26+
Four deterministic dimensions (0–100, deduction-based; rubric fixed in `tools/bench/score.mjs`):
27+
**Pacing** (25%) · **Performance** (30%) · **Accessibility** (25%) · **Motion Craft** (20%).
28+
`overall` is the weighted mean. The Accessibility dimension is an automated motion-a11y heuristic — not a WCAG conformance assessment. Methodology + reproducibility policy: `tools/bench/README.md`.
29+
Unmeasurable sites (bot-wall, robots disallow, timeout) are reported with a reason and never
30+
scored by guesswork.
31+
32+
## The leaderboard
33+
34+
`bench/sites.json` (corpus) → committed `bench/results/*.json` → `node
35+
bench/build-leaderboard.mjs``bench/index.html`, served from the repo's GitHub Pages site.
36+
Rubric changes bump `bench_version` in `tools/bench/score.mjs` and require re-benching the
37+
corpus before the leaderboard is rebuilt.

bench/build-leaderboard.mjs

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
#!/usr/bin/env node
2+
/* build-leaderboard.mjs — render bench/results/*.json into the static leaderboard page.
3+
Zero deps. Unmeasurable sites are footnoted, never ranked. Page must pass the doctor ≥90. */
4+
import { readFileSync, readdirSync, writeFileSync, existsSync } from "node:fs";
5+
import { dirname, join } from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
8+
const HERE = dirname(fileURLToPath(import.meta.url));
9+
const esc = (s) => String(s).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
10+
const escUrl = (u) => (/^https?:\/\//i.test(String(u)) ? esc(u) : "#");
11+
12+
export function buildHtml(results) {
13+
const ranked = results.filter((r) => r.scores && typeof r.scores.overall === "number").sort((a, b) => b.scores.overall - a.scores.overall || String(a.name).localeCompare(String(b.name)));
14+
const unmeasurable = results.filter((r) => !(r.scores && typeof r.scores.overall === "number"));
15+
const cats = [...new Set(ranked.map((r) => r.category))].sort();
16+
const bv = (results.find((r) => r.bench_version) || {}).bench_version || "unknown";
17+
const bvs = [...new Set(results.map((r) => r.bench_version).filter(Boolean))];
18+
const dates = results.map((r) => String(r.ts || "").slice(0, 10)).filter(Boolean).sort();
19+
const bar = (v, label) => { const n = Math.max(0, Math.min(100, Math.round(Number(v) || 0))); return `<div class="dim" title="${esc(label)}: ${n}"><span class="fill" style="--v:${n}%"></span><em>${n}</em></div>`; };
20+
const rows = ranked.map((r, i) => ` <tr data-cat="${esc(r.category)}">
21+
<td class="rank">${i + 1}</td>
22+
<td class="site"><a href="${escUrl(r.url)}" rel="noopener nofollow" target="_blank">${esc(r.name)}</a><small>${esc(r.category)}</small></td>
23+
<td>${bar(r.scores.pacing, "Pacing")}</td><td>${bar(r.scores.performance, "Performance")}</td>
24+
<td>${bar(r.scores.a11y, "Motion A11y (heuristic)")}</td><td>${bar(r.scores.motionCraft, "Motion Craft")}</td>
25+
<td class="overall">${r.scores.overall}</td>
26+
</tr>`).join("\n");
27+
return `<!doctype html>
28+
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
29+
<title>CinematicBench — how the web's best scroll experiences actually score</title>
30+
<meta name="description" content="A reproducible, passive benchmark of scroll craft: pacing, performance, accessibility, motion craft. Scored 0-100. Score your own site with one command.">
31+
<style>
32+
:root{--bg:#0c0d10;--panel:#14161b;--ink:#e8e6df;--dim:#8b8f98;--accent:#c9a962;--good:#7dc98f;--bad:#d97b6c;--line:#2a2d34;--track:#1c1f25}
33+
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
34+
*{box-sizing:border-box;margin:0}body{background:var(--bg);color:var(--ink);font:16px/1.6 ui-sans-serif,system-ui,-apple-system,sans-serif;padding:0 24px 96px}
35+
header{max-width:1080px;margin:64px auto 40px}h1{font-size:clamp(28px,5vw,56px);line-height:1.08;letter-spacing:-.02em}
36+
h1 em{color:var(--accent);font-style:normal}header p{color:var(--dim);max-width:640px;margin-top:16px}
37+
.cta{display:inline-block;margin-top:20px;padding:10px 16px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--accent);font:600 14px ui-monospace,monospace}
38+
nav{max-width:1080px;margin:0 auto 16px;display:flex;gap:8px;flex-wrap:wrap}
39+
nav button{background:var(--panel);color:var(--dim);border:1px solid var(--line);border-radius:999px;padding:6px 14px;font:600 13px inherit;cursor:pointer;transition:color .25s cubic-bezier(.22,.61,.36,1),background-color .25s cubic-bezier(.22,.61,.36,1)}
40+
nav button[aria-pressed="true"]{color:var(--bg);background:var(--accent);border-color:var(--accent)}
41+
a:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
42+
.site a{transition:color .25s cubic-bezier(.22,.61,.36,1)}.site a:hover{color:var(--accent)}
43+
table{width:100%;max-width:1080px;margin:0 auto;border-collapse:collapse}
44+
th{color:var(--dim);font:600 12px/1 inherit;text-transform:uppercase;letter-spacing:.08em;text-align:left;padding:12px 10px;border-bottom:1px solid var(--line)}
45+
td{padding:14px 10px;border-bottom:1px solid var(--track);vertical-align:middle}
46+
.rank{color:var(--dim);font:600 14px ui-monospace,monospace}.site a{color:var(--ink);text-decoration:none;font-weight:600}.site small{display:block;color:var(--dim)}
47+
.dim{position:relative;width:88px;height:8px;background:var(--track);border-radius:4px}
48+
.dim .fill{position:absolute;inset:0;width:var(--v);background:linear-gradient(90deg,var(--bad),var(--good));border-radius:4px}
49+
.dim em{position:absolute;right:-2px;top:10px;font:600 11px ui-monospace,monospace;color:var(--dim);font-style:normal}
50+
.overall{font:700 20px ui-monospace,monospace;color:var(--accent)}
51+
footer{max-width:1080px;margin:48px auto 0;color:var(--dim);font-size:13px}footer a{color:var(--accent)}
52+
/* Mobile: single readable column — rank · site · overall; dimension bars are desktop detail.
53+
No motion on this page, so touch-safety = layout, not animation branches. */
54+
@media (max-width: 720px){
55+
body{padding:0 12px 64px}
56+
header{margin:40px auto 24px}
57+
th:nth-child(n+3):nth-child(-n+6),td:nth-child(n+3):nth-child(-n+6){display:none}
58+
th,td{padding:10px 6px}
59+
.overall{font-size:17px}
60+
}
61+
</style></head><body>
62+
<header>
63+
<h1>Cinematic<em>Bench</em> — how the web's best scroll experiences actually score</h1>
64+
<p>A reproducible, passive benchmark of scroll craft — pacing, performance, accessibility, motion craft — measured with one ordinary page load and a standard scroll. Median of 3 runs. No opinions, one rubric.</p>
65+
<a class="cta" href="https://github.com/MustBeSimo/cinematic-scroll-skill/tree/main/tools/bench">npx -p cinematic-scroll-skill cinematic-bench https://your-site.com</a>
66+
</header>
67+
<nav aria-label="category filter"><button aria-pressed="true" data-cat="all">All</button>${cats.map((c) => `<button aria-pressed="false" data-cat="${esc(c)}">${esc(c)}</button>`).join("")}</nav>
68+
<table><thead><tr><th scope="col">#</th><th scope="col">Site</th><th scope="col">Pacing</th><th scope="col">Perf</th><th scope="col">Motion&nbsp;A11y*</th><th scope="col">Craft</th><th scope="col">Overall</th></tr></thead><tbody>
69+
${rows}
70+
</tbody></table>
71+
<footer>
72+
<p>measured ${esc(dates[0] || "n/a")}${dates.length > 1 && dates.at(-1) !== dates[0] ? "–" + esc(dates.at(-1)) : ""} · headless Chromium (hardware GL) · 1440×900 · bench_version ${esc(bv)}${bvs.length > 1 ? " (mixed versions!)" : ""} · ${ranked.length} sites ranked · ${unmeasurable.length} unmeasurable (bot-wall / robots / timeout — listed in the repo, never guessed) · <a href="https://github.com/MustBeSimo/cinematic-scroll-skill/tree/main/tools/bench">methodology</a> · built with <a href="https://github.com/MustBeSimo/cinematic-scroll-skill">cinematic-scroll-skill</a> · *Motion A11y is an automated heuristic (reduced-motion honored, focus visibility, sampled contrast) — not a WCAG conformance assessment.</p>
73+
</footer>
74+
<script>
75+
for (const b of document.querySelectorAll("nav button")) b.addEventListener("click", () => {
76+
for (const x of document.querySelectorAll("nav button")) x.setAttribute("aria-pressed", x === b ? "true" : "false");
77+
for (const tr of document.querySelectorAll("tbody tr")) tr.style.display = (b.dataset.cat === "all" || tr.dataset.cat === b.dataset.cat) ? "" : "none";
78+
});
79+
</script>
80+
</body></html>\n`;
81+
}
82+
83+
function loadResults() {
84+
const dir = join(HERE, "results");
85+
if (!existsSync(dir)) return [];
86+
return readdirSync(dir).filter((f) => f.endsWith(".json")).map((f) => JSON.parse(readFileSync(join(dir, f), "utf8")));
87+
}
88+
89+
function selftest() {
90+
const fx = (n, o, cat) => ({ bench_version: "1.0", name: n, url: "https://x.test/" + n, category: cat, scores: o === null ? null : { pacing: o, performance: o, a11y: o, motionCraft: o, overall: o }, unmeasurable_reason: o === null ? "bot-wall" : null });
91+
const html = buildHtml([fx("low", 50, "editorial"), fx("high", 90, "dev-tools"), fx("blocked", null, "editorial")]);
92+
const ok = (c, m) => { if (!c) { console.error("✗ leaderboard selftest: " + m); process.exit(1); } };
93+
ok(html.indexOf(">high<") < html.indexOf(">low<"), "ranking order (high first)");
94+
ok(!/>blocked</.test(html), "unmeasurable must not be ranked");
95+
ok(/1 unmeasurable/.test(html), "unmeasurable footnote count");
96+
ok(/bench_version 1.0/.test(html), "bench_version in footer");
97+
ok(/measured /.test(html), "footer must carry the measurement date");
98+
ok(/not a WCAG conformance assessment/.test(html), "a11y heuristic disclaimer present");
99+
ok(/scope="col"/.test(html), "th scope");
100+
ok(/prefers-reduced-motion/.test(html), "leaderboard must honor reduced motion itself");
101+
const evil = buildHtml([fx("evil", 80, "editorial")].map((r) => ({ ...r, url: "javascript:alert(1)", scores: { ...r.scores, pacing: '80" onmouseover="alert(1)' } })));
102+
ok(!/javascript:alert/.test(evil), "javascript: url must be neutralized");
103+
ok(!/onmouseover/.test(evil), "string sub-score must not inject markup");
104+
const partial = buildHtml([fx("ok", 70, "editorial"), { bench_version: "1.0", name: "weird", url: "https://x.test/w", category: "editorial", scores: { overall: null }, unmeasurable_reason: null }]);
105+
ok(/1 unmeasurable/.test(partial) && !/>weird</.test(partial), "invalid-scores record counts as unmeasurable, not ranked");
106+
console.log("✓ leaderboard selftest: ranks, excludes unmeasurable, footnotes, versioned, escapes.");
107+
process.exit(0);
108+
}
109+
110+
const isMain = process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1];
111+
if (isMain) {
112+
if (process.argv.includes("--selftest")) selftest();
113+
const results = loadResults();
114+
if (!results.length) { console.error("✗ build-leaderboard: no results in bench/results/ — run the corpus first (see tools/bench/README.md)"); process.exit(1); }
115+
writeFileSync(join(HERE, "index.html"), buildHtml(results));
116+
console.log(`✓ build-leaderboard: wrote bench/index.html (${results.filter((r) => r.scores).length} ranked)`);
117+
process.exit(0);
118+
}

0 commit comments

Comments
 (0)