Skip to content
/

OpenSpec-Video

openspec-video · mr7thing/openspec-video · ★ 2 · last commit 2026-05-23

Spec-driven AI media production: compile narrative Markdown specs into production-ready images/videos via multi-provider pipeline with dependency graph management.

Best whenPhysical state machine (task state = file existence) + append-only output queue eliminates the need for a database in a production pipeline.
Skip ifHardcoding model/provider logic in CLI code, Deleting previous compilations (all outputs preserved for A/B)
vs seeds
openspec(spec artifacts as source of truth). OpsV departs significantly: circle-based topological dependency layering, physical …
Primitive shape
No installable primitives
00

Summary

OpenSpec-Video (OpsV) — Summary

OpenSpec-Video (CLI: opsv, npm: videospec) is a spec-driven cinematic AI automation framework that compiles narrative Markdown specifications into production-ready media via a multi-provider pipeline. Users write AI media production specs (characters, scenes, shots) as Markdown files with YAML frontmatter; OpsV builds dependency graphs via topological sort, compiles provider-specific task JSON files, executes them against AI image/video/audio APIs (Volcengine, SiliconFlow, MiniMax, ComfyUI, browser automation), and manages the review loop. A physical state machine tracks asset status (drafting → syncing → approved); all outputs are append-only. A visual review server runs at port 3100. With 2 stars and active development (v0.10.1, last commit May 2026), this is the most complex and distinctive framework in the batch.

Compared to seeds: no seed covers AI media production. The closest structural parallels are taskmaster-ai (dependency graph + task execution) and openspec (spec artifacts → implementation). But OpsV adds a circle-based dependency layering system, multi-provider model routing, physical state machine, and a local web review UI — architectural elements found in none of the seeds.

01

Overview

OpenSpec-Video (OpsV) — Overview

Origin

Created by GitHub user mr7thing. Published and actively maintained May 2026, v0.10.1. npm package: videospec. The description says "a suit of spec system for AI video production based antigravity" — referencing the antigravity framework.

Philosophy

From README:

"OpsV is a spec-driven cinematic AI automation framework. You write narrative specifications in Markdown with YAML frontmatter; OpsV builds dependency graphs, compiles provider-specific tasks, executes them, and manages the review loop."

Eight key design principles:

  1. Spec-as-Code: Markdown is the single source of truth
  2. Intent-Execution Decoupling: Produce commands compile; opsv run executes
  3. Physical State Machine: Task state = file existence
  4. CLI Does Only Deterministic Actions: CLI never modifies content fields
  5. By-Provider Parallelism: Same provider serial, different providers parallel
  6. Incremental Preservation: Queue outputs are never deleted
  7. Manifest-First: Produce commands read from manifest only
  8. Circle-Bound Execution: Produce commands run within a specific circle

Domain Vocabulary

Term Definition
Circle Dependency layer (from topological sort)
Asset A character, scene, or shot spec file
Manifest _manifest.json — circle layer index
Model Queue Dir {provider}_{seq}/ — versioned compilation output
Status Flow drafting → syncing → approved
Refs Input bindings using @ syntax

Supported Providers

Volcengine (SeedDream5 image, SeedDance2 video), SiliconFlow (image+video), MiniMax (image+video), RunningHub (ComfyUI), ComfyUI Local, Browser (Gemini webapp automation).

02

Architecture

OpenSpec-Video (OpsV) — Architecture

Distribution

  • Type: npm-package (videospec)
  • Binary: opsv
  • Version: 0.10.1
  • Install: npm install -g videospec

Runtime Requirements

  • Node.js >= 16
  • Git (for opsv init)
  • API keys for providers (configured in .opsv/api_config.yaml)
  • Ollama (optional, for webapp Gemini browser automation)

Directory Structure

videospec/
├── elements/          # Characters, props, locations (upstream assets)
├── scenes/            # Scene compositions (reference elements)
└── shots/             # Shot specifications (reference scenes/elements)

opsv-queue/            # ALL OUTPUTS — append-only, never deleted
└── {target}_circle1/
    ├── _manifest.json  # Circle manifest
    └── {provider}_{seq}/  # Model queue directory
        ├── @assetId.json   # Compiled task JSON
        └── @assetId_1.png  # Generated output

.opsv/                 # Configuration
├── api_config.yaml    # Model aliases + API credentials
├── input_types.yaml   # Allowed input types registry
└── category_validate.yaml  # Per-category validation rules

Source Structure

