@milenyumai/film-kit 2.2.0 → 2.3.0

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 (55) hide show
  1. package/README.md +68 -17
  2. package/build/index.d.ts +1 -1
  3. package/build/lib/cli.js +2 -2
  4. package/build/lib/film-kit.js +6 -4
  5. package/build/lib/storyboard-reference/adapters/kling30.js +3 -1
  6. package/build/lib/storyboard-reference/adapters/seedance20.d.ts +4 -0
  7. package/build/lib/storyboard-reference/adapters/seedance20.js +72 -13
  8. package/build/lib/storyboard-reference/adapters/veo31.js +3 -1
  9. package/build/lib/storyboard-reference/index.d.ts +1 -1
  10. package/build/lib/storyboard-reference/output-writer.js +84 -6
  11. package/build/lib/storyboard-reference/prompt-bundle-builder.js +295 -8
  12. package/build/lib/storyboard-reference/request-normalizer.js +8 -4
  13. package/build/lib/storyboard-reference/storyboard-interpreter.d.ts +3 -1
  14. package/build/lib/storyboard-reference/storyboard-interpreter.js +21 -1
  15. package/build/lib/storyboard-reference/types.d.ts +151 -2
  16. package/build/lib/storyboard-reference/validators.js +2 -5
  17. package/build/lib/templates.js +10 -6
  18. package/content/ARCHITECTURE.md +4 -4
  19. package/content/MASTER.md +2 -2
  20. package/content/RULES.md +4 -4
  21. package/content/agents/prompt-engineer.md +7 -7
  22. package/content/skills/prompt-structure/SKILL.md +14 -11
  23. package/content/skills/reference-locking/SKILL.md +6 -4
  24. package/content/skills/semantic-consistency/SKILL.md +1 -1
  25. package/content/skills/storyboard-reference/SKILL.md +54 -13
  26. package/content/workflows/generate-storyboard.md +37 -16
  27. package/content/workflows/generate.md +7 -7
  28. package/content/workflows/safety-check.md +2 -2
  29. package/package.json +1 -1
  30. package/packages/gpt-image-smart/content/skills/storyboard-reference/SKILL.md +104 -12
  31. package/packages/gpt-image-smart/content/workflows/generate-storyboard.md +89 -12
  32. package/packages/hybrid/content/skills/storyboard-reference/SKILL.md +104 -12
  33. package/packages/hybrid/content/workflows/generate-storyboard.md +89 -12
  34. package/packages/hybrid-smart/content/skills/storyboard-reference/SKILL.md +104 -12
  35. package/packages/hybrid-smart/content/workflows/generate-storyboard.md +89 -12
  36. package/packages/multi/build/cli.js +39 -0
  37. package/packages/multi/build/index.d.ts +1 -1
  38. package/packages/multi/build/lib/configure.js +208 -1
  39. package/packages/multi/build/lib/defaults.d.ts +3 -1
  40. package/packages/multi/build/lib/defaults.js +32 -0
  41. package/packages/multi/build/lib/templates.js +146 -60
  42. package/packages/multi/build/lib/types.d.ts +16 -0
  43. package/packages/multi/content/agents/continuity-editor.md +6 -6
  44. package/packages/multi/content/agents/delivery-editor.md +2 -2
  45. package/packages/multi/content/agents/lead-director.md +18 -10
  46. package/packages/multi/content/agents/semantic-auditor.md +4 -5
  47. package/packages/multi/content/agents/shot-generator.md +9 -27
  48. package/packages/multi/content/skills/storyboard-reference/SKILL.md +104 -12
  49. package/packages/multi/content/workflows/chain-multi.md +4 -4
  50. package/packages/multi/content/workflows/generate-multi.md +6 -6
  51. package/packages/multi/content/workflows/generate-storyboard.md +89 -12
  52. package/packages/multi/content/workflows/generate-teammate.md +8 -14
  53. package/packages/multi/content/workflows/safety-check-multi.md +7 -11
  54. package/packages/studio/content/skills/storyboard-reference/SKILL.md +104 -12
  55. package/packages/studio/content/workflows/generate-storyboard.md +89 -12
@@ -18,10 +18,10 @@ You do not create new scenes unless requested for repair.
18
18
  ## Responsibilities
19
19
 
20
20
  1. verify planned shots exist for every batch
21
- 2. verify SHOT01 ILK FRAME matches `team-plan.json -> batches[0].chain_entry` (first-frame entry validation)
22
- 3. verify cross-batch continuity (`SHOT[N]_END -> SHOT[N+1]_START`)
21
+ 2. verify SHOT01 continuity entry matches `team-plan.json -> batches[0]` (first-frame entry or storyboard handoff validation)
22
+ 3. verify cross-batch continuity (start/end chain or storyboard handoff chain)
23
23
  4. verify continuity notes in `_index.md` match actual files
24
- 5. verify chained `ILK/İLK FRAME` code blocks contain only `Use SHOT[prev]_END as exact first frame`; any competing visual prompt is a chain break blocker
24
+ 5. $SEMANTIC_AUDIT_CONTRACT
25
25
  6. patch continuity text mismatches when safe and deterministic
26
26
  7. verify actual shot count matches `team-plan.json -> shot_sizing.selected_target_shots`
27
27
 
@@ -33,9 +33,9 @@ Write `$OUTPUT_DIR/reports/CONTINUITY-REPORT.md` with this strict structure:
33
33
  # CONTINUITY REPORT
34
34
 
35
35
  - overall_status: pass/fail
36
- - chain_entry_status: pass/fail
37
- - chain_boundary_status: pass/fail
38
- - chained_ilk_frame_status: pass/fail
36
+ - continuity_entry_status: pass/fail
37
+ - continuity_boundary_status: pass/fail
38
+ - reference_mode_contract_status: pass/fail
39
39
  - file_completeness_status: pass/fail
40
40
  - blockers:
41
41
  - none
@@ -21,8 +21,8 @@ You are responsible for final delivery readiness checks.
21
21
  - `team-plan.json` contains top-level `voiceCast`
22
22
  - `team-plan.json` contains top-level `visual_world`
23
23
  - each file follows one-file-per-shot contract
