@milenyumai/film-kit 1.4.3 → 2.0.1

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 (128) hide show
  1. package/README.md +369 -162
  2. package/build/cli.js +23 -75
  3. package/build/index.d.ts +2 -1
  4. package/build/index.js +1 -0
  5. package/build/lib/cli.d.ts +7 -0
  6. package/build/lib/cli.js +227 -0
  7. package/build/lib/configure.js +10 -3
  8. package/build/lib/film-kit.d.ts +7 -0
  9. package/build/lib/film-kit.js +321 -0
  10. package/build/lib/templates.js +142 -34
  11. package/build/lib/types.d.ts +31 -1
  12. package/build/postinstall.js +56 -9
  13. package/content/ARCHITECTURE.md +2 -2
  14. package/content/FILM-KIT-INFO.md +5 -4
  15. package/content/MASTER.md +3 -3
  16. package/content/RULES.md +2 -2
  17. package/content/agents/prompt-engineer.md +83 -22
  18. package/content/skills/audio-design/SKILL.md +40 -9
  19. package/content/skills/frame-chaining/SKILL.md +10 -1
  20. package/content/skills/prompt-structure/SKILL.md +108 -34
  21. package/content/skills/reference-locking/SKILL.md +70 -57
  22. package/content/skills/semantic-consistency/SKILL.md +26 -3
  23. package/content/workflows/chain.md +1 -0
  24. package/content/workflows/finish.md +5 -1
  25. package/content/workflows/generate.md +47 -15
  26. package/content/workflows/safety-check.md +12 -4
  27. package/package.json +14 -4
  28. package/packages/hybrid/LICENSE +21 -0
  29. package/packages/hybrid/README.md +62 -0
  30. package/packages/hybrid/build/cli.d.ts +2 -0
  31. package/packages/hybrid/build/cli.js +96 -0
  32. package/packages/hybrid/build/index.d.ts +2 -0
  33. package/packages/hybrid/build/index.js +1 -0
  34. package/packages/hybrid/build/lib/configure.d.ts +2 -0
  35. package/packages/hybrid/build/lib/configure.js +222 -0
  36. package/packages/hybrid/build/lib/defaults.d.ts +2 -0
  37. package/packages/hybrid/build/lib/defaults.js +24 -0
  38. package/packages/hybrid/build/lib/fs.d.ts +3 -0
  39. package/packages/hybrid/build/lib/fs.js +23 -0
  40. package/packages/hybrid/build/lib/templates.d.ts +2 -0
  41. package/packages/hybrid/build/lib/templates.js +650 -0
  42. package/packages/hybrid/build/lib/types.d.ts +39 -0
  43. package/packages/hybrid/build/lib/types.js +1 -0
  44. package/packages/hybrid/build/postinstall.d.ts +1 -0
  45. package/packages/hybrid/build/postinstall.js +30 -0
  46. package/packages/hybrid/content/HYBRID-OVERRIDES.md +93 -0
  47. package/packages/hybrid/content/skills/nano-banana-pro-image/SKILL.md +84 -0
  48. package/packages/hybrid/content/skills/prompt-structure/SKILL.md +231 -0
  49. package/packages/hybrid/content/workflows/generate.md +126 -0
  50. package/packages/hybrid-smart/LICENSE +21 -0
  51. package/packages/hybrid-smart/README.md +65 -0
  52. package/packages/hybrid-smart/build/cli.d.ts +2 -0
  53. package/packages/hybrid-smart/build/cli.js +97 -0
  54. package/packages/hybrid-smart/build/index.d.ts +2 -0
  55. package/packages/hybrid-smart/build/index.js +1 -0
  56. package/packages/hybrid-smart/build/lib/configure.d.ts +2 -0
  57. package/packages/hybrid-smart/build/lib/configure.js +237 -0
  58. package/packages/hybrid-smart/build/lib/defaults.d.ts +2 -0
  59. package/packages/hybrid-smart/build/lib/defaults.js +36 -0
  60. package/packages/hybrid-smart/build/lib/fs.d.ts +3 -0
  61. package/packages/hybrid-smart/build/lib/fs.js +23 -0
  62. package/packages/hybrid-smart/build/lib/templates.d.ts +2 -0
  63. package/packages/hybrid-smart/build/lib/templates.js +744 -0
  64. package/packages/hybrid-smart/build/lib/types.d.ts +48 -0
  65. package/packages/hybrid-smart/build/lib/types.js +1 -0
  66. package/packages/hybrid-smart/build/postinstall.d.ts +1 -0
  67. package/packages/hybrid-smart/build/postinstall.js +30 -0
  68. package/packages/hybrid-smart/content/SMART-HYBRID-OVERRIDES.md +112 -0
  69. package/packages/hybrid-smart/content/skills/nano-banana-pro-image/SKILL.md +84 -0
  70. package/packages/hybrid-smart/content/skills/prompt-structure/SKILL.md +281 -0
  71. package/packages/hybrid-smart/content/workflows/generate.md +139 -0
  72. package/packages/multi/LICENSE +21 -0
  73. package/packages/multi/README.md +118 -0
  74. package/packages/multi/build/cli.d.ts +2 -0
  75. package/packages/multi/build/cli.js +83 -0
  76. package/packages/multi/build/index.d.ts +2 -0
  77. package/packages/multi/build/index.js +1 -0
  78. package/packages/multi/build/lib/configure.d.ts +2 -0
  79. package/packages/multi/build/lib/configure.js +260 -0
  80. package/packages/multi/build/lib/defaults.d.ts +2 -0
  81. package/packages/multi/build/lib/defaults.js +23 -0
  82. package/packages/multi/build/lib/fs.d.ts +3 -0
  83. package/packages/multi/build/lib/fs.js +23 -0
  84. package/packages/multi/build/lib/templates.d.ts +6 -0
  85. package/packages/multi/build/lib/templates.js +1256 -0
  86. package/packages/multi/build/lib/types.d.ts +43 -0
  87. package/packages/multi/build/lib/types.js +1 -0
  88. package/packages/multi/build/postinstall.d.ts +1 -0
  89. package/packages/multi/build/postinstall.js +18 -0
  90. package/packages/multi/content/agents/character-consistency-auditor.md +83 -0
  91. package/packages/multi/content/agents/color-continuity-auditor.md +69 -0
  92. package/packages/multi/content/agents/continuity-editor.md +54 -0
  93. package/packages/multi/content/agents/delivery-editor.md +64 -0
  94. package/packages/multi/content/agents/dialogue-auditor.md +74 -0
  95. package/packages/multi/content/agents/lead-director.md +325 -0
  96. package/packages/multi/content/agents/pacing-auditor.md +77 -0
  97. package/packages/multi/content/agents/safety-auditor.md +60 -0
  98. package/packages/multi/content/agents/semantic-auditor.md +75 -0
  99. package/packages/multi/content/agents/shot-generator.md +179 -0
  100. package/packages/multi/content/agents/stability-auditor.md +83 -0
  101. package/packages/multi/content/skills/director-shot-sizing/SKILL.md +170 -0
  102. package/packages/multi/content/workflows/chain-multi.md +29 -0
  103. package/packages/multi/content/workflows/finish-multi.md +47 -0
  104. package/packages/multi/content/workflows/generate-multi.md +134 -0
  105. package/packages/multi/content/workflows/generate-teammate.md +108 -0
  106. package/packages/multi/content/workflows/recover-multi.md +53 -0
  107. package/packages/multi/content/workflows/safety-check-multi.md +99 -0
  108. package/packages/studio/LICENSE +21 -0
  109. package/packages/studio/README.md +77 -0
  110. package/packages/studio/build/cli.d.ts +2 -0
  111. package/packages/studio/build/cli.js +95 -0
  112. package/packages/studio/build/index.d.ts +2 -0
  113. package/packages/studio/build/index.js +1 -0
  114. package/packages/studio/build/lib/configure.d.ts +2 -0
  115. package/packages/studio/build/lib/configure.js +337 -0
  116. package/packages/studio/build/lib/defaults.d.ts +2 -0
  117. package/packages/studio/build/lib/defaults.js +35 -0
  118. package/packages/studio/build/lib/fs.d.ts +3 -0
  119. package/packages/studio/build/lib/fs.js +25 -0
  120. package/packages/studio/build/lib/templates.d.ts +6 -0
  121. package/packages/studio/build/lib/templates.js +1378 -0
  122. package/packages/studio/build/lib/types.d.ts +42 -0
  123. package/packages/studio/build/lib/types.js +1 -0
  124. package/packages/studio/build/postinstall.d.ts +1 -0
  125. package/packages/studio/build/postinstall.js +25 -0
  126. package/packages/studio/content/agents/render-supervisor.md +197 -0
  127. package/packages/studio/content/skills/fal-render/SKILL.md +198 -0
  128. package/packages/studio/content/workflows/render.md +107 -0
