creator-editing-studio 1.3.5 → 1.3.6

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.
@@ -240,260 +240,260 @@ preserves the damage rather than repairing it. It is clearly audible and it gets
240
240
  every extra render. Use `node scripts/voice.mjs` to pull the voice losslessly from the camera
241
241
  file, render the picture muted, and mux the two together at the end.
242
242
 
243
- ## Non-negotiables
244
-
245
- 1. **No magic numbers.** Durations, curves, springs, staggers, blur come from `src/design/motion.ts`.
246
- Colours, fonts, sizes, spacing come from `src/design/tokens.ts`. If a needed token does not
247
- exist, add it to the token file (with a comment) instead of inlining a value.
248
- 2. **Timing derives from the spine.** Animation start frames come from word timestamps, beats,
249
- or other elements' timings via helpers — never hand-typed frame numbers.
250
- 3. **`npm run check` and `motion-check --scale=2` must pass** before any render is shown to the user.
251
- 4. **Verify visually before claiming done** (see Verification). Never say something "looks good"
252
- without having rendered and viewed the frames.
253
-
243
+ ## Non-negotiables
244
+
245
+ 1. **No magic numbers.** Durations, curves, springs, staggers, blur come from `src/design/motion.ts`.
246
+ Colours, fonts, sizes, spacing come from `src/design/tokens.ts`. If a needed token does not
247
+ exist, add it to the token file (with a comment) instead of inlining a value.
248
+ 2. **Timing derives from the spine.** Animation start frames come from word timestamps, beats,
249
+ or other elements' timings via helpers — never hand-typed frame numbers.
250
+ 3. **`npm run check` and `motion-check --scale=2` must pass** before any render is shown to the user.
251
+ 4. **Verify visually before claiming done** (see Verification). Never say something "looks good"
252
+ without having rendered and viewed the frames.
253
+
254
254
  ---
255
255
 
