@mevdragon/vidfarm-devcli 0.2.11 → 0.2.13

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 (199) hide show
  1. package/.env.example +37 -1
  2. package/README.md +27 -183
  3. package/SKILL.director.md +293 -0
  4. package/SKILL.platform.md +312 -0
  5. package/auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md +275 -0
  6. package/auto-create-hyperframe-templates/extractor-system-prompt.md +128 -0
  7. package/auto-create-hyperframe-templates/input-manifest.schema.json +56 -0
  8. package/auto-create-hyperframe-templates/lambda-memory-estimator.md +118 -0
  9. package/auto-create-hyperframe-templates/production-graph.schema.json +314 -0
  10. package/auto-create-hyperframe-templates/runbook.md +198 -0
  11. package/auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs +368 -0
  12. package/auto-create-hyperframe-templates/template-plan.schema.json +311 -0
  13. package/auto-create-hyperframe-templates/template-planner-prompt.md +144 -0
  14. package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +124 -0
  15. package/auto-create-templates/extractor-system-prompt.md +8 -2
  16. package/auto-create-templates/template-plan.schema.json +73 -2
  17. package/auto-create-templates/template-planner-prompt.md +63 -1
  18. package/dist/src/account-pages-legacy.js +361 -89
  19. package/dist/src/account-pages-legacy.js.map +1 -0
  20. package/dist/src/account-pages.js +13 -3
  21. package/dist/src/account-pages.js.map +1 -0
  22. package/dist/src/app.js +7060 -946
  23. package/dist/src/app.js.map +1 -0
  24. package/dist/src/cli.js +111 -29
  25. package/dist/src/cli.js.map +1 -0
  26. package/dist/src/composition-runtime.js +581 -0
  27. package/dist/src/composition-runtime.js.map +1 -0
  28. package/dist/src/config.js +69 -11
  29. package/dist/src/config.js.map +1 -0
  30. package/dist/src/context.js +280 -21
  31. package/dist/src/context.js.map +1 -0
  32. package/dist/src/dev-app-legacy.js +18 -17
  33. package/dist/src/dev-app-legacy.js.map +1 -0
  34. package/dist/src/dev-app.js +1 -0
  35. package/dist/src/dev-app.js.map +1 -0
  36. package/dist/src/domain.js +2 -1
  37. package/dist/src/domain.js.map +1 -0
  38. package/dist/src/editor-chat-history.js +10 -0
  39. package/dist/src/editor-chat-history.js.map +1 -0
  40. package/dist/src/editor-chat.js +133 -24
  41. package/dist/src/editor-chat.js.map +1 -0
  42. package/dist/src/frontend/flockposter-cache-store.js +10 -2
  43. package/dist/src/frontend/flockposter-cache-store.js.map +1 -0
  44. package/dist/src/frontend/homepage-client.js +6 -3
  45. package/dist/src/frontend/homepage-client.js.map +1 -0
  46. package/dist/src/frontend/homepage-shared.js +1 -0
  47. package/dist/src/frontend/homepage-shared.js.map +1 -0
  48. package/dist/src/frontend/homepage-store.js +1 -0
  49. package/dist/src/frontend/homepage-store.js.map +1 -0
  50. package/dist/src/frontend/homepage-view.js +131 -18
  51. package/dist/src/frontend/homepage-view.js.map +1 -0
  52. package/dist/src/frontend/page-runtime-client.js +5 -2
  53. package/dist/src/frontend/page-runtime-client.js.map +1 -0
  54. package/dist/src/frontend/page-runtime-store.js +1 -0
  55. package/dist/src/frontend/page-runtime-store.js.map +1 -0
  56. package/dist/src/frontend/sentry.js +42 -0
  57. package/dist/src/frontend/sentry.js.map +1 -0
  58. package/dist/src/frontend/template-editor-chat.js +1719 -213
  59. package/dist/src/frontend/template-editor-chat.js.map +1 -0
  60. package/dist/src/help-page.js +333 -0
  61. package/dist/src/help-page.js.map +1 -0
  62. package/dist/src/homepage.js +169 -47
  63. package/dist/src/homepage.js.map +1 -0
  64. package/dist/src/hyperframes/composition.js +180 -0
  65. package/dist/src/hyperframes/composition.js.map +1 -0
  66. package/dist/src/index.js +1 -0
  67. package/dist/src/index.js.map +1 -0
  68. package/dist/src/instrument.js +30 -0
  69. package/dist/src/instrument.js.map +1 -0
  70. package/dist/src/lib/crypto.js +1 -0
  71. package/dist/src/lib/crypto.js.map +1 -0
  72. package/dist/src/lib/dev-log.js +54 -0
  73. package/dist/src/lib/dev-log.js.map +1 -0
  74. package/dist/src/lib/display-name.js +11 -0
  75. package/dist/src/lib/display-name.js.map +1 -0
  76. package/dist/src/lib/ids.js +21 -1
  77. package/dist/src/lib/ids.js.map +1 -0
  78. package/dist/src/lib/images.js +1 -0
  79. package/dist/src/lib/images.js.map +1 -0
  80. package/dist/src/lib/json.js +1 -0
  81. package/dist/src/lib/json.js.map +1 -0
  82. package/dist/src/lib/template-dna.js +1 -0
  83. package/dist/src/lib/template-dna.js.map +1 -0
  84. package/dist/src/lib/template-paths.js +1 -0
  85. package/dist/src/lib/template-paths.js.map +1 -0
  86. package/dist/src/lib/template-style-options.js +40 -2
  87. package/dist/src/lib/template-style-options.js.map +1 -0
  88. package/dist/src/lib/time.js +1 -0
  89. package/dist/src/lib/time.js.map +1 -0
  90. package/dist/src/lib/video-quality-harness.js +60 -0
  91. package/dist/src/lib/video-quality-harness.js.map +1 -0
  92. package/dist/src/page-runtime.js +1 -0
  93. package/dist/src/page-runtime.js.map +1 -0
  94. package/dist/src/page-shell.js +1501 -49
  95. package/dist/src/page-shell.js.map +1 -0
  96. package/dist/src/primitive-context.js +144 -8
  97. package/dist/src/primitive-context.js.map +1 -0
  98. package/dist/src/primitive-registry.js +1919 -78
  99. package/dist/src/primitive-registry.js.map +1 -0
  100. package/dist/src/primitive-sdk.js +1 -0
  101. package/dist/src/primitive-sdk.js.map +1 -0
  102. package/dist/src/primitives/remotion/html-image.js +3 -1
  103. package/dist/src/primitives/remotion/html-image.js.map +1 -0
  104. package/dist/src/primitives/remotion/media-slideshow.js +60 -0
  105. package/dist/src/primitives/remotion/media-slideshow.js.map +1 -0
  106. package/dist/src/react-page-shell.js +1 -0
  107. package/dist/src/react-page-shell.js.map +1 -0
  108. package/dist/src/ready-post-schedule-component.js +1 -0
  109. package/dist/src/ready-post-schedule-component.js.map +1 -0
  110. package/dist/src/registry.js +237 -24
  111. package/dist/src/registry.js.map +1 -0
  112. package/dist/src/runtime.js +3 -0
  113. package/dist/src/runtime.js.map +1 -0
  114. package/dist/src/services/api-call-history.js +4 -0
  115. package/dist/src/services/api-call-history.js.map +1 -0
  116. package/dist/src/services/auth.js +40 -50
  117. package/dist/src/services/auth.js.map +1 -0
  118. package/dist/src/services/billing.js +20 -44
  119. package/dist/src/services/billing.js.map +1 -0
  120. package/dist/src/services/chat-threads.js +10 -6
  121. package/dist/src/services/chat-threads.js.map +1 -0
  122. package/dist/src/services/fork-access.js +94 -0
  123. package/dist/src/services/fork-access.js.map +1 -0
  124. package/dist/src/services/ghostcut.js +132 -0
  125. package/dist/src/services/ghostcut.js.map +1 -0
  126. package/dist/src/services/hyperframes.js +1014 -0
  127. package/dist/src/services/hyperframes.js.map +1 -0
  128. package/dist/src/services/job-capacity.js +14 -0
  129. package/dist/src/services/job-capacity.js.map +1 -0
  130. package/dist/src/services/job-logs.js +4 -0
  131. package/dist/src/services/job-logs.js.map +1 -0
  132. package/dist/src/services/jobs.js +99 -91
  133. package/dist/src/services/jobs.js.map +1 -0
  134. package/dist/src/services/media-processing.js +743 -0
  135. package/dist/src/services/media-processing.js.map +1 -0
  136. package/dist/src/services/primitive-media-lambda.js +280 -0
  137. package/dist/src/services/primitive-media-lambda.js.map +1 -0
  138. package/dist/src/services/providers.js +1560 -178
  139. package/dist/src/services/providers.js.map +1 -0
  140. package/dist/src/services/rate-limits.js +3 -2
  141. package/dist/src/services/rate-limits.js.map +1 -0
  142. package/dist/src/services/remotion.js +495 -92
  143. package/dist/src/services/remotion.js.map +1 -0
  144. package/dist/src/services/serverless-auth.js +374 -0
  145. package/dist/src/services/serverless-auth.js.map +1 -0
  146. package/dist/src/services/serverless-jobs.js +1074 -0
  147. package/dist/src/services/serverless-jobs.js.map +1 -0
  148. package/dist/src/services/serverless-provider-keys.js +401 -0
  149. package/dist/src/services/serverless-provider-keys.js.map +1 -0
  150. package/dist/src/services/serverless-records.js +1086 -0
  151. package/dist/src/services/serverless-records.js.map +1 -0
  152. package/dist/src/services/serverless-template-configs.js +67 -0
  153. package/dist/src/services/serverless-template-configs.js.map +1 -0
  154. package/dist/src/services/storage.js +170 -35
  155. package/dist/src/services/storage.js.map +1 -0
  156. package/dist/src/services/template-certification.js +295 -3
  157. package/dist/src/services/template-certification.js.map +1 -0
  158. package/dist/src/services/template-loader.js +45 -1
  159. package/dist/src/services/template-loader.js.map +1 -0
  160. package/dist/src/services/template-runtime-bundles.js +217 -0
  161. package/dist/src/services/template-runtime-bundles.js.map +1 -0
  162. package/dist/src/services/template-sources.js +452 -87
  163. package/dist/src/services/template-sources.js.map +1 -0
  164. package/dist/src/services/video-normalization.js +2 -0
  165. package/dist/src/services/video-normalization.js.map +1 -0
  166. package/dist/src/services/webhooks.js +7 -6
  167. package/dist/src/services/webhooks.js.map +1 -0
  168. package/dist/src/template-editor-pages.js +5637 -1322
  169. package/dist/src/template-editor-pages.js.map +1 -0
  170. package/dist/src/template-editor-shell.js +1376 -170
  171. package/dist/src/template-editor-shell.js.map +1 -0
  172. package/dist/src/template-sdk.js +1 -0
  173. package/dist/src/template-sdk.js.map +1 -0
  174. package/dist/src/worker.js +11 -226
  175. package/dist/src/worker.js.map +1 -0
  176. package/package.json +47 -12
  177. package/public/assets/homepage-client-app.js +34 -8
  178. package/public/assets/page-runtime-client-app.js +44 -18
  179. package/readme.secret.md +89 -0
  180. package/templates/vidfarm_template_0000/README.md +106 -0
  181. package/templates/vidfarm_template_0000/SKILL.md +266 -0
  182. package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
  183. package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
  184. package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
  185. package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
  186. package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
  187. package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
  188. package/templates/vidfarm_template_0000/composition.json +11 -0
  189. package/templates/vidfarm_template_0000/src/lib/images.js +221 -0
  190. package/templates/vidfarm_template_0000/src/remotion/Root.js +33 -0
  191. package/templates/vidfarm_template_0000/src/remotion/index.js +3 -0
  192. package/templates/vidfarm_template_0000/src/sdk.js +3 -0
  193. package/templates/vidfarm_template_0000/src/style-options.js +200 -0
  194. package/templates/vidfarm_template_0000/src/template-dna.js +9 -0
  195. package/templates/vidfarm_template_0000/src/template.js +1566 -0
  196. package/templates/vidfarm_template_0000/template.config.json +21 -0
  197. package/GETTING_STARTED.developers.md +0 -87
  198. package/SKILL.developer.md +0 -1177
  199. package/dist/src/db.js +0 -2007
