@mevdragon/vidfarm-devcli 0.2.8 → 0.2.9

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 (98) hide show
  1. package/.env.example +9 -0
  2. package/GETTING_STARTED.developers.md +1 -26
  3. package/README.md +3 -0
  4. package/SKILL.developer.md +327 -4
  5. package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +475 -0
  6. package/auto-create-templates/extractor-system-prompt.md +113 -0
  7. package/auto-create-templates/production-graph.schema.json +276 -0
  8. package/auto-create-templates/runbook.md +140 -0
  9. package/auto-create-templates/template-plan.schema.json +230 -0
  10. package/auto-create-templates/template-planner-prompt.md +75 -0
  11. package/dist/src/account-pages-legacy.js +9064 -0
  12. package/dist/src/account-pages.js +41 -620
  13. package/dist/src/app.js +6627 -244
  14. package/dist/src/cli.js +386 -26
  15. package/dist/src/config.js +12 -2
  16. package/dist/src/context.js +35 -35
  17. package/dist/src/db.js +1016 -53
  18. package/dist/src/dev-app-legacy.js +693 -0
  19. package/dist/src/dev-app.js +4 -904
  20. package/dist/src/domain.js +1 -1
  21. package/dist/src/editor-chat-history.js +72 -0
  22. package/dist/src/editor-chat.js +202 -0
  23. package/dist/src/frontend/flockposter-cache-store.js +116 -0
  24. package/dist/src/frontend/homepage-client.js +114 -0
  25. package/dist/src/frontend/homepage-shared.js +3 -0
  26. package/dist/src/frontend/homepage-store.js +27 -0
  27. package/dist/src/frontend/homepage-view.js +147 -0
  28. package/dist/src/frontend/page-runtime-client.js +100 -0
  29. package/dist/src/frontend/page-runtime-store.js +8 -0
  30. package/dist/src/frontend/template-editor-chat.js +2261 -0
  31. package/dist/src/homepage.js +695 -371
  32. package/dist/src/lib/template-style-options.js +95 -15
  33. package/dist/src/page-runtime.js +1 -0
  34. package/dist/src/page-shell.js +941 -0
  35. package/dist/src/primitive-context.js +163 -0
  36. package/dist/src/primitive-registry.js +340 -0
  37. package/dist/src/primitive-sdk.js +3 -0
  38. package/dist/src/primitives/remotion/html-image.js +28 -0
  39. package/dist/src/react-page-shell.js +34 -0
  40. package/dist/src/ready-post-schedule-component.js +1514 -0
  41. package/dist/src/registry.js +36 -17
  42. package/dist/src/runtime.js +6 -1
  43. package/dist/src/services/api-call-history.js +245 -0
  44. package/dist/src/services/auth.js +25 -3
  45. package/dist/src/services/billing.js +248 -9
  46. package/dist/src/services/chat-threads.js +88 -0
  47. package/dist/src/services/job-logs.js +14 -7
  48. package/dist/src/services/jobs.js +13 -2
  49. package/dist/src/services/providers.js +552 -133
  50. package/dist/src/services/rate-limits.js +236 -0
  51. package/dist/src/services/remotion.js +143 -16
  52. package/dist/src/services/storage.js +10 -8
  53. package/dist/src/services/template-certification.js +11 -2
  54. package/dist/src/services/template-loader.js +3 -1
  55. package/dist/src/services/template-sources.js +68 -3
  56. package/dist/src/template-editor-pages.js +2309 -0
  57. package/dist/src/template-editor-shell.js +1507 -0
  58. package/dist/src/worker.js +120 -22
  59. package/package.json +27 -4
  60. package/public/assets/homepage-app.js +54 -0
  61. package/public/assets/homepage-client-app.js +54 -0
  62. package/public/assets/page-runtime-client-app.js +68 -0
  63. package/dist/templates/vidfarm_template_0000/src/lib/images.js +0 -202
  64. package/dist/templates/vidfarm_template_0000/src/remotion/Root.js +0 -34
  65. package/dist/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  66. package/dist/templates/vidfarm_template_0000/src/sdk.js +0 -3
  67. package/dist/templates/vidfarm_template_0000/src/style-options.js +0 -51
  68. package/dist/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  69. package/dist/templates/vidfarm_template_0000/src/template.js +0 -1447
  70. package/templates/vidfarm_template_0000/README.md +0 -100
  71. package/templates/vidfarm_template_0000/SKILL.md +0 -225
  72. package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
  73. package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
  74. package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
  75. package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
  76. package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
  77. package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
  78. package/templates/vidfarm_template_0000/composition.json +0 -11
  79. package/templates/vidfarm_template_0000/package.json +0 -27
  80. package/templates/vidfarm_template_0000/research/preview/.gitkeep +0 -1
  81. package/templates/vidfarm_template_0000/research/source_notes.md +0 -7
  82. package/templates/vidfarm_template_0000/src/lib/images.js +0 -202
  83. package/templates/vidfarm_template_0000/src/lib/images.ts +0 -241
  84. package/templates/vidfarm_template_0000/src/remotion/Root.js +0 -33
  85. package/templates/vidfarm_template_0000/src/remotion/Root.tsx +0 -75
  86. package/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  87. package/templates/vidfarm_template_0000/src/remotion/index.tsx +0 -4
  88. package/templates/vidfarm_template_0000/src/sdk.js +0 -3
  89. package/templates/vidfarm_template_0000/src/sdk.ts +0 -140
  90. package/templates/vidfarm_template_0000/src/style-options.js +0 -51
  91. package/templates/vidfarm_template_0000/src/style-options.ts +0 -60
  92. package/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  93. package/templates/vidfarm_template_0000/src/template-dna.ts +0 -15
  94. package/templates/vidfarm_template_0000/src/template.js +0 -1447
  95. package/templates/vidfarm_template_0000/src/template.ts +0 -2049
  96. package/templates/vidfarm_template_0000/template.config.json +0 -21
  97. package/templates/vidfarm_template_0000/tmp/solobacterium-moorei-slideshow.request.json +0 -31
  98. package/templates/vidfarm_template_0000/tsconfig.json +0 -19
