@slatesvideo/shared 0.5.3 → 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 (32) hide show
  1. package/README.md +18 -0
  2. package/dist/operations/index.d.ts +1 -0
  3. package/dist/operations/index.js +7 -2
  4. package/dist/prompts/character-sheet.d.ts +24 -12
  5. package/dist/prompts/character-sheet.js +78 -28
  6. package/dist/prompts/environment-sheet.d.ts +9 -1
  7. package/dist/prompts/environment-sheet.js +17 -3
  8. package/dist/prompts/model-facts.js +4 -1
  9. package/dist/prompts/partials.generated.d.ts +2 -0
  10. package/dist/prompts/partials.generated.js +14 -0
  11. package/dist/prompts/prompting-tips.js +49 -18
  12. package/dist/prompts/reference-rules.d.ts +43 -14
  13. package/dist/prompts/reference-rules.js +50 -26
  14. package/dist/skills/content.js +12 -12
  15. package/package.json +4 -3
  16. package/skills/_partials/decision-log.md +12 -0
  17. package/skills/_partials/reference-rules-core.md +12 -0
  18. package/skills/_partials/reference-tips-short.md +2 -0
  19. package/skills/_partials/references-read-literally.md +11 -0
  20. package/skills/_partials/still-gate.md +3 -0
  21. package/skills/slates-character-turnaround.md +64 -29
  22. package/skills/slates-cost-discipline.md +10 -0
  23. package/skills/slates-edit-and-iterate.md +16 -1
  24. package/skills/slates-model-selection.md +24 -1
  25. package/skills/slates-one-prompt-film.md +19 -0
  26. package/skills/slates-prompting-flux-2-max.md +36 -5
  27. package/skills/slates-prompting-kling-v3.md +33 -4
  28. package/skills/slates-prompting-nano-banana-2.md +40 -10
  29. package/skills/slates-prompting-seedance.md +284 -85
  30. package/skills/slates-prompting-veo-3.md +33 -4
  31. package/skills/slates-storyboard-from-script.md +19 -0
  32. package/skills/slates-vision-feedback-loop.md +49 -2
@@ -5,6 +5,10 @@
5
5
  // Source grades: [Eric-test] = Eric's own hands-on result (doctrine-grade);
6
6
  // [community] = multi-guide consensus; [code-verified] = verified against
7
7
  // the slate codebase; [creator-demo] = single creator demonstration.
8
+ // The generated partial store — one entry per skills/_partials/*.md file.
9
+ // Re-exported so consumers can reach any partial, not just the rules block.
10
+ export { PARTIALS } from './partials.generated.js';
11
+ import { PARTIALS } from './partials.generated.js';
8
12
  /**
9
13
  * The 10 verified reference rules. These are the WHY; the fragments below
10
14
  * are the reusable text the templates compose.
@@ -26,8 +30,8 @@ export const REFERENCE_RULES = [
26
30
  },
27
31
  {
28
32
  id: 'identity-name-as-one-entity',
29
- title: 'Attach both sheets — NAME them as one entity, don\'t gate them',
30
- rule: 'Attach BOTH the full-body turnaround (body/proportion/outfit) AND the close-up expression sheet (high-res facial detail). NAME both inline as the SAME subject ("Marcus (images 1 and 2)") — that shared name is what tells the model they are ONE person and stops the varied expressions from averaging the face. Do NOT inject a role essay ("use for identity, ignore the outfit/lighting, render neutral"): the user\'s prompt owns wardrobe, expression, and lighting.',
33
+ title: 'One identity sheet per character — NAME whatever you attach as one entity',
34
+ rule: 'Attach the character\'s single identity sheet (dominant portrait + body panels) rather than a pile of views — fewer competing renderings of a face is always better, because the model cannot tell which is authoritative and averages them. When a character DOES carry a second bound sheet (an explicit expression range, or a legacy turnaround+expression pair), NAME both inline as the SAME subject ("Marcus (images 1 and 2)") — that shared name is what tells the model they are ONE person. Do NOT inject a role essay ("use for identity, ignore the outfit/lighting, render neutral"): the user\'s prompt owns wardrobe, expression, and lighting.',
31
35
  why: 'Naming both images as one entity IS each model\'s OWN official consistency lever — NB2 "assign a distinct name to each character/object"; Seedance "Reference <Subject_N> in <Image_N>"; Kling "reuse a fixed label verbatim". The old heavy role-essay was the OFF-doctrine part: telling the model to "use for identity" while injecting "ignore the outfit" dragged the studio-lit sheet\'s wardrobe + lighting into scenes that explicitly wanted otherwise (the movie-still injection failure). The close-ups still carry far more facial signal (eyes, skin, teeth, bone structure) than a turnaround\'s postage-stamp faces, so attach both — the NAME, not an instruction, is what makes many refs work. The trend is MORE references (video/audio/3D into Seedance-class models), all addressed by name.',
32
36
  grade: 'Eric-test',
33
37
  },
@@ -84,37 +88,57 @@ export const REFERENCE_RULES = [
84
88
  // ── Reusable text fragments (the template-assembly building blocks) ──
85
89
  // These are the exact strings the desktop prompt templates, MCP skills,
86
90
  // and lead-magnet compose. Change a rule HERE and every consumer follows.
87
- /** Flat, even, shadowless identity lighting on a plain neutral background. */
91
+ /** Flat, even, shadowless identity lighting on a deep neutral-grey plate. */
88
92
  export const IDENTITY_LIGHTING = 'flat, even, shadowless lighting';
