@slatesvideo/shared 0.7.7 → 0.7.8

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 (121) hide show
  1. package/README.md +3 -6
  2. package/dist/analytics/events.d.ts +1 -1
  3. package/dist/analytics/events.js +7 -0
  4. package/dist/auth.d.ts +2 -0
  5. package/dist/auth.js +5 -0
  6. package/dist/clients/cloud.d.ts +2 -0
  7. package/dist/clients/cloud.js +5 -1
  8. package/dist/index.d.ts +7 -3
  9. package/dist/index.js +7 -3
  10. package/dist/manual/content.d.ts +1 -1
  11. package/dist/manual/content.js +1 -1
  12. package/dist/operations/index.d.ts +587 -161
  13. package/dist/operations/index.js +663 -57
  14. package/dist/operations/surface.d.ts +2 -2
  15. package/dist/operations/surface.js +18 -5
  16. package/dist/prompts/agent-doctrine.d.ts +12 -2
  17. package/dist/prompts/agent-doctrine.js +56 -28
  18. package/dist/prompts/banned-tokens.js +23 -13
  19. package/dist/prompts/brain.d.ts +29 -0
  20. package/dist/prompts/brain.js +72 -0
  21. package/dist/prompts/craft-cards.d.ts +15 -4
  22. package/dist/prompts/craft-cards.js +71 -9
  23. package/dist/prompts/generation-policy.d.ts +1 -1
  24. package/dist/prompts/guide-discovery.d.ts +6 -6
  25. package/dist/prompts/guide-retrieval.d.ts +7 -1
  26. package/dist/prompts/guide-retrieval.js +33 -5
  27. package/dist/prompts/partials.generated.js +1 -13
  28. package/dist/prompts/shot-grammar.d.ts +1 -1
  29. package/dist/prompts/shot-grammar.js +1 -1
  30. package/dist/skills/brain-check.d.ts +44 -0
  31. package/dist/skills/brain-check.js +172 -0
  32. package/dist/skills/content.d.ts +3 -0
  33. package/dist/skills/content.js +81 -44
  34. package/dist/skills/hyperframes-content.js +4 -4
  35. package/dist/skills/my-brain.d.ts +52 -0
  36. package/dist/skills/my-brain.js +218 -0
  37. package/dist/skills/served.d.ts +52 -0
  38. package/dist/skills/served.js +202 -0
  39. package/package.json +2 -4
  40. package/skills/hyperframes/NOTICE +19 -3
  41. package/skills/hyperframes/SLATES-MAPPING.md +1 -1
  42. package/skills/hyperframes/embedded-captions/CATALOG.md +3 -0
  43. package/skills/hyperframes/embedded-captions/SKILL.md +6 -6
  44. package/skills/hyperframes/embedded-captions/assets/fonts/char-widths.json +227 -1
  45. package/skills/hyperframes/embedded-captions/modes/standard/fonts/build-fonts-css.cjs +19 -2
  46. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/archivo-latin-wdth-italic.woff2 +0 -0
  47. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/archivo-latin-wdth-normal.woff2 +0 -0
  48. package/skills/hyperframes/embedded-captions/scripts/make-theme.cjs +438 -3
  49. package/skills/hyperframes/embedded-captions/scripts/make-theme.test.mjs +1 -0
  50. package/skills/hyperframes/embedded-captions/themes/README.md +26 -1
  51. package/skills/hyperframes/embedded-captions/themes/lesson.json +31 -0
  52. package/skills/slates-start-here.md +78 -0
  53. package/exports/slates-chatgpt-images/generated/SKILL.md +0 -113
  54. package/exports/slates-chatgpt-images/generated/slates-chatgpt-images.skill +0 -0
  55. package/exports/slates-prompt-builder/generated/SKILL.md +0 -71
  56. package/exports/slates-prompt-builder/generated/reference-character.md +0 -92
  57. package/exports/slates-prompt-builder/generated/reference-content-policy.md +0 -81
  58. package/exports/slates-prompt-builder/generated/reference-gpt-image-2-5.md +0 -191
  59. package/exports/slates-prompt-builder/generated/reference-kling.md +0 -295
  60. package/exports/slates-prompt-builder/generated/reference-nano-banana.md +0 -240
  61. package/exports/slates-prompt-builder/generated/reference-omni-flash.md +0 -97
  62. package/exports/slates-prompt-builder/generated/reference-seedance-2-5.md +0 -392
  63. package/exports/slates-prompt-builder/generated/reference-seedance.md +0 -441
  64. package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +0 -133
  65. package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
  66. package/skills/_partials/blender-action-curves.md +0 -24
  67. package/skills/_partials/cinematic-card.md +0 -8
  68. package/skills/_partials/decision-log.md +0 -1
  69. package/skills/_partials/image-defaults.md +0 -9
  70. package/skills/_partials/iteration-diagnosis.md +0 -5
  71. package/skills/_partials/living-performance.md +0 -22
  72. package/skills/_partials/model-routing.md +0 -35
  73. package/skills/_partials/references-read-literally.md +0 -11
  74. package/skills/_partials/seedance-25-timestamps.md +0 -34
  75. package/skills/_partials/sheet-tool-defaults.md +0 -6
  76. package/skills/_partials/still-gate.md +0 -3
  77. package/skills/_partials/thresholds.md +0 -19
  78. package/skills/slates-blocking-to-prompt.md +0 -279
  79. package/skills/slates-camera-language.md +0 -234
  80. package/skills/slates-captions.md +0 -81
  81. package/skills/slates-character-identity.md +0 -117
  82. package/skills/slates-chatgpt-images.md +0 -113
  83. package/skills/slates-cinematic-look.md +0 -237
  84. package/skills/slates-content-policy.md +0 -88
  85. package/skills/slates-cost-discipline.md +0 -150
  86. package/skills/slates-cuts.md +0 -46
  87. package/skills/slates-dialogue-blocking.md +0 -134
  88. package/skills/slates-direct-response-ad.md +0 -26
  89. package/skills/slates-edit-and-iterate.md +0 -76
  90. package/skills/slates-layer-brand-captions.md +0 -87
  91. package/skills/slates-layer-lower-third.md +0 -85
  92. package/skills/slates-layer-title.md +0 -82
  93. package/skills/slates-model-selection.md +0 -129
  94. package/skills/slates-motion.md +0 -57
  95. package/skills/slates-one-prompt-film.md +0 -38
  96. package/skills/slates-previs-blocking.md +0 -186
  97. package/skills/slates-project-organization.md +0 -42
  98. package/skills/slates-prompting-elevenlabs.md +0 -128
  99. package/skills/slates-prompting-flux-3.md +0 -157
  100. package/skills/slates-prompting-gpt-image-2-5.md +0 -196
  101. package/skills/slates-prompting-inworld-tts.md +0 -174
  102. package/skills/slates-prompting-kling-v3.md +0 -303
  103. package/skills/slates-prompting-lip-sync.md +0 -216
  104. package/skills/slates-prompting-ltx-2-5.md +0 -245
  105. package/skills/slates-prompting-minimax-h3.md +0 -383
  106. package/skills/slates-prompting-motion-transfer.md +0 -202
  107. package/skills/slates-prompting-nano-banana-2-1.md +0 -250
  108. package/skills/slates-prompting-omni-flash.md +0 -117
  109. package/skills/slates-prompting-seed-audio.md +0 -168
  110. package/skills/slates-prompting-seedance-2-5.md +0 -420
  111. package/skills/slates-prompting-seedance.md +0 -462
  112. package/skills/slates-prompting-seedream-5-lite.md +0 -122
  113. package/skills/slates-prompting-wan-3.md +0 -143
  114. package/skills/slates-restyle-from-blocking.md +0 -121
  115. package/skills/slates-script-craft.md +0 -45
  116. package/skills/slates-shot-variety.md +0 -24
  117. package/skills/slates-storyboard-from-script.md +0 -32
  118. package/skills/slates-style-prompting.md +0 -56
  119. package/skills/slates-transitions.md +0 -40
  120. package/skills/slates-ugc-influencer-ad.md +0 -32
  121. package/skills/slates-vision-feedback-loop.md +0 -118