package/README.md CHANGED
@@ -1,239 +1,446 @@
1
1
  # Film-Kit
2
2
 
3
- Professional cinematic prompt-engineering kits for OpenAI Codex App, Claude Code, Cursor, GitHub Copilot, and Antigravity.
3
+ Single-package cinematic prompt-engineering runtime for OpenAI Codex App, Claude Code, Cursor, GitHub Copilot, and Antigravity.
4
4
 
5
- Film-Kit ships as a single repository with five npm packages:
5
+ `@milenyumai/film-kit` is now the only public npm distribution. Presets are selected at `init` time, not at install time.
6
6
 
7
- | Package | Use case | Video route |
8
- |---|---|---|
9
- | `@milenyumai/film-kit` | Core single-agent workflow | `veo31` or `kling-3.0` |
10
- | `@milenyumai/film-kit-multi` | Multi-agent parallel production | `veo31` or `kling-3.0` |
11
- | `@milenyumai/film-kit-hybrid` | Nano Banana stills + Kling video | fixed `kling-3.0` |
12
- | `@milenyumai/film-kit-hybrid-smart` | Nano Banana stills + smart Veo/Kling routing | dialogue-aware route |
13
- | `@milenyumai/film-kit-studio` | Scenario to rendered media | fal.ai Nano Banana + Kling render pipeline |
7
+ ## What Changed
14
8
 
