@milenyumai/film-kit 1.4.2 → 2.0.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 (126) hide show
  1. package/README.md +308 -143
  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 +25 -6
  8. package/build/lib/defaults.js +1 -1
  9. package/build/lib/film-kit.d.ts +7 -0
  10. package/build/lib/film-kit.js +321 -0
  11. package/build/lib/templates.js +225 -42
  12. package/build/lib/types.d.ts +32 -2
  13. package/build/postinstall.js +56 -9
  14. package/content/ARCHITECTURE.md +2 -2
  15. package/content/FILM-KIT-INFO.md +5 -4
  16. package/content/MASTER.md +3 -3
  17. package/content/RULES.md +2 -2
  18. package/content/agents/prompt-engineer.md +80 -19
  19. package/content/skills/audio-design/SKILL.md +40 -9
  20. package/content/skills/prompt-structure/SKILL.md +127 -24
  21. package/content/workflows/chain.md +2 -1
  22. package/content/workflows/finish.md +4 -0
  23. package/content/workflows/generate.md +36 -9
  24. package/content/workflows/safety-check.md +7 -0
  25. package/package.json +17 -4
  26. package/packages/hybrid/LICENSE +21 -0
  27. package/packages/hybrid/README.md +67 -0
  28. package/packages/hybrid/build/cli.d.ts +2 -0
  29. package/packages/hybrid/build/cli.js +97 -0
  30. package/packages/hybrid/build/index.d.ts +2 -0
  31. package/packages/hybrid/build/index.js +1 -0
  32. package/packages/hybrid/build/lib/configure.d.ts +2 -0
  33. package/packages/hybrid/build/lib/configure.js +222 -0
  34. package/packages/hybrid/build/lib/defaults.d.ts +2 -0
  35. package/packages/hybrid/build/lib/defaults.js +24 -0
  36. package/packages/hybrid/build/lib/fs.d.ts +3 -0
  37. package/packages/hybrid/build/lib/fs.js +23 -0
  38. package/packages/hybrid/build/lib/templates.d.ts +2 -0
  39. package/packages/hybrid/build/lib/templates.js +648 -0
  40. package/packages/hybrid/build/lib/types.d.ts +39 -0
  41. package/packages/hybrid/build/lib/types.js +1 -0
  42. package/packages/hybrid/build/postinstall.d.ts +1 -0
  43. package/packages/hybrid/build/postinstall.js +30 -0
  44. package/packages/hybrid/content/HYBRID-OVERRIDES.md +91 -0
  45. package/packages/hybrid/content/skills/nano-banana-pro-image/SKILL.md +79 -0
  46. package/packages/hybrid/content/skills/prompt-structure/SKILL.md +227 -0
  47. package/packages/hybrid/content/workflows/generate.md +126 -0
  48. package/packages/hybrid-smart/LICENSE +21 -0
  49. package/packages/hybrid-smart/README.md +70 -0
  50. package/packages/hybrid-smart/build/cli.d.ts +2 -0
  51. package/packages/hybrid-smart/build/cli.js +98 -0
  52. package/packages/hybrid-smart/build/index.d.ts +2 -0
  53. package/packages/hybrid-smart/build/index.js +1 -0
  54. package/packages/hybrid-smart/build/lib/configure.d.ts +2 -0
  55. package/packages/hybrid-smart/build/lib/configure.js +237 -0
  56. package/packages/hybrid-smart/build/lib/defaults.d.ts +2 -0
  57. package/packages/hybrid-smart/build/lib/defaults.js +36 -0
  58. package/packages/hybrid-smart/build/lib/fs.d.ts +3 -0
  59. package/packages/hybrid-smart/build/lib/fs.js +23 -0
  60. package/packages/hybrid-smart/build/lib/templates.d.ts +2 -0
  61. package/packages/hybrid-smart/build/lib/templates.js +742 -0
  62. package/packages/hybrid-smart/build/lib/types.d.ts +48 -0
  63. package/packages/hybrid-smart/build/lib/types.js +1 -0
  64. package/packages/hybrid-smart/build/postinstall.d.ts +1 -0
  65. package/packages/hybrid-smart/build/postinstall.js +30 -0
  66. package/packages/hybrid-smart/content/SMART-HYBRID-OVERRIDES.md +112 -0
  67. package/packages/hybrid-smart/content/skills/nano-banana-pro-image/SKILL.md +79 -0
  68. package/packages/hybrid-smart/content/skills/prompt-structure/SKILL.md +279 -0
  69. package/packages/hybrid-smart/content/workflows/generate.md +139 -0
  70. package/packages/multi/LICENSE +21 -0
  71. package/packages/multi/README.md +122 -0
  72. package/packages/multi/build/cli.d.ts +2 -0
  73. package/packages/multi/build/cli.js +84 -0
  74. package/packages/multi/build/index.d.ts +2 -0
  75. package/packages/multi/build/index.js +1 -0
  76. package/packages/multi/build/lib/configure.d.ts +2 -0
  77. package/packages/multi/build/lib/configure.js +260 -0
  78. package/packages/multi/build/lib/defaults.d.ts +2 -0
  79. package/packages/multi/build/lib/defaults.js +23 -0
  80. package/packages/multi/build/lib/fs.d.ts +3 -0
  81. package/packages/multi/build/lib/fs.js +23 -0
  82. package/packages/multi/build/lib/templates.d.ts +6 -0
  83. package/packages/multi/build/lib/templates.js +1249 -0
  84. package/packages/multi/build/lib/types.d.ts +43 -0
  85. package/packages/multi/build/lib/types.js +1 -0
  86. package/packages/multi/build/postinstall.d.ts +1 -0
  87. package/packages/multi/build/postinstall.js +18 -0
  88. package/packages/multi/content/agents/character-consistency-auditor.md +76 -0
  89. package/packages/multi/content/agents/color-continuity-auditor.md +69 -0
  90. package/packages/multi/content/agents/continuity-editor.md +54 -0
  91. package/packages/multi/content/agents/delivery-editor.md +64 -0
  92. package/packages/multi/content/agents/dialogue-auditor.md +74 -0
  93. package/packages/multi/content/agents/lead-director.md +325 -0
  94. package/packages/multi/content/agents/pacing-auditor.md +77 -0
  95. package/packages/multi/content/agents/safety-auditor.md +60 -0
  96. package/packages/multi/content/agents/semantic-auditor.md +71 -0
  97. package/packages/multi/content/agents/shot-generator.md +175 -0
  98. package/packages/multi/content/agents/stability-auditor.md +83 -0
  99. package/packages/multi/content/skills/director-shot-sizing/SKILL.md +170 -0
  100. package/packages/multi/content/workflows/chain-multi.md +29 -0
  101. package/packages/multi/content/workflows/finish-multi.md +47 -0
  102. package/packages/multi/content/workflows/generate-multi.md +134 -0
  103. package/packages/multi/content/workflows/generate-teammate.md +105 -0
  104. package/packages/multi/content/workflows/recover-multi.md +53 -0
  105. package/packages/multi/content/workflows/safety-check-multi.md +98 -0
  106. package/packages/studio/LICENSE +21 -0
  107. package/packages/studio/README.md +82 -0
  108. package/packages/studio/build/cli.d.ts +2 -0
  109. package/packages/studio/build/cli.js +96 -0
  110. package/packages/studio/build/index.d.ts +2 -0
  111. package/packages/studio/build/index.js +1 -0
  112. package/packages/studio/build/lib/configure.d.ts +2 -0
  113. package/packages/studio/build/lib/configure.js +337 -0
  114. package/packages/studio/build/lib/defaults.d.ts +2 -0
  115. package/packages/studio/build/lib/defaults.js +35 -0
  116. package/packages/studio/build/lib/fs.d.ts +3 -0
  117. package/packages/studio/build/lib/fs.js +25 -0
  118. package/packages/studio/build/lib/templates.d.ts +6 -0
  119. package/packages/studio/build/lib/templates.js +1369 -0
  120. package/packages/studio/build/lib/types.d.ts +42 -0
  121. package/packages/studio/build/lib/types.js +1 -0
  122. package/packages/studio/build/postinstall.d.ts +1 -0
  123. package/packages/studio/build/postinstall.js +25 -0
  124. package/packages/studio/content/agents/render-supervisor.md +191 -0
  125. package/packages/studio/content/skills/fal-render/SKILL.md +192 -0
  126. package/packages/studio/content/workflows/render.md +106 -0
