@mevdragon/vidfarm-devcli 0.20.3 → 0.20.5

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.
@@ -49,7 +49,7 @@ This mints a new fork and opens it in the editor — the same **New fork** actio
49
49
 
50
50
  The most common intent: the user opens a template to reuse its structure and says *"make this for X"* (e.g. a book-recap template → "The Richest Man in Babylon", or a listicle → "my coffee brand"). Treat it as first-class:
51
51
 
52
- 1. **Read the DNA first.** `composition_context` carries the format/genre + arc (trend_tagline, hook, retention, payoff, preserve, avoid). For the scene beats/transcript, call the `video_context` tool. Match the template's *voice* — a text-message template's captions read like chat, a story-time template reads like first-person narration; don't default to generic ad copy.
52
+ 1. **Read the DNA first.** `composition_context` carries the format/genre + arc (trend_tagline, hook, retention, payoff, preserve, avoid) **plus `emotional_punch`** — the FEELING the format delivers (`core_emotion`, `tone`, `arc`, `peak_moment`, `mechanism`, `humor`, `delivery`, `preserve`): the vibe/joke/intonation a remix most often flattens. Rebuild `humor`'s joke around the new subject rather than dropping it, match `tone`/`delivery` so timing and intonation survive, and never trade the `peak_moment` payoff for a flat product plug. For the scene beats/transcript, call the `video_context` tool (whose `viral_dna` also carries the full `emotional_punch`). Match the template's *voice* — a text-message template's captions read like chat, a story-time template reads like first-person narration; don't default to generic ad copy.
53
53
  2. **Propose, then ask only what you can't infer.** One concise plan plus a couple of questions: which specifics of the new subject to feature (offer to pick the strongest N to match the scene count), keep the current narrator voice?, any brand assets/images to use (else you'll generate), a target length if different.
54
54
  3. **Execute axis by axis, preserving the DNA:**
55
55
  - TEXT → rewrite every caption/title layer in the template's voice (`set_layer_text` / `set_captions`), keeping caption animation + timing.
package/SKILL.director.md CHANGED
@@ -290,7 +290,7 @@ Use it whenever you need to know what the video says or shows: writing/translati
290
290
  **Use it to pick concrete moves:** `typography.caption_style` maps to a `set_captions` preset; `transitions.*` to a `set_transitions` call; keep `pacing` (cut rhythm / avg_scene_seconds) when adding or splitting scenes; follow `broll.reliance`/`sourcing` to decide HUNT raws (`/raws/scan`) vs generate; lay `audio.*`. **`emotional`** is HOW to keep the FEELING while you swap the subject — the vibe/joke/intonation/sound are the first things a remix flattens, so honor `emotional.comedic_timing` (the held beat / hard cut that sells the joke), preserve `emotional.intonation` when you re-voice narration, and treat every `emotional.vibe_anchors` entry as a must-do (on short-form the trending sound / beat drop is often the biggest carrier of the punch — keep it and land it on the same cut). **Protect** any beat in `important_scenes` or with `must_keep:true` / `importance:"critical"` — swap the subject but preserve its timing, role, and caption cadence. Treat `editing_bias`/`do`/`dont` as hard constraints; an explicit user instruction still wins. `status:"none"` → run `POST /auto-decompose` first.
291
291
 
292
292
  - **Editor chat (frontend AI)** already receives the harness inline in `editor_context.editor_harness` (no tool call needed); it can also fetch this route via `http_request`.
293
- - **Desktop agents (Claude Code / Codex)**: `vidfarm pull` writes `editor-harness.json` to the fork dir (the brief is under `.harness`) alongside `video-context.json`; read it before a big edit. The `pull` grounding line reports whether it's present.
293
+ - **Desktop agents (Claude Code / Codex)**: `vidfarm pull` writes `editor-harness.json` to the fork dir alongside `video-context.json`, and also materializes a merged agent bundle at `.harness/context.json` plus `.harness/agent-guide.md`. This deliberately does **not** write a top-level `AGENTS.md`, because many user repos already own that file. For local scripting or agentic edits, read `.harness/agent-guide.md` and `.harness/context.json` FIRST; do not freestyle from `composition.html` alone. The `pull` grounding line reports the generated brief paths.
294
294
 