256
- ## The 12 motion laws
257
-
258
- 1. **No linear easing** — except constant-velocity loops/scrolls (mark with `// motion-ok`).
259
- 2. **Entrances ease-out (`EASE.out`), exits ease-in (`EASE.in`), on-screen A-to-B moves ease-in-out (`EASE.inOut`).**
260
- 3. **Exits are faster than entrances** — `EXIT_RATIO` (0.65). Use `exitFrames()`.
261
- 4. **Max 2–3 animated properties per element.** No fade + scale + rotate + blur together.
262
- 5. **Never opacity alone.** Pair with 8–24px travel or scale >= 0.94. Opacity completes at
263
- `OPACITY_LEAD` (60%) of the transform.
264
- 6. **Never scale from below 0.9.** Text scaling from zero is the #1 AI-edit tell.
265
- 7. **Blur-in capped at 12px**, fully resolved before the transform ends.
266
- 8. **Groups always stagger** (`STAGGER.tight/normal/dramatic`). Never simultaneous.
267
- 9. **Distance couples to duration sub-linearly** (`travelFrames()`), never linearly.
268
- 10. **Anything that moves fast is motion-blurred** (see Smoothness system). No hard edge may jump
269
- across the frame unblurred.
270
- 11. **Readable hold:** text stays fully visible >= `readFrames(text)` (min 0.9s, +55ms/word).
271
- 12. **Continuity:** every transition inherits the outgoing motion (see below).
272
-
273
- ### Continuity (what makes it feel connected, not cut together)
274
-
275
- - **Shared elements never re-enter.** If an element exists across two beats, `morph()` its
276
- position/size/radius between layouts; never exit and re-animate it. (TransitionTest: the
277
- eyebrow dot stays on screen and grows into the next card's icon tile.)
278
- - **Velocity handoff.** An exit toward a direction is answered by an entrance continuing that
279
- direction — `handoff(exitTo)`.
280
- - **Overlap, never gap.** The next beat starts before the previous one settles —
281
- `nextBeatAt(prevSettled)`.
282
- - **One camera over cuts.** Lay scenes out on one canvas and glide a camera between them
283
- (`src/lib/camera.ts`) instead of hard-cutting between unrelated layouts. Content that should
284
- stay put during a move (shared elements) lives in screen space, outside the camera.
285
- - **Nothing is cut off.** Compute exit start times backward from the end so the slowest,
286
- most-staggered exit completes on or before the last frame.
287
- - **Sound glues cuts.** Whooshes start `TRANSITION.sfxLeadMs` before a visual change and tail
288
- `sfxTailMs` after.
289
-
256
+ ## The 12 motion laws
257
+
258
+ 1. **No linear easing** — except constant-velocity loops/scrolls (mark with `// motion-ok`).
259
+ 2. **Entrances ease-out (`EASE.out`), exits ease-in (`EASE.in`), on-screen A-to-B moves ease-in-out (`EASE.inOut`).**
260
+ 3. **Exits are faster than entrances** — `EXIT_RATIO` (0.65). Use `exitFrames()`.
261
+ 4. **Max 2–3 animated properties per element.** No fade + scale + rotate + blur together.
262
+ 5. **Never opacity alone.** Pair with 8–24px travel or scale >= 0.94. Opacity completes at
263
+ `OPACITY_LEAD` (60%) of the transform.
264
+ 6. **Never scale from below 0.9.** Text scaling from zero is the #1 AI-edit tell.
265
+ 7. **Blur-in capped at 12px**, fully resolved before the transform ends.
266
+ 8. **Groups always stagger** (`STAGGER.tight/normal/dramatic`). Never simultaneous.
267
+ 9. **Distance couples to duration sub-linearly** (`travelFrames()`), never linearly.
268
+ 10. **Anything that moves fast is motion-blurred** (see Smoothness system). No hard edge may jump
269
+ across the frame unblurred.
270
+ 11. **Readable hold:** text stays fully visible >= `readFrames(text)` (min 0.9s, +55ms/word).
271
+ 12. **Continuity:** every transition inherits the outgoing motion (see below).
272
+
273
+ ### Continuity (what makes it feel connected, not cut together)
274
+
275
+ - **Shared elements never re-enter.** If an element exists across two beats, `morph()` its
276
+ position/size/radius between layouts; never exit and re-animate it. (TransitionTest: the
277
+ eyebrow dot stays on screen and grows into the next card's icon tile.)
278
+ - **Velocity handoff.** An exit toward a direction is answered by an entrance continuing that
279
+ direction — `handoff(exitTo)`.
280
+ - **Overlap, never gap.** The next beat starts before the previous one settles —
281
+ `nextBeatAt(prevSettled)`.
282
+ - **One camera over cuts.** Lay scenes out on one canvas and glide a camera between them
283
+ (`src/lib/camera.ts`) instead of hard-cutting between unrelated layouts. Content that should
284
+ stay put during a move (shared elements) lives in screen space, outside the camera.
285
+ - **Nothing is cut off.** Compute exit start times backward from the end so the slowest,
286
+ most-staggered exit completes on or before the last frame.
287
+ - **Sound glues cuts.** Whooshes start `TRANSITION.sfxLeadMs` before a visual change and tail
288
+ `sfxTailMs` after.
289
+
290
290
  ---
291
291
 
292
- ## Smoothness system (every one of these was a real defect found by motion-check)
293
-
294
- - **Use the components, not raw transforms.** `<Presence>`, `<MaskReveal>`, `<HighlightMark>`,
295
- `<RollingNumber>` add velocity motion blur automatically. Anything else that moves wraps its
296
- moving element in `<VelocityBlur vx vy>` with `perFrame()` velocities.
297
- - **Velocity motion blur** (`VelocityBlur`): directional blur sized to this frame's movement with
298
- a 180-degree shutter; fades to zero as the element settles. Near-free to render.
299
- - **Wipes** use `wipeMask(p, perFrame(...))`: the leading edge softens with speed. Never wipe with
300
- a hard `clipPath` edge.
301
- - **Camera moves**: wrap the camera canvas in a full-frame `VelocityBlur` with `bleed={0}` and
302
- `overflow: hidden`, velocity from `cameraShot` (see TransitionTest).
303
- - **Zooms / rotations** (not translations): use `<MotionBlur active>` (temporal sampling, centred
304
- on the frame so toggling it never shifts timing). It costs 10x render time while active —
305
- enable only during the move. Never use `@remotion/motion-blur`'s `CameraMotionBlur`: it samples
306
- ahead of the frame, so switching it on/off causes a timing hitch.
307
- - **Counters roll, never tick.** Use `<RollingNumber>`. A counting number changes glyphs in single
308
- frames as it slows, which motion-check flags as pops.
309
- - **Never `will-change`.** It makes each parallel render tab cache text at a different sub-pixel
310
- position, so settled elements flicker between 4 versions. (Lint enforces this.)
311
- - **Screen recordings used as b-roll usually scroll in steps** (they judder). Use a still frame with a
312
- smooth `ScreenView` pan instead, and blur names on the still.
313
- - **Presence `dur` sets entrance AND exit length.** `dur="instant"` makes exits last 3 frames (a snap) —
314
- for containers that only fade in, use at least `"base"`.
315
- - **Final renders are supersampled at `--scale=2`**, then downscaled to 1080x1920. At 1x, Chrome
316
- snaps text to whole pixels, so the slow tail of every ease-out steps ("move 1px, hold, move 1px")
317
- and motion-check reports stutters. Run motion-check with the same `--scale`.
318
- - **Frame rate:** match the footage. If footage is 60fps, build at 60 — per-frame jumps halve.
319
- All tokens are in ms, so compositions work at either rate.
320
-
292
+ ## Smoothness system (every one of these was a real defect found by motion-check)
293
+
294
+ - **Use the components, not raw transforms.** `<Presence>`, `<MaskReveal>`, `<HighlightMark>`,
295
+ `<RollingNumber>` add velocity motion blur automatically. Anything else that moves wraps its
296
+ moving element in `<VelocityBlur vx vy>` with `perFrame()` velocities.
297
+ - **Velocity motion blur** (`VelocityBlur`): directional blur sized to this frame's movement with
298
+ a 180-degree shutter; fades to zero as the element settles. Near-free to render.
299
+ - **Wipes** use `wipeMask(p, perFrame(...))`: the leading edge softens with speed. Never wipe with
300
+ a hard `clipPath` edge.
301
+ - **Camera moves**: wrap the camera canvas in a full-frame `VelocityBlur` with `bleed={0}` and
302
+ `overflow: hidden`, velocity from `cameraShot` (see TransitionTest).
303
+ - **Zooms / rotations** (not translations): use `<MotionBlur active>` (temporal sampling, centred
304
+ on the frame so toggling it never shifts timing). It costs 10x render time while active —
305
+ enable only during the move. Never use `@remotion/motion-blur`'s `CameraMotionBlur`: it samples
306
+ ahead of the frame, so switching it on/off causes a timing hitch.
307
+ - **Counters roll, never tick.** Use `<RollingNumber>`. A counting number changes glyphs in single
308
+ frames as it slows, which motion-check flags as pops.
309
+ - **Never `will-change`.** It makes each parallel render tab cache text at a different sub-pixel
310
+ position, so settled elements flicker between 4 versions. (Lint enforces this.)
311
+ - **Screen recordings used as b-roll usually scroll in steps** (they judder). Use a still frame with a
312
+ smooth `ScreenView` pan instead, and blur names on the still.
313
+ - **Presence `dur` sets entrance AND exit length.** `dur="instant"` makes exits last 3 frames (a snap) —
314
+ for containers that only fade in, use at least `"base"`.
315
+ - **Final renders are supersampled at `--scale=2`**, then downscaled to 1080x1920. At 1x, Chrome
316
+ snaps text to whole pixels, so the slow tail of every ease-out steps ("move 1px, hold, move 1px")
317
+ and motion-check reports stutters. Run motion-check with the same `--scale`.
318
+ - **Frame rate:** match the footage. If footage is 60fps, build at 60 — per-frame jumps halve.
319
+ All tokens are in ms, so compositions work at either rate.
320
+
321
321
  ---
322
322
 
323
- ## Design rules
324
-
325
- **Read `STYLE.md` before any design decision.** It is the house style (type scale, layout, motion,
326
- sound, approved and rejected beats) and wins over anything below or in a reference. Update it
327
- whenever the user approves or rejects something.
328
-
329
- - Everything visual comes from `src/design/tokens.ts`, which is yours to define.
330
- - **Brand essentials:** your display typeface only, at every weight (headlines/stats 800). One accent: accent
331
- `your accent` on ink and cream/white. No blue, no purple, no serif. Signature emphasis is the accent
332
- marker behind the key phrase — use `<HighlightMark>`; don't invent other emphasis styles.
333
- Headlines are short two-part fragments with the payoff highlighted. Numbers are shown raw and
334
- bold ("$1.3M", "11x") and roll in. Eyebrows are uppercase pills with a accent-ringed dot.
335
- Radii are generous, shadows soft, buttons/badges pills.
336
- - Secondary text uses `COLOR.fgSecondary`; `COLOR.fgMuted` fails contrast on cream — decoration only.
337
- - **User style decisions (first project):**
338
- - Captions are **crisp white** (`CAPTION` token, tight + soft dark shadow). Never ink text with a light glow.
339
- Over the cream background white is invisible, so in card layouts captions go **inside the video
340
- card's bottom edge** on the card's dark scrim (`StageState.scrim`).
341
- - Big headline text is **accent with a glow** (`HeroBlock` / `HeroTag`, `heroGlow()`).
342
- - Pointer is a **solid accent arrow** like the reference (`Cursor`), ~68px.
343
- - Brand logos are **real full-colour logos** (`LogoIcon`, SVG Logos CC0 via `src/design/logos.json` —
344
- extract only the icons used). Never approximate a logo that isn't in the set; use a neutral
345
- icon and ask for the official file (Klaviyo is missing).
346
- - A corner tag (e.g. "11 MINUTES" pill) is removed when the video returns full screen.
347
- - **Text behind the subject must stay readable:** the head covers only the lower ~20–30% of the
348
- headline. Head height changes shot to shot (leaning forward lifts it ~80px) — check a still of
349
- EVERY hero moment and raise the block (`top`; put labels above as `eyebrow`) where needed.
350
- - Keep accent highlights away from the accent background glow so they don't disappear into it.
351
- - Stats use proportional figures, not tabular (tabular makes "11" look gappy in your display typeface).
352
- - **Web design systems do not map 1:1 to video.** Keep colour, font families/weights, type-scale
353
- ratios, radii, spacing rhythm, iconography and imagery style — but rescale sizes for a
354
- 1080-wide frame viewed on a phone (body roughly 40–48px, not 16px). Web UI components mostly
355
- do not apply.
356
- - Respect safe zones: `LAYOUT.safeTop` / `LAYOUT.safeBottom` for Reels/Shorts UI.
357
- - Text contrast >= 4.5:1 against whatever is behind it, including over footage.
358
- - Draw graphics in code (SVG/CSS) so every part can animate. Use flat images only for things
359
- that must be real (logos, screenshots, photos). Avoid AI-generated imagery for anything the
360
- viewer is meant to look at.
361
- - Icons: SVG drawn in code or an installed icon library, never image files.
362
-
323
+ ## Design rules
324
+
325
+ **Read `STYLE.md` before any design decision.** It is the house style (type scale, layout, motion,
326
+ sound, approved and rejected beats) and wins over anything below or in a reference. Update it
327
+ whenever the user approves or rejects something.
328
+
329
+ - Everything visual comes from `src/design/tokens.ts`, which is yours to define.
330
+ - **Brand essentials:** your display typeface only, at every weight (headlines/stats 800). One accent: accent
331
+ `your accent` on ink and cream/white. No blue, no purple, no serif. Signature emphasis is the accent
332
+ marker behind the key phrase — use `<HighlightMark>`; don't invent other emphasis styles.
333
+ Headlines are short two-part fragments with the payoff highlighted. Numbers are shown raw and
334
+ bold ("$1.3M", "11x") and roll in. Eyebrows are uppercase pills with a accent-ringed dot.
335
+ Radii are generous, shadows soft, buttons/badges pills.
336
+ - Secondary text uses `COLOR.fgSecondary`; `COLOR.fgMuted` fails contrast on cream — decoration only.
337
+ - **User style decisions (first project):**
338
+ - Captions are **crisp white** (`CAPTION` token, tight + soft dark shadow). Never ink text with a light glow.
339
+ Over the cream background white is invisible, so in card layouts captions go **inside the video
340
+ card's bottom edge** on the card's dark scrim (`StageState.scrim`).
341
+ - Big headline text is **accent with a glow** (`HeroBlock` / `HeroTag`, `heroGlow()`).
342
+ - Pointer is a **solid accent arrow** like the reference (`Cursor`), ~68px.
343
+ - Brand logos are **real full-colour logos** (`LogoIcon`, SVG Logos CC0 via `src/design/logos.json` —
344
+ extract only the icons used). Never approximate a logo that isn't in the set; use a neutral
345
+ icon and ask for the official file (Klaviyo is missing).
346
+ - A corner tag (e.g. "11 MINUTES" pill) is removed when the video returns full screen.
347
+ - **Text behind the subject must stay readable:** the head covers only the lower ~20–30% of the
348
+ headline. Head height changes shot to shot (leaning forward lifts it ~80px) — check a still of
349
+ EVERY hero moment and raise the block (`top`; put labels above as `eyebrow`) where needed.
350
+ - Keep accent highlights away from the accent background glow so they don't disappear into it.
351
+ - Stats use proportional figures, not tabular (tabular makes "11" look gappy in your display typeface).
352
+ - **Web design systems do not map 1:1 to video.** Keep colour, font families/weights, type-scale
353
+ ratios, radii, spacing rhythm, iconography and imagery style — but rescale sizes for a
354
+ 1080-wide frame viewed on a phone (body roughly 40–48px, not 16px). Web UI components mostly
355
+ do not apply.
356
+ - Respect safe zones: `LAYOUT.safeTop` / `LAYOUT.safeBottom` for Reels/Shorts UI.
357
+ - Text contrast >= 4.5:1 against whatever is behind it, including over footage.
358
+ - Draw graphics in code (SVG/CSS) so every part can animate. Use flat images only for things
359
+ that must be real (logos, screenshots, photos). Avoid AI-generated imagery for anything the
360
+ viewer is meant to look at.
361
+ - Icons: SVG drawn in code or an installed icon library, never image files.
362
+
363
363
  ---
364
364
 
365
- ## Compositing: text behind the subject
366
-
367
- Layer order, bottom to top:
368
-
369
- ```
370
- background plate (designed, or the original footage)
371
- text / graphics <- 1–3px blur to sit on the background's focal plane
372
- subject cutout <- same clip, frame-aligned
373
- light wrap <- blurred background screened onto the subject's inner edge, 15–30%
374
- grain + grade <- applied over everything so layers share one look
375
- ```
376
-
377
- - **The cutout must come from the same clip as its background plate**, frame-aligned. Never
378
- combine a cutout from one take with footage from another.
379
- - **The matte is built automatically from ordinary footage.** No green screen, and never ask the
380
- user for one — most people have never shot against green and do not know the term. Segment the
381
- subject per frame, then **temporally smooth the alpha**, which is not optional: a per-frame matte
382
- shimmers along the edge, and type sitting against a head is exactly where that shows. Finish with
383
- spill-free cleanup: ~0.5px choke, 0.5–1px feather.
384
- - **Quality is worst where it is most visible:** flyaway hair, motion blur, and a hand crossing in
385
- front of the text. The light wrap below hides a good deal of it. If a shot simply will not hold,
386
- say so and move the text rather than shipping a halo.
387
- - **If the user happens to have a background-free or green version, prefer it** — chroma keying
388
- still beats automatic matting on hair. Use it **only for the alpha** and take the subject's colour
389
- from the original, so no green ever reaches the edges. Verify the pair first: identical duration,
390
- fps, resolution and frame count, subject aligned on the same frame (one frame out makes a ghost).
391
- This is an upgrade for people who already work that way, never a requirement.
392
- - **Supplied cutouts** must have real transparency (ProRes 4444, WebM with alpha, or PNG sequence).
393
- An MP4 cannot hold transparency — if one arrives, stop and tell the user.
394
- - Play transparent video with `<OffthreadVideo transparent src={staticFile(...)} />`.
395
- - Text behind a moving subject gets 0.85–0.95x counter-parallax; static text reads as a sticker.
396
- - Text should animate in while already partly occluded, not appear fully and then get covered.
397
- - Pull text colour toward the footage's black/white points; pure white over graded footage looks
398
- pasted on.
399
-
365
+ ## Compositing: text behind the subject
366
+
367
+ Layer order, bottom to top:
368
+
369
+ ```
370
+ background plate (designed, or the original footage)
371
+ text / graphics <- 1–3px blur to sit on the background's focal plane
372
+ subject cutout <- same clip, frame-aligned
373
+ light wrap <- blurred background screened onto the subject's inner edge, 15–30%
374
+ grain + grade <- applied over everything so layers share one look
375
+ ```
376
+
377
+ - **The cutout must come from the same clip as its background plate**, frame-aligned. Never
378
+ combine a cutout from one take with footage from another.
379
+ - **The matte is built automatically from ordinary footage.** No green screen, and never ask the
380
+ user for one — most people have never shot against green and do not know the term. Segment the
381
+ subject per frame, then **temporally smooth the alpha**, which is not optional: a per-frame matte
382
+ shimmers along the edge, and type sitting against a head is exactly where that shows. Finish with
383
+ spill-free cleanup: ~0.5px choke, 0.5–1px feather.
384
+ - **Quality is worst where it is most visible:** flyaway hair, motion blur, and a hand crossing in
385
+ front of the text. The light wrap below hides a good deal of it. If a shot simply will not hold,
386
+ say so and move the text rather than shipping a halo.
387
+ - **If the user happens to have a background-free or green version, prefer it** — chroma keying
388
+ still beats automatic matting on hair. Use it **only for the alpha** and take the subject's colour
389
+ from the original, so no green ever reaches the edges. Verify the pair first: identical duration,
390
+ fps, resolution and frame count, subject aligned on the same frame (one frame out makes a ghost).
391
+ This is an upgrade for people who already work that way, never a requirement.
392
+ - **Supplied cutouts** must have real transparency (ProRes 4444, WebM with alpha, or PNG sequence).
393
+ An MP4 cannot hold transparency — if one arrives, stop and tell the user.
394
+ - Play transparent video with `<OffthreadVideo transparent src={staticFile(...)} />`.
395
+ - Text behind a moving subject gets 0.85–0.95x counter-parallax; static text reads as a sticker.
396
+ - Text should animate in while already partly occluded, not appear fully and then get covered.
397
+ - Pull text colour toward the footage's black/white points; pure white over graded footage looks
398
+ pasted on.
399
+
400
400
  ---
401
401
 
402
- ## Per-video pipeline
403
-
404
- 1. **Ingest:** probe every clip (fps, resolution, colour, alpha).
405
- - **Phone footage is usually variable frame rate (VFR).** Conform it to constant frame rate
406
- with ffmpeg before use, or it stutters and drifts out of sync in Remotion.
407
- - Conform everything to one fps. Never mix frame rates.
408
- 2. **Spine:** word-level timings + music beats -> `work/<video>/spine.json`.
409
- Cut pauses/filler from word gaps. All animation timing reads from the spine.
410
- - If the user supplies a script or SRT, it is the **text truth** (spelling, names, brand words):
411
- force-align that exact text to the audio with WhisperX's aligner. Never use SRT timings
412
- directly — they are line-level and padded for readability, not word-accurate.
413
- - With no script, transcribe with WhisperX, then show the transcript for correction before building.
414
- 3. **Cutouts:** build the matte from the footage automatically, or validate a supplied cutout (see above). Only needed for shots that want text behind the subject.
415
- 4. **Beat sheet:** from the script and the user's marked punch lines, write a short plan — which
416
- moment gets which treatment — and confirm with the user before building.
417
- - **Read their saved references first** (`editing_os_references`). They are the whole reason
418
- the edit should look like theirs rather than like the defaults, and a plan written without
419
- them is a plan written for anybody. Say which reference each decision came from, so the
420
- user can see their own taste being applied and correct it when it is being misread.
421
- - Where references are silent, the defaults in STYLE.md apply. Where references and defaults
422
- disagree, the reference wins — it is a real preference, and the default is only a sensible
423
- starting point.
424
- 5. **Build** in `src/compositions/<Video>.tsx` from components + helpers + tokens only.
425
- 6. **Verify** (below), then show the user.
426
- 7. **Sound:** the user adds SFX and music themselves. Deliver a cue list (timestamps of every
427
- transition and hit, with suggested whoosh start = `TRANSITION.sfxLeadMs` before the change) so
428
- they can place sounds quickly. Render without music unless asked.
429
- 8. **Render** at `--scale=2`, downscaled to 1080x1920 unless told otherwise.
430
-
402
+ ## Per-video pipeline
403
+
404
+ 1. **Ingest:** probe every clip (fps, resolution, colour, alpha).
405
+ - **Phone footage is usually variable frame rate (VFR).** Conform it to constant frame rate
406
+ with ffmpeg before use, or it stutters and drifts out of sync in Remotion.
407
+ - Conform everything to one fps. Never mix frame rates.
408
+ 2. **Spine:** word-level timings + music beats -> `work/<video>/spine.json`.
409
+ Cut pauses/filler from word gaps. All animation timing reads from the spine.
410
+ - If the user supplies a script or SRT, it is the **text truth** (spelling, names, brand words):
411
+ force-align that exact text to the audio with WhisperX's aligner. Never use SRT timings
412
+ directly — they are line-level and padded for readability, not word-accurate.
413
+ - With no script, transcribe with WhisperX, then show the transcript for correction before building.
414
+ 3. **Cutouts:** build the matte from the footage automatically, or validate a supplied cutout (see above). Only needed for shots that want text behind the subject.
415
+ 4. **Beat sheet:** from the script and the user's marked punch lines, write a short plan — which
416
+ moment gets which treatment — and confirm with the user before building.
417
+ - **Read their saved references first** (`editing_os_references`). They are the whole reason
418
+ the edit should look like theirs rather than like the defaults, and a plan written without
419
+ them is a plan written for anybody. Say which reference each decision came from, so the
420
+ user can see their own taste being applied and correct it when it is being misread.
421
+ - Where references are silent, the defaults in STYLE.md apply. Where references and defaults
422
+ disagree, the reference wins — it is a real preference, and the default is only a sensible
423
+ starting point.
424
+ 5. **Build** in `src/compositions/<Video>.tsx` from components + helpers + tokens only.
425
+ 6. **Verify** (below), then show the user.
426
+ 7. **Sound:** the user adds SFX and music themselves. Deliver a cue list (timestamps of every
427
+ transition and hit, with suggested whoosh start = `TRANSITION.sfxLeadMs` before the change) so
428
+ they can place sounds quickly. Render without music unless asked.
429
+ 8. **Render** at `--scale=2`, downscaled to 1080x1920 unless told otherwise.
430
+
431
431
  ---
432
432
 
433
- ## Audio standard (audio is half the reel — the user will not accept a bad mix)
434
-
435
- What went wrong on an early video: the voice itself was bit-for-bit intact (measured against the source),
436
- but 2.3–3.5s whoosh files and a 2.4s riser kept playing UNDER the speech, which made the voice sound
437
- wrong. Claude cannot hear, so the mix must be engineered and measured, never guessed.
438
-
439
- 1. **The voice is never touched.** Render the picture `--muted`. The voice in every deliverable is the
440
- original recording's audio (stream-copied, or at most one encode), plus only a single gain change.
441
- No limiter, no dynamic normaliser (ffmpeg `loudnorm` single-pass pumps), no repeated AAC encodes.
442
- 2. **Sound effects are short and placed in gaps.** Trim every SFX to what the motion needs (whoosh
443
- 0.4–0.8s, hits 0.3–0.6s) with a 60–120ms fade-out. Nothing longer than ~0.8s may sit under a spoken
444
- word unless it is at least 24 dB under the voice. Risers go in pauses, not under speech.
445
- 3. **Duck SFX under the voice**: mix with ffmpeg `sidechaincompress` keyed from the voice (SFX drop
446
- ~6 dB while a word is spoken), and high-pass whooshes/impacts around 120–150 Hz so they don't muddy it.
447
- 4. **Measure before delivering** (the window scan in the project folder used `f32le` PCM from ffmpeg):
448
- voice-vs-mix difference per 0.5s window — any window where SFX energy is within 12 dB of the
449
- voice while a word is spoken gets fixed. Final: -14 LUFS integrated, true peak <= -1 dBTP, one
450
- AAC encode at 256k.
451
- 5. **Always also deliver stems + a cue sheet**: `voice.wav`, `sfx.wav` (the placed, trimmed SFX bus),
452
- and `SFX-CUES.txt` with numbered, timecoded SFX files — so the user can rebalance in Premiere in
453
- minutes. Picture-only MP4 alongside.
454
- 6. The user picks and judges sounds by ear; Claude says plainly that it cannot hear and asks for
455
- timecoded audio notes on the first draft.
456
-
433
+ ## Audio standard (audio is half the reel — the user will not accept a bad mix)
434
+
435
+ What went wrong on an early video: the voice itself was bit-for-bit intact (measured against the source),
436
+ but 2.3–3.5s whoosh files and a 2.4s riser kept playing UNDER the speech, which made the voice sound
437
+ wrong. Claude cannot hear, so the mix must be engineered and measured, never guessed.
438
+
439
+ 1. **The voice is never touched.** Render the picture `--muted`. The voice in every deliverable is the
440
+ original recording's audio (stream-copied, or at most one encode), plus only a single gain change.
441
+ No limiter, no dynamic normaliser (ffmpeg `loudnorm` single-pass pumps), no repeated AAC encodes.
442
+ 2. **Sound effects are short and placed in gaps.** Trim every SFX to what the motion needs (whoosh
443
+ 0.4–0.8s, hits 0.3–0.6s) with a 60–120ms fade-out. Nothing longer than ~0.8s may sit under a spoken
444
+ word unless it is at least 24 dB under the voice. Risers go in pauses, not under speech.
445
+ 3. **Duck SFX under the voice**: mix with ffmpeg `sidechaincompress` keyed from the voice (SFX drop
446
+ ~6 dB while a word is spoken), and high-pass whooshes/impacts around 120–150 Hz so they don't muddy it.
447
+ 4. **Measure before delivering** (the window scan in the project folder used `f32le` PCM from ffmpeg):
448
+ voice-vs-mix difference per 0.5s window — any window where SFX energy is within 12 dB of the
449
+ voice while a word is spoken gets fixed. Final: -14 LUFS integrated, true peak <= -1 dBTP, one
450
+ AAC encode at 256k.
451
+ 5. **Always also deliver stems + a cue sheet**: `voice.wav`, `sfx.wav` (the placed, trimmed SFX bus),
452
+ and `SFX-CUES.txt` with numbered, timecoded SFX files — so the user can rebalance in Premiere in
453
+ minutes. Picture-only MP4 alongside.
454
+ 6. The user picks and judges sounds by ear; Claude says plainly that it cannot hear and asks for
455
+ timecoded audio notes on the first draft.
456
+
457
457
  ---
458
458
 
459
- ## Verification (required before saying anything is done)
460
-
461
- Claude cannot watch video. Quality is checked with frames and maths, and the user makes the
462
- final call at playback speed. Be explicit about that when reporting.
463
-
464
- 1. `npm run check` passes.
465
- 2. `npm run motion-check -- <Comp> --scale=2` reports **no POP, CUT or STUTTER**. Allow intentional
466
- cuts with `--allow=<frame>`. For each FAST warning, render that frame and confirm the moving
467
- edge is blurred. Read the motion timeline for dead air and rhythm.
468
- 3. Render stills and **look at them**: first frame, each element mid-entrance, peak-speed frames
469
- (blur visible), fully settled (crisp), mid-exit, and the **last frame** (clean).
470
- 4. Check: no text collides with the subject's face, safe zones respected, contrast holds,
471
- no clipped descenders (g, p, y, commas) in masked text.
472
- 5. Report what was verified and what still needs the user's eyes at full speed.
473
-
459
+ ## Verification (required before saying anything is done)
460
+
461
+ Claude cannot watch video. Quality is checked with frames and maths, and the user makes the
462
+ final call at playback speed. Be explicit about that when reporting.
463
+
464
+ 1. `npm run check` passes.
465
+ 2. `npm run motion-check -- <Comp> --scale=2` reports **no POP, CUT or STUTTER**. Allow intentional
466
+ cuts with `--allow=<frame>`. For each FAST warning, render that frame and confirm the moving
467
+ edge is blurred. Read the motion timeline for dead air and rhythm.
468
+ 3. Render stills and **look at them**: first frame, each element mid-entrance, peak-speed frames
469
+ (blur visible), fully settled (crisp), mid-exit, and the **last frame** (clean).
470
+ 4. Check: no text collides with the subject's face, safe zones respected, contrast holds,
471
+ no clipped descenders (g, p, y, commas) in masked text.
472
+ 5. Report what was verified and what still needs the user's eyes at full speed.
473
+
474
474
  ---
475
475
 
476
- ## Remotion gotchas
477
-
478
- - Never use CSS `transition`/`animation` — drive everything from `useCurrentFrame()`.
479
- - Never use `Math.random()` — use `random(seed)` from `remotion`.
480
- - Never use `will-change` (render-tab flicker, see Smoothness system).
481
- - **`<Presence>` owns its element's `transform` and `opacity`.** Any extra transform (centring with
482
- `translateX(-50%)`) or opacity (fading content) passed in `style` is silently overwritten — put it
483
- on an inner wrapper. This bug appeared twice in the first project (off-centre tag, labels that
484
- never faded).
485
- - em-based spacing (gaps, padding) resolves against the element's own font-size: set `fontSize`
486
- on the container, or word gaps collapse.
487
- - Masked text needs travel > 100% and container padding, or descenders stay visible.
488
- - Load fonts through `@remotion/fonts` (brand your display typeface is local in `assets/fonts/`) so renders wait for them.
489
-
476
+ ## Remotion gotchas
477
+
478
+ - Never use CSS `transition`/`animation` — drive everything from `useCurrentFrame()`.
479
+ - Never use `Math.random()` — use `random(seed)` from `remotion`.
480
+ - Never use `will-change` (render-tab flicker, see Smoothness system).
481
+ - **`<Presence>` owns its element's `transform` and `opacity`.** Any extra transform (centring with
482
+ `translateX(-50%)`) or opacity (fading content) passed in `style` is silently overwritten — put it
483
+ on an inner wrapper. This bug appeared twice in the first project (off-centre tag, labels that
484
+ never faded).
485
+ - em-based spacing (gaps, padding) resolves against the element's own font-size: set `fontSize`
486
+ on the container, or word gaps collapse.
487
+ - Masked text needs travel > 100% and container padding, or descenders stay visible.
488
+ - Load fonts through `@remotion/fonts` (brand your display typeface is local in `assets/fonts/`) so renders wait for them.
489
+
490
490
  ---
