cinematic-scroll-skill 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/COMPATIBILITY.md +244 -0
  2. package/LICENSE +21 -0
  3. package/MODELS.md +92 -0
  4. package/README.md +250 -0
  5. package/SKILL.md +1003 -0
  6. package/audit-mode.md +497 -0
  7. package/bin/install.mjs +91 -0
  8. package/compile-choreography.mjs +296 -0
  9. package/decision-log.md +241 -0
  10. package/examples/GETTING_STARTED.md +279 -0
  11. package/examples/KNOWN_ISSUES.md +50 -0
  12. package/examples/PROMPTS.md +166 -0
  13. package/examples/luxe/README.md +88 -0
  14. package/examples/luxe/index.html +662 -0
  15. package/examples/noir/README.md +72 -0
  16. package/examples/noir/index.html +634 -0
  17. package/examples/pop/README.md +81 -0
  18. package/examples/pop/index.html +711 -0
  19. package/examples/renaissance/README.md +39 -0
  20. package/examples/renaissance/index.html +648 -0
  21. package/examples/studio/README.md +77 -0
  22. package/examples/studio/chapters.js +105 -0
  23. package/examples/studio/index.html +520 -0
  24. package/manifest.json +92 -0
  25. package/manifest.md +136 -0
  26. package/package.json +56 -0
  27. package/references/film-archetypes.md +211 -0
  28. package/references/performance-budget.md +499 -0
  29. package/references/scroll-patterns.md +693 -0
  30. package/scroll-choreography-compilation.md +543 -0
  31. package/scroll-choreography.json +1512 -0
  32. package/taste-guardrails.md +164 -0
  33. package/templates/nextjs/.env.example +41 -0
  34. package/templates/nextjs/app/api/fal/proxy/route.ts +33 -0
  35. package/templates/nextjs/app/api/fal/webhook/route.ts +132 -0
  36. package/templates/nextjs/app/api/generate-edition-asset/route.ts +66 -0
  37. package/templates/nextjs/app/globals.css +80 -0
  38. package/templates/nextjs/app/layout.tsx +21 -0
  39. package/templates/nextjs/app/page.tsx +10 -0
  40. package/templates/nextjs/components/ChapterDemoVisual.tsx +212 -0
  41. package/templates/nextjs/components/ChapterScene.tsx +373 -0
  42. package/templates/nextjs/components/EditionsPage.tsx +116 -0
  43. package/templates/nextjs/components/SmoothScrollProvider.tsx +8 -0
  44. package/templates/nextjs/lib/api-guard.ts +110 -0
  45. package/templates/nextjs/lib/editions-manifest.ts +224 -0
  46. package/templates/nextjs/lib/fal-client.ts +12 -0
  47. package/templates/nextjs/lib/fal-generate.ts +86 -0
  48. package/templates/nextjs/lib/fal-models.ts +213 -0
  49. package/templates/nextjs/lib/prompt-contract.ts +97 -0
  50. package/templates/nextjs/lib/use-device.ts +42 -0
  51. package/templates/nextjs/lib/use-lenis.ts +35 -0
  52. package/templates/nextjs/next.config.ts +29 -0
  53. package/templates/nextjs/package-lock.json +6455 -0
  54. package/templates/nextjs/package.json +41 -0
  55. package/templates/nextjs/package.patch.json +28 -0
  56. package/templates/nextjs/postcss.config.js +6 -0
  57. package/templates/nextjs/scripts/generate-chapter-assets.mjs +243 -0
  58. package/templates/nextjs/scripts/setup.mjs +170 -0
  59. package/templates/nextjs/tailwind.config.ts +37 -0
  60. package/templates/nextjs/tsconfig.json +23 -0
  61. package/troubleshooting.md +1284 -0