295
295
  ## Raws (long-form → short-form raws)
296
296
 
@@ -696,6 +696,23 @@ If you need many variants, keep the base fork fixed and fan out by cloning that
696
696
  - `POST /api/v1/compositions/:forkId/render` with a stable `tracer`, or `vidfarm render <forkId> --dir ./work --wait` for the same composed flow
697
697
  - `render_target: "cloud"` when you want cloud handoff from a local `vidfarm serve` box, or the default local renderer when you want free in-process output
698
698
 
699
+ **Required grounding for AI-authored scripts.** If an AI agent is going to WRITE or MODIFY a local Vidfarm script for a user, the safe default is:
700
+
701
+ 1. `vidfarm pull <forkId> --dir ./work`
702
+ 2. Read `./work/.harness/agent-guide.md`
703
+ 3. Read `./work/.harness/context.json`
704
+ 4. Only then read/edit `composition.html`, `composition.json`, and write the automation logic
705
+
706
+ That is the canonical local scripting path because the pull step now packages:
707
+
708
+ - `video-context.json`: transcript, scene descriptions, viral DNA
709
+ - `editor-harness.json`: technical editing brief
710
+ - `scene-annotations.json`: per-scene replacement/recreation DNA
711
+ - `.harness/context.json`: merged agent-facing snapshot
712
+ - `.harness/agent-guide.md`: Vidfarm-specific instruction file telling a generic agent how to use the above without conflicting with any repo-owned `AGENTS.md`
713
+
714
+ If a local AI script rewrites text or scenes without consuming those files first, treat that as a bug in the script/agent flow.
715
+
699
716
  | Command | REST route | Flow step |
700
717
  |---|---|---|
701
718
  | `vidfarm discover [query]` | `GET /discover/feed[?q=]` | browse/search templates |
@@ -704,7 +721,7 @@ If you need many variants, keep the base fork fixed and fan out by cloning that
704
721
  | `vidfarm inspiration-rm <id>` | `DELETE /discover/templates/:id` | remove a private one |
705
722
  | `vidfarm inspiration-decompose <id>` | `POST /api/v1/inspirations/:id/decompose` | AI-decompose an inspiration |
706
723
  | `vidfarm fork <template_id>` | `POST /api/v1/compositions` | fork a template |
707
- | `vidfarm pull <forkId> [--dir <p>]` | `GET .../compositions/:forkId/{composition.html,json,video-context.json,cast.json,scene-annotations.json,editor-harness.json}` | sync a fork to disk + print gaps/scene keys + grounding (incl. editor-harness style brief) |
724
+ | `vidfarm pull <forkId> [--dir <p>]` | `GET .../compositions/:forkId/{composition.html,json,video-context.json,cast.json,scene-annotations.json,editor-harness.json}` | sync a fork to disk + generate `.harness/context.json` and `.harness/agent-guide.md` + print gaps/scene keys + grounding |
708
725
  | `vidfarm generate <image\|video> --prompt "…"` | `POST /api/v1/primitives/{images,videos}/generate` (polls job) | generate AI media → finished URL |
709
726
  | `vidfarm inpaint <image> --mask <png> --prompt "…" [--region "label=…"] [--ref …] [--out <f>]` | `POST /api/v1/primitives/images/inpaint` (polls job) | masked image EDIT — replace ONLY the transparent-mask region, keep everything else (devcli twin of the /inpaint page) |
710
727
  | `vidfarm create-overlay "<subject>" [--key-color #00FF00] [--aspect-ratio 1:1] [--place <dir>] [--out <f>]` | `POST /api/v1/primitives/images/create-overlay` (polls job) | **Vox-style** transparent OVERLAY — AI image on a forced key-color background, chroma-keyed out in one job → ready-to-composite transparent PNG |