@mevdragon/vidfarm-devcli 0.2.14 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +11 -4
  2. package/SKILL.director.md +100 -0
  3. package/SKILL.platform.md +66 -6
  4. package/dist/src/cli.js +135 -1527
  5. package/package.json +5 -24
  6. package/.env.example +0 -60
  7. package/auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md +0 -275
  8. package/auto-create-hyperframe-templates/extractor-system-prompt.md +0 -128
  9. package/auto-create-hyperframe-templates/input-manifest.schema.json +0 -56
  10. package/auto-create-hyperframe-templates/lambda-memory-estimator.md +0 -118
  11. package/auto-create-hyperframe-templates/production-graph.schema.json +0 -314
  12. package/auto-create-hyperframe-templates/runbook.md +0 -198
  13. package/auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs +0 -368
  14. package/auto-create-hyperframe-templates/template-plan.schema.json +0 -311
  15. package/auto-create-hyperframe-templates/template-planner-prompt.md +0 -144
  16. package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +0 -599
  17. package/auto-create-templates/extractor-system-prompt.md +0 -119
  18. package/auto-create-templates/production-graph.schema.json +0 -276
  19. package/auto-create-templates/runbook.md +0 -140
  20. package/auto-create-templates/template-plan.schema.json +0 -301
  21. package/auto-create-templates/template-planner-prompt.md +0 -137
  22. package/dist/src/account-pages-legacy.js +0 -9338
  23. package/dist/src/account-pages-legacy.js.map +0 -1
  24. package/dist/src/account-pages.js +0 -52
  25. package/dist/src/account-pages.js.map +0 -1
  26. package/dist/src/app.js +0 -13711
  27. package/dist/src/app.js.map +0 -1
  28. package/dist/src/cli.js.map +0 -1
  29. package/dist/src/composition-runtime.js +0 -581
  30. package/dist/src/composition-runtime.js.map +0 -1
  31. package/dist/src/config.js +0 -140
  32. package/dist/src/config.js.map +0 -1
  33. package/dist/src/context.js +0 -492
  34. package/dist/src/context.js.map +0 -1
  35. package/dist/src/dev-app-legacy.js +0 -694
  36. package/dist/src/dev-app-legacy.js.map +0 -1
  37. package/dist/src/dev-app.js +0 -6
  38. package/dist/src/dev-app.js.map +0 -1
  39. package/dist/src/dev-serve.js.map +0 -1
  40. package/dist/src/domain.js +0 -2
  41. package/dist/src/domain.js.map +0 -1
  42. package/dist/src/editor-chat-history.js +0 -82
  43. package/dist/src/editor-chat-history.js.map +0 -1
  44. package/dist/src/editor-chat.js +0 -312
  45. package/dist/src/editor-chat.js.map +0 -1
  46. package/dist/src/editor-dark-theme.js +0 -1128
  47. package/dist/src/editor-dark-theme.js.map +0 -1
  48. package/dist/src/frontend/flockposter-cache-store.js +0 -124
  49. package/dist/src/frontend/flockposter-cache-store.js.map +0 -1
  50. package/dist/src/frontend/homepage-client.js +0 -117
  51. package/dist/src/frontend/homepage-client.js.map +0 -1
  52. package/dist/src/frontend/homepage-shared.js +0 -4
  53. package/dist/src/frontend/homepage-shared.js.map +0 -1
  54. package/dist/src/frontend/homepage-store.js +0 -28
  55. package/dist/src/frontend/homepage-store.js.map +0 -1
  56. package/dist/src/frontend/homepage-view.js +0 -260
  57. package/dist/src/frontend/homepage-view.js.map +0 -1
  58. package/dist/src/frontend/page-runtime-client.js +0 -124
  59. package/dist/src/frontend/page-runtime-client.js.map +0 -1
  60. package/dist/src/frontend/page-runtime-store.js +0 -9
  61. package/dist/src/frontend/page-runtime-store.js.map +0 -1
  62. package/dist/src/frontend/sentry.js +0 -42
  63. package/dist/src/frontend/sentry.js.map +0 -1
  64. package/dist/src/frontend/template-editor-chat.js +0 -3760
  65. package/dist/src/frontend/template-editor-chat.js.map +0 -1
  66. package/dist/src/help-page.js +0 -333
  67. package/dist/src/help-page.js.map +0 -1
  68. package/dist/src/homepage.js +0 -919
  69. package/dist/src/homepage.js.map +0 -1
  70. package/dist/src/hyperframes/composition.js +0 -180
  71. package/dist/src/hyperframes/composition.js.map +0 -1
  72. package/dist/src/index.js +0 -16
  73. package/dist/src/index.js.map +0 -1
  74. package/dist/src/instrument.js +0 -30
  75. package/dist/src/instrument.js.map +0 -1
  76. package/dist/src/lib/crypto.js +0 -45
  77. package/dist/src/lib/crypto.js.map +0 -1
  78. package/dist/src/lib/dev-log.js +0 -54
  79. package/dist/src/lib/dev-log.js.map +0 -1
  80. package/dist/src/lib/display-name.js +0 -11
  81. package/dist/src/lib/display-name.js.map +0 -1
  82. package/dist/src/lib/ids.js +0 -24
  83. package/dist/src/lib/ids.js.map +0 -1
  84. package/dist/src/lib/images.js +0 -19
  85. package/dist/src/lib/images.js.map +0 -1
  86. package/dist/src/lib/json.js +0 -15
  87. package/dist/src/lib/json.js.map +0 -1
  88. package/dist/src/lib/template-dna.js +0 -543
  89. package/dist/src/lib/template-dna.js.map +0 -1
  90. package/dist/src/lib/template-paths.js +0 -28
  91. package/dist/src/lib/template-paths.js.map +0 -1
  92. package/dist/src/lib/template-style-options.js +0 -203
  93. package/dist/src/lib/template-style-options.js.map +0 -1
  94. package/dist/src/lib/time.js +0 -7
  95. package/dist/src/lib/time.js.map +0 -1
  96. package/dist/src/lib/video-quality-harness.js +0 -60
  97. package/dist/src/lib/video-quality-harness.js.map +0 -1
  98. package/dist/src/page-runtime.js +0 -2
  99. package/dist/src/page-runtime.js.map +0 -1
  100. package/dist/src/page-shell.js +0 -1315
  101. package/dist/src/page-shell.js.map +0 -1
  102. package/dist/src/primitive-context.js +0 -299
  103. package/dist/src/primitive-context.js.map +0 -1
  104. package/dist/src/primitive-registry.js +0 -2181
  105. package/dist/src/primitive-registry.js.map +0 -1
  106. package/dist/src/primitive-sdk.js +0 -4
  107. package/dist/src/primitive-sdk.js.map +0 -1
  108. package/dist/src/primitives/remotion/html-image.js +0 -30
  109. package/dist/src/primitives/remotion/html-image.js.map +0 -1
  110. package/dist/src/primitives/remotion/media-slideshow.js +0 -60
  111. package/dist/src/primitives/remotion/media-slideshow.js.map +0 -1
  112. package/dist/src/react-page-shell.js +0 -35
  113. package/dist/src/react-page-shell.js.map +0 -1
  114. package/dist/src/ready-post-schedule-component.js +0 -1515
  115. package/dist/src/ready-post-schedule-component.js.map +0 -1
  116. package/dist/src/registry.js +0 -296
  117. package/dist/src/registry.js.map +0 -1
  118. package/dist/src/runtime.js +0 -31
  119. package/dist/src/runtime.js.map +0 -1
  120. package/dist/src/services/api-call-history.js +0 -249
  121. package/dist/src/services/api-call-history.js.map +0 -1
  122. package/dist/src/services/auth.js +0 -152
  123. package/dist/src/services/auth.js.map +0 -1
  124. package/dist/src/services/billing.js +0 -231
  125. package/dist/src/services/billing.js.map +0 -1
  126. package/dist/src/services/chat-threads.js +0 -92
  127. package/dist/src/services/chat-threads.js.map +0 -1
  128. package/dist/src/services/fork-access.js +0 -93
  129. package/dist/src/services/fork-access.js.map +0 -1
  130. package/dist/src/services/fork-manifest.js +0 -43
  131. package/dist/src/services/fork-manifest.js.map +0 -1
  132. package/dist/src/services/ghostcut.js +0 -132
  133. package/dist/src/services/ghostcut.js.map +0 -1
  134. package/dist/src/services/hyperframes.js +0 -1014
  135. package/dist/src/services/hyperframes.js.map +0 -1
  136. package/dist/src/services/job-capacity.js +0 -14
  137. package/dist/src/services/job-capacity.js.map +0 -1
  138. package/dist/src/services/job-logs.js +0 -197
  139. package/dist/src/services/job-logs.js.map +0 -1
  140. package/dist/src/services/jobs.js +0 -136
  141. package/dist/src/services/jobs.js.map +0 -1
  142. package/dist/src/services/media-processing.js +0 -743
  143. package/dist/src/services/media-processing.js.map +0 -1
  144. package/dist/src/services/primitive-media-lambda.js +0 -280
  145. package/dist/src/services/primitive-media-lambda.js.map +0 -1
  146. package/dist/src/services/providers.js +0 -2870
  147. package/dist/src/services/providers.js.map +0 -1
  148. package/dist/src/services/rate-limits.js +0 -237
  149. package/dist/src/services/rate-limits.js.map +0 -1
  150. package/dist/src/services/remotion.js +0 -688
  151. package/dist/src/services/remotion.js.map +0 -1
  152. package/dist/src/services/serverless-auth.js +0 -374
  153. package/dist/src/services/serverless-auth.js.map +0 -1
  154. package/dist/src/services/serverless-jobs.js +0 -1074
  155. package/dist/src/services/serverless-jobs.js.map +0 -1
  156. package/dist/src/services/serverless-provider-keys.js +0 -401
  157. package/dist/src/services/serverless-provider-keys.js.map +0 -1
  158. package/dist/src/services/serverless-records.js +0 -1088
  159. package/dist/src/services/serverless-records.js.map +0 -1
  160. package/dist/src/services/serverless-template-configs.js +0 -67
  161. package/dist/src/services/serverless-template-configs.js.map +0 -1
  162. package/dist/src/services/storage.js +0 -383
  163. package/dist/src/services/storage.js.map +0 -1
  164. package/dist/src/services/template-certification.js +0 -475
  165. package/dist/src/services/template-certification.js.map +0 -1
  166. package/dist/src/services/template-loader.js +0 -99
  167. package/dist/src/services/template-loader.js.map +0 -1
  168. package/dist/src/services/template-runtime-bundles.js +0 -217
  169. package/dist/src/services/template-runtime-bundles.js.map +0 -1
  170. package/dist/src/services/template-sources.js +0 -1017
  171. package/dist/src/services/template-sources.js.map +0 -1
  172. package/dist/src/services/video-normalization.js +0 -2
  173. package/dist/src/services/video-normalization.js.map +0 -1
  174. package/dist/src/services/webhooks.js +0 -62
  175. package/dist/src/services/webhooks.js.map +0 -1
  176. package/dist/src/template-editor-pages.js +0 -2491
  177. package/dist/src/template-editor-pages.js.map +0 -1
  178. package/dist/src/template-editor-shell.js +0 -2702
  179. package/dist/src/template-editor-shell.js.map +0 -1
  180. package/dist/src/template-sdk.js +0 -4
  181. package/dist/src/template-sdk.js.map +0 -1
  182. package/dist/src/worker.js +0 -17
  183. package/dist/src/worker.js.map +0 -1
  184. package/public/assets/homepage-app.js +0 -54
  185. package/public/assets/homepage-client-app.js +0 -80
  186. package/public/assets/page-runtime-client-app.js +0 -94
  187. package/readme.secret.md +0 -89
  188. package/templates/vidfarm_template_0000/README.md +0 -106
  189. package/templates/vidfarm_template_0000/SKILL.md +0 -266
  190. package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
  191. package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
  192. package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
  193. package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
  194. package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
  195. package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
  196. package/templates/vidfarm_template_0000/composition.json +0 -11
  197. package/templates/vidfarm_template_0000/src/lib/images.js +0 -221
  198. package/templates/vidfarm_template_0000/src/remotion/Root.js +0 -33
  199. package/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  200. package/templates/vidfarm_template_0000/src/sdk.js +0 -3
  201. package/templates/vidfarm_template_0000/src/style-options.js +0 -200
  202. package/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  203. package/templates/vidfarm_template_0000/src/template.js +0 -1566
  204. package/templates/vidfarm_template_0000/template.config.json +0 -21