src/
├── cli.ts
├── commands/
│   ├── init.ts
│   ├── validate.ts
│   ├── circle/create.ts, refresh.ts
│   ├── imagen.ts, animate.ts, comfy.ts, webapp.ts
│   ├── run.ts
│   ├── review.ts
│   └── iterate.ts
├── review-ui/
│   └── ReviewServer.ts    # Express web server
└── tunnel/
    ├── CloudClient.ts
    └── TunnelClient.ts    # Optional cloud review tunnel

Spec Asset Format

---
status: drafting
category: character
refs:
  image:
    "@style:armor": [opsv-queue/circle1/volc_001/@armor.png]
---
# Hero Character

## Prompt

@style:armor A medieval warrior with silver armor.
03

Components

OpenSpec-Video (OpsV) — Components

CLI Binary: opsv (11 commands)

Command Purpose
opsv init [name] Project scaffold + git init
opsv validate [-d] Document + ref validation
opsv circle create [--dir] [--name] Build dependency graph, create circle directories
opsv circle refresh [--dir] Rebuild graph, diff manifest, update
opsv imagen --model <m> Compile image tasks (Volc/Minimax/SiliconFlow)
opsv animate --model <m> Compile video tasks
opsv comfy --model <m> Compile ComfyUI workflow tasks
opsv audio --model <m> Compile audio tasks [planned]
opsv webapp --model <m> Browser automation via Gemini
opsv run <paths...> Execute compiled task JSON files
opsv review Start visual review server (port 3100)
opsv iterate <path> Clone task JSON or model queue dir
opsv refs check <file> Report prompt ↔ refs misalignment
opsv refs sync <file> --write Auto-fill refs
opsv comfy-node-mapping <wf> Analyze ComfyUI JSON → node mappings

Review Server

  • Local web dashboard at port 3100
  • Visual review of generated images/videos
  • Status management (drafting → syncing → approved)
  • Optional cloud tunnel (--cloud flag) for remote review

Asset Categories

Category Description
character Character specifications
prop Props and objects
location Location specifications
scene Scene compositions (reference elements)
shot Shot production specs (reference scenes)

Model Providers (aliases)

Alias Type
volc.seadream5 imagen
volc.seedance2 animate
siliconflow.qimg imagen
minimax.img01 imagen
minimax.vid01 animate
runninghub.default comfy
comfylocal.workflow comfy
webapp.gemini webapp
05

Prompts

OpenSpec-Video (OpsV) — Prompts

Excerpt 1: Asset spec format with @ reference syntax

From README:

---
status: drafting
category: character
refs:
  image:
    "@hero":
      - opsv-queue/videospec_circle1/volc.seadream5_001/@hero_1.png
    "@:angle_side":
      - ./refs/hero_side.png
    "@style:night":
      - opsv-queue/.../style_night.png
  video:
    "@swim_loop":
      - opsv-queue/.../swim.mp4
---

## Prompt

@style:night A dark warrior in moonlight. @hero stands at the gate.

Technique: Bidirectional binding — @ tokens in the prompt text must exactly match refs keys. This is machine-validated before compilation: opsv refs check <file> reports misalignments.


Excerpt 2: api_config.yaml input compilation schema

From README:

volc.seedance2:
  prompt_compile_mode: keep      # keep | index | name
  inputs:
    prompt:
      source: prompt
      target: content[0].text
    image:
      source: refs[image]        # v0.10.0 grouped refs
      target: content[].image_url
    audio:
      source: refs[audio]
      target: content[].audio_url

Technique: Declarative input mapping — the CLI reads this config to compile spec fields into provider-specific API payloads. No hardcoded provider logic in the CLI code.


Excerpt 3: Category validation config

# .opsv/category_validate.yaml
shot:
  required_fields: [status, prompt, refs]
  field_schema:
    prompt:
      min_length: 20
      no_placeholder: true
      refs_in_prompt_must_match_refs: true

Technique: Per-category validation schema. Shot specs (the most complex) require prompt-refs bidirectional alignment. Running opsv validate --category shot --strict treats warnings as errors.

09

Uniqueness

OpenSpec-Video (OpsV) — Uniqueness

differs_from_seeds

No seed covers AI media production. The closest structural parallels: taskmaster-ai (dependency graph, task execution pipeline) and openspec (spec artifacts as source of truth). But OpsV departs from both in architecturally significant ways: (1) Circle-based dependency layering via topological sort — assets cannot be compiled until all dependencies are approved, creating a DAG execution model no seed implements; (2) Physical state machine where task state = file existence (not a database or YAML flag file); (3) Multi-provider model routing with zero hardcoded logic — all provider/model configuration lives in api_config.yaml, making OpsV the only framework with explicit per-asset model routing (different models for image vs. video vs. ComfyUI vs. browser automation); (4) Append-only output queue where every compilation is versioned with _001, _002 suffixes — no output ever deleted; (5) Local web review server (port 3100) with optional cloud tunnel — the only framework in the batch with a built-in visual review UI.