@@ -33,7 +33,12 @@ Return only JSON matching `production-graph.schema.json`.
33
33
  - Identify which elements are fixed, variable, optional, or generated.
34
34
  - Extract exact or inferred durations for scenes, captions, overlays, transitions, zooms, holds, and loop points.
35
35
  - Treat timing as a reusable control surface. If a source slot has a duration, decide whether future users should be able to override it.
36
- - Strongly identify TikTok-native typography: font family match, weight, case, outline, shadow, background chip, word highlight, line wrapping, and fallback font stack.
36
+ - Strongly identify TikTok-native typography: font family match, weight, case, outline, shadow, background chip, word highlight, line wrapping, line height, and fallback font stack.
37
+ - Classify every important readable text surface as deterministic overlay text, source-media text, or AI-rendered poster/artifact text. Important captions, subtitles, UI labels, offers, prices, claims, and CTAs should default to deterministic overlay text unless the format is explicitly poster/artifact-native.
38
+ - Treat fonts as an allowlist decision. Prefer approved Vidfarm font IDs where possible: `tiktok_sans_semibold`, `montserrat_semibold`, `source_code_pro_bold`, `georgia_bold`, or `abel`. Mark custom or AI-rendered typography as source-critical only when the viral mechanism depends on it.
39
+ - When a text background color appears, classify it as an inline highlight chip unless the source clearly uses a deliberate poster panel. Record that the chip must be measured per wrapped line and must not become a full-width caption box or paragraph wash.
40
+ - When white creator-authored TikTok captions appear, distinguish native radial black halo/outline from web-style directional drop shadow. Record centered multi-layer shadow/blur requirements when the shadow radiates around the glyphs.
41
+ - When captions wrap across lines, record block-level rendering requirements: one shared font size and line height for the full multiline caption, shadow/outline applied to the whole block, and any per-line chip geometry derived after the shared layout. Do not recommend independently trimmed per-line text images.
37
42
  - Prefer deterministic Remotion/HTML composition for layout, captions, overlays, app UI, and final edit.