@@ -1,301 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "Vidfarm Auto Template Plan",
4
- "type": "object",
5
- "required": [
6
- "template",
7
- "viral_steering",
8
- "visual_preservation",
9
- "architecture_fit",
10
- "character_workflow",
11
- "provider_requirements",
12
- "config_schema",
13
- "timing_controls",
14
- "typography",
15
- "operations",
16
- "jobs",
17
- "artifacts",
18
- "remotion",
19
- "skill_md",
20
- "validation"
21
- ],
22
- "properties": {
23
- "template": {
24
- "type": "object",
25
- "required": [
26
- "slug_id",
27
- "title",
28
- "description",
29
- "viral_dna",
30
- "visual_dna",
31
- "links_to_inspiration",
32
- "sound",
33
- "proposal_generator",
34
- "skeleton_prompt",
35
- "sample_prompts"
36
- ],
37
- "properties": {
38
- "slug_id": { "type": "string" },
39
- "title": { "type": "string" },
40
- "description": { "type": "string" },
41
- "viral_dna": { "type": "string" },
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
- },
53
- "proposal_generator": { "type": "string" },
54
- "skeleton_prompt": { "type": "string" },
55
- "sample_prompts": { "type": "array", "items": { "type": "string" }, "minItems": 3 }
56
- }
57
- },
58
- "viral_steering": {
59
- "type": "object",
60
- "required": ["rules", "persistence_points", "validation_checks"],
61
- "properties": {
62
- "rules": { "type": "array", "items": { "type": "string" } },
63
- "persistence_points": { "type": "array", "items": { "type": "string" } },
64
- "prompt_instructions": { "type": "array", "items": { "type": "string" } },
65
- "validation_checks": { "type": "array", "items": { "type": "string" } }
66
- }
67
- },
68
- "visual_preservation": {
69
- "type": "object",
70
- "required": ["importance", "enforced_rules", "allowed_variations", "rationale"],
71
- "properties": {
72
- "importance": { "enum": ["critical", "supportive", "optional", "low"] },
73
- "enforced_rules": { "type": "array", "items": { "type": "string" } },
74
- "allowed_variations": { "type": "array", "items": { "type": "string" } },
75
- "rationale": { "type": "string" }
76
- }
77
- },
78
- "architecture_fit": {
79
- "type": "object",
80
- "required": ["mode", "remotion_ceiling_risk", "rationale"],
81
- "properties": {
82
- "mode": { "enum": ["remotion", "ai_native_reference", "hybrid", "manual_review"] },
83
- "remotion_ceiling_risk": { "enum": ["low", "medium", "high"] },
84
- "rationale": { "type": "string" },
85
- "remotion_responsibilities": { "type": "array", "items": { "type": "string" } },
86
- "ai_native_responsibilities": { "type": "array", "items": { "type": "string" } }
87
- }
88
- },
89
- "character_workflow": {
90
- "type": "object",
91
- "required": ["detected", "consistency_level", "operations"],
92
- "properties": {
93
- "detected": { "type": "boolean" },
94
- "consistency_level": { "enum": ["none", "light", "strict", "identity_locked"] },
95
- "character_card_plan": {
96
- "type": "object",
97
- "properties": {
98
- "needed": { "type": "boolean" },
99
- "cards": { "type": "array", "items": { "type": "string" } },
100
- "manifest_fields": { "type": "array", "items": { "type": "string" } }
101
- }
102
- },
103
- "storyboard_plan": {
104
- "type": "object",
105
- "properties": {
106
- "needed": { "type": "boolean" },
107
- "frame_count_rule": { "type": "string" },
108
- "keyframe_fields": { "type": "array", "items": { "type": "string" } }
109
- }
110
- },
111
- "scene_video_plan": {
112
- "type": "object",
113
- "properties": {
114
- "needed": { "type": "boolean" },
115
- "clip_generation_rule": { "type": "string" },
116
- "reference_usage": { "type": "array", "items": { "type": "string" } }
117
- }
118
- },
119
- "operations": {
120
- "type": "array",
121
- "items": {
122
- "enum": ["create_character_cards", "create_storyboard", "generate_scene_videos", "stitch_video"]
123
- }
124
- }
125
- }
126
- },
127
- "provider_requirements": {
128
- "type": "object",
129
- "properties": {
130
- "text": { "type": "array", "items": { "type": "string" } },
131
- "layout_analysis": { "type": "array", "items": { "type": "string" } },
132
- "image": { "type": "array", "items": { "type": "string" } },
133
- "video": { "type": "array", "items": { "type": "string" } },
134
- "tts": { "type": "array", "items": { "type": "string" } },
135
- "stt": { "type": "array", "items": { "type": "string" } },
136
- "notes": { "type": "array", "items": { "type": "string" } }
137
- }
138
- },
139
- "config_schema": {
140
- "type": "array",
141
- "items": {
142
- "type": "object",
143
- "required": ["name", "type", "default", "description"],
144
- "properties": {
145
- "name": { "type": "string" },
146
- "type": { "type": "string" },
147
- "default": {},
148
- "description": { "type": "string" }
149
- }
150
- }
151
- },
152
- "timing_controls": {
153
- "type": "object",
154
- "required": ["exposed_to_user", "defaults", "input_fields"],
155
- "properties": {
156
- "exposed_to_user": { "type": "boolean" },
157
- "defaults": {
158
- "type": "object",
159
- "properties": {
160
- "total_duration_ms": { "type": "integer", "minimum": 0 },
161
- "scene_duration_ms": { "type": "integer", "minimum": 0 },
162
- "slide_duration_ms": { "type": "integer", "minimum": 0 },
163
- "transition_ms": { "type": "integer", "minimum": 0 },
164
- "hold_ms": { "type": "integer", "minimum": 0 }
165
- }
166
- },
167
- "input_fields": { "type": "array", "items": { "type": "string" } },
168
- "clamping_rules": { "type": "array", "items": { "type": "string" } },
169
- "notes": { "type": "array", "items": { "type": "string" } }
170
- }
171
- },
172
- "typography": {
173
- "type": "object",
174
- "required": [
175
- "recommended_default",
176
- "tiktok_native",
177
- "allowed_font_ids",
178
- "custom_font_policy",
179
- "generated_text_policy",
180
- "configurable_fields"
181
- ],
182
- "properties": {
183
- "recommended_default": { "type": "string" },
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
- },
219
- "font_files": { "type": "array", "items": { "type": "string" } },
220
- "fallback_fonts": { "type": "array", "items": { "type": "string" } },
221
- "configurable_fields": { "type": "array", "items": { "type": "string" } },
222
- "style_rules": { "type": "array", "items": { "type": "string" } }
223
- }
224
- },
225
- "operations": {
226
- "type": "array",
227
- "items": {
228
- "type": "object",
229
- "required": ["name", "description", "input_schema", "smoke_test_payload", "workflow"],
230
- "properties": {
231
- "name": { "type": "string" },
232
- "description": { "type": "string" },
233
- "input_schema": { "type": "object" },
234
- "smoke_test_payload": { "type": "object" },
235
- "workflow": { "type": "string" }
236
- }
237
- }
238
- },
239
- "jobs": {
240
- "type": "array",
241
- "items": {
242
- "type": "object",
243
- "required": ["workflow", "steps"],
244
- "properties": {
245
- "workflow": { "type": "string" },
246
- "steps": { "type": "array", "items": { "type": "string" } },
247
- "failure_modes": { "type": "array", "items": { "type": "string" } }
248
- }
249
- }
250
- },
251
- "artifacts": {
252
- "type": "object",
253
- "properties": {
254
- "manifest_shape": { "type": "object" },
255
- "files": { "type": "array", "items": { "type": "string" } }
256
- }
257
- },
258
- "remotion": {
259
- "type": "object",
260
- "properties": {
261
- "needed": { "type": "boolean" },
262
- "composition_id": { "type": "string" },
263
- "props_shape": { "type": "object" },
264
- "layout_notes": { "type": "array", "items": { "type": "string" } }
265
- }
266
- },
267
- "skill_md": {
268
- "type": "object",
269
- "properties": {
270
- "must_include": { "type": "array", "items": { "type": "string" } },
271
- "sample_requests": { "type": "array", "items": { "type": "string" } }
272
- }
273
- },
274
- "validation": {
275
- "type": "object",
276
- "required": ["commands", "artifact_checks", "visual_checks", "quality_harness"],
277
- "properties": {
278
- "commands": { "type": "array", "items": { "type": "string" } },
279
- "artifact_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
- }
298
- }
299
- }
300
- }
301
- }
@@ -1,137 +0,0 @@
1
- # Vidfarm Template Planner Prompt
2
-
3
- You are a senior Vidfarm template engineer.
4
-
5
- Given a production graph extracted from a TikTok or short-form video format, produce a concrete Vidfarm template implementation plan. Return only JSON matching `template-plan.schema.json`.
6
-
7
- The template must persist and actively use the source format's viral DNA. Viral DNA is not decorative metadata; it must steer proposal generation, script/plan generation, operation prompts, validation checks, and usage docs.
8
-
9
- ## Planning Rules
10
-
11
- - Use the existing Vidfarm template contract: `defineTemplate`, `about`, `configSchema`, `operations`, and async `jobs`.
12
- - Put the viral steering contract into `about.viral_dna`, `about.proposal_generator`, `about.skeleton_prompt`, sample prompts, template-local `SKILL.md`, and prompt constants/comments in `src/template.ts`.
13
- - Include an explicit visual preservation decision. Preserve visual DNA tightly only when it supports the viral DNA; otherwise allow controlled visual variation.
14
- - Public operations should be coarse-grained and customer-facing.
15
- - Use Remotion for deterministic video assembly, captions, overlays, UI shells, timing, zooms, and final MP4 rendering when those are actually the right abstraction.
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
- - 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
- - 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.
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.
36
- - Store generated media with `ctx.storage`; return artifact URLs, manifests, and render inputs.
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`.
41
- - Include smoke test payloads for every operation.
42
- - Include template-local `SKILL.md` requirements and route examples.
43
-
44
- ## Strategy Selection
45
-
46
- Choose the simplest production architecture that can reproduce the format reliably:
47
-
48
- - static one-image format: composition or image generation
49
- - slideshow: manifest + frames + optional video render
50
- - captioned app demo: source/user clip + caption/highlight renderer
51
- - talking-head: STT/TTS + caption renderer + optional b-roll slots
52
- - UGC ad: script + shot list + generated/user clips + Remotion edit
53
- - animated story/explainer: script + storyboard + generated assets + narration + Remotion edit, or AI-native reference generation when visual continuity is too complex for deterministic assembly
54
- - full AI character video: character cards -> image storyboard/keyframes -> generated scene videos -> Remotion stitch/captions/audio
55
- - dense illustrated/poster/organic style: AI-native prompt/reference generation, optional Remotion wrapper only
56
-
57
- ## Required Output Content
58
-
59
- The plan must include:
60
-
61
- - template metadata
62
- - viral steering rules and where they are persisted
63
- - visual preservation importance and enforcement rules
64
- - architecture fit decision with Remotion ceiling rationale
65
- - character-consistency workflow and operations when the source is a recurring-character AI video
66
- - provider requirements
67
- - provider/model recommendation constants, including the selected defaults and any documented exceptions
68
- - config schema fields
69
- - timing controls and default duration rules
70
- - caption font/style defaults and override rules
71
- - allowed font IDs, custom font exception rules, and deterministic-vs-generated text policy
72
- - operations and payload schemas
73
- - job workflow steps
74
- - artifact manifest shape
75
- - quality harness report fields, gates, and retry plan
76
- - Remotion composition plan
77
- - AI-native prompt/reference plan when applicable
78
- - character cards, storyboard frames, scene clips, and final stitched render artifact plan when applicable
79
- - generation prompts needed by the template
80
- - validation checklist
81
- - implementation risks
82
- - suggested directory/files to create
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
-
124
- ## Quality Bar
125
-
126
- The plan is not complete unless another agent can implement it without asking what the source format does.
127
-
128
- The plan is also not complete unless it explains how generated outputs will remain effective, not just visually similar.
129
-
130
- For full AI character videos, include these operations unless there is a strong reason not to:
131
-
132
- - `create_character_cards`
133
- - `create_storyboard`
134
- - `generate_scene_videos`
135
- - `stitch_video`
136
-
137
- Each operation should be resumable. The caller should be able to regenerate only the character cards, only selected storyboard scenes, only selected scene videos, or only the final stitch.