package/README.md CHANGED
@@ -1,219 +1,384 @@
1
1
  # Film-Kit
2
2
 
3
- Professional cinematic prompt-engineering kits for 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 four 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 |
7
+ ## What Changed
13
8
 
14
- ## 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
15
14
 
16
- - Professional native Claude Code surfaces across all packages:
17
- - valid `.claude/settings*.json`
18
- - native `.claude/agents/*`
19
- - cleanup of stale mode-specific Claude artifacts
20
- - Shared `spatial-blocking` skill for gaze, plane depth, light cohesion, compositing realism, and anti-miniature control.
21
- - Voice-design aware audio contract with project-level `voiceCast`, shot-level `Audio Plan`, and backward-compatible `Audio direction` blocks.
22
- - Aligned quality gates across Claude Code, Cursor, Copilot, and Antigravity.
23
- - Stronger Kling 3.0 and Kling multi-shot guidance, including practical route rules and hard caps.
15
+ ## Install
24
16
 
25
- ## Editors
17
+ Requirements:
26
18
 
27
- All packages generate professional project surfaces for:
19
+ - Node.js `>=20`
28
20
 
29
- - Claude Code
30
- - Cursor
31
- - GitHub Copilot
32
- - Antigravity
33
-
34
- ## Package Guide
35
-
36
- ### 1. `@milenyumai/film-kit`
37
-
38
- Single-agent package for controlled shot-by-shot generation.
21
+ Install:
39
22
 
