hermes-video-production

/home/avalon/.hermes/skills/media/hermes-video-production/SKILL.md · raw

Hermes Video Production

Product boundaries

Keep the taxonomy simple:

Caduceus must never depend on the standalone Hermes Video HTTP service at runtime. Promote behavior through the versioned capability contract and parity fixtures.

Default operating loop

  1. Inspect current state - Project and active blueprint - Canon entries and scene assignments - Signed run contract and hard cap - Durable job/lease state - Generation attempts and selected outputs - Composition spec, export provenance, and review state
  2. Resolve production intent - Ad, documentary, quote/talking portrait, music, ambient, explainer, or narrative - Subject/reference lock and whether new humans are allowed - Master-audio and dialogue policy - Target aspect, duration, platform, hook, proof, CTA, and Creative variant identity
  3. Build or update canon - Characters, locations, products, props, style, logo - Prefer a few continuity-critical references over generating every noun - Record source/provenance, prompt anchors, negative anchors, lock state, and version
  4. Author the production graph and validate real invariants - Separate semantic scenes, visual shots, narration/dialogue segments, audio tracks, and composition timing - Select an explicit timing/audio mode; continuous narration may cross shot boundaries - Translate the goal into hard media requirements, query Hermes Model Intelligence, and read the exact endpoint schema - Freeze the selected deployment, schema/capability evidence, pricing, and parameters in the blueprint/run contract - Treat provider duration enums and unsupported inputs as hard constraints; treat pacing/drift/continuity estimates as warnings for Hermes or the human - Exact artwork is supplied as an asset; do not ask an image model to redraw exact charts, glyphs, logos, or UI
  5. Estimate and sign run contract - Never start a user-initiated paid run without user sign-off - Agent-initiated contracts may use the established agent-signing rule only within configured policy - Hard cap and per-call ledger remain authoritative
  6. Enqueue durable job - Do not equate process-local activity with durable progress - Inspect queued/leased/failed/completed state and recover stale leases safely
  7. Supervise attempts - Every provider call is an append-only attempt with prompt, model, references, output, cost, judgment, and error - Select a winner explicitly; never overwrite provenance - Use bounded retries and switch only for evidence-backed reasons
  8. Finish deterministically - Use ffmpeg basic for simple cuts/mixdown - Use Remotion branded composition for captions, typography, logo, product cards, CTA, safe areas, split-screen, and repeatable templates - Pin every remotion / @remotion/* package to the exact same version; caret ranges can resolve adjacent versions and produce runtime warnings or failures - Prewarm the local Headless Shell during deployment/canary; the first local render may download roughly 87 MB and must not surprise a production job - Read references/deterministic-remotion-composition.md for the versioned spec, safe content-addressed local-asset staging, project-scoped output rule, provenance sidecar, dependency audit, and real ffmpeg→Remotion→ffprobe acceptance canary
  9. Review as an editor - ffprobe final duration/aspect/codecs - Filmstrip/contact sheet before edit decisions - Inspect shot boundaries, identity continuity, text legibility, first/last frame, audio overlaps, and CTA - Store trim/reorder decisions nondestructively when possible
  10. Promote deliberately - Validate the same byte-identical video-capability.v1 schema and fixtures in standalone and Caduceus; compare SHA-256 hashes rather than trusting the version label - Map portable IDs to tenant-local business/project/media/connection/job/review records - Strip source signing, review approval, credentials, active-job state, and spend authority while preserving them only as historical provenance - Reject secret-shaped keys/values and credential-bearing locators recursively before mutation - Verify typed tool → project-scoped gate → canonical command - Run a zero-provider deterministic canary before paid tenant generation - Read references/portable-capability-promotion.md for parity artifacts, semantic validation, transactional import, authority stripping, runtime readiness, and release gates

Agent-native dual-control architecture

Hermes—not an embedded one-off “director LLM”—is the intelligent coordinator. Skills encode judgment, typed tools expose capabilities, and one actor-aware command layer serves the Hermes plugin, Studio UI, and bounded automation. The application owns durable state, authorization, budgets, jobs, adapters, attempts, media, rendering, audit, and review gates.

Use one Hermes Coordinator with focused skills and typed tools. Spawn focused subagents only for bounded reasoning-heavy work such as research, script critique, continuity review, or edit review. Do not create a permanent CrewAI/LangGraph-style fleet merely to name roles.

Every meaningful agent operation must have a human Studio equivalent, and every human edit must use the same canonical command/state path. “YOLO” is an autonomy policy (manual, supervised, or autonomous within an approved contract), not a separate pipeline. Persist command/job/attempt events and project them live into the Studio; never keep progress only in process memory or chat.

Do not equate a semantic scene, visual shot, narration segment, dialogue utterance, or audio track. Continuous narration may span several shots. Character-count pacing estimates are warnings and planning evidence, not hard scene-fit truth; only scene-locked dialogue requires speech to fit one performance scene. For narrated work, actual synthesized/probed audio should become authoritative before expensive clip generation.

State transitions, money, credentials, jobs, review, media registration, and audit belong to deterministic application commands—not prose-agent memory. Hard validators protect real invariants (capabilities, provider schema, authorization, assets, duration enums, budgets, and approvals); creative heuristics such as pacing, drift, and continuity risk normally become warnings for Hermes or the human to resolve.

Read references/agent-native-dual-control-video-architecture.md before redesigning the domain model, timeline, Hermes plugin, Model Intelligence bridge, live Studio projection, autonomy modes, or standalone/Caduceus packaging.

Canon rules

Scene assignments carry role and priority. Reject cross-project canon references. A local one-shot detail should remain prompt-only unless repeated continuity justifies a canon entry.

Read references/durable-canon-attempt-production-map.md before implementing or reviewing canon storage, real-pipeline attempt recording, explicit selections, retry recovery, or a production-map UI. It includes the frame-role selection pitfall, post-provider failure accounting, accepted-low-score resume rule, and immutable-delete/cascade warning.

Read references/video-director.md and references/continuity-validator.md before authoring a high-stakes blueprint.

Exact supplied-frame workflow

Read references/frame-capability-and-blueprint-timing.md before changing model routing, first/last-frame semantics, narration preflight, interactive draft review, or release verification. It covers strict no-downgrade capability handling, exact-asset versus pixel-exact output, timing/anchoring coupling, preserving invalid drafts for repair, and Alex’s lean release preference.

For exact charts, diagrams, astrology wheels, branded screens, typography, or UI:

  1. Build the frame deterministically.
  2. Verify the file exists and is production resolution.
  3. Supply it to the scene's expected frame role.
  4. Mark it as accepted supplied artwork with provenance; do not ledger it as an AI generation.
  5. Use a terse motion bridge for first/last-frame models.
  6. Verify the final encoded video actually preserves the exact frame at the required moment.

Never bypass project media registration or allow arbitrary untrusted paths in tenant Caduceus.

Durable recovery

When a run appears stuck:

  1. Read contract state and durable job state.
  2. Verify whether a live lease exists and whether it is expired.
  3. Inspect stage/entity statuses and append-only attempts.
  4. Reclaim only stale leases; never start a duplicate worker for an active lease.
  5. Resume the idempotent stage from stored state.
  6. If provider output completed but finalization failed, recover from provider operation ID/output before spending again.
  7. If a hard cap paused the run, require explicit budget approval.
  8. Verify final state from DB plus actual media, not logs alone.

For route/worker implementation, keep HTTP handlers enqueue-only, keep app factories free of worker timers, let production boot own an explicit worker lifecycle, and enforce active-job deduplication plus owner-checked leases in SQLite. Use an injected no-spend executor for focused integration tests before running the real pipeline. See references/durable-route-worker-integration.md for the complete store invariants, polling/heartbeat structure, API surfaces, RED tests, and verification sequence.

Performance-ad loop

Every ad production should preserve:

Performance observations store raw counters; derived CTR/CVR/CPA/ROAS are computed server-side. Treat small samples as weak evidence and retain sample size/date range. Feed winners and losers back into Hermes Creative rather than embedding business learning in the video renderer.

Read references/performance-ad-creative.md for the production checklist.

Editorial review

Read references/filmstrip-editor.md. Core rules:

Supporting script: scripts/build_filmstrip.py INPUT.mp4 OUTPUT.jpg.

Spending and review boundaries

Read references/agent-native-proof-and-human-gates.md for the reusable authenticated no-spend proof, live Model Intelligence detail adaptation, selective-invalidation evidence, export-to-Vault lineage, and mandatory pre-approval handoff rejection.

Completion checklist