@mevdragon/vidfarm-devcli 0.2.9 → 0.2.11

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.
@@ -144,16 +144,18 @@ This boundary matters because job results are saved in SQLite, returned by REST
144
144
  If the user gives you a media file, a screenshot, a folder of source assets, or a link to an original viral post and says some variant of "turn this into a template", you should default to this workflow:
145
145
 
146
146
  1. inspect the source media and extract the repeatable format
147
- 2. scaffold a new template with `vidfarm-devcli generate-template`
148
- 3. stage the source notes and preview media inside the template
149
- 4. run `analyze-viral-dna`
150
- 5. run `analyze-visual-dna`
147
+ 2. start the native harness workflow with `vidfarm-devcli autocreate-template <input_path> <output_path>`
148
+ 3. review the generated run folder, manifest, and `agent_prompt.md`
149
+ 4. generate the preservation decision, production graph, and template plan
150
+ 5. run or consume `analyze-viral-dna` and `analyze-visual-dna`
151
151
  6. implement the template operations and jobs
152
152
  7. wire prompt logic, provider usage, storage writes, and local Remotion output
153
153
  8. expose the template through the standard REST routes
154
154
  9. validate the template locally with `validate-template` plus at least one real job run
155
155
  10. update the template-local `SKILL.md` so future agents can operate it
156
156
 
157
+ Use `generate-template` directly only when the developer already knows the template architecture and wants a plain starter scaffold. Use `autocreate-template` when source media needs to be analyzed into a reusable format.
158
+
157
159
  Do not stop after scaffolding. The expected outcome is a runnable template, not just a folder.
158
160
 
159
161
  If the user gives revision feedback in natural language, treat that as a normal template-authoring input, not as a vague suggestion. Example revision prompts:
@@ -491,6 +493,63 @@ Keep the identifiers separate:
491
493
  - `about.title` is the user-facing display title and should not be prefixed with `Vidfarm Template` unless that phrase is genuinely part of the brand or concept
492
494
  - avoid redundant titles like `Vidfarm Template UGC Hooks V1` when `UGC Hooks V1` is the actual display name
493
495
 
496
+ ### 3a. Use the native auto-create harness for media-to-template work
497
+
498
+ When the developer says "autocreate a template based on media in `<input_path>` and output template to `<output_path>`", use:
499
+
500
+ ```bash
501
+ npx @mevdragon/vidfarm-devcli autocreate-template <input_path> <output_path>
502
+ ```
503
+
504
+ Alias:
505
+
506
+ ```bash
507
+ npx @mevdragon/vidfarm-devcli autocreate <input_path> <output_path>
508
+ ```
509
+
510
+ The command accepts either positional paths or explicit flags:
511
+
512
+ ```bash
513
+ npx @mevdragon/vidfarm-devcli autocreate-template \
514
+ --input-path ./drafts/my_format \
515
+ --output-path ./templates/vidfarm_template_my_format \
516
+ --link-to-original "https://www.tiktok.com/@example/video/1234567890"
517
+ ```
518
+
519
+ What this does:
520
+
521
+ - creates `auto-create-templates/runs/<run_id>/`
522
+ - stages source notes and preview media under `source/`
523
+ - creates the standard analyzer artifact folders: `frames`, `audio`, `transcripts`, `ocr`, `motion`, `dna`, `extraction`, and `plan`
524
+ - snapshots the current reusable harness files into `runs/<run_id>/harness/` for traceability
525
+ - runs basic `ffprobe`/`ffmpeg` extraction when source video and local tools are available
526
+ - scaffolds the output template with the same starter logic as `generate-template`
527
+ - writes `manifest.json` and `agent_prompt.md` as the agent handoff
528
+
529
+ Useful options:
530
+
531
+ - `--run-id <id>`: choose the run folder name
532
+ - `--slug-id <slug>`: override the slug derived from the output folder
533
+ - `--template-id <uuid>`: pin the template UUID
534
+ - `--skip-dna-analysis`: scaffold without calling Gemini DNA analysis
535
+ - `--skip-media-probes`: skip local `ffprobe`/`ffmpeg` artifact generation
536
+ - `--skip-scaffold`: create only the run artifacts and handoff prompt
537
+ - `--harness-dir <path>`: use a local harness checkout other than `auto-create-templates/`
538
+ - `--force`: replace an existing output template folder
539
+
540
+ After running `autocreate-template`, continue the harness workflow instead of stopping at scaffold:
541
+
542
+ 1. inspect `auto-create-templates/runs/<run_id>/agent_prompt.md`
543
+ 2. create `dna/preservation_decision.json`
544
+ 3. create `extraction/production_graph.json` matching `production-graph.schema.json`
545
+ 4. create `plan/template_plan.json` matching `template-plan.schema.json`
546
+ 5. implement `src/template.ts`, metadata, prompts, operations, jobs, and template-local `SKILL.md`
547
+ 6. run `validate-template` and at least one real local job
548
+
549
+ The reusable harness lives in `auto-create-templates/AUTO_CREATE_TEMPLATES.md`. It is intentionally included in the devcli package as editable source material. Future improvements to the harness should be made there; each auto-create run stores a snapshot of the harness files used for that run so older runs remain explainable.
550
+
551
+ ### 3b. Generate a plain starter template
552
+
494
553
  Example:
495
554
 
496
555
  ```bash
@@ -852,6 +911,23 @@ Required fields checklist:
852
911
 
853
912
  For TikTok-native captions, use the platform caption standard exposed by `vidfarm-devcli session` under `starter_style_options`.
854
913
 
914
+ Check the currently installed CLI values with:
915
+
916
+ ```bash
917
+ npx @mevdragon/vidfarm-devcli session
918
+ ```
919
+
920
+ The current standard version is `2026-05-30`. The CLI response includes `caption_standard_version`, `fonts`, `text_background_colors`, `presets`, `package_dependencies`, the source standard file, and the starter template style file.
921
+
922
+ Text background rendering rule:
923
+
924
+ - any selected text background color must render as an inline highlight chip that hugs the text only
925
+ - apply visible per-line padding around the glyph bounds; the background should feel intentional, not cramped
926
+ - use slightly curved corners like TikTok's native text highlight shape
927
+ - do not render full-width bars, paragraph washes, large caption panels, or loose boxes behind text
928
+ - for multi-line captions, each line should get its own tight chip or a chip shape that follows the actual text block closely
929
+ - support chip strength levels where practical: `subtle` for light editor-style chips, `standard` for normal TikTok color chips, and `strong` for high-contrast emphatic captions
930
+
855
931
  Canonical font IDs:
856
932
 
857
933
  - `tiktok_sans_semibold`: default native TikTok caption font, backed by `@fontsource/tiktok-sans` or the bundled `TikTokSans-SemiBold.ttf` starter asset
@@ -866,6 +942,21 @@ Legacy aliases remain accepted for older starters:
866
942
  - `montserrat` -> `montserrat_semibold`
867
943
  - `source_code_pro` -> `source_code_pro_bold`
868
944
 
945
+ Font package dependencies exposed by the CLI:
946
+
947
+ - `@fontsource/tiktok-sans`
948
+ - `@fontsource/montserrat`
949
+ - `@fontsource/source-code-pro`
950
+ - `@fontsource/libre-baskerville`
951
+
952
+ Bundled starter assets may also be available for template-local rendering:
953
+
954
+ - `TikTokSans-SemiBold.ttf`
955
+ - `Montserrat[wght].ttf`
956
+ - `SourceCodePro[wght].ttf`
957
+ - `Yesteryear-Regular.ttf`
958
+ - `Abel-Regular.ttf`
959
+
869
960
  Canonical text background color IDs:
870
961
 
871
962
  - `black`: `#000000`
@@ -884,6 +975,12 @@ Canonical text background color IDs:
884
975
  - `light_gray`: `#92979E`
885
976
  - `dark_gray`: `#333333`
886
977
 
978
+ Canonical style presets:
979
+
980
+ - `tiktok_native_white`: TikTok Sans SemiBold, white fill, no color chip, native black shadow
981
+ - `tiktok_native_chip`: TikTok Sans SemiBold, white fill, red default inline highlight chip, `standard` chip strength, native black shadow
982
+ - `tiktok_editor_gray`: TikTok Sans SemiBold, dark fill, light gray default inline highlight chip, `subtle` chip strength, no shadow
983
+
887
984
  Templates that expose caption styling should use these IDs in `configSchema`, operation payloads, manifests, and docs instead of inventing local names or hardcoding unrelated font stacks. If a template intentionally uses a format-specific typography system, document the exception in the template-local `SKILL.md`.
888
985
 
889
986
  The caption standard is a default, not a hard lock. Templates may support `captionFont: "custom"` or template-specific text rendering when the user explicitly needs typography outside the standard. In that case, keep the standard options available, document the custom fields, and prefer bundled or template-local font assets over system fonts or remote Google Fonts URLs.
