AI Video Editing Universal Workflow
Overview
Transform a user's plain-language video editing request into a deterministic, honest, and executable generation pipeline. The core principle is feasibility first, then tools: any request to "edit an existing video" must first pass through a feasibility gate. If it cannot be done, the process terminates transparently, never silently degrading the request.
Prerequisites
- Before starting, verify that
miora-creative-coreis loaded; if not, load it immediately before proceeding. - Then verify that
miora-video-generationis loaded; if not, load it immediately before proceeding. - All image/video generation must only use the
mcp__miora__*tools. Never use plain-text generation tools when source material is available (this would break consistency and generate invalid output that the user would be charged for). - When communicating with the user, use design language. Do not expose tool fields, model identifiers, or task IDs.
Core Workflow
Execute in order. As soon as a condition is met, transition to the corresponding branch.
Step 1: Intent Parsing
Decompose the request into 7 slots. Follow exactly what the user explicitly says (do not "optimize" it). For vague parts, fill in along unspecified dimensions. If filling in would change a user-specified attribute, stop and ask.
| Slot | Meaning | Default Rule |
|---|---|---|
ACTION | e.g., change text, enlarge, replace, delete, interpolate frames, change style, pure generation | Cannot classify -> ask a follow-up question |
TARGET | What does the action apply to? | Vague -> ask user to point it out or upload a screenshot |
SOURCE | Source material (video, screenshot, text) | No material and not pure generation -> request it |
PRESERVE | What must not change | Default: try to preserve as much as possible, but inform the user of potential drift |
SCOPE | Single frame, entire video, or a specific time range | Default: entire segment (requires confirmation) |
SPEC | Duration, aspect ratio, generation quality, output resolution | Short videos default to portrait, landscape presentations default to landscape; duration defaults to the shorter of the options. If generation quality is not specified, you must use AskUserQuestion to let the user choose from 480P, 720P, or 1080P (recommend 720P, but require user confirmation). Never silently generate at a default, especially 480P. Follow ../miora-video-generation/references/resolution-selection.md. |
KIND | Text nature (burned into frame / external subtitle track) | If unclear, ask. Prefer subtitle track (more precise). |
Step 2: Feasibility Gate (Critical — Every Request Must Pass)
Fundamental fact: The current tool is generative, lacking native video-to-video precise editing. Any request that says "keep everything else in the original video unchanged, only change this one part" cannot be achieved at the pixel level; the image will be regenerated and visual drift will occur.
Judge in order. Stop as soon as a condition is met:
- Generate a new video / animate a static image -> ✅ Use generation tools.
- Change text on an external subtitle track -> Inform the user: "Just modify the subtitle text and re-mux the track, no AI needed." Do not use generation tools.
- Change text that is burned into the frame -> ⚠️ Approximate. Must obtain informed confirmation, then use Path A.
- Enlarge/replace/delete a visual element in the frame -> ⚠️ Approximate. Must obtain informed confirmation, then use Path B.
- Frame interpolation, with start/end/keyframes provided -> ⚠️ Approximate. Use Path C to generate the transition. Without keyframes, explain that true interpolation is not possible.
- Strict requirement: "Don't touch a single other frame / pixel-perfect / lossless interpolation" -> ❌ Terminate before generation. Explain the limitations and provide alternative paths. Do not force it.
Quick three-category reference: ✅ Natively possible = text-to-video, image-to-video, reference-anchored video generation; ⚠️ Approximate = change text, elements, or interpolate frames (will cause drift, must obtain confirmation first); ❌ Impossible = pixel-level editing, strict preservation of original footage, lossless interpolation, maintaining exact identity across multiple assets.
See references/capability-boundary.md for details.
Step 3: Tool Routing
| Intent | Path |
|---|---|
| Text only | text_to_video |
| Have an image, want to animate it / have start and end frames | frame_to_video |
| Have an image, want to anchor subject or style | reference_to_video |
| Change burned-in text / change element / interpolate frames | Extract key frames -> edit_image to modify frames -> frame_to_video / reference_to_video to regenerate |
| Modify a static image itself | edit_image |
For step-by-step operations of the three main paths, see references/workflow-details.md.
Step 4: Pre-Generation Confirmation
Before each generation, use AskUserQuestion to ask once. The question body must clearly state three items: ① What will be produced and how many (for multiple assets, offer lighter parallel options); ② The specifications for this batch (aspect ratio, size, duration, including defaults, and show the defaults); ③ The materials being used (if none, state it's pure text generation). Ask once per batch; after agreement, complete the batch. Only ask again if the scale exceeds the range, parameters change substantially, the user requests a revision, or a new batch is started.
When dealing with the ⚠️ Approximate category, the confirmation must include the phrase "this will regenerate the image; other parts of the frame may visually drift." Only proceed when the user explicitly accepts.
For transitions / compositing, pass the shot acceptance gate first: Before stitching, transitions, subtitle burning, audio mixing, or exporting a multi-shot output, you must follow ../video-studio/references/shot-acceptance-gate.md to display every shot from the current batch to the user and obtain explicit confirmation that "all shots are approved." Write this to 03_work/shot-acceptance.md. Then separately confirm the transition cut table and compositing specifications. Sample approval, first-frame confirmation, and the generation confirmation from this step do not count as full shot acceptance. Do not proceed to the next step without confirmation for every shot.
Step 5: Execution
- After the user agrees and before generation, if no canvas exists, create an empty
.mioracanvas and open it. Do not create a duplicate if one already exists. - Every time an asset is produced, immediately write it into this canvas (criterion: successfully obtained the local file). All final outputs go into the same canvas.
- For consistency across multiple assets, use reference images as visual anchors and reuse them. Without reference images, consistency will be weak; inform the user honestly. Strict cross-asset identity consistency is not achievable; do not force it.
- If no result is returned, first use
miora_query_taskto check the status. Do not treat it as a failure. If the user asks "is it done yet" later, check the status of the previous task. - Do not resubmit: If an original task is still running, do not issue a new generation. To reduce timeout, you may only shorten the duration or lower the resolution after user consent (this is a new generation, not a retry).
- Prompt Construction: Provide a complete description, or if the user says "use my exact words," pass them verbatim. If vague, supplement with: subject / action / camera movement / lighting atmosphere / end state. One camera movement per shot. For camera movements, lighting positions, and color tones, consult the expert
video-studioskill'sreferences/shot-language.md(§3 Camera movement prompt patterns, §10 AI generation limitations) andreferences/cinematographer-playbook.md(§4 Lighting templates): Write as "shot type / camera position / one movement / light source direction / light quality / dominant color / end state." Do not stack empty terms likecinematic, 8k, masterpiece, and do not use director names. For complex camera movements (e.g., dolly zoom, long tracking shot, multi-motion overlay), default to a static frame with ffmpeg effects instead of generating. Do not write instructions likeno watermark,remove logo, orwatermark-free, and do not crop, blur, overlay, inpaint, or clear metadata to remove watermarks (see../video-studio/references/content-compliance.md). For clean output, select official watermark-free tiers or use local open-source models before generation. For effects involving particles, magic, light effects, explosions, or dissipation, first load thevfx-studioexpert and finalize the selection during the planning phase. Write prompts following../vfx-studio/references/vfx-implementation.md§2 as a "start → process → end" sequence. Do not write effect names, studio names, or genre names. For effects that can be reliably achieved with post-production overlays (glow, particles, texture), do not hand them over to generation. Always burn text in post-production.
Step 6: Verification
Check each asset: Was the output actually obtained? Does the actual duration/aspect ratio match the confirmation? Does the subject match the description? Are all assets in the same canvas? For aspects that cannot be verified from the file (e.g., smoothness, camera movement), honestly mark them as unverifiable and let the user review them. Do not automatically regenerate unqualified assets; leave the decision to the user.
Red Lines
- Do not pretend that pixel-level video editing or lossless frame interpolation is possible.
- Do not silently degrade. Do not deliver "similar but not what the user asked for" and claim completion.
- Do not deliver a storyboard script as a video asset. Do not silently downgrade to an image.
- Do not re-issue a generation simply because you are "unsure if the previous one succeeded."
- Do not crop, blur, overlay, or inpaint to remove "AI generated" labels or platform logos. Do not clear implicit identifiers or metadata. If the final output contains a logo, return to the generation step and switch to a licensed channel to re-produce; do not do post-production erasure.
For a complete quick reference and intent examples, see references/examples.md.
Reference Files
references/capability-boundary.md— Three-tier capability boundaries, realistic landing points for three types of requestsreferences/workflow-details.md— Intent slot values, detailed explanations of the three main paths, execution/verification protocolreferences/examples.md— Intent example library, Do/Don't red line quick reference- Cross-skill (
../video-studio/references/, loadvideo-studioif not mounted):shot-language.md— Camera movement and shot type terminology;cinematographer-playbook.md— Lighting and color;transition-playbook.md— Transition design;director-playbook.md— Style cards;reference-deconstruction.md— Video analysis methods and templates;video-genres.md— Full genre routing (determine genre first, then select style);shot-acceptance-gate.md— Full shot acceptance gate (required before transitions/compositing) - Cross-skill (
../vfx-studio/, loadvfx-studioif not mounted):vfx-catalog.md— VFX master catalog;vfx-selection.md— Selection logic;vfx-implementation.md— Prompt formulas and ffmpeg recipes;vfx-masters.md— Top-level VFX and VFX art schools