24
- - each shot has ILK/İLK, SON, VIDEO sections with valid code blocks
25
- - chained ILK/İLK FRAME code blocks contain only exact reuse text; competing visual prompts are marked CHAIN BREAK
24
+ - each file follows the active reference-mode shot format
25
+ - $REFERENCE_MODE_CONTRACT
26
26
  - every speaking shot has an `Audio Plan` block with valid `activeSpeakerKey`
27
27
  - when model is `kling-3.0`, VIDEO prompt code blocks start with `[CHARACTER / SUBJECT CONSISTENCY]` and include timing, background, final-frame, and negative prompt blocks
28
28
  - when model is `kling-3.0`, custom storyboard mode never exceeds 4 shots in one video
@@ -47,14 +47,16 @@ Create a machine-readable plan with this shape:
47
47
  "target": "$MODEL",
48
48
  "display": "$MODEL_DISPLAY",
49
49
  "kling_preset": "$KLING_PRESET",
50
- "transition_mode": "start-end"
51
- }
50
+ "transition_mode": "$REFERENCE_MODE"
51
+ },
52
+ "reference_mode": "$REFERENCE_MODE"
52
53
  },
54
+ "storyboard_reference": $STORYBOARD_REFERENCE_POLICY_JSON,
53
55
  "policy": {
54
56
  "dialogue_name_policy": "preserve-original-dialogue",
55
57
  "semantic_contract": {
56
58
  "visual_world_required": true,
57
- "chained_ilk_frame_exact_reuse_only": true,
59
+ "chained_ilk_frame_exact_reuse_only": $CHAINED_ILK_FRAME_EXACT_REUSE_REQUIRED,
58
60
  "scene_specific_avoid_terms_required": true
59
61
  },
60
62
  "spatial_contract": {
@@ -149,7 +151,10 @@ Create a machine-readable plan with this shape:
149
151
  "shot_number": "SHOT01",
150
152
  "audio_type": "dialogue",
151
153
  "active_speaker_key": "kemal",
152
- "voice_cast_binding_required": true
154
+ "voice_cast_binding_required": true,
155
+ "storyboard_continuity_note": "opening action handoff / closing action handoff when storyboard-reference is active",
156
+ "storyboard_phase_budget": "4-6s=1-2, 7-10s=2-3, 11-15s=3-4",
157
+ "continuity_mode": "continuous-shot / multi-shot-storyboard"
153
158
  }
154
159
  ],