15
- ## Release Highlights
9
+ - Public package surface is now only `@milenyumai/film-kit`
10
+ - Public CLI entrypoint is now only `film-kit` / `npx @milenyumai/film-kit`
11
+ - Product mode is selected with `--preset`
12
+ - Canonical project config is now `film-kit.config.json`
13
+ - Old package families remain in `packages/*` as internal preset sources, not public release targets
16
14
 
17
- - Professional native Claude Code surfaces across all packages:
18
- - valid `.claude/settings*.json`
19
- - native `.claude/agents/*`
20
- - cleanup of stale mode-specific Claude artifacts
21
- - Shared `spatial-blocking` skill for gaze, plane depth, light cohesion, compositing realism, and anti-miniature control.
22
- - Voice-design aware audio contract with project-level `voiceCast`, shot-level `Audio Plan`, and backward-compatible `Audio direction` blocks.
23
- - Aligned quality gates across Claude Code, Cursor, Copilot, and Antigravity.
24
- - Stronger Kling 3.0 and Kling multi-shot guidance, including practical route rules and hard caps.
25
- - OpenAI Codex App repo-scoped surfaces across packages:
26
- - `.codex/config.toml` with full-auto local profile
27
- - `.codex/agents/*.toml` custom agents that point back to Film-Kit roles
28
- - `.agents/skills/*/SKILL.md` Codex skill mirror
29
- - AGENTS.md project-root, trusted-project, and worktree bootstrap guidance
15
+ ## Install
30
16
 
31
- ## Editors
17
+ Requirements:
32
18
 
33
- All packages generate professional project surfaces for:
19
+ - Node.js `>=20`
34
20
 
35
- - OpenAI Codex App
36
- - Claude Code
37
- - Cursor
38
- - GitHub Copilot
39
- - Antigravity
21
+ Install:
40
22
 
41
- ## OpenAI Codex App Support
42
-
43
- Film-Kit writes repo-scoped Codex files so the Codex desktop app can discover the project from the Git root:
44
-
45
- - `.codex/config.toml` uses `approval_policy = "never"`, `sandbox_mode = "danger-full-access"`, and `[agents] max_threads = 6`, `max_depth = 1`.
46
- - `.codex/agents/*.toml` defines minimal custom agents that read the canonical `.agent/agents/*.md` role files.
47
- - `.agents/skills/*/SKILL.md` mirrors the final `.agent/skills` runtime so Codex skill discovery sees package-specific overrides.
48
- - Studio adds a project-scoped fal.ai MCP entry at `.codex/config.toml` with `required = false`; missing `FAL_KEY` is reported during render rather than breaking init.
49
- - If Codex opens a worktree without dependencies or build output, follow `AGENTS.md`: run `npm install` and `npm run build` before package commands.
23
+ ```bash
24
+ npm install --save-dev @milenyumai/film-kit
25
+ ```
50
26
 
51
- ## Package Guide
27
+ If it is already installed locally, the binary name is:
52
28
 
53
- ### 1. `@milenyumai/film-kit`
29
+ ```bash
30
+ npx film-kit init --preset single
31
+ ```
54
32
 
55
- Single-agent package for controlled shot-by-shot generation.
33
+ Package-direct invocation also works:
56
34
 
57
35
  ```bash
58
- npx @milenyumai/film-kit init
59
- npx @milenyumai/film-kit init --model veo31
60
- npx @milenyumai/film-kit init --model kling-3.0 --kling-preset ultra-realism
36
+ npx @milenyumai/film-kit init --preset single
61
37
  ```
62
38
 
63
- Best for:
39
+ ## Quick Start
64
40
 
65
- - solo work
66
- - smaller productions
67
- - manual supervision of every shot
41
+ Initialize a project with one of the supported presets:
68
42
 
