@slatesvideo/shared 0.5.3 → 0.5.5

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 (45) hide show
  1. package/README.md +31 -0
  2. package/dist/operations/index.d.ts +4 -8
  3. package/dist/operations/index.js +26 -38
  4. package/dist/prompts/character-sheet.d.ts +19 -18
  5. package/dist/prompts/character-sheet.js +84 -38
  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 +50 -19
  12. package/dist/prompts/reference-composer.d.ts +1 -1
  13. package/dist/prompts/reference-composer.js +3 -4
  14. package/dist/prompts/reference-rules.d.ts +43 -14
  15. package/dist/prompts/reference-rules.js +51 -27
  16. package/dist/skills/content.js +14 -14
  17. package/exports/slates-prompt-builder/generated/SKILL.md +59 -0
  18. package/exports/slates-prompt-builder/generated/reference-character.md +78 -0
  19. package/exports/slates-prompt-builder/generated/reference-content-policy.md +75 -0
  20. package/exports/slates-prompt-builder/generated/reference-kling.md +212 -0
  21. package/exports/slates-prompt-builder/generated/reference-nano-banana.md +182 -0
  22. package/exports/slates-prompt-builder/generated/reference-seedance.md +353 -0
  23. package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +79 -0
  24. package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
  25. package/package.json +8 -3
  26. package/skills/_partials/decision-log.md +12 -0
  27. package/skills/_partials/reference-rules-core.md +12 -0
  28. package/skills/_partials/reference-tips-short.md +2 -0
  29. package/skills/_partials/references-read-literally.md +11 -0
  30. package/skills/_partials/still-gate.md +3 -0
  31. package/skills/slates-character-identity.md +100 -0
  32. package/skills/slates-cost-discipline.md +10 -0
  33. package/skills/slates-edit-and-iterate.md +17 -2
  34. package/skills/slates-model-selection.md +24 -1
  35. package/skills/slates-one-prompt-film.md +22 -3
  36. package/skills/slates-prompting-flux-2-max.md +36 -5
  37. package/skills/slates-prompting-gpt-image-2.md +1 -1
  38. package/skills/slates-prompting-kling-v3.md +40 -9
  39. package/skills/slates-prompting-nano-banana-2.md +44 -12
  40. package/skills/slates-prompting-omni-flash.md +1 -1
  41. package/skills/slates-prompting-seedance.md +295 -90
  42. package/skills/slates-prompting-veo-3.md +33 -4
  43. package/skills/slates-storyboard-from-script.md +19 -0
  44. package/skills/slates-vision-feedback-loop.md +49 -2
  45. package/skills/slates-character-turnaround.md +0 -55
@@ -9,11 +9,19 @@
9
9
  // matching entry here in the same pass. Keys are model FAMILIES — the
10
10
  // desktop maps concrete model ids to a family key with its MODEL_REGISTRY
11
11
  // helpers (the runtime truth for ids lives in slate/src/shared/pricing.ts).
