Communitygithub.com

UX/Yishufan Viral Video Replica Workflow

Built-in historical viral vector case library, supporting new video breakdown, dual-model ASR, Seedance prompts, and layered quality gates for Codex Skill.

What is Yishufan Viral Video Replica Workflow?

This skill provides a comprehensive workflow for replicating viral short videos, leveraging an embedded vector case library of historical hits to guide creative strategy. It supports new video breakdown with dual-model ASR (Paraformer-v2 and Paraformer-v1) for accurate transcription, Seedance prompt generation with product and style locking, and a multi-stage quality gate system (pre-generation, pre-stitch, pre-publish) to ensure production readiness. The workflow operates in three modes: high-fidelity visual replication, viral mechanism migration, and commercial hybrid replication, each with specific rules for script, storyboard, and prompt creation. It integrates with Codex platforms, automatically validates script analysis, and enforces strict causality, product continuity, and narrative structure before allowing video generation. The final deliverable includes a complete contract, storyboards, prompts, and quality check reports, with optional AI table handoff for generation.

Works with✓Claude Code✓Codex CLI~Cursor
npx skills add 784697524-ux/yishufan-viral-video-replica-workflow

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Art Fan Viral Short Video Replica Workflow v6.1

Portable Package Path

Treat the directory containing this SKILL.md as SKILL_DIR. This package includes built-in breakdown, subtitle extraction, and ASR backends in vendor/watch/. The command examples below use the following portable path:

SKILL_DIR="<Full path containing this SKILL.md>"

Delivery Boundary

Default delivery includes reference evidence, product facts, product & visual style lock, machine-readable replica contract, second-by-second script, character design, individual storyboard images, shot-by-shot motion plan, Seedance prompts split by model duration, and pre-generation validation report.

Unless explicitly requested by the user, do not generate videos, consume credits, export final cuts, or publish. When the user explicitly requests full production, first pass the pre-generation gate, then fully read the VidMuse Full Production Branch; content without real evidence must be marked as "Creative Inference."

Minimum Input

  • Source reference, choose one: a local full path/public link to a reference video, or explicitly state "Smart reference from historical viral library."
  • Screenshots or detailed information of the product; physical products must have clear product images sufficient to lock down shape, proportions, color, material, structure, and logo. When only voucher/benefit pages are available, do not fabricate unshown physical angles.
  • Style reference image or reference video that can serve as style evidence; if there is no independent style image, explicitly use the original video as the style source, do not default to a generic "Premium" feel.
  • Replica mode and beat density; if the user does not specify and different choices would change the result, ask only once.

Default specifications: 9:16, Mandarin Chinese, each generated segment 1 to 15 seconds. When writing the AI table, the total number of attachments for characters, storyboards, audio, and product materials is at most 9. High-fidelity visual replication defaults to following the full duration of the original video; the other two modes default to 30 seconds when the user does not specify. Do not delete the original video's reversal just to make two segments.

Built-in Viral Vector Case Library (Smart Reference Mode)

knowledge_base/index.sqlite3 in this skill is a seed library ready to use upon installation: it contains only formal project cases, no private chats, API Keys, cookies, or original videos. It uses a local fixed 2048-dimensional Chinese character and mechanism tag hash vector, and retrieval does not call paid Embedding services.

When the user only provides a voucher/product, or explicitly requests an intelligent reference from historical hits, you must first retrieve from the local vector library; do not pick cases arbitrarily based on memory. After initial installation, retrieve directly without building a library first:

python3 "${SKILL_DIR}/scripts/viral_library.py" search \
  "<Full creative requirements>" \
  --top-k 5 \
  --out "<Project directory>/00_historical_match.md"

Combine product, target audience, usage scenario, visual world, character relationships, target emotion, beat density, and confirmed benefits into one complete query; do not just input the product name. The search results will give case IDs; to read the full archived text of a case in the library, run:

python3 "${SKILL_DIR}/scripts/viral_library.py" show "<case_id>" \
  --out "<Project directory>/00_historical_case.md"

After completing the breakdown, script, storyboard, or review of a new video and placing it in the outputs/ workspace, refresh the user's local index. This index by default merges with the built-in seed library, and searches prioritize it:

python3 "${SKILL_DIR}/scripts/viral_library.py" build \
  --workspace "<Full path to viral video workspace>"