69
- Key contracts:
43
+ ```bash
44
+ npx @milenyumai/film-kit init --preset single --model veo31
45
+ npx @milenyumai/film-kit init --preset single --model seedance-2.0
46
+ npx @milenyumai/film-kit init --preset multi --model kling-3.0 --kling-preset ultra-realism
47
+ npx @milenyumai/film-kit init --preset hybrid --aspect 16:9 --nano-size 4K
48
+ npx @milenyumai/film-kit init --preset hybrid-smart --kling-preset balanced
49
+ npx @milenyumai/film-kit init --preset studio --model seedance-2.0 --refs-dir ./refs
50
+ ```
70
51
 
71
- - one file per shot
72
- - hard quality floor: `ILK >= 80`, `SON >= 80`, `VIDEO >= 120`, `coverage >= 70`
73
- - shared spatial realism gate when subjects interact
52
+ After the first run, Film-Kit writes `film-kit.config.json` and uses that file as the canonical project configuration.
74
53
 
75
- ### 2. `@milenyumai/film-kit-multi`
54
+ ## Presets
76
55
 
77
- Parallel production package with Lead Director, shot teammates, and specialist validation.
56
+ | Preset | Purpose | Supported video model surface | Default notes |
57
+ |---|---|---|---|
58
+ | `single` | Single-agent prompt runtime | `veo31`, `kling-3.0`, `seedance-2.0` | Defaults to all supported platforms |
59
+ | `multi` | Lead-directed multi-agent shot generation | `veo31`, `kling-3.0`, `seedance-2.0` | Defaults to `maxTeammates=5`, `batchSize=4` |
60
+ | `hybrid` | Nano Banana still generation + fixed Kling video runtime | fixed `kling-3.0` | No `--model` flag |
61
+ | `hybrid-smart` | Nano Banana still generation + dialogue-aware Veo/Kling routing | fixed smart route | No `--model` flag |
62
+ | `studio` | Scenario-to-render pipeline with render-stage configuration | `veo31`, `kling-3.0`, `seedance-2.0` | Includes refs dir and fal model configuration |
78
63
 
79
- ```bash
80
- npx @milenyumai/film-kit-multi init
81
- npx @milenyumai/film-kit-multi init --model veo31
82
- npx @milenyumai/film-kit-multi init --model kling-3.0 --kling-preset ultra-realism
83
- ```
64
+ ## Model Support
84
65
 
85
- Best for:
66
+ ### `veo31`
86
67
 
87
- - larger productions
88
- - 10+ shot sequences
89
- - team-style generation inside Claude Code Agent Teams or Antigravity Mission Control
68
+ - Default single, multi, and studio model
69
+ - Uses the Veo-oriented prompt flow and audio-direction block
70
+ - Default warning still exists if model is omitted in some presets because current runtime remains backward-compatible
90
71
 
91
- Key contracts:
72
+ ### `seedance-2.0`
92
73
 
93
- - `team-plan.json`
94
- - 8 specialist validators in 3-phase execution (continuity -> parallel quality checks -> delivery)
95
- - parallel batch generation
96
- - spatial contract for multi-subject staging
74
+ - Supported in `single`, `multi`, and `studio`
75
+ - Runtime now includes Seedance-specific prompt guidance
76
+ - Seedance prompt behavior emphasizes:
77
+ - multimodal role assignment such as `@image1`, `@video1`, `@audio1`
78
+ - first-frame anchoring like `Use @image1 as the first frame of the scene.`
79
+ - continuous-shot wording such as `No scene cuts throughout, one continuous shot.`
80
+ - explicit extension syntax such as `Extend @video1 by 5s`
81
+ - separation of identity reference vs camera reference vs action reference
97
82
 
98
- ### 3. `@milenyumai/film-kit-hybrid`
83
+ ### `kling-3.0`
99
84
 
100
- Hybrid package for Nano Banana still prompts and Kling 3.0 video prompts.
85
+ - Supported in `single`, `multi`, and `studio`
86
+ - Fixed inside `hybrid`
87
+ - Part of the router inside `hybrid-smart`
88
+ - Uses Kling-specific Start+End / storyboard prompt structure
101
89
 
102
- ```bash
103
- npx @milenyumai/film-kit-hybrid init
104
- npx @milenyumai/film-kit-hybrid init --aspect 16:9 --nano-size 4K
105
- npx @milenyumai/film-kit-hybrid init --kling-preset balanced
106
- ```
90
+ ### `kling-preset`
107
91
 
108
- Pipeline:
92
+ `preset` and `kling-preset` are different things:
109
93
 
110
- - `ILK/SON` still prompts -> Nano Banana Pro / Google
111
- - `VIDEO` prompts -> Kling 3.0
94
+ - `preset` selects the Film-Kit product mode
95
+ - `kling-preset` selects Kling quality behavior
96
+ - `kling-preset` only applies when the active video model is `kling-3.0`
112
97
 
113
- Key contracts:
98
+ Supported `kling-preset` values:
114
99
 