@@ -1,134 +0,0 @@
1
- ---
2
- name: slates-dialogue-blocking
3
- description: "Block a multi-character conversation (at a table, in a car, walking) in Blender when seating, eyelines or screen direction must hold across cuts, or generation has lost that continuity. Includes performance and off-screen dialogue direction."
4
- ---
5
-
6
- # Dialogue blocking — six people who stay where you put them
7
-
8
- Use this when fixed seating, eyelines or screen direction across cuts are part of the brief, or when generated shots have lost that continuity. A simple conversation can use ordinary shot and reference direction; 3D blocking is a tool for deterministic geography, not a prerequisite for dialogue.
9
-
10
- ## Why this is hard
11
-
12
- Every cut is an independent guess unless something forces agreement. Prompt a six-person conversation four times and you get four different seating charts: characters swap places, the 180-degree line breaks, and nothing cuts together. The failure is not aesthetic — the shots are simply unusable as an edit, and you find out only after paying for all four.
13
-
14
- **The blocking fixes it structurally.** Positions exist in 3D, so every camera sees the same arrangement, and consistency stops being something the model has to remember.
15
-
16
- ## Build
17
-
18
- When a blocking pass serves the brief, follow `slates-previs-blocking` and add the relevant controls below. The examples show how to prevent observed seating and performance failures; choose controls for the scene rather than requiring every example in every conversation.
19
-
20
- ### Seated proxies, colour-coded
21
-
22
- Simple seated shapes. **Do not animate the heads** — a proxy head turning the wrong way is worse than one that never turns.
23
-
24
- Give each character a distinct viewport colour and write the mapping down. This is the identity channel:
25
-
26
- > red = the boss · green = the kid · blue = the driver · yellow = the fixer · purple = the cousin · cyan = the nephew
27
-
28
- That mapping goes verbatim into the generation prompt. It is what lets the model bind a grey body to a character sheet across four cuts.
29
-
30
- Give every proxy a material and set `mat.diffuse_color` to its identity colour — the blocking render pins Workbench to `MATERIAL` shading, so **the material's `diffuse_color` is what reaches the clip**. Set `object.color` to the same value too, so the user's viewport matches what renders. See `slates-previs-blocking` for the snippet.
31
-
32
- ### Fix the geography, then never move it
33
-
34
- Place people once. Write down who sits where relative to the camera's opening position, in words, because that sentence is going into the prompt:
35
-
36
- > Across the table, facing camera: yellow dead centre, purple far left, blue and green to the right.
37
-
38
- ### The camera plan
39
-
40
- Per `slates-camera-language`, with two things specific to dialogue:
41
-
42
- - **Below shoulder height, slow rail glides** suit the table-conversation register in these examples; higher angles can intentionally read as surveillance. Choose the height and movement that serve the intended performance.
43
- - **Decide who owns the near foreground in each cut and honour it.** A shoulder in frame is a spatial anchor; a different shoulder in the next cut relocates the whole room.
44
-
45
- The move that earns the most: **a gaze handoff without a cut** — the camera keeps gliding while the target hands off across the table, face to face, slowing on each but never stopping. Build it by keyframing the Track To target's position between subjects.
46
-
47
- ### Crossing behind someone
48
-
49
- A head wiping frame during a move is a strong depth cue. It is also a spatial claim, so pick who gets crossed and say so — *the camera crosses directly behind cyan's back mid-shot and his head wipes the frame once.*
50
-
51
- ## The prompt
52
-
53
- Everything in `slates-blocking-to-prompt`, plus these blocks.
54
-
55
- ### Geography — restate it as a rule
56
-
57
- > TABLE GEOGRAPHY — do not deviate: the camera is never parked behind red. Only in the opening seconds does his dark shoulder hang at the near frame RIGHT edge, and it slides out as the camera travels LEFT. The true near-foreground of this shot is cyan: the camera crosses directly behind him mid-shot. After the opening seconds red is gone from the foreground, and the camera never travels behind anyone except cyan.
58
-
59
- ### Screen direction, and the mirror that is not a swap
60
-
61
- The 180-degree rule survives on its own in the blocking. What breaks is the model **"correcting" a legitimate mirror** — when the camera faces back through a scene, sides invert, and that inversion is correct. Say so explicitly or it gets flipped:
62
-
63
- > The driver's seat is on the LEFT for the entire timeline; this layout never mirrors or flips. When a camera faces BACKWARD into the car, screen sides mirror naturally: the driver reads on the RIGHT of frame, the passenger on the LEFT — that is correct left-hand drive, not a swap. They never swap seats or roles anywhere in the timeline.
64
-
65
- Then compress it into the HOLD block: *(backward camera mirrors them: he right of frame, she left)*.
66
-
67
- ### Presence
68
-
69
- > A seated person stays drawn even when partially occluded — in every interior frame some part of each seat's owner is visible: a hand, an arm, a shoulder, a head above the bolster. Every occupied seat visibly holds its person.
70
-
71
- ### Keep everyone alive
72
-
73
- Three orthogonal layers. Without them, whoever is not speaking freezes:
74
-
75
- - **ONGOING BUSINESS** — a small continuous physical action per character, running whether or not they are speaking. *turns his glass a quarter every few seconds · thumbs a lighter without lighting it.*
76
- - **BACKGROUND LIFE** — soft-focus, low contrast, never pulls attention, never crosses in front of a speaking face.
77
- - **SCENE EVENT** — the unnamed thing everyone is playing but nobody says. One line, repeated verbatim in every character's direction: *keep tomorrow sounding like a fishing trip.*
78
-
79
- ### Acting, per character
80
-
81
- Same six slots each. Terse:
82
-
83
- ```
84
- ACTING TASK — <character>
85
- SCENE DIRECTION (shared, unspoken): <the same line for everyone>
86
- MOTIVE (his fuel): <what he wants underneath>
87
- GOAL: <what he wants in this scene>
88
- OBSTACLE: <what is in the way>
89
- TACTIC: <how he goes about it>
90
- Moment to moment: <2-3 beats keyed to timestamps>
91
- (Safety: gaze always engaged in the task — never a frozen, glassy,
92
- unfocused stare; natural blink cadence.)
93
- ```
94
-
95
- That safety line is not filler. Dead eyes are the characteristic failure of generated faces in dialogue, and naming it is what prevents it.
96
-
97
- ### Split any strong emotion into phases
98
-
99
- The other characteristic failure is a face that strikes one extreme expression and holds it for the whole shot — a mouth stuck open for three seconds. Give the beat two phases with a hinge, and name the failure you are excluding:
100
-
101
- > PHASE 1 (17.3-18.6s) — she SCREAMS at him, mouth wide, eyes huge, hand clamped on the grab handle. PHASE 2 (18.6-19.9s) — the scream breaks off: she shuts her eyes tight and CLOSES her mouth, both hands now on the handle, head ducked, braced. Scream, then brace — never one frozen open mouth held through the whole shot.
102
-
103
- The hinge timestamp is what makes it a performance instead of a pose.
104
-
105
- ### Dialogue must not restructure the edit
106
-
107
- When the blocking owns the cut list, include both constraints to prevent dialogue from inventing coverage:
108
-
109
- > DIALOGUE NEVER CREATES SHOTS: spoken lines happen inside the reference's takes exactly as blocked — no cutaways to a speaker, no reverse shots, no added close-ups. If a line plays while the camera is elsewhere, the line stays off-screen audio.
110
-
111
- > OFF-SCREEN VOICES RULE: a line marked off-screen must STAY off-screen — never show the speaker, never move him into frame, never route the camera behind him because he spoke.
112
-
113
- A sentence may cross a cut. Say so where it does: *the sentence does not pause for the edit.*
114
-
115
- ## Model routing
116
-
117
- Dialogue directed as separate layers (voices, scene sound, score) is **minimax-h3**'s seat; it also takes declared reference relationships, which suits a colour-coded cast. seedance-2.5 carries the reference-video capacity. Route per `slates-model-selection` and read the chosen model's prompting skill before writing the audio block.
118
-
119
- ## Checklist
120
-
121
- - [ ] Colour→character mapping written down and pasted into the prompt
122
- - [ ] Heads not animated in the blocking
123
- - [ ] Seating stated as a geography rule
124
- - [ ] Foreground owner named per cut
125
- - [ ] Mirror-is-not-a-swap clause present if any camera faces back through the scene
126
- - [ ] Presence rule present
127
- - [ ] Ongoing business, background life and scene event all specified
128
- - [ ] Acting task per character, safety line included
129
- - [ ] Any strong emotion split into phases with a hinge timestamp
130
- - [ ] Dialogue-never-creates-shots and off-screen-voices rules present
131
-
132
- ## Related
133
-
134
- `slates-previs-blocking` · `slates-camera-language` · `slates-blocking-to-prompt` · `slates-character-identity` (the sheets) · `slates-prompting-minimax-h3`
@@ -1,26 +0,0 @@
1
- ---
2
- name: slates-direct-response-ad
3
- description: "Make a product-led direct-response ad: demonstration, proof, argument and the next action. From an offer and references, in each placement's aspect; not a camera-facing creator ad (slates-ugc-influencer-ad)."
4
- ---
5
-
6
- # Product-led direct response
7
-
8
- Use `slates-script-craft` for the words, evidence and hook/bridge variations. This guide supplies an optional product-led approach. A person can appear; a presenter, fixed duration, fixed frame count or hyper-motion treatment is not required.
9
-
10
- ## Choose the product's job in the picture
11
-
12
- Read the brief and references. Identify the intended audience situation, the supplied claim, what can demonstrate it, and the actual next action. A close product detail, use in context, a visible problem/solution and a final product view are possible ingredients. Omit or reorder any that do not serve the piece.
13
-
14
- For example, a keys tray can interrupt a sliding key, show where it lands, then hold on the result. A quiet demonstration may work without narration. A technical product may need an explanatory exchange. A voiceover or music bed is its own audio take (`slates_list_voices`, `slates_generate_audio`), laid on an audio track of the cut. Keep the product as one Library item so it stays identical across shots (`slates-project-organization`). Do not invent product finishes, guarantees or quantified benefits from a reference picture.
15
-
16
- ## Keep the work editable
17
-
18
- Use the current project unless another destination is requested. Save the script as document text, with non-spoken direction separate. Create shots only for the requested production units and file them into explicit scenes. Alternative openings live beside the shared body as saved versions of a section. Preserve manual edits and reference identity.
19
-
20
- Read the composed requests before any media call. Name the primary placement in the brief and generate in its aspect. Model selection, reference slots, durations, aspect and resolution come from current capabilities and `slates-model-selection`, never a copied ad recipe. Every prompt stays visible on its shot. Saved templates, ad presets among them, are listed by `slates_get_template` with no path, and `slates_import_template` adds one as ordinary editable content without generating. Importing one does not authorize generation.
21
-
22
- ## Production when requested
23
-
24
- Follow `slates-cost-discipline` and the user's authorization for the exact selected requests. Estimate the set through the existing quote operation. An extra stochastic take remains an extra requested take; compatible existing media can be deliberately reused.
25
-
26
- Inspect results against the demonstration and supplied references. A failed job is not authorization for an unchanged reroll. Keep earlier takes accessible. Assemble into an explicitly named cut when comparing variations, tighten it (`slates-cuts`: ripple the hook so something happens in its first frame; `slates-transitions` for a hit on a reveal), inspect playback, and export the selected cuts with their results. For several aspect ratios or hook variants, read `slates_get_prompting_guide` with topic `app-manual` and query `export several cuts` first; formats, framing and export use existing media and generate nothing. `slates-one-prompt-film` covers this delivery task when a finished video is requested.
@@ -1,76 +0,0 @@
1
- ---
2
- name: slates-edit-and-iterate
3
- description: "Refine an existing Slates image or clip with a targeted edit or revised generation. Use for warmer light, removing a figure, reframing, a different look, or fixing a clip that is nearly right; preserve the original and its lineage."
4
- ---
5
-
6
- # Edit and iterate — Slates workflow
7
-
8
- The user already has a generated image in Slates and wants to refine it. The vision-feedback-loop skill defines the general pattern; this skill is the specific recipe for "I have asset X, here's what's wrong with it."
9
-
10
- ## The master rule: an edit is a leaf, not a node
11
-
12
- **Never re-edit an edit. Always go back and re-edit the master.**
13
-
14
- Every edit model silently re-renders the **whole frame**, not just the region you named. So the parts you didn't ask to change come back slightly different every pass — softer texture, drifted colour, mushier fine detail. It is barely visible after one edit and obvious by the second. Chaining edits compounds the damage and there is no way to undo it, because each generation *is* the new source.
15
-
16
- The fix is structural, not a matter of care:
17
-
18
- - **Want two changes?** Make them in ONE edit off the master, or make them as two separate edits **both taken from the master**, then keep whichever you prefer.
19
- - **An edit came back wrong?** Leave the result as it is. Discard it and re-edit the master with a better instruction.
20
- - **Only the changed region is worth keeping?** That is a compositing job — the edit supplies the new region, the untouched master supplies everything else.
21
-
22
- Slates records this: an edit result carries `sourceAssetIds` pointing at the asset it was made from, so **you can tell whether the thing you are about to edit is itself an edit.** Check before you edit — `[Edit]`-prefixed prompts and a populated source lineage both say "this is a leaf; go back to its parent."
23
-
24
- ## Workflow
25
-
26
- ### 1. Pull the current asset back into context
27
- - The user references an asset by id, frame number, or "the latest one."
28
- - Resolve to an asset id (`slates_list_assets` if needed).
29
- - `slates_get_asset_image` with that id to load it inline. **You see the image.**
30
- - `slates_get_asset` shows its recorded prompt, model and source links: read it to see whether the picture is itself an edit.
31
-
32
- ### 2. Identify the delta
33
- The user's request is one of:
34
- - **Surgical** — "remove the second figure", "make the sword red", "swap the background to a bamboo forest".
35
- - **Aesthetic** — "warmer light", "more dramatic", "softer focus".
36
- - **Compositional** — "wider shot", "lower angle", "centered subject".
37
- - **Wholesale** — "actually let's try a totally different look."
38
-
39
- ### 3. Pick the right tool
40
- | Delta type | Approach |
41
- |---|---|
42
- | Surgical | `slates_edit_image` — `sourceAssetId` = the original, `prompt` = the change only ("remove the second figure"), not a re-description of the whole image. |
43
- | Aesthetic (light, colour, mood) on a composition that stays | `slates_edit_image` with the change only. |
44
- | Compositional (wider, lower angle, recentred) | `slates_generate_image` with the original in `referenceAssetIds` + a refined prompt. Don't re-roll from scratch. |
45
- | Wholesale | New prompt, no reference, fresh generation. Treat as a new brief. |
46
-
47
- **`slates_edit_image` shape:** `projectId` + `sourceAssetId` + `prompt` (the edit instruction). Omit `editModel` for the app's Edit seat (the default image model). Every edit model also takes `referenceAssetIds`, up to its reference cap less one: the source is image 1. The result lands as a NEW asset (prompt prefixed `[Edit]`); the source is untouched. Follow the current estimate and returned confirmation gate; an endpoint threshold does not grant consent to spend.
48
-
49
- ### 4. Generate, evaluate, decide
50
- - Estimate cost first.
51
- - After generation, the result is inline. Compare side-by-side with the original (`slates_get_asset_image` again).
52
- - If the delta is correct, rebind where the original was used: the Shot's picture or first frame (`slates_update_shot`), the timeline's chosen clip (`slates_update_frame`), a character identity (`slates_set_character_identity_asset`). A result that landed under the wrong Shot moves with `slates_refile_take`; a take worth keeping as a different look becomes its own Shot with `slates_split_take`.
53
- - If the delta missed: diagnose the visible mismatch, refine the instruction and re-edit the master within the approved request or batch.
54
-
55
- <!-- @inject:iteration-diagnosis -->
56
- ## Diagnose repeated failures
57
-
58
- After three failed attempts at the same requirement, pause unchanged re-rolls and diagnose the source reference, prompt structure, model fit and tool result. Three is a review checkpoint, not a universal limit or proof that the seed cannot matter. Preserve the attempts and name what each test changed.
59
-
60
- Continue autonomously when the brief is clear, a specific correction is supported and the next request is already authorized. Hand control back when taste or intent cannot be inferred, the next request needs fresh consent, or the available tool cannot meet the requirement. A failed roll never authorizes an additional charge. Follow the existing batch and per-request cost policy.
61
- <!-- @end:iteration-diagnosis -->
62
-
63
- ### Clips
64
-
65
- The same recipe holds for video. Look with `slates_get_asset_video_frames`. A clip that is nearly right: `slates_edit_video` with the change only; the result is a new clip linked to its source. A clip longer than the edit model's window: `slates_trim_video` first, then edit the trimmed clip. A revised generation that continues from a clip: `slates_extract_video_frame` at its last frame, used as the next first frame. Before paying for a regeneration of a Shot, `slates_get_shot_inputs` lists finished takes with the same inputs, and `slates_reuse_shot_take` adds one free. Otherwise price it with `slates_get_board_quote` for that Shot (or `slates_estimate_generation_cost`) and show the figure before asking for the OK.
66
-
67
- ### 5. Hand back
68
- - "Asset updated. Frame 3 now uses {new_asset_id}."
69
- - Always note what changed and what didn't, so the user can see the surgery worked: "Lighting shifted to warmer, composition unchanged."
70
-
71
- ## Anti-patterns
72
-
73
- - **Don't** delete the original asset until the user confirms the new one. Slates keeps both; the user picks.
74
- - **Don't** mix surgical and wholesale changes in one regeneration. The user said "make it warmer" — don't also reframe the shot.
75
- - **Don't** re-generate when `slates_edit_image` would work. Edits preserve composition and identity; full regen rolls the dice.
76
- - **Don't** keep re-rolling the same failed edit. Inspect whether the reference, edit instruction or chosen model caused the miss; use the repeated-failure checkpoint above.
@@ -1,87 +0,0 @@
1
- ---
2
- name: slates-layer-brand-captions
3
- description: "Layer preset: bold word-by-word captions with the emphasis words sized up in a two-colour gradient. Use when someone asks for brand captions, punchy short-form captions or captions with big emphasis words; adapt its values to the footage."
4
- ---
5
-
6
- # Brand captions (a layer preset)
7
-
8
- Captions for talking-head shorts: one phrase at a time, each word popping in on the frame it is said, and the words that carry the line drawn larger, heavier and in a two-colour gradient. In Slates every caption, title and graphic is one kind of layer: a composition with declared values (`docs/layer-contract.md` in the desktop repo). This preset is that composition. The app's **Add a layer** gallery applies it in one click with the defaults below; you adapt it to the footage.
9
-
10
- ## Use it
11
-
12
- 1. Transcribe and phrase the speech the way `slates-captions` says (phrases at breaths and clause changes; never split a name or a number from what it counts).
13
- 2. Mark emphasis with `tiers`: about one word in eight, the brand or product name, the number that carries the claim, the payoff. `emphasis` and `slam` words are the ones this preset sizes up; everything else is regular.
14
- 3. Call `slates_add_captions` with `html` set to the composition below (its word list is fed from your phrases and tiers) and `variables` for any value you change.
15
- 4. Look at frames (`slates-vision-feedback-loop`): the phrase must sit clear of faces and of the platform's buttons (**Show safe area**). Move it with the `position` value, not by editing the HTML.
16
-
17
- ## Values it declares
18
-
19
- | Value | Type | Default | What to change it for |
20
- |---|---|---|---|
21
- | `textColor` | color | `#ffffff` | Regular words; keep near white on busy footage |
22
- | `accentA`, `accentB` | color | `#ff3b3b`, `#e6e6e6` | The emphasis gradient: the brand's two colours |
23
- | `size` | number, 3–14 (vmin) | `7` | Regular word size; smaller for long talk, larger for hooks |
24
- | `emphasisScale` | number, 1–2.5 | `1.5` | How much bigger an emphasis word draws |
25
- | `position` | enum `low` / `middle` / `high` | `low` | Off the face and clear of the buttons |
26
- | `uppercase` | boolean | `false` | All caps for a louder hook |
27
-
28
- A person changes these in the Inspector, and you change them with `slates_update_html_clip` (`variables`). Change a value before you change the HTML: a value edit keeps the layer a preset the Inspector can still drive.
29
-
30
- ## The composition
31
-
32
- ```html
33
- <!doctype html>
34
- <html data-composition-variables='[
35
- {"id":"textColor","type":"color","label":"Text colour","default":"#ffffff"},
36
- {"id":"accentA","type":"color","label":"Emphasis colour 1","default":"#ff3b3b"},
37
- {"id":"accentB","type":"color","label":"Emphasis colour 2","default":"#e6e6e6"},
38
- {"id":"size","type":"number","label":"Size","default":7,"min":3,"max":14,"step":0.5,"unit":"vmin"},
39
- {"id":"emphasisScale","type":"number","label":"Emphasis size","default":1.5,"min":1,"max":2.5,"step":0.05},
40
- {"id":"position","type":"enum","label":"Position","default":"low","options":[{"value":"low","label":"Low"},{"value":"middle","label":"Middle"},{"value":"high","label":"High"}]},
41
- {"id":"uppercase","type":"boolean","label":"All caps","default":false}
42
- ]'>
43
- <head>
44
- <meta charset="utf-8">
45
- <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
46
- <style>
47
- #root { position: relative; width: 100%; height: 100%; overflow: hidden; }
48
- .group { position: absolute; left: 6%; right: 6%; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 0.28em; opacity: 0; }
49
- .word { display: inline-block; font-family: system-ui, sans-serif; font-weight: 800; font-size: calc(var(--size) * 1vmin); line-height: 1.12; color: var(--textColor); text-shadow: 0 0.06em 0.22em rgba(0, 0, 0, 0.55); opacity: 0; }
50
- .word.em { font-weight: 900; font-style: italic; font-size: calc(var(--size) * var(--emphasisScale) * 1vmin); padding-right: 0.08em; background: linear-gradient(100deg, var(--accentA), var(--accentB)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0.05em 0.18em rgba(0, 0, 0, 0.5)); }
51
- </style>
52
- </head>
53
- <body>
54
- <div id="root" data-composition-id="brand-captions" data-start="0" data-width="1080" data-height="1920" data-duration="8"></div>
55
- <script>
56
- var WORDS = [{ text: "Captions", start: 0.2, end: 0.6 }, { text: "that", start: 0.6, end: 0.8 }, { text: "land", start: 0.8, end: 1.3 }, { text: "every", start: 1.6, end: 1.9 }, { text: "word", start: 1.9, end: 2.4 }];
57
- var RAW_GROUPS = [[0, 2], [3, 4]];
58
- var KEYWORDS = new Set([2]);
59
- var DURATION = 8;
60
- var vars = window.__hfVariables || {};
61
- var root = document.getElementById('root');
62
- var top = { low: '68%', middle: '44%', high: '16%' }[vars.position] || '68%';
63
- var tl = gsap.timeline({ paused: true });
64
- RAW_GROUPS.forEach(function (range, g) {
65
- var group = document.createElement('div');
66
- group.className = 'group';
67
- group.style.top = top;
68
- root.appendChild(group);
69
- var first = WORDS[range[0]];
70
- var last = WORDS[range[1]];
71
- var next = RAW_GROUPS[g + 1] ? WORDS[RAW_GROUPS[g + 1][0]].start : DURATION;
72
- var end = Math.min(last.end + 0.3, next - 0.05);
73
- tl.set(group, { opacity: 1 }, Math.max(0, first.start - 0.08));
74
- tl.set(group, { opacity: 0 }, Math.max(first.start, end));
75
- for (var i = range[0]; i <= range[1]; i++) {
76
- var span = document.createElement('span');
77
- span.className = KEYWORDS.has(i) ? 'word em' : 'word';
78
- span.textContent = vars.uppercase ? WORDS[i].text.toUpperCase() : WORDS[i].text;
79
- group.appendChild(span);
80
- tl.fromTo(span, { opacity: 0, scale: KEYWORDS.has(i) ? 0.55 : 0.8, y: '0.25em' }, { opacity: 1, scale: 1, y: 0, duration: KEYWORDS.has(i) ? 0.2 : 0.12, ease: 'back.out(2.2)' }, Math.max(0, WORDS[i].start - 0.04));
81
- }
82
- });
83
- window.__timelines['brand-captions'] = tl;
84
- </script>
85
- </body>
86
- </html>
87
- ```
@@ -1,85 +0,0 @@
1
- ---
2
- name: slates-layer-lower-third
3
- description: "Layer preset: a lower third naming who is speaking, a name over a role beside an accent bar, sliding in and out. Use when someone asks for a lower third, a name tag, a speaker label or a credit; adapt its values to the footage."
4
- ---
5
-
6
- # Lower third (a layer preset)
7
-
8
- Who is on screen: a name over their role, beside an accent bar, sliding in from the side and out before the layer ends. In Slates every caption, title and graphic is one kind of layer: a composition with declared values (`docs/layer-contract.md` in the desktop repo). This preset is that composition. The app's **Add a layer** gallery applies it in one click with the defaults below; you adapt it to the footage.
9
-
10
- ## Use it
11
-
12
- 1. Get the name and the role right; ask when you do not know them rather than inventing one.
13
- 2. Add it with `slates_add_html_clip`, `html` set to the composition below and `variables` for `name`, `role` and anything else you change, a second or two after the person first speaks (`startFrame`), holding four to six seconds (`durationSec`).
14
- 3. Look at a frame (`slates-vision-feedback-loop`): it sits on the side away from the face and inside the safe area, above captions when both show.
15
-
16
- ## Values it declares
17
-
18
- | Value | Type | Default | What to change it for |
19
- |---|---|---|---|
20
- | `name` | string | `Name Surname` | Who it is |
21
- | `role` | string | `Role or company` | What they do; empty draws the name alone |
22
- | `textColor` | color | `#ffffff` | The name |
23
- | `accent` | color | `#c8ff00` | The bar |
24
- | `size` | number, 3–10 (vmin) | `5.5` | Name size; the role is two thirds of it |
25
- | `side` | enum `left` / `right` | `left` | Away from the face |
26
- | `height` | number, 50–90 (% from the top) | `72` | Above captions or the platform's buttons |
27
-
28
- People change these in the Inspector; you change them with `slates_update_html_clip` (`variables`).
29
-
30
- ## The composition
31
-
32
- ```html
33
- <!doctype html>
34
- <html data-composition-variables='[
35
- {"id":"name","type":"string","label":"Name","default":"Name Surname","maxLength":80},
36
- {"id":"role","type":"string","label":"Role","default":"Role or company","maxLength":120},
37
- {"id":"textColor","type":"color","label":"Text colour","default":"#ffffff"},
38
- {"id":"accent","type":"color","label":"Accent","default":"#c8ff00"},
39
- {"id":"size","type":"number","label":"Size","default":5.5,"min":3,"max":10,"step":0.25,"unit":"vmin"},
40
- {"id":"side","type":"enum","label":"Side","default":"left","options":[{"value":"left","label":"Left"},{"value":"right","label":"Right"}]},
41
- {"id":"height","type":"number","label":"Height","default":72,"min":50,"max":90,"step":1,"unit":"%"}
42
- ]'>
43
- <head>
44
- <meta charset="utf-8">
45
- <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
46
- <style>
47
- #root { position: relative; width: 100%; height: 100%; overflow: hidden; }
48
- .tag { position: absolute; display: flex; align-items: stretch; gap: calc(var(--size) * 0.4vmin); }
49
- .bar { width: calc(var(--size) * 0.14vmin); background: var(--accent); border-radius: calc(var(--size) * 0.07vmin); }
50
- .text { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--size) * 0.18vmin) 0; }
51
- .name { font-family: system-ui, sans-serif; font-weight: 800; font-size: calc(var(--size) * 1vmin); line-height: 1.05; color: var(--textColor); text-shadow: 0 0.05em 0.25em rgba(0, 0, 0, 0.55); }
52
- .role { font-family: system-ui, sans-serif; font-weight: 500; font-size: calc(var(--size) * 0.66vmin); line-height: 1.2; color: var(--textColor); opacity: 0.82; text-shadow: 0 0.05em 0.25em rgba(0, 0, 0, 0.55); }
53
- </style>
54
- </head>
55
- <body>
56
- <div id="root" data-composition-id="lower-third" data-start="0" data-width="1080" data-height="1920" data-duration="5">
57
- <div class="tag" id="tag">
58
- <div class="bar" id="bar"></div>
59
- <div class="text">
60
- <div class="name" id="name" data-var-text="name">Name Surname</div>
61
- <div class="role" id="role" data-var-text="role">Role or company</div>
62
- </div>
63
- </div>
64
- </div>
65
- <script>
66
- var vars = window.__hfVariables || {};
67
- var root = document.getElementById('root');
68
- var tag = document.getElementById('tag');
69
- var length = Number(root.getAttribute('data-duration')) || 5;
70
- var right = vars.side === 'right';
71
- tag.style.top = (Number(vars.height) || 72) + '%';
72
- tag.style[right ? 'right' : 'left'] = '7%';
73
- if (right) { tag.style.flexDirection = 'row-reverse'; tag.style.textAlign = 'right'; }
74
- if (vars.role === '') document.getElementById('role').style.display = 'none';
75
- var from = right ? '1.2em' : '-1.2em';
76
- var tl = gsap.timeline({ paused: true });
77
- tl.fromTo('#bar', { scaleY: 0 }, { scaleY: 1, duration: 0.3, ease: 'power3.out' }, 0.05);
78
- tl.fromTo(['#name', '#role'], { opacity: 0, x: from }, { opacity: 1, x: 0, duration: 0.45, ease: 'power3.out', stagger: 0.08 }, 0.15);
79
- tl.to(['#name', '#role'], { opacity: 0, x: from, duration: 0.3, ease: 'power2.in', stagger: 0.05 }, Math.max(1, length - 0.45));
80
- tl.to('#bar', { scaleY: 0, duration: 0.25, ease: 'power2.in' }, Math.max(1.1, length - 0.3));
81
- window.__timelines['lower-third'] = tl;
82
- </script>
83
- </body>
84
- </html>
85
- ```
@@ -1,82 +0,0 @@
1
- ---
2
- name: slates-layer-title
3
- description: "Layer preset: a bold title with an optional line under it, rising or slamming in and fading out. Use when someone asks for a title, a hook card, a chapter card or big words on screen; adapt its values to the footage."
4
- ---
5
-
6
- # Title (a layer preset)
7
-
8
- A title over the picture: one bold line, an optional smaller line under it, in on a rise, a slam or a fade, and out before the layer ends. In Slates every caption, title and graphic is one kind of layer: a composition with declared values (`docs/layer-contract.md` in the desktop repo). This preset is that composition. The app's **Add a layer** gallery applies it in one click with the defaults below; you adapt it to the footage.
9
-
10
- ## Use it
11
-
12
- 1. Write the words. A title is a few words that carry the point; the line under it is optional context. No em dashes on screen.
13
- 2. Add it with `slates_add_html_clip`, `html` set to the composition below and `variables` for what you change (at least `title`), at the place it belongs (`startFrame`) and for as long as it should hold (`durationSec`; three to five seconds reads).
14
- 3. Look at a frame (`slates-vision-feedback-loop`): it sits clear of faces and inside the safe area. Move it with `position`, not by editing the HTML.
15
-
16
- ## Values it declares
17
-
18
- | Value | Type | Default | What to change it for |
19
- |---|---|---|---|
20
- | `title` | string | `Your title` | The words |
21
- | `subtitle` | string | empty | A line under it; empty draws none |
22
- | `textColor` | color | `#ffffff` | The title |
23
- | `accent` | color | `#c8ff00` | The rule above the subtitle and the subtitle |
24
- | `size` | number, 4–20 (vmin) | `11` | Title size; the subtitle is a third of it |
25
- | `position` | enum `top` / `center` / `bottom` | `center` | Off the face |
26
- | `entrance` | enum `rise` / `slam` / `fade` | `rise` | Slam for a hook, fade for a quiet card |
27
-
28
- People change these in the Inspector; you change them with `slates_update_html_clip` (`variables`).
29
-
30
- ## The composition
31
-
32
- ```html
33
- <!doctype html>
34
- <html data-composition-variables='[
35
- {"id":"title","type":"string","label":"Title","default":"Your title","maxLength":120},
36
- {"id":"subtitle","type":"string","label":"Line under it","default":"","maxLength":160},
37
- {"id":"textColor","type":"color","label":"Text colour","default":"#ffffff"},
38
- {"id":"accent","type":"color","label":"Accent","default":"#c8ff00"},
39
- {"id":"size","type":"number","label":"Size","default":11,"min":4,"max":20,"step":0.5,"unit":"vmin"},
40
- {"id":"position","type":"enum","label":"Position","default":"center","options":[{"value":"top","label":"Top"},{"value":"center","label":"Centre"},{"value":"bottom","label":"Bottom"}]},
41
- {"id":"entrance","type":"enum","label":"Entrance","default":"rise","options":[{"value":"rise","label":"Rise"},{"value":"slam","label":"Slam"},{"value":"fade","label":"Fade"}]}
42
- ]'>
43
- <head>
44
- <meta charset="utf-8">
45
- <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
46
- <style>
47
- #root { position: relative; width: 100%; height: 100%; overflow: hidden; }
48
- .card { position: absolute; left: 8%; right: 8%; display: flex; flex-direction: column; align-items: center; text-align: center; }
49
- .title { font-family: system-ui, sans-serif; font-weight: 900; font-size: calc(var(--size) * 1vmin); line-height: 1.02; letter-spacing: -0.02em; color: var(--textColor); text-shadow: 0 0.04em 0.3em rgba(0, 0, 0, 0.5); }
50
- .rule { width: calc(var(--size) * 1.6vmin); height: calc(var(--size) * 0.06vmin); margin: calc(var(--size) * 0.28vmin) 0; background: var(--accent); }
51
- .subtitle { font-family: system-ui, sans-serif; font-weight: 600; font-size: calc(var(--size) * 0.34vmin); line-height: 1.2; color: var(--accent); text-shadow: 0 0.05em 0.25em rgba(0, 0, 0, 0.5); }
52
- </style>
53
- </head>
54
- <body>
55
- <div id="root" data-composition-id="title" data-start="0" data-width="1080" data-height="1920" data-duration="4">
56
- <div class="card" id="card">
57
- <div class="title" id="title" data-var-text="title">Your title</div>
58
- <div class="rule" id="rule"></div>
59
- <div class="subtitle" id="subtitle" data-var-text="subtitle"></div>
60
- </div>
61
- </div>
62
- <script>
63
- var vars = window.__hfVariables || {};
64
- var root = document.getElementById('root');
65
- var card = document.getElementById('card');
66
- var length = Number(root.getAttribute('data-duration')) || 4;
67
- var place = { top: { top: '12%' }, center: { top: '50%', transform: 'translateY(-50%)' }, bottom: { bottom: '18%' } }[vars.position] || { top: '50%', transform: 'translateY(-50%)' };
68
- Object.keys(place).forEach(function (k) { card.style[k] = place[k]; });
69
- if (!vars.subtitle) { document.getElementById('rule').style.display = 'none'; document.getElementById('subtitle').style.display = 'none'; }
70
- var tl = gsap.timeline({ paused: true });
71
- var title = document.getElementById('title');
72
- var rest = [document.getElementById('rule'), document.getElementById('subtitle')];
73
- if (vars.entrance === 'slam') tl.fromTo(title, { opacity: 0, scale: 1.6 }, { opacity: 1, scale: 1, duration: 0.28, ease: 'power4.out' }, 0.05);
74
- else if (vars.entrance === 'fade') tl.fromTo(title, { opacity: 0 }, { opacity: 1, duration: 0.5, ease: 'power1.out' }, 0.05);
75
- else tl.fromTo(title, { opacity: 0, y: '0.35em' }, { opacity: 1, y: 0, duration: 0.45, ease: 'power3.out' }, 0.05);
76
- tl.fromTo(rest, { opacity: 0, y: '0.6em' }, { opacity: 1, y: 0, duration: 0.4, ease: 'power3.out', stagger: 0.08 }, 0.3);
77
- tl.to([title].concat(rest), { opacity: 0, duration: 0.3, ease: 'power1.in' }, Math.max(0.8, length - 0.35));
78
- window.__timelines['title'] = tl;
79
- </script>
80
- </body>
81
- </html>
82
- ```