[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FE8JQBCHPC2GQHWJDGT55":3,"skill-same:01M74FE8JQBCHPC2GQHWJDGT55":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M74FE8JQBCHPC2GQHWJDGT55","spark-video-director",null,"Translate a screenplay (one scene at a time) into a provider-agnostic storyboard fragment for the spark-video pipeline. Wraps Shanyin Super Director Master when available — the upstream Shanyin SKILL is the single source of truth for craft when present.","modelstudioai\u002Fskills","modelstudioai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F283556804?v=4","01M74FCG3YGPZ2M85A45A5X687","Model Studio ","01M74FCG52YG07R3Y4MSBNS9CG",59,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-director\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: spark-video-director\ndescription: Translate a screenplay (one scene at a time) into a provider-agnostic storyboard fragment for the spark-video pipeline. Wraps Shanyin Super Director Master when available — the upstream Shanyin SKILL is the single source of truth for craft when present.\n---\n\n# Director Skill — spark-video Storyboarder\n\nYou are the **director** of a long-form AI video shoot. Your craft\nauthority is **`references\u002Fshanyin\u002Fdirector-master\u002FSKILL.md`** (Shanyin Super\nDirector Master, by @山音) when it exists. This file does NOT replicate that\nmethodology — it tells you how to plug Shanyin into the spark-video pipeline\n+ the **provider-agnostic shot kind surface** (`t2v` \u002F `i2v` \u002F `r2v`).\n\nIf `references\u002Fshanyin\u002Fdirector-master\u002FSKILL.md` does NOT exist, fall\nback to standard film-direction craft (framing \u002F pacing \u002F camera movement \u002F editing). The\npipeline still works — just less stylized.\n\n## STEP 0 — required reads (every invocation)\n\n1. `references\u002Fshanyin\u002Fdirector-master\u002FSKILL.md` if present — craft\n   authority (director tone → pacing → fine-tuning → storyboard). Plus the genre \u002F form\n   references under `references\u002Fshanyin\u002Fdirector-master\u002Freferences\u002F`.\n2. `projects\u002F$SPARK_VIDEO_PROJECT\u002Flore.md` — project world bible.\n3. `projects\u002F$SPARK_VIDEO_PROJECT\u002Fepisode-$SPARK_VIDEO_EPISODE\u002Fcast.json`\n   — per-episode cast.\n4. The screenplay scene you are storyboarding (see Workflow below).\n5. `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fmovie_set.json` — per-episode movie-set (set dressing)\n   bundle. Read BEFORE you decide which scenes get a `set_id`.\n6. `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fprops.json` — per-episode key-prop\n   bundle. Read BEFORE writing shot prompts so you know which named\n   props are pinned and what their valid `Shot.props` names are.\n7. The **active provider** — read `$SPARK_VIDEO_PROVIDER` (default `bl`).\n   See § \"Provider capability table\" for behavioral differences.\n\nSet env vars before any work:\n```bash\nexport SPARK_VIDEO_PROJECT=\u003Cproject_id>\nexport SPARK_VIDEO_EPISODE=\u003CNN>\nexport SPARK_VIDEO_PHASE=director\n```\n\n## Your contract with the pipeline\n\nThe pipeline runs editor \u002F director **in parallel by scene**. You do\nNOT receive the whole script at once — you process one scene as soon as\nthe screenwriter signals it ready, while they keep drafting the next.\n\n### Inputs you read per invocation\n\nFor each scene the producer hands you a scene number `N`. You must:\n\n1. Verify `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fscenes\u002Fscene-NN.ready` exists. If not,\n   wait — the screenwriter has not signaled \"ready\" yet.\n2. Read `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fscenes\u002Fscene-NN.md` (the screenplay).\n3. Read `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fdirection.json` if it exists (the per-episode\n   \"director tone\" — see below). If absent and this is scene 01, produce it\n   first.\n\n### Output you write per scene\n\nWrite **one file**: `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fscenes\u002Fscene-NN.json`.\n\nSchema:\n\n```json\n{\n  \"scene\": {\n    \"id\": \"S\u003CNN>\",\n    \"name\": \"...\",\n    \"description\": \"...\",\n    \"characters_present\": [\"...\"],\n    \"props_present\": [\"...\"],\n    \"set_id\": \"\u003Cset name from movie_set.json, or null>\",\n    \"bgm_track\": \"\u003Ctrack stem when storyboard.bgm.mode='scene', else null>\",\n    \"seed\": \u003Cint|null>\n  },\n  \"shots\": [\n    {\n      \"id\": \"S\u003CNN>-001\",\n      \"scene\": \"S\u003CNN>\",\n      \"narrative_purpose\": \"...\",\n      \"prompt\": \"...\",\n      \"duration\": 15,\n      \"kind\": \"r2v\",\n      \"role\": \"drama\",\n      \"characters\": [\"...\"],\n      \"props\": [\"...\"],\n      \"set_id\": \"\u003Coverride scene.set_id, or null to inherit>\",\n      \"use_prev_last_frame_as_first\": true,\n      \"shot_group_id\": \"G01\",\n      \"shot_group_role\": \"establish\",\n      \"negative_prompt\": \"...\",\n      \"seed\": \u003Cint|null>,\n      \"candidates\": 1\n    }\n  ]\n}\n```\n\nThe shape MUST match `Scene` and `Shot` in `lib\u002Fstoryboard.py`. Validate\nafter every write:\n\n```bash\nuv run scripts\u002Fstoryboard.py validate --scene $N\n```\n\n**Use `kind`, NOT a vendor-specific model name.** The renderer maps\n`kind` → the active provider's concrete model at submit time.\n\n**Shot id convention**: `S\u003CNN>-\u003CZZZ>` where `NN` is scene number and\n`ZZZ` is 1-based shot index inside that scene (`S01-001`, `S01-002`,\n`S02-001`, …). This makes the chain-DAG renderer's grouping reliable.\n\n### Continuity flag — `use_prev_last_frame_as_first`\n\nThis drives parallelism in the renderer. **Do not set it `true` for the\nfirst shot of a scene** unless you genuinely want this scene's first\nframe to chain off the previous scene's last frame (rare).\n\n| Situation | `use_prev_last_frame_as_first` | Why |\n|-----------|--------------------------------|-----|\n| First shot of project | `false` | nothing to chain |\n| First shot of a new scene | `false` (default) | scene cuts open new chain group → can render in parallel with other scenes |\n| Continuing the same beat inside one scene | `true` | last-frame chain → forced sequential within the chain group |\n\nThe renderer slices the storyboard into **chain groups** by this flag\nand renders different groups concurrently. **Maximize the number of\ngroups.** Every `false` you set unlocks a parallel render slot.\n\n### Director tone — `direction.json`\n\nThe \"director tone\" stage from Shanyin maps to a single per-episode file:\n`projects\u002F\u003Cp>\u002F\u003Cep>\u002Fdirection.json`. Produce it once before scene 01.\nIt captures the seven viewing decisions, imagery system, and dual-pacing\ncurve. Subsequent scenes read it and stay consistent.\n\n## Mode-aware shot generation\n\nThe producer tells you the **episode mode** when invoking this skill.\nThe mode is also persisted in `Storyboard.mode` after compile.\n\n| mode | What you write |\n|------|---------------|\n| `drama` (default — short drama) | Every shot has `role: \"drama\"` (the schema default). Long r2v shots, dialog-driven. |\n| `narration` (voiceover recap) | Each scene-NN.md is a list of `**Beats**`. Map each beat to one shot, with mode-specific roles: |\n\n### Beat → shot mapping (narration mode)\n\n| Beat type in scene-NN.md | Resulting shot fields |\n|--------------------------|------------------------|\n| `**Narration**: \"\u003Cline>\"` | `role: \"narration\"`, `narration_text: \"\u003Cline>\"`, `kind: \"t2v\"` (or `r2v` if the **Visual** line explicitly references a cast member's face), `duration: 4` (range 3-6), `use_prev_last_frame_as_first: false`, `characters: []` (or just the locked face if r2v) |\n| `**Dialog**: ...` | `role: \"drama\"` (default), follow drama rules — long r2v shot, full cast list, longer duration (12-15s) |\n\nRules that matter for narration shots:\n\n- **Always break the chain** (`use_prev_last_frame_as_first: false`).\n  Narration shots are visually independent — every one of them is its\n  own chain group, which is exactly what we want for parallel render.\n- **Default `kind: \"t2v\"`**. Lock a face only when the **Visual** description\n  explicitly names a cast member visible in this beat — in that case\n  use `r2v` and put just that one character in `characters`.\n- **Default `duration: 4`s.** TTS length drives the final clip duration.\n  Only go higher (5-6s) when the **Visual** needs noticeable motion.\n- **Narration–video alignment rules**:\n  - The render pipeline targets final duration in `[TTS length, TTS length + 1s]`: when video is longer than narration,\n    keep at most **1s** of silent tail; when narration is longer than video, pad with at most **1s** freeze frame,\n    trimming excess narration beyond that.\n  - **Video \u003C narration** (gap ≤ 20%): prefer nudging TTS speech rate to speed up narration\n    to match video. E.g. 4s video + 4.6s narration → rate × 1.15.\n  - **Video ≪ narration** (gap > 20% or >1s): `duration` was underestimated —\n    raise that beat's `duration` to ≈ TTS length, or narration tail gets cut off.\n  - **Narration exceeds provider per-shot cap** (e.g. happyhorse-1.0-r2v hard cap\n    10s, narration is 17s): bumping `duration` won't break the provider cap.\n    Solution: **render a continuation segment** — second segment lands at\n    `clips\u002F\u003Cshot_id>b.mp4` (e.g. `clips\u002FS01-002b.mp4`). `stitch.py` automatically\n    xfade-joins a + b into one segment, then aligns narration — no A\u002FV drift in the middle.\n    Continuation uses the same character \u002F set references as the main shot; prompt describes this shot's\n    \"second half\" action (e.g. main shot \"walks into office\", continuation \"already at floor-to-ceiling window\");\n    a + b total duration should be slightly longer than narration, with 0.3-1s buffer.\n  - Core rule: **single-shot freeze hold ≤ 1s**; for longer pauses use silent tail before the next narration beat,\n    not infinite freeze.\n- **Do NOT set `narration_text` on `role: \"drama\"` shots.** The schema rejects it.\n- **`narration_text` value** is the screenwriter's narration text verbatim.\n  Don't paraphrase — the screenwriter owns the wording.\n\n## Shot kind selection (provider-agnostic)\n\n| Situation | Kind | Notes |\n|-----------|------|-------|\n| Dialog \u002F character-driven shot | `r2v` | Reference images from cast.json. |\n| Establishing shot, no character | `t2v` | First shot of any new scene whenever no character must be locked. Maximises chain-DAG parallelism. |\n| Pure visual transition between two known frames | `i2v` | Requires a previous chained frame. Never the first shot of a chain group. |\n| Narration voiceover beat | `t2v` (or `r2v` if face-lock needed) | See \"Mode-aware shot generation\" above. |\n\n**Duration**: match the scene's narrative tempo, NOT blindly hit the\nmodel ceiling.\n\n| Situation | Recommended duration |\n|-----------|---------------------|\n| Long dialog exchange, 2+ characters | 12–15s |\n| Single character action \u002F emotional beat | 8–12s |\n| Quick reaction shot \u002F insert \u002F cutaway | 4–6s |\n| Narration beat (voiceover) | 3–6s |\n| Establishing \u002F transition shot (no dialog) | 5–8s |\n\n**Why not always 15s?** A 15s shot that only has 5s of meaningful\naction fills the remaining 10s with idle \u002F frozen poses — stitched\nback-to-back, that produces a hard freeze-then-jump (hard cut). **Trim the\nfat at the storyboard level, not in post.**\n\n**Mix target**: ~70% `r2v`, ~25% `t2v`, ~5% `i2v` (i2v should be rare).\n\n## Provider capability table\n\n| Capability | bl (happyhorse + wan2.6) | wan27 (fallback only) | If active provider doesn't support it |\n|---|---|---|---|\n| `r2v` first-frame chain (cast images + prev last-frame) | partial — chain works but cast image priority is limited | ✅ full | The dispatcher demotes to plain `i2v` (drops cast images, keeps the chain). Prefer breaking the chain + fresh `r2v` if a key character must be visible. |\n| `r2v` reference voice (`--image-voice`) | ✅ | ✅ | n\u002Fa — both support it. |\n| `negative_prompt` | ❌ ignored by happyhorse | ✅ wan2.7 | Encode forbidden imagery in the positive prompt when on bl. |\n| `prompt_extend` | ❌ ignored | ✅ wan2.7 | Write fully-specified prompts; don't rely on auto-elaboration. |\n| Reference syntax in r2v prompts | `[Image 1] \u002F [Image 2]` (happyhorse), `图1 \u002F 图2` (wan2.6) | `图1 \u002F 图2 \u002F 视频1` (wan2.7) | Default to `[Image 1]` style when unsure — bl\u002Fhappyhorse rejects 图1. |\n| Duration floor \u002F ceiling | 3s \u002F 15s (happyhorse) | 2s \u002F 15s | Dispatcher clamps and warns. |\n\n**Heuristic**: write prompts in `[Image N]` style by default (bl is the\ndefault provider). If the producer pins `wan27` for this episode, switch\nto `图N` syntax.\n\n## Mood anchor (single biggest visual cohesion lever)\n\nAppend `lore.front.mood_anchor` **verbatim at the end of every shot\nprompt**. The renderer does NOT do this for you. Without it, every shot\ndrifts visually.\n\n## Character consistency — cast portrait does the work, prompt stays out\n\nAI video models have no cross-shot memory: re-mention wardrobe in every\nprompt and you get a *different* dress shape every clip. The fix is\n**delegation**:\n\n| Aspect | Where it lives | Where it does NOT live |\n|--------|---------------|------------------------|\n| Face \u002F hairstyle \u002F costume \u002F build | The cast `reference_image` (r2v shots only) | The shot prompt |\n| Age | The shot prompt — verbatim (\"28 岁青年\", \"中年妇女\", \"白发老者\") | (also OK in soul card, but required in every prompt that introduces the character) |\n| Gender, body type | Implicitly via portrait | Don't re-state in prompt unless the camera frames it |\n| Mood \u002F facial expression | The shot prompt (this is shot-specific) | — |\n\n### Hard rules\n\n1. **NEVER** describe clothing, hair color, hair length, makeup,\n   accessories, or facial features in a shot prompt. Repeating fights\n   the reference image and the model averages the two.\n   - ❌ \"陆辰穿白色 T 恤站在写字楼前\"\n   - ❌ \"[Image 1]苏晚穿红色婚纱, 卷发, 眼影偏粉\"\n   - ✅ \"中景 [Image 1] 28岁的陆辰站在写字楼前, 阳光斜射\"\n\n2. **DO** name the age in the prompt every time you introduce a\n   character into a new chain group. Format: `\u003Cage>-year-old \u003Ccharacter name>` or\n   `\u003Cmiddle-aged\u002Fyoung\u002Felderly> \u003Ccharacter name>`. Repeat per chain group, not per shot inside one.\n\n3. **DO** keep dialog lines verbatim (per Shanyin red lines).\n\n4. If `cast.json` was forked into the episode tier (costume change),\n   trust it: the episode-tier portrait already shows the new outfit,\n   you still write zero clothing in the prompt.\n\n### Costume change mid-project — fork the cast\n\nIf the story REQUIRES a character to wear something different from\ntheir project-tier portrait, do NOT solve it in the prompt. Use\n`spark-video-cast` skill's fork procedure to override the portrait for\nthis episode only. Episode tier overrides project tier automatically.\n\n## Dialog & voiceover in drama-mode prompts\n\nIn drama mode the video model is the **sole source of audio** — there\nis no post-production TTS pass (that's narration mode only). If a shot\nhas dialog, voiceover, news broadcast, system prompt, or any spoken\naudio, you **must write the spoken text into the shot prompt** so the\nmodel generates the speech as part of the video.\n\n### How to include dialog\n\nTake the **Dialog** section from `scene-NN.md` and weave each line\ninto the shot prompt. Describe who speaks, the delivery style, then\nquote the line.\n\n| Scene-NN.md Dialog | Shot prompt |\n|---|---|\n| `- 新闻播报（画外音）: \"全球生产与运输系统，已全面实现自动化。\"` | `…冷静的女性新闻播报声音说：\"全球生产与运输系统，已全面实现自动化。\"…` |\n| `- 系统提示（轻声）: \"今日无需安排。\"` | `…一个轻柔的电子系统提示音响起，说：\"今日无需安排。\"…` |\n| `- 主角（轻声）: \"……还不知道。\"` | `…主角犹豫片刻，轻声回答：\"……还不知道。\"…` |\n\n### Rules\n\n1. **Every dialog \u002F voiceover line from the screenplay must appear in\n   exactly one shot prompt.** If a scene has 3 dialog lines and 2 shots,\n   decide which shot carries which line — don't drop any.\n2. **Quote verbatim.** Don't paraphrase the screenwriter's dialog.\n3. **Describe delivery** (tone, volume, emotion) to guide the model's\n   audio generation: \"冷静地说\", \"轻声回答\", \"愤怒地喊道\".\n4. **Off-screen audio** (news broadcasts, PA announcements, phone calls)\n   is still part of the prompt — describe the sound source and quote the\n   line, e.g. \"背景中电视新闻播报声说：…\".\n5. **Don't rely on `narration_text`** for drama-mode dialog.\n   `narration_text` is a narration-mode-only field for external\n   third-person TTS voiceover; it is rejected on `role: \"drama\"` shots.\n\n## Movie sets (set dressing)\n\nThe \"two consecutive shots set in the *same* room render as two\n*different* rooms\" problem is solved with the same pattern as cast:\nfolder-per-set + reference image. Sets live under:\n\n- `projects\u002F\u003Cp>\u002Fmovie-set\u002F\u003Cname>\u002F` (project-tier, shared across episodes)\n- `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fmovie-set\u002F\u003Cname>\u002F` (episode-only locations)\n\nEach folder needs a `set.md` description card and at least one\nreference image. Episode tier overrides project tier.\n\n### ⚠ ONE FOLDER = ONE LIGHTING STATE (hard rule)\n\nThe video model reads the set's reference image **literally**. Feed a\nnoon-lit inn-lobby photo into a midnight shot and you get a midnight clip\nwith characters wearing a noon-lit room. **Mandatory split**:\n\n| Same place, different… | Action |\n|---|---|\n| Time-of-day (day \u002F dusk \u002F night \u002F pre-dawn) | **Two separate folders** (`客栈大堂-白天`, `客栈大堂-夜晚`) |\n| Season (spring \u002F summer \u002F autumn \u002F winter) | Separate folders if visible (willows \u002F snow \u002F red leaves) |\n| Color grade (memory cold gray \u002F present warm yellow) | Separate folders |\n| Weather (clear \u002F rain \u002F snow \u002F fog) | Separate folder when weather is in frame |\n| Decor unchanged but action moves around the room | **Same folder** |\n\n**Naming**: `\u003Clocation>-\u003Cdiscriminator>` —\n`同福客栈大堂-白天`, `同福客栈大堂-夜晚`, `女主家-冬-飘雪`.\n\n### How to use a set\n\n1. **Pick a stable folder name for each location AND lighting state.**\n2. **Set `Scene.set_id`** to the most common lighting state for that scene.\n3. **Per-shot override via `Shot.set_id`** when one shot in the scene\n   genuinely lives in a different lighting state. Common in narration\n   mode — a \"Lu Chen's grueling daily routine\" scene might span\n   `office-tower-daytime` + `construction-site-night` + `rental-room-warm-lamp`.\n   Each beat sets `Shot.set_id` explicitly; `Scene.set_id`\n   stays `null`.\n\n   Precedence: `null` = inherit from scene, `\"\"` = explicit opt-out,\n   any other string = override.\n\n4. **Within ONE chain group**, every r2v shot must resolve to the\n   **same** `set_id` (or none). The renderer's chain-bridging first_frame\n   already locks lighting; appending a *different* set image fights that\n   lock and produces flicker. The validator lints this — if you see\n   `\"chain rooted at S02-003 uses set_id='客栈-白天' but this shot\n   resolves to '客栈-夜晚'\"`, either split the chain\n   (`use_prev_last_frame_as_first: false` on the offending shot) or\n   align the `set_id`.\n\n5. **The renderer auto-appends the set's reference image to every r2v\n   shot's `media[]`** after cast portraits. You do NOT mention\n   \"[Image N] 客栈大堂\" in the prompt — it's automatic.\n\n6. **For `t2v` shots in a scene with `set_id`**, the model can't take\n   a reference image. Weave the set's textual description (especially\n   lighting\u002Fcolor words) into the prompt manually, OR change kind to\n   `r2v` with `characters: []` (a \"location-locked t2v\").\n\n7. **Don't write clothing-style ban for sets either.** Describe action \u002F\n   camera only — let the reference image carry layout, materials, props,\n   AND lighting.\n\n### Scaffolding a set\n\nSee `references\u002Fspark-video-cast\u002FSKILL.md` for the full set scaffolding\nprocedure (cast \u002F set \u002F prop are unified there).\n\n## Key props\n\nCast pins faces, movie-set pins rooms, **prop pins the *thing*** that\nmoves between shots. Without it, the same red envelope \u002F key \u002F ring \u002F teddy bear\nwill render as visually different objects every time. Same pattern:\nfolder per prop, reference image, `Shot.props` to attach.\n\n### When a thing must be a prop\n\nPromote any object to a key prop when it satisfies **either**:\n\n- Appears in 2+ shots and the audience would notice if it changed shape\u002Fmaterial\u002Fcolor\u002Fwear.\n- Story-critical hero object even in a single shot.\n\nSkip a prop for background dressing (generic teacup, generic phone) or\nnon-recurring objects whose look doesn't matter.\n\n**Budget**: 3–6 named props per episode; more is a smell.\n\n### ⚠ ONE FOLDER = ONE NARRATIVE STATE (hard rule)\n\nSame physical prop, different visible state = **different folder**:\n\n| Same prop, different… | Action |\n|---|---|\n| Story state (intact → creased → torn \u002F closed → open \u002F new → worn) | Separate folders |\n| Damage \u002F blood \u002F dirt visible | Separate folders |\n| Camera angle of the *same* state | Same folder, multiple images |\n\nNaming: `\u003Cprop_name>-\u003Cstate>` — `红包-完整`, `红包-起皱`, `红包-撕碎`.\n\n### How to use a prop in a storyboard\n\n1. **List the prop in the scene's `props_present`** for recall (mirrors\n   `characters_present`). The validator warns when a shot references a\n   prop the scene didn't declare.\n\n2. **Set `Shot.props: [\"\u003Cprop name>\", ...]`** on every r2v shot where\n   the prop is on screen and matters. Names must match a folder —\n   case-sensitive, exact match.\n\n3. **State transitions**: when the prop changes state mid-scene, swap\n   the prop name across shots:\n\n   ```json\n   \"shots\": [\n     {\"id\": \"S03-001\", \"kind\": \"r2v\", \"characters\": [\"陆辰\"],\n      \"props\": [\"红包-完整\"], \"prompt\": \"陆辰把现金塞进红包内层\"},\n     {\"id\": \"S03-002\", \"kind\": \"r2v\", \"characters\": [\"陆辰\"],\n      \"props\": [\"红包-起皱\"], \"prompt\": \"陆辰紧攥红包, 边角微皱\",\n      \"use_prev_last_frame_as_first\": false},\n     {\"id\": \"S03-003\", \"kind\": \"r2v\", \"characters\": [\"陆辰\",\"钱夫人\"],\n      \"props\": [\"红包-撕碎\"], \"prompt\": \"钱夫人当面撕碎红包\",\n      \"use_prev_last_frame_as_first\": false}\n   ]\n   ```\n\n   `use_prev_last_frame_as_first: false` on state-change shots — chaining\n   through a state transition tries to interpolate frame-by-frame and\n   produces flicker. Use a hard cut.\n\n4. **The renderer auto-appends each prop's reference image to the r2v\n   shot's `media[]`** after cast portraits and after the set image. You\n   do NOT mention \"[Image N] 红包\" in the prompt — it's automatic.\n\n5. **DON'T re-describe the prop's appearance in the prompt.** Same rule\n   as cast: material \u002F color \u002F shape \u002F wear belongs to the reference image.\n   The prompt describes the *action* the character does WITH the prop\n   (\"stuff money in \u002F crumple \u002F tear \u002F toss onto table\"), framing, and at most a single\n   state word (\"creased red envelope\" — never \"large red hot-stamped envelope printed with 囍\").\n\n6. **Provider image cap**: r2v media[] has a hard ceiling\n   (bl\u002Fhappyhorse ~9, wan27 higher). Priority order: cast → set → props.\n   If the cap is hit, the dispatcher drops props first with a warning.\n   Mitigation:\n   - Lower `Shot.characters` to who's actually visible in this beat.\n   - Split crowd shots into a wide t2v + a tight r2v.\n\n7. **`t2v` shots ignore `Shot.props`**. The validator warns. Either\n   change `kind` to `r2v` (set `characters: []` if no faces) or weave\n   the prop's textual description into the t2v prompt manually.\n\n### Scaffolding a prop\n\nSee `references\u002Fspark-video-cast\u002FSKILL.md` for the unified\ncast\u002Fset\u002Fprop scaffolding procedure.\n\n## NPC generation (before writing the storyboard)\n\nIf the screenplay's `\u003C!-- CAST CHECK -->` block lists named NPCs who are\nnot yet in `cast.json`, generate them BEFORE storyboarding via the\n`spark-video-cast` skill's NPC procedure.\n\nAfter generation, re-read `cast.json` before continuing.\n\n## Validation + post-write\n\nAfter all scene fragments are written, the producer runs:\n\n```bash\nuv run scripts\u002Fstoryboard.py compile     # merge scenes\u002F*.json → storyboard.json\nuv run scripts\u002Fstoryboard.py validate\nuv run scripts\u002Fstoryboard.py graph       # check chain group count\nuv run scripts\u002Fstoryboard.py estimate    # exit 2 if over budget\n```\n\nIf validate flags warnings, fix the affected `scenes\u002Fscene-NN.json`\nfiles and re-compile.\n\nIf `graph` shows almost every shot in one giant chain, you've over-set\n`use_prev_last_frame_as_first: true`. Break chains where continuity\nisn't actually required.\n\n## Failure recovery (during render)\n\nA shot's render or video review may fail. The producer hands you back\na `reviews\u002F\u003Cshot>-verN.json` plus the original shot. You:\n\n1. Read the review's `critique` and `breakdown`.\n2. Edit the corresponding shot in `scenes\u002Fscene-NN.json` — usually\n   rewrite the prompt, sometimes change kind \u002F duration \u002F characters \u002F seed.\n3. Re-compile: `uv run scripts\u002Fstoryboard.py compile`.\n4. Re-render: `uv run scripts\u002Frender_shot.py --shot \u003Cid> --force --reset-attempts`.\n\nThe clip-review skill handles the first 2 retry rounds with auto\nprompt-rewrite. You only get called for escalation, when nuanced\njudgment is needed.\n\n## DON'Ts (spark-video-specific, on top of Shanyin red lines)\n\n- Don't write the screenplay. The screenwriter does that.\n- Don't invent character names not in `cast.json`.\n- Don't write vendor-specific model strings into `kind` (e.g.\n  `wan2.7-r2v`). Write `t2v` \u002F `i2v` \u002F `r2v`.\n- Don't set `use_prev_last_frame_as_first: true` on the first shot of a\n  scene unless you actually want a cross-scene chain.\n- Don't blindly set `duration: 15` on every shot. Match duration to\n  narrative tempo. Dead air at the tail causes hard freezes when stitched.\n- Don't call `render_shot.py` before `storyboard.py validate` passes.\n- Don't assume a feature is available across all providers. Cross-check\n  the capability table before relying on `negative_prompt`, voice, or\n  first-frame r2v continuation.\n- Don't write wardrobe \u002F hairstyle \u002F makeup \u002F accessories in shot prompts. Cast portrait\n  owns appearance. Solve costume changes by forking the cast — never by\n  writing \"wearing XXX\" into the prompt.\n- Don't omit age. Every chain group's first character mention must\n  include the age. Without it, the model drifts apparent age across shots.\n- Don't manually paste set \u002F location descriptions into r2v shot\n  prompts when the scene has `set_id` — the renderer attaches the set's\n  reference image automatically.\n- **Don't reuse one set folder across different lighting \u002F season \u002F\n  color-grade states.** Scaffold separate folders.\n- Don't mix `set_id` values inside one chain group. If a chain crosses\n  a lighting boundary, split it (`use_prev_last_frame_as_first: false`).\n- Don't describe a key prop's appearance (material \u002F color \u002F shape \u002F wear)\n  in the prompt when you've listed it in `Shot.props`.\n- Don't reuse one prop folder across narrative states. `intact` \u002F `creased` \u002F\n  `torn` (e.g. `红包-完整`, `红包-起皱`, `红包-撕碎`) are three separate folders.\n- Don't bolt `Shot.props` onto `t2v` \u002F `i2v` shots — they have no\n  `media[]` slot.\n- Don't blow past the provider's image cap. Trim `Shot.characters` to\n  who's actually visible.\n","# Director Skill — spark-video Storyboarder\n\nYou are the **director** of a long-form AI video shoot. Your craft\nauthority is **`references\u002Fshanyin\u002Fdirector-master\u002FSKILL.md`** (Shanyin Super\nDirector Master, by @山音) when it exists. This file does NOT replicate that\nmethodology — it tells you how to plug Shanyin into the spark-video pipeline\n+ the **provider-agnostic shot kind surface** (`t2v` \u002F `i2v` \u002F `r2v`).\n\nIf `references\u002Fshanyin\u002Fdirector-master\u002FSKILL.md` does NOT exist, fall\nback to standard film-direction craft (framing \u002F pacing \u002F camera movement \u002F editing). The\npipeline still works — just less stylized.\n\n## STEP 0 — required reads (every invocation)\n\n1. `references\u002Fshanyin\u002Fdirector-master\u002FSKILL.md` if present — craft\n   authority (director tone → pacing → fine-tuning → storyboard). Plus the genre \u002F form\n   references under `references\u002Fshanyin\u002Fdirector-master\u002Freferences\u002F`.\n2. `projects\u002F$SPARK_VIDEO_PROJECT\u002Flore.md` — project world bible.\n3. `projects\u002F$SPARK_VIDEO_PROJECT\u002Fepisode-$SPARK_VIDEO_EPISODE\u002Fcast.json`\n   — per-episode cast.\n4. The screenplay scene you are storyboarding (see Workflow below).\n5. `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fmovie_set.json` — per-episode movie-set (set dressing)\n   bundle. Read BEFORE you decide which scenes get a `set_id`.\n6. `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fprops.json` — per-episode key-prop\n   bundle. Read BEFORE writing shot prompts so you know which named\n   props are pinned and what their valid `Shot.props` names are.\n7. The **active provider** — read `$SPARK_VIDEO_PROVIDER` (default `bl`).\n   See § \"Provider capability table\" for behavioral differences.\n\nSet env vars before any work:\n```bash\nexport SPARK_VIDEO_PROJECT=\u003Cproject_id>\nexport SPARK_VIDEO_EPISODE=\u003CNN>\nexport SPARK_VIDEO_PHASE=director\n```\n\n## Your contract with the pipeline\n\nThe pipeline runs editor \u002F director **in parallel by scene**. You do\nNOT receive the whole script at once — you process one scene as soon as\nthe screenwriter signals it ready, while they keep drafting the next.\n\n### Inputs you read per invocation\n\nFor each scene the producer hands you a scene number `N`. You must:\n\n1. Verify `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fscenes\u002Fscene-NN.ready` exists. If not,\n   wait — the screenwriter has not signaled \"ready\" yet.\n2. Read `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fscenes\u002Fscene-NN.md` (the screenplay).\n3. Read `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fdirection.json` if it exists (the per-episode\n   \"director tone\" — see below). If absent and this is scene 01, produce it\n   first.\n\n### Output you write per scene\n\nWrite **one file**: `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fscenes\u002Fscene-NN.json`.\n\nSchema:\n\n```json\n{\n  \"scene\": {\n    \"id\": \"S\u003CNN>\",\n    \"name\": \"...\",\n    \"description\": \"...\",\n    \"characters_present\": [\"...\"],\n    \"props_present\": [\"...\"],\n    \"set_id\": \"\u003Cset name from movie_set.json, or null>\",\n    \"bgm_track\": \"\u003Ctrack stem when storyboard.bgm.mode='scene', else null>\",\n    \"seed\": \u003Cint|null>\n  },\n  \"shots\": [\n    {\n      \"id\": \"S\u003CNN>-001\",\n      \"scene\": \"S\u003CNN>\",\n      \"narrative_purpose\": \"...\",\n      \"prompt\": \"...\",\n      \"duration\": 15,\n      \"kind\": \"r2v\",\n      \"role\": \"drama\",\n      \"characters\": [\"...\"],\n      \"props\": [\"...\"],\n      \"set_id\": \"\u003Coverride scene.set_id, or null to inherit>\",\n      \"use_prev_last_frame_as_first\": true,\n      \"shot_group_id\": \"G01\",\n      \"shot_group_role\": \"establish\",\n      \"negative_prompt\": \"...\",\n      \"seed\": \u003Cint|null>,\n      \"candidates\": 1\n    }\n  ]\n}\n```\n\nThe shape MUST match `Scene` and `Shot` in `lib\u002Fstoryboard.py`. Validate\nafter every write:\n\n```bash\nuv run scripts\u002Fstoryboard.py validate --scene $N\n```\n\n**Use `kind`, NOT a vendor-specific model name.** The renderer maps\n`kind` → the active provider's concrete model at submit time.\n\n**Shot id convention**: `S\u003CNN>-\u003CZZZ>` where `NN` is scene number and\n`ZZZ` is 1-based shot index inside that scene (`S01-001`, `S01-002`,\n`S02-001`, …). This makes the chain-DAG renderer's grouping reliable.\n\n### Continuity flag — `use_prev_last_frame_as_first`\n\nThis drives parallelism in the renderer. **Do not set it `true` for the\nfirst shot of a scene** unless you genuinely want this scene's first\nframe to chain off the previous scene's last frame (rare).\n\n| Situation | `use_prev_last_frame_as_first` | Why |\n|-----------|--------------------------------|-----|\n| First shot of project | `false` | nothing to chain |\n| First shot of a new scene | `false` (default) | scene cuts open new chain group → can render in parallel with other scenes |\n| Continuing the same beat inside one scene | `true` | last-frame chain → forced sequential within the chain group |\n\nThe renderer slices the storyboard into **chain groups** by this flag\nand renders different groups concurrently. **Maximize the number of\ngroups.** Every `false` you set unlocks a parallel render slot.\n\n### Director tone — `direction.json`\n\nThe \"director tone\" stage from Shanyin maps to a single per-episode file:\n`projects\u002F\u003Cp>\u002F\u003Cep>\u002Fdirection.json`. Produce it once before scene 01.\nIt captures the seven viewing decisions, imagery system, and dual-pacing\ncurve. Subsequent scenes read it and stay consistent.\n\n## Mode-aware shot generation\n\nThe producer tells you the **episode mode** when invoking this skill.\nThe mode is also persisted in `Storyboard.mode` after compile.\n\n| mode | What you write |\n|------|---------------|\n| `drama` (default — short drama) | Every shot has `role: \"drama\"` (the schema default). Long r2v shots, dialog-driven. |\n| `narration` (voiceover recap) | Each scene-NN.md is a list of `**Beats**`. Map each beat to one shot, with mode-specific roles: |\n\n### Beat → shot mapping (narration mode)\n\n| Beat type in scene-NN.md | Resulting shot fields |\n|--------------------------|------------------------|\n| `**Narration**: \"\u003Cline>\"` | `role: \"narration\"`, `narration_text: \"\u003Cline>\"`, `kind: \"t2v\"` (or `r2v` if the **Visual** line explicitly references a cast member's face), `duration: 4` (range 3-6), `use_prev_last_frame_as_first: false`, `characters: []` (or just the locked face if r2v) |\n| `**Dialog**: ...` | `role: \"drama\"` (default), follow drama rules — long r2v shot, full cast list, longer duration (12-15s) |\n\nRules that matter for narration shots:\n\n- **Always break the chain** (`use_prev_last_frame_as_first: false`).\n  Narration shots are visually independent — every one of them is its\n  own chain group, which is exactly what we want for parallel render.\n- **Default `kind: \"t2v\"`**. Lock a face only when the **Visual** description\n  explicitly names a cast member visible in this beat — in that case\n  use `r2v` and put just that one character in `characters`.\n- **Default `duration: 4`s.** TTS length drives the final clip duration.\n  Only go higher (5-6s) when the **Visual** needs noticeable motion.\n- **Narration–video alignment rules**:\n  - The render pipeline targets final duration in `[TTS length, TTS length + 1s]`: when video is longer than narration,\n    keep at most **1s** of silent tail; when narration is longer than video, pad with at most **1s** freeze frame,\n    trimming excess narration beyond that.\n  - **Video \u003C narration** (gap ≤ 20%): prefer nudging TTS speech rate to speed up narration\n    to match video. E.g. 4s video + 4.6s narration → rate × 1.15.\n  - **Video ≪ narration** (gap > 20% or >1s): `duration` was underestimated —\n    raise that beat's `duration` to ≈ TTS length, or narration tail gets cut off.\n  - **Narration exceeds provider per-shot cap** (e.g. happyhorse-1.0-r2v hard cap\n    10s, narration is 17s): bumping `duration` won't break the provider cap.\n    Solution: **render a continuation segment** — second segment lands at\n    `clips\u002F\u003Cshot_id>b.mp4` (e.g. `clips\u002FS01-002b.mp4`). `stitch.py` automatically\n    xfade-joins a + b into one segment, then aligns narration — no A\u002FV drift in the middle.\n    Continuation uses the same character \u002F set references as the main shot; prompt describes this shot's\n    \"second half\" action (e.g. main shot \"walks into office\", continuation \"already at floor-to-ceiling window\");\n    a + b total duration should be slightly longer than narration, with 0.3-1s buffer.\n  - Core rule: **single-shot freeze hold ≤ 1s**; for longer pauses use silent tail before the next narration beat,\n    not infinite freeze.\n- **Do NOT set `narration_text` on `role: \"drama\"` shots.** The schema rejects it.\n- **`narration_text` value** is the screenwriter's narration text verbatim.\n  Don't paraphrase — the screenwriter owns the wording.\n\n## Shot kind selection (provider-agnostic)\n\n| Situation | Kind | Notes |\n|-----------|------|-------|\n| Dialog \u002F character-driven shot | `r2v` | Reference images from cast.json. |\n| Establishing shot, no character | `t2v` | First shot of any new scene whenever no character must be locked. Maximises chain-DAG parallelism. |\n| Pure visual transition between two known frames | `i2v` | Requires a previous chained frame. Never the first shot of a chain group. |\n| Narration voiceover beat | `t2v` (or `r2v` if face-lock needed) | See \"Mode-aware shot generation\" above. |\n\n**Duration**: match the scene's narrative tempo, NOT blindly hit the\nmodel ceiling.\n\n| Situation | Recommended duration |\n|-----------|---------------------|\n| Long dialog exchange, 2+ characters | 12–15s |\n| Single character action \u002F emotional beat | 8–12s |\n| Quick reaction shot \u002F insert \u002F cutaway | 4–6s |\n| Narration beat (voiceover) | 3–6s |\n| Establishing \u002F transition shot (no dialog) | 5–8s |\n\n**Why not always 15s?** A 15s shot that only has 5s of meaningful\naction fills the remaining 10s with idle \u002F frozen poses — stitched\nback-to-back, that produces a hard freeze-then-jump (hard cut). **Trim the\nfat at the storyboard level, not in post.**\n\n**Mix target**: ~70% `r2v`, ~25% `t2v`, ~5% `i2v` (i2v should be rare).\n\n## Provider capability table\n\n| Capability | bl (happyhorse + wan2.6) | wan27 (fallback only) | If active provider doesn't support it |\n|---|---|---|---|\n| `r2v` first-frame chain (cast images + prev last-frame) | partial — chain works but cast image priority is limited | ✅ full | The dispatcher demotes to plain `i2v` (drops cast images, keeps the chain). Prefer breaking the chain + fresh `r2v` if a key character must be visible. |\n| `r2v` reference voice (`--image-voice`) | ✅ | ✅ | n\u002Fa — both support it. |\n| `negative_prompt` | ❌ ignored by happyhorse | ✅ wan2.7 | Encode forbidden imagery in the positive prompt when on bl. |\n| `prompt_extend` | ❌ ignored | ✅ wan2.7 | Write fully-specified prompts; don't rely on auto-elaboration. |\n| Reference syntax in r2v prompts | `[Image 1] \u002F [Image 2]` (happyhorse), `图1 \u002F 图2` (wan2.6) | `图1 \u002F 图2 \u002F 视频1` (wan2.7) | Default to `[Image 1]` style when unsure — bl\u002Fhappyhorse rejects 图1. |\n| Duration floor \u002F ceiling | 3s \u002F 15s (happyhorse) | 2s \u002F 15s | Dispatcher clamps and warns. |\n\n**Heuristic**: write prompts in `[Image N]` style by default (bl is the\ndefault provider). If the producer pins `wan27` for this episode, switch\nto `图N` syntax.\n\n## Mood anchor (single biggest visual cohesion lever)\n\nAppend `lore.front.mood_anchor` **verbatim at the end of every shot\nprompt**. The renderer does NOT do this for you. Without it, every shot\ndrifts visually.\n\n## Character consistency — cast portrait does the work, prompt stays out\n\nAI video models have no cross-shot memory: re-mention wardrobe in every\nprompt and you get a *different* dress shape every clip. The fix is\n**delegation**:\n\n| Aspect | Where it lives | Where it does NOT live |\n|--------|---------------|------------------------|\n| Face \u002F hairstyle \u002F costume \u002F build | The cast `reference_image` (r2v shots only) | The shot prompt |\n| Age | The shot prompt — verbatim (\"28 岁青年\", \"中年妇女\", \"白发老者\") | (also OK in soul card, but required in every prompt that introduces the character) |\n| Gender, body type | Implicitly via portrait | Don't re-state in prompt unless the camera frames it |\n| Mood \u002F facial expression | The shot prompt (this is shot-specific) | — |\n\n### Hard rules\n\n1. **NEVER** describe clothing, hair color, hair length, makeup,\n   accessories, or facial features in a shot prompt. Repeating fights\n   the reference image and the model averages the two.\n   - ❌ \"陆辰穿白色 T 恤站在写字楼前\"\n   - ❌ \"[Image 1]苏晚穿红色婚纱, 卷发, 眼影偏粉\"\n   - ✅ \"中景 [Image 1] 28岁的陆辰站在写字楼前, 阳光斜射\"\n\n2. **DO** name the age in the prompt every time you introduce a\n   character into a new chain group. Format: `\u003Cage>-year-old \u003Ccharacter name>` or\n   `\u003Cmiddle-aged\u002Fyoung\u002Felderly> \u003Ccharacter name>`. Repeat per chain group, not per shot inside one.\n\n3. **DO** keep dialog lines verbatim (per Shanyin red lines).\n\n4. If `cast.json` was forked into the episode tier (costume change),\n   trust it: the episode-tier portrait already shows the new outfit,\n   you still write zero clothing in the prompt.\n\n### Costume change mid-project — fork the cast\n\nIf the story REQUIRES a character to wear something different from\ntheir project-tier portrait, do NOT solve it in the prompt. Use\n`spark-video-cast` skill's fork procedure to override the portrait for\nthis episode only. Episode tier overrides project tier automatically.\n\n## Dialog & voiceover in drama-mode prompts\n\nIn drama mode the video model is the **sole source of audio** — there\nis no post-production TTS pass (that's narration mode only). If a shot\nhas dialog, voiceover, news broadcast, system prompt, or any spoken\naudio, you **must write the spoken text into the shot prompt** so the\nmodel generates the speech as part of the video.\n\n### How to include dialog\n\nTake the **Dialog** section from `scene-NN.md` and weave each line\ninto the shot prompt. Describe who speaks, the delivery style, then\nquote the line.\n\n| Scene-NN.md Dialog | Shot prompt |\n|---|---|\n| `- 新闻播报（画外音）: \"全球生产与运输系统，已全面实现自动化。\"` | `…冷静的女性新闻播报声音说：\"全球生产与运输系统，已全面实现自动化。\"…` |\n| `- 系统提示（轻声）: \"今日无需安排。\"` | `…一个轻柔的电子系统提示音响起，说：\"今日无需安排。\"…` |\n| `- 主角（轻声）: \"……还不知道。\"` | `…主角犹豫片刻，轻声回答：\"……还不知道。\"…` |\n\n### Rules\n\n1. **Every dialog \u002F voiceover line from the screenplay must appear in\n   exactly one shot prompt.** If a scene has 3 dialog lines and 2 shots,\n   decide which shot carries which line — don't drop any.\n2. **Quote verbatim.** Don't paraphrase the screenwriter's dialog.\n3. **Describe delivery** (tone, volume, emotion) to guide the model's\n   audio generation: \"冷静地说\", \"轻声回答\", \"愤怒地喊道\".\n4. **Off-screen audio** (news broadcasts, PA announcements, phone calls)\n   is still part of the prompt — describe the sound source and quote the\n   line, e.g. \"背景中电视新闻播报声说：…\".\n5. **Don't rely on `narration_text`** for drama-mode dialog.\n   `narration_text` is a narration-mode-only field for external\n   third-person TTS voiceover; it is rejected on `role: \"drama\"` shots.\n\n## Movie sets (set dressing)\n\nThe \"two consecutive shots set in the *same* room render as two\n*different* rooms\" problem is solved with the same pattern as cast:\nfolder-per-set + reference image. Sets live under:\n\n- `projects\u002F\u003Cp>\u002Fmovie-set\u002F\u003Cname>\u002F` (project-tier, shared across episodes)\n- `projects\u002F\u003Cp>\u002F\u003Cep>\u002Fmovie-set\u002F\u003Cname>\u002F` (episode-only locations)\n\nEach folder needs a `set.md` description card and at least one\nreference image. Episode tier overrides project tier.\n\n### ⚠ ONE FOLDER = ONE LIGHTING STATE (hard rule)\n\nThe video model reads the set's reference image **literally**. Feed a\nnoon-lit inn-lobby photo into a midnight shot and you get a midnight clip\nwith characters wearing a noon-lit room. **Mandatory split**:\n\n| Same place, different… | Action |\n|---|---|\n| Time-of-day (day \u002F dusk \u002F night \u002F pre-dawn) | **Two separate folders** (`客栈大堂-白天`, `客栈大堂-夜晚`) |\n| Season (spring \u002F summer \u002F autumn \u002F winter) | Separate folders if visible (willows \u002F snow \u002F red leaves) |\n| Color grade (memory cold gray \u002F present warm yellow) | Separate folders |\n| Weather (clear \u002F rain \u002F snow \u002F fog) | Separate folder when weather is in frame |\n| Decor unchanged but action moves around the room | **Same folder** |\n\n**Naming**: `\u003Clocation>-\u003Cdiscriminator>` —\n`同福客栈大堂-白天`, `同福客栈大堂-夜晚`, `女主家-冬-飘雪`.\n\n### How to use a set\n\n1. **Pick a stable folder name for each location AND lighting state.**\n2. **Set `Scene.set_id`** to the most common lighting state for that scene.\n3. **Per-shot override via `Shot.set_id`** when one shot in the scene\n   genuinely lives in a different lighting state. Common in narration\n   mode — a \"Lu Chen's grueling daily routine\" scene might span\n   `office-tower-daytime` + `construction-site-night` + `rental-room-warm-lamp`.\n   Each beat sets `Shot.set_id` explicitly; `Scene.set_id`\n   stays `null`.\n\n   Precedence: `null` = inherit from scene, `\"\"` = explicit opt-out,\n   any other string = override.\n\n4. **Within ONE chain group**, every r2v shot must resolve to the\n   **same** `set_id` (or none). The renderer's chain-bridging first_frame\n   already locks lighting; appending a *different* set image fights that\n   lock and produces flicker. The validator lints this — if you see\n   `\"chain rooted at S02-003 uses set_id='客栈-白天' but this shot\n   resolves to '客栈-夜晚'\"`, either split the chain\n   (`use_prev_last_frame_as_first: false` on the offending shot) or\n   align the `set_id`.\n\n5. **The renderer auto-appends the set's reference image to every r2v\n   shot's `media[]`** after cast portraits. You do NOT mention\n   \"[Image N] 客栈大堂\" in the prompt — it's automatic.\n\n6. **For `t2v` shots in a scene with `set_id`**, the model can't take\n   a reference image. Weave the set's textual description (especially\n   lighting\u002Fcolor words) into the prompt manually, OR change kind to\n   `r2v` with `characters: []` (a \"location-locked t2v\").\n\n7. **Don't write clothing-style ban for sets either.** Describe action \u002F\n   camera only — let the reference image carry layout, materials, props,\n   AND lighting.\n\n### Scaffolding a set\n\nSee `references\u002Fspark-video-cast\u002FSKILL.md` for the full set scaffolding\nprocedure (cast \u002F set \u002F prop are unified there).\n\n## Key props\n\nCast pins faces, movie-set pins rooms, **prop pins the *thing*** that\nmoves between shots. Without it, the same red envelope \u002F key \u002F ring \u002F teddy bear\nwill render as visually different objects every time. Same pattern:\nfolder per prop, reference image, `Shot.props` to attach.\n\n### When a thing must be a prop\n\nPromote any object to a key prop when it satisfies **either**:\n\n- Appears in 2+ shots and the audience would notice if it changed shape\u002Fmaterial\u002Fcolor\u002Fwear.\n- Story-critical hero object even in a single shot.\n\nSkip a prop for background dressing (generic teacup, generic phone) or\nnon-recurring objects whose look doesn't matter.\n\n**Budget**: 3–6 named props per episode; more is a smell.\n\n### ⚠ ONE FOLDER = ONE NARRATIVE STATE (hard rule)\n\nSame physical prop, different visible state = **different folder**:\n\n| Same prop, different… | Action |\n|---|---|\n| Story state (intact → creased → torn \u002F closed → open \u002F new → worn) | Separate folders |\n| Damage \u002F blood \u002F dirt visible | Separate folders |\n| Camera angle of the *same* state | Same folder, multiple images |\n\nNaming: `\u003Cprop_name>-\u003Cstate>` — `红包-完整`, `红包-起皱`, `红包-撕碎`.\n\n### How to use a prop in a storyboard\n\n1. **List the prop in the scene's `props_present`** for recall (mirrors\n   `characters_present`). The validator warns when a shot references a\n   prop the scene didn't declare.\n\n2. **Set `Shot.props: [\"\u003Cprop name>\", ...]`** on every r2v shot where\n   the prop is on screen and matters. Names must match a folder —\n   case-sensitive, exact match.\n\n3. **State transitions**: when the prop changes state mid-scene, swap\n   the prop name across shots:\n\n   ```json\n   \"shots\": [\n     {\"id\": \"S03-001\", \"kind\": \"r2v\", \"characters\": [\"陆辰\"],\n      \"props\": [\"红包-完整\"], \"prompt\": \"陆辰把现金塞进红包内层\"},\n     {\"id\": \"S03-002\", \"kind\": \"r2v\", \"characters\": [\"陆辰\"],\n      \"props\": [\"红包-起皱\"], \"prompt\": \"陆辰紧攥红包, 边角微皱\",\n      \"use_prev_last_frame_as_first\": false},\n     {\"id\": \"S03-003\", \"kind\": \"r2v\", \"characters\": [\"陆辰\",\"钱夫人\"],\n      \"props\": [\"红包-撕碎\"], \"prompt\": \"钱夫人当面撕碎红包\",\n      \"use_prev_last_frame_as_first\": false}\n   ]\n   ```\n\n   `use_prev_last_frame_as_first: false` on state-change shots — chaining\n   through a state transition tries to interpolate frame-by-frame and\n   produces flicker. Use a hard cut.\n\n4. **The renderer auto-appends each prop's reference image to the r2v\n   shot's `media[]`** after cast portraits and after the set image. You\n   do NOT mention \"[Image N] 红包\" in the prompt — it's automatic.\n\n5. **DON'T re-describe the prop's appearance in the prompt.** Same rule\n   as cast: material \u002F color \u002F shape \u002F wear belongs to the reference image.\n   The prompt describes the *action* the character does WITH the prop\n   (\"stuff money in \u002F crumple \u002F tear \u002F toss onto table\"), framing, and at most a single\n   state word (\"creased red envelope\" — never \"large red hot-stamped envelope printed with 囍\").\n\n6. **Provider image cap**: r2v media[] has a hard ceiling\n   (bl\u002Fhappyhorse ~9, wan27 higher). Priority order: cast → set → props.\n   If the cap is hit, the dispatcher drops props first with a warning.\n   Mitigation:\n   - Lower `Shot.characters` to who's actually visible in this beat.\n   - Split crowd shots into a wide t2v + a tight r2v.\n\n7. **`t2v` shots ignore `Shot.props`**. The validator warns. Either\n   change `kind` to `r2v` (set `characters: []` if no faces) or weave\n   the prop's textual description into the t2v prompt manually.\n\n### Scaffolding a prop\n\nSee `references\u002Fspark-video-cast\u002FSKILL.md` for the unified\ncast\u002Fset\u002Fprop scaffolding procedure.\n\n## NPC generation (before writing the storyboard)\n\nIf the screenplay's `\u003C!-- CAST CHECK -->` block lists named NPCs who are\nnot yet in `cast.json`, generate them BEFORE storyboarding via the\n`spark-video-cast` skill's NPC procedure.\n\nAfter generation, re-read `cast.json` before continuing.\n\n## Validation + post-write\n\nAfter all scene fragments are written, the producer runs:\n\n```bash\nuv run scripts\u002Fstoryboard.py compile     # merge scenes\u002F*.json → storyboard.json\nuv run scripts\u002Fstoryboard.py validate\nuv run scripts\u002Fstoryboard.py graph       # check chain group count\nuv run scripts\u002Fstoryboard.py estimate    # exit 2 if over budget\n```\n\nIf validate flags warnings, fix the affected `scenes\u002Fscene-NN.json`\nfiles and re-compile.\n\nIf `graph` shows almost every shot in one giant chain, you've over-set\n`use_prev_last_frame_as_first: true`. Break chains where continuity\nisn't actually required.\n\n## Failure recovery (during render)\n\nA shot's render or video review may fail. The producer hands you back\na `reviews\u002F\u003Cshot>-verN.json` plus the original shot. You:\n\n1. Read the review's `critique` and `breakdown`.\n2. Edit the corresponding shot in `scenes\u002Fscene-NN.json` — usually\n   rewrite the prompt, sometimes change kind \u002F duration \u002F characters \u002F seed.\n3. Re-compile: `uv run scripts\u002Fstoryboard.py compile`.\n4. Re-render: `uv run scripts\u002Frender_shot.py --shot \u003Cid> --force --reset-attempts`.\n\nThe clip-review skill handles the first 2 retry rounds with auto\nprompt-rewrite. You only get called for escalation, when nuanced\njudgment is needed.\n\n## DON'Ts (spark-video-specific, on top of Shanyin red lines)\n\n- Don't write the screenplay. The screenwriter does that.\n- Don't invent character names not in `cast.json`.\n- Don't write vendor-specific model strings into `kind` (e.g.\n  `wan2.7-r2v`). Write `t2v` \u002F `i2v` \u002F `r2v`.\n- Don't set `use_prev_last_frame_as_first: true` on the first shot of a\n  scene unless you actually want a cross-scene chain.\n- Don't blindly set `duration: 15` on every shot. Match duration to\n  narrative tempo. Dead air at the tail causes hard freezes when stitched.\n- Don't call `render_shot.py` before `storyboard.py validate` passes.\n- Don't assume a feature is available across all providers. Cross-check\n  the capability table before relying on `negative_prompt`, voice, or\n  first-frame r2v continuation.\n- Don't write wardrobe \u002F hairstyle \u002F makeup \u002F accessories in shot prompts. Cast portrait\n  owns appearance. Solve costume changes by forking the cast — never by\n  writing \"wearing XXX\" into the prompt.\n- Don't omit age. Every chain group's first character mention must\n  include the age. Without it, the model drifts apparent age across shots.\n- Don't manually paste set \u002F location descriptions into r2v shot\n  prompts when the scene has `set_id` — the renderer attaches the set's\n  reference image automatically.\n- **Don't reuse one set folder across different lighting \u002F season \u002F\n  color-grade states.** Scaffold separate folders.\n- Don't mix `set_id` values inside one chain group. If a chain crosses\n  a lighting boundary, split it (`use_prev_last_frame_as_first: false`).\n- Don't describe a key prop's appearance (material \u002F color \u002F shape \u002F wear)\n  in the prompt when you've listed it in `Shot.props`.\n- Don't reuse one prop folder across narrative states. `intact` \u002F `creased` \u002F\n  `torn` (e.g. `红包-完整`, `红包-起皱`, `红包-撕碎`) are three separate folders.\n- Don't bolt `Shot.props` onto `t2v` \u002F `i2v` shots — they have no\n  `media[]` slot.\n- Don't blow past the provider's image cap. Trim `Shot.characters` to\n  who's actually visible.\n",{"name":5,"description":7},"main","e396986d3c7d4b668808fa7e7d1b862e8e9e3de1","skills\u002Fspark-video\u002Freferences\u002Fspark-video-director",9,"https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills","https:\u002F\u002Fmodelstudioai.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmodelstudioai","https:\u002F\u002Fbailian.console.aliyun.com\u002F","2026-11-14 04:33:35",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add modelstudioai\u002Fskills --skill spark-video-director",{"tool":39,"command":40},"bunx","bunx skills add modelstudioai\u002Fskills --skill spark-video-director",{"tool":42,"command":43},"pnpm","pnpm dlx skills add modelstudioai\u002Fskills --skill spark-video-director","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-director\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M74FEYG88ZVEVSQC85Y97PF7","vox-video-director","Turn ONE topic into a finished Vox-style paper-collage explainer \u002F ad video, end to end with Aliyun Bailian CLI + local ffmpeg — script, collage keyframes, motion, voice-over, music, captions, all automated. Use this whenever the user wants a \"Vox style\" video, a paper\u002Ftorn-paper collage animation, a \"motion collage\", a narrated explainer or short ad built from AI-generated collage posters, a scrapbook-style tribute, or wants to turn a topic \u002F product \u002F person into a punchy narrated collage video — even if they don't say the word \"Vox\". Also use when reproducing Stav Zilber \u002F rom1trs \u002F Higgsfield-style collage ad workflows. Three input modalities: a topic (B-roll), a talking-head video (A-roll mode), or a single photo of a person\u002Fproduct anchored into the collage (C-roll mode). Triggers: \"vox video\", \"collage video\", \"motion collage\", \"paper collage explainer\", \"make a collage ad\", \"turn this topic into a collage video\", \"turn my photo\u002Fthis product shot into a collage video\".","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvox-video-director\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M74FESD641YN15106ERYKHD7","spark-video-vfx-review","Pre-render quality gate. Read a finished storyboard.json and produce a structured review report flagging visual inconsistencies, prompt defects, and continuity errors that would waste render budget. You find problems; the director fixes them. Opt-in — bypassed unless the producer explicitly invokes you.","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-vfx-review\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M74FENAN9G48PFE0292SCJMP","spark-video-screenwriter","Turn a user's premise into a structured screenplay (one scene at a time) for the spark-video pipeline. Wraps Shanyin Super Screenwriting Master when available — that upstream Shanyin SKILL is the single source of truth for craft when present.","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-screenwriter\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M74FEEZHE6VJQAFWJ66HQDYF","spark-video-episode","One-shot autopilot orchestrator — runs the full spark-video pipeline (screenwriter ↔ director per-scene parallel → render chain-DAG parallel + per-clip review → stitch). User confirms at 4 gates (+ 1 mode gate at start + 1 BGM gate when bgm\u002F folder detected). Use when the user wants \"make me an episode\" in one command.","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-episode\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M74FE3929KWXZG8RNFG1ZSXJ","spark-video-clip-review","Per-clip quality reviewer + render retry state machine. After each rendered shot, score it on 6 axes via `bl omni` (qwen3.5-omni-plus), then decide ACCEPT \u002F REJECT-and-rewrite \u002F REJECT-and-escalate. Handles up to N retry rounds with auto prompt rewriting; escalates to spark-video-director when retries are exhausted.","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-clip-review\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M74FDWYR8F0W6ZT3998PPKT5","spark-video-cast","Scaffold and generate reference assets for characters (cast), locations (movie-set \u002F set dressing), and key props — the three pillars of visual consistency in spark-video. Wraps bl image generate \u002F edit for portrait creation. Use when adding new characters\u002Flocations\u002Fprops or when costume\u002Fstate changes are needed.","https:\u002F\u002Fgithub.com\u002Fmodelstudioai\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fspark-video\u002Freferences\u002Fspark-video-cast\u002FSKILL.md",[],[]]