For subsequent retrievals, add --workspace "<Full path to viral video workspace>" to search the combined library of "built-in cases + user new cases."

By default, do not index private Codex chats. Only add --include-chats when the user explicitly requests building a purely local private library; databases containing chats must not be distributed externally.

The retrieval report must always provide: one primary benchmark, one reusable production template, up to two candidate references, the hit mechanism, traceable analysis/script/prompt/storyboard paths, whether the original video is currently available, and the failure lessons that must be learned this time. Execution rules:

  • When decision=insufficient_match, stop forcing the template; instead request a new reference video or only create original mechanism inference.
  • For cases with quality_status=blocked, do not reuse their scripts, prompts, or storyboards; if a credible original video analysis exists, you can only reuse reference_analysis_only, while reading its QC review as a negative gate.
  • quality_status=unknown does not equal success; it only indicates the historical material has no publish-level conclusion; this creation must still pass all quality gates.
  • The seed library does not carry original videos or original machine assets; you can only reference the library's archived timecodes, hashes, analyses, scripts, and failure lessons, and must not claim to have re-watched the original video this round.
  • Even if the user's local library explicitly contains historical chats, the weight of chats is still lower than formal workspace outputs, and they cannot substitute breakdown evidence.
  • Retrieval is only for selecting mechanisms and assets; do not directly splice old scripts. Must still proceed to Stage 3's creative competition, product deletion test, beat-by-beat table read, and schema v4 story contract.

When the user provides a new reference video, you can still use this library to retrieve similar cases and failure lessons as an aid, but the primary reference identity, duration, and SHA-256 must be based on the actually read new video of this round.

Stage 0: Lock Mode, Visual World, and Material Identity

Before generating a script or storyboard, output:

Current Mode: High-Fidelity Visual Replication / Viral Mechanism Migration / Commercial Hybrid Replication
Beat Density: Follow Original / Standard Density / High-Density Reversal
Production Scope: Material Pack / AI Table Delivery / Full Video
Motion Type: Reference-led / Dramatic Performance / Continuous Motion Ad
Reasoning:
Visual World Hard Constraints:

Fully read [references/Three Replica Modes.md](references/Three Replica Modes.md). Only execute one mode. The medium, IP direction, or visual world explicitly specified by the user is a global hard constraint; it does not become invalid because "characters/scenes can be replaced"; for example, a historical artistic CG must not be arbitrarily changed into a modern live-action romance.

Before running backends, re-read the absolute path or URL provided by the user this round. Prohibit selecting other materials based on similar filenames.

Stage 1: Run Evidence Backend

Backend contract is in references/backend_contract.md. First check Alibaba Cloud configuration:

python3 "${SKILL_DIR}/scripts/configure_asr.py" --check

If configuration is missing, run the following command; the Key is read via hidden input, must not be placed on the command line, in skill files, or in reports:

python3 "${SKILL_DIR}/scripts/configure_asr.py" \
  --endpoint "<Alibaba Cloud Business Space compatible-mode/v1 Endpoint>"

Prepare reference evidence:

python3 "${SKILL_DIR}/scripts/prepare_reference.py" "<Reference video>" \
  --out-dir "<Project directory>"

This script must complete:

  • Lock down local material absolute path, filename, SHA-256, duration, aspect ratio, and audio/video parameters.
  • Extract keyframes from the entire video, plus dense frame extraction without deduplication for the first 3 seconds at 2fps.
  • Additionally generate a fixed 0.5-second timeline for the entire video; even if the scene is static, do not deduplicate.
  • Force use of Alibaba Cloud Business Space, not the default Groq.
  • Transcribe separately with paraformer-v2 and paraformer-v1 and generate timecodes.
  • Mark text inconsistencies between the two models as "Needs Review"; do not directly treat them as character dialogue.

First, view each frame listed in watch/timeline_0_5s/timeline_manifest.json for the entire video's fixed 0.5-second timeline, then view scene keyframes. Must record the number of views and the last timestamp in the replica contract; viewing only scene keyframes can easily miss long pauses, static performance at the end, and looping endings. After discovering continuous misleading, fast motion, or spatial reversals, run supplementary extraction for each reversal cluster:

python3 "${SKILL_DIR}/vendor/watch/scripts/watch.py" "<Reference video>" \
  --detail balanced --start <Start> --end <End> \
  --fps 2 --no-dedup --resolution 1024 --no-whisper \
  --out-dir "<Project directory>/watch/reversal_<Number>"

"Frame-by-frame analysis" in this skill means: view each frame of the entire video's fixed 0.5-second timeline, view each scene keyframe, and view each frame of the first three seconds and reversal clusters with dense frame extraction. watch has a maximum of 2fps; you cannot claim to have viewed every original encoded frame of the video. When the user explicitly requests 30fps full-frame review, you must explain that a separate full-frame computer vision process is needed.

ASR only proves sound was recognized, not automatically the identity of the speaker. Dialogue must be cross-checked using dual-model results, visible subtitles, lip movements, and on-screen action; separate columns for background lyrics and character dialogue.

Stage 1 must produce:

  • 00_source_manifest.json and 00_reference_evidence.md.
  • Video duration, aspect ratio, number of extracted frames, transcription model, and transcription status.
  • Dialogue table with timecodes; each line marked as character dialogue/lyrics/sound effects/needs review.
  • Shot table with timecodes: shot size, characters, action, expression, gaze, spatial relationships, camera movement, and sound.
  • Second-by-second evidence for the first 3 seconds, per-second information changes for reversal clusters, first appearance time of the brand, and closing memory point.

If the original video's music, windbreak, impact, shutdown sounds, or looping sounds are part of a reversal, list them separately with timecodes in the sound table. When the original audio needs to be passed to the video model, use scripts/extract_reference_audio.py to extract the original video's single mixed audio track; must explain it may contain music, dialogue, and sound effects simultaneously, and must not claim pure music separation.

Stage 2: Extract Mechanism, Fact Table, and Product/Style Dual Lock

Must answer: Why pause at the first second, why keep watching, what is the initial misconception, where does power/causality/prop meaning/spatial truth change, why does the product become the story's answer, and why are the last 3 seconds worth finishing.

Cutting shots, changing angles, repeated explosions, or continuous shouting do not count as reversals. High-density reversal applies only to clusters of reversals that have been measured; within a cluster, at least one new effective variable must be added per second, one level must be escalated every 2-3 seconds, and the later change must be caused by the previous change.

The product fact table must include at least: product name, price, benefits, applicable stores, sale period, availability period, redemption method, restrictions, and refund rules. Each item must be marked with its material source and confirmation status. Must not write qualification vouchers as free products, or fabricate prices, quantities, dates, and restrictions that are unclear or not provided.

Also create 02_visual_lock.md:

  • Product Lock: List relative paths, SHA-256, and purpose of each product reference asset; lock down shape, proportions, color, material, structure, and logo item by item. For sides, backs, interfaces, package text, etc., without evidence, uniformly apply do_not_invent.
  • Style Lock: Extract lighting, color, composition, camera language, characters, scenes, and material texture from the style reference or original video; generate a unique lock_id and a reusable style prompt; each Clip prompt must verbatim include this prompt and lock_id.
  • Disallowed items only record materials from this round and styles explicitly conflicting with user's requirements. If the original video itself is neon or cyberpunk, do not apply generic bans.

This step only locks evidence, not conceive creative ideas. Product reference assets must be copied into the project directory and bound with hashes; if multiple angles exist, label each purpose separately; must not pass off AI-generated images as original product evidence.

Stage 3: Creative Room Competition and Table Read Access

Prohibited to write a second-by-second script directly after watching the reference video. First, deconstruct the reference video into mechanism DNA: opening hook, audience question, initial misconception, conflict engine, reversal mechanism, emotional payoff, and closing memory point. Only inherit the propagation mechanism here, not copy surface dialogue.

The writing round must first write at least 5 truly different story concepts; when the user explicitly requests "high-budget dynamic ad" or motion_profile=continuous_motion_ad, write 10 sets. Each set must change at least two of: character relationships, conflict source, character choices, product intervention, reversal method, or ending callback. Each set must include a one-sentence story, conflict, character choice, visible consequence, unexpected twist, foreshadowing evidence, dramatic function of the product, and ending payoff; continuous motion ads must also include a line describing the 6-8 continuous action nodes of "character start → product intervention → environment change → action escalation → climax → product resolution." Prohibit using synonyms or costume changes to fake multiple schemes.