115
- - one file per shot
116
- - route is always `kling-3.0`
117
- - app.kling custom storyboard cap: `4`
118
- - Kling prompt code blocks start with `[CHARACTER / SUBJECT CONSISTENCY]`
119
- - hybrid-specific spatial realism rules for layered blocking
100
+ - `ultra-realism`
101
+ - `balanced`
102
+ - `custom`
120
103
 
121
- ### 4. `@milenyumai/film-kit-hybrid-smart`
104
+ When the active model is not Kling, generated runtime files intentionally render the Kling preset as `n/a (Kling-only)`.
122
105
 
123
- Hybrid package with Nano Banana stills and dialogue-aware video routing.
106
+ ## CLI
107
+
108
+ Base command:
124
109
 
125
110
  ```bash
126
- npx @milenyumai/film-kit-hybrid-smart init
127
- npx @milenyumai/film-kit-hybrid-smart init --aspect 9:16 --nano-size 4K
128
- npx @milenyumai/film-kit-hybrid-smart init --kling-preset balanced
111
+ npx @milenyumai/film-kit init --preset single|multi|hybrid|hybrid-smart|studio
129
112
  ```
130
113
 
131
- Pipeline:
132
-
133
- - `ILK/SON` still prompts -> Nano Banana Pro / Google
134
- - dialogue video sections -> Veo 3.1
135
- - no-dialogue video sections -> Kling 3.0
136
-
137
- Key contracts:
114
+ Help:
138
115
 
139
- - per-section route declaration
140
- - Veo/Kling grammar separation
141
- - app.kling custom storyboard cap: `4`
142
- - Kling-routed no-dialogue prompt code blocks start with `[CHARACTER / SUBJECT CONSISTENCY]`
143
- - shared spatial realism gate
144
-
145
- ## Shared Quality System
116
+ ```bash
117
+ npx @milenyumai/film-kit --help
118
+ ```
146
119
 
147
- Film-Kit packages now share a stronger realism layer:
120
+ Examples:
148
121
 
149
- - explicit eyeline targets
150
- - plane map for foreground / midground / background
151
- - body orientation alignment
152
- - shared motivated light source
153
- - depth and contact cues to avoid pasted-cutout or toy-scale results
122
+ ```bash
123
+ npx @milenyumai/film-kit init --preset single --model veo31
124
+ npx @milenyumai/film-kit init --preset single --model seedance-2.0 --platforms cursor,claude,codex
125
+ npx @milenyumai/film-kit init --preset multi --model seedance-2.0 --max-teammates 5 --batch-size 4
126
+ npx @milenyumai/film-kit init --preset multi --model kling-3.0 --kling-preset balanced
127
+ npx @milenyumai/film-kit init --preset hybrid --kling-preset ultra-realism --aspect 16:9 --nano-size 2K
128
+ npx @milenyumai/film-kit init --preset hybrid-smart --aspect 9:16 --max-kling-custom-shots 4
129
+ npx @milenyumai/film-kit init --preset studio --model seedance-2.0 --refs-dir ./refs
130
+ npx @milenyumai/film-kit init --preset studio --model kling-3.0 --fal-video-model fal-ai/kling-video/v3/pro/image-to-video
131
+ npx @milenyumai/film-kit init --preset single --overwrite
132
+ ```
154
133
 
155
- This behavior is implemented through:
134
+ ### Common Flags
156
135
 
157
- - `.agent/skills/spatial-blocking/SKILL.md`
158
- - workflow hard gates
159
- - Claude local rules and native subagents
136
+ | Flag | Description |
137
+ |---|---|
138
+ | `--preset` | Required unless `film-kit.config.json` or a single legacy config already exists |
139
+ | `--output-dir` | Output root. Default: `./outputs` |
140
+ | `--scenario-hint` | Scenario file hint. Default: `scenario.md` |
141
+ | `--scenario` | Alias of `--scenario-hint` |
142
+ | `--overwrite`, `-f` | Overwrite existing runtime files |
160
143
 
161
- ## Output Contract
144
+ ### Preset-Specific Flags
162
145
 
163
- All packages keep the same editorial mindset:
146
+ | Preset | Allowed flags |
147
+ |---|---|
148
+ | `single` | `--model`, `--kling-preset`, `--platforms` |
149
+ | `multi` | `--model`, `--kling-preset`, `--max-teammates`, `--batch-size` |
150
+ | `hybrid` | `--kling-preset`, `--aspect`, `--nano-size`, `--platforms` |
151
+ | `hybrid-smart` | `--kling-preset`, `--aspect`, `--nano-size`, `--max-kling-custom-shots`, `--platforms` |
152
+ | `studio` | `--model`, `--kling-preset`, `--max-teammates`, `--batch-size`, `--refs-dir`, `--fal-image-model`, `--fal-video-model`, `--platforms` |
164
153
 
