@milenyumai/film-kit 1.4.3 → 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 (125) hide show
  1. package/README.md +307 -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 +114 -12
  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 +80 -19
  18. package/content/skills/audio-design/SKILL.md +40 -9
  19. package/content/skills/prompt-structure/SKILL.md +75 -7
  20. package/content/workflows/chain.md +1 -0
  21. package/content/workflows/finish.md +4 -0
  22. package/content/workflows/generate.md +24 -0
  23. package/content/workflows/safety-check.md +7 -0
  24. package/package.json +14 -4
  25. package/packages/hybrid/LICENSE +21 -0
  26. package/packages/hybrid/README.md +67 -0
  27. package/packages/hybrid/build/cli.d.ts +2 -0
  28. package/packages/hybrid/build/cli.js +97 -0
  29. package/packages/hybrid/build/index.d.ts +2 -0
  30. package/packages/hybrid/build/index.js +1 -0
  31. package/packages/hybrid/build/lib/configure.d.ts +2 -0
  32. package/packages/hybrid/build/lib/configure.js +222 -0
  33. package/packages/hybrid/build/lib/defaults.d.ts +2 -0
  34. package/packages/hybrid/build/lib/defaults.js +24 -0
  35. package/packages/hybrid/build/lib/fs.d.ts +3 -0
  36. package/packages/hybrid/build/lib/fs.js +23 -0
  37. package/packages/hybrid/build/lib/templates.d.ts +2 -0
  38. package/packages/hybrid/build/lib/templates.js +648 -0
  39. package/packages/hybrid/build/lib/types.d.ts +39 -0
  40. package/packages/hybrid/build/lib/types.js +1 -0
  41. package/packages/hybrid/build/postinstall.d.ts +1 -0
  42. package/packages/hybrid/build/postinstall.js +30 -0
  43. package/packages/hybrid/content/HYBRID-OVERRIDES.md +91 -0
  44. package/packages/hybrid/content/skills/nano-banana-pro-image/SKILL.md +79 -0
  45. package/packages/hybrid/content/skills/prompt-structure/SKILL.md +227 -0
  46. package/packages/hybrid/content/workflows/generate.md +126 -0
  47. package/packages/hybrid-smart/LICENSE +21 -0
  48. package/packages/hybrid-smart/README.md +70 -0
  49. package/packages/hybrid-smart/build/cli.d.ts +2 -0
  50. package/packages/hybrid-smart/build/cli.js +98 -0
  51. package/packages/hybrid-smart/build/index.d.ts +2 -0
  52. package/packages/hybrid-smart/build/index.js +1 -0
  53. package/packages/hybrid-smart/build/lib/configure.d.ts +2 -0
  54. package/packages/hybrid-smart/build/lib/configure.js +237 -0
  55. package/packages/hybrid-smart/build/lib/defaults.d.ts +2 -0
  56. package/packages/hybrid-smart/build/lib/defaults.js +36 -0
  57. package/packages/hybrid-smart/build/lib/fs.d.ts +3 -0
  58. package/packages/hybrid-smart/build/lib/fs.js +23 -0
  59. package/packages/hybrid-smart/build/lib/templates.d.ts +2 -0
  60. package/packages/hybrid-smart/build/lib/templates.js +742 -0
  61. package/packages/hybrid-smart/build/lib/types.d.ts +48 -0
  62. package/packages/hybrid-smart/build/lib/types.js +1 -0
  63. package/packages/hybrid-smart/build/postinstall.d.ts +1 -0
  64. package/packages/hybrid-smart/build/postinstall.js +30 -0
  65. package/packages/hybrid-smart/content/SMART-HYBRID-OVERRIDES.md +112 -0
  66. package/packages/hybrid-smart/content/skills/nano-banana-pro-image/SKILL.md +79 -0
  67. package/packages/hybrid-smart/content/skills/prompt-structure/SKILL.md +279 -0
  68. package/packages/hybrid-smart/content/workflows/generate.md +139 -0
  69. package/packages/multi/LICENSE +21 -0
  70. package/packages/multi/README.md +122 -0
  71. package/packages/multi/build/cli.d.ts +2 -0
  72. package/packages/multi/build/cli.js +84 -0
  73. package/packages/multi/build/index.d.ts +2 -0
  74. package/packages/multi/build/index.js +1 -0
  75. package/packages/multi/build/lib/configure.d.ts +2 -0
  76. package/packages/multi/build/lib/configure.js +260 -0
  77. package/packages/multi/build/lib/defaults.d.ts +2 -0
  78. package/packages/multi/build/lib/defaults.js +23 -0
  79. package/packages/multi/build/lib/fs.d.ts +3 -0
  80. package/packages/multi/build/lib/fs.js +23 -0
  81. package/packages/multi/build/lib/templates.d.ts +6 -0
  82. package/packages/multi/build/lib/templates.js +1249 -0
  83. package/packages/multi/build/lib/types.d.ts +43 -0
  84. package/packages/multi/build/lib/types.js +1 -0
  85. package/packages/multi/build/postinstall.d.ts +1 -0
  86. package/packages/multi/build/postinstall.js +18 -0
  87. package/packages/multi/content/agents/character-consistency-auditor.md +76 -0
  88. package/packages/multi/content/agents/color-continuity-auditor.md +69 -0
  89. package/packages/multi/content/agents/continuity-editor.md +54 -0
  90. package/packages/multi/content/agents/delivery-editor.md +64 -0
  91. package/packages/multi/content/agents/dialogue-auditor.md +74 -0
  92. package/packages/multi/content/agents/lead-director.md +325 -0
  93. package/packages/multi/content/agents/pacing-auditor.md +77 -0
  94. package/packages/multi/content/agents/safety-auditor.md +60 -0
  95. package/packages/multi/content/agents/semantic-auditor.md +71 -0
  96. package/packages/multi/content/agents/shot-generator.md +175 -0
  97. package/packages/multi/content/agents/stability-auditor.md +83 -0
  98. package/packages/multi/content/skills/director-shot-sizing/SKILL.md +170 -0
  99. package/packages/multi/content/workflows/chain-multi.md +29 -0
  100. package/packages/multi/content/workflows/finish-multi.md +47 -0
  101. package/packages/multi/content/workflows/generate-multi.md +134 -0
  102. package/packages/multi/content/workflows/generate-teammate.md +105 -0
  103. package/packages/multi/content/workflows/recover-multi.md +53 -0
  104. package/packages/multi/content/workflows/safety-check-multi.md +98 -0
  105. package/packages/studio/LICENSE +21 -0
  106. package/packages/studio/README.md +82 -0
  107. package/packages/studio/build/cli.d.ts +2 -0
  108. package/packages/studio/build/cli.js +96 -0
  109. package/packages/studio/build/index.d.ts +2 -0
  110. package/packages/studio/build/index.js +1 -0
  111. package/packages/studio/build/lib/configure.d.ts +2 -0
  112. package/packages/studio/build/lib/configure.js +337 -0
  113. package/packages/studio/build/lib/defaults.d.ts +2 -0
  114. package/packages/studio/build/lib/defaults.js +35 -0
  115. package/packages/studio/build/lib/fs.d.ts +3 -0
  116. package/packages/studio/build/lib/fs.js +25 -0
  117. package/packages/studio/build/lib/templates.d.ts +6 -0
  118. package/packages/studio/build/lib/templates.js +1369 -0
  119. package/packages/studio/build/lib/types.d.ts +42 -0
  120. package/packages/studio/build/lib/types.js +1 -0
  121. package/packages/studio/build/postinstall.d.ts +1 -0
  122. package/packages/studio/build/postinstall.js +25 -0
  123. package/packages/studio/content/agents/render-supervisor.md +191 -0
  124. package/packages/studio/content/skills/fal-render/SKILL.md +192 -0
  125. package/packages/studio/content/workflows/render.md +106 -0