Editing round scores each set: Opening 3-second hook 20, Causality 25, Freshness 20, Product Causality 15, Reference Mechanism Inheritance 10, AI Generability 10. Continuous motion ads additionally compare dynamic intensity, visual impact, motion continuity, character-product relationship, narrative completeness, and split executability, without changing the main 100-point contract score. Selected scheme must have a total score not less than 85 and no hard veto; unselected schemes must have the elimination reason written. The editing round may veto all schemes and request rewrites. Any of the following is a hard veto: character turns without motivation, product list-style voiceover, story still valid after removing product, unpaved magic, props without origin, narration replacing key action, ending slogan replacing plot payoff; continuous motion ads additionally veto characters only posing/walking slowly, only changing backgrounds, or using camera movement to fake subject movement.

After promoting the selected scheme to narrative_qc.story_chain, proceed to table read. Answer for each story step: what is the audience's question at this moment, what is newly added in this beat, who made a decision or reaction, which visible action drives the next beat, and can the actor naturally complete the action within the allocated seconds. Must read dialogue aloud for timing, and execute the "Remove Product" test; if the story still holds after removing the product, return to the creative room. Do not enter second-by-second script until all table read questions are cleared.

Write mechanism DNA, 5 candidate schemes, individual scores, hard vetos, selection/rejection reasons, and table read results into the contract's creative_room. Machine gates only verify evidence and access conditions; cannot claim a guaranteed hit before publishing; post-publish first 3-second retention, completion rate, and interaction data verify dissemination results.

Stage 4: Original Video Beat Ledger, Replica Contract, and Unique Mapping

First, write the original video's every causality, power, prop meaning, spatial truth, and loop relationship as a time-sorted Rxx beat ledger. In high-fidelity mode, adjacent causal nodes like accusation → misconception → attack → prop reveal → apology → second misoperation → spatial reveal → ending loop must not be merged, reordered, or deleted; the product can only enter positions explicitly allowed for replacement by the user.

At the top of 03_structure_mapping.md, write the mode, beat density, visual world hard constraints, what must be retained, and what is allowed for replacement. Establish a unique chain:

R01 (Original Evidence) → S01 (New Script) → B01 (Storyboard File) → P01 (Seedance Paragraph)

Each new shot must fill in: benchmark timecode, new script timecode, original psychological/visual function, must retain, allowed replacement, storyboard file, and prompt paragraph. Must not use "feels consistent" in place of verifiable facts.

Also create 08_replica_contract.json according to Replica Contract JSON Specification with schema v4. First use brief_alignment to lock the user's original mode, original duration, production_scope, and final execution values; any changes must obtain explicit user confirmation and record the reason; prohibit silently changing the contract to pass validation. The contract must cover all Rxx in the analysis file, and bind each beat to a unique Sxx, Pxx, storyboard file, and production_design.motion_beats. Do not generate images or write the AI table before the contract is complete. Old schema v3 is only for reviewing historical packages; new projects must not continue creating v3.

The contract uses schema_version=4. First complete creative_room and select the only scheme that passes the 85-point and table read threshold, then complete narrative_qc.story_chain and storyboard: the first step must be a question, the middle must have a character choice and visible consequence, and the last step must answer the opening question; each step connects to earlier steps via caused_by. The product must assume at least one role: evidence, token, incentive, obstacle, or solution tool. Default allows_unexplained_magic=false; only if the user explicitly specifies a fantasy world may it be set to true, and each supernatural change must still be triggered by the preceding action. "Vouchers suddenly take effect, crowds suddenly appear, celebrations suddenly begin" without character choice are considered causal breaks and must be rewritten.

Also fill in:

  • dialogue_requirements: at least one non-loseable key line or keyword per non-silent Clip.
  • prop_continuity_requirements: appearance, handover/use, and result events of key props.
  • director_requirements: closing memory point and character "start → turning point → result" performance arc.
  • finale_policy: can only choose story_action or source_fact_card. The former requires the closing action/reaction to be visible in the last 3 seconds; the latter only allows the plot answer to be realized first, then wrap up with the user-provided real fact image, locking the source file and start/end times.
  • production_design: record product reference assets and their hashes, six immutable features, style lock, music status, motion type, and for each Pxx starting state → character action → product action → environment reaction → camera movement → speed change → end state → transition trigger → music cue.

