@slatesvideo/shared 0.6.10 → 0.6.11

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.
@@ -1,95 +1,96 @@
1
- ---
2
- name: slates-one-prompt-film
3
- description: Use when the user gives ONE idea and wants a finished video out the other end — "make me a video about X", "turn this idea into an ad", "make a short film from this". The full pipeline: script, project, characters, storyboard, frame images, video generation, timeline assembly, MP4 export. This is the master recipe; the other Slates skills are its sub-steps.
4
- ---
5
-
6
- # One prompt → finished film — Slates master pipeline
7
-
8
- The user gives an idea. You hand back an MP4 on disk. Everything in between is yours, with exactly TWO mandatory user checkpoints: the creative plan, and ONE aggregated cost approval.
9
-
10
- ## The pipeline
11
-
12
- ### 1. Script the beats
13
- Turn the idea into a beat-level script: 4-10 shots, each with subject, action, setting, camera, and duration (4-8s per shot). Surface it as a tight table. Get the user's nod on the plan, format (aspect ratio — 16:9 vs 9:16 decides everything downstream), and rough budget appetite before touching any op.
14
-
15
- 🚨 **Before you fire the set, read its variety counts.** `slates_list_shots` returns the distribution with every listing — shot sizes, camera moves, durations, and any bucket repeating three or more times in a row. Read the table as a COLUMN, not as rows: if push-in is the plurality or every row says wide, the batch is wrong before a credit is spent. The craft is `slates-shot-variety`.
16
-
17
- **Surface a decision log with the plan.**
18
-
19
- <!-- @inject:decision-log -->
20
- When you surface the plan, include a short **decision log** — one line per decision *you* made that the user did not specify **and that no row already records**:
21
-
22
- ```
23
- source phrase or declared default → what you wrote → what it resolves
24
- "in a diner" → warm, and the light is the reason → why the anchor was chosen, not what it is
25
- (no time of day) → late afternoon, low warm key → default; say the word and it changes
26
- ```
27
-
28
- 🚨 **Keep it to what is NOT already data — and almost everything now IS.** A Shot holds the references and their roles, the model, every param, the shot size, the camera, the prop, the action and the spoken line, and `slates_list_shots` reads the whole board back in order with its variety counts. Narrating any of those is retelling a row the user can open. **Write the Shot, and let the log carry only the judgement no field holds** — why this world, why this light, why this register.
29
-
30
- **Hard rule: never silently add weather, props, style, or camera movement.** Four of those are now FIELDS: put the value on the Shot (`prop`, `camera`, `shotSize`, `action`) so the user can read and change it, and put the *reason* in the log only when you invented it rather than being told it. The rule has not softened — it moved from narration into data, which is stronger, because a field can be corrected and a sentence in chat cannot.
31
-
32
- > ❌ **Do NOT turn this into a question gate.** Clarifying questions before optimizing directly fight the locked fast-path rule: *if intent is clear, generate immediately with sane defaults, don't ask questions; only ask for production intent, and batch every question into one message.* Log the decisions, then go. The log is an **output**, not an interrogation — surfaced alongside the plan, never as a separate ceremony, and never as a reason to wait.
33
- <!-- @end:decision-log -->
34
-
35
- A 4-10 shot script is where you invent the most on the user's behalf — time of day, wardrobe, weather, lens feel, camera moves the brief never mentioned. The log is what makes those visible while they are still free to change.
36
-
37
- ### 2. Set up the project
38
- - `slates_create_project` named for the piece.
39
- - Recurring character? Build it properly — `slates_create_character` + the `slates-character-identity` recipe — so every frame references the same identity.
40
- - Recurring location? `slates_create_environment`.
41
- - One-off shots don't need character/environment records; skip the ceremony.
42
-
43
- ### 3. Storyboard skeleton and the Shots (no generation yet)
44
- - `slates_create_storyboard`, `slates_add_scene` per script scene.
45
- - `slates_create_shot` per beat — the prompt, the model, the params and the references, with the roles they carry. **A Shot needs no image**, so the entire film exists as rows before anything is paid for.
46
- - `slates_get_shot` reads one back COMPOSED: the prompt the model will actually receive, its numbered references, and its exact quote. Audit your own work there — you cannot approve something the request will not contain.
47
- - Structure first, spend second — the user catches script problems on the free skeleton, not on burned credits.
48
-
49
- ### 4. ONE aggregated cost approval — then hands-off
50
- The Shots ARE the quote. `slates_generate_from_shots` without `confirm` returns one itemised total for the set plus the largest single item — no hand arithmetic, no `slates_estimate_generation_cost` per call:
51
-
52
- > Plan: 6 frames at 1k 16:9 + 5 × 8s Kling 3.0 std + 1 × 8s Seedance 2 hero shot ≈ N credits total, largest single N. Proceed with the batch?
53
-
54
- Per `slates-cost-discipline` 3b: that single OK authorizes `confirm=true` for **every enumerated call in the batch** — no per-call re-asking. Re-confirm only if a call's price overruns the plan >25% or new calls get added (extra retakes, new shots).
55
-
56
- ### 5. Generate frame images
57
- Fire the image Shots with `slates_generate_from_shots` (`confirm: true` — step 4 authorized it). Slates names each reference inline as "image N"; you never hand-write a role label or a number. Evaluate every result inline against the beat. Bind keepers via `slates_add_frame`, then `slates_update_shot` with `attachFrameId` so the recipe travels with the picture.
58
-
59
- **Multi-take where it matters:** for the hook shot and any shot the whole film hangs on, generate 2-4 variants (cheap model or 1k), pull them back with `slates_get_assets_batch`, pick the strongest on composition + identity, discard the rest. Don't multi-take filler shots.
60
-
61
- ### 6. Generate video per Shot
62
- Fork each bound frame's image Shot with `slates_duplicate_shot` (`model:` the video model — that is the A/B lever the op takes inline), then `slates_update_shot` the copy with `firstFrameAssetId` = the bound frame. Two calls, because `slates_duplicate_shot` forks the prompt, the model and the params; **attachments are changed with `slates_update_shot`.** Then fire the set with `slates_generate_from_shots`.
63
-
64
- ⚠️ **It runs SEQUENTIALLY and blocks until the last clip lands** — a 6-shot film is one long wait, and it will usually outlast the HTTP timeout while the run keeps going. When that happens, poll `slates_get_shot` for each Shot's `generationIds` and then `slates_get_generation_status`; **never re-fire, that double-spends.** (Concurrent batch firing needs a real queue — concurrency limiting, per-item failure isolation, partial-billing semantics — and is deliberately not built yet.)
65
-
66
- **Model mixing — route per `slates-model-selection`** (details in the per-model guides):
67
- - **Kling V3** (`slates-prompting-kling-v3`): the DEFAULT for most shots — 16:9 / 9:16 / 1:1, 3-15s, strong start-frame adherence; std is the workhorse, Omni for multi-character dialogue.
68
- - **Seedance 2** (`slates-prompting-seedance`): the PREMIUM tier — any shot where physics/effects/scale remotely matter, plus the hero shot; audio included, first+last frame guidance, native 4K (4K video is Pro-only).
69
- - **MiniMax H3** (`slates-prompting-minimax-h3`): route here when a shot's SOUND is part of the writing — a line delivered a particular way, scene sound under it, score that must stay outside the characters' world. It authors all three in one pass, which **collapses a shot's audio pass into its video pass** and removes the separate `slates_generate_audio` step for that shot. 5-15s, 480p/768p/2K/4K. Its sibling `minimax-h3-max` is faster, tops out at 768p, takes the same references, and costs MORE at 768p — a deliberate speed pick, never a saving.
70
- - **Veo 3.1** (`slates-prompting-veo-3`): niche, never the default — only when native synced audio must generate WITH the video in one gen; 16:9 or 9:16, 4/6/8s (8s only at 1080p/4K or with reference images).
71
-
72
- Failed gen? The run continues past it and **nothing is retried automatically**. Read the per-Shot error in the result, fix that Shot with `slates_update_shot`, and re-fire only it (a retry beyond the plan = announce the delta cost).
73
-
74
- ### 7. Assemble the timeline
75
- - `slates_get_timeline` once to get the lay of the land.
76
- - `slates_add_clip_to_timeline` for each completed video asset **in story order** — defaults append back-to-back on the first video track, which is exactly an assembly cut.
77
- - Order wrong? `slates_reorder_clips` with the full clip-id list. Dropped a shot? `slates_remove_clip`, then reorder to close the gap.
78
-
79
- ### 8. Export + deliver
80
- - Output path: ask the user, or default to `<slates_get_project_directory>/exports/<name>.mp4`.
81
- - `slates_export_video` (absolute path, `.mp4`; blocks while ffmpeg renders — minutes for long timelines).
82
- - `slates_reveal_file` so the file is literally in front of them.
83
- - Offer the finishing path: `slates_export_timeline_xml` → DaVinci Resolve (File → Import → Timeline) for grading, sound, and titles.
84
-
85
- ### 9. Report
86
- Shots delivered, total spent vs. approved plan, the export path, and the single best next lever ("re-take shot 3 with a tighter prompt" / "add a CTA end-card").
87
-
88
- ## Hard rules
89
-
90
- - **Two checkpoints only.** Creative plan (step 1) and total cost (step 4). Everything else runs without asking — that's the product promise.
91
- - **Skeleton before spend.** Project + storyboard structure are free; generation isn't.
92
- - **Look at everything.** Every image inline, every video via `slates_get_asset_video_frames` if a clip seems off. Never assemble a timeline from clips you haven't evaluated.
93
- - **3-strike rule per shot.** Three failed takes on one shot = stop, show the user what you tried, ask.
94
- - **Consistency comes from references, not luck.** Same identity asset on every character frame; same environment refs across a location's shots.
95
- - **Plan in Shots, not in chat.** Every decision that ends up in a sentence you have to remember is a decision the user cannot see, price, fork or re-fire. A Shot is a row: it survives the conversation, and the user can open it in the app and fix one reference without you.
1
+ ---
2
+ name: slates-one-prompt-film
3
+ description: Use when the user gives ONE idea and wants a finished video out the other end — "make me a video about X", "turn this idea into an ad", "make a short film from this". The full pipeline: script, project, characters, storyboard, frame images, video generation, timeline assembly, MP4 export. This is the master recipe; the other Slates skills are its sub-steps.
4
+ ---
5
+
6
+ # One prompt → finished film — Slates master pipeline
7
+
8
+ The user gives an idea. You hand back an MP4 on disk. Everything in between is yours, with exactly TWO mandatory user checkpoints: the creative plan, and ONE aggregated cost approval.
9
+
10
+ ## The pipeline
11
+
12
+ ### 1. Script the beats
13
+ Turn the idea into a beat-level script: 4-10 shots, each with subject, action, setting, camera, and duration (4-8s per shot). Surface it as a tight table. Get the user's nod on the plan, format (aspect ratio — 16:9 vs 9:16 decides everything downstream), and rough budget appetite before touching any op.
14
+
15
+ 🚨 **Before you fire the set, read its variety counts.** `slates_list_shots` returns the distribution with every listing — shot sizes, camera moves, durations, and any bucket repeating three or more times in a row. Read the table as a COLUMN, not as rows: if push-in is the plurality or every row says wide, the batch is wrong before a credit is spent. The craft is `slates-shot-variety`.
16
+
17
+ **Surface a decision log with the plan.**
18
+
19
+ <!-- @inject:decision-log -->
20
+ When you surface the plan, include a short **decision log** — one line per decision *you* made that the user did not specify **and that no row already records**:
21
+
22
+ ```
23
+ source phrase or declared default → what you wrote → what it resolves
24
+ "in a diner" → warm, and the light is the reason → why the anchor was chosen, not what it is
25
+ (no time of day) → late afternoon, low warm key → default; say the word and it changes
26
+ ```
27
+
28
+ 🚨 **Keep it to what is NOT already data — and almost everything now IS.** A Shot holds the references and their roles, the model, every param, the shot size, the camera, the prop, the action and the spoken line, and `slates_list_shots` reads the whole board back in order with its variety counts. Narrating any of those is retelling a row the user can open. **Write the Shot, and let the log carry only the judgement no field holds** — why this world, why this light, why this register.
29
+
30
+ **Hard rule: never silently add weather, props, style, or camera movement.** Four of those are now FIELDS: put the value on the Shot (`prop`, `camera`, `shotSize`, `action`) so the user can read and change it, and put the *reason* in the log only when you invented it rather than being told it. The rule has not softened — it moved from narration into data, which is stronger, because a field can be corrected and a sentence in chat cannot.
31
+
32
+ > ❌ **Do NOT turn this into a question gate.** Clarifying questions before optimizing directly fight the locked fast-path rule: *if intent is clear, generate immediately with sane defaults, don't ask questions; only ask for production intent, and batch every question into one message.* Log the decisions, then go. The log is an **output**, not an interrogation — surfaced alongside the plan, never as a separate ceremony, and never as a reason to wait.
33
+ <!-- @end:decision-log -->
34
+
35
+ A 4-10 shot script is where you invent the most on the user's behalf — time of day, wardrobe, weather, lens feel, camera moves the brief never mentioned. The log is what makes those visible while they are still free to change.
36
+
37
+ ### 2. Set up the project
38
+ - `slates_create_project` named for the piece.
39
+ - Recurring character? Build it properly — `slates_create_character` + the `slates-character-identity` recipe — so every frame references the same identity.
40
+ - Recurring location? `slates_create_environment`.
41
+ - One-off shots don't need character/environment records; skip the ceremony.
42
+
43
+ ### 3. Storyboard skeleton and the Shots (no generation yet)
44
+ - `slates_create_storyboard`, `slates_add_scene` per script scene.
45
+ - `slates_create_shot` per beat — the prompt, the model, the params and the references, with the roles they carry. **A Shot needs no image**, so the entire film exists as rows before anything is paid for.
46
+ - `slates_get_shot` reads one back COMPOSED: the prompt the model will actually receive, its numbered references, and its exact quote. Audit your own work there — you cannot approve something the request will not contain.
47
+ - Structure first, spend second — the user catches script problems on the free skeleton, not on burned credits.
48
+
49
+ ### 4. ONE aggregated cost approval — then hands-off
50
+ The Shots ARE the quote. `slates_generate_from_shots` without `confirm` returns one itemised total for the set plus the largest single item — no hand arithmetic, no `slates_estimate_generation_cost` per call:
51
+
52
+ > Plan: 6 frames at 1k 16:9 + 5 × 8s Kling 3.0 std + 1 × 8s Seedance 2 hero shot ≈ N credits total, largest single N. Proceed with the batch?
53
+
54
+ Per `slates-cost-discipline` 3b: that single OK authorizes `confirm=true` for **every enumerated call in the batch** — no per-call re-asking. Re-confirm only if a call's price overruns the plan >25% or new calls get added (extra retakes, new shots).
55
+
56
+ ### 5. Generate frame images
57
+ Fire the image Shots with `slates_generate_from_shots` (`confirm: true` — step 4 authorized it). Slates names each reference inline as "image N"; you never hand-write a role label or a number. Evaluate every result inline against the beat. Bind keepers via `slates_add_frame`, then `slates_update_shot` with `attachFrameId` so the recipe travels with the picture.
58
+
59
+ **Multi-take where it matters:** for the hook shot and any shot the whole film hangs on, generate 2-4 variants (cheap model or 1k), pull them back with `slates_get_assets_batch`, pick the strongest on composition + identity, discard the rest. Don't multi-take filler shots.
60
+
61
+ ### 6. Generate video per Shot
62
+ Fork each bound frame's image Shot with `slates_duplicate_shot` (`model:` the video model — that is the A/B lever the op takes inline), then `slates_update_shot` the copy with `firstFrameAssetId` = the bound frame. Two calls, because `slates_duplicate_shot` forks the prompt, the model and the params; **attachments are changed with `slates_update_shot`.** Then fire the set with `slates_generate_from_shots`.
63
+
64
+ ⚠️ **It runs SEQUENTIALLY and blocks until the last clip lands** — a 6-shot film is one long wait, and it will usually outlast the HTTP timeout while the run keeps going. When that happens, poll `slates_get_shot` for each Shot's `generationIds` and then `slates_get_generation_status`; **never re-fire, that double-spends.** (Concurrent batch firing needs a real queue — concurrency limiting, per-item failure isolation, partial-billing semantics — and is deliberately not built yet.)
65
+
66
+ **Model mixing — route per `slates-model-selection`** (details in the per-model guides):
67
+ - **Seedance 2.5** (`slates-prompting-seedance-2-5`): the DEFAULT for most shots — physics, effects, scale and the hero shot; 4-30s takes, 30 image references, timestamps; 480p/720p/1080p, no 4K. LENGTH is the price dial.
68
+ - **Seedance 2** (`slates-prompting-seedance`): the 4K seat, cheaper than 2.5 at every shared resolution; audio included, first+last frame guidance, native 4K (4K video is Pro-only).
69
+ - **Kling V3** (`slates-prompting-kling-v3`): the cost-effective seat — 16:9 / 9:16 / 1:1, 3-15s, strong start-frame adherence; std is the workhorse, Omni for multi-character dialogue.
70
+ - **MiniMax H3** (`slates-prompting-minimax-h3`): route here when a shot's SOUND is part of the writing — a line delivered a particular way, scene sound under it, score that must stay outside the characters' world. It authors all three in one pass, which **collapses a shot's audio pass into its video pass** and removes the separate `slates_generate_audio` step for that shot. 5-15s, 480p/768p/2K/4K. Its sibling `minimax-h3-max` is faster, tops out at 768p, takes the same references, and costs MORE at 768p — a deliberate speed pick, never a saving.
71
+ - **Veo 3.1** (`slates-prompting-veo-3`): niche, never the default — only when native synced audio must generate WITH the video in one gen; 16:9 or 9:16, 4/6/8s (8s only at 1080p/4K or with reference images).
72
+
73
+ Failed gen? The run continues past it and **nothing is retried automatically**. Read the per-Shot error in the result, fix that Shot with `slates_update_shot`, and re-fire only it (a retry beyond the plan = announce the delta cost).
74
+
75
+ ### 7. Assemble the timeline
76
+ - `slates_get_timeline` once to get the lay of the land.
77
+ - `slates_add_clip_to_timeline` for each completed video asset **in story order** — defaults append back-to-back on the first video track, which is exactly an assembly cut.
78
+ - Order wrong? `slates_reorder_clips` with the full clip-id list. Dropped a shot? `slates_remove_clip`, then reorder to close the gap.
79
+
80
+ ### 8. Export + deliver
81
+ - Output path: ask the user, or default to `<slates_get_project_directory>/exports/<name>.mp4`.
82
+ - `slates_export_video` (absolute path, `.mp4`; blocks while ffmpeg renders — minutes for long timelines).
83
+ - `slates_reveal_file` so the file is literally in front of them.
84
+ - Offer the finishing path: `slates_export_timeline_xml` → DaVinci Resolve (File → Import → Timeline) for grading, sound, and titles.
85
+
86
+ ### 9. Report
87
+ Shots delivered, total spent vs. approved plan, the export path, and the single best next lever ("re-take shot 3 with a tighter prompt" / "add a CTA end-card").
88
+
89
+ ## Hard rules
90
+
91
+ - **Two checkpoints only.** Creative plan (step 1) and total cost (step 4). Everything else runs without asking — that's the product promise.
92
+ - **Skeleton before spend.** Project + storyboard structure are free; generation isn't.
93
+ - **Look at everything.** Every image inline, every video via `slates_get_asset_video_frames` if a clip seems off. Never assemble a timeline from clips you haven't evaluated.
94
+ - **3-strike rule per shot.** Three failed takes on one shot = stop, show the user what you tried, ask.
95
+ - **Consistency comes from references, not luck.** Same identity asset on every character frame; same environment refs across a location's shots.
96
+ - **Plan in Shots, not in chat.** Every decision that ends up in a sentence you have to remember is a decision the user cannot see, price, fork or re-fire. A Shot is a row: it survives the conversation, and the user can open it in the app and fix one reference without you.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: slates-prompting-seedance-2-5
3
- description: How to prompt Seedance 2.5 and Seedance 2.5 Edit. Read before calling slates_generate_video with model seedance-2.5, or slates_edit_video with model seedance-2.5-edit. 2.5 is a SECOND SEAT next to 2.0, not an upgrade — it buys 30-second takes, 30 image references, audio-only references and INTEGER-SECOND TIMESTAMPS, and it gives up native 4K and costs more than 2.0 at every resolution they share. Timestamps are the one grammar difference that matters: 2.0 ignores them and answers only to shot numbers, 2.5 acts on them. Otherwise it shares 2.0's grammar (read slates-prompting-seedance for subject binding, camera and constraint vocabulary); this file covers what is different, plus the two hazards unique to 2.5 — the prompt-intent task classifier and the cost trap that comes with 30-second takes.
3
+ description: How to prompt Seedance 2.5 and Seedance 2.5 Edit. Read before calling slates_generate_video with model seedance-2.5, or slates_edit_video with model seedance-2.5-edit. 2.5 is the DEFAULT video model (Eric, 2026-09-13) — against 2.0 it buys 30-second takes, 30 image references, audio-only references and INTEGER-SECOND TIMESTAMPS, and it gives up native 4K and costs more than 2.0 at every resolution they share. Timestamps are the one grammar difference that matters: 2.0 ignores them and answers only to shot numbers, 2.5 acts on them. Otherwise it shares 2.0's grammar (read slates-prompting-seedance for subject binding, camera and constraint vocabulary); this file covers what is different, plus the two hazards unique to 2.5 — the prompt-intent task classifier and the cost trap that comes with 30-second takes.
4
4
  ---