40
23
  ```bash
41
- npx @milenyumai/film-kit init
42
- npx @milenyumai/film-kit init --model veo31
43
- npx @milenyumai/film-kit init --model kling-3.0 --kling-preset ultra-realism
24
+ npm install --save-dev @milenyumai/film-kit
44
25
  ```
45
26
 
46
- Best for:
27
+ If it is already installed locally, the binary name is:
47
28
 
48
- - solo work
49
- - smaller productions
50
- - manual supervision of every shot
29
+ ```bash
30
+ npx film-kit init --preset single
31
+ ```
51
32
 
52
- Key contracts:
33
+ Package-direct invocation also works:
53
34
 
54
- - one file per shot
55
- - hard quality floor: `ILK >= 80`, `SON >= 80`, `VIDEO >= 120`, `coverage >= 70`
56
- - shared spatial realism gate when subjects interact
35
+ ```bash
36
+ npx @milenyumai/film-kit init --preset single
37
+ ```
57
38
 
58
- ### 2. `@milenyumai/film-kit-multi`
39
+ ## Quick Start
59
40
 
60
- Parallel production package with Lead Director, shot teammates, and specialist validation.
41
+ Initialize a project with one of the supported presets:
61
42
 
62
43
  ```bash
63
- npx @milenyumai/film-kit-multi init
64
- npx @milenyumai/film-kit-multi init --model veo31
65
- npx @milenyumai/film-kit-multi init --model kling-3.0 --kling-preset ultra-realism
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
66
50
  ```
67
51
 
68
- Best for:
52
+ After the first run, Film-Kit writes `film-kit.config.json` and uses that file as the canonical project configuration.
69
53
 
70
- - larger productions
71
- - 10+ shot sequences
72
- - team-style generation inside Claude Code Agent Teams or Antigravity Mission Control
54
+ ## Presets
73
55
 
74
- Key contracts:
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 |
75
63
 
76
- - `team-plan.json`
77
- - 8 specialist validators in 3-phase execution (continuity -> parallel quality checks -> delivery)
78
- - parallel batch generation
79
- - spatial contract for multi-subject staging
64
+ ## Model Support
80
65
 
81
- ### 3. `@milenyumai/film-kit-hybrid`
66
+ ### `veo31`
82
67
 
83
- Hybrid package for Nano Banana still prompts and Kling 3.0 video prompts.
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
84
71
 
85
- ```bash
86
- npx @milenyumai/film-kit-hybrid init
87
- npx @milenyumai/film-kit-hybrid init --aspect 16:9 --nano-size 4K
88
- npx @milenyumai/film-kit-hybrid init --kling-preset balanced
89
- ```
72
+ ### `seedance-2.0`
90
73
 
91
- Pipeline:
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
92
82
 
