@slatesvideo/shared 0.5.2 → 0.5.4

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 (37) hide show
  1. package/README.md +18 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +3 -0
  4. package/dist/operations/index.d.ts +25 -0
  5. package/dist/operations/index.js +74 -5
  6. package/dist/prompts/character-sheet.d.ts +24 -12
  7. package/dist/prompts/character-sheet.js +78 -28
  8. package/dist/prompts/environment-sheet.d.ts +9 -1
  9. package/dist/prompts/environment-sheet.js +17 -3
  10. package/dist/prompts/index.d.ts +1 -0
  11. package/dist/prompts/index.js +4 -0
  12. package/dist/prompts/model-facts.js +4 -1
  13. package/dist/prompts/partials.generated.d.ts +2 -0
  14. package/dist/prompts/partials.generated.js +14 -0
  15. package/dist/prompts/prompting-tips.d.ts +23 -0
  16. package/dist/prompts/prompting-tips.js +376 -0
  17. package/dist/prompts/reference-rules.d.ts +43 -14
  18. package/dist/prompts/reference-rules.js +50 -26
  19. package/dist/skills/content.js +12 -12
  20. package/package.json +4 -3
  21. package/skills/_partials/decision-log.md +12 -0
  22. package/skills/_partials/reference-rules-core.md +12 -0
  23. package/skills/_partials/reference-tips-short.md +2 -0
  24. package/skills/_partials/references-read-literally.md +11 -0
  25. package/skills/_partials/still-gate.md +3 -0
  26. package/skills/slates-character-turnaround.md +64 -29
  27. package/skills/slates-cost-discipline.md +10 -0
  28. package/skills/slates-edit-and-iterate.md +16 -1
  29. package/skills/slates-model-selection.md +24 -1
  30. package/skills/slates-one-prompt-film.md +19 -0
  31. package/skills/slates-prompting-flux-2-max.md +36 -5
  32. package/skills/slates-prompting-kling-v3.md +33 -4
  33. package/skills/slates-prompting-nano-banana-2.md +40 -10
  34. package/skills/slates-prompting-seedance.md +284 -85
  35. package/skills/slates-prompting-veo-3.md +33 -4
  36. package/skills/slates-storyboard-from-script.md +19 -0
  37. package/skills/slates-vision-feedback-loop.md +49 -2