package/README.md CHANGED
@@ -1,239 +1,384 @@
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:
42
+
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
+ ```
68
51
 
69
- Key contracts:
52
+ After the first run, Film-Kit writes `film-kit.config.json` and uses that file as the canonical project configuration.
70
53
 
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
54
+ ## Presets
74
55
 
75
- ### 2. `@milenyumai/film-kit-multi`
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 |
76
63
 
77
- Parallel production package with Lead Director, shot teammates, and specialist validation.
64
+ ## Model Support
78
65
 
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
- ```
66
+ ### `veo31`
84
67
 
85
- Best for:
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
86
71
 
87
- - larger productions
88
- - 10+ shot sequences
89
- - team-style generation inside Claude Code Agent Teams or Antigravity Mission Control
72
+ ### `seedance-2.0`
90
73
 
91
- Key contracts:
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
- - `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
83
+ ### `kling-3.0`
97
84
 
98
- ### 3. `@milenyumai/film-kit-hybrid`
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
99
89
 
100
- Hybrid package for Nano Banana still prompts and Kling 3.0 video prompts.
90
+ ### `kling-preset`
101
91
 
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
- ```
92
+ `preset` and `kling-preset` are different things:
107
93
 
108
- Pipeline:
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`
109
97
 
110
- - `ILK/SON` still prompts -> Nano Banana Pro / Google
111
- - `VIDEO` prompts -> Kling 3.0
98
+ Supported `kling-preset` values:
112
99
 
113
- Key contracts:
100
+ - `ultra-realism`
101
+ - `balanced`
102
+ - `custom`
114
103
 
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
104
+ When the active model is not Kling, generated runtime files intentionally render the Kling preset as `n/a (Kling-only)`.
120
105
 
121
- ### 4. `@milenyumai/film-kit-hybrid-smart`
106
+ ## CLI
122
107
 
123
- Hybrid package with Nano Banana stills and dialogue-aware video routing.
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:
138
-
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
114
+ Help:
144
115
 
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
- }
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);
207
305
  ```
208
306
 
209
- 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.
210
308
 
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
- }
220
- ```
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:
221
336
 
222
- ## 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:
223
351
 
224
352
  ```bash
225
- npm install
226
353
  npm run typecheck
227
354
  npm test
355
+ npm run build
356
+ npm pack --json --dry-run
228
357
  ```
229
358
 
230
- 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
+ ```
231
366
 
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`
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
+ ```
237
382
 
238
383
  ## License
239
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;