93
- - `ILK/SON` still prompts -> Nano Banana Pro / Google
94
- - `VIDEO` prompts -> Kling 3.0
83
+ ### `kling-3.0`
95
84
 
96
- Key contracts:
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
97
89
 
98
- - one file per shot
99
- - route is always `kling-3.0`
100
- - app.kling custom storyboard cap: `3`
101
- - hybrid-specific spatial realism rules for layered blocking
90
+ ### `kling-preset`
102
91
 
103
- ### 4. `@milenyumai/film-kit-hybrid-smart`
92
+ `preset` and `kling-preset` are different things:
104
93
 
105
- Hybrid package with Nano Banana stills and dialogue-aware video routing.
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`
106
97
 
107
- ```bash
108
- npx @milenyumai/film-kit-hybrid-smart init
109
- npx @milenyumai/film-kit-hybrid-smart init --aspect 9:16 --nano-size 4K
110
- npx @milenyumai/film-kit-hybrid-smart init --kling-preset balanced
111
- ```
98
+ Supported `kling-preset` values:
112
99
 
113
- Pipeline:
100
+ - `ultra-realism`
101
+ - `balanced`
102
+ - `custom`
114
103
 
115
- - `ILK/SON` still prompts -> Nano Banana Pro / Google
116
- - dialogue video sections -> Veo 3.1
117
- - no-dialogue video sections -> Kling 3.0
104
+ When the active model is not Kling, generated runtime files intentionally render the Kling preset as `n/a (Kling-only)`.
118
105
 
119
- Key contracts:
106
+ ## CLI
120
107
 
121
- - per-section route declaration
122
- - Veo/Kling grammar separation
123
- - app.kling custom storyboard cap: `3`
124
- - shared spatial realism gate
108
+ Base command:
125
109
 
126
- ## Shared Quality System
110
+ ```bash
111
+ npx @milenyumai/film-kit init --preset single|multi|hybrid|hybrid-smart|studio
112
+ ```
127
113
 
128
- Film-Kit packages now share a stronger realism layer:
114
+ Help:
129
115
 
130
- - explicit eyeline targets
131
- - plane map for foreground / midground / background
132
- - body orientation alignment
133
- - shared motivated light source
134
- - depth and contact cues to avoid pasted-cutout or toy-scale results
116
+ ```bash
117
+ npx @milenyumai/film-kit --help
118
+ ```
135
119
 
136
- This behavior is implemented through:
120
+ Examples:
137
121
 
138
- - `.agent/skills/spatial-blocking/SKILL.md`
139
- - workflow hard gates
140
- - Claude local rules and native subagents
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
+ ```
141
133
 
142
- ## Output Contract
134
+ ### Common Flags
143
135
 
144
- All packages keep the same editorial mindset:
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 |
145
143
 
146
- - one file per shot: `SHOTNN.md`
147
- - coverage stays inside the same shot file
148
- - reports are generated under `reports/`
149
- - continuity handoff is explicit
150
- - cut motivation and editorial purpose are mandatory
144
+ ### Preset-Specific Flags
151
145
 
152
- ## Configuration Files
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` |
153
153
 
154
- Core:
154
+ ### Supported Flag Values
155
155
 
156
- ```json
157
- {
158
- "outputDir": "./outputs",
159
- "scenarioHint": "scenario.md",
160
- "model": "kling-3.0",
161
- "klingPreset": "ultra-realism"
162
- }
163
- ```
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` |
164
164
 
165
- Multi:
165
+ ## Canonical Config
166
+
167
+ Film-Kit writes `film-kit.config.json` after initialization and reads it on future runs.
168
+
169
+ Example:
166
170
 
167
171
  ```json
168
172
  {
173
+ "preset": "studio",
169
174
  "outputDir": "./outputs",
170
175
  "scenarioHint": "scenario.md",
171
- "model": "kling-3.0",
176
+ "platforms": ["cursor", "claude", "copilot", "antigravity", "codex"],
177
+ "model": "seedance-2.0",
172
178
  "klingPreset": "ultra-realism",
173
179
  "maxTeammates": 5,
174
- "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
175
186
  }
176
187
  ```
177
188
 
178
- 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:
179
244
 