5
5
 
6
6
  # Seedance 2.5 — prompting
@@ -28,7 +28,7 @@ description: How to prompt Seedance 2.5 and Seedance 2.5 Edit. Read before calli
28
28
  - `[0-6] Wide shot, <Subject_1>@<Image_1> crosses an empty car park toward a idling van, slow track right. [6-12] Medium, she stops as the driver's window comes down. [12-18] Close-up, she looks off past the lens and does not answer. Rich details, natural colors. Keep it subtitle-free.`
29
29
  - `[0-10] A single continuous handheld follow behind a courier climbing a fire escape, rain. [10-20] She reaches the landing, turns, and the city opens behind her. Cinematic texture, soft lighting.`
30
30
 
31
- **Hard constraint:** it is the EXPENSIVE seat and it has NO 4K — 480p/720p/1080p only, and dearer than 2.0 at every resolution they share. It is a second seat, never an upgrade. Long takes multiply cost linearly: quote a 30-second take before you fire it.
31
+ **Hard constraint:** it is the default AND the dearer seat, and it has NO 4K — 480p/720p/1080p only, dearer than 2.0 at every resolution they share. Long takes multiply cost linearly: quote a 30-second take before you fire it.
32
32
  <!-- @card:end -->
33
33
 
34
34
  <!-- @banned:start -->
@@ -70,11 +70,10 @@ So 2.5 does not replace 2.0; it sits beside it, and you pay for what it buys:
70
70
  | **Timestamps in the prompt** | **✗ — ignored; shot numbers only** | **✓ — integer seconds, acted on** |
71
71
  | Multi-view image as ONE subject reference | ✗ (not recommended) | **✓ (up to 5 subjects)** |
72
72
  | Video edit as its own task type | ✗ | **✓ (`seedance-2.5-edit`)** |
73
- | Default video model | **yes** | no |
73
+ | Default video model | no | **yes** (since 2026-09-13) |
74
74
 
75
- **Route to 2.5 when the shot needs LENGTH, MANY REFERENCES, or an audio-only reference.
76
- Route to 2.0 when resolution matters at all** — which, for anything a client will see full-screen,
77
- is most of the time.
75
+ **2.5 is the default. Route to 2.0 for 4K delivery, or when the same resolution has to be
76
+ cheaper** — its 720p is $0.15/s against 2.5's $0.231/s.
78
77
 
79
78
  ---
80
79