Each motion beat is chained with handoff_in/handoff_out from START to END in a unique chain, and distinguished by product_visibility=visible/withheld_for_reveal between real exposure and plot-delayed reveal; only visible beats force product asset binding in prompts. Dynamic shots must pass the "After removing camera movement, characters or environment still have significant motion" test; intentional stillness is only allowed for original video evidence, brief opening buildup, or closing product title card, with reason recorded. Complex actions must bind at least three keyframes: start, middle, end. Continuous motion ads must have at least three different levels of dynamic escalation, with the highest level not less than 4.

Execute by mode:

  • High-Fidelity Visual Replication: retain shot order, duration ratio, shot size, camera position, camera movement, action direction, transitions, scene structure, and light/color.
  • Viral Mechanism Migration: retain pause points, misconception path, power changes, reversal hierarchy, causal escalation, and closing memory point; no requirement for per-shot visual similarity.
  • Commercial Hybrid Replication: reconstruct commercial conflict in 0-3 seconds; after 3 seconds, restore original shot order, duration ratio, and visual beats.

Do not additionally apply acceptance rules from other modes.

Stage 5: Write Second-by-Second Script Based on Original Causal Chain and Dynamic Segmentation

First complete the entire second-by-second script, then split it into Clips at positions that do not cut dialogue lines or reversal causality. Each segment must be 1-15 seconds, continuously covering the target duration from 0 seconds. Each segment has at most 3 executable units; dramatic segments have at most 2 speaking units and 1 main product fact line. Each time unit must use a parseable Markdown table, with the time column allowed in the first three columns in the format start-end, and specify Sxx/Pxx, shot size, camera movement, left/right/front/back character positions, body and gaze directions, speaker and addressee, hand and body actions, expression start/change/result, Mandarin dialogue, lip-sync, continuity anchors, and sound.

Immediately after completing the script, run automatic parsing; no more manual self-reporting of spoken seconds, character count, and beat count:

python3 "${SKILL_DIR}/scripts/analyze_script.py" \
  "<Project directory>" --out "<Project directory>/07_script_analysis.json"

The program calculates minimum spoken duration at 4.2 characters/second; dramatic dialogue takes up at most 60% of a Clip, montage narration at most 75%, classical poetry reading at most 92%. It will also reject overloaded units, too many speaking turns, product list-style dialogue, product placement in the first 30% without permission, and unexplained magic. Do not generate images when errors occur.

In principle, hard product selling should not appear in the first 30%. The product solves a plot problem in the middle/late sections through confirmed benefits; when the original video itself uses the product as a first-second hook, only allow front-loading if the user explicitly requests it and the product facts are complete. The ending must by default have action, group reaction, or a second reversal. Only when finale_policy.type=source_fact_card may, after the plot problem is visibly solved, use 1-2 seconds of real product/benefit original image for wrap-up, with a maximum of 2.5 seconds; prohibit using AI-generated images or static posters without source file binding instead of plot payoff.

Stage 6: Character Design and Individual Storyboard Images

Before the first image generation, fully read the imagegen skill description installed in the current Codex environment; by default, use built-in image_gen, do not switch CLI/API without permission.

  1. First generate uniform character design images: front, side, back, and key expressions.
  2. Use the character design as the identity reference for all plot images.
  3. Each storyboard call generates one image separately; prohibit using grids, manga panels, or collages instead of individual storyboards.
  4. Save each image to the project directory, and check each image for characters, scenes, props, action direction, speaking object, no subtitles/QR codes/unrelated text except whitelist, and 9:16 aspect ratio.
  5. The last frame of an adjacent Clip and the first frame of the next must reuse the same file or a pixel-identical copy; character positions, postures, orientations, props, time, and lighting must remain consistent.
  6. When the user specifies fan faces, signs, packages, etc., that must contain exact text, only the whitelisted text is allowed; write the text verbatim in the image generation prompt, use view_image to actually verify after generation, confirm no mirroring or typos, then write into the contract's visual_text_requirements. At this point, stop using conflicting restrictions like "No text in the image."
  7. For complex actions, generate separate keyframes for start, middle, and end; reference assets only lock identity, product, and state, do not lock character pose. Keyframes are only inputs for the video model, not directly considered final dynamic shots.