165
- - one file per shot: `SHOTNN.md`
166
- - coverage stays inside the same shot file
167
- - reports are generated under `reports/`
168
- - continuity handoff is explicit
169
- - cut motivation and editorial purpose are mandatory
154
+ ### Supported Flag Values
170
155
 
171
- ## Configuration Files
156
+ | Flag | Supported values |
157
+ |---|---|
158
+ | `--preset` | `single`, `multi`, `hybrid`, `hybrid-smart`, `studio` |
159
+ | `--model` | `veo31`, `kling-3.0`, `seedance-2.0` |
160
+ | `--kling-preset` | `ultra-realism`, `balanced`, `custom` |
161
+ | `--aspect` | `16:9`, `9:16`, `1:1` |
162
+ | `--nano-size` | `1K`, `2K`, `4K` |
163
+ | `--platforms` | `cursor`, `claude`, `copilot`, `antigravity`, `codex` |
172
164
 
173
- Core:
165
+ ## Canonical Config
174
166
 
175
- ```json
176
- {
177
- "outputDir": "./outputs",
178
- "scenarioHint": "scenario.md",
179
- "model": "kling-3.0",
180
- "klingPreset": "ultra-realism"
181
- }
182
- ```
167
+ Film-Kit writes `film-kit.config.json` after initialization and reads it on future runs.
183
168
 
184
- Multi:
169
+ Example:
185
170
 
186
171
  ```json
187
172
  {
173
+ "preset": "studio",
188
174
  "outputDir": "./outputs",
189
175
  "scenarioHint": "scenario.md",
190
- "model": "kling-3.0",
176
+ "platforms": ["cursor", "claude", "copilot", "antigravity", "codex"],
177
+ "model": "seedance-2.0",
191
178
  "klingPreset": "ultra-realism",
192
179
  "maxTeammates": 5,
193
- "batchSize": 4
180
+ "batchSize": 4,
181
+ "refsDir": "./refs",
182
+ "falImageModel": "fal-ai/nano-banana-2/edit",
183
+ "falVideoModel": "fal-ai/kling-video/v3/pro/image-to-video",
184
+ "includeAgentsMd": true,
185
+ "copyContent": true
194
186
  }
195
187
  ```
196
188
 
197
- Hybrid:
189
+ ### Config Field Support Matrix
190
+
191
+ | Field | `single` | `multi` | `hybrid` | `hybrid-smart` | `studio` |
192
+ |---|---|---|---|---|---|
193
+ | `preset` | yes | yes | yes | yes | yes |
194
+ | `outputDir` | yes | yes | yes | yes | yes |
195
+ | `scenarioHint` | yes | yes | yes | yes | yes |
196
+ | `platforms` | yes | no | yes | yes | yes |
197
+ | `model` | yes | yes | no | no | yes |
198
+ | `klingPreset` | yes | yes | yes | yes | yes |
199
+ | `maxTeammates` | no | yes | no | no | yes |
200
+ | `batchSize` | no | yes | no | no | yes |
201
+ | `defaultAspectRatio` | no | no | yes | yes | no |
202
+ | `nanoBananaImageSize` | no | no | yes | yes | no |
203
+ | `maxKlingCustomShots` | no | no | no | yes | no |
204
+ | `refsDir` | no | no | no | no | yes |
205
+ | `falImageModel` | no | no | no | no | yes |
206
+ | `falVideoModel` | no | no | no | no | yes |
207
+ | `includeAgentsMd` | yes | yes | yes | yes | yes |
208
+ | `copyContent` | yes | yes | yes | yes | yes |
209
+
210
+ ## Legacy Config Migration
211
+
212
+ Film-Kit automatically detects and migrates one existing legacy config file on first run:
213
+
214
+ - `shotforge-agent.config.json`
215
+ - `film-kit-multi.config.json`
216
+ - `film-kit-hybrid.config.json`
217
+ - `film-kit-hybrid-smart.config.json`
218
+ - `film-kit-studio.config.json`
219
+
220
+ Migration behavior:
221
+
222
+ - Film-Kit infers the preset from the legacy filename
223
+ - Film-Kit resolves preset defaults through the new root dispatcher
224
+ - Film-Kit writes the final canonical config to `film-kit.config.json`
225
+ - Film-Kit returns a warning that the legacy config was migrated
226
+
227
+ If multiple legacy config files are present at the same time, Film-Kit fails fast and asks for cleanup or an explicit `--preset`.
228
+
229
+ ## Generated Runtime Surface
230
+
231
+ Film-Kit writes repo-scoped runtime files for supported editors and agents. Depending on preset and platform selection, output includes:
232
+
233
+ - `.agent/`
234
+ - `.agents/`
235
+ - `.codex/config.toml`
236
+ - `.codex/agents/*.toml`
237
+ - `.claude/`
238
+ - `.cursor/`
239
+ - `.github/copilot-instructions.md`
240
+ - `AGENTS.md`
241
+ - runtime workflows such as `generate`, `chain`, `safety-check`, `recover`, `finish`
242
+
243
+ Editorial/runtime contract shared across the package:
198
244
 