38
43
  - Do not force Remotion when it would become brittle. If the format depends on organic visual detail, character acting, cinematic continuity, generated texture, painterly style, or complex physical motion, mark it as AI-native prompt/reference or hybrid.
39
44
  - Use AI image/video only for assets that require generative content.
@@ -67,6 +72,7 @@ Extract:
67
72
  - safe areas and layout constraints
68
73
  - provider/tool dependencies
69
74
  - validation checklist
75
+ - output quality harness gates: preflight, asset check, composition check, final-output check, and targeted retry rules
70
76
 
71
77
  ## Implementation Classification
72
78
 
@@ -106,7 +112,7 @@ Bad: "Use engaging captions and quick cuts."
106
112
 
107
113
  Good: "Render 2-line white uppercase captions centered at y=178 with black 2px shadow, max 22 characters per line, timed to word groups of 700-1400 ms. Insert 1.08x punch-in zoom on every sentence start."
108
114
 
109
- Typography bias: if the format uses creator-authored captions or overlays, default to TikTok-native typography. Prefer TikTok Sans Semibold when available; otherwise choose the closest checked-in or system fallback and record the fallback explicitly.
115
+ Typography bias: if the format uses creator-authored captions or overlays, default to TikTok-native typography. Prefer TikTok Sans Semibold when available; otherwise choose the closest checked-in or system fallback and record the fallback explicitly. Tune TikTok Sans wrapping, size, and line spacing separately from Montserrat or generic sans defaults. If a background color is present, describe inline line chips that hug the text. If a white caption needs contrast, describe a radial black halo/outline instead of a large one-direction web shadow.
110
116
 