Positioning

The most architecturally distinctive framework in the batch. OpsV takes spec-driven development principles from software and applies them to AI media production with domain-specific adaptations (visual review, provider routing, dependency circles for assets that depend on approved upstream images). The "antigravity" reference in the description suggests it emerged from a broader AI media production ecosystem.

Observable Failure Modes

  1. No AI agent integration: despite being in the OpenSpec ecosystem cluster, OpsV has no Claude Code commands, no slash commands, no AI agent skills — it is a pure CLI tool that the human operates. AI is the consumer (generating images), not the operator.
  2. Append-only storage grows unboundedly: opsv-queue/ never deletes outputs. A production project with hundreds of iterations will accumulate gigabytes of files. The README says "Delete manually only when you are certain."
  3. api_config.yaml required: all model aliases must be configured before any compilation. Zero hardcoded defaults means a fresh install can't compile anything without manual config.
  4. Cloud review coupling: the tunnel/cloud features require OPSV_CLOUD_URL and OPSV_CLOUD_API_KEY environment variables — suggesting a paid cloud service that may not be available to all users.
  5. Bidirectional ref validation strictness: opsv validate --category shot --strict fails on prompt-refs misalignment, which may block workflows when specs are iteratively drafted.
04

Workflow

OpenSpec-Video (OpsV) — Workflow

Production Phases