Each storyboard must be bound to shot ID, time point, benchmark timecode, image purpose, shot size/camera position/composition, three action states, and image generation prompt.

Stage 7: Seedance Prompts

Output a code block for each segment that can be copied as a whole, containing aspect ratio, precise duration, product lock, style lock_id and complete reusable style prompt, reference image usage, second-by-second shots, actions, dialogue objects, Mandarin lip-sync, head/tail continuity, and negative restrictions.

The prompt must begin by listing the actual attachment filenames and their roles for this segment individually; each Pxx in the body must again write the corresponding storyboard filename. Must not just write "Refer to attachments." If using original video music or sound effects, the contract must separately record the original video's extracted interval and the target video's usage interval; the prompt must write the audio filename, target start/end time, and "Do not replace with other music." "BGM from the same segment of the original video" cannot replace the filename.

Except for text specified in the contract's whitelist, images must not generate subtitles, English, QR codes, or unrelated information. For high-fidelity and commercial hybrid modes, write the order, duration, camera position, camera movement, action direction, and transitions by shot ID; for high-density mechanism migration, first give a per-second beat table, then write into prompts in the same order.

Each Pxx must reiterate the motion chain from the contract item by item: start state, continuous character action, product movement, environment reaction, camera spatial movement, speed change, end state, action-triggered transition, and music cue. A single shot has only one main character action and one main camera movement; simplify camera movement when character action is complex, simplify character action when camera movement is complex. Prohibit using camera push/pull, digital zoom, background replacement, or quick cuts to fake dynamic events.

Stage 8: Optional AI Table Delivery

Only execute when the user explicitly requests writing to the AI table. First, use the DingTalk skill to read the real Base, sub-table, fields, and target records, adding auto-video, formula, cost, and generation result fields to the contract's aitable_handoff.protected_field_ids. Writing is only allowed for prompt and attachment fields; each record's character images, storyboard images, audio, and product materials total at most 9 attachments, first reserve slots for character images and audio, then decide the number of storyboards. When updating attachments, first read back current attachments and perform a full preservative replacement; prohibit only submitting new files, causing old attachments to be lost. After writing each record, must read back: prompt references, attachment filenames/count, and protected field original values must all be kept; must not inadvertently click the generate button. After the user explicitly requests generation, read back each record: record ID → Clip ID → result file/link → actual duration → resolution → completion status; after downloading, only merge in the contract's Clip time order, not by download time or table row position.

Stage 9: Verification and Delivery

Use [templates/Pre-generation Quality Check Table.md](templates/Pre-generation Quality Check Table.md) to complete content QC, then run the pre-generation total gate:

python3 "${SKILL_DIR}/scripts/run_quality_gate.py" \
  "<Project directory>" --stage pre-generation \
  --out "<Project directory>/07_quality_gate_pre_generation.json"

Only when decision=allow_generation may images be generated or AI table written. The total gate simultaneously executes contract/asset validation and automatic script analysis; if it fails, it provides the level to return to. --legacy can only check old packages, not serve as a delivery basis for new projects.

When the user explicitly requests using VidMuse for generation, editing, and export, only after obtaining allow_generation here proceed to the VidMuse Full Production Branch. This branch must first read account, credits, available models, and generation parameters in real-time, then calculate a budget including headroom for problematic shot regeneration; must not assume model names, pricing, duration, or timeline capabilities based solely on this document or history. Stop here without an explicit generation request.

After the user provides the generated footage, run structural acceptance.

First, create 09_delivery_manifest.json for the segmented videos returned by the AI table, registering only clip_id and actual file in contract order:

{"outputs":[{"clip_id":"clip01","file":"renders/clip01.mp4"}]}

Post-generation manifest format is in Post-generation Quality Manifest Specification. Must prepare AI table segment manifest, candidate ASR manifest, and Watch director evidence; before merging, run:

python3 "${SKILL_DIR}/scripts/run_quality_gate.py" \
  "<Project directory>" --stage pre-stitch \
  --delivery-manifest "<Project directory>/09_delivery_manifest.json" \
  --asr-manifest "<Project directory>/10_asr_manifest.json" \
  --director-manifest "<Project directory>/11_director_qc.json" \
  --out "<Project directory>/12_quality_gate_pre_stitch.json"