180
- ```json
181
- {
182
- "outputDir": "./outputs",
183
- "scenarioHint": "scenario.md",
184
- "defaultAspectRatio": "16:9",
185
- "nanoBananaImageSize": "2K",
186
- "klingPreset": "ultra-realism"
187
- }
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`
252
+
253
+ ## Seedance Runtime Coverage
254
+
255
+ The package now carries Seedance-aware instructions in the generated runtime, not only in type definitions or CLI parsing.
256
+
257
+ That means generated prompt systems now include Seedance guidance in:
258
+
259
+ - model profile generation
260
+ - prompt structure skill
261
+ - audio design skill
262
+ - root generation workflows
263
+ - single-agent prompt engineer instructions
264
+ - multi-agent lead-director / shot-generator workflows
265
+
266
+ In practice, this gives generated teams explicit rules for:
267
+
268
+ - multimodal prompt composition
269
+ - continuous-shot language
270
+ - timeline segmentation
271
+ - reference-role separation
272
+ - clip extension syntax
273
+
274
+ ## Programmatic API
275
+
276
+ Public root exports:
277
+
278
+ - `configureFilmKit(options)`
279
+ - `detectFilmKitPreset(rootDir)`
280
+ - `FILM_KIT_CONFIG_FILE`
281
+ - `FILM_KIT_PRESETS`
282
+ - `LEGACY_CONFIG_FILES`
283
+ - `FilmKitPreset`
284
+ - `SupportedModel`
285
+ - `SupportedPlatform`
286
+ - `KlingPreset`
287
+
288
+ Example:
289
+
290
+ ```ts
291
+ import { configureFilmKit } from "@milenyumai/film-kit";
292
+
293
+ const result = await configureFilmKit({
294
+ rootDir: process.cwd(),
295
+ preset: "multi",
296
+ model: "seedance-2.0",
297
+ maxTeammates: 5,
298
+ batchSize: 4
299
+ });
300
+
301
+ console.log(result.preset);
302
+ console.log(result.configPath);
303
+ console.log(result.written);
304
+ console.log(result.warnings);
188
305
  ```
189
306
 
190
- Smart hybrid:
307
+ For backward compatibility, `configureAgents()` is still exported for the single preset runtime, but new integrations should treat `configureFilmKit()` as the primary root API.
191
308
 
192
- ```json
193
- {
194
- "outputDir": "./outputs",
195
- "scenarioHint": "scenario.md",
196
- "defaultAspectRatio": "16:9",
197
- "nanoBananaImageSize": "2K",
198
- "klingPreset": "ultra-realism",
199
- "maxKlingCustomShots": 3
200
- }
201
- ```
309
+ ## Postinstall Behavior
310
+
311
+ The package `postinstall` hook is intentionally conservative:
312
+
313
+ - if no preset can be detected, postinstall does nothing
314
+ - if `film-kit.config.json` exists, postinstall can rehydrate the runtime
315
+ - if `FILM_KIT_PRESET` is provided, postinstall can configure that preset non-interactively
316
+
317
+ Supported postinstall environment variables:
318
+
319
+ - `FILM_KIT_PRESET`
320
+ - `FILM_KIT_MODEL`
321
+ - `FILM_KIT_KLING_PRESET`
322
+ - `FILM_KIT_HYBRID_ASPECT`
323
+ - `FILM_KIT_HYBRID_IMAGE_SIZE`
324
+ - `FILM_KIT_MAX_TEAMMATES`
325
+ - `FILM_KIT_BATCH_SIZE`
326
+ - `FILM_KIT_MAX_KLING_CUSTOM_SHOTS`
327
+ - `FILM_KIT_REFS_DIR`
328
+ - `FILM_KIT_FAL_IMAGE_MODEL`
329
+ - `FILM_KIT_FAL_VIDEO_MODEL`
330
+
331
+ This keeps install-time side effects low while still allowing CI or template-driven setup.
332
+
333
+ ## Repository Layout
334
+
335
+ Public distribution model:
202
336
 
203
- ## Development
337
+ - published package: `@milenyumai/film-kit`
338
+
339
+ Internal preset source layout:
340
+
341
+ - `packages/multi`
342
+ - `packages/hybrid`
343
+ - `packages/hybrid-smart`
344
+ - `packages/studio`
345
+
346
+ These subpackages are marked `private: true` and are bundled as internal sources for the root package build and tarball.
347
+
348
+ ## Release and Publish
349
+
350
+ Maintainer release checklist:
204
351
 