Phase Commands Artifacts
1. Initialize opsv init my-project videospec/ structure + .opsv/ config
2. Write specs (manual) videospec/elements/*.md, scenes/*.md, shots/*.md
3. Build graph opsv circle create opsv-queue/{target}_circle1/_manifest.json
4. Compile tasks opsv imagen --model volc.seadream5 opsv-queue/circle1/volc.seadream5_001/@*.json
5. Execute opsv run opsv-queue/circle1/volc.seadream5_001/ @asset_1.png
6. Review opsv review Review server at :3100
7. Approve (browser interaction) Status → approved
8. Next circle opsv circle refresh circle2/_manifest.json
9. Compile next opsv animate --model volc.seedance2 Video task JSONs
10. Execute opsv run ... *.mp4 outputs

Status Flow

drafting → syncing → approved
  • drafting: new asset, no review action
  • syncing: reviewed/accepted but fields not yet aligned
  • approved: locked, unblocks downstream circles

Dependency Resolution

Circles are created by topological sort:

  • zerocircle (index 0): assets with no dependencies
  • circle1 (index 1): assets that depend on zerocircle assets
  • circle2 (index 2): assets that depend on circle1 assets

An asset cannot be compiled into a higher circle until its dependencies are approved.

Approval Gates

Gate Type
Review server approval (approved status) human-required
opsv validate before compilation auto-validator
Ref alignment check before compile auto-validator

Git Integration

Command Automatic Git Action
opsv init git init
opsv review git add -A && git commit -m "pre-review checkpoint: <timestamp>"
06

Memory Context

OpenSpec-Video (OpsV) — Memory & Context

State Storage

File-based with a physical state machine:

videospec/               # Spec files (source of truth)
├── elements/
│   ├── characters/hero.md    # Status: approved in frontmatter
│   └── props/sword.md
├── scenes/scene-01.md
└── shots/shot-01.md

opsv-queue/              # APPEND-ONLY production outputs
├── videospec_circle1/
│   ├── _manifest.json   # Circle manifest (layer index)
│   └── volc.seadream5_001/
│       ├── @hero.json   # Compiled task JSON
│       └── @hero_1.png  # Generated image

.opsv/                   # Configuration
├── api_config.yaml
├── input_types.yaml
└── category_validate.yaml

Physical State Machine

State is encoded in file existence and frontmatter status fields:

  • Task JSON exists → task was compiled
  • Output image exists → task was executed
  • frontmatter status: approved → asset cleared for downstream circles

Manifest

_manifest.json records the full dependency graph at time of circle create:

{
  "circles": [{"circle": "zerocircle", "index": 0, "assetIds": ["hero"]}],
  "assets": {"hero": {"status": "approved", "index": 0, "category": "character"}}
}

Incremental Preservation

Core invariant: opsv-queue/ is append-only. Every compilation creates a new numbered model queue directory (_001, _002). No previous output is ever deleted. Every asset version is permanently reachable.

Cross-Session Continuity

Sessions resume naturally — the manifest records which circle is current, which assets are approved. Running opsv circle refresh updates the manifest without losing prior outputs.

07

Orchestration

OpenSpec-Video (OpsV) — Orchestration

Multi-Agent

Not in the traditional AI-agent sense. However:

  • By-provider parallelism: different provider compilations run in parallel
  • Same-provider compilations run serially (to avoid API rate limits)

Orchestration Pattern

Task-decomposition-tree. The circle system is a topological DAG:

  • zerocircle (no dependencies) → circle1circle2 → ...
  • Assets in higher circles cannot be compiled until lower circle assets are approved

Provider Routing (Multi-Model Equivalent)

OpsV is the only framework in the batch with explicit multi-model routing:

Model Alias Provider Type
volc.seadream5 Volcengine Image generation
volc.seedance2 Volcengine Video generation
siliconflow.qimg SiliconFlow Image generation
minimax.vid01 MiniMax Video generation
comfylocal.workflow ComfyUI Local Workflow execution
webapp.gemini Browser (Gemini) Browser automation

Different asset types route to different providers. Configuration is entirely in api_config.yaml — zero hardcoded model logic in CLI.

Isolation Mechanism

Per-compilation model queue directories ({provider}_{seq}/). Each opsv imagen --model X creates a new numbered directory. Previous compilations are preserved.

Execution Mode

One-shot per command. The full pipeline is human-driven: compile → run → review → approve → advance circle.

Git Automation

opsv review automatically commits pending changes before starting the review server:

git add -A && git commit -m "pre-review checkpoint: <ISO timestamp>"

opsv init runs git init after scaffolding.

Crash Recovery

Complete — all outputs are files. Any interrupted opsv run can be restarted; already-generated outputs are preserved. opsv circle refresh updates the manifest without losing any data.

08

Ui Cli Surface

OpenSpec-Video (OpsV) — UI & CLI Surface

Dedicated CLI Binary

Yes.

  • Binary: opsv
  • Package: videospec on npm
  • Version: 0.10.1

Subcommands

Command Description
opsv init [name] Project scaffold + git init
opsv validate [-d] Document validation
opsv circle create [--dir] [--name] Build dependency graph
opsv circle refresh [--dir] Rebuild graph + diff manifest
opsv imagen --model <m> Compile image tasks
opsv animate --model <m> Compile video tasks
opsv comfy --model <m> Compile ComfyUI workflow tasks
opsv webapp --model <m> Browser automation tasks
opsv run <paths...> Execute compiled task JSONs
opsv review Start visual review server
opsv iterate <path> Clone task JSON for variations
opsv refs check <file> Validate prompt ↔ refs alignment
opsv refs sync <file> --write Auto-fill refs
opsv comfy-node-mapping <wf> Analyze ComfyUI workflow JSON

Local Web Dashboard: Review Server

  • Port: 3100
  • Tech stack: Express.js + static HTML/JS frontend
  • Features:
    • Visual review of generated images and videos
    • Status management (drafting → syncing → approved)
    • Circle-based or global (frontmatter-driven) modes
    • Optional cloud tunnel (--cloud, --cloud-url, --cloud-api-key) for remote review
    • Auto TTL shutdown (--ttl <seconds>, default 900s)
    • Pre-review auto-commit via git

Review Modes

Mode Trigger Source
Circle mode --circle flag _manifest.json driven
Global mode default Individual frontmatter status fields

Related frameworks

same archetype · same primary tool · same memory type

Claude-Flow / Ruflo ★ 55k

Eliminates single-agent context limits and sequential bottlenecks by orchestrating fault-tolerant swarms of specialized AI agents…

Hermes Agent (NousResearch) ★ 168k

Self-improving personal AI agent with closed learning loop, 7 terminal backends, and messaging gateway — not tied to any AI…

OpenCode ★ 165k

Terminal-first AI coding agent with multi-model routing, native desktop app, and a typed .opencode/ configuration system for…

OpenHands ★ 75k

Open-source AI software development platform (open-source Devin alternative) with Docker sandbox isolation, 77.6% SWE-bench…

DeerFlow ★ 70k

Long-horizon superagent that researches, codes, and creates by orchestrating parallel sub-agents with isolated contexts in Docker…

oh-my-openagent (omo) ★ 60k

Multi-provider AI agent orchestration for OpenCode: escape vendor lock-in by routing Sisyphus (Claude/Kimi/GLM) and Hephaestus…