12
+ //
13
+ // Cards whose content is ALSO doctrine (not just model trivia) compose their
14
+ // copy from skills/_partials/*.md via PARTIALS rather than restating it. The
15
+ // NANO_BANANA reference card is why: it shipped "label every role" — retired
16
+ // doctrine — for thirteen months after the reversal, in the same package as
17
+ // the rule forbidding it. Hand-sync didn't merely drift, it survived a
18
+ // reversal. Add a short partial; don't hand-copy a rule into a card.
19
+ import { PARTIALS } from './partials.generated.js';
12
20
  const SEEDANCE = {
13
21
  label: 'Seedance 2.0',
14
22
  intro: [
15
- 'Seedance 2.0 wants natural prose with narrative timing beats. Not shot brackets, not bullet points. Audio is always generated alongside video at no extra cost.',
16
- "Follow ByteDance's official 6-step formula: Subject, Action, Environment, Camera, Style, Constraints. Sweet spot 60-150 words for single shots, longer for multi-shot.",
23
+ 'Seedance 2.0 is a multimodal director: it reads your text, images, video and audio at once and splits them into a "spatial layer" (what is in frame) and a "temporal layer" (how it changes). So a good prompt is an engineering-style instruction, not a piece of copywriting. Audio is always generated alongside video at no extra cost.',
24
+ "ByteDance's official advanced formula has 8 slots: precise subject + action details + scene/environment + lighting & color tone + camera movement + visual style + image quality + constraints. Sweet spot 60-150 words for a single shot, longer for multi-shot.",
17
25
  ],
18
26
  columns: [
19
27
  [
@@ -23,37 +31,55 @@ const SEEDANCE = {
23
31
  note: "The first 20-30 words are the identity anchor. If the subject isn't locked in immediately, Seedance will hallucinate new subjects mid-generation.",
24
32
  },
25
33
  {
26
- heading: 'Narrative timing beats',
27
- example: 'At 2 seconds, the camera begins a slow dolly forward. At 4 seconds, the lid opens in slow-motion...',
28
- note: 'Use "At N seconds" — not SHOT brackets. 2 beats for a 5s clip, 3 for 10s, 4-5 for 15s.',
34
+ heading: 'Shot 1 / Shot 2 / Shot 3 — never time stamps',
35
+ example: 'Shot 1: Side shot of the alley; the man slowly starts running.\nShot 2: He knocks over a fruit stand; the camera shakes and cuts to his face.\nShot 3: He climbs a low wall; the camera pulls back onto the empty street.',
36
+ note: 'ByteDance: write a "Shot 1 / Shot 2 / Shot 3" storyboard in the order events occur, then merge it into one prompt. Do NOT write "At 4 seconds" or "0:00–0:03" and do not set per-shot durations — official docs say precise timing is unstable and forcing it "may lead to abnormal generation results." Let the plot set the pacing.',
37
+ critical: true,
29
38
  },
30
39
  {
31
- heading: 'Lighting is the #1 quality lever',
40
+ heading: 'Order inside each shot',
41
+ example: 'camera move → action + expression → position change → audio',
42
+ note: "ByteDance's recommended per-shot order. Lead with the camera (\"slowly push in from a wide shot\", \"fixed camera position\", \"cut to...\"), then what the subject does, then where they end up, then the sound.",
43
+ },
44
+ {
45
+ heading: 'Lighting is a top quality lever',
32
46
  example: 'A cool-white diagonal beam from upper left, dust particles drifting through...',
33
- note: 'ByteDance says lighting has the biggest impact on quality of any prompt element. Describe it before or alongside the subject.',
47
+ note: 'Lighting & color tone has its own slot in the official formula. Describe it before or alongside the subject.',
34
48
  },
35
49
  ],
36
50
  [
37
51
  {
38
- heading: '8 supported camera moves',
39
- example: 'push-in · pull-out · pan · tracking · orbit · aerial · handheld · fixed',
40
- note: 'Use these exact terms. "Dolly in" not "zoom in." "Orbit" not "circle." One primary camera move per beat — never stack them.',
52
+ heading: 'Standard camera terms — including shot size',
53
+ example: 'medium shot · close-up · wide shot · slow push-in · smooth lateral tracking · fixed shot',
54
+ note: 'ByteDance: the model has a strong understanding of camera terminology, so use it directly — this is an open vocabulary, not a fixed list, and shot size counts as camera direction. Only ONE camera movement per shot: asking for push, pull, pan and move at once increases image instability.',
55
+ },
56
+ {
57
+ heading: 'Slow, gentle, continuous movement',
58
+ example: 'slowly raise a hand · quickly turn the head · walk slowly · sit down naturally with the motion',
59
+ note: 'Official rule: name the body part and quantify range, speed and force — and prefer small continuous movement over sprints, big jumps and violent rolls. Slow-motion is supported in natural language; "fast" is a known quality-degrading word.',
41
60
  },
42
61
  {
43
- heading: 'Slow-motion works ("fast" doesn\'t)',
44
- example: 'the lid opens in slow-motion · the blade whips through the air',
45
- note: 'Speed ramps and slow-motion are supported in natural language. Avoid the word "fast" — it\'s ByteDance\'s #1 quality-degrading keyword.',
62
+ heading: 'Externalize emotion',
63
+ example: '❌ she looks very sad\n✅ head lowering, shoulders trembling slightly, eyes reddening, fingers clutching the corner of her clothing',
64
+ note: 'Replace abstract emotion words with the physical detail that shows them. This is the single highest-leverage habit in ByteDance\'s guide — the model renders bodies, not adjectives.',
46
65
  },
47
66
  {
48
67
  heading: 'Separate camera from subject motion',
49
68
  example: 'The earbud rises smoothly. The camera tracks upward.',
50
- note: 'Two different sentences. Mixing them ("the camera speed ramps as the earbud rises") is the #1 cause of shaky, glitchy output.',
69
+ note: 'Two different sentences. Mixing them ("the camera speed ramps as the earbud rises") is a common cause of shaky, glitchy output.',
70
+ },
71
+ {
72
+ heading: 'Multi-character shots — forbid twins',
73
+ example: 'Throughout the video, characters with completely identical appearance, clothing, and accessories are prohibited. Do not generate duplicate avatars or a twin effect.',
74
+ note: 'With several characters in frame, Seedance can render the same person twice. ByteDance\'s fix: bind each character to its image ("Marcus (image 1)"), append that constraint verbatim at the end, and prefer single-person reference photos. Past 4 reference people, stability drops — compose a group still first.',
51
75
  },
52
76
  ],
53
77
  ],
54
78
  footer: [
79
+ 'Quality and constraint slots have their own official vocabulary: ask for "HD, rich details, cinematic texture, natural colors, soft lighting" — not "8K / masterpiece / trending on artstation." Seedance has no negative-prompt field, so constraints go inline: "keep it subtitle-free", "do not generate a logo", "do not generate a watermark".',
55
80
  'Style block at the end: one primary anchor plus 2-3 supporting details. End with "Single continuous take" if you want one shot with no cuts. Never write "no cut" or "seamless transition" — those aren\'t in the training vocabulary.',
56
- 'Multi-modal: up to 9 images + 1 video + audio refs. Reference in prompt with @character, @environment, @audio1. Max length: 4,000 characters.',
81
+ 'Multi-modal: up to 9 images, 3 videos and 3 audio references. Cite them by type and index — "Zhang San@Image 1", or the "Marcus (image 1)" form Slates composes from your @mentions. Never cite an asset ID instead of the image number; the model can\'t associate the two. Max length: 4,000 characters.',
82
+ 'Don\'t cross-pollinate image-model syntax: named lenses, apertures and film stocks ("85mm f/1.4", "Kodak Portra 400") are a Nano Banana lever and a Seedance anti-pattern. Translate them into shot size, depth of field and colour tone instead.',
57
83
  ],
58
84
  };