491
491
 
492
- ## Feedback format from the user
493
-
494
- Notes arrive as timecode + specific issue ("0:14 title lands 3 frames late, bounce too strong").
495
- Translate each note into token or timing changes; if a note conflicts with a law, say so and ask.
496
-
492
+ ## Feedback format from the user
493
+
494
+ Notes arrive as timecode + specific issue ("0:14 title lands 3 frames late, bounce too strong").
495
+ Translate each note into token or timing changes; if a note conflicts with a law, say so and ask.
496
+
497
497
  ---
498
498
 
499
499
  ## What is already installed
@@ -541,3 +541,21 @@ and add its name to `templates/BRIEF.md` so it can be asked for by name next tim
541
541
  The studio gets updates. When new components, scripts or rules ship, run `editing_os_update`
542
542
  and they are written into this project alongside your own work, which is never touched.
543
543
 
544
+ ## Updating the studio
545
+
546
+ New effects, fixes and rules ship as releases. The studio's release is in `.studio.json`. To update,
547
+ run this inside the studio folder — add `--dry-run` first to see what it would do:
548
+
549
+ ```bash
550
+ npx creator-editing-studio@latest update
551
+ ```
552
+
553
+ It never touches `src/design/tokens.ts`, your videos or your footage. Every other file is sorted:
554
+ files you never edited are replaced, files you edited are kept, and a file that both you and the
555
+ release changed is left exactly as it is, with the new version saved beside it in `.studio-update/`.
556
+ Merge those keeping your changes, delete `.studio-update/`, then `npm install` if `package.json`
557
+ changed, and `npm run check`.
558
+
559
+ Do not update by copying files across or comparing them by eye. The command knows every version of
560
+ every file ever shipped, which is the only way to tell your edit from an older release.
561
+