@@ -27,18 +27,65 @@ The code is the FORMAL reference. The label is human texture. Use both: `IMG-A12
27
27
 
28
28
  `slates_generate_video`, `slates_generate_motion_transfer`, and `slates_generate_lip_sync` now show you their reference assets **inline** on the confirm response. You don't need to fetch them yourself — but you DO need to look at what comes back, revise the prompt if the references suggest a different motion/framing, and only then re-call with `confirm=true`.
29
29
 
30
+ ## 🔴 The still-gate — never animate a bad frame
31
+
32
+ <!-- @inject:still-gate -->
33
+ **A visible defect in the still is already a STOP.** Do not animate it. Fix the frame first, then move to motion — and go to motion only when the crop passes the still scan and you genuinely need movement to confirm an uncertain edge, reflection, or object.
34
+
35
+ This is a **cost** rule as much as a craft rule: a 1080p/10s premium video generation costs many multiples of an image re-roll, and video is where a defect stops being fixable. Anything wrong in the still gets worse in motion — soft geometry mushes, broken-but-plausible objects fall apart, oily textures start crawling. **Animating a known-bad frame is the single most expensive mistake in the pipeline.** Re-rolling the image is the cheap move; re-rolling the video is not.
36
+ <!-- @end:still-gate -->
37
+
30
38
  ## The pattern
31
39
 
32
40
  1. **Generate.** Call `slates_generate_image` with a prompt. The result is in your context as an image content block.
33
- 2. **Evaluate against the brief.** What did the user actually want? Are the elements right? Composition? Lighting? Subject identity?
41
+ 2. **Evaluate on TWO axes — they are different questions:**
42
+ - **Brief-conformance** — what did the user actually want? Are the elements right? Composition? Lighting? Subject identity?
43
+ - **Defects** — run the slop rubric below. *A frame can match the brief perfectly and still be slop that mushes the moment it moves.* Checking only the first axis is how a bad frame reaches an expensive video call.
34
44
  3. **One of three outcomes:**
35
45
  - **Right** → save it (bind to a frame, character slot, etc.) and move on.
36
- - **Close, but adjustable** → refine the prompt with a specific delta ("wider shot", "warmer light", "remove the second figure"), regenerate **once**.
46
+ - **Close, but adjustable** → refine with a specific delta, regenerate **once**.
37
47
  - **Wrong direction** → ask the user before regenerating. Don't burn credits on prompt-thrashing.
38
48
 
49
+ ## The defect rubric — four slop tells
50
+
51
+ | Tell | What it looks like | Why it matters downstream |
52
+ |---|---|---|
53
+ | **Light with no transitions** | Flat-black pits instead of a shadow ramp; light that stops rather than falls off | Transfers onto every character or object added into that plate later |
54
+ | **Broken-but-plausible objects** | Crates, railings, hardware, mechanisms you can *almost* read but that don't resolve | Turn to mush in motion, and the model multiplies them |
55
+ | **Local logic breaks** | An effect present in only part of the frame — rain scratching one corner, wet ground under one figure | The video model's physical logic breaks along with it |
56
+ | **Oily textures** | Soapy, licked-smooth surfaces that have lost their material identity | Reflections crawl in motion; the plate can't hold continuity |
57
+
58
+ ### Per-model accents — check the one you actually used
59
+
60
+ - **Nano Banana Pro** (`nano-banana-pro`) — ruler-straight symmetry, everything parallel and square, flat even light, pretty but staged/stock, textures reading as 3D render rather than photograph. **It hyperbolizes every edit**: ask for graffiti on one wall and the whole location gets tagged.
61
+ - **GPT Image 2** (`gpt-image-2`) — microcontrast to the ceiling, hard halos on every edge, no depth or bokeh, white balance pulled warm until the frame yellows, plastic licked-smooth materials. Worst tell: **one sickly texture pattern laid over the entire frame**.
62
+
63
+ > ⚠️ These are accents for **`nano-banana-pro`** and **`gpt-image-2`** specifically. `nano-banana-2` is a **different model** (Gemini 3.1 Flash Image vs NB Pro's Gemini 3 Pro Image) and we have **no evidence** about its accent. Do not inherit one — say nothing rather than warn about a failure mode you can't substantiate.
64
+
65
+ ## Where the fault lives — triage before you change anything
66
+
67
+ We say "one specific delta per regeneration" but that only helps once you know *which* variable to move. Diagnose first:
68
+
69
+ | Visible pattern | Diagnosis | Fix |
70
+ |---|---|---|
71
+ | The defect exists in the source asset, or stays tied to the same feature when the direction changes | **Source asset** | Fix the sheet / plate, not the prompt |
72
+ | Source is clean, and the defect changes when only the suspect motion clause changes | **Motion direction** | Fix the prompt |
73
+ | Controls conflict, or the failure follows neither variable | **Inconclusive** | Narrow the test — change less, not more |
74
+
75
+ **Review routes; it is not pass/fail.** Geography melts → fix the location. Identity drifts → fix the character sheet. Assets are sound but the action is wrong → fix the video direction. Wrong idea entirely → reopen the brief with the user.
76
+
77
+ **Correct the earliest broken handoff.** Polishing a downstream symptom hides the source and guarantees it resurfaces in the next shot built from the same asset.
78
+
79
+ ## Baseline hygiene — isolate the variable you're testing
80
+
81
+ When the **character** is the question, keep the location out of it: test on a plate that already holds its own geometry, depth, materials, and light. **A broken plate gives every character failure a second plausible cause**, and you will spend re-rolls deciding which one you're looking at. The same applies in reverse — test a plate empty before you populate it.
82
+
39
83
  ## Refinement rules
40
84
 
41
85
  - **One specific delta per regeneration.** Don't change five things at once — you won't know what helped.
86
+ - **Rewrite the FULL prompt on every iteration — never a diff, never a fragment.** Change one decision, then re-emit the whole prompt so every slot still agrees with every other slot. This composes with the rule above rather than replacing it: *one delta* governs **what changes**, *full rewrite* governs **how you re-emit it**. A patched fragment leaves the old slots stale and silently contradicting the new one.
87
+ - On **Seedance**, a re-emit must keep the `Shot N` structure intact — see `slates-prompting-seedance`.
88
+ - **Exception — Omni Flash Edit.** Long prompts documentedly destroy its fidelity. There the rule inverts: one short instruction plus *"Keep everything else the same."*
42
89
  - **Anchor with references.** If the result drifted from the user's intent, attach the *previous best* generation as a reference image alongside the original brief.
43
90
  - **Use `slates_get_asset_image`** to pull a previously-generated image back into context if you need to compare against a fresh generation.
44
91
  - **Use `slates_edit_image`** for surgical tweaks instead of full regeneration when ~90% of the image is right — `sourceAssetId` = the asset, `prompt` = the change only. Edits preserve composition and identity; full regen rolls the dice. Recipe: `slates-edit-and-iterate`.