89
- export const IDENTITY_BACKGROUND = 'a plain neutral-grey background';
93
+ /**
94
+ * The plate value is deliberate, not decorative: **white bleeds into the
95
+ * generated video and washes out the location; black eats edge detail and
96
+ * crushes hair and wardrobe silhouettes.** A deep neutral grey holds both.
97
+ */
98
+ export const IDENTITY_PLATE_HEX = '#3a3a3c';
99
+ export const IDENTITY_BACKGROUND = `a plain, deep neutral-grey background (${IDENTITY_PLATE_HEX})`;
90
100
  export const IDENTITY_LIGHTING_CLAUSE = `Render on ${IDENTITY_BACKGROUND} with ${IDENTITY_LIGHTING} so the sheet captures the character's identity, not scene lighting.`;
101
+ /**
102
+ * Craft clauses every identity reference wants — the eye and skin detail that
103
+ * survives downstream, plus the two "reads literally" guards. Crushed-black
104
+ * irises carry no light information, so eye tone drifts between generations;
105
+ * no catchlight reads as dead eyes; perfect mirroring reads as synthetic and
106
+ * the model PRESERVES that reading; a game-render look gets ANIMATED like game
107
+ * footage. See skills/_partials/references-read-literally.md.
108
+ */
109
+ export const IDENTITY_CRAFT_CLAUSE = 'Crisp catchlights in the eyes and open, readable irises — never crushed to black. ' +
110
+ "Render surface texture at the medium's own natural level of detail — skin, hair and fabric should read as material, not airbrushed or plastic. " +
111
+ 'Break perfect symmetry — avoid a mirrored face or dead-square framing. ' +
112
+ 'Whatever the medium, avoid the over-clean 3D-game-model look.';
91
113
  /** Inherit the source's artistic medium unless told otherwise. */
92
114
  export const INHERIT_SOURCE_STYLE = 'Preserve the artistic medium and visual style of the reference image (photograph, anime, illustration, 3D render, painterly, etc.).';
93
115
  /** Environment plate guidance: one clean, naturally-lit establishing image. */