199
- ```json
200
- {
201
- "outputDir": "./outputs",
202
- "scenarioHint": "scenario.md",
203
- "defaultAspectRatio": "16:9",
204
- "nanoBananaImageSize": "2K",
205
- "klingPreset": "ultra-realism"
206
- }
207
- ```
245
+ - one file per shot: `SHOTNN.md`
246
+ - coverage lives inside the same shot file
247
+ - report files live under `reports/`
248
+ - continuity and first-frame chaining are explicit
249
+ - voice design uses top-level `voiceCast`
250
+ - per-shot sound control uses `Audio Plan`
251
+ - semantic consistency uses canonical `visual_world`
208
252
 
209
- Smart hybrid:
253
+ ## Reference Locking And Start/End Consistency
210
254
 
211
- ```json
212
- {
213
- "outputDir": "./outputs",
214
- "scenarioHint": "scenario.md",
215
- "defaultAspectRatio": "16:9",
216
- "nanoBananaImageSize": "2K",
217
- "klingPreset": "ultra-realism",
218
- "maxKlingCustomShots": 4
219
- }
255
+ When a reference image exists, Film-Kit now treats it as an immutable source, not a loose style hint.
256
+
257
+ Default behavior across `single`, `multi`, `hybrid`, `hybrid-smart`, and `studio`:
258
+
259
+ - face, hair, skin tone, body proportions, wardrobe, accessories, props, materials, patterns, and logos are treated as locked invariants
260
+ - generated prompts should not re-describe identity details already visible in the reference
261
+ - generated prompts should explicitly preserve the same person or object exactly as the reference
262
+ - silent redesign, restyling, redressing, age shifting, or prop redesign is considered a failure
263
+
264
+ Allowed movement inside a reference-locked shot is intentionally narrow:
265
+
266
+ - pose can change only if it is explicitly declared
267
+ - expression can change only if it is explicitly declared
268
+ - camera or environment state can change only if it is explicitly declared
269
+ - each start/end pair should carry only one major semantic delta unless the workflow marks a deliberate chain break or transition
270
+
271
+ ## Prompt Contract
272
+
273
+ Start/end still prompts are now optimized for structure, not raw length.
274
+
275
+ Image prompt contract:
276
+
277
+ - `REFERENCE LOCK`
278
+ - `Keep same`
279
+ - `Change only`
280
+ - short semantic anchor
281
+ - targeted avoid line
282
+
283
+ This means:
284
+
285
+ - reference-anchored image prompts are intentionally shorter and more surgical
286
+ - old image-quality heuristics based on minimum word counts are no longer the primary control surface
287
+ - detailed prose is still expected for video prompts, where motion, timing, audio, and camera language need richer direction
288
+
289
+ `hybrid` and `hybrid-smart` keep their compact still-prompt behavior. `single`, `multi`, and `studio` keep richer video prompt behavior for Veo, Kling, and Seedance.
290
+
291
+ ## Semantic QA And Render QA
292
+
293
+ `visual_world` is the canonical continuity contract for semantic consistency and render review.
294
+
295
+ Reference-aware runtime and reports now carry these concepts:
296
+
297
+ - `identity_lock: "exact-reference"`
298
+ - `shared_frame_invariants`
299
+ - `allowed_change`
300
+ - `reference_drift_forbidden: true`
301
+
302
+ Generated specialist and render QA flows now explicitly fail on:
303
+
304
+ - face, hair, skin, body, wardrobe, accessory, or prop drift
305
+ - lens, angle, subject scale, light direction, or color-temperature drift
306
+ - unexplained semantic changes between start and end frames
307
+ - violations of declared `Keep same` invariants
308
+ - changes outside the declared `Change only` budget
309
+
310
+ Studio render QA also records render-level verdicts such as:
311
+
312
+ - `reference_drift_status`
313
+ - `start_end_contract_status`
314
+
315
+ ## Seedance Runtime Coverage
316
+
317
+ The package now carries Seedance-aware instructions in the generated runtime, not only in type definitions or CLI parsing.
318
+
319
+ That means generated prompt systems now include Seedance guidance in:
320
+
321
+ - model profile generation
322
+ - prompt structure skill
323
+ - audio design skill
324
+ - root generation workflows
325
+ - single-agent prompt engineer instructions
326
+ - multi-agent lead-director / shot-generator workflows
327
+
328
+ In practice, this gives generated teams explicit rules for:
329
+
330
+ - multimodal prompt composition
331
+ - continuous-shot language
332
+ - timeline segmentation
333
+ - reference-role separation
334
+ - clip extension syntax
335
+
336
+ ## Programmatic API
337
+
338
+ Public root exports:
339
+
340
+ - `configureFilmKit(options)`
341
+ - `detectFilmKitPreset(rootDir)`
342
+ - `FILM_KIT_CONFIG_FILE`
343
+ - `FILM_KIT_PRESETS`
344
+ - `LEGACY_CONFIG_FILES`
345
+ - `FilmKitPreset`
346
+ - `SupportedModel`
347
+ - `SupportedPlatform`
348
+ - `KlingPreset`
349
+
350
+ Example:
351
+
352
+ ```ts
353
+ import { configureFilmKit } from "@milenyumai/film-kit";
354
+
355
+ const result = await configureFilmKit({
356
+ rootDir: process.cwd(),
357
+ preset: "multi",
358
+ model: "seedance-2.0",
359
+ maxTeammates: 5,
360
+ batchSize: 4
361
+ });
362
+
363
+ console.log(result.preset);
364
+ console.log(result.configPath);
365
+ console.log(result.written);
366
+ console.log(result.warnings);
220
367
  ```
221
368
 
222
- ## Development
369
+ For backward compatibility, `configureAgents()` is still exported for the single preset runtime, but new integrations should treat `configureFilmKit()` as the primary root API.
370
+
371
+ ## Postinstall Behavior
372
+
373
+ The package `postinstall` hook is intentionally conservative:
374
+
375
+ - if no preset can be detected, postinstall does nothing
376
+ - if `film-kit.config.json` exists, postinstall can rehydrate the runtime
377
+ - if `FILM_KIT_PRESET` is provided, postinstall can configure that preset non-interactively
378
+
379
+ Supported postinstall environment variables:
380
+
381
+ - `FILM_KIT_PRESET`
382
+ - `FILM_KIT_MODEL`
383
+ - `FILM_KIT_KLING_PRESET`
384
+ - `FILM_KIT_HYBRID_ASPECT`
385
+ - `FILM_KIT_HYBRID_IMAGE_SIZE`
386
+ - `FILM_KIT_MAX_TEAMMATES`
387
+ - `FILM_KIT_BATCH_SIZE`
388
+ - `FILM_KIT_MAX_KLING_CUSTOM_SHOTS`
389
+ - `FILM_KIT_REFS_DIR`
390
+ - `FILM_KIT_FAL_IMAGE_MODEL`
391
+ - `FILM_KIT_FAL_VIDEO_MODEL`
392
+
393
+ This keeps install-time side effects low while still allowing CI or template-driven setup.
394
+
395
+ ## Repository Layout
396
+
397
+ Public distribution model:
398
+
399
+ - published package: `@milenyumai/film-kit`
400
+
401
+ Internal preset source layout:
402
+
403
+ - `packages/multi`
404
+ - `packages/hybrid`
405
+ - `packages/hybrid-smart`
406
+ - `packages/studio`
407
+
408
+ These subpackages are marked `private: true` and are bundled as internal sources for the root package build and tarball.
409
+
410
+ ## Release and Publish
411
+
412
+ Maintainer release checklist:
223
413
 
224
414
  ```bash
