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.
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.
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.
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.).
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:
- Wait for each step. Step N+1 cannot compose until step N's artifact path is known.
- Pass paths, not file contents. Each downstream specialist reads from disk.
- Idempotent re-runs. Mode outputs go to deterministic paths (
${MEDIA_WORK_DIR}/modes/<mode>/{date}_{slug}/); re-running overwrites cleanly.
- Stop on failure. If a chained step fails, do not invent the missing artifact — surface the failure and pause for operator decision (retry / skip / abandon).
When NOT to trigger
Decline routing and stay in the main thread for:
- System maintenance — operator is editing
${CLAUDE_PLUGIN_ROOT}/skills/*, ${CLAUDE_PLUGIN_ROOT}/agents/*, ${CLAUDE_PLUGIN_ROOT}/modes/*, ${CLAUDE_PLUGIN_ROOT}/hooks/*, .claude-plugin/plugin.json, .claude-plugin/marketplace.json, hooks.json, monitors.json, or the README/CLAUDE.md docs. That's engineering work on the routing layer, not through it.
- One-off lookups — "what's the codec of this file?" → call
moprobe directly. "what does -sc_threshold do?" → answer from your knowledge of FFmpeg flags. Don't burn a full subagent dispatch on one probe call.
- Conversational, recall, clarifying — "what mode did we just run?" → recall in main thread. "where did the output land?" → re-show the path.
- Skill discovery questions — "what skills does media-os ship?" → answer from the README or
${CLAUDE_PLUGIN_ROOT}/skills/ directory listing. Skill discovery is not a media production task.
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:
- Probe-first on every input. Step 1 of every mode touching an input is
moprobe <input>. If probe fails, STOP.
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.).
- Re-probe every output. The
PostToolUse hook does it automatically; check its output before claiming success.
- 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.
- Idempotent output paths.
${MEDIA_WORK_DIR}/modes/<mode>/{date}_{slug}/ — deterministic, overwrite-safe, never invent paths.
- 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.
1---2name: media-pipeline-router3description: 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", "DASH package", "encode for streaming", "CDN upload", "make a HLS manifest", "multi-bitrate ladder", "CMAF package", "LL-HLS", "low-latency stream", "Widevine package", "DRM package", "package for streaming", "broadcast deliver", "MXF master", "IMF package", "ProRes master", "DPP deliver", "AS-11 deliver", "Netflix deliver", "broadcast spec deliver", "deliver for air", "create IMF", "Premiere to Resolve", "round-trip", "OTIO export", "editorial conform", "XML round-trip", "FCPXML", "EDL export", "AAF export", "convert timeline", "Avid to Premiere", "Resolve to Premiere", "upscale this", "interpolate frames", "denoise AI", "remove background", "rotoscope", "matte", "depth estimate", "AI upscale", "RIFE", "Real-ESRGAN"4---56# Media OS pipeline router78You 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.910## Routing table1112Trigger phrases below match the mode-file headers exactly. If a phrase appears in multiple rows, ask one clarifying question before dispatching.1314| Mode | Specialist | Trigger phrases (representative — see mode file for full list) |15|---|---|---|16| `live-production` | `live` | "go live", "start streaming", "OBS broadcast", "wire up live rig", "PTZ camera setup", "DeckLink capture stream" |17| `streaming-distribution` | `delivery` | "HLS deliver", "DASH package", "encode for streaming", "CDN upload", "multi-bitrate ladder", "CMAF package", "LL-HLS", "Widevine package", "DRM package" |18| `broadcast-delivery` | `delivery` | "broadcast deliver", "MXF master", "IMF package", "ProRes master", "DPP deliver", "AS-11 deliver", "Netflix deliver" |19| `editorial-interchange` | `architect` | "Premiere to Resolve", "round-trip", "OTIO export", "editorial conform", "FCPXML", "EDL export", "AAF export" |20| `ai-enhancement` | `architect` | "upscale this", "interpolate frames", "denoise AI", "remove background", "matte", "depth estimate" |21| `ai-generation` | `architect` | "generate video", "text to video", "TTS", "AI music", "image gen", "FLUX", "LTX-Video", "Kokoro TTS" |22| `podcast-pipeline` | `architect` | "podcast edit", "TTS podcast", "loudness normalize", "podcast master", "podcast captions", "transcribe podcast" |23| `vfx-pipeline` | `architect` | "VFX conform", "EXR to master", "ACES pipeline", "USD scene", "OCIO conform", "color management", "dailies turnaround" |24| `hdr-mastering` | `hdr` | "Dolby Vision", "HDR10+", "HDR master", "tone map HDR", "PQ to HLG", "DV profile", "MaxCLL", "MaxFALL" |25| `vod-post-production` | `encoder` | "encode VOD", "transcode for VOD", "VMAF gate encode", "x264 master", "x265 master", "two-pass encode" |26| `analysis-quality` | `qc` | "QC this", "VMAF check", "quality gate", "freeze detect", "loudness check", "automated QC", "broadcast QC" |27| `audio-production` | `architect` | "mix audio", "audio routing", "PipeWire route", "JACK route", "Core Audio route", "stems mix", "MIDI route", "OSC route" |28| `acquisition-archive` | `probe` | "ingest these", "probe this folder", "archive", "verify hash", "tether DSLR", "ingest from card" |2930If 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.3132## Dispatch contract3334Every 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.35361. **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.37382. **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.39403. **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.).41424. **Spawn** the Agent tool:4344 ```45 Agent(46 subagent_type="<specialist-id>", # from the mode header — one of: architect, probe, qc, hdr, encoder, live, delivery47 prompt="<composed string from step 3>",48 description="<mode-name>" # e.g. "streaming-distribution"49 )50 ```5152Read 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.5354### Collecting required inputs5556Before 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.5758### Approval gates5960`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.6162Modes that mutate cloud storage (CDN upload in `streaming-distribution`) should also surface the destination URL + credentials source before invoking.6364## Chained dispatch6566Some intents span multiple modes. Run sequentially, passing artifact paths forward. Wait for each dispatch to complete before composing the next.6768| User says | Chain |69|---|---|70| "encode + deliver this master for HLS" | `vod-post-production` → `streaming-distribution` (delivery reads encoded-master path) |71| "upscale + interpolate + deliver" | `ai-enhancement` → `vod-post-production` → `streaming-distribution` |72| "HDR master + broadcast deliver" | `hdr-mastering` → `broadcast-delivery` (broadcast-delivery reads HDR-master path; preserves HDR metadata through MXF/IMF wrap) |73| "ingest from card + probe + archive" | `acquisition-archive` (single mode handles the whole chain internally) |74| "podcast: TTS + mix + captions" | `podcast-pipeline` (single mode; the workflow lives inside) |75| "live + record + cut highlights" | `live-production` → `editorial-interchange` (after stream ends, generate EDL/OTIO from cuts) |76| "QC + deliver" | `analysis-quality` → if pass → `broadcast-delivery`; if fail → return matrix and stop |77| "VFX → HDR master" | `vfx-pipeline` → `hdr-mastering` (vfx writes EXR/ProRes mezzanine, hdr authors DV/HDR10+ on it) |7879Sequencing rules:80- **Wait for each step.** Step N+1 cannot compose until step N's artifact path is known.81- **Pass paths, not file contents.** Each downstream specialist reads from disk.82- **Idempotent re-runs.** Mode outputs go to deterministic paths (`${MEDIA_WORK_DIR}/modes/<mode>/{date}_{slug}/`); re-running overwrites cleanly.83- **Stop on failure.** If a chained step fails, do not invent the missing artifact — surface the failure and pause for operator decision (retry / skip / abandon).8485## When NOT to trigger8687Decline routing and stay in the main thread for:8889- **System maintenance** — operator is editing `${CLAUDE_PLUGIN_ROOT}/skills/*`, `${CLAUDE_PLUGIN_ROOT}/agents/*`, `${CLAUDE_PLUGIN_ROOT}/modes/*`, `${CLAUDE_PLUGIN_ROOT}/hooks/*`, `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json`, `hooks.json`, `monitors.json`, or the README/CLAUDE.md docs. That's engineering work on the routing layer, not through it.90- **One-off lookups** — "what's the codec of this file?" → call `moprobe` directly. "what does `-sc_threshold` do?" → answer from your knowledge of FFmpeg flags. Don't burn a full subagent dispatch on one probe call.91- **Conversational, recall, clarifying** — "what mode did we just run?" → recall in main thread. "where did the output land?" → re-show the path.92- **Skill discovery questions** — "what skills does media-os ship?" → answer from the README or `${CLAUDE_PLUGIN_ROOT}/skills/` directory listing. Skill discovery is not a media production task.9394## Hard rules carried into every dispatch9596These live in `_shared.md` and are restated here so the orchestrator knows they're load-bearing. Never skip reading `_shared.md`:97981. **Probe-first on every input.** Step 1 of every mode touching an input is `moprobe <input>`. If probe fails, STOP.992. **`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.).1003. **Re-probe every output.** The `PostToolUse` hook does it automatically; check its output before claiming success.1014. **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.1025. **Idempotent output paths.** `${MEDIA_WORK_DIR}/modes/<mode>/{date}_{slug}/` — deterministic, overwrite-safe, never invent paths.1036. **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.104105## Why this skill exists106107Media 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.108109The 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.