94
- export const ENVIRONMENT_NATURAL_LIGHT = 'natural, even ambient lighting that reads as the location\'s real light, not a studio setup';
95
- /** One-line summary used as a header in skills + the lead magnet. */
96
- export const REFERENCE_RULES_HEADLINE = 'Identity = a few flat-lit neutral angles; one reference per role, labeled; 2-4 refs not 12; describe environments instead of feeding a grid.';
116
+ export const ENVIRONMENT_NATURAL_LIGHT = 'natural ambient lighting that reads as the location\'s real light, not a studio setup';
97
117
  /**
98
- * Canonical markdown block — the SOURCE OF TRUTH the skill markdown and the
99
- * lead-magnet are reconciled AGAINST. NOTE: nothing imports this yet — the
100
- * skills hand-author their own reference-rule prose and embed-skills.mjs ships
101
- * the raw .md as-is, so a change here must be propagated to the per-model skill
102
- * blocks + lead-magnet by hand until the skill-embed wiring lands (see
103
- * plans/2026-06-25-slates-prompting-system-overhaul.md). The TARGET is to
104
- * inject this text so it can't drift; today it's reconciled manually.
118
+ * One-line summary used as a header in skills + the lead magnet. DERIVED from
119
+ * the partial's opening line — a hand-authored copy here would be a ninth
120
+ * wording of the same rule, which is the thing this whole mechanism exists to
121
+ * stop. Edit `skills/_partials/reference-rules-core.md`.
122
+ */
123
+ export const REFERENCE_RULES_HEADLINE = PARTIALS['reference-rules-core'].split('\n')[0];
124
+ /**
125
+ * Canonical markdown block — the SOURCE OF TRUTH for reference-image doctrine
126
+ * across every Slates surface.
127
+ *
128
+ * ✅ WIRED 2026-07-21. This is no longer hand-reconciled prose. The text lives
129
+ * in `skills/_partials/reference-rules-core.md`; `scripts/sync-partials.mjs`
130
+ * injects it between the `@inject:reference-rules-core` markers in the
131
+ * per-model skills AND emits it here via `partials.generated.ts`. One edit to
132
+ * the partial now moves the markdown skills, this export, the MCP
133
+ * prompting-guide op, the CLI-installed skills, and the Studio Agent together.
134
+ *
135
+ * The build runs `sync-partials.mjs --check`, so a hand-edit inside a marker
136
+ * block fails the build with a diff instead of silently forking.
137
+ *
138
+ * To change reference doctrine: edit `skills/_partials/reference-rules-core.md`.
139
+ * Do NOT edit this file, and do NOT edit between markers in a skill.
105
140
  */
106
141
  export const REFERENCE_RULES_TEXT = `## Reference rules (how to use reference images)
107
142
 
108
- ${REFERENCE_RULES_HEADLINE}
109
-
110
- 1. **2-4 strong references beat both extremes.** Not 1 (warps toward itself), not 12 (averages worse). Start with 2-3 focused refs.
111
- 2. **One reference per ROLE, labeled in the prompt.** Identity / style-grade / environment. The model does not infer roles from order — name each role in the prompt text. Same-role competitors drift.
112
- 3. **Attach both sheets — NAME them as one entity, don't gate them.** Attach the full-body turnaround (body/proportion/outfit) AND the close-up expression sheet (high-res facial detail: eyes, skin, teeth, bone structure). NAME both inline as the same subject ("Marcus (images 1 and 2)") — the shared name tells the model they are ONE person, which is what stops the varied expressions from averaging the face. Do **not** inject a role essay ("use for identity, ignore the outfit/lighting, render neutral") — that drags the studio-lit sheet's wardrobe + lighting into the scene; the user's prompt owns wardrobe, expression, and lighting. Naming-as-one-entity IS each model's official lever (NB2 "assign a distinct name"; Seedance "Reference Subject_N in Image_N"; Kling "reuse a fixed label verbatim"). The trend is MORE references — addressing each by name is what makes many refs work.
113
- 4. **Flat-light identity refs.** Prep identity refs with ${IDENTITY_LIGHTING} on a plain neutral background. Studio-lit / scene-lit sheets bleed their lighting into every generation (the studio-lit sheet → "green-screen-pasted in front of mountains" failure). Reference prep beats prompting here.
114
- 5. **Environment: describe it, don't feed a grid.** Default to describing the location in words. Reserve an environment reference for a mandatory exact-match, and then use ONE clean establishing image with ${ENVIRONMENT_NATURAL_LIGHT} — never a multi-panel grid fed whole.
115
- 6. **Grids: explore, don't input.** Use grids to explore compositions cheaply, then pick a cell. Never feed a grid back in as a reference — cells share a split detail budget and generate jointly, so flaws propagate.
116
- 7. **Reuse the same refs across all shots.** Lock a set and reuse it; swapping refs mid-sequence causes drift.
117
- 8. **Legible in-shot text → bake it into an image start frame, never trust text-to-video.** Animate from the locked frame.
118
- 9. **I2V / own-footage superpower.** Restyle your own clip keeping the performance; delayed-VFX on "video one"; marker-object insertion; video-as-ref for a series. Describe ONLY what changes.
119
- 10. **Style transform by natural language.** Default keeps the source's art style; an optional plain-text instruction transforms it ("anime → real person"). No preset pickers.`;
143
+ ${PARTIALS['reference-rules-core']}`;
120
144
  //# sourceMappingURL=reference-rules.js.map