225
- npm install
226
415
  npm run typecheck
227
416
  npm test
417
+ npm run build
418
+ npm pack --json --dry-run
419
+ ```
420
+
421
+ Publish the single public package:
422
+
423
+ ```bash
424
+ npm login
425
+ npm whoami
426
+ npm publish --access public
228
427
  ```
229
428
 
230
- Package publishing happens from:
429
+ Optional validation before publish:
231
430
 
232
- - repo root for `@milenyumai/film-kit`
233
- - `packages/multi` for `@milenyumai/film-kit-multi`
234
- - `packages/hybrid` for `@milenyumai/film-kit-hybrid`
235
- - `packages/hybrid-smart` for `@milenyumai/film-kit-hybrid-smart`
236
- - `packages/studio` for `@milenyumai/film-kit-studio`
431
+ ```bash
432
+ npm pkg get name version
433
+ npm view @milenyumai/film-kit version
434
+ ```
435
+
436
+ If you want to deprecate previously published legacy package names and point users to the new surface, run:
437
+
438
+ ```bash
439
+ npm deprecate @milenyumai/film-kit-multi@"*" "Deprecated. Use @milenyumai/film-kit with --preset multi."
440
+ npm deprecate @milenyumai/film-kit-hybrid@"*" "Deprecated. Use @milenyumai/film-kit with --preset hybrid."
441
+ npm deprecate @milenyumai/film-kit-hybrid-smart@"*" "Deprecated. Use @milenyumai/film-kit with --preset hybrid-smart."
442
+ npm deprecate @milenyumai/film-kit-studio@"*" "Deprecated. Use @milenyumai/film-kit with --preset studio."
443
+ ```
237
444
 
238
445
  ## License
239
446