205
352
  ```bash
206
- npm install
207
353
  npm run typecheck
208
354
  npm test
355
+ npm run build
356
+ npm pack --json --dry-run
209
357
  ```
210
358
 
211
- Package publishing happens from:
359
+ Publish the single public package:
360
+
361
+ ```bash
362
+ npm login
363
+ npm whoami
364
+ npm publish --access public
365
+ ```
212
366
 
213
- - repo root for `@milenyumai/film-kit`
214
- - `packages/multi` for `@milenyumai/film-kit-multi`
215
- - `packages/hybrid` for `@milenyumai/film-kit-hybrid`
216
- - `packages/hybrid-smart` for `@milenyumai/film-kit-hybrid-smart`
367
+ Optional validation before publish:
368
+
369
+ ```bash
370
+ npm pkg get name version
371
+ npm view @milenyumai/film-kit version
372
+ ```
373
+
374
+ If you want to deprecate previously published legacy package names and point users to the new surface, run:
375
+
376
+ ```bash
377
+ npm deprecate @milenyumai/film-kit-multi@"*" "Deprecated. Use @milenyumai/film-kit with --preset multi."
378
+ npm deprecate @milenyumai/film-kit-hybrid@"*" "Deprecated. Use @milenyumai/film-kit with --preset hybrid."
379
+ npm deprecate @milenyumai/film-kit-hybrid-smart@"*" "Deprecated. Use @milenyumai/film-kit with --preset hybrid-smart."
380
+ npm deprecate @milenyumai/film-kit-studio@"*" "Deprecated. Use @milenyumai/film-kit with --preset studio."
381
+ ```
217
382
 
218
383
  ## License
219
384
 
package/build/cli.js CHANGED
@@ -1,83 +1,31 @@
1
1
  #!/usr/bin/env node
2
- import { configureAgents } from "./lib/configure.js";
2
+ import { parseCliCommand, renderCliUsage } from "./lib/cli.js";
3
+ import { configureFilmKit } from "./lib/film-kit.js";
3
4
  const args = process.argv.slice(2);