155
160
  "support_agents": [
@@ -197,6 +202,10 @@ Create a machine-readable plan with this shape:
197
202
  Keep top-level `voiceCast` stable and require every speaking shot to bind back to it.
198
203
  `team-plan.json` is also the authoritative scene-level visual package. Keep top-level `visual_world` stable unless a shot declares `CHAIN BREAK - [reason]` and documents the new world.
199
204
 
205
+ ## Reference Mode Contract
206
+
207
+ $REFERENCE_MODE_CONTRACT
208
+
200
209
  ## Shot Count Direction (Before Team Sizing)
201
210
 
202
211
  Use `.agent/skills/director-shot-sizing/SKILL.md` before you choose teammate count or batch map.
@@ -236,7 +245,7 @@ BATCH ID: B[NN]
236
245
  YOUR BATCH: SHOT[X] through SHOT[Y]
237
246
  OUTPUT DIR: $OUTPUT_DIR/shots/
238
247
  REPORT FILE: $OUTPUT_DIR/reports/BATCH-REPORT-B[NN].md
239
- CHAIN ENTRY FRAME: [exact description]
248
+ CHAIN ENTRY FRAME / STORYBOARD ENTRY HANDOFF: [exact chain entry or storyboard handoff description]
240
249
  SPATIAL PRIORITY: [who looks at what, which plane dominates, shared light source]
241
250
  SEMANTIC WORLD: [visual_world camera height, lens family, horizon/vanishing logic, camera movement strategy, light source, shadow direction, scale map, reflection risk, physics constraints]
242
251
 
@@ -249,14 +258,13 @@ RULES:
249
258
  - One active speaker per shot
250
259
  - ONE FILE PER SHOT (SHOTNN.md includes coverage)
251
260
  - Do not add or remove shot files beyond the planned range
252
- - ILK/İLK FRAME section must include a fenced code block even when chained
253
- - Chained ILK/İLK FRAME code block must contain only `Use SHOT[prev]_END as exact first frame`; a new visual prompt requires `CHAIN BREAK`
254
261
  - Follow `team-plan.json -> visual_world` for perspective/geometry, shadow vector, scale, reflection, physics, anatomy risk, foreground/background coherence, and targeted semantic avoid terms
262
+ - $REFERENCE_MODE_CONTRACT
255
263
  - If model is kling-3.0: enforce route metadata + `AUDIO PLAN` outside the prompt code block and professional Kling blocks from `[CHARACTER / SUBJECT CONSISTENCY]` through `[NEGATIVE PROMPT]`
256
264
  - If model is kling-3.0: require shot time ranges, `[TIMING RULES]`, `[BACKGROUND RULES]`, `[FINAL FRAME PRIORITY]`, stable background, and no warping
257
265
  - If model is kling-3.0: default to `single-transition`; use custom storyboard only for 2-4 meaningful phases, max 4 custom shots
258
- - If model is seedance-2.0: require explicit multimodal role assignment when references exist (`@image1`, `@video1`, `@audio1`)
259
- - If model is seedance-2.0: default to `No scene cuts throughout, one continuous shot.` unless the beat truly needs phased timing
266
+ - If model is seedance-2.0: require explicit multimodal role assignment when references exist (`@Image1`/`@image1`, `@video1`, `@audio1`)
267
+ - If model is seedance-2.0: follow the active Seedance storyboard/continuity contract in `.agent/model-profile.md`
260
268
  - If model is seedance-2.0: separate identity reference from action/camera reference whenever different materials are used
261
269
  - If model is seedance-2.0: use extension syntax when continuing a source clip (`Extend @video1 by [N]s`)
262
270
  - Never convert one glance, one micro gesture, or one tiny prop action into separate Kling storyboard beats
@@ -275,7 +283,7 @@ After all shot teammates finish, run specialist checks:
275
283
  4. `dialogue-auditor`: verify dialogue tone consistency, `voiceCast` binding, audioPlan completeness, SFX accuracy, audio direction completeness, and music policy
276
284
  5. `character-consistency-auditor`: verify character description consistency and anonymous identity stability across shots
277
285
  6. `color-continuity-auditor`: verify lighting direction and color temperature consistency across shots within the same scene
278
- 7. `semantic-auditor`: verify `visual_world`, perspective/geometry, shadow vector, scale map, reflections, physics/anatomy, foreground/background coherence, contextual contradictions, targeted avoid terms, and chained ILK reuse
286
+ 7. `semantic-auditor`: verify `visual_world`, perspective/geometry, shadow vector, scale map, reflections, physics/anatomy, foreground/background coherence, contextual contradictions, targeted avoid terms, and the active continuity contract
279
287
  8. `pacing-auditor`: verify shot sequence rhythm, tempo variety, and dramatic arc alignment
280
288
  9. `delivery-editor`: verify packaging completeness and final summary readiness
281
289
 
@@ -26,15 +26,14 @@ Reject the package if any item fails:
26
26
  - Foreground and background share perspective, lighting, color temperature, and style.
27
27
  - Contextual contradictions are absent or explicitly justified.
28
28
  - Reference-visible face, hair, skin, body proportions, wardrobe, accessories, and prop design do not drift when a reference exists.
29
- - Start/end pairs keep the declared invariants and change only one major semantic beat unless `CHAIN BREAK` is declared.
30
29
  - Avoid lines include scene-specific semantic failure modes.
31
- - Chained `ILK/İLK FRAME` code blocks contain only `Use SHOT[prev]_END as exact first frame`; any competing visual prompt is a fail and must become `CHAIN BREAK`.
30
+ $SEMANTIC_AUDIT_CONTRACT
32
31
  - When model is `kling-3.0`, `AUDIO PLAN` and route metadata remain outside the prompt code block.
33
32
  - When model is `kling-3.0`, the VIDEO prompt code block starts with `[CHARACTER / SUBJECT CONSISTENCY]` and includes `[CORE INTENT]`, `[TOTAL DURATION]`, `[VISUAL STYLE]`, `[CAMERA]`, `[SHOT N | time range]`, `[AUDIO]`, `[TIMING RULES]`, `[BACKGROUND RULES]`, `[FINAL FRAME PRIORITY]`, and `[NEGATIVE PROMPT]`.
34
33
  - When model is `kling-3.0` and custom storyboard is used, there are no more than 4 custom shots; 5+ phases are split into chained videos.
35
34
  - Kling custom storyboard shots include time ranges, one main job, subject action, camera behavior, background behavior, and handoff/final-frame trigger.
36
35
  - When model is `seedance-2.0`, material roles are explicit when references are used and identity references are separated from camera/action references when needed.
37
- - When model is `seedance-2.0`, uninterrupted beats explicitly declare `No scene cuts throughout, one continuous shot.` unless phased timing is justified.
36
+ - When model is `seedance-2.0`, uninterrupted beats explicitly declare `No scene cuts throughout, one continuous shot.`; multi-phase storyboard beats declare planned phase transitions instead.
38
37
  - When model is `seedance-2.0`, clip continuations use `Extend @video1 by [N]s` syntax instead of silently reframing the same beat as a new cut.
39
38
 
40
39
  ## Allowed Fixes
@@ -52,7 +51,7 @@ Write `$OUTPUT_DIR/reports/SEMANTIC-REPORT.md` with this strict structure:
52
51
  - overall_status: pass/fail
53
52
  - visual_world_status: pass/fail
54
53
  - reference_drift_status: pass/fail
55
- - start_end_contract_status: pass/fail
54
+ - $SEMANTIC_REFERENCE_MODE_STATUS_FIELD: pass/fail
56
55
  - perspective_geometry_status: pass/fail
57
56
  - shadow_vector_status: pass/fail
58
57
  - scale_depth_status: pass/fail
@@ -60,7 +59,7 @@ Write `$OUTPUT_DIR/reports/SEMANTIC-REPORT.md` with this strict structure:
60
59
  - anatomy_physics_status: pass/fail
61
60
  - foreground_background_status: pass/fail
62
61
  - contextual_contradiction_status: pass/fail
63
- - chained_ilk_frame_status: pass/fail
62
+ - $SEMANTIC_CONTINUITY_STATUS_FIELD: pass/fail
64
63
  - avoid_terms_status: pass/fail
65
64
  - kling_prompt_structure_status: pass/fail/not_applicable
66
65
  - blockers: [none or list]
@@ -24,7 +24,7 @@ Your assignment must include:
24
24
 
25
25
  - `BATCH ID` (example: `B03`)
26
26
  - shot range (`SHOT09` through `SHOT12`)
27
- - chain entry frame description
27
+ - chain entry frame or storyboard entry handoff description
28
28
  - semantic world summary from `team-plan.json -> visual_world`
29
29
  - report file path (`$OUTPUT_DIR/reports/BATCH-REPORT-B03.md`)
30
30
 
@@ -38,16 +38,7 @@ For each shot in your batch, write exactly one file:
38
38
 
39
39
  Each shot file must include:
40
40
 
41
- 1. main shot blocks: `ILK FRAME` (or `İLK FRAME`), `SON FRAME`, `AUDIO PLAN`, `VIDEO` (or `VİDEO`)
42
- 2. `ILK/İLK FRAME` section must always include a fenced code block
43
- 3. if chained, first-frame code block must contain only: `Use SHOT[prev]_END as exact first frame`; any new start-frame prompt requires `CHAIN BREAK`
44
- 4. 2-3 coverage sub-shots in the same file
45
- 5. image prompt contract (hard requirement):
46
- - if references exist, `ILK FRAME` and `SON FRAME` must use `REFERENCE LOCK`, `Keep same`, and `Change only`
47
- - face/hair/skin/body/wardrobe/accessories/prop design visible in reference are immutable
48
- - `SON FRAME` must preserve the same visual universe and declare only one major semantic delta
49
- - `VIDEO`: minimum 120 words
50
- - each coverage video prompt: minimum 70 words
41
+ $SHOT_FILE_OUTPUT_CONTRACT
51
42
  6. specificity floor (hard requirement in every prompt):
52
43
  - concrete lens/framing/camera movement
53
44
  - camera movement named from the 24-move cinematic lexicon in `prompt-structure` when movement is present
@@ -75,12 +66,9 @@ Each shot file must include:
75
66
 
76
67
  ## Continuity Rules
77
68
 
78
- - First shot `ILK FRAME` / `İLK FRAME` must match assigned chain entry.
79
- - Chained `ILK FRAME` / `İLK FRAME` code blocks cannot contain a new camera, lens, lighting, action, or composition prompt.
80
- - Within your batch: `SHOT[N]_END` must match `SHOT[N+1]_START`.
81
- - Coverage shots are standalone and not chained.
69
+ $CONTINUITY_CONTRACT
82
70
  - For `kling-3.0`: keep route metadata and `AUDIO PLAN` outside the prompt code block; the prompt code block starts with `[CHARACTER / SUBJECT CONSISTENCY]` and includes timing, background, final-frame, and negative prompt blocks.
83
- - For `seedance-2.0`: declare material roles explicitly when references exist, keep identity references separate from camera/action references, and use continuous-shot wording unless phased timing is required.
71
+ - For `seedance-2.0`: declare material roles explicitly when references exist, keep identity references separate from camera/action references, and use continuous-shot wording only when the shot is truly uninterrupted.
84
72
 
85
73
  ## Kling Multi-Shot Decision
86
74
 
@@ -98,12 +86,7 @@ When model is `kling-3.0`, choose the simplest mode that preserves quality:
98
86
 
99
87
  When model is `seedance-2.0`, keep the shot prompt readable but explicit:
100
88
 
101
- - use `Use @image1 as the first frame of the scene.` when first-frame identity lock matters
102
- - if `@video1` is action reference and `@video2` is camera reference, say so directly
103
- - default to `No scene cuts throughout, one continuous shot.`
104
- - use timeline segments only for meaningful internal beats, not decorative micro-actions
105
- - when continuing a clip, use `Extend @video1 by [N]s` rather than rewriting it as a new cut
106
- - when `@image1` locks identity, keep face/body/wardrobe/prop design exact and change only one meaningful beat
89
+ $SEEDANCE_STORYBOARD_CONTRACT
107
90
 
108
91
  ## Safety Rules
109
92
 
@@ -120,8 +103,7 @@ When model is `seedance-2.0`, keep the shot prompt readable but explicit:
120
103
 
121
104
  - all assigned shot files exist
122
105
  - each file has main + coverage content
123
- - each `ILK/İLK FRAME` section contains a code block
124
- - image prompt contract passes for all main prompts; video floor passes for VIDEO and coverage video prompts
106
+ $SHOT_SELF_CHECK_CONTRACT
125
107
  - specificity floor passes (lens + light + spatial action present)
126
108
  - continuity inside batch passes
127
109
  - avoid lines exist everywhere
@@ -131,7 +113,7 @@ When model is `seedance-2.0`, keep the shot prompt readable but explicit:
131
113
  - one active speaker per shot
132
114
  - Kling gate passes (if active): professional blocks from `[CHARACTER / SUBJECT CONSISTENCY]` through `[NEGATIVE PROMPT]`, shot time ranges, timing rules, background rules, final-frame priority, no warping/stable background
133
115
  - Kling multi-shot passes (if active): single-transition by default, custom storyboard only when justified, max 4, never decorative micro-beats
134
- - Seedance gate passes (if active): multimodal roles explicit, continuous-shot or timeline mode intentionally chosen, extension syntax used for clip continuation
116
+ - Seedance gate passes (if active): multimodal roles explicit, continuous-shot or multi-shot-storyboard mode intentionally chosen, extension syntax used for clip continuation
135
117
  - spatial realism passes: plane map + eyeline target + shared light + contact/depth cues
136
118
  - semantic consistency passes: `visual_world` + perspective/geometry + shadow vector + scale map + reflection/physics/anatomy/context checks
137
119
 
@@ -153,8 +135,8 @@ After generation, write the report file provided by Lead Director using this tem
153
135
  - files_written:
154
136
  - SHOTXX.md
155
137
  - SHOTYY.md
156
- - chain_entry_used: [text]
157
- - chain_exit_frame: [text]
138
+ - continuity_entry_used: [chain entry or storyboard handoff text]
139
+ - continuity_exit_handoff: [end frame or storyboard handoff text]
158
140
  - continuity_status: pass/fail
159
141
  - safety_status: pass/fail
160
142
  - voice_design_status: pass/fail
@@ -1,28 +1,120 @@
1
1
  ---
2
2
  name: storyboard-reference
3
- description: Character reference + storyboard image + brief to model-aware video prompt bundles without requiring start/end frames.
3
+ description: Character reference sheet prep + per-shot GPT Image 2 storyboard prompts + model-aware video prompt bundles for Veo 3.1, Seedance 2.0, and Kling 3.0 without requiring start/end frame generation.
4
4
  ---
5
5
 
6
6
  # Storyboard Reference Skill
7
7
 
8
- Use when the user provides a character reference, storyboard reference, and video brief.
8
+ ## Purpose
9
+
10
+ Use this skill when the user provides:
11
+
12
+ - one or more character reference images
13
+ - a video brief or scenario text
14
+ - optional external storyboard guide images
15
+
16
+ The output is a production workflow, not only a video prompt. First create one reusable GPT Image 2 character sheet prompt per reference character. Then create one GPT Image 2 storyboard prompt per `SHOTNN.md`. The generated shot storyboard is the staging reference for the final video model prompt.
17
+
18
+ ## Reference Prep
19
+
20
+ ### Character Sheet Prompt
21
+
22
+ For each character reference, generate this prompt once:
23
+
24
+ - provider: `gpt-image-2`
25
+ - aspect ratio: `16:9`
26
+ - layout: one widescreen production storyboard sheet
27
+ - required views: front full body, back full body, left profile, right profile, three-quarter full body, close-up face
28
+ - identity lock: exact face, skull shape, hair, skin texture, body proportions, wardrobe, accessories, and visible props
29
+ - forbidden: text, labels, arrows, panel numbers, logos, watermarks, alternate outfits, alternate character designs
30
+
31
+ This sheet becomes the identity reference for every later shot storyboard.
32
+
33
+ ### Shot Storyboard Prompt
34
+
35
+ For each shot, generate a professional GPT Image 2 storyboard prompt:
36
+
37
+ - provider: `gpt-image-2`
38
+ - aspect ratio: `16:9`
39
+ - panel budget: 4-6s = 1-2 panels, 7-10s = 2-3 panels, 11-15s = 3-4 panels
40
+ - hard cap: max 4 panels/phases per shot unless the configured project cap is lower
41
+ - split policy: 5+ distinct phases must become separate chained `SHOTNN.md` files
42
+ - target detail: 160-240 words, concrete blocking and camera language, no decorative prose
43
+ - continuity: include previous shot handoff, next shot handoff, shared `visual_world`, screen direction, lighting, and action rhythm
44
+
45
+ The shot storyboard prompt must use the character sheet reference as the only identity source. Optional external storyboard guide images may inform composition and timing only.
9
46
 
10
47
  ## Role Separation
11
48
 
12
- - `@character1`: exact identity lock for face, hair, body proportions, wardrobe, accessories, and visible props.
13
- - `@storyboard1`: composition, blocking, camera angle, action progression, visual rhythm, and phase order only.
49
+ Character references and generated character sheets are identity locks.
50
+
51
+ Use them for face, hair, skin texture, body proportions, wardrobe, accessories, and visible props. Do not use them for camera path, storyboard timing, or background layout.
52
+
53
+ The generated shot storyboard is the editorial and camera plan.
54
+
55
+ Use it for composition, blocking, camera angle, action progression, visual rhythm, phase order, and handoff continuity. Do not use it to redesign the character, replace wardrobe, copy panel borders, copy text, copy logos, or import watermark details.
14
56
 
15
57
  ## Hard Rules
16
58
 
17
59
  - Character identity always wins over storyboard character design.
18
- - Do not copy storyboard text, logos, watermarks, labels, or panel borders.
19
- - One prompt may contain at most 4 storyboard phases.
20
- - 5+ distinct phases must split into multiple `SHOTNN.md` files.
21
- - Do not require ILK FRAME / SON FRAME assets in `storyboard-reference` mode.
22
- - Every model prompt needs `Avoid` or negative prompt coverage.
23
- - Dialogue stays in the user's original language.
24
- - Music is `NONE` unless explicitly requested.
60
+ - Storyboard text, labels, watermarks, logos, and panel borders are never copied into the video.
61
+ - One prompt may contain at most 4 storyboard phases by default.
62
+ - 5+ distinct storyboard phases must be split into multiple `SHOTNN.md` files.
63
+ - Do not assume start/end frame assets exist in `storyboard-reference` mode.
64
+ - Every model output must include an `Avoid` or negative prompt section.
65
+ - Dialogue remains in the user's original language.
66
+ - Music is `NONE` unless the user explicitly asks for music.
67
+ - Fail closed on public figure, real-person likeness, trademark/logo, or unsafe visual requests.
68
+
69
+ ## Model Grammar
70
+
71
+ Seedance 2.0:
72
+
73
+ - Map character sheet images to `@Image1`, `@Image2`, ... with legacy aliases `@image1`, `@image2`, ...
74
+ - Map the generated shot storyboard to the next image token, for example one character means `@Image2`, two characters means `@Image3`.
75
+ - Character image tokens control identity, face, body proportions, wardrobe, accessories, and visible props.
76
+ - The storyboard token controls composition, blocking, camera direction, timing, action rhythm, and phase order only.
77
+ - Use explicit timeline phases when the storyboard has multiple beats.
78
+ - Use `No scene cuts throughout, one continuous shot` only for a true single uninterrupted camera move.
79
+ - For multi-phase storyboard prompts, use only the planned phase transitions and do not add unplanned cuts.
80
+ - Duration policy: 4-6s = 1-2 phases, 7-10s = 2-3 phases, 11-15s = 3-4 phases.
81
+ - Seedance provider limits: max 9 image references, 3 video references, 3 audio references, 12 total files, 4-15 seconds.
82
+ - Storyboard text, panel borders, watermark, logo, and alternate character design are never identity sources.
83
+
84
+ Veo 3.1:
85
+
86
+ - Describe the generated storyboard as a visual planning reference, not a literal frame.
87
+ - Include camera, lens/framing, lighting, foreground/midground/background, continuity, and full `Audio direction`.
88
+ - Do not request storyboard panel borders or on-screen text.
89
+
90
+ Kling 3.0:
91
+
92
+ - Prompt code block starts with `[CHARACTER / SUBJECT CONSISTENCY]`.
93
+ - Include `[CORE INTENT]`, `[TOTAL DURATION]`, `[VISUAL STYLE]`, `[CAMERA]`, `[SHOT N | time range]`, `[AUDIO]`, `[TIMING RULES]`, `[BACKGROUND RULES]`, `[FINAL FRAME PRIORITY]`, and `[NEGATIVE PROMPT]`.
94
+ - Use `resolved storyboard composition`, not `final frame exactly`, when no end frame exists.
25
95
 
26
96
  ## Output Contract
27
97
 
28
- Write `$OUTPUT_DIR/storyboard-reference-plan.json`, `$OUTPUT_DIR/prompt-bundles/SHOTNN.bundle.json`, `$OUTPUT_DIR/shots/SHOTNN.md`, and `$OUTPUT_DIR/reports/STORYBOARD-REFERENCE-QA.md`.
98
+ Each shot file contains:
99
+
100
+ - Turkish summary
101
+ - model control
102
+ - input asset roles
103
+ - reference asset requirements
104
+ - provider reference tokens
105
+ - GPT Image 2 storyboard prompt
106
+ - storyboard interpretation
107
+ - audio plan
108
+ - prompt bundle for requested models
109
+ - QA verdict
110
+
111
+ Generated files:
112
+
113
+ ```text
114
+ $OUTPUT_DIR/storyboard-reference-plan.json
115
+ $OUTPUT_DIR/reference-prep/CHARACTER-SHEET-*.md
116
+ $OUTPUT_DIR/storyboard-prompts/SHOTNN-GPT-IMAGE-2-STORYBOARD.md
117
+ $OUTPUT_DIR/prompt-bundles/SHOTNN.bundle.json
118
+ $OUTPUT_DIR/shots/SHOTNN.md
119
+ $OUTPUT_DIR/reports/STORYBOARD-REFERENCE-QA.md
120
+ ```
@@ -10,9 +10,9 @@ Use this when extending an existing project with additional shots.
10
10
 
11
11
  1. Read `.agent/model-profile.md` first.
12
12
  2. Read `$OUTPUT_DIR/_index.md` and detect highest completed shot.
13
- 3. Read last completed shot file and extract `SON FRAME`.
14
- 4. Extend `$OUTPUT_DIR/team-plan.json` with new batches, chain bridges, report expectations, model target, preserved `voiceCast`, and preserved or intentionally reset `visual_world`.
15
- 5. Spawn new shot-generator teammates with explicit chain entry from the last `SON FRAME`.
13
+ 3. Read last completed shot file and extract either the `SON FRAME` (start-end mode) or final `STORYBOARD PLAN` handoff (storyboard-reference mode).
14
+ 4. Extend `$OUTPUT_DIR/team-plan.json` with new batches, chain bridges or storyboard handoffs, report expectations, model target, preserved `voiceCast`, and preserved or intentionally reset `visual_world`.
15
+ 5. Spawn new shot-generator teammates with explicit continuity entry from the last completed shot.
16
16
  6. Collect batch reports and run specialist validation on the new range.
17
17
  7. Ensure `CONTINUITY-REPORT.md`, `SAFETY-REPORT.md`, `STABILITY-REPORT.md`, `DIALOGUE-REPORT.md`, `CHARACTER-REPORT.md`, `COLOR-REPORT.md`, `SEMANTIC-REPORT.md`, `PACING-REPORT.md`, and `DELIVERY-REPORT.md` are refreshed.
18
18
  8. Update `$OUTPUT_DIR/_index.md` and mark new range status.
@@ -23,7 +23,7 @@ Use this when extending an existing project with additional shots.
23
23
  - Preserve continuity from old range into new range.
24
24
  - Preserve existing `speakerKey` bindings and reuse the same `voiceCast`.
25
25
  - Preserve `team-plan.json -> visual_world`; if camera/lens/camera-movement/light/shadow/scale world changes, declare `CHAIN BREAK`.
26
- - Chained `ILK/İLK FRAME` code blocks must contain only `Use SHOT[prev]_END as exact first frame`.
26
+ - $REFERENCE_MODE_CONTRACT
27
27
  - If model is `kling-3.0`, keep Start+End transition mode and first/then/finally transition language.
28
28
  - If model is `seedance-2.0`, preserve multimodal role assignments and prefer `Extend @video1 by [N]s` when continuing from a source clip.
29
29
  - If continuity/safety/stability/dialogue/character-consistency/color-continuity/semantic/pacing/delivery fails, run `.agent/workflows/recover-multi.md` before finishing.
@@ -43,6 +43,7 @@ Create:
43
43
  - teammate assignment map
44
44
  - chain bridge descriptions
45
45
  - model target and preset (`project.model.target`, `project.model.preset`)
46
+ - reference mode (`project.reference_mode`) and storyboard-reference policy (`storyboard_reference.enabled`, `storyboard_reference.character_reference_sheets`, `storyboard_reference.storyboard_prompt_policy`, `storyboard_reference.max_storyboard_phases`, `recommended_phase_budget`, `provider_reference_tokens`, `continuity_mode`, `provider_file_limits`) when active
46
47
  - Kling multi-shot policy (`policy.kling_multi_shot_policy`) with `single-transition` default and `max_custom_shots_per_video: 4`
47
48
  - dialogue naming policy (`policy.dialogue_name_policy`)
48
49
  - top-level `voiceCast`
@@ -58,12 +59,11 @@ For each batch, spawn a `shot-generator` teammate with:
58
59
 
59
60
  - `BATCH ID`
60
61
  - shot range (`SHOT[X]-SHOT[Y]`)
61
- - `CHAIN ENTRY FRAME`
62
+ - `CHAIN ENTRY FRAME` or `STORYBOARD ENTRY HANDOFF`
62
63
  - output path (`$OUTPUT_DIR/shots/`)
63
64
  - report path (`$OUTPUT_DIR/reports/BATCH-REPORT-B[NN].md`)
64
65
  - rule: `Respect planned shot count; do not invent extra shots outside your assigned range`
65
- - rule: `ILK/İLK FRAME must include a code block even when chained`
66
- - rule: `Chained ILK/İLK FRAME code block must contain only: Use SHOT[prev]_END as exact first frame; new start-frame prompt requires CHAIN BREAK`
66
+ - rule: `$REFERENCE_MODE_CONTRACT`
67
67
  - rule: `Follow team-plan.json -> visual_world for perspective/geometry, shadow vector, scale, reflection, physics, anatomy risk, foreground/background coherence, and targeted avoid terms`
68
68
  - rule: `When camera movement is present, name it from the 24-move cinematic lexicon in prompt-structure`
69
69
  - rule: `Kling mode keeps route metadata and AUDIO PLAN outside the prompt code block; the prompt code block starts with [CHARACTER / SUBJECT CONSISTENCY]`
@@ -74,8 +74,8 @@ For each batch, spawn a `shot-generator` teammate with:
74
74
  - rule: `Reuse team-plan.json -> voiceCast and never invent a second speakerKey for the same character`
75
75
  - rule: `Every speaking VIDEO section must include Audio Plan and only one active speaker`
76
76
  - quality floor:
77
- - `ILK FRAME` >= 80 words
78
- - `SON FRAME` >= 80 words
77
+ - start/end image prompts >= 80 words when start-end mode is active
78
+ - storyboard-reference `STORYBOARD PLAN` has timeline phases capped at $MAX_STORYBOARD_PHASES when active
79
79
  - `VIDEO` >= 120 words
80
80
  - each coverage prompt >= 70 words
81
81
 
@@ -88,7 +88,7 @@ For each batch, spawn a `shot-generator` teammate with:
88
88
  5. reject any plan where target shot count feels artificially inflated or compressed relative to the scene-unit rationale
89
89
  6. reject any batch that contains speaking shots without `voiceCast` binding or `Audio Plan`
90
90
  7. reject any batch that pads pacing with decorative micro-shots or trivial Kling storyboard phases
91
- 8. reject any batch that violates `visual_world`, shadow vector, scale/depth, reflection/physics/anatomy, contextual logic, or chained ILK exact-reuse rules
91
+ 8. reject any batch that violates `visual_world`, shadow vector, scale/depth, reflection/physics/anatomy, contextual logic, or the active continuity contract
92
92
 
93
93
  ## Step 5: Run Specialist Validation (Lead + Specialists)
94
94
 
@@ -1,19 +1,96 @@
1
1
  ---
2
- description: Generate storyboard-reference prompt bundles from character reference, storyboard reference, and video brief
2
+ description: Generate character sheet prompts, per-shot GPT Image 2 storyboard prompts, and model-aware video prompt bundles from character references and a video brief
3
3
  ---
4
4
 
5
- # /generate-storyboard
5
+ # /generate-storyboard - Storyboard Reference Video Prompt Mode
6
6
 
7
- Read `.agent/model-profile.md`, `safety-compliance`, `reference-locking`, `storyboard-reference`, `semantic-consistency`, `visual-modes`, `audio-design` when needed, and `prompt-structure`.
7
+ ## Preconditions
8
8
 
9
- Flow:
9
+ - Character reference image exists.
10
+ - User brief or scenario text exists.
11
+ - Optional storyboard guide images may exist, but they are not required.
12
+ - `storyboard-reference` mode is explicitly requested or configured.
10
13
 
11
- 1. Bind `@character1` as `character_identity`, exact lock.
12
- 2. Bind `@storyboard1` as `storyboard_plan`, staging only.
13
- 3. Interpret storyboard panels: 1 continuous arc, 2-4 internal phases, 5+ split shots.
14
- 4. Build `visual_world`, continuity anchors, and model-specific prompts.
15
- 5. Generate Seedance, Veo, and Kling prompt sections for the requested model subset.
16
- 6. Run QA for reference lock, storyboard role separation, model grammar, avoid line, audio plan, and safety.
17
- 7. Write all outputs under `$OUTPUT_DIR`.
14
+ ## Read Order
18
15
 
19
- Fail closed on missing refs, empty brief, public figure likeness, trademark/logo risk, unsafe visual requests, missing avoid line, or invalid Kling block structure.
16
+ 1. `.agent/model-profile.md`
17
+ 2. `.agent/skills/safety-compliance/SKILL.md`
18
+ 3. `.agent/skills/reference-locking/SKILL.md`
19
+ 4. `.agent/skills/storyboard-reference/SKILL.md`
20
+ 5. `.agent/skills/semantic-consistency/SKILL.md`
21
+ 6. `.agent/skills/visual-modes/SKILL.md`
22
+ 7. `.agent/skills/audio-design/SKILL.md` when dialogue, SFX, ambience, or voiceover exists
23
+ 8. `.agent/skills/prompt-structure/SKILL.md`
24
+
25
+ ## Flow
26
+
27
+ 1. Confirm asset roles:
28
+ - `@character1`, `@character2`, ...: `character_identity`, exact lock
29
+ - optional `@storyboard1`, `@storyboard2`, ...: external storyboard guides, staging only
30
+ 2. Generate one GPT Image 2 character sheet prompt per character reference:
31
+ - 16:9 production storyboard sheet
32
+ - front full body, back full body, left profile, right profile, three-quarter full body, close-up face
33
+ - exact identity, wardrobe, accessories, and visible props
34
+ - no labels, text, logos, watermarks, alternate designs, or extra characters
35
+ 3. Confirm target models: `veo31`, `seedance-2.0`, `kling-3.0`, or a user-provided subset.
36
+ 4. Select shot storyboard panel budget:
37
+ - 4-6 seconds: 1-2 panels/phases
38
+ - 7-10 seconds: 2-3 panels/phases
39
+ - 11-15 seconds: 3-4 panels/phases
40
+ - 5+ distinct phases: split into multiple `SHOTNN.md` files
41
+ 5. Build `visual_world`:
42
+ - environment
43
+ - lighting
44
+ - foreground/midground/background
45
+ - screen direction
46
+ - continuity anchors
47
+ 6. Generate one GPT Image 2 storyboard prompt per shot:
48
+ - use character sheets as the only identity source
49
+ - use optional storyboard guide only for composition, blocking, camera, timing, and rhythm
50
+ - include previous shot handoff and next shot handoff
51
+ - preserve shared location, lighting, screen direction, action rhythm, and scene continuity
52
+ 7. Build model prompt bundle:
53
+ - Seedance dynamic image mapping: character sheets first, generated shot storyboard next
54
+ - Veo visual-planning prompt with full audio direction
55
+ - Kling block-structured storyboard route
56
+ 8. Run QA gates:
57
+ - reference lock
58
+ - storyboard role separation
59
+ - model grammar
60
+ - avoid/negative prompt
61
+ - audio plan
62
+ - safety
63
+ 9. Write outputs under `$OUTPUT_DIR`.
64
+
65
+ ## CLI Equivalent
66
+
67
+ ```bash
68
+ npx @milenyumai/film-kit generate-storyboard \
69
+ --character-ref ./refs/character.png \
70
+ --brief ./scenario.md \
71
+ --models veo31,seedance-2.0,kling-3.0 \
72
+ --duration 8 \
73
+ --aspect 16:9 \
74
+ --output-dir ./outputs
75
+ ```
76
+
77
+ Optional external storyboard guide:
78
+
79
+ ```bash
80
+ npx @milenyumai/film-kit generate-storyboard \
81
+ --character-ref ./refs/character.png \
82
+ --storyboard-ref ./refs/storyboard-guide.png \
83
+ --brief ./scenario.md \
84
+ --models seedance-2.0
85
+ ```
86
+
87
+ ## Fail-Closed Rules
88
+
89
+ - Missing character reference: stop and request a valid reference.
90
+ - Empty brief: stop and request a brief.
91
+ - Public figure / real-person likeness / trademark risk: stop or safely anonymize before prompt generation.
92
+ - 5+ storyboard phases: do not compress into one prompt; split shots.
93
+ - Missing GPT Image 2 character sheet prompt: output is invalid.
94
+ - Missing GPT Image 2 per-shot storyboard prompt: output is invalid.
95
+ - Missing `Avoid` / negative prompt: output is invalid.
96
+ - Kling prompt missing required block structure: output is invalid.
@@ -25,14 +25,15 @@ For each assigned shot:
25
25
  1. Write `$OUTPUT_DIR/shots/SHOT[N].md`
26
26
  2. Keep one-file-per-shot contract (main + coverage in same file)
27
27
  3. Keep internal continuity across your range
28
- 4. Keep `ILK/İLK FRAME` as a fenced code block even for chained shots
29
- 5. If chained, the `ILK/İLK FRAME` code block must contain only `Use SHOT[prev]_END as exact first frame`; new visual content requires `CHAIN BREAK`
28
+ 4. Follow the active reference-mode contract:
29
+ $REFERENCE_MODE_CONTRACT
30
30
  6. Apply safety, avoid line, and audio-direction rules
31
31
  7. Reuse `team-plan.json -> voiceCast` and write `Audio Plan` for each VIDEO section
32
32
  8. Keep one active speaker per shot
33
- 6. Enforce image prompt contract:
34
- - reference-anchored `ILK FRAME` and `SON FRAME` use `REFERENCE LOCK`, `Keep same`, and `Change only`
35
- - image prompts stay compact and do not use filler length
33
+ 6. Enforce active reference prompt contract:
34
+ - start/end mode: reference-anchored start/end prompts use `REFERENCE LOCK`, `Keep same`, and `Change only`
35
+ - storyboard-reference mode: generated character sheet tokens control identity and the generated shot storyboard token controls staging only
36
+ - visual reference prompts stay compact and do not use filler length
36
37
  - `VIDEO` >= 120 words
37
38
  - each coverage video prompt >= 70 words
38
39
  7. Enforce specificity floor:
@@ -56,11 +57,7 @@ For each assigned shot:
56
57
  - maximum 4 custom storyboard shots in one video generation
57
58
  - never split one micro gesture or tiny prop move into separate storyboard beats
58
59
  10. If model is `seedance-2.0`, enforce:
59
- - explicit material roles when references exist (`@image1`, `@video1`, `@audio1`)
60
- - identity reference kept separate from camera/action reference when different materials are used
61
- - `No scene cuts throughout, one continuous shot.` for uninterrupted beats
62
- - timeline segments only when the beat has meaningful internal phases
63
- - `Extend @video1 by [N]s` syntax when continuing a reference clip
60
+ $SEEDANCE_STORYBOARD_CONTRACT
64
61
  11. Do not create additional SHOT files beyond the planned batch range
65
62
 
66
63
  ## Step 3: Run Self-Check
@@ -69,10 +66,7 @@ Validate:
69
66
 
70
67
  - all assigned files exist
71
68
  - each file has main + coverage sections
72
- - each `ILK/İLK FRAME` section has a code block
73
- - chained `ILK/İLK FRAME` code blocks contain only exact reuse text
74
- - word-count floors pass for all prompts
75
- - image prompt contract passes for main stills
69
+ $SHOT_SELF_CHECK_CONTRACT
76
70
  - specificity floor passes for all prompts
77
71
  - cinematic camera movement lexicon is used when movement is present
78
72
  - semantic consistency floor passes for all prompts
@@ -26,8 +26,8 @@ Check all files in `$OUTPUT_DIR/shots/` or requested range.
26
26
  - dramatic units are neither over-compressed nor padded relative to `team-plan.json -> shot_sizing.scene_units`
27
27
 
28
28
  2. Format
29
- - main shot contains `ILK FRAME` (or `İLK FRAME`), `SON FRAME`, `VIDEO` (or `VİDEO`)
30
- - each `ILK/İLK FRAME` section includes a code block (always)
29
+ - main shot follows the active reference-mode format
30
+ - $REFERENCE_MODE_CONTRACT
31
31
  - coverage blocks are present in same file
32
32
  - avoid line present in every prompt
33
33
  - every video prompt has full audio direction
@@ -37,9 +37,8 @@ Check all files in `$OUTPUT_DIR/shots/` or requested range.
37
37
  - no dialogue shot contains more than one active speaker
38
38
 
39
39
  3. Continuity
40
- - `SHOT[N]_END` aligns with `SHOT[N+1]_START`
41
- - batch boundaries match chain bridge definitions
42
- - chained `ILK/İLK FRAME` code blocks contain only `Use SHOT[prev]_END as exact first frame`
40
+ - batch boundaries match chain bridge or storyboard handoff definitions
41
+ - $SEMANTIC_AUDIT_CONTRACT
43
42
 
44
43
  4. Semantic consistency
45
44
  - `team-plan.json` contains top-level `visual_world`
@@ -52,7 +51,8 @@ Check all files in `$OUTPUT_DIR/shots/` or requested range.
52
51
 
53
52
  5. Quality
54
53
  - `VIDEO/VİDEO` prompt >= 120 words
55
- - reference-anchored `ILK/İLK FRAME` and `SON FRAME` use compact structural format instead of filler length
54
+ - start/end image prompts use compact structural format instead of filler length when start-end mode is active
55
+ - storyboard-reference `STORYBOARD PLAN` phases are explicit and capped at $MAX_STORYBOARD_PHASES when active
56
56
  - each coverage video prompt >= 70 words
57
57
  - lens/framing/camera movement details are explicit
58
58
  - lighting direction/intensity/atmosphere details are explicit
@@ -72,11 +72,7 @@ Check all files in `$OUTPUT_DIR/shots/` or requested range.
72
72
  - prompt constraints include `stable background` and `no warping`
73
73
 
74
74
  7. Seedance-specific gate (when model is `seedance-2.0`)
75
- - material roles are explicit when references are used (`@image1`, `@video1`, `@audio1`)
76
- - identity reference is separated from action/camera references when needed
77
- - uninterrupted beats explicitly say `No scene cuts throughout, one continuous shot.`
78
- - timeline phases, if used, are editorially meaningful and not decorative micro-beats
79
- - continuation prompts use `Extend @video1 by [N]s` when they extend a source clip
75
+ $SEEDANCE_STORYBOARD_CONTRACT
80
76
 
81
77
  7. Visual stability
82
78
  - camera position is eye-level or slight low-angle (extreme tilt/dutch/drone flagged)