111
117
  Viral preservation bias: if a choice conflicts between visual sameness and viral effectiveness, preserve the viral mechanism first. Example: if the source wins because of a shocking first-frame claim, preserve the claim structure and pacing even if the background scene changes. If it wins because of a recognizable fake-chat, notification, or game UI container, then visual preservation is likely critical.
112
118
 
@@ -28,6 +28,8 @@
28
28
  "description",
29
29
  "viral_dna",
30
30
  "visual_dna",
31
+ "links_to_inspiration",
32
+ "sound",
31
33
  "proposal_generator",
32
34
  "skeleton_prompt",
33
35
  "sample_prompts"
@@ -38,6 +40,16 @@
38
40
  "description": { "type": "string" },
39
41
  "viral_dna": { "type": "string" },
40
42
  "visual_dna": { "type": "string" },
43
+ "links_to_inspiration": { "type": "array", "items": { "type": "string" } },
44
+ "sound": {
45
+ "type": "object",
46
+ "required": ["sound_title", "sound_url"],
47
+ "properties": {
48
+ "sound_title": { "type": "string" },
49
+ "sound_url": { "type": "string" }
50
+ },
51
+ "additionalProperties": false
52
+ },
41
53
  "proposal_generator": { "type": "string" },
42
54
  "skeleton_prompt": { "type": "string" },