4
- const command = args[0];
5
- const overwrite = args.includes("--overwrite") || args.includes("-f");
6
- const SUPPORTED_MODELS = ["veo31", "kling-3.0"];
7
- const SUPPORTED_KLING_PRESETS = ["ultra-realism", "balanced", "custom"];
8
- function parseFlagValue(flag) {
9
- const exactIndex = args.indexOf(flag);
10
- if (exactIndex >= 0 && args[exactIndex + 1]) {
11
- return args[exactIndex + 1];
5
+ try {
6
+ const parsed = await parseCliCommand(args, process.cwd());
7
+ if (parsed.command === "help" || !parsed.options) {
8
+ console.log(renderCliUsage());
9
+ process.exit(0);
12
10
  }
13
- const prefixed = args.find(a => a.startsWith(`${flag}=`));
14
- if (prefixed) {
15
- return prefixed.slice(flag.length + 1);
11
+ console.log(`šŸŽ¬ Film-Kit: Configuring '${parsed.options.preset}' preset...\n`);
12
+ const result = await configureFilmKit(parsed.options);
13
+ if (result.written.length > 0) {
14
+ console.log(`āœ… Files written: ${result.written.length}`);
15
+ result.written.forEach(file => console.log(` ${file}`));
16
16
  }
17
- return undefined;
18
- }
19
- function parseModel() {
20
- const modelRaw = parseFlagValue("--model");
21
- if (!modelRaw)
22
- return undefined;
23
- if (SUPPORTED_MODELS.includes(modelRaw)) {
24
- return modelRaw;
25
- }
26
- throw new Error(`Invalid --model value: ${modelRaw}. Supported: ${SUPPORTED_MODELS.join(", ")}`);
27
- }
28
- function parseKlingPreset() {
29
- const presetRaw = parseFlagValue("--kling-preset");
30
- if (!presetRaw)
31
- return undefined;
32
- if (SUPPORTED_KLING_PRESETS.includes(presetRaw)) {
33
- return presetRaw;
34
- }
35
- throw new Error(`Invalid --kling-preset value: ${presetRaw}. Supported: ${SUPPORTED_KLING_PRESETS.join(", ")}`);
36
- }
37
- if (command === "init") {
38
- console.log("šŸŽ¬ Film-Kit: Configuring AI agents...\n");
39
- try {
40
- const model = parseModel();
41
- const klingPreset = parseKlingPreset();
42
- const configureOptions = {
43
- rootDir: process.cwd(),
44
- overwrite
45
- };
46
- if (model)
47
- configureOptions.model = model;
48
- if (klingPreset)
49
- configureOptions.klingPreset = klingPreset;
50
- const result = await configureAgents(configureOptions);
51
- if (result.written.length > 0) {
52
- console.log(`āœ… Files written: ${result.written.length}`);
53
- result.written.forEach(f => console.log(` ${f}`));
54
- }
55
- if (result.skipped.length > 0) {
56
- console.log(`ā­ļø Files skipped (already exist): ${result.skipped.length}`);
57
- }
58
- if (result.warnings.length > 0) {
59
- console.log("\nāš ļø Warnings:");
60
- result.warnings.forEach(w => console.log(` - ${w}`));
61
- }
62
- console.log("\nšŸŽ¬ Done! Your AI agents are configured for Hollywood-grade prompt engineering.");
63
- console.log(" Use /generate in your AI editor to start creating shots.\n");
17
+ if (result.skipped.length > 0) {
18
+ console.log(`ā­ļø Files skipped (already exist): ${result.skipped.length}`);
64
19
  }
65
- catch (err) {
66
- console.error("āŒ Error:", err.message);
67
- process.exit(1);
20
+ if (result.warnings.length > 0) {
21
+ console.log("\nāš ļø Warnings:");
22
+ result.warnings.forEach(warning => console.log(` - ${warning}`));
68
23
  }
24
+ console.log(`\nšŸŽ¬ Done! '${result.preset}' preset is active.`);
25
+ console.log(` Canonical config: ${result.configPath}\n`);
69
26
  }
70
- else {
71
- console.log(`
72
- šŸŽ¬ @milenyumai/film-kit — Hollywood-grade prompt engineering (Veo 3.1 + Kling 3.0)
73
-
74
- Usage:
75
- npx @milenyumai/film-kit init Configure AI agents in current directory
76
- npx @milenyumai/film-kit init --model veo31|kling-3.0 Select target model profile
77
- npx @milenyumai/film-kit init --model kling-3.0 --kling-preset ultra-realism|balanced|custom
78
- npx @milenyumai/film-kit init --overwrite Force update existing .agent content files
79
-
80
- Or install as a dependency (auto-configures on install):
81
- npm install --save-dev @milenyumai/film-kit
82
- `);
27
+ catch (err) {
28
+ console.error("āŒ Error:", err.message);
29
+ console.log(renderCliUsage());
30
+ process.exit(1);
83
31
  }
package/build/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export { configureFilmKit, detectFilmKitPreset, FILM_KIT_CONFIG_FILE, FILM_KIT_PRESETS, LEGACY_CONFIG_FILES } from "./lib/film-kit.js";
1
2
  export { configureAgents } from "./lib/configure.js";
2
- export type { AgentConfigOptions, ConfigureResult, KlingPreset, SupportedModel, SupportedPlatform } from "./lib/types.js";
3
+ export type { AgentConfigOptions, ConfigureFilmKitResult, ConfigureResult, FilmKitConfigFile, FilmKitConfigOptions, FilmKitPreset, HybridAspectRatio, KlingPreset, NanoBananaImageSize, SupportedModel, SupportedPlatform } from "./lib/types.js";
package/build/index.js CHANGED
@@ -1 +1,2 @@
1
+ export { configureFilmKit, detectFilmKitPreset, FILM_KIT_CONFIG_FILE, FILM_KIT_PRESETS, LEGACY_CONFIG_FILES } from "./lib/film-kit.js";
1
2
  export { configureAgents } from "./lib/configure.js";
@@ -0,0 +1,7 @@
1
+ import type { FilmKitConfigOptions } from "./types.js";
2
+ export interface ParsedCliCommand {
3
+ command: "init" | "help";
4
+ options?: FilmKitConfigOptions;
5
+ }
6
+ export declare function parseCliCommand(args: string[], rootDir?: string): Promise<ParsedCliCommand>;
7
+ export declare function renderCliUsage(): string;