package/dist/src/cli.js CHANGED
@@ -7,7 +7,7 @@ import path from "node:path";
7
7
  import { parseArgs } from "node:util";
8
8
  import { promisify } from "node:util";
9
9
  import dotenv from "dotenv";
10
- import { CAPTION_STANDARD_VERSION, STARTER_TEMPLATE_FONT_OPTIONS, STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS, TIKTOK_CAPTION_STYLE_PRESETS } from "./lib/template-style-options.js";
10
+ import { CAPTION_STANDARD_VERSION, STARTER_TEMPLATE_FONT_OPTIONS, STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS, TIKTOK_CAPTION_STYLE_PRESETS, TIKTOK_TEXT_BACKGROUND_RENDERING } from "./lib/template-style-options.js";
11
11
  import { analyzeTemplateDna, hasTemplatePreviewMedia, stageTemplateDnaInputs, syncTemplateDnaModule } from "./lib/template-dna.js";
12
12
  import { assertTemplateFolderNameHasPrefix, defaultSkillPathForTemplateModule, deriveTemplateRootDirFromModulePath } from "./lib/template-paths.js";
13
13
  const execFileAsync = promisify(execFile);
@@ -857,6 +857,7 @@ async function runSessionCommand(argv) {
857
857
  caption_standard_version: CAPTION_STANDARD_VERSION,
858
858
  fonts: STARTER_TEMPLATE_FONT_OPTIONS,
859
859
  text_background_colors: STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS,
860
+ text_background_rendering: TIKTOK_TEXT_BACKGROUND_RENDERING,
860
861
  presets: TIKTOK_CAPTION_STYLE_PRESETS,
861
862
  package_dependencies: [
862
863
  "@fontsource/tiktok-sans",
@@ -99,6 +99,38 @@ export const TIKTOK_TEXT_BACKGROUND_COLOR_OPTIONS = [
99
99
  { id: "dark_gray", label: "Dark Gray", hex: "#333333" }
100
100
  ];
101
101
  export const STARTER_TEMPLATE_TEXT_BACKGROUND_COLOR_OPTIONS = TIKTOK_TEXT_BACKGROUND_COLOR_OPTIONS;
102
+ export const TIKTOK_TEXT_BACKGROUND_RENDERING = {
103
+ mode: "inline_highlight_chip",
104
+ rule: "Text background colors must render as inline highlight chips that hug the text only.",
105
+ padding: "Use visible per-line padding around glyph bounds; do not render full-width bars, paragraph washes, or loose caption boxes.",
106
+ shape: "Use slightly curved corners, similar to native TikTok text highlight chips.",
107
+ strengths: {
108
+ none: {
109
+ paddingX: 0,
110
+ paddingY: 0,
111
+ radius: 0,
112
+ opacity: 0
113
+ },
114
+ subtle: {
115
+ paddingX: 14,
116
+ paddingY: 8,
117
+ radius: 9,
118
+ opacity: 0.72
119
+ },
120
+ standard: {
121
+ paddingX: 20,
122
+ paddingY: 12,
123
+ radius: 12,
124
+ opacity: 0.86
125
+ },
126
+ strong: {
127
+ paddingX: 26,
128
+ paddingY: 14,
129
+ radius: 14,
130
+ opacity: 0.94
131
+ }
132
+ }
133
+ };
102
134
  export const TIKTOK_CAPTION_STYLE_PRESETS = [
103
135
  {
104
136
  id: "tiktok_native_white",
@@ -114,6 +146,8 @@ export const TIKTOK_CAPTION_STYLE_PRESETS = [
114
146
  fontId: "tiktok_sans_semibold",
115
147
  fill: "#ffffff",
116
148
  defaultBackgroundColorId: "red",
149
+ backgroundRendering: "inline_highlight_chip",
150
+ chipStrength: "standard",
117
151
  shadow: "native_black_shadow"
118
152
  },
119
153
  {
@@ -122,6 +156,8 @@ export const TIKTOK_CAPTION_STYLE_PRESETS = [
122
156
  fontId: "tiktok_sans_semibold",
123
157
  fill: "#111111",
124
158
  defaultBackgroundColorId: "light_gray",
159
+ backgroundRendering: "inline_highlight_chip",
160
+ chipStrength: "subtle",
125
161
  shadow: "none"
126
162
  }
127
163
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mevdragon/vidfarm-devcli",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Developer CLI for running the Vidfarm local template platform.",
5
5
  "type": "module",
6
6
  "bin": {