package/audit-mode.md ADDED
@@ -0,0 +1,497 @@
1
+ # Audit Mode: Cinematic Scroll Analysis
2
+
3
+ > The most valuable skills solve existing problems, not just create new things.
4
+ > The Cinematic Scroll Audit ingests any URL, detects all scroll-driven interactions,
5
+ > and scores them on four dimensions. It outputs a `remediation-plan.md` with specific,
6
+ > prioritized fixes.
7
+
8
+ ---
9
+
10
+ ## Table of Contents
11
+
12
+ 1. [Overview](#overview)
13
+ 2. [Input](#input)
14
+ 3. [Detection Pipeline](#detection-pipeline)
15
+ 4. [Scoring (0-100 per dimension)](#scoring)
16
+ 5. [Taste Guardrail Violations](#taste-guardrail-violations)
17
+ 6. [Report Generation](#report-generation)
18
+ 7. [Audit Agent Instructions](#audit-agent-instructions)
19
+ 8. [Edge Cases](#edge-cases)
20
+ 9. [Reference: Score Calibration](#score-calibration)
21
+
22
+ ---
23
+
24
+ ## Overview
25
+
26
+ The Cinematic Scroll Audit is a diagnostic system that analyzes any scroll-driven website and produces a standardized, actionable quality assessment. It answers four questions:
27
+
28
+ 1. **Pacing**: Does the scroll rhythm feel intentional, or does it fight the user?
29
+ 2. **Performance**: Does the site maintain 60fps, or does it drop frames?
30
+ 3. **Accessibility**: Can everyone use this site, regardless of motion sensitivity or assistive technology?
31
+ 4. **Emotional Arc**: Does the scroll journey tell a story, or is it just decoration?
32
+
33
+ Each dimension scores 0-100. The overall score is the average of the four dimensions, minus taste guardrail deductions. Two different auditors running the same detection pipeline on the same site should produce scores within 5 points of each other.
34
+
35
+ ---
36
+
37
+ ## Input
38
+
39
+ ```
40
+ Audit [URL] [options]
41
+
42
+ Options:
43
+ --device=desktop|tablet|mobile Target device for scoring (default: desktop)
44
+ --reduced-motion Score with prefers-reduced-motion: reduce active
45
+ --deep Run full 4-dimension analysis (default: true)
46
+ --quick Run only Pacing + Performance dimensions
47
+ --output=path Custom output path for remediation-plan.md
48
+ ```
49
+
50
+ ### Input Validation
51
+ - URL must be publicly accessible or a localhost URL with explicit user confirmation
52
+ - SPA routing: audit captures scroll behavior on initial load only; does not navigate
53
+ - Authentication: if site requires login, user must provide credentials or pre-authenticated session
54
+
55
+ ---
56
+
57
+ ## Detection Pipeline
58
+
59
+ ### Step 1: Scroll Interaction Detection
60
+
61
+ Analyze the page for the following interaction types. Each detection method produces evidence that feeds into the scoring rubrics.
62
+
63
+ #### 1.1 Pinned/Fixed Sections
64
+ **Detection method:**
65
+ - Query all elements with `position: sticky` or `position: fixed`
66
+ - Check for `pin: true` in GSAP ScrollTrigger instances
67
+ - Measure element height vs. scroll distance: if element stays visible for >150vh of scroll, flag as pinned
68
+
69
+ **Evidence collected:**
70
+ - Pin count per page
71
+ - Pin duration in vh units (measured by scroll distance element remains fixed)
72
+ - Consecutive pin count (how many pins without 80vh+ breathing room)
73
+ - Pin spacing behavior (element releases smoothly or snaps)
74
+
75
+ #### 1.2 Parallax Layers
76
+ **Detection method:**
77
+ - Monitor `transform` changes on scroll via MutationObserver + scroll sampling
78
+ - Detect `translateY`/`translateX` changes that correlate with `scrollY` at non-1:1 ratios
79
+ - Check for `data-speed` attributes (Locomotive Scroll convention)
80
+ - Check CSS for `will-change: transform` on non-fixed elements
81
+
82
+ **Evidence collected:**
83
+ - Parallax layer count per viewport
84
+ - Depth multiplier values (scroll rate ratio)
85
+ - Whether parallax uses transform (good) or top/left (bad)
86
+ - Layer variety: do adjacent chapters use different depth ratios?
87
+
88
+ #### 1.3 Scroll-Driven Animations
89
+ **Detection method:**
90
+ - Detect `scroll` event listeners on `window`, `document`, elements
91
+ - Check for GSAP ScrollTrigger, ScrollSmoother, Lenis, Locomotive Scroll
92
+ - Detect IntersectionObserver usage with `threshold` arrays
93
+ - Look for CSS `animation-play-state` toggled by scroll
94
+ - Detect CSS scroll-driven animations (`animation-timeline: scroll()`)
95
+
96
+ **Evidence collected:**
97
+ - Library used (if any)
98
+ - Listener count and whether they use `passive: true`
99
+ - Whether handlers use `requestAnimationFrame` or direct DOM updates
100
+ - Presence of layout reads (`getBoundingClientRect`, `offsetHeight`) in scroll callbacks
101
+
102
+ #### 1.4 Smooth Scroll Libraries
103
+ **Detection method:**
104
+ - Check `window` for Lenis, ScrollSmoother, Locomotive, SmoothScroll objects
105
+ - Detect `overscroll-behavior` CSS property
106
+ - Measure scroll smoothness: sample scroll position at 60fps, calculate jitter
107
+
108
+ **Evidence collected:**
109
+ - Library name and version (if detectable)
110
+ - Lerp factor / smoothing value
111
+ - Scroll jitter percentage (deviation from linear progression)
112
+
113
+ #### 1.5 3D Transforms
114
+ **Detection method:**
115
+ - Query for `perspective`, `transform-style: preserve-3d` in CSS
116
+ - Detect `rotateX`, `rotateY`, `rotateZ` in computed styles
117
+ - Check for `preserve-3d` stacking contexts
118
+
119
+ **Evidence collected:**
120
+ - 3D transform count
121
+ - Which elements have 3D transforms
122
+ - Whether 3D is disabled on touch/reduced-motion (correct behavior)
123
+
124
+ #### 1.6 CSS Animations Tied to Scroll
125
+ **Detection method:**
126
+ - Detect `animation-timeline: scroll()`, `animation-timeline: view()`
127
+ - Check for `@scroll-timeline` at-rules
128
+ - Monitor `animation-play-state` changes correlated with scroll position
129
+
130
+ **Evidence collected:**
131
+ - Scroll-tied animation count
132
+ - Whether they use transform/opacity only
133
+
134
+ #### 1.7 Scroll Snap
135
+ **Detection method:**
136
+ - Detect `scroll-snap-type` CSS property
137
+ - Check for GSAP ScrollTrigger snap configurations
138
+ - Test snap behavior: does it fire within 10vh of pin boundaries?
139
+
140
+ **Evidence collected:**
141
+ - Snap type (mandatory / proximity / none)
142
+ - Snap points count
143
+ - Snap proximity to pin boundaries
144
+
145
+ ### Detection Artifacts
146
+
147
+ All detection evidence is stored in a structured JSON artifact:
148
+
149
+ ```json
150
+ {
151
+ "url": "https://example.com",
152
+ "timestamp": "2025-01-15T10:30:00Z",
153
+ "device": "desktop",
154
+ "detections": {
155
+ "pins": [{"element": "section.hero", "duration": 280, "startVh": 0, "endVh": 280}],
156
+ "parallaxLayers": [{"element": ".bg", "depth": 0.3, "usesTransform": true}],
157
+ "scrollLibraries": [{"name": "gsap", "version": "3.12", "plugins": ["ScrollTrigger"]}],
158
+ "eventListeners": {"scroll": 3, "passive": 2, "nonPassive": 1},
159
+ "threeDTransforms": [{"element": ".card", "transform": "rotateY(15deg)"}],
160
+ "willChangeCount": 4,
161
+ "compositorLayerCount": 8
162
+ }
163
+ }
164
+ ```
165
+
166
+ ---
167
+
168
+ ## Scoring
169
+
170
+ Each dimension scores 0-100 based on objective rubrics. Scores are calculated from detection evidence, not subjective impression.
171
+
172
+ ### Dimension 1: Pacing (0-100)
173
+
174
+ Measures the rhythm and timing of the scroll experience.
175
+
176
+ **Weight: 25% of overall score**
177
+
178
+ | Tier | Score Range | Criteria |
179
+ |------|------------|----------|
180
+ | **A** | 90-100 | All pin durations 150-400vh. Transitions have 80vh+ breathing room. Default 1.2s/100vh rhythm respected within ±20%. No adjacent chapters share transition types. Title reveals occupy 30-40% of pin range and finish by 70% mark. Snap points never within 10vh of pin boundaries. |
181
+ | **B** | 70-89 | Minor pacing issues -- one pin slightly outside 150-400vh range (within 10%), OR missing breathing room between exactly 2 chapters (50-79vh instead of 80vh+). No more than one timing violation. |
182
+ | **C** | 50-69 | Moderate pacing problems -- multiple pins outside range, OR rushed transitions (<40vh breathing room), OR inconsistent rhythm (>40% deviation from 1.2s/100vh baseline). Title reveals extend past 75% mark OR are missing entirely. |
183
+ | **D** | 30-49 | Serious pacing issues -- scroll-jacking detected (content <800px pinned), OR pins under 100vh, OR no transition breathing room between most chapters. User feels scroll is unpredictable. |
184
+ | **F** | 0-29 | Broken pacing -- constant pinning (>3 consecutive without release), no rhythm detectable, users cannot predict scroll behavior. Page feels broken or frozen. |
185
+
186
+ **Pacing Score Calculation:**
187
+ ```
188
+ baseScore = 100
189
+ for each pin outside 150-400vh: deduct 8 points (max -24)
190
+ for each missing breathing room: deduct 6 points (max -18)
191
+ for scroll-jacking detected: deduct 30 points
192
+ for snap within 10vh of pin edge: deduct 5 points each (max -15)
193
+ for title reveal ending >75%: deduct 5 points each (max -10)
194
+ for rhythm deviation >40%: deduct 15 points
195
+ score = max(0, baseScore - deductions)
196
+ ```
197
+
198
+ ---
199
+
200
+ ### Dimension 2: Performance (0-100)
201
+
202
+ Measures technical execution quality and compliance with the 60fps contract.
203
+
204
+ **Weight: 25% of overall score**
205
+
206
+ | Tier | Score Range | Criteria |
207
+ |------|------------|----------|
208
+ | **A** | 90-100 | All animations use transform/opacity only. will-change applied correctly (<=3 elements, 200ms before/after). <5% scroll jank measured via 10s scroll recording. No layout reads in scroll handlers. Respects mobile layer budgets (<10 desktop, <4 mobile). No filter animations. All images preloaded. GSAP best practices followed (batch tweens, no individual per-element tweens). |
209
+ | **B** | 70-89 | Minor issues -- one or two non-transform properties animated (but not layout), OR will-change slightly misapplied (4 elements instead of 3, or timing off by <100ms), OR 5-10% scroll jank. Still playable on mid-range devices. |
210
+ | **C** | 50-69 | Moderate problems -- blur/filter animations present (but not during scroll), OR layout reads in scroll handlers (<3 per second), OR visible jank 10-15%, OR mobile layer budget exceeded by 1-2 layers. Experience is playable but noticeable. |
211
+ | **D** | 30-49 | Serious issues -- multiple layout-property animations, OR >15% jank, OR no mobile degradation strategy, OR will-change applied globally (`* { will-change: transform }`), OR images loading during scroll. Unusable on budget mobile. |
212
+ | **F** | 0-29 | Critical -- scroll handlers doing heavy computation (>2ms each), constant layout thrashing (purple bars in DevTools), OR filter animations during scroll (20-30fps on mobile), OR no `passive: true` on scroll listeners. Site is effectively broken. |
213
+
214
+ **Performance Score Calculation:**
215
+ ```
216
+ baseScore = 100
217
+ for each non-transform animated property: deduct 5 points (max -25)
218
+ for layout reads in scroll handlers: deduct 8 points each (max -24)
219
+ for will-change >3 elements: deduct 8 points
220
+ for will-change applied globally: deduct 20 points
221
+ for filter animation during scroll: deduct 25 points
222
+ for jank 5-10%: deduct 10 points
223
+ for jank 10-15%: deduct 20 points
224
+ for jank >15%: deduct 35 points
225
+ for images loading during scroll: deduct 10 points
226
+ for no passive: true on scroll: deduct 15 points
227
+ for mobile layer budget exceeded: deduct 10 points
228
+ for setState in scroll handler: deduct 25 points
229
+ score = max(0, baseScore - deductions)
230
+ ```
231
+
232
+ ---
233
+
234
+ ### Dimension 3: Accessibility (0-100)
235
+
236
+ Measures inclusive design compliance and respect for user preferences.
237
+
238
+ **Weight: 25% of overall score**
239
+
240
+ | Tier | Score Range | Criteria |
241
+ |------|------------|----------|
242
+ | **A** | 90-100 | Full `prefers-reduced-motion` support: all content accessible without animation, no vestibular triggers (no 3D rotation on touch), keyboard navigation works through all pinned sections, screen reader compatible (ARIA labels on pinned content, live regions for dynamic content), focus management correct, no auto-playing scroll motion. All content visible in reduced-motion mode. |
243
+ | **B** | 70-89 | Minor gaps -- reduced-motion partially implemented (some animations disabled but not all), OR one keyboard navigation issue during pins (focus trapped or skipped), OR one ARIA concern. Core experience still accessible. |
244
+ | **C** | 50-69 | Moderate issues -- no reduced-motion support at all, OR keyboard navigation broken during pins (user cannot tab through), OR content partially hidden behind animations with no alternative access. Screen reader can access content but with difficulty. |
245
+ | **D** | 30-49 | Serious gaps -- content hidden behind animations with no alternative path, OR 3D rotation present on touch devices without reduced-motion fallback, OR auto-playing scroll motion present. Users with vestibular disorders cannot use the site. |
246
+ | **F** | 0-29 | Inaccessible -- motion sickness triggers intentionally present (spinning, rapid direction changes), content unreachable without completing scroll animations, no alternative access paths. Legal/compliance risk. |
247
+
248
+ **Accessibility Score Calculation:**
249
+ ```
250
+ baseScore = 100
251
+ for no reduced-motion support: deduct 25 points
252
+ for 3D rotation on touch devices: deduct 20 points
253
+ for keyboard navigation broken in pins: deduct 20 points
254
+ for auto-playing scroll motion: deduct 15 points
255
+ for content hidden behind animations: deduct 20 points
256
+ for missing ARIA labels on pinned content: deduct 8 points
257
+ for focus trap in pinned section: deduct 12 points
258
+ for vestibular trigger (rapid spin/tilt): deduct 25 points
259
+ for screen reader incompatibility: deduct 15 points
260
+ score = max(0, baseScore - deductions)
261
+ ```
262
+
263
+ ---
264
+
265
+ ### Dimension 4: Emotional Arc (0-100)
266
+
267
+ Measures the narrative and emotional quality of the scroll journey.
268
+
269
+ **Weight: 25% of overall score**
270
+
271
+ | Tier | Score Range | Criteria |
272
+ |------|------------|----------|
273
+ | **A** | 90-100 | Clear emotional progression detected (tension -> release -> wonder, or similar arc). Each chapter has distinct visual treatment -- different depth ratios, different title reveals, different color temperatures (warm -> cool -> neutral). Pacing has intentional peaks (intense pinned sections) and valleys (breathing room). Title reveals match content mood (dramatic reveals for dramatic content, subtle for contemplative). Background morphs or atmosphere shifts enhance narrative. No two adjacent chapters feel the same. |
274
+ | **B** | 70-89 | Good arc but repetitive -- similar visual treatments across 2+ chapters, or arc present but not fully developed. One chapter breaks the pattern in a way that feels accidental rather than intentional. |
275
+ | **C** | 50-69 | Weak arc -- chapters feel disconnected from each other, OR motion is present but does not serve content (parallax for parallax's sake). No detectable progression or narrative structure. |
276
+ | **D** | 30-49 | No arc -- generic parallax on every section, no variation in treatment. Same easing, same depth ratio, same title treatment repeated. Feels like a template, not a story. |
277
+ | **F** | 0-29 | Anti-narrative -- motion contradicts content (playful bouncing animations for serious content), OR confusing/disorienting journey with no logical flow, OR motion creates emotional whiplash without intent. |
278
+
279
+ **Emotional Arc Score Calculation:**
280
+ ```
281
+ baseScore = 100
282
+ for repetitive title treatment: deduct 8 points each repeat (max -24)
283
+ for repetitive depth ratios between chapters: deduct 6 points each (max -18)
284
+ for same transition type adjacent: deduct 8 points each (max -16)
285
+ for same color temperature all chapters: deduct 10 points
286
+ for generic parallax with no variation: deduct 25 points
287
+ for motion contradicts content: deduct 20 points
288
+ for no detectable arc structure: deduct 20 points
289
+ for missing atmosphere/background treatment: deduct 5 points each (max -15)
290
+ score = max(0, baseScore - deductions)
291
+ ```
292
+
293
+ ---
294
+
295
+ ## Taste Guardrail Violations
296
+
297
+ After dimension scoring, check against `taste-guardrails.md` banned patterns:
298
+
299
+ | Violation | Deduction | Applied To |
300
+ |-----------|----------|------------|
301
+ | Animating `filter: blur()` during scroll | -15 Performance | Performance |
302
+ | Scroll-jacking content <800px | -15 Pacing | Pacing |
303
+ | >3 consecutive pins without breathing room | -10 Pacing | Pacing |
304
+ | Parallax on text <18px | -8 Emotional Arc | Emotional Arc |
305
+ | `setState` in scroll handler | -15 Performance | Performance |
306
+ | Animating width/height/top/left/margin/padding | -10 Performance | Performance |
307
+ | >7 depth layers per chapter | -8 Performance | Performance |
308
+ | Raw scroll listener without rAF | -8 Performance | Performance |
309
+ | 3D rotation on touch / reduced-motion | -15 Accessibility | Accessibility |
310
+ | Auto-playing scroll motion | -15 Accessibility + -10 Pacing | Both |
311
+ | Same easing for all animations in chapter | -5 Emotional Arc | Emotional Arc |
312
+ | Default easing (`ease`, `ease-in-out`, `linear`) | -5 Emotional Arc per instance | Emotional Arc |
313
+ | Center-aligned all text | -5 Emotional Arc | Emotional Arc |
314
+ | Repeated depth multiplier between chapters | -5 Emotional Arc | Emotional Arc |
315
+ | Same transition type between adjacent chapters | -8 Emotional Arc | Emotional Arc |
316
+ | Same title treatment between adjacent chapters | -8 Emotional Arc | Emotional Arc |
317
+ | Same palette temperature across all chapters | -5 Emotional Arc | Emotional Arc |
318
+
319
+ **Critical Violations** (automatic cap on relevant dimension):
320
+ - Scroll-jacking + auto-play: max Pacing score = 29 (F tier)
321
+ - Filter animation during scroll: max Performance score = 29 (F tier)
322
+ - No reduced-motion support + vestibular triggers: max Accessibility score = 29 (F tier)
323
+
324
+ ---
325
+
326
+ ## Report Generation
327
+
328
+ ### Output: `remediation-plan.md`
329
+
330
+ ```markdown
331
+ # Cinematic Scroll Audit Report
332
+
333
+ ## [Site URL] -- [Date]
334
+
335
+ ### Executive Summary
336
+ [Brief description of the site and overall impression]
337
+
338
+ ### Overall Score: [X]/100
339
+
340
+ **Grade: [A/B/C/D/F]**
341
+
342
+ ### Dimension Scores
343
+ | Dimension | Score | Grade | Status | Weight | Weighted |
344
+ |-------------|-------|-------|----------|--------|----------|
345
+ | Pacing | XX | A/B/C/D/F | Pass/Warning/Critical | 25% | XX |
346
+ | Performance | XX | A/B/C/D/F | Pass/Warning/Critical | 25% | XX |
347
+ | Accessibility| XX | A/B/C/D/F | Pass/Warning/Critical | 25% | XX |
348
+ | Emotional Arc| XX | A/B/C/D/F | Pass/Warning/Critical | 25% | XX |
349
+
350
+ ### Detection Summary
351
+ - Scroll library: [GSAP/Lenis/Locomotive/Custom/none]
352
+ - Pin count: [N] (total duration: [X]vh)
353
+ - Parallax layers: [N] (max per chapter: [N])
354
+ - 3D transforms: [N] elements
355
+ - Compositor layers (desktop): [N]
356
+ - Compositor layers (mobile): [N]
357
+ - Scroll jank (10s test): [X]%
358
+ - Event listeners: [N] scroll listeners, [N] passive
359
+
360
+ ### Taste Guardrail Check
361
+ | Rule | Status | Notes |
362
+ |------|--------|-------|
363
+ | No blur animation | [PASS/FAIL] | |
364
+ | No scroll-jacking <800px | [PASS/FAIL] | |
365
+ | Pin breathing room >=80vh | [PASS/FAIL] | |
366
+ | Max 7 layers per chapter | [PASS/FAIL] | |
367
+ | 3D disabled on touch | [PASS/FAIL] | |
368
+ | No auto-play | [PASS/FAIL] | |
369
+ | Reduced motion support | [PASS/FAIL] | |
370
+ | Varied title treatments | [PASS/FAIL] | |
371
+ | Varied transitions | [PASS/FAIL] | |
372
+ | Varied depth ratios | [PASS/FAIL] | |
373
+
374
+ ### Critical Issues (Fix First)
375
+ 1. **[Issue Title]** -- Impact: [Dimension -X points] -- Fix: [Specific, actionable fix with estimated effort]
376
+ - Evidence: [Detection evidence]
377
+ - Code hint: [File or pattern to change]
378
+
379
+ ### Warnings (Fix Soon)
380
+ 1. **[Issue Title]** -- Impact: [Dimension -X points] -- Fix: [Specific fix]
381
+ - Evidence: [Detection evidence]
382
+
383
+ ### Recommendations (Nice to Have)
384
+ 1. **[Suggestion]** -- Expected improvement: [Dimension +X points]
385
+ - Rationale: [Why this helps]
386
+
387
+ ### Estimated Fix Effort
388
+ - Critical: X hours
389
+ - Warnings: X hours
390
+ - Recommendations: X hours
391
+ - **Total: X hours**
392
+
393
+ ### Before/After Score Projection
394
+ | Dimension | Current | After Critical Fixes | After All Fixes |
395
+ |-------------|---------|---------------------|-----------------|
396
+ | Pacing | XX | XX (+X) | XX (+X) |
397
+ | Performance | XX | XX (+X) | XX (+X) |
398
+ | Accessibility| XX | XX (+X) | XX (+X) |
399
+ | Emotional Arc| XX | XX (+X) | XX (+X) |
400
+ | **Overall** | **XX** | **XX (+X)** | **XX (+X)** |
401
+ ```
402
+
403
+ ---
404
+
405
+ ## Audit Agent Instructions
406
+
407
+ When the user says "Audit [URL]" or "Review the scroll experience on [URL]":
408
+
409
+ ### Step 1: Fetch and Analyze
410
+ 1. Navigate to the URL using the browser tool
411
+ 2. Wait for page to fully load (all JS executed)
412
+ 3. Run the Detection Pipeline (Step 1 above) for all 7 detection categories
413
+ 4. Scroll the page at moderate speed for 10 seconds to collect scroll behavior data
414
+ 5. Record: pin durations, parallax ratios, event listener counts, jank percentage
415
+
416
+ ### Step 2: Score Each Dimension
417
+ 1. Apply the scoring rubrics above using collected evidence
418
+ 2. Calculate deduction-based scores for each dimension
419
+ 3. Cross-check: would a second auditor with the same evidence produce the same score?
420
+ 4. If score depends on subjective judgment, flag it and explain reasoning
421
+
422
+ ### Step 3: Check Taste Guardrail Violations
423
+ 1. Run through all 17 taste guardrail checks
424
+ 2. Apply deductions to relevant dimensions
425
+ 3. Flag any critical violations that cap dimension scores
426
+
427
+ ### Step 4: Generate remediation-plan.md
428
+ 1. Use the template above
429
+ 2. Fill in all scores with evidence
430
+ 3. List critical issues in priority order (highest impact first)
431
+ 4. Provide specific fixes, not generic advice
432
+ 5. Include estimated effort for each fix
433
+
434
+ ### Step 5: Present and Offer
435
+ 1. Summarize the overall score and grade
436
+ 2. Highlight the most impactful single fix
437
+ 3. Offer to implement critical fixes using the cinematic-scroll-skill
438
+ 4. If user accepts, generate the fixes and re-audit
439
+
440
+ ---
441
+
442
+ ## Edge Cases
443
+
444
+ ### Edge Case: Site has no scroll interactions
445
+ Score: Pacing=50 (neutral, no issues but no craft), Performance=100 (nothing to break), Accessibility=100 (static content is accessible), Emotional Arc=30 (no arc possible without motion). Overall = 70. Report notes: "No scroll-driven interactions detected. This is a static page -- consider adding cinematic scroll to enhance narrative."
446
+
447
+ ### Edge Case: Site is a SPA with dynamic routing
448
+ Detection captures scroll behavior on initial load only. Note in report: "SPA routing detected. Audit covers initial load scroll experience only. Recommend re-running audit after each navigation for complete assessment."
449
+
450
+ ### Edge Case: Site requires authentication
451
+ If user provides credentials: run audit normally. If no credentials: report notes: "Authentication required. Public-facing scroll experience could not be assessed."
452
+
453
+ ### Edge Case: Scroll library is custom (not GSAP/Lenis/Locomotive)
454
+ Score Performance based on behavior, not library name. Check: does it use rAF? Does it animate transform/opacity only? Does it use passive listeners? Grade accordingly.
455
+
456
+ ### Edge Case: Site uses CSS scroll-driven animations only (no JS)
457
+ Score normally. CSS `animation-timeline: scroll()` is valid if it uses transform/opacity. Check for `animation-timeline` support and fallback behavior.
458
+
459
+ ### Edge Case: Mixed quality (some chapters excellent, others broken)
460
+ Score at chapter level first, then average weighted by scroll range. A 100vh excellent chapter and a 400vh broken chapter = weighted toward the broken one. Report breaks down per-chapter scores.
461
+
462
+ ### Edge Case: prefers-reduced-motion active
463
+ Re-run audit with reduced-motion enabled. Compare scores. If gap >30 points, note: "Significant experience gap between motion and reduced-motion modes."
464
+
465
+ ---
466
+
467
+ ## Score Calibration
468
+
469
+ ### Illustrative anchors (not measured data)
470
+
471
+ The table below is a set of **directional anchors** to calibrate your judgment —
472
+ *not* benchmark measurements. No formal audit was run on these sites; the numbers
473
+ are illustrative expectations of where each archetype tends to land, to help you
474
+ sanity-check your own scores. Treat them as "an Apple launch page should score
475
+ high on pacing and emotional arc, a generic WordPress parallax theme should not,"
476
+ never as published results.
477
+
478
+ | Site archetype | Pacing | Performance | Accessibility | Emotional Arc | Overall |
479
+ |------|----------------|---------------------|----------------------|----------------------|---------|
480
+ | Apple-style product launch | high | high | medium | high | high |
481
+ | Docs site (no scroll motion) | n/a | high | high | low | medium |
482
+ | Typical Awwwards SOTD | high | low–med | low | high | medium |
483
+ | Shopify-Editions-style release | high | high | medium | high | high |
484
+ | Generic WordPress parallax theme | low | low–med | medium | low | low |
485
+ | Portfolio with >5 consecutive pins | low | medium | medium | low | low |
486
+
487
+ ### Consistency target
488
+ Aim for repeatable scoring: the same auditor (or two auditors using the same
489
+ rubric) should land close on the same site. If two passes diverge widely, the
490
+ rubric language needs tightening — this is a goal, not a validated guarantee.
491
+
492
+ ### Score Distribution Expectations
493
+ - Top 10% of scroll sites: Overall 85-100
494
+ - Top 25%: Overall 70-84
495
+ - Median: Overall 55-69
496
+ - Bottom 25%: Overall 35-54
497
+ - Bottom 10%: Overall 0-34
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * cinematic-scroll-skill installer
4
+ * ---------------------------------
5
+ * Copies the skill payload into ~/.claude/skills/cinematic-scroll/ so Claude Code
6
+ * (or any Agent-Skill-compatible client that reads ~/.claude/skills) can load it.
7
+ *
8
+ * npx cinematic-scroll-skill → install / update
9
+ * npx cinematic-scroll-skill --dir DIR → install into a custom skills directory
10
+ * npx cinematic-scroll-skill --help
11
+ *
12
+ * This is a convenience layer. The native channels are the Claude Code plugin
13
+ * marketplace (/plugin marketplace add MustBeSimo/cinematic-scroll-skill) and a
14
+ * plain `git clone` into ~/.claude/skills/ — see the repo README.
15
+ */
16
+ import { cpSync, existsSync, mkdirSync, rmSync } from 'node:fs';
17
+ import { homedir } from 'node:os';
18
+ import { dirname, join, resolve } from 'node:path';
19
+ import { fileURLToPath } from 'node:url';
20
+
21
+ const PKG_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
22
+ const SKILL_NAME = 'cinematic-scroll';
23
+
24
+ /* The skill payload — everything the agent needs at runtime. The marketing
25
+ landing page (index.html) and its assets/ are intentionally excluded. */
26
+ const PAYLOAD = [
27
+ 'SKILL.md',
28
+ 'manifest.json',
29
+ 'manifest.md',
30
+ 'taste-guardrails.md',
31
+ 'audit-mode.md',
32
+ 'troubleshooting.md',
33
+ 'decision-log.md',
34
+ 'scroll-choreography.json',
35
+ 'scroll-choreography-compilation.md',
36
+ 'compile-choreography.mjs',
37
+ 'MODELS.md',
38
+ 'COMPATIBILITY.md',
39
+ 'references',
40
+ 'templates',
41
+ 'examples',
42
+ 'LICENSE',
43
+ 'README.md',
44
+ ];
45
+
46
+ const args = process.argv.slice(2);
47
+ if (args.includes('--help') || args.includes('-h')) {
48
+ console.log(`cinematic-scroll-skill — install the skill into your Claude skills directory
49
+
50
+ Usage:
51
+ npx cinematic-scroll-skill [--dir <skills-dir>]
52
+
53
+ Default target: ~/.claude/skills/${SKILL_NAME}
54
+ `);
55
+ process.exit(0);
56
+ }
57
+
58
+ const dirFlag = args.indexOf('--dir');
59
+ const skillsDir = dirFlag !== -1 && args[dirFlag + 1]
60
+ ? resolve(args[dirFlag + 1])
61
+ : join(homedir(), '.claude', 'skills');
62
+
63
+ const dest = join(skillsDir, SKILL_NAME);
64
+
65
+ try {
66
+ if (existsSync(dest)) {
67
+ console.log(`↻ Updating existing skill at ${dest}`);
68
+ rmSync(dest, { recursive: true, force: true });
69
+ }
70
+ mkdirSync(dest, { recursive: true });
71
+
72
+ let copied = 0;
73
+ for (const item of PAYLOAD) {
74
+ const src = join(PKG_ROOT, item);
75
+ if (!existsSync(src)) continue; // tolerate a trimmed npm tarball
76
+ cpSync(src, join(dest, item), { recursive: true });
77
+ copied++;
78
+ }
79
+
80
+ if (copied === 0) {
81
+ console.error('✗ No skill files were found to copy. This package may be corrupted — try reinstalling.');
82
+ process.exit(1);
83
+ }
84
+
85
+ console.log(`\n✓ Installed the cinematic-scroll skill (${copied} items) →\n ${dest}\n`);
86
+ console.log('Next: restart Claude Code (or your client), then invoke the skill in chat.');
87
+ console.log('Docs & live examples: https://mustbesimo.github.io/cinematic-scroll-skill/');
88
+ } catch (err) {
89
+ console.error(`✗ Install failed: ${err.message}`);
90
+ process.exit(1);
91
+ }