Only when decision=allow_stitch may merging occur. It rejects missing segments, wrong order, duplicate segments, duration errors, non-9:16, no audio track, missing key dialogue, invisible story steps, missing performance arc, props without origin, continuity failures, missing closing memory points, hard vetos, or director rating below 85.

For high-fidelity footage, also run original structure acceptance:

python3 "${SKILL_DIR}/scripts/validate_render.py" \
  "<Original video>" "<Output video>" --out "<Project directory>/QC/render"

If the total duration, shot change density, median audio energy, or low-percentile audio dynamic of the output video do not meet thresholds, directly determine "Not Aligned"; must not call it high-fidelity just because main plot events appear. Low-percentile dynamic is used to detect cases where overall volume is acceptable but key intervals like explosions, impacts, transition music are actually missing. Then view all generated 0.5-second frames from the script, and use candidate ASR to verify contract dialogue word by word.

Regardless of mode, each segment returned by the AI table must also be individually checked for actual duration against the contract segment duration (tolerance ±0.5 seconds), character/prop continuity, each step of causality in narrative_qc, and segment order; any failure counts as only "generation result," must not be merged or published.

After merging, re-run prepare_reference.py on the final MP4 itself, writing dual-model ASR and fixed 0.5-second timeline into a separate QC directory; must not manually copy segmented ASR to fake as final merged ASR. According to Post-generation Quality Manifest Specification, create 13_final_manifest.json, where the final video, ASR evidence files, and real fact images must all be bound with SHA-256. Then run for all modes:

python3 "${SKILL_DIR}/scripts/run_quality_gate.py" \
  "<Project directory>" --stage pre-publish \
  --delivery-manifest "<Project directory>/09_delivery_manifest.json" \
  --asr-manifest "<Project directory>/10_asr_manifest.json" \
  --director-manifest "<Project directory>/11_director_qc.json" \
  --final-manifest "<Project directory>/13_final_manifest.json" \
  --out "<Project directory>/14_quality_gate_pre_publish.json"

Only when decision=allow_publish may it be called "Publishable." The final gate reads the actual merged duration, aspect ratio, audio track, and hash in real-time, loads results from at least two different models from ASR evidence files, and verifies pixel similarity of fact cards in the output video. When the two models are inconsistent, a person who actually listened to the output audio track must fill in the reviewer, time, confirmed dialogue IDs, and reason; models or ASR results themselves must not mark human_audio_qc as passed. For high-fidelity mode, additionally attach --render-validation as an extra gate for original structure alignment.

Standard Delivery Directory

outputs/<Project Name>/
├── 00_source_manifest.json
├── 00_reference_evidence.md
├── 01_reference_analysis.md
├── 02_product_facts.md
├── 02_visual_lock.md
├── 03_structure_mapping.md
├── 04_script.md
├── 05_seedance_prompts.md
├── 06_pre_generation_qc.md
├── 07_script_analysis.json
├── 07_quality_gate_pre_generation.json
├── 08_replica_contract.json
├── 09_delivery_manifest.json (post-generation)
├── 10_asr_manifest.json (post-generation)
├── 11_director_qc.json (post-generation)
├── 12_quality_gate_pre_stitch.json (post-generation)
├── 13_final_manifest.json (post-stitch)
├── 14_quality_gate_pre_publish.json (post-stitch)
├── asr/
├── audio/ (when original video music or sound effects are needed)
├── watch/
├── character/character_sheet.png
└── storyboard/ (individual PNGs per segment; when writing AI table, reserve slots for character images, audio, etc., within the total of 9 attachments)

Calling templates are in [templates/Calling Template.md](templates/Calling Template.md).

Post-Production Review Boundaries

When the user later provides the finished video, first run dual-model ASR on the final MP4 and the pre-publish total gate; for high-fidelity mode, also run validate_render.py. Then confirm whether the goal is "Correspondence Check" or "Quality Evaluation." Correspondence check compares original fixed timeline, script, storyboard, prompts, output timecodes, and candidate ASR; do not replace shot chain evidence with quality adjectives. A single-frame exaggerated expression does not equal performance alignment; must check the start, change, and result of the expression; when new props appear, must see the action of taking out, handing over, or transforming.

Related Skills