43
55
  "sample_prompts": { "type": "array", "items": { "type": "string" }, "minItems": 3 }
@@ -159,10 +171,51 @@
159
171
  },
160
172
  "typography": {
161
173
  "type": "object",
162
- "required": ["recommended_default", "tiktok_native", "configurable_fields"],
174
+ "required": [
175
+ "recommended_default",
176
+ "tiktok_native",
177
+ "allowed_font_ids",
178
+ "custom_font_policy",
179
+ "generated_text_policy",
180
+ "configurable_fields"
181
+ ],
163
182
  "properties": {
164
183
  "recommended_default": { "type": "string" },
165
184
  "tiktok_native": { "type": "boolean" },
185
+ "allowed_font_ids": {
186
+ "type": "array",
187
+ "items": {
188
+ "enum": [
189
+ "tiktok_sans_semibold",
190
+ "montserrat_semibold",
191
+ "source_code_pro_bold",
192
+ "georgia_bold",
193
+ "abel",
194
+ "montserrat",
195
+ "source_code_pro",
196
+ "custom"
197
+ ]
198
+ },
199
+ "minItems": 1
200
+ },
201
+ "custom_font_policy": {
202
+ "type": "object",
203
+ "required": ["allowed", "required_rationale", "documentation_points"],
204
+ "properties": {
205
+ "allowed": { "type": "boolean" },
206
+ "required_rationale": { "type": "string" },
207
+ "documentation_points": { "type": "array", "items": { "type": "string" } }
208
+ }
209
+ },
210
+ "generated_text_policy": {
211
+ "type": "object",
212
+ "required": ["important_text_must_be_deterministic", "ai_rendered_text_allowed", "rules"],
213
+ "properties": {
214
+ "important_text_must_be_deterministic": { "type": "boolean" },
215
+ "ai_rendered_text_allowed": { "type": "boolean" },
216
+ "rules": { "type": "array", "items": { "type": "string" } }
217
+ }
218
+ },
166
219
  "font_files": { "type": "array", "items": { "type": "string" } },
167
220
  "fallback_fonts": { "type": "array", "items": { "type": "string" } },
168
221
  "configurable_fields": { "type": "array", "items": { "type": "string" } },
@@ -220,10 +273,28 @@
220
273
  },
221
274
  "validation": {
222
275
  "type": "object",
276
+ "required": ["commands", "artifact_checks", "visual_checks", "quality_harness"],
223
277
  "properties": {
224
278
  "commands": { "type": "array", "items": { "type": "string" } },
225
279
  "artifact_checks": { "type": "array", "items": { "type": "string" } },
226
- "visual_checks": { "type": "array", "items": { "type": "string" } }
280
+ "visual_checks": { "type": "array", "items": { "type": "string" } },
281
+ "quality_harness": {
282
+ "type": "object",
283
+ "required": [
284
+ "report_fields",
285
+ "preflight_checks",
286
+ "composition_checks",
287
+ "final_output_checks",
288
+ "retry_rules"
289
+ ],
290
+ "properties": {
291
+ "report_fields": { "type": "array", "items": { "type": "string" } },
292
+ "preflight_checks": { "type": "array", "items": { "type": "string" }, "minItems": 3 },
293
+ "composition_checks": { "type": "array", "items": { "type": "string" }, "minItems": 3 },
294
+ "final_output_checks": { "type": "array", "items": { "type": "string" }, "minItems": 3 },
295
+ "retry_rules": { "type": "array", "items": { "type": "string" }, "minItems": 2 }
296
+ }
297
+ }
227
298
  }
228
299
  }
229
300
  }
