Resume from a new topic or existing materials to the correct stage. Convert confirmed historical sources or production scripts into a publishable final video. Do not treat slight zooming of an entire image as animation. Do not let unrelated images loop to substitute for content alignment.
Project Guidance and Recovery
For a new topic, missing finalized script, or when the user requests advancing from the beginning, first read guided-project-workflow.md
- Use
project.json.workflowto record the current stage, status of each stage, pending confirmation questions, artifact paths and history. Do not create a second project state source. - Advance only the current stage each round. Clarify what is currently in progress, what the system will do, what the user only needs to confirm, what will be delivered, and the next step after confirmation.
- During the benchmark and writing package stages, existing benchmark breakdown, transcription, search or writing capabilities may be invoked, but do not claim that models or hosts not actually used have participated.
SCRIPTFACT_CHECKandPRODUCTION_CONTRACTBefore both are confirmed, do not enter paid voiceover or batch image generation.- Recurring characters must go through an independent
CHARACTER_ANCHORSstage. Before the face and full-body master versions of characters requiring strict consistency are confirmed, do not enter batch scene image generation. - When an old project lacks the
workflowfield, you may usescripts/manage_workflow.py initto supplement it non-destructively. For new topics useinit_project.py --guidedto create it. At this time do not confirm voice timbre, art style and platform in advance. - Stage status can only be
未开始进行中待确认已确认需要返工已跳过When the user says continue, only approve the currently displayed confirmation gate.
python3 scripts/manage_workflow.py summary /absolute/project/path
python3 scripts/manage_workflow.py validate /absolute/project/path
Pre-run Checks
- Python 3.11 or higher, and install
requirements.txt - Node.js 20 or higher
ffmpegandffprobemust be findable fromPATHFound- The system needs one of PingFang SC, Microsoft YaHei or Noto Sans CJK SC installed. You may also use
--fontin the subtitle command to specify a font file. - Only read from environment variables
APIMART_API_KEYandELEVENLABS_API_KEYvoice ID may be provided by--voice-idorELEVENLABS_VOICE_IDProvide
python3 -m pip install -r requirements.txt
command -v ffmpeg
command -v ffprobe
Default Production Contract
- The main feature defaults to vertical 9:16 1080×1920 30fps. Side stories explicitly specified by the user may use native horizontal 16:9 1920×1080.
static-infographicStatic infographic mode- Visual presets can only be one of four choices:
warm-xuan-voxamerican-comic-voxknowledge-cardorqibaishi-xieyi - When no style is specified, default to
warm-xuan-vox - APIMart
gpt-image-21K independent single images, default four concurrent, grid layout prohibited - Each project must provide an ElevenLabs voice ID. The model defaults to
eleven_v3but may also be explicitly specified - Dialogue information, maps, routes, war directions and chapter text are baked directly into the generated images
- Remotion only assembles static images, subtitles, voiceover, BGM and the approved end card
- ElevenLabs must return character-level alignment
- The actual duration is determined by the voiceover. Do not force it to 60 seconds or 10 minutes.
- Keep the bottom 22% of the image low-detail. Subtitles are located in the bottom 18% safe area.
- Subtitles remove all Unicode punctuation. Voiceover text retains necessary punctuation to control prosody. Subtitles may be rendered according to
subtitle_modeor only kept as an SRT sidecar - The final voiceover must pass full-length 1× listening review, chunk-seam re-listening, and overlap checks. No breath cuts, dropped characters, duplicated characters, timbre jumps, or multi-track overlap are accepted
- First output
out/candidates/candidates; only after passing QA do they advance toout/final.mp4
When the user explicitly specifies other non-style parameters, the user parameters take precedence and the deviations must be written into project.json Adding a fifth visual style is not treated as an ordinary parameter deviation; the fixed contract must be modified first
Workflow
0 Topic selection, benchmarking, writing package, and script
- Organize the user's ideas into a brief with a clear platform, audience, topic, duration, aspect ratio, and success criteria
- For two to five benchmarks, specify the product mode, copy voiceover, visuals, or counterexample role respectively; learn the structure and rhythm, do not copy the original text, finished video, or audio
- Establish a self-contained writing package; save source materials, benchmark samples, structure and rhythm rules, length requirements, and the requirement prohibiting added words
- Generate one complete first draft; when it is largely usable, make only one focused repair; when it is severely hollow or under the word count, return to the writing package and regenerate; do not pad a bad draft
- After the user confirms the script, conduct historical fact-checking separately; separate verifiable facts, analytical judgments, and unconfirmed items
- Only after the historical facts and production contract are confirmed may you enter the paid production steps below
Read the complete stage, state transitions, and artifact rules from guided-project-workflow.md
1 Lock the content and visual contract
- Read the source text, historical materials, script, and user requirements
- Verify and define time, people, geography, war direction, institutions, and causal statements
- Separate confirmed facts from analytical judgments; do not fill in gaps without evidence
- Write into
project.jsonand generate the production storyboard - Enter paid generation only after the content and visual contract are confirmed
Initialize the project
python3 scripts/init_project.py /absolute/project/path \
--title "新选题" --guided
# 已有定稿生产合同时
python3 scripts/init_project.py /absolute/project/path \
--title "视频标题" \
--voice-id "用户的 ElevenLabs voice ID" \
--model-id "eleven_v3"
Read project-contract.md Create directories, storyboard, and manifest
2 Split the spoken narration into shots and infographics
- One image carries only one core information action
- Establish
shot_idvoiceover segments andframe_identity images - For each image specify
startoron_wordanchor on_wordmust appear verbatim in the TTS text- For fast-cut multi-frame sequences, use independent entity assets and
hold_seconds - An unrelated image must not be looped across multiple lines of dialogue
- The seconds marked in the script are only a rhythm reference
3 Generate voiceover
- First try a single continuous
with-timestampsrequest - When a single request times out or disconnects, chunked degradation is allowed only at shot boundaries
- When chunking, keep the same voice ID, model ID, stability, seed strategy, and text order
- Do not automatically insert pauses between each chunk; add only pauses explicitly required by the script
- Save the complete manifest, global shot times, chunk mapping, request ID, text hash, and character alignment
- If
atempopost-acceleration is needed, alignment times must be scaled proportionally - After generation, a full listening review is required, and at least 3 seconds before and after each chunk seam must be re-listened to. If there are breath cuts, dropped characters, duplicated characters, missing characters, clicks, timbre jumps, or rhythm jumps, regenerate only the affected chunk
- Do not use the old timbre with SRT to generate a new timbre line by line; after changing the timbre, rebuild alignment, SRT, and shot timeline from the new audio
python3 scripts/generate_continuous_voiceover.py \
--project project.json --out voice-continuous-candidate
After a continuous request succeeds, copy that candidate as the canonical voice/ directory; if the continuous request fails, keep the failure log, archive the candidate directory, and then to the empty voice/ Table of contents generation chunked degraded version
python3 scripts/generate_chunked_voiceover.py \
--project project.json --out voice \
--max-chars 430 --speed 1.0 --post-speed 1.0
Do not write the API key into skills or logs; only read it from the ELEVENLABS_API_KEY environment variable
Read voiceover details voice-and-captions.md
4 Generate and review the infographic
- Choose and choose only one visual preset
warm-xuan-voxWarm-toned rice paper, torn-paper collage, old maps, high-density woodcut lines, low-saturation earth tones with a small amount of cinnabar redamerican-comic-voxHeavy charcoal-black outlines, controlled halftone printing, cyan-blue, coral red, mustard yellow, off-white, and charcoal blackknowledge-cardOne-page historical encyclopedia knowledge card, warm rice-paper torn-paper collage, white-edged figures and objects, maps, data, timelines, relationship diagrams, and accurate Chinese explanatory cards; all visible text containers have content; blank label boxes are prohibitedqibaishi-xieyiFirst derive a unique context from the current content, then organize brushwork, negative space, and a small amount of color necessary for the content in the spirit of Qi Baishi-style freehand painting; do not reuse fixed figures, props, symbols, or compositions
- Do not mix the four presets; do not provide Monument Valley, vintage newspaper, or an unapproved fifth style
- For new projects and reworked frames, first follow
visual-prompt-contract.mdto establishprompt_contract_version: 2a structured scene contract, convert abstract concepts into realistic scenes that can be directly painted for the target era, and runvalidate_frame_prompts.pypass the pre-payment precheck - First generate four types of stress-test frames: hooks, characters, complex maps, and high-density text
- After passing, generate the remaining images concurrently as independent 1K single images in four parallel streams; grid cropping is prohibited
- For each image, save the service original and a 1080×1920 RGB canonical PNG
- Save the task ID, elapsed time, cost, original size, canonical size, and SHA256
- When image generation fails, retry only the current frame; do not pass off neighboring frames as substitutes
- Use
view_imageat original size to review text, orientation, geography, era symbols, subtitle safe areas, and repeated elements knowledge-cardMust be checked againsttext_planinspect every text container; the number of blank text boxes must be zero- Typos, fake characters, blank text boxes, out-of-bounds, or anachronisms must trigger a targeted regeneration of the current frame; retain failed candidates and the repair log; when the base scene contains error-inducing elements, fully rewrite the scene contract; do not keep piling negative sentences after the old prompt
- Do not use Remotion text overlays to mask image-generation errors
For character continuity, first read character-continuity.md to establish character cards and masters, then read visual-prompt-contract.md build frame-by-frame prompts
When generating confirmed character face and full-body masters, the same APIMart script may be reused and an independent directory specified
python3 scripts/generate_apimart_images.py /absolute/project/path \
--prompt-file characters/anchor-prompts.json \
--raw-dir characters/source-anchors \
--canonical-dir characters/anchors \
--report-file logs/apimart-character-anchors.json
python3 scripts/generate_apimart_images.py /absolute/project/path
5 Generate subtitles and shot timeline based on alignment
python3 scripts/build_aligned_captions.py \
--project project.json \
--voice-manifest voice/voiceover_manifest.json \
--pronunciation pronunciation.json \
--caption-dir captions
python3 scripts/build_timeline.py /absolute/project/path
- Subtitles use the approved correct characters; do not display TTS homophone substitute characters
- Before subtitle generation, delete all Unicode punctuation; the final scan hit count must be 0
- A single suggestion should not exceed 16 Chinese characters
- The timeline must be continuous with no overlaps; trailing silence in a chunk is carried by the previous image
- SRT only describes the alignment of the current final audio; it is not a generation schedule for changing voice timbre
subtitle_mode: noneAt that time, still generate a complete SRT sidecar, but Remotion does not render the overlay and the candidate video subtitle stream is 0- Pre-render subtitles as transparent PNGs to avoid font differences across rendering machines
6 Generate BGM and composite
Prefer original or confirmed authorized music; when copyright is uncertain, an original procedural ambient bed may be generated
python3 scripts/generate_original_bgm.py /absolute/project/path
python3 scripts/sync_remotion_assets.py /absolute/project/path
cd /absolute/project/path/remotion
npm install --no-audit --no-fund
npm run lint
npm run still
npm run render
The static version prohibits background breathing, full-image Ken Burns push-pull, parallax floating, or decorative animation; use only hard cuts or restrained static transitions
During final H.264 encoding, a keyframe must be forced at the starting frame of every picture in the timeline; do not rely only on the encoder's automatic scene-change detection.
7 QA before release
- First check all source assets and the manifest
- First render the first frame, middle section, complex map, key typo frame, reveal frame, and end frame
- After the candidate film render is complete, run both media and content checks
- Listen through the narration completely at 1x speed and write the chunk seams, breath breaks, broken words, repeated words, missing words, timbre/rhythm jumps, and overlapping speech results into
out/qa/voice-continuity-review.json - Run a full cut-point check, verifying frame content before and after each cut, PTS continuity, and keyframes at cut points one by one
- Only when
voice-continuity-review.jsonis pass and all technical checks pass canvoice_continuity_passedandqc_passedbe set to true - If any P0 or P1 check fails, do not copy to
out/final.mp4 - After fixing, rerun the affected stages and the final check
python3 scripts/validate_project.py /absolute/project/path
python3 scripts/qa_cut_boundaries.py /absolute/project/path --candidate out/candidates/candidate.mp4
For complete commands and thresholds, read release-qa.md
Stage gate
- S0 Content contract, historical facts, script, visual finalization
- S1 Voiceover: correct voice model, complete alignment, no breath breaks or incoherence, no abnormal breakpoints, no overlapping narration, full listening review passed
- S2 Image generation: correct quantity and dimensions, one-to-one correspondence with dialogue semantics
- S3 Subtitles: correct characters, timing, safe area, and readability
- S4 Remotion compilation and keyframes passed
- S5 Candidate final film: encoding, black frames, silence, loudness, cropping, subtitles passed
- S6 Final output hash and QA report complete
Required artifacts
When starting from a new topic selection, upstream stages should also retain brief.md benchmarks.md writing-pack/ source/original-script.md source/fact-check.md; when starting from an existing finalized script, stages that do not apply can be explicitly marked as 已跳过
project.json
source/original-script.md
storyboards/production-storyboard.json
storyboards/frame-manifest.json
storyboards/timeline.json
prompts/frame-prompts.json
assets/source-images/
assets/backgrounds/
voice/voiceover_full_48k.wav
voice/voiceover_manifest.json
out/qa/voice-continuity-review.json
captions/subtitles.srt
captions/caption-manifest.json
audio/music/bed.wav
out/candidates/candidate.mp4
out/qa/release.json
out/final.mp4
Release copy
Write copy separately for each platform: WeChat Official Account, Douyin, and X. Do not use punctuation in titles; keep necessary punctuation in the body. Read publishing-copy.md
After the final film is released, if the user provides real platform data, enter the FEEDBACK stage: record actual production duration, manual intervention, plays, retention, interaction, and revenue; propose only the smallest verifiable change for the next episode; do not freeze the channel template based on a single final film or a single viral post
Prohibited actions
- Do not use looping old images to impersonate new dialogue
- Do not treat Remotion text overlays as scene image generation
- Do not guess subtitle timing when there is no alignment
- Do not claim full-screen zooming or slight panning as animation
- Do not mix different voice IDs, model IDs, or unlabeled candidate voiceovers
- Do not use Ming dynasty brick Great Wall imagery to represent early Qin-Han earthen barriers
- Do not accept typos, pseudo-text, modern flags, misplaced islands, or reversed directions
- Do not directly overwrite already approved
out/final.mp4 - Do not use hybrid layered split-layer animation or claim static push-pull as animation
- Do not use nine-grid, four-grid, or local cropping grids
- Do not use old SRT timecodes to generate new voiceovers item by item and treat overlapping speech as an acceptable result
- Do not automatically add a fifth style or mix the four fixed presets