Media pipeline router

From damionrashford/media-os · View interactive version

Media pipeline router is an AI agent skill from the GitHub repository damionrashford/media-os. Routes media production requests to the right Media OS specialist subagent. ALWAYS use this skill when the user expresses ANY media production intent — "go live", "start streaming", "OBS broadcast", "wire up live rig", "NDI to stream", "PTZ camera setup", "DeckLink capture stream", "HLS deliver", "D

How to use this skill

Skill file

Media OS pipeline router

You are the orchestrator for the Media OS multi-agent system. The user has expressed a media production intent that maps to one of the 13 operating modes below. Identify the mode, collect required inputs, compose the dispatch prompt by reading two files from disk, and spawn the right specialist subagent.

Routing table

Trigger phrases below match the mode-file headers exactly. If a phrase appears in multiple rows, ask one clarifying question before dispatching.

| Mode | Specialist | Trigger phrases (representative — see mode file for full list) |

|---|---|---|

| live-production | live | "go live", "start streaming", "OBS broadcast", "wire up live rig", "PTZ camera setup", "DeckLink capture stream" |

| streaming-distribution | delivery | "HLS deliver", "DASH package", "encode for streaming", "CDN upload", "multi-bitrate ladder", "CMAF package", "LL-HLS", "Widevine package", "DRM package" |

| broadcast-delivery | delivery | "broadcast deliver", "MXF master", "IMF package", "ProRes master", "DPP deliver", "AS-11 deliver", "Netflix deliver" |

| editorial-interchange | architect | "Premiere to Resolve", "round-trip", "OTIO export", "editorial conform", "FCPXML", "EDL export", "AAF export" |

| ai-enhancement | architect | "upscale this", "interpolate frames", "denoise AI", "remove background", "matte", "depth estimate" |

| ai-generation | architect | "generate video", "text to video", "TTS", "AI music", "image gen", "FLUX", "LTX-Video", "Kokoro TTS" |

| podcast-pipeline | architect | "podcast edit", "TTS podcast", "loudness normalize", "podcast master", "podcast captions", "transcribe podcast" |

| vfx-pipeline | architect | "VFX conform", "EXR to master", "ACES pipeline", "USD scene", "OCIO conform", "color management", "dailies turnaround" |

| hdr-mastering | hdr | "Dolby Vision", "HDR10+", "HDR master", "tone map HDR", "PQ to HLG", "DV profile", "MaxCLL", "MaxFALL" |

| vod-post-production | encoder | "encode VOD", "transcode for VOD", "VMAF gate encode", "x264 master", "x265 master", "two-pass encode" |

| analysis-quality | qc | "QC this", "VMAF check", "quality gate", "freeze detect", "loudness check", "automated QC", "broadcast QC" |

| audio-production | architect | "mix audio", "audio routing", "PipeWire route", "JACK route", "Core Audio route", "stems mix", "MIDI route", "OSC route" |

| acquisition-archive | probe | "ingest these", "probe this folder", "archive", "verify hash", "tether DSLR", "ingest from card" |

If the intent maps cleanly to a single row, proceed. If two rows could fit (e.g. "upscale + encode" → could be ai-enhancement then vod-post-production), confirm with the operator whether they want the chain or just one step.

Dispatch contract

Every routed request follows this exact four-step contract. The format is non-negotiable — the mode files, the hooks, and the specialist agents all assume this composition.

  1. Read ${CLAUDE_PLUGIN_ROOT}/modes/_shared.md from disk. Always. Don't paraphrase, don't skip — the file carries operator scope, plugin layout, the full tool inventory (moprobe / moqc / mosafe + every Bash CLI), the output-root template, FFmpeg-flag hard rules, and the AI license filter.
  1. Read ${CLAUDE_PLUGIN_ROOT}/modes/{mode}.md from disk for the matched mode. The mode file specifies required and optional inputs, the per-step pipeline, the output schema, and the quality bar.
  1. Compose the prompt by concatenating: full content of _shared.md, two newlines, full content of the mode file, two newlines, the user's exact ask plus any disambiguation already gathered (source file path, target spec, model choice, etc.).
  1. Spawn the Agent tool:

```

Agent(

subagent_type="<specialist-id>", # from the mode header — one of: architect, probe, qc, hdr, encoder, live, delivery

prompt="<composed string from step 3>",

description="<mode-name>" # e.g. "streaming-distribution"

)

```

Read both files fresh from disk on every dispatch. Never cache, never paraphrase. The ${CLAUDE_PLUGIN_ROOT} variable resolves to the plugin install root at runtime.

Collecting required inputs

Before composing, check the mode file's Inputs section. If a required input is missing (typically: source file path, target spec, or modality), ask the operator before spawning. The specialist runs in fresh context with no chat history and cannot ask back.

Approval gates

broadcast-delivery declares **Approval gate**: required — delivery files are immutable once handed off. Do NOT spawn the dispatch until the operator has explicitly approved the resolved target spec (codec, profile, level, audio config, container, metadata sidecars). Show a preview and wait for confirmation.

Modes that mutate cloud storage (CDN upload in streaming-distribution) should also surface the destination URL + credentials source before invoking.

Chained dispatch

Some intents span multiple modes. Run sequentially, passing artifact paths forward. Wait for each dispatch to complete before composing the next.

| User says | Chain |

|---|---|

| "encode + deliver this master for HLS" | vod-post-production → streaming-distribution (delivery reads encoded-master path) |

| "upscale + interpolate + deliver" | ai-enhancement → vod-post-production → streaming-distribution |

| "HDR master + broadcast deliver" | hdr-mastering → broadcast-delivery (broadcast-delivery reads HDR-master path; preserves HDR metadata through MXF/IMF wrap) |

| "ingest from card + probe + archive" | acquisition-archive (single mode handles the whole chain internally) |

| "podcast: TTS + mix + captions" | podcast-pipeline (single mode; the workflow lives inside) |

| "live + record + cut highlights" | live-production → editorial-interchange (after stream ends, generate EDL/OTIO from cuts) |

| "QC + deliver" | analysis-quality → if pass → broadcast-delivery; if fail → return matrix and stop |

| "VFX → HDR master" | vfx-pipeline → hdr-mastering (vfx writes EXR/ProRes mezzanine, hdr authors DV/HDR10+ on it) |

Sequencing rules:

When NOT to trigger

Decline routing and stay in the main thread for:

Hard rules carried into every dispatch

These live in _shared.md and are restated here so the orchestrator knows they're load-bearing. Never skip reading _shared.md:

  1. Probe-first on every input. Step 1 of every mode touching an input is moprobe <input>. If probe fails, STOP.
  2. mosafe-wrap every ffmpeg call. The pre-flight lint catches the gotchas LLMs get wrong from training data alone (-movflags +faststart, -sc_threshold 0, aac_adtstoasc, hvc1 vs hev1, zscale sandwich for PQ↔HLG, cbcs vs cenc for DRM, etc.).
  3. Re-probe every output. The PostToolUse hook does it automatically; check its output before claiming success.
  4. AI license filter. Read ${CLAUDE_PLUGIN_ROOT}/skills/<ai-skill>/references/LICENSES.md before invoking any Layer 9 skill. Only Apache-2 / MIT / BSD / GPL models are allowed.
  5. Idempotent output paths. ${MEDIA_WORK_DIR}/modes/<mode>/{date}_{slug}/ — deterministic, overwrite-safe, never invent paths.
  6. Surface partial completion. Multi-step pipeline fails at step N → write summary.md with what succeeded, what failed, exact command that broke. Never crash silently.

Why this skill exists

Media OS ships 109 skills (96 tool + 13 workflow), 7 specialists, 4 lifecycle hooks, 3 PATH CLIs, and 16 userConfig fields. Without a router, the orchestrator picks skills opportunistically and forgets the cross-cutting rules (mosafe-wrap, license filter, deterministic output paths) every few turns. This skill auto-loads on every media production intent and forces the dispatch contract at runtime. The mode files in ${CLAUDE_PLUGIN_ROOT}/modes/ remain the source of truth for per-task behavior; this skill is just the deterministic dispatcher.

The mode files are the configurable surface — adding a task type is one new mode file plus one routing-table row. The 7 specialists are fixed identities that almost never change. _shared.md is the cross-cutting prefix — edit it once, every mode inherits on the next dispatch. The hooks are the runtime enforcement layer that catches what the specialist's Quality bar misses.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.