@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,599 +0,0 @@
1
- # Auto-Create Templates Harness
2
-
3
- This is the harness for turning an arbitrary TikTok or short-form video into a reusable Vidfarm template that can generate the same format in bulk.
4
-
5
- ## Start Here
6
-
7
- Give a Codex agent these two things:
8
-
9
- 1. this entry file: `auto-create-templates/AUTO_CREATE_TEMPLATES.md`
10
- 2. one media reference folder, preferably shaped like:
11
-
12
- ```txt
13
- drafts/<format_slug>/
14
- source.md
15
- preview/
16
- source.mp4
17
- screenshot-01.png
18
- ```
19
-
20
- Then ask:
21
-
22
- ```txt
23
- Use auto-create-templates/AUTO_CREATE_TEMPLATES.md as the harness. Analyze drafts/<format_slug>/ as the source format, create the run artifacts, generate the production graph and template plan, then scaffold and implement a runnable Vidfarm template.
24
- ```
25
-
26
- The media folder can contain a video, screenshots, reference images, or all of them. If `source.md` is missing, the agent should create one with the original URL, creator, adaptation goal, and any constraints it can infer.
27
-
28
- The core idea is to avoid asking an agent to "clone this video" in one prompt. The harness splits the job into staged extraction:
29
-
30
- 1. inspect source media and source notes
31
- 2. run Vidfarm viral and visual DNA analysis
32
- 3. decide which visual traits must be preserved because they support the viral mechanism
33
- 4. extract a production graph from the actual video
34
- 5. classify which parts are fixed format rules vs replaceable inputs
35
- 6. choose a generation strategy: pure prompt, Remotion assembly, AI image storyboard, AI video, source clip swapping, or a hybrid
36
- 7. generate a Vidfarm template plan with schemas, operations, jobs, prompts, and validation cases
37
-
38
- Supporting harness files live beside this entry file in [auto-create-templates](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/vidfarm/auto-create-templates).
39
-
40
- ## Cacheable Context
41
-
42
- When `vidfarm-devcli autocreate-template` creates a run, it snapshots this harness and the root `SKILL.developer.md` into the run folder. Treat both files as stable, cacheable prompt context:
43
-
44
- 1. read `harness/SKILL.developer.md` first
45
- 2. read `harness/AUTO_CREATE_TEMPLATES.md` and the supporting harness prompt/schema files next
46
- 3. only then load run-specific source media notes, analyzer outputs, DNA JSON, OCR, transcripts, and production graph artifacts
47
-
48
- Keep that order in agent prompts and implementation passes. The developer skill and harness should form the stable prompt prefix so provider-side prompt caching can reuse them across repeated auto-create runs.
49
-
50
- ## Sample Read
51
-
52
- I sampled the local drafts across the spectrum:
53
-
54
- - Easy:
55
- - `cute_diagram_grid`: one static generated infographic with repeated layout slots, title, illustrations, and short explanatory labels.
56
- - `history_swap_news`: one meme/news image where the reusable mechanic is text replacement inside a familiar historical/news surface.
57
- - `before_after_slides` and `video_in_chat`: short screen-native videos where most of the format is slot timing, overlay text, and a small number of replaceable media regions.
58
- - Medium:
59
- - `app_demo_captioned`: app interface recording with caption track and visible UI state changes across time.
60
- - `face_upclose_yapper`: close-face UGC speech with top hook, word-level captions, and performance pacing driven by audio.
61
- - `unique_sketch_character`: recurring illustrated character/vibe, scene beats, and animation continuity rather than simple text swaps.
62
- - Hard:
63
- - `movie_montage`: external clip montage plus reaction/meter overlays and app interstitials.
64
- - `claymation_ads`: full AI-video storyboard with character continuity, product/problem narrative, captions, and scene-to-scene action.
65
- - `full_animated_science_explainer`: horizontal drawn explainer with abstract diagrams, narration, transitions, and educational sequencing.
66
-
67
- This implies three production tiers:
68
-
69
- - `easy`: one image or a few fixed visual slots. Usually pure image generation, reference image editing, HTML/CSS compositing, or Remotion slideshow.
70
- - `medium`: timed media replacement. Usually Remotion plus STT/TTS/captions, exact overlay timing, screen recordings, UI mocks, and optional AI image inserts.
71
- - `hard`: multi-stage production. Sometimes script -> storyboard -> assets -> AI image/video generation -> Remotion edit -> captions/audio/master. Other times the source is too visually fluid for reliable Remotion reconstruction and should be treated as an AI-native prompt/reference template.
72
- - `full_ai_character_video`: recurring AI-generated characters across scenes. Usually character sprite/reference cards -> image storyboard -> scene video generation -> Remotion stitch/caption/master.
73
-
74
- ## What To Extract
75
-
76
- The obvious primitives are captions, TTS, STT, scene snipping/replacement, pointing/circling/magnifying. The harness should also extract these:
77
-
78
- - hook mechanic: first-frame promise, curiosity gap, shock, status signal, objection, or payoff setup
79
- - viral steering contract: the non-negotiable distribution psychology that every generated output must preserve
80
- - visual preservation decision: which visual traits are essential, supportive, optional, or irrelevant based on the viral DNA
81
- - format container: chat, app screen, map, notification, yearbook, bodycam, news, diagram, ranking, montage, list, interview, vlog, or cinematic scene
82
- - shot list: ordered scene beats with start/end times, source asset type, camera framing, and purpose
83
- - edit rhythm: cut frequency, beat drops, zooms, pauses, jump cuts, freeze frames, scroll speed, and loop point
84
- - audio plan: music bed, narrator, on-camera voice, dialogue, sound effects, silence, and sync points
85
- - caption style: font, case, color, outline, background chip, placement, max words per line, word-level highlighting, safe areas
86
- - timing controls: total duration, per-scene duration, per-slide duration, caption group duration, hold time, transition duration, zoom duration, loop point, and minimum/maximum slot length
87
- - typography controls: TikTok-native font choice, fallback font stack, font size, weight, line height, outline/shadow, background chip, word highlight style, and whether the caller can override them
88
- - overlay inventory: arrows, circles, magnifiers, stickers, screenshots, reaction meters, emoji, app chrome, progress bars, counters, comments, and lower thirds
89
- - layout anchors: bounding boxes for faces, products, captions, buttons, UI slots, and safe/unsafe zones
90
- - replaceable variables: product, person, pain point, website, app screen, object, character, text, location, statistic, clip, or CTA
91
- - invariant rules: what must stay consistent for the format to remain recognizable
92
- - adaptive rules: what can change per brand without breaking the format
93
- - asset requirements: exact user-uploaded references vs AI-generated assets vs external clips vs rendered UI
94
- - continuity requirements: character identity, wardrobe, room, lighting, prop placement, visual style, and voice
95
- - character bible: character names, roles, facial/body traits, wardrobe, sprite/reference cards, expression range, poses, props, negative prompts, and consistency constraints
96
- - storyboard requirements: start/end frame prompts, keyframe images, scene-to-scene continuity notes, camera/action notes, and which frames feed video generation
97
- - production dependencies: Remotion only, image model, video model, layout analysis, TTS, STT, OCR, background removal, object tracking, or media search
98
- - architecture fit: whether the format is better as deterministic Remotion assembly, AI-native prompt/reference generation, or a hybrid
99
- - compliance risks: copyrighted media dependency, celebrity likeness, medical/financial claims, unsafe camera/bodycam contexts, and platform UI imitation
100
- - validation signals: first-frame legibility, caption readability, subject safe framing, slot replacement correctness, timing fidelity, audio sync, and renderability
101
-
102
- ## Pipeline
103
-
104
- ### 1. Intake
105
-
106
- Put the source into a clean draft folder:
107
-
108
- ```txt
109
- drafts/<format_slug>/
110
- source.md
111
- preview/
112
- source.mp4
113
- screenshot-01.png
114
- ```
115
-
116
- `source.md` should include:
117
-
118
- - original URL
119
- - creator/account if known
120
- - product/category being adapted, if any
121
- - what the human believes is repeatable
122
- - any constraints such as "must use product photo" or "no AI video"
123
-
124
- ### 2. Prepare Analyzer Artifacts
125
-
126
- For every video, create analyzer artifacts before asking AI for a template plan:
127
-
128
- ```txt
129
- auto-create-templates/runs/<run_id>/
130
- source/
131
- frames/contact-sheet.jpg
132
- frames/frame-0001.jpg
133
- audio/source.wav
134
- transcripts/stt.json
135
- ocr/frame_text.json
136
- motion/scene-cuts.json
137
- dna/viral_dna.extraction.json
138
- dna/visual_dna.extraction.json
139
- extraction/production_graph.json
140
- plan/template_plan.json
141
- ```
142
-
143
- Minimum useful extraction:
144
-
145
- - `ffprobe` metadata: duration, resolution, fps, audio presence
146
- - contact sheet: 6-12 frames across the video
147
- - scene cuts: start/end/duration and representative frame
148
- - STT transcript with word timestamps when speech exists
149
- - OCR pass on representative frames
150
- - object/layout pass for faces, products, UI panes, captions, and overlay regions
151
- - audio summary: narrator/music/sfx and approximate sync events
152
- - timing table: every meaningful scene, caption, overlay, zoom, highlight, hold, and transition with exact or inferred start/end times
153
- - font inventory: visible creator-authored caption/overlay fonts, approximate TikTok font match, styling, and fallback stack
154
-
155
- ### 3. Run Viral And Visual DNA
156
-
157
- Use the existing Vidfarm analyzer before the production graph step:
158
-
159
- ```bash
160
- npx @mevdragon/vidfarm-devcli analyze-viral-dna --template-dir ./templates/<template_dir>
161
- npx @mevdragon/vidfarm-devcli analyze-visual-dna --template-dir ./templates/<template_dir>
162
- ```
163
-
164
- The underlying pattern is based on:
165
-
166
- - [1-analyze-viral-dna.mjs](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/tiktok-winning-formats/src/scripts/1-analyze-viral-dna.mjs)
167
- - [1b-analyze-visual-dns.mjs](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/tiktok-winning-formats/src/scripts/1b-analyze-visual-dns.mjs)
168
-
169
- Those scripts upload preview media to Gemini, ask for strict JSON, and store extraction results. For auto-creation, treat viral DNA and visual DNA as upstream context, not the final template plan.
170
-
171
- Use viral DNA for why the format works. Use visual DNA for what the viewer recognizes. Use the production graph for how to recreate it.
172
-
173
- ### 3b. Decide Viral Steering And Visual Preservation
174
-
175
- Before planning the template, create a short preservation decision:
176
-
177
- ```json
178
- {
179
- "viral_steering": {
180
- "must_preserve": [
181
- "specific hook psychology",
182
- "curiosity or tension pattern",
183
- "payoff structure",
184
- "pacing behavior that creates retention"
185
- ],
186
- "must_not_dilute": [
187
- "things that would make the output generic or less clickable"
188
- ]
189
- },
190
- "visual_preservation": {
191
- "importance": "critical | supportive | optional | low",
192
- "preserve_because": "how the visual trait reinforces the viral mechanism",
193
- "preserve": [
194
- "only visual traits that materially support the viral DNA"
195
- ],
196
- "can_change": [
197
- "visual traits that are not part of the viral engine"
198
- ]
199
- }
200
- }
201
- ```
202
-
203
- This decision is viral-first. A visual trait is `critical` only when changing it would damage the hook, recognition, curiosity, credibility, emotional tension, or retention loop. Some formats are presentation-driven and must preserve visual layout tightly. Other formats win because of premise, pacing, or voice, and their visuals can vary more freely.
204
-
205
- The generated template must persist this decision in:
206
-
207
- - `about.viral_dna`
208
- - `about.visual_dna`
209
- - `about.links_to_inspiration`
210
- - `about.sound`
211
- - `about.proposal_generator`
212
- - `about.skeleton_prompt`
213
- - `sample_prompts`
214
- - template-local `SKILL.md`
215
- - prompt constants or comments near the top of `src/template.ts`
216
- - runtime plan/checklist output where the template has a `create_plan` operation
217
-
218
- ### 4. Extract Production Graph
219
-
220
- Run the prompt in [extractor-system-prompt.md](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/vidfarm/auto-create-templates/extractor-system-prompt.md) against:
221
-
222
- - source notes
223
- - source media or contact sheet
224
- - frame OCR
225
- - transcript
226
- - scene cuts
227
- - viral DNA
228
- - visual DNA
229
- - viral steering and visual preservation decision
230
-
231
- The output should match [production-graph.schema.json](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/vidfarm/auto-create-templates/production-graph.schema.json).
232
-
233
- The graph is the critical artifact. It should answer:
234
-
235
- - what is the timeline?
236
- - which clips/images/text/audio are fixed?
237
- - which viral mechanics must be steered in every generated output?
238
- - which visual traits are actually preservation-worthy because of the viral mechanics?
239
- - which elements are replaceable?
240
- - which elements are generated?
241
- - which elements need exact timing?
242
- - which parts are best implemented in Remotion?
243
- - which parts would become brittle if implemented in Remotion?
244
- - whether the format should instead be generated as a prompt/reference with AI-native image or video generation
245
- - which parts require AI image/video generation?
246
-
247
- ### 5. Choose Template Strategy
248
-
249
- Use this decision table, but make an explicit architecture-fit decision instead of defaulting to Remotion:
250
-
251
- | Source pattern | Recommended strategy |
252
- | --- | --- |
253
- | Single static infographic, meme, diagram, notification, poster, fake UI with simple geometry | AI image or HTML/CSS/Canvas composition, optional image reference attachment |
254
- | Dense illustrated poster, painterly infographic, organic collage, or high-detail aesthetic image | AI-native prompt/reference image generation; avoid rebuilding every region in Remotion |
255
- | Static multi-slide carousel | structured slide manifest -> image generation/compositing -> optional Remotion video |
256
- | Screenshot or app interface with simple motion | Remotion-rendered UI shell plus replaceable media/text slots |
257
- | App demo / screen recording | user-provided clip or generated UI recording -> Remotion captions/zooms/highlights |
258
- | Face talking-head with captions | STT/TTS or user audio -> caption renderer -> optional B-roll slots |
259
- | UGC reaction/demo | shot list with user-provided or generated clips, captions, overlays, jump cuts |
260
- | Character animation / clay / anime / Pixar-like with complex motion, acting, camera, or texture | character sprite cards -> image storyboard -> generated video scenes -> Remotion stitch/captions/audio |
261
- | Movie montage / celebrity montage | avoid copyrighted source dependency by making it a generic montage slot template with user-supplied clips or generated parody-safe scenes |
262
- | Explainer animation with simple diagrams | script -> visual metaphor list -> Remotion/Canvas diagrams -> narration -> edit |
263
- | Explainer animation with hand-drawn morphs, organic transitions, or cinematic continuity | script -> storyboard -> AI-native image/video generation -> Remotion only as final edit |
264
-
265
- #### Remotion Ceiling Heuristics
266
-
267
- Choose AI-native prompt/reference generation when the format has several of these traits:
268
-
269
- - organic or painterly visual details where every frame would require many hand-positioned layers
270
- - complex character acting, facial expression, body motion, or physics
271
- - camera moves that rely on generated perspective, parallax, handheld realism, or cinematic continuity
272
- - style consistency matters more than exact bounding boxes
273
- - the source wins because the whole generated image/video feels native, not because it uses a deterministic UI layout
274
- - recreating it in Remotion would require dozens of brittle scene-specific layers, masks, paths, or keyframes
275
- - small visual deviations are acceptable as long as the viral hook, premise, pacing, and style family survive
276
-
277
- Choose Remotion when the format has several of these traits:
278
-
279
- - UI containers, screenshots, chat bubbles, scorecards, diagrams, slides, labels, or other geometric layout
280
- - exact caption timing, word highlighting, arrows, circles, magnifiers, or overlays are the main reusable mechanic
281
- - source clips/images are user-supplied and only need deterministic trimming, cropping, zooming, or captioning
282
- - brand/product slots need reliable positioning across hundreds of outputs
283
- - validation depends on exact safe areas, text legibility, and repeatable timing
284
-
285
- Use hybrid when AI should generate complex source assets but Remotion should assemble, caption, crop, time, and package them.
286
-
287
- #### Full AI Character Video Detection
288
-
289
- Detect `full_ai_character_video` when the source has several of these traits:
290
-
291
- - recurring generated character or mascot across multiple scenes
292
- - consistent face, body, wardrobe, material style, or prop relationship
293
- - multiple story beats where the same character performs actions, reacts, or changes location
294
- - animation style is part of recognition, such as claymation, anime, Pixar-like, game cutscene, illustrated skit, or puppet/doll style
295
- - video cannot be reduced to one static image or deterministic UI shell
296
- - quality depends on maintaining identity through a sequence, not just generating one good shot
297
-
298
- For this case, the template should usually expose this operation family:
299
-
300
- - `create_character_cards`: generate or normalize character sprite/reference cards, including front/side/close-up/expression/pose references.
301
- - `create_storyboard`: generate a scene-by-scene image storyboard from the viral steering contract, character cards, and user brief.
302
- - `generate_scene_videos`: turn storyboard frames/keyframes into short AI video clips with scene-level action and camera prompts.
303
- - `stitch_video`: assemble clips, narration, captions, audio, transitions, CTA, and final safe-area formatting.
304
-
305
- Use Remotion for `stitch_video`, captions, audio, timing, crop/fit, and light overlays. Do not use Remotion to fake character acting frame by frame.
306
-
307
- ### 6. Plan Vidfarm Template
308
-
309
- Run [template-planner-prompt.md](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/vidfarm/auto-create-templates/template-planner-prompt.md) with the production graph. It should output a template plan containing:
310
-
311
- - slug and title
312
- - `about.viral_dna`
313
- - `about.visual_dna`
314
- - `about.links_to_inspiration`
315
- - `about.sound`
316
- - `about.proposal_generator`
317
- - `about.skeleton_prompt`
318
- - `about.sample_prompts`
319
- - viral steering rules that every prompt/output must satisfy
320
- - visual preservation rules, with an explicit importance level
321
- - config schema
322
- - operation list
323
- - operation input schemas
324
- - workflow/job plan
325
- - Remotion composition plan if needed
326
- - architecture fit decision, including why Remotion is or is not appropriate
327
- - AI-native prompt/reference plan when deterministic assembly would be brittle
328
- - character-consistency workflow when the source is a full AI character video
329
- - provider requirements
330
- - validation checklist
331
- - risk notes
332
-
333
- The output should match [template-plan.schema.json](/Users/localghost/Projects/OfficeX/OfficeX/ZoomGTM/vidfarm/auto-create-templates/template-plan.schema.json).
334
-
335
- ### 7. Generate And Validate
336
-
337
- Scaffold normally:
338
-
339
- ```bash
340
- npx @mevdragon/vidfarm-devcli generate-template \
341
- --slug-id <slug_id> \
342
- --template-dir ./templates/vidfarm_template_<slug> \
343
- --link-to-original "<source_url>" \
344
- --source-notes-path ./drafts/<format_slug>/source.md \
345
- --source-preview-dir ./drafts/<format_slug>/preview
346
- ```
347
-
348
- Then implement from the plan:
349
-
350
- - public operations stay coarse-grained and async
351
- - viral DNA is persisted as a steering contract, not just descriptive metadata; generation prompts should actively enforce the hook, tension, payoff, pacing, and audience psychology that make the format work
352
- - visual DNA is persisted according to its preservation decision; preserve tightly only when visuals support the viral mechanism, otherwise allow controlled variation
353
- - timing parameters are exposed when useful instead of being buried as constants; at minimum support `duration_ms` per scene/slide/media slot and sensible min/max clamping
354
- - caption/font parameters prefer TikTok-native defaults and can be configured when the format's recognizability depends on typography
355
- - generated media goes through `ctx.storage`
356
- - `ctx.storage` keys are job-relative only, such as `backgrounds/slide-01.png`, `slides/slide-01.png`, `audio/narration.wav`, `renders/final.mp4`, or `manifests/run.json`
357
- - do not generate absolute platform storage keys like `templates/${templateId}/users/${ctx.customer.id}/...`; hosted Vidfarm prefixes template job artifacts automatically
358
- - do not import the AWS SDK, create S3 clients, mutate `process.env.AWS_*`, or read `REMOTION_AWS_*` in template code
359
- - video render props reference artifact URLs, not base64
360
- - Remotion is used only where it is the right tool: deterministic layout, captions, overlays, timing, simple motion, and final edit
361
- - if the format exceeds Remotion's practical complexity ceiling, preserve it as an AI-native prompt/reference template and use Remotion only for optional wrapping, captions, or stitching
362
- - image/video providers are used for assets that cannot be deterministically composed
363
- - provider/model recommendations from `SKILL.developer.md` are persisted in the template-local `SKILL.md` and near the top of `src/template.ts` as a checked-in constant or clearly named comment block
364
- - generated templates must not set a fixed `providerHint`, hidden provider fallback, or operation payload default that can strand jobs when the customer lacks that provider key. Operations should be provider-agnostic where possible and must call `ctx.providers.*` so platform provider resolution runs before AI generation.
365
- - provider preferences are saved template config, not operation payload defaults. Keep operation provider fields optional explicit overrides, and express provider preference as payload override -> saved config -> platform-compatible fallback from available customer keys -> documented failure.
366
- - do not generate schemas like `provider: z.enum(...).default("gemini")`, `tts_provider: z.enum(...).default("openai")`, or `transcription_provider: z.enum(...).default(...)` inside operation input schemas.
367
- - do not generate parser helpers that silently return `"gemini"`, `"openai"`, or `"openrouter"` when config is missing unless the downstream `ctx.providers.*` call can still fall back to another compatible saved customer key.
368
- - avoid generating `defaultProvider: z.enum(...).default("openai")` or similar fixed config defaults unless the job still falls back to another compatible saved provider key when that default is unavailable
369
- - OpenAI image calls must use only supported `size` values: `1024x1024`, `1536x1024`, `1024x1536`, `2048x2048`, `2048x1152`, `3840x2160`, `2160x3840`, or `auto`
370
- - 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 arbitrary pixel sizes to Gemini
371
- - translate requested framing into the selected provider's supported size fields at call time, especially when fallback can switch providers
372
- - template-local `SKILL.md` must describe operations, payloads, provider caveats, and examples
373
-
374
- Recommended baseline models, unless the template has an explicit reason to differ:
375
-
376
- ```ts
377
- const TEMPLATE_PROVIDER_RECOMMENDATIONS = {
378
- text: {
379
- openai: "gpt-5.4",
380
- gemini: "gemini-3.1-flash-lite",
381
- openrouter: "qwen/qwen3.6-flash"
382
- },
383
- layout_analysis: {
384
- openai: "gpt-5.4",
385
- gemini: "gemini-3.1-flash-lite",
386
- openrouter: "qwen/qwen3.6-flash"
387
- },
388
- image: {
389
- openai: "gpt-image-2",
390
- gemini: "gemini-3-pro-image-preview",
391
- openrouter: "google/gemini-3.1-flash-image-preview"
392
- },
393
- video: {
394
- openai: "sora-2",
395
- gemini: "veo-3.0-generate-001"
396
- },
397
- tts: {
398
- openai: "gpt-4o-mini-tts-2025-12-15",
399
- gemini: "gemini-3.1-flash-tts-preview",
400
- openrouter: "google/gemini-3.1-flash-tts-preview"
401
- },
402
- stt: {
403
- openai: "gpt-4o-mini-transcribe-2025-12-15",
404
- gemini: "gemini-3.1-flash-lite-preview",
405
- openrouter: "openai/gpt-4o-mini-transcribe"
406
- }
407
- } as const;
408
- ```
409
-
410
- Validate:
411
-
412
- ```bash
413
- npx @mevdragon/vidfarm-devcli validate-template --template-id <slug_id>
414
- npx @mevdragon/vidfarm-devcli session
415
- ```
416
-
417
- Then run at least one real local operation and inspect artifacts.
418
-
419
- ## Operation Patterns
420
-
421
- Most auto-created templates should expose two paths:
422
-
423
- - `create_plan`: turn a prompt/product brief into a concrete script, shot list, asset list, and render plan.
424
- - `render_video` or `create_video`: generate/assemble the final output from explicit assets or from the plan.
425
-
426
- `create_plan` must include a viral compliance section in its output:
427
-
428
- - which viral DNA rules the plan is using
429
- - how the first frame/hook preserves the source format's click driver
430
- - how the middle preserves tension, curiosity, status, proof, or emotional movement
431
- - how the ending preserves payoff, loop, share/save behavior, or CTA
432
- - whether visual DNA is critical, supportive, optional, or low-importance for this format
433
- - which visual rules are enforced vs allowed to vary
434
-
435
- Every video-producing template should make timing explicit. The default input shape should allow:
436
-
437
- - `duration_ms` for each scene, slide, or media slot
438
- - `caption_timing_mode`: transcript-derived, fixed beat groups, or manual timestamps
439
- - `transition_ms`
440
- - `hold_ms`
441
- - optional `total_duration_ms` target with proportional scaling
442
- - min/max duration clamps so batch generation cannot create broken pacing
443
-
444
- Every captioned template should strongly prefer TikTok-native typography. Use checked-in fonts when available, especially `TikTokSans-SemiBold.ttf` from the reference template assets, with practical fallbacks such as Montserrat or system sans. Expose caption styling in config only where it is useful; otherwise default to the closest source-matching TikTok style.
445
-
446
- Caption fonts are an allowlist, not a vibe. New templates should default to these IDs:
447
-
448
- - `tiktok_sans_semibold` for native TikTok captions, subtitles, and creator-authored overlays
449
- - `montserrat_semibold` for clean bold social cards and modern overlays
450
- - `source_code_pro_bold` for code, terminal, receipt, data, and intentionally monospaced formats
451
- - `georgia_bold` for serif editorial formats
452
- - `abel` for narrow/condensed UI-like captions
453
-
454
- Legacy IDs `montserrat` and `source_code_pro` may be accepted for compatibility, but new configs should use the explicit weighted IDs. A `custom` font is an exception, not an option to expose casually. If a custom font is needed, the template plan and `SKILL.md` must name the font, asset path, fallback, role, and why an approved font would damage the source format.
455
-
456
- Important readable text should normally be deterministic. Do not ask image or video models to render captions, subtitles, app UI labels, prices, claims, CTAs, or product offers when those can be composited after generation. Generate a clean background or scene first, then place text with Remotion, SVG/canvas, or Sharp. Allow AI-rendered text only when the whole format is poster/artifact-native and the validation harness includes OCR/readability checks.
457
-
458
- Multiline caption renderer requirement:
459
-
460
- - wrap each caption once, choose one font size and line height for the whole caption block, and render it as one multiline text block
461
- - do not render each wrapped line as an independently trimmed image; that makes shorter lines look larger or heavier because trim bounds, line height, and shadow placement vary per line
462
- - apply shadow/outline to the whole multiline block, then composite the block; line chips can be measured per line after the block layout is fixed
463
- - tune TikTok Sans wrapping, size, and line spacing separately from Montserrat or generic sans defaults
464
- - validate with mixed-length wrapped captions and confirm both lines retain the same apparent size, weight, baseline rhythm, and shadow strength
465
-
466
- ## Output Quality Harness
467
-
468
- Every video-producing or image-producing template should include a quality harness in its plan, manifest, and template-local `SKILL.md`. The point is to reject predictable low-quality outputs before the director burns three full generations.
469
-
470
- Required report fields:
471
-
472
- - `viralCompliance`: whether the first-frame hook, retention driver, and payoff still match the source format
473
- - `visualPreservation`: which critical visual rules passed or failed
474
- - `fontPolicy`: selected font IDs, custom font exceptions, and generated-vs-deterministic text decisions
475
- - `captionReadability`: wrap, size, contrast, shadow/outline, and phone-size legibility
476
- - `safeArea`: TikTok top/right/bottom collision checks for captions and important UI
477
- - `assetIntegrity`: missing assets, malformed text in generated images, bad crops, or wrong aspect ratios
478
- - `finalOutput`: artifact URLs, manifest URLs, duration clamps, ending/payoff, and storage boundary checks
479
- - `retryPlan`: the smallest failed stage to rerun
480
-
481
- The harness should run in four gates:
482
-
483
- - Preflight: validate the structured plan before generating expensive assets. The plan must name exact hook text, media slots, caption surfaces, font IDs, timing clamps, and visual preservation rules.
484
- - Asset check: inspect generated images, clips, audio, and uploaded media before final assembly. Reject bad crops, wrong aspect ratios, AI text artifacts, or missing references here.
485
- - Composition check: validate deterministic layout. Caption safe area, font allowlist, multiline renderer, chip geometry, and shadow/outline failures are code/config failures, not creative prompt failures.
486
- - Final check: validate the rendered image or MP4 against the viral DNA, visual preservation contract, duration, storage artifacts, and retry plan.
487
-
488
- Retry rules:
489
-
490
- - If font, safe-area, caption wrapping, chip geometry, storage, or Remotion layout fails, fix code/config and rerender. Do not regenerate the whole creative.
491
- - If one generated asset fails, retry only that asset with stronger references or tighter prompt constraints.
492
- - If the first-frame hook, story logic, or payoff fails, regenerate the script/plan before spending more image/video generations.
493
- - If an AI-native style rule fails twice, switch to storyboard/keyframes, better references, or deterministic compositing for the failing surface.
494
-
495
- For simple image formats:
496
-
497
- - `create_image`: exact/director-controlled path
498
- - `create_image_auto`: AI-brief path that writes exact text and image prompts first
499
-
500
- For slideshow formats:
501
-
502
- - `create_slides`: returns frames, manifest, and render input
503
- - `render_video`: turns frames or mixed media slots into MP4
504
-
505
- For Remotion formats that include remote source footage:
506
-
507
- - preserve director-supplied media URLs as direct render inputs
508
- - prefer Remotion `Video` or `@remotion/media` `Video` for remote video playback
509
- - do not choose `OffthreadVideo` for remote source footage
510
-
511
- For complex video formats:
512
-
513
- - `create_script`: hook, narration/dialogue, beat list
514
- - `create_storyboard`: frame prompts and continuity notes
515
- - `generate_assets`: AI images/video clips/audio
516
- - `render_video`: deterministic edit and overlays
517
-
518
- For full AI character videos:
519
-
520
- - `create_character_cards`: produces character reference images and a character bible manifest
521
- - `create_storyboard`: produces ordered storyboard frames/keyframes with scene prompts, camera notes, action notes, and continuity notes
522
- - `generate_scene_videos`: produces one video clip per storyboard scene, using character cards and storyboard frames as references where the provider supports it
523
- - `stitch_video`: combines generated clips, voice/music/sfx, captions, transitions, and CTA into the final video
524
-
525
- The output manifest should keep character cards, storyboard frames, scene clips, audio, and final render as separate artifacts so the workflow can be resumed or revised at any stage.
526
-
527
- For AI-native reference formats:
528
-
529
- - `create_prompt_plan`: convert a product/audience brief into a source-faithful prompt/reference contract
530
- - `generate_reference_asset`: produce the final image or video using source DNA, attachments, and style constraints
531
- - `wrap_video` or `render_video`: optional Remotion wrapper for platform-safe duration, captions, music, CTA, or end card
532
-
533
- ## Production Graph Principles
534
-
535
- The graph should be precise enough that an agent can implement a template without rewatching the source.
536
-
537
- Every timeline item should include:
538
-
539
- - `start_ms` and `end_ms`
540
- - `duration_ms`
541
- - `role`: hook, setup, proof, gag, reveal, CTA, transition, b-roll, UI, caption, overlay, audio
542
- - `asset_kind`: source_video, generated_video, generated_image, uploaded_image, uploaded_video, rendered_ui, text, audio, shape, effect
543
- - `replaceability`: fixed, variable, optional, generated
544
- - `implementation`: remotion, ai_image, ai_video, tts, stt, user_upload, external_clip, html_canvas
545
- - `architecture_fit`: remotion, ai_native_reference, hybrid, or manual_review
546
- - `character_consistency`: none, light, strict, or identity_locked
547
- - `safe_area_notes`
548
- - `validation_notes`
549
-
550
- The graph should separate four layers:
551
-
552
- - viral layer: hook, audience psychology, tension, payoff, retention, share/save reason
553
- - narrative layer: what story or argument happens
554
- - visual layer: frames, shots, UI, layout, overlays
555
- - audio layer: speech, captions, music, sfx
556
- - interaction layer: pointing, circling, zooming, highlighting, magnifying, camera movement
557
-
558
- ## Guardrails
559
-
560
- - Do not turn copyrighted movie/TV clips into a template dependency. Model those formats as user-supplied clip slots or generate parody-safe replacements.
561
- - Do not require AWS, S3, or cloud Remotion setup for local template creation.
562
- - Do not write binary media into JSON outputs. Store with `ctx.storage` and return URLs.
563
- - Do not include hosted platform prefixes in template storage keys. The platform owns `templates/:template_id/users/:user_id/jobs/:job_id/`; templates provide only the artifact path inside the job.
564
- - Do not use direct AWS/S3 or Remotion credential environment variables in template code. Use `ctx.storage` and `ctx.remotion`.
565
- - Do not reconstruct hosted storage URLs. Preserve URLs returned by `ctx.storage`, provider uploads, or prior job results, and pass canonical `result.renderVideoInput` objects through to downstream `render_video` operations.
566
- - Every `ctx.remotion.render(...)` call must include `preflightUrls` for remote media Remotion will load, with field labels such as `slides[2].imageUrl`, `scene_media_url`, or `demo_video_url`.
567
- - Do not invent REST endpoints. Use standard Vidfarm operations and jobs.
568
- - Do not put provider defaults in operation payload schemas. That bypasses saved customer template config and can make the editor agent wait for the wrong provider key.
569
- - Do not set fixed `providerHint` or hardcoded provider defaults that make an operation wait for OpenAI, Gemini, or another provider when the customer has a different compatible provider saved.
570
- - Do not send unsupported image dimensions to provider APIs: OpenAI accepts only `1024x1024`, `1536x1024`, `1024x1536`, `2048x2048`, `2048x1152`, `3840x2160`, `2160x3840`, or `auto`; Gemini uses supported `aspectRatio` plus `imageSize` `1K`/`2K`/`4K`, not raw pixel sizes.
571
- - Do not treat DNA analysis as sufficient. It explains why and what; the production graph explains how.
572
- - Do not bury viral DNA as static `about` text only. It must steer prompts, plans, operation outputs, validation checks, and template usage docs.
573
- - Do not preserve visual traits blindly. First decide whether each trait materially supports the viral DNA; then preserve only the traits that matter.
574
- - Do not overuse AI video when Remotion or HTML composition can reproduce the format deterministically.
575
- - Do not force Remotion onto formats whose value comes from organic generated style, character acting, cinematic movement, or dense visual texture. Use AI-native prompt/reference generation when it will be more robust.
576
- - Do not ignore audio. Many medium/hard formats are paced by voice, captions, and beat timing.
577
-
578
- ## Suggested Automation Command
579
-
580
- A future CLI command could wrap the harness like this:
581
-
582
- ```bash
583
- npx @mevdragon/vidfarm-devcli auto-create-template \
584
- --source ./drafts/<format_slug>/preview/source.mp4 \
585
- --source-notes ./drafts/<format_slug>/source.md \
586
- --slug-id <slug_id> \
587
- --template-dir ./templates/vidfarm_template_<slug> \
588
- --run-dir ./auto-create-templates/runs/<run_id>
589
- ```
590
-
591
- Internally it should:
592
-
593
- 1. stage source media
594
- 2. extract media artifacts
595
- 3. scaffold template with DNA analysis
596
- 4. generate production graph
597
- 5. generate template plan
598
- 6. optionally open a code-generation pass to implement the template
599
- 7. validate template metadata and run smoke jobs