@@ -16,9 +16,28 @@ The template must persist and actively use the source format's viral DNA. Viral
16
16
  - Do not force Remotion for formats whose complexity ceiling is better handled by AI-native image/video generation with source references. Use Remotion only for final stitching, captions, timing wrappers, or end cards in those cases.
17
17
  - Expose timing controls as operation inputs or config where users will reasonably want bulk variation: scene duration, slide duration, clip slot duration, caption timing mode, transition length, hold length, and total duration target.
18
18
  - Prefer TikTok-native caption typography. When captions or overlays matter, default to TikTok Sans Semibold or the closest available local fallback, and make font/styling configurable when the source format depends on it.
19
+ - Treat fonts as an allowlist, not a soft preference. Caption and overlay text must use approved template font IDs by default: `tiktok_sans_semibold`, `montserrat_semibold`, `source_code_pro_bold`, `georgia_bold`, or `abel`. Legacy aliases `montserrat` and `source_code_pro` may be accepted only for backward compatibility. Custom fonts require a source-format rationale, asset path, fallback, and explicit SKILL.md documentation.
20
+ - Do not let image or video models render important readable text by default. For captions, subtitles, app UI labels, offers, prices, claims, and CTAs, plan to generate clean media first and composite text deterministically with Remotion, SVG/canvas, or Sharp. Allow AI-rendered text only for source-critical poster/artifact formats and require OCR/readability checks in the quality harness.
21
+ - If a caption uses a background color, require inline highlight chips per wrapped line. Chips must hug measured glyph bounds plus padding; never use full-width bars, paragraph washes, or a single loose rectangle behind the whole caption.
22
+ - For white TikTok-native captions, require a radial black halo/outline around the full caption block. Avoid web-style directional drop shadows such as a single `0 8px 24px` shadow; centered multi-layer shadows or blurred text alpha masks are preferred.
23
+ - For multiline captions, require a block-level renderer: wrap once, pick one font size and line height for the whole caption, render one multiline text block, and apply shadow/outline to the whole block. Do not render wrapped lines as separate trimmed images. Tune TikTok Sans wrapping, size, and leading separately from Montserrat defaults.
24
+ - Include a quality harness that can reject outputs before a user sees them. The harness must define preflight checks, composition checks, final-output checks, retry rules, and a manifest/report shape. It must distinguish failures that require code/config fixes from failures that can be solved by regenerating AI assets.
19
25
  - Use AI providers for text, image, video, TTS, STT, and layout analysis only where needed.