@@ -0,0 +1,276 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Vidfarm Auto Template Production Graph",
4
+ "type": "object",
5
+ "required": [
6
+ "format_summary",
7
+ "classification",
8
+ "viral_mechanics",
9
+ "viral_steering",
10
+ "visual_preservation",
11
+ "visual_system",
12
+ "timeline",
13
+ "replaceable_slots",
14
+ "production_strategy",
15
+ "dependencies",
16
+ "validation"
17
+ ],
18
+ "properties": {
19
+ "format_summary": {
20
+ "type": "object",
21
+ "required": ["title", "one_sentence", "source_kind", "duration_ms"],
22
+ "properties": {
23
+ "title": { "type": "string" },
24
+ "one_sentence": { "type": "string" },
25
+ "source_kind": { "type": "string" },
26
+ "duration_ms": { "type": "integer", "minimum": 0 },
27
+ "aspect_ratio": { "type": "string" },
28
+ "resolution": { "type": "string" }
29
+ }
30
+ },
31
+ "classification": {
32
+ "type": "object",
33
+ "required": ["difficulty", "primary_container", "recognition_mode", "recommended_architecture"],
34
+ "properties": {
35
+ "difficulty": { "enum": ["easy", "medium", "hard"] },
36
+ "primary_container": { "type": "string" },
37
+ "recognition_mode": { "enum": ["presentation-centric", "character-centric", "vibe-centric", "mixed"] },
38
+ "recommended_architecture": {
39
+ "enum": [
40
+ "static_composite",
41
+ "ai_image",
42
+ "ai_native_reference",
43
+ "slideshow_remotion",
44
+ "captioned_source_clip",
45
+ "ui_shell_remotion",
46
+ "ugc_edit",
47
+ "storyboard_to_video",
48
+ "full_ai_character_video",
49
+ "animated_explainer",
50
+ "hybrid"
51
+ ]
52
+ }
53
+ }
54
+ },
55
+ "viral_mechanics": {
56
+ "type": "object",
57
+ "properties": {
58
+ "hook": { "type": "string" },
59
+ "curiosity_gap": { "type": "string" },
60
+ "emotional_trigger": { "type": "string" },
61
+ "payoff": { "type": "string" },
62
+ "loop_or_rewatch_driver": { "type": "string" }
63
+ }
64
+ },
65
+ "viral_steering": {
66
+ "type": "object",
67
+ "required": ["must_preserve", "must_not_dilute", "generation_rules", "validation_checks"],
68
+ "properties": {
69
+ "must_preserve": { "type": "array", "items": { "type": "string" } },
70
+ "must_not_dilute": { "type": "array", "items": { "type": "string" } },
71
+ "generation_rules": { "type": "array", "items": { "type": "string" } },
72
+ "validation_checks": { "type": "array", "items": { "type": "string" } }
73
+ }
74
+ },
75
+ "visual_preservation": {
76
+ "type": "object",
77
+ "required": ["importance", "preserve_because", "preserve", "can_change"],
78
+ "properties": {
79
+ "importance": { "enum": ["critical", "supportive", "optional", "low"] },
80
+ "preserve_because": { "type": "string" },
81
+ "preserve": { "type": "array", "items": { "type": "string" } },
82
+ "can_change": { "type": "array", "items": { "type": "string" } },
83
+ "decision_notes": { "type": "array", "items": { "type": "string" } }
84
+ }
85
+ },
86
+ "visual_system": {
87
+ "type": "object",
88
+ "properties": {
89
+ "must_preserve": { "type": "array", "items": { "type": "string" } },
90
+ "can_adapt": { "type": "array", "items": { "type": "string" } },
91
+ "caption_rules": { "type": "array", "items": { "type": "string" } },
92
+ "layout_rules": { "type": "array", "items": { "type": "string" } },
93
+ "style_rules": { "type": "array", "items": { "type": "string" } }
94
+ }
95
+ },
96
+ "timeline": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "object",
100
+ "required": ["id", "start_ms", "end_ms", "duration_ms", "role", "asset_kind", "replaceability", "implementation"],
101
+ "properties": {
102
+ "id": { "type": "string" },
103
+ "start_ms": { "type": "integer", "minimum": 0 },
104
+ "end_ms": { "type": "integer", "minimum": 0 },
105
+ "duration_ms": { "type": "integer", "minimum": 0 },
106
+ "role": { "type": "string" },
107
+ "description": { "type": "string" },
108
+ "asset_kind": {
109
+ "enum": [
110
+ "source_video",
111
+ "generated_video",
112
+ "generated_image",
113
+ "uploaded_image",
114
+ "uploaded_video",
115
+ "rendered_ui",
116
+ "text",
117
+ "audio",
118
+ "shape",
119
+ "effect"
120
+ ]
121
+ },
122
+ "replaceability": { "enum": ["fixed", "variable", "optional", "generated"] },
123
+ "implementation": {
124
+ "enum": [
125
+ "remotion",
126
+ "html_canvas",
127
+ "ai_image",
128
+ "ai_video",
129
+ "tts",
130
+ "stt",
131
+ "ocr",
132
+ "user_upload",
133
+ "external_clip",
134
+ "media_search",
135
+ "manual_review"
136
+ ]
137
+ },
138
+ "inputs": { "type": "array", "items": { "type": "string" } },
139
+ "outputs": { "type": "array", "items": { "type": "string" } },
140
+ "timing_notes": { "type": "string" },
141
+ "layout_notes": { "type": "string" },
142
+ "safe_area_notes": { "type": "string" },
143
+ "validation_notes": { "type": "string" }
144
+ }
145
+ }
146
+ },
147
+ "timing_controls": {
148
+ "type": "object",
149
+ "properties": {
150
+ "total_duration_ms": { "type": "integer", "minimum": 0 },
151
+ "user_configurable": { "type": "boolean" },
152
+ "default_scene_duration_ms": { "type": "integer", "minimum": 0 },
153
+ "default_transition_ms": { "type": "integer", "minimum": 0 },
154
+ "default_hold_ms": { "type": "integer", "minimum": 0 },
155
+ "min_slot_duration_ms": { "type": "integer", "minimum": 0 },
156
+ "max_slot_duration_ms": { "type": "integer", "minimum": 0 },
157
+ "caption_timing_mode": {
158
+ "enum": ["transcript_word_timestamps", "fixed_groups", "manual_timestamps", "none"]
159
+ },
160
+ "notes": { "type": "array", "items": { "type": "string" } }
161
+ }
162
+ },
163
+ "typography_controls": {
164
+ "type": "object",
165
+ "properties": {
166
+ "user_configurable": { "type": "boolean" },
167
+ "recommended_font": { "type": "string" },
168
+ "fallback_fonts": { "type": "array", "items": { "type": "string" } },
169
+ "font_size_rules": { "type": "array", "items": { "type": "string" } },
170
+ "caption_style_rules": { "type": "array", "items": { "type": "string" } },
171
+ "tiktok_native_match_notes": { "type": "array", "items": { "type": "string" } }
172
+ }
173
+ },
174
+ "replaceable_slots": {
175
+ "type": "array",
176
+ "items": {
177
+ "type": "object",
178
+ "required": ["name", "kind", "required", "description"],
179
+ "properties": {
180
+ "name": { "type": "string" },
181
+ "kind": {
182
+ "enum": ["text", "image", "video", "audio", "product", "person", "app_screen", "url", "stat", "brand", "style", "cta"]
183
+ },
184
+ "required": { "type": "boolean" },
185
+ "description": { "type": "string" },
186
+ "constraints": { "type": "array", "items": { "type": "string" } },
187
+ "default_generation_prompt": { "type": "string" }
188
+ }
189
+ }
190
+ },
191
+ "production_strategy": {
192
+ "type": "object",
193
+ "required": ["architecture_fit", "stages"],
194
+ "properties": {
195
+ "architecture_fit": {
196
+ "enum": ["remotion", "ai_native_reference", "hybrid", "manual_review"]
197
+ },
198
+ "remotion_ceiling_risk": {
199
+ "enum": ["low", "medium", "high"]
200
+ },
201
+ "architecture_rationale": { "type": "string" },
202
+ "ai_native_reference_plan": {
203
+ "type": "object",
204
+ "properties": {
205
+ "needed": { "type": "boolean" },
206
+ "reference_inputs": { "type": "array", "items": { "type": "string" } },
207
+ "prompt_contract": { "type": "array", "items": { "type": "string" } },
208
+ "when_to_avoid_remotion": { "type": "array", "items": { "type": "string" } }
209
+ }
210
+ },
211
+ "character_workflow": {
212
+ "type": "object",
213
+ "properties": {
214
+ "detected": { "type": "boolean" },
215
+ "consistency_level": { "enum": ["none", "light", "strict", "identity_locked"] },
216
+ "characters": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "required": ["name", "role", "visual_identity"],
221
+ "properties": {
222
+ "name": { "type": "string" },
223
+ "role": { "type": "string" },
224
+ "visual_identity": { "type": "array", "items": { "type": "string" } },
225
+ "wardrobe": { "type": "array", "items": { "type": "string" } },
226
+ "props": { "type": "array", "items": { "type": "string" } },
227
+ "reference_card_requirements": { "type": "array", "items": { "type": "string" } }
228
+ }
229
+ }
230
+ },
231
+ "required_operations": {
232
+ "type": "array",
233
+ "items": {
234
+ "enum": ["create_character_cards", "create_storyboard", "generate_scene_videos", "stitch_video"]
235
+ }
236
+ },
237
+ "storyboard_requirements": { "type": "array", "items": { "type": "string" } },
238
+ "scene_video_requirements": { "type": "array", "items": { "type": "string" } }
239
+ }
240
+ },
241
+ "stages": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "object",
245
+ "required": ["name", "purpose", "tools"],
246
+ "properties": {
247
+ "name": { "type": "string" },
248
+ "purpose": { "type": "string" },
249
+ "tools": { "type": "array", "items": { "type": "string" } },
250
+ "outputs": { "type": "array", "items": { "type": "string" } }
251
+ }
252
+ }
253
+ }
254
+ }
255
+ },
256
+ "dependencies": {
257
+ "type": "object",
258
+ "properties": {
259
+ "needs_remotion": { "type": "boolean" },
260
+ "needs_ai_image": { "type": "boolean" },
261
+ "needs_ai_video": { "type": "boolean" },
262
+ "needs_tts": { "type": "boolean" },
263
+ "needs_stt": { "type": "boolean" },
264
+ "needs_ocr": { "type": "boolean" },
265
+ "provider_notes": { "type": "array", "items": { "type": "string" } }
266
+ }
267
+ },
268
+ "validation": {
269
+ "type": "object",
270
+ "properties": {
271
+ "checks": { "type": "array", "items": { "type": "string" } },
272
+ "known_risks": { "type": "array", "items": { "type": "string" } }
273
+ }
274
+ }
275
+ }
276
+ }
@@ -0,0 +1,140 @@
1
+ # Auto-Create Template Runbook
2
+
3
+ Use this runbook when a source TikTok/video should become a Vidfarm template.
4
+
5
+ ## 1. Create A Run Folder
6
+
7
+ ```bash
8
+ RUN_ID="<format-slug>-$(date +%Y%m%d-%H%M%S)"
9
+ mkdir -p "auto-create-templates/runs/${RUN_ID}"/{source,frames,audio,transcripts,ocr,motion,dna,extraction,plan}
10
+ ```
11
+
12
+ Copy source media and notes into `source/`.
13
+
14
+ ## 2. Extract Basic Media Artifacts
15
+
16
+ ```bash
17
+ ffprobe -v error -show_entries format=duration:stream=codec_type,width,height,avg_frame_rate -of json source/source.mp4 \
18
+ > "auto-create-templates/runs/${RUN_ID}/source/ffprobe.json"
19
+
20
+ ffmpeg -y -i source/source.mp4 \
21
+ -vf "fps=1/2,scale=240:-1,tile=3x4" \
22
+ -frames:v 1 "auto-create-templates/runs/${RUN_ID}/frames/contact-sheet.jpg"
23
+
24
+ ffmpeg -y -i source/source.mp4 \
25
+ -vn -ac 1 -ar 16000 "auto-create-templates/runs/${RUN_ID}/audio/source.wav"
26
+ ```
27
+
28
+ Add scene detection, OCR, and STT with whichever local tool/provider is available. The important part is writing results into the run folder so the extraction prompt can cite concrete timing and text.
29
+
30
+ ## 3. Scaffold Template And Run DNA
31
+
32
+ ```bash
33
+ npx @mevdragon/vidfarm-devcli generate-template \
34
+ --slug-id <slug_id> \
35
+ --template-dir ./templates/vidfarm_template_<slug> \
36
+ --source-notes-path ./drafts/<format_slug>/source.md \
37
+ --source-preview-dir ./drafts/<format_slug>/preview \
38
+ --link-to-original "<original_url>"
39
+ ```
40
+
41
+ If DNA did not run during scaffold:
42
+
43
+ ```bash
44
+ npx @mevdragon/vidfarm-devcli analyze-viral-dna --template-dir ./templates/vidfarm_template_<slug>
45
+ npx @mevdragon/vidfarm-devcli analyze-visual-dna --template-dir ./templates/vidfarm_template_<slug>
46
+ ```
47
+
48
+ Copy `research/viral_dna.extraction.json` and `research/visual_dna.extraction.json` into the run folder.
49
+
50
+ ## 4. Decide Viral Steering And Visual Preservation
51
+
52
+ Before generating the production graph, create:
53
+
54
+ ```txt
55
+ auto-create-templates/runs/<run_id>/dna/preservation_decision.json
56
+ ```
57
+
58
+ This decision must be viral-first:
59
+
60
+ - extract the hook, tension, payoff, retention, and share/save mechanics from viral DNA
61
+ - decide which visual traits materially support those mechanics
62
+ - mark visual preservation as `critical`, `supportive`, `optional`, or `low`
63
+ - list what must be preserved and what can vary
64
+
65
+ Do not preserve visual traits blindly. Some formats win because of the visual container; others win because of premise, pacing, voice, or story.
66
+
67
+ ## 5. Decide Architecture Fit
68
+
69
+ Before generating the production graph, also decide whether the format is:
70
+
71
+ - `remotion`: deterministic layout/edit assembly is robust
72
+ - `ai_native_reference`: source-faithful prompt/reference generation is more robust than layer reconstruction
73
+ - `hybrid`: AI generates complex assets; Remotion assembles, captions, crops, times, and packages
74
+ - `manual_review`: legal, likeness, copyright, or complexity risk needs human approval
75
+
76
+ Mark `remotion_ceiling_risk` as `low`, `medium`, or `high`. High risk means the source has organic visual style, complex character acting, cinematic motion, dense texture, or too many brittle layers to rebuild deterministically.
77
+
78
+ Also detect whether this is a `full_ai_character_video`. If the same generated character, mascot, clay figure, anime figure, game character, or illustrated persona appears across multiple scenes, plan the character workflow:
79
+
80
+ - `create_character_cards`
81
+ - `create_storyboard`
82
+ - `generate_scene_videos`
83
+ - `stitch_video`
84
+
85
+ The key decision is whether identity consistency is `light`, `strict`, or `identity_locked`. Strict and identity-locked workflows should create reusable character cards before storyboarding.
86
+
87
+ ## 6. Generate Production Graph
88
+
89
+ Send the extractor prompt, source notes, media artifacts, DNA files, preservation decision, and contact sheet to a multimodal model.
90
+
91
+ Write the result to:
92
+
93
+ ```txt
94
+ auto-create-templates/runs/<run_id>/extraction/production_graph.json
95
+ ```
96
+
97
+ Validate against:
98
+
99
+ ```txt
100
+ auto-create-templates/production-graph.schema.json
101
+ ```
102
+
103
+ ## 7. Generate Template Plan
104
+
105
+ Send the template planner prompt plus `production_graph.json`.
106
+
107
+ Write the result to:
108
+
109
+ ```txt
110
+ auto-create-templates/runs/<run_id>/plan/template_plan.json
111
+ ```
112
+
113
+ Validate against:
114
+
115
+ ```txt
116
+ auto-create-templates/template-plan.schema.json
117
+ ```
118
+
119
+ ## 8. Implement
120
+
121
+ Implementation should usually happen in this order:
122
+
123
+ 1. update `src/template.ts` metadata and schemas
124
+ 2. persist viral steering and visual preservation rules in metadata, prompt constants/comments, and docs
125
+ 3. implement operation workflows
126
+ 4. add Remotion composition only when the architecture fit calls for it
127
+ 5. wire storage outputs and manifests
128
+ 6. update template-local `SKILL.md`
129
+ 7. add representative smoke test payloads
130
+
131
+ ## 9. Validate
132
+
133
+ ```bash
134
+ npx @mevdragon/vidfarm-devcli validate-template --template-id <slug_id>
135
+ npx @mevdragon/vidfarm-devcli session
136
+ ```
137
+
138
+ Launch at least one local job through the standard operation endpoint and inspect output artifacts.
139
+
140
+ The generated output should be checked for viral compliance, not just render correctness.
@@ -0,0 +1,230 @@
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
+ "proposal_generator",
32
+ "skeleton_prompt",
33
+ "sample_prompts"
34
+ ],
35
+ "properties": {
36
+ "slug_id": { "type": "string" },
37
+ "title": { "type": "string" },
38
+ "description": { "type": "string" },
39
+ "viral_dna": { "type": "string" },
40
+ "visual_dna": { "type": "string" },
41
+ "proposal_generator": { "type": "string" },
42
+ "skeleton_prompt": { "type": "string" },
43
+ "sample_prompts": { "type": "array", "items": { "type": "string" }, "minItems": 3 }
44
+ }
45
+ },
46
+ "viral_steering": {
47
+ "type": "object",
48
+ "required": ["rules", "persistence_points", "validation_checks"],
49
+ "properties": {
50
+ "rules": { "type": "array", "items": { "type": "string" } },
51
+ "persistence_points": { "type": "array", "items": { "type": "string" } },
52
+ "prompt_instructions": { "type": "array", "items": { "type": "string" } },
53
+ "validation_checks": { "type": "array", "items": { "type": "string" } }
54
+ }
55
+ },
56
+ "visual_preservation": {
57
+ "type": "object",
58
+ "required": ["importance", "enforced_rules", "allowed_variations", "rationale"],
59
+ "properties": {
60
+ "importance": { "enum": ["critical", "supportive", "optional", "low"] },
61
+ "enforced_rules": { "type": "array", "items": { "type": "string" } },
62
+ "allowed_variations": { "type": "array", "items": { "type": "string" } },
63
+ "rationale": { "type": "string" }
64
+ }
65
+ },
66
+ "architecture_fit": {
67
+ "type": "object",
68
+ "required": ["mode", "remotion_ceiling_risk", "rationale"],
69
+ "properties": {
70
+ "mode": { "enum": ["remotion", "ai_native_reference", "hybrid", "manual_review"] },
71
+ "remotion_ceiling_risk": { "enum": ["low", "medium", "high"] },
72
+ "rationale": { "type": "string" },
73
+ "remotion_responsibilities": { "type": "array", "items": { "type": "string" } },
74
+ "ai_native_responsibilities": { "type": "array", "items": { "type": "string" } }
75
+ }
76
+ },
77
+ "character_workflow": {
78
+ "type": "object",
79
+ "required": ["detected", "consistency_level", "operations"],
80
+ "properties": {
81
+ "detected": { "type": "boolean" },
82
+ "consistency_level": { "enum": ["none", "light", "strict", "identity_locked"] },
83
+ "character_card_plan": {
84
+ "type": "object",
85
+ "properties": {
86
+ "needed": { "type": "boolean" },
87
+ "cards": { "type": "array", "items": { "type": "string" } },
88
+ "manifest_fields": { "type": "array", "items": { "type": "string" } }
89
+ }
90
+ },
91
+ "storyboard_plan": {
92
+ "type": "object",
93
+ "properties": {
94
+ "needed": { "type": "boolean" },
95
+ "frame_count_rule": { "type": "string" },
96
+ "keyframe_fields": { "type": "array", "items": { "type": "string" } }
97
+ }
98
+ },
99
+ "scene_video_plan": {
100
+ "type": "object",
101
+ "properties": {
102
+ "needed": { "type": "boolean" },
103
+ "clip_generation_rule": { "type": "string" },
104
+ "reference_usage": { "type": "array", "items": { "type": "string" } }
105
+ }
106
+ },
107
+ "operations": {
108
+ "type": "array",
109
+ "items": {
110
+ "enum": ["create_character_cards", "create_storyboard", "generate_scene_videos", "stitch_video"]
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "provider_requirements": {
116
+ "type": "object",
117
+ "properties": {
118
+ "text": { "type": "array", "items": { "type": "string" } },
119
+ "layout_analysis": { "type": "array", "items": { "type": "string" } },
120
+ "image": { "type": "array", "items": { "type": "string" } },
121
+ "video": { "type": "array", "items": { "type": "string" } },
122
+ "tts": { "type": "array", "items": { "type": "string" } },
123
+ "stt": { "type": "array", "items": { "type": "string" } },
124
+ "notes": { "type": "array", "items": { "type": "string" } }
125
+ }
126
+ },
127
+ "config_schema": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "object",
131
+ "required": ["name", "type", "default", "description"],
132
+ "properties": {
133
+ "name": { "type": "string" },
134
+ "type": { "type": "string" },
135
+ "default": {},
136
+ "description": { "type": "string" }
137
+ }
138
+ }
139
+ },
140
+ "timing_controls": {
141
+ "type": "object",
142
+ "required": ["exposed_to_user", "defaults", "input_fields"],
143
+ "properties": {
144
+ "exposed_to_user": { "type": "boolean" },
145
+ "defaults": {
146
+ "type": "object",
147
+ "properties": {
148
+ "total_duration_ms": { "type": "integer", "minimum": 0 },
149
+ "scene_duration_ms": { "type": "integer", "minimum": 0 },
150
+ "slide_duration_ms": { "type": "integer", "minimum": 0 },
151
+ "transition_ms": { "type": "integer", "minimum": 0 },
152
+ "hold_ms": { "type": "integer", "minimum": 0 }
153
+ }
154
+ },
155
+ "input_fields": { "type": "array", "items": { "type": "string" } },
156
+ "clamping_rules": { "type": "array", "items": { "type": "string" } },
157
+ "notes": { "type": "array", "items": { "type": "string" } }
158
+ }
159
+ },
160
+ "typography": {
161
+ "type": "object",
162
+ "required": ["recommended_default", "tiktok_native", "configurable_fields"],
163
+ "properties": {
164
+ "recommended_default": { "type": "string" },
165
+ "tiktok_native": { "type": "boolean" },
166
+ "font_files": { "type": "array", "items": { "type": "string" } },
167
+ "fallback_fonts": { "type": "array", "items": { "type": "string" } },
168
+ "configurable_fields": { "type": "array", "items": { "type": "string" } },
169
+ "style_rules": { "type": "array", "items": { "type": "string" } }
170
+ }
171
+ },
172
+ "operations": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "required": ["name", "description", "input_schema", "smoke_test_payload", "workflow"],
177
+ "properties": {
178
+ "name": { "type": "string" },
179
+ "description": { "type": "string" },
180
+ "input_schema": { "type": "object" },
181
+ "smoke_test_payload": { "type": "object" },
182
+ "workflow": { "type": "string" }
183
+ }
184
+ }
185
+ },
186
+ "jobs": {
187
+ "type": "array",
188
+ "items": {
189
+ "type": "object",
190
+ "required": ["workflow", "steps"],
191
+ "properties": {
192
+ "workflow": { "type": "string" },
193
+ "steps": { "type": "array", "items": { "type": "string" } },
194
+ "failure_modes": { "type": "array", "items": { "type": "string" } }
195
+ }
196
+ }
197
+ },
198
+ "artifacts": {
199
+ "type": "object",
200
+ "properties": {
201
+ "manifest_shape": { "type": "object" },
202
+ "files": { "type": "array", "items": { "type": "string" } }
203
+ }
204
+ },
205
+ "remotion": {
206
+ "type": "object",
207
+ "properties": {
208
+ "needed": { "type": "boolean" },
209
+ "composition_id": { "type": "string" },
210
+ "props_shape": { "type": "object" },
211
+ "layout_notes": { "type": "array", "items": { "type": "string" } }
212
+ }
213
+ },
214
+ "skill_md": {
215
+ "type": "object",
216
+ "properties": {
217
+ "must_include": { "type": "array", "items": { "type": "string" } },
218
+ "sample_requests": { "type": "array", "items": { "type": "string" } }
219
+ }
220
+ },
221
+ "validation": {
222
+ "type": "object",
223
+ "properties": {
224
+ "commands": { "type": "array", "items": { "type": "string" } },
225
+ "artifact_checks": { "type": "array", "items": { "type": "string" } },
226
+ "visual_checks": { "type": "array", "items": { "type": "string" } }
227
+ }
228
+ }
229
+ }
230
+ }