59
85
  const KLING = {
@@ -186,7 +212,7 @@ const OMNI_FLASH = {
186
212
  [
187
213
  {
188
214
  heading: 'Name references inline',
189
- example: 'Marcus (images 1 and 2) walks into the cafe...',
215
+ example: 'Marcus (image 1) walks into the cafe...',
190
216
  note: 'Up to 7 reference images merge into one list — refer to them by number in the prompt.',
191
217
  },
192
218
  {
@@ -269,6 +295,11 @@ const NANO_BANANA = {
269
295
  example: 'Kodak Portra 400 · Fuji Velvia 50 · Ilford HP5 Plus · CineStill 800T',
270
296
  note: 'Portra = natural skin warmth. Velvia = saturated landscape. HP5 = gritty B&W grain. CineStill 800T = tungsten night with halation. Never mix stocks.',
271
297
  },
298
+ {
299
+ heading: "Don't carry lens + stock into a video prompt",
300
+ example: '85mm f/1.4, Portra 400\n→ close-up, shallow depth of field, warm natural colors, cinematic texture',
301
+ note: 'Lenses, apertures, film stocks and camera bodies are an image-model lever and a video-model anti-pattern — ByteDance\'s Seedance guide never mentions f-stops, lens millimetres, fps or shutter angle. When you animate a frame you made here, translate the look into shot size, depth of field and colour tone instead of pasting the gear list across.',
302
+ },
272
303
  {
273
304
  heading: 'Physics-based lighting',
274
305
  example: 'Single key light at 45 degrees from upper left. Color temperature 4500K. Crisp catchlights in the eyes.',
@@ -293,9 +324,9 @@ const NANO_BANANA = {
293
324
  note: 'Reframe positively first. Use inline "without" / "free of" only when positive framing can\'t suppress the unwanted element.',
294
325
  },
295
326
  {
296
- heading: 'Reference images — label every role',
297
- example: 'Image 1: Character ref — facial features, body proportions\nImage 2: Environment ref — architecture, lighting\nImage 3: Style ref — mood, aesthetic',
298
- note: "Up to 14 refs (10 object + 4 character — caps don't trade). The @ and # mention system labels these automatically. Start with 2-3 focused refs.",
327
+ heading: 'Reference images — name them, never label roles',
328
+ example: 'Marcus (image 1) sits across from the woman (image 2) in the cafe (image 3).',
329
+ note: `Up to 14 refs (10 object + 4 character — caps don't trade). ${PARTIALS['reference-tips-short']}`,
299
330
  },
300
331
  {
301
332
  heading: 'Common fixes',
@@ -14,7 +14,7 @@ export interface ReferenceGroup {
14
14
  /** Display + citation name: 'Marcus' | 'the cafe' | 'noir'. Used verbatim. */
15
15
  name: string;
16
16
  kind: ReferenceKind;
17
- /** A group can carry several images (e.g. turnaround + expression). */
17
+ /** A group can carry several images for workflows that genuinely need them. */
18
18
  media: ReferenceMedia[];
19
19
  }
20
20
  export interface ComposedReferences {
@@ -14,10 +14,9 @@
14
14
  // the desktop generation + rail read from this one function, so the rail's badge
15
15
  // numbers and the prompt's "image N" citations can never desync.
16
16
  //
17
- // Naming is the ONLY identity signal. Citing both of a subject's images as the
18
- // SAME name ("Marcus (images 1 and 2)") tells the model they are ONE entity —
19
- // which is what prevents a multi-image bucket from averaging into a blended
20
- // face. This IS each model's own official consistency lever (NB2 "assign a
17
+ // Naming is the identity signal. Citing the canonical subject image inline
18
+ // ("Marcus (image 1)") tells the model which reference owns that entity. This
19
+ // is each model's own official consistency lever (NB2 "assign a
21
20
  // distinct name", Seedance "Reference Subject_N in Image_N", Kling "reuse a fixed
22
21
  // label verbatim"); the heavy role-essay block was the off-doctrine part.
23
22
  // Normalize a name/token for matching: drop the sigil, lowercase, strip
@@ -1,3 +1,4 @@
1
+ export { PARTIALS } from './partials.generated.js';
1
2
  export type SourceGrade = 'Eric-test' | 'community' | 'code-verified' | 'creator-demo';
2
3
  export interface ReferenceRule {
3
4
  id: string;
@@ -11,24 +12,52 @@ export interface ReferenceRule {
11
12
  * are the reusable text the templates compose.
12
13
  */
13
14
  export declare const REFERENCE_RULES: ReferenceRule[];
14
- /** Flat, even, shadowless identity lighting on a plain neutral background. */
15
+ /** Flat, even, shadowless identity lighting on a deep neutral-grey plate. */
15
16
  export declare const IDENTITY_LIGHTING = "flat, even, shadowless lighting";
16
- export declare const IDENTITY_BACKGROUND = "a plain neutral-grey background";
17
- export declare const IDENTITY_LIGHTING_CLAUSE = "Render on a plain neutral-grey background with flat, even, shadowless lighting so the sheet captures the character's identity, not scene lighting.";
17
+ /**
18
+ * The plate value is deliberate, not decorative: **white bleeds into the
19
+ * generated video and washes out the location; black eats edge detail and
20
+ * crushes hair and wardrobe silhouettes.** A deep neutral grey holds both.
21
+ */
22
+ export declare const IDENTITY_PLATE_HEX = "#3a3a3c";
23
+ export declare const IDENTITY_BACKGROUND = "a plain, deep neutral-grey background (#3a3a3c)";
24
+ export declare const IDENTITY_LIGHTING_CLAUSE = "Render on a plain, deep neutral-grey background (#3a3a3c) with flat, even, shadowless lighting so the sheet captures the character's identity, not scene lighting.";
25
+ /**
26
+ * Craft clauses every identity reference wants — the eye and skin detail that
27
+ * survives downstream, plus the two "reads literally" guards. Crushed-black
28
+ * irises carry no light information, so eye tone drifts between generations;
29
+ * no catchlight reads as dead eyes; perfect mirroring reads as synthetic and
30
+ * the model PRESERVES that reading; a game-render look gets ANIMATED like game
31
+ * footage. See skills/_partials/references-read-literally.md.
32
+ */
33
+ export declare const IDENTITY_CRAFT_CLAUSE: string;
18
34
  /** Inherit the source's artistic medium unless told otherwise. */
19
35
  export declare const INHERIT_SOURCE_STYLE = "Preserve the artistic medium and visual style of the reference image (photograph, anime, illustration, 3D render, painterly, etc.).";
20
36
  /** Environment plate guidance: one clean, naturally-lit establishing image. */
21
- export declare const ENVIRONMENT_NATURAL_LIGHT = "natural, even ambient lighting that reads as the location's real light, not a studio setup";
22
- /** One-line summary used as a header in skills + the lead magnet. */
23
- export declare 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.";
37
+ export declare const ENVIRONMENT_NATURAL_LIGHT = "natural ambient lighting that reads as the location's real light, not a studio setup";
38
+ /**
39
+ * One-line summary used as a header in skills + the lead magnet. DERIVED from
40
+ * the partial's opening line — a hand-authored copy here would be a ninth
41
+ * wording of the same rule, which is the thing this whole mechanism exists to
42
+ * stop. Edit `skills/_partials/reference-rules-core.md`.
43
+ */
44
+ export declare const REFERENCE_RULES_HEADLINE: string;
24
45
  /**
25
- * Canonical markdown block — the SOURCE OF TRUTH the skill markdown and the
26
- * lead-magnet are reconciled AGAINST. NOTE: nothing imports this yet — the
27
- * skills hand-author their own reference-rule prose and embed-skills.mjs ships
28
- * the raw .md as-is, so a change here must be propagated to the per-model skill
29
- * blocks + lead-magnet by hand until the skill-embed wiring lands (see
30
- * plans/2026-06-25-slates-prompting-system-overhaul.md). The TARGET is to
31
- * inject this text so it can't drift; today it's reconciled manually.
46
+ * Canonical markdown block — the SOURCE OF TRUTH for reference-image doctrine
47
+ * across every Slates surface.
48
+ *
49
+ * ✅ WIRED 2026-07-21. This is no longer hand-reconciled prose. The text lives
50
+ * in `skills/_partials/reference-rules-core.md`; `scripts/sync-partials.mjs`
51
+ * injects it between the `@inject:reference-rules-core` markers in the
52
+ * per-model skills AND emits it here via `partials.generated.ts`. One edit to
53
+ * the partial now moves the markdown skills, this export, the MCP
54
+ * prompting-guide op, the CLI-installed skills, and the Studio Agent together.
55
+ *
56
+ * The build runs `sync-partials.mjs --check`, so a hand-edit inside a marker
57
+ * block fails the build with a diff instead of silently forking.
58
+ *
59
+ * To change reference doctrine: edit `skills/_partials/reference-rules-core.md`.
60
+ * Do NOT edit this file, and do NOT edit between markers in a skill.
32
61
  */
33
- export declare const REFERENCE_RULES_TEXT = "## Reference rules (how to use reference images)\n\nIdentity = a few flat-lit neutral angles; one reference per role, labeled; 2-4 refs not 12; describe environments instead of feeding a grid.\n\n1. **2-4 strong references beat both extremes.** Not 1 (warps toward itself), not 12 (averages worse). Start with 2-3 focused refs.\n2. **One reference per ROLE, labeled in the prompt.** Identity / style-grade / environment. The model does not infer roles from order \u2014 name each role in the prompt text. Same-role competitors drift.\n3. **Attach both sheets \u2014 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)\") \u2014 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\") \u2014 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 \u2014 addressing each by name is what makes many refs work.\n4. **Flat-light identity refs.** Prep identity refs with flat, even, shadowless lighting on a plain neutral background. Studio-lit / scene-lit sheets bleed their lighting into every generation (the studio-lit sheet \u2192 \"green-screen-pasted in front of mountains\" failure). Reference prep beats prompting here.\n5. **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 natural, even ambient lighting that reads as the location's real light, not a studio setup \u2014 never a multi-panel grid fed whole.\n6. **Grids: explore, don't input.** Use grids to explore compositions cheaply, then pick a cell. Never feed a grid back in as a reference \u2014 cells share a split detail budget and generate jointly, so flaws propagate.\n7. **Reuse the same refs across all shots.** Lock a set and reuse it; swapping refs mid-sequence causes drift.\n8. **Legible in-shot text \u2192 bake it into an image start frame, never trust text-to-video.** Animate from the locked frame.\n9. **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.\n10. **Style transform by natural language.** Default keeps the source's art style; an optional plain-text instruction transforms it (\"anime \u2192 real person\"). No preset pickers.";
62
+ export declare const REFERENCE_RULES_TEXT: string;
34
63
  //# sourceMappingURL=reference-rules.d.ts.map
@@ -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,9 +30,9 @@ 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.',
31
- 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.',
33
+ title: 'One identity sheet per character, named inline',
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 better, because the model cannot tell which is authoritative and averages them. Cite it inline as the subject ("Marcus (image 1)"). Do not inject a role essay ("use for identity, ignore the outfit/lighting, render neutral"): the user\'s prompt owns wardrobe, expression, and lighting.',
35
+ why: 'Distinct inline naming is each model\'s own consistency lever — NB2 "assign a distinct name to each character/object"; Seedance "Reference <Subject_N> in <Image_N>"; Kling "reuse a fixed label verbatim". One canonical identity image removes same-role competition before it starts.',
32
36
  grade: 'Eric-test',
33
37
  },
34
38
  {
@@ -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