26
+ - Use the developer standard's recommended baseline provider/model set unless the source format or runtime support requires a documented exception.
27
+ - Persist provider/model dependencies in two places: template-local `SKILL.md` and near the top of `src/template.ts` as a checked-in constant or clearly named comment block.
28
+ - Provider selection must be availability-aware before any AI generation step starts. Template jobs must call `ctx.providers.*` helpers so the platform can choose from the customer's active saved keys for the requested capability.
29
+ - Do not set a fixed `providerHint`, hardcoded provider fallback, or operation payload default that can strand jobs when the customer lacks that provider key. Parser helpers must not silently return `"gemini"` or another provider when config is missing.
30
+ - Provider preference fields such as `defaultProvider`, `textProvider`, `imageProvider`, `ttsProvider`, or `transcriptionProvider` belong in `configSchema`, but should usually be optional saved preferences rather than fixed `.default("openai")` or `.default("gemini")` values.
31
+ - Do not put `.default(...)` on operation payload provider fields such as `provider`, `tts_provider`, `speech_provider`, or `transcription_provider`. Operation provider fields are explicit per-run overrides only and must be optional.
32
+ - Job code should express provider preference as: explicit payload override, then saved template config, then platform-compatible fallback from available customer keys, then documented failure. Matching model overrides should only apply when valid for the effective provider.
33
+ - OpenAI image calls must use only supported `size` values: `1024x1024`, `1536x1024`, `1024x1536`, `2048x2048`, `2048x1152`, `3840x2160`, `2160x3840`, or `auto`.
34
+ - Gemini image calls must use `aspectRatio` from `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `21:9`, or `9:21`, plus `imageSize` from `1K`, `2K`, or `4K`; do not pass unsupported pixel sizes.
35
+ - When image generation can fall back across providers, translate target framing into the selected provider's supported size parameters per call.
20
36
  - Store generated media with `ctx.storage`; return artifact URLs, manifests, and render inputs.
21
- - Include `about.proposal_generator`, `about.skeleton_prompt`, and `about.sample_prompts`.
37
+ - Template storage keys must be job-relative, for example `backgrounds/slide-01.png`, `slides/slide-01.png`, `audio/narration.wav`, `renders/final.mp4`, or `manifests/run.json`.
38
+ - Do not generate template code that passes absolute platform keys like `templates/${templateId}/users/${ctx.customer.id}/...` to `ctx.storage`; hosted Vidfarm prepends the template/user/job namespace automatically.
39
+ - Do not generate template code that imports the AWS SDK, creates an S3 client, mutates `process.env.AWS_*`, or reads `REMOTION_AWS_*`. Storage and Remotion access must go through `ctx.storage` and `ctx.remotion`.
40
+ - Include `about.links_to_inspiration` as a string array of source/inspiration URLs, `about.sound` with `sound_title` and `sound_url`, plus `about.proposal_generator`, `about.skeleton_prompt`, and `about.sample_prompts`.
22
41
  - Include smoke test payloads for every operation.
23
42
  - Include template-local `SKILL.md` requirements and route examples.
24
43
 
@@ -45,12 +64,15 @@ The plan must include:
45
64
  - architecture fit decision with Remotion ceiling rationale
46
65
  - character-consistency workflow and operations when the source is a recurring-character AI video
47
66
  - provider requirements
67
+ - provider/model recommendation constants, including the selected defaults and any documented exceptions
48
68
  - config schema fields
49
69
  - timing controls and default duration rules
50
70
  - caption font/style defaults and override rules
71
+ - allowed font IDs, custom font exception rules, and deterministic-vs-generated text policy
51
72
  - operations and payload schemas
52
73
  - job workflow steps
53
74
  - artifact manifest shape
75
+ - quality harness report fields, gates, and retry plan
54
76
  - Remotion composition plan
55
77
  - AI-native prompt/reference plan when applicable
56
78
  - character cards, storyboard frames, scene clips, and final stitched render artifact plan when applicable
@@ -59,6 +81,46 @@ The plan must include:
59
81
  - implementation risks
60
82
  - suggested directory/files to create
61
83
 
84
+ ## Recommended Provider Defaults
85
+
86
+ Plans should start from this baseline when the relevant capability is used:
87
+
88
+ ```ts
89
+ const TEMPLATE_PROVIDER_RECOMMENDATIONS = {
90
+ text: {
91
+ openai: "gpt-5.4",
92
+ gemini: "gemini-3.1-flash-lite",
93
+ openrouter: "qwen/qwen3.6-flash"
94
+ },
95
+ layout_analysis: {
96
+ openai: "gpt-5.4",
97
+ gemini: "gemini-3.1-flash-lite",
98
+ openrouter: "qwen/qwen3.6-flash"
99
+ },
100
+ image: {
101
+ openai: "gpt-image-2",
102
+ gemini: "gemini-3-pro-image-preview",
103
+ openrouter: "google/gemini-3.1-flash-image-preview"
104
+ },
105
+ video: {
106
+ openai: "sora-2",
107
+ gemini: "veo-3.0-generate-001"
108
+ },
109
+ tts: {
110
+ openai: "gpt-4o-mini-tts-2025-12-15",
111
+ gemini: "gemini-3.1-flash-tts-preview",
112
+ openrouter: "google/gemini-3.1-flash-tts-preview"
113
+ },
114
+ stt: {
115
+ openai: "gpt-4o-mini-transcribe-2025-12-15",
116
+ gemini: "gemini-3.1-flash-lite-preview",
117
+ openrouter: "openai/gpt-4o-mini-transcribe"
118
+ }
119
+ } as const;
120
+ ```
121
+
122
+ If the platform adapter only supports a subset for a given capability, mark unsupported pairs as planned or aspirational rather than presenting them as runnable defaults.
123
+
62
124
  ## Quality Bar
63
125
 
64
126
  The plan is not complete unless another agent can implement it without asking what the source format does.