subject_definitions is a lean identity anchor; the look is woven into detailed_description

Rule 6: subject_definitions never carries the full head-to-toe look or a
nude/bare skin state - it is a lean identity anchor (who the label is, tied
to its reference image). The full look is woven into the [Shot 1] body of
detailed_description according to what is going on in the scene: face, hair,
build as the body moves, each garment where the action touches it, footwear
where steps land, uncovered skin named "nude" where the scene exposes it,
and wardrobe/skin changes stated as part of the action that causes them.

- validator: defs lines reject nude/bare-family skin states and anything
  over 25 words (lean-anchor cap); body re-state message updated; two new
  suite FAIL cases (nude-in-defs, look-dump-in-defs); fixtures rewritten
  to lean defs with the look woven into both [Shot 1] bodies
- all three LLM prompts + SKILL.md: defs role flipped everywhere (template,
  SUBJECT ANCHOR, PROMPT CRAFT, REF2VA spec, worked examples, self-checks);
  outline 'subjects' array now documented as the cast inventory the look is
  spent from
This commit is contained in:
Z User 2026-10-30 19:42:00 +00:00
parent 30cbaeb8f6
commit 28f9b80c83
5 changed files with 215 additions and 148 deletions

View File

@ -68,7 +68,9 @@ shape:
never renamed later. Durations whole seconds 2–15 — about 10 seconds unless the user says
otherwise. Copy the user's quoted speech EXACTLY into the right scene's `dialogue` array;
if the story has no quoted speech, every `dialogue` array stays `[]`. Only the last
scene's beat may come to rest.
scene's beat may come to rest. The `subjects` array is the cast inventory: collect the
full head-to-toe look there once — when writing scenes it is spent by weaving it into
each scene's [Shot 1] body, never parked in subject_definitions.
## Step 2 — Present the guide for approval (do not skip)
@ -108,7 +110,7 @@ Each fragment is exactly this shape:
"duration_seconds": 15,
"prompt": [
"subject_definitions:",
"<Subject 1> is ...full head-to-toe look, nude for uncovered skin...",
"<Subject 1> ...lean identity anchor: who they are, tied to their reference image...",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -165,14 +167,18 @@ and sampler latent or the video can come out square.
`overall_soundscape:` / `non_diegetic_music:` — one line per element, headers on their
own line; `summary` is exactly `[reference generation]`; every scene is its own single
H3 generation, so the bracket number is always `[Shot 1]`.
- The full look is re-stated in EVERY scene — subject_definitions carries it complete
(identity, hair, build, every garment head to toe, footwear), and the [Shot 1] body
opens by re-stating `<Subject 1>` with a wardrobe+skin restatement — nothing is
shared between scenes or from a prefix. Name every body part the clothing leaves
uncovered and call uncovered skin "nude", never "bare"
- The full look is re-stated in EVERY scene, and it lives in the [Shot 1] body —
subject_definitions stays a lean identity anchor (the `<Subject 1>` label and who
they are, tied to their reference image; never a wardrobe list, never a nude/bare
state). Weave the head-to-toe look into the action as the scene exposes it — hair,
build, and face as they move, each garment where the action touches it, footwear
where steps land — nothing is shared between scenes or from a prefix. Name every
body part the clothing leaves uncovered and call uncovered skin "nude", never
"bare", where the scene shows it
("a man wearing a white tank-top with nude arms").
- Scene composition, not word count: the [Shot 1] body must carry every element —
subject anchor (`<Subject 1>` and wardrobe restated), style anchor, continuity anchor
subject anchor (`<Subject 1>` restated, the full look woven in), style anchor,
continuity anchor
(opens inside the previous end_state), blocking, one camera idea, performance beats,
physical texture (wardrobe behavior, weather on skin and fabric, lighting), and a
concrete mid-action exit state. Never pad to a length and never hand in a thin

View File

@ -71,16 +71,16 @@ Input:
DEFAULTS: {"duration_seconds": 8, "steps": 20}
SCENE 1
{"id": "corridor_walk", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> is a night nurse in pale green scrubs and white sneakers, with nude hands below the scrub cuffs.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the night nurse in pale green scrubs, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "She is mid-stride at the far end.", "soundscape": "low fluorescent hum, a distant trolley wheel squeak.", "dialogue_used": []}}
{"id": "corridor_walk", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands gripping the trolley handle, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "She is mid-stride at the far end.", "soundscape": "low fluorescent hum, a distant trolley wheel squeak.", "dialogue_used": []}}
SCENE 2
{"id": "door_stop", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> is a night nurse in pale green scrubs and white sneakers, with nude hands below the scrub cuffs.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse in pale green scrubs, stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "Her hand rests on the push bar.", "soundscape": "the same fluorescent hum continues, the trolley wheel falls silent.", "dialogue_used": []}}
{"id": "door_stop", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands opening off the trolley handle, and stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "Her hand rests on the push bar.", "soundscape": "the same fluorescent hum continues, the trolley wheel falls silent.", "dialogue_used": []}}
Correct reply:
{"prompt_prefix": [""], "defaults": {"duration_seconds": 8, "steps": 20}, "shots": [
{"id": "corridor_walk", "prompt": ["subject_definitions:", "<Subject 1> is a night nurse in pale green scrubs and white sneakers, with nude hands below the scrub cuffs.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the night nurse in pale green scrubs, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "duration_seconds": 8},
{"id": "door_stop", "prompt": ["subject_definitions:", "<Subject 1> is a night nurse in pale green scrubs and white sneakers, with nude hands below the scrub cuffs.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse in pale green scrubs, stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "duration_seconds": 8}
{"id": "corridor_walk", "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands gripping the trolley handle, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "duration_seconds": 8},
{"id": "door_stop", "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands opening off the trolley handle, and stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "duration_seconds": 8}
]}
Note what the example shows: the "_handoff" objects vanished, every prompt string is

View File

@ -51,7 +51,7 @@ Emit exactly this shape and no other keys:
{ "id": "scene_one",
"prompt": [
"subject_definitions:",
"<Subject 1> is ...full head-to-toe look, nude for uncovered skin...",
"<Subject 1> ...lean identity anchor: who they are, tied to their reference image...",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -125,9 +125,9 @@ Shots are flat. A shot never contains a nested object.
# PROMPT CRAFT
- "prompt_prefix" stays empty, exactly [""]. Never put identity, wardrobe, style, or
continuity text in it. Every scene's prompt must be self-sufficient:
subject_definitions carries the full look and the [Shot 1] body re-states the
<Subject 1> tag, wardrobe, and look in every scene, because nothing is shared from
a prefix or between scenes.
subject_definitions re-binds the <Subject 1> tag as a lean identity anchor and the
[Shot 1] body carries the full look woven into the action in every scene, because
nothing is shared from a prefix or between scenes.
- The [Shot 1] body of every scene's detailed_description must:
1. Continue the exact action, pose, camera direction, and lighting from the previous
scene's [Shot 1] body. Scene 1 instead sets the opening.
@ -137,11 +137,13 @@ Shots are flat. A shot never contains a nested object.
- Compose every scene from the same eight elements, and never chase a word count —
chase the elements. A description that genuinely carries them comes out long enough
on its own; padding to a number is as much a failure as a thin one-liner:
1. SUBJECT ANCHOR — the full look lives in subject_definitions (REF2VA PROMPT
below): identity, every aspect of how they look, wardrobe head to toe, hair,
build — naming every body part the clothing leaves uncovered with "nude"
(PROMPT CRAFT). The [Shot 1] body then opens by re-stating <Subject 1> with a
compressed wardrobe+skin restatement.
1. SUBJECT ANCHOR — subject_definitions is only a lean identity anchor (REF2VA
PROMPT below): the <Subject 1> label and who the person is, tied to their
subject reference image. The full look lives in the [Shot 1] body, woven into
the action as the scene exposes it: hair, build, and face as they move, every
garment where the action touches it, footwear where steps land, and every body
part the clothing leaves uncovered named "nude" (PROMPT CRAFT) where the scene
shows or uses that skin.
2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
3. CONTINUITY ANCHOR — open inside the previous scene's end state (scene 1 sets the
opening) and name what carries over: the stride, the camera direction, the light,
@ -204,14 +206,17 @@ Shots are flat. A shot never contains a nested object.
frame"; not "the lights dim" but "the overhead strip flickers once, steadies, then
fades until only the doorway lamp lights the room". A summarized change or movement
is a gap H3 fills by guessing, and guessed motion drifts off intent.
- Describe the complete look in every scene: every aspect of how the person looks —
face, hair, build, each garment head to toe, footwear — goes in the
subject_definitions section, because nothing carries over between scenes. Any body
part the clothing leaves uncovered must be named and called "nude", never "bare":
not "a man wearing a white tank-top" but "a man wearing a white tank-top with nude
arms"; likewise nude legs under shorts, nude shoulders under a sleeveless top, nude
feet in sandals. The [Shot 1] body opens by re-stating <Subject 1> with the same
wardrobe+skin wording compressed into its first sentence. "Nude" is the reliable
- Describe the complete look in every scene, inside the [Shot 1] body — subject
definitions stay a lean identity anchor and never carry the look. Weave the full
head-to-toe appearance into the action according to what is going on in the scene:
face, hair, and build as the body moves, each garment where the action touches it
(a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
Any body part the clothing leaves uncovered is named and called "nude", never
"bare", stated where the scene exposes that skin: not "a man wearing a white
tank-top" but "a man wearing a white tank-top with nude arms"; likewise nude legs
under shorts, nude shoulders under a sleeveless top, nude feet in sandals. When the
action changes what is worn or shown — a jacket coming off, a leg crossing over —
state it as part of that action, not as a static inventory. "Nude" is the reliable
skin-state word for uncovered body parts; "bare" is not.
- One line per element in the prompt array. A shot's array holds exactly the six ref2va
sections below; never add blank entries, extra prose lines, or a second section header.
@ -230,11 +235,14 @@ Shots are flat. A shot never contains a nested object.
labels. Give every shot a prompt array with exactly these sections, in this order,
one line per element — the header on its own line, the content on the following
element:
1. "subject_definitions:" then one line per subject: "<Subject 1> is ..." carrying
the full head-to-toe look in PROMPT CRAFT wording ("nude" for every uncovered
body part). Define <Subject 2> the same way when the story casts a second
recurring person. Never define a label twice; never define a label you do not
use.
1. "subject_definitions:" then one line per subject: "<Subject 1> ..." — a lean
identity anchor only: who the person is, tied to their subject reference image
(for example "<Subject 1> the night nurse, matching her subject reference
image."). Never put the head-to-toe look, a wardrobe list, or any nude/bare
skin state here — those are woven into the [Shot 1] body of
detailed_description where the scene shows them. Define <Subject 2> the same
way when the story casts a second recurring person. Never define a label
twice; never define a label you do not use.
2. "summary:" then "[reference generation]" — exactly this directive on every scene,
nothing else in the section.
3. "retention_analysis:" then one line per defined label: "<Subject 1>:
@ -305,11 +313,8 @@ Correct reply:
"id": "greenhouse_arrival",
"prompt": [
"subject_definitions:",
"<Subject 1> is an adult bicycle courier with a lean build and short dark
brown hair, wearing a mustard-yellow waterproof jacket zipped to the collar,
dark teal trousers, and a charcoal helmet, silver-grey sneakers, and an olive
messenger bag across his chest, with nude hands below the jacket cuffs and
nude ears under the helmet straps.",
"<Subject 1> the adult bicycle courier, matching his subject reference
image.",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -317,24 +322,27 @@ Correct reply:
"detailed_description:",
"Photorealistic overcast rainy daylight, soft grey palette, stable landscape
tracking shots at eye level.",
"[Shot 1] Opening scene. <Subject 1>, the adult bicycle courier, steps off his
silver bicycle at the wet gravel path outside the glass greenhouse and walks
it slowly through the entrance, right hand on the handlebar, left thumb
hooked under the strap of the olive messenger bag as the kraft paper parcel
presses against his hip. The camera is a stable landscape tracking shot at
eye level, gliding sideways at his exact walking pace, keeping his face, the
parcel, and the fogged glass wall behind him in frame; the camera height and
the direction of travel never change. Photorealistic overcast rainy daylight
filters through the fogged panes and lays soft grey light across his
mustard-yellow waterproof jacket; rain beads and long streaks run down the
glass, and the wet paving glistens under the bicycle wheels. Droplets dot his
charcoal helmet, his dark teal trousers darken at the shins, and each
footstep squeezes a small splash between the gravel stones. He breathes
steadily with a relaxed jaw, eyes flicking up to the aisle numbers as he
passes benches of potted ferns and clay pots, and the kraft paper shifts
faintly against the bag strap with every step. End while he is crossing the
interior threshold, front wheel still rolling over the concrete sill, coat
sleeve mid-swing, motion clearly still in progress.",
"[Shot 1] Opening scene. <Subject 1>, the lean-built adult bicycle courier
with short dark brown hair, steps off his silver bicycle at the wet gravel
path outside the glass greenhouse and walks it slowly through the entrance,
right hand on the handlebar, the nude hand below his jacket cuff wrapped
around the grip, left thumb hooked under the strap of the olive messenger
bag as the kraft paper parcel presses against his hip. The camera is a
stable landscape tracking shot at eye level, gliding sideways at his exact
walking pace, keeping his face, the parcel, and the fogged glass wall
behind him in frame; the camera height and the direction of travel never
change. Photorealistic overcast rainy daylight filters through the fogged
panes and lays soft grey light across his mustard-yellow waterproof jacket
zipped to the collar; rain beads and long streaks run down the glass, and
the wet paving glistens under the bicycle wheels. Droplets dot his charcoal
helmet, its straps holding his nude ears close, his dark teal trousers
darken at the shins, and his silver-grey sneakers squeeze small splashes
from the gravel with each step. He breathes steadily with a relaxed jaw,
eyes flicking up to the aisle numbers as he passes benches of potted ferns
and clay pots, and the kraft paper shifts faintly against the bag strap
with every step. End while he is crossing the interior threshold, front
wheel still rolling over the concrete sill, coat sleeve mid-swing, motion
clearly still in progress.",
"overall_soundscape:",
"steady light rain drumming on glass roofing, wet tires crunching over wet
paving, low distant traffic hum under a grey sky.",
@ -347,11 +355,8 @@ Correct reply:
"id": "greenhouse_delivery",
"prompt": [
"subject_definitions:",
"<Subject 1> is an adult bicycle courier with a lean build and short dark
brown hair, wearing a mustard-yellow waterproof jacket zipped to the collar,
dark teal trousers, and a charcoal helmet, silver-grey sneakers, and an olive
messenger bag across his chest, with nude hands below the jacket cuffs and
nude ears under the helmet straps.",
"<Subject 1> the adult bicycle courier, matching his subject reference
image.",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -361,12 +366,14 @@ Correct reply:
tracking shots at eye level.",
"[Shot 1] Continue the same forward stride and the same sideways camera move
through the already-crossed threshold without resetting the motion, wet
gravel giving way to polished concrete underfoot. <Subject 1>, the same adult
bicycle courier in his mustard-yellow waterproof jacket, dark teal trousers,
and charcoal helmet, rolls the silver bicycle to the wooden potting table at
the end of the aisle, wedges the front wheel against the table leg with his
left hand, unbuckles the olive messenger flap, lifts the kraft paper parcel
with both hands, and sets it down on the table with a soft, deliberate press.
gravel giving way to polished concrete underfoot. <Subject 1>, the same
lean-built courier with his short dark brown hair under the charcoal
helmet, in his mustard-yellow waterproof jacket, dark teal trousers, and
silver-grey sneakers, rolls the silver bicycle to the wooden potting table
at the end of the aisle, wedges the front wheel against the table leg with
his left hand, unbuckles the olive messenger flap with the nude hands below
his jacket cuffs, lifts the kraft paper parcel with both hands, and sets it
down on the table with a soft, deliberate press.
The camera glides to a stop at a calm medium-wide angle as he straightens to
his full height and turns his shoulders toward the lens. He stands silently
with mouth closed, then speaks. <d>[English] Package for the greenhouse,
@ -399,10 +406,11 @@ Correct reply:
5. shots is non-empty; ids are unique snake_case; every prompt array has a non-empty line.
6. Every duration_seconds is between 2 and 15.
7. Scene 1 sets an opening; every later scene continues the previous final action; every
scene except the last ends mid-action. subject_definitions re-defines <Subject 1>
with the full look in every scene, and the [Shot 1] body re-states who <Subject 1>
is with a wardrobe+skin restatement, because the prefix is empty — naming every
uncovered body part as "nude", never "bare".
scene except the last ends mid-action. subject_definitions re-binds <Subject 1> as
a lean identity anchor in every scene (no wardrobe list, no nude/bare state), and
the [Shot 1] body re-states who <Subject 1> is and carries the full head-to-toe
look woven into the action, because the prefix is empty — naming every uncovered
body part as "nude", never "bare", where the scene shows that skin.
8. Every [Shot 1] body carries every element of a scene composition — subject,
style, continuity, blocking, camera, performance, texture, exit state — and no
change anywhere is stated as a bare outcome like "is now"; every transformation is
@ -473,8 +481,9 @@ A retired boxer teaches his granddaughter to dance in their cluttered kitchen.
the prefix is exactly [""] — the compiled shot prompt (`prefix + blank line + scene prompt`,
`chain_nodes.py`) then starts directly at the trained `subject_definitions:` header
instead of a prose preamble. Identity, wardrobe, and style therefore live inside
every scene's subject_definitions and [Shot 1] body, restated per scene — which also
suits each scene being its own generation. The validator accepts an empty prefix as
every scene — a lean anchor in subject_definitions and the full look woven into
the [Shot 1] body, restated per scene — which also suits each scene being its own
generation. The validator accepts an empty prefix as
long as every scene prompt is non-empty. If you reintroduce prose, expect some
format dilution.

View File

@ -90,7 +90,10 @@ Emit exactly this shape and no other keys:
- "subjects": one string per recurring subject, in the form "<Subject 1> — description".
Number them <Subject 1>, <Subject 2>, ... only if the story truly has several. If the
story names nobody, invent the minimum cast the action needs and describe each one
fully enough to re-draw them identically in every scene.
fully enough to re-draw them identically in every scene. This array is the cast
inventory: collect the full head-to-toe look here once — when writing scenes it is
spent by weaving it into each scene's [Shot 1] body, never parked in
subject_definitions.
- "style": one consistent look for the whole plan. Never per-scene styles.
- "soundscape_seed": weather plus location tone in a few words. Every scene's
overall_soundscape line later continues from it.
@ -165,7 +168,7 @@ Emit exactly this shape and no other keys:
"duration_seconds": 15,
"prompt": [
"subject_definitions:",
"<Subject 1> is ...full head-to-toe look, nude for uncovered skin...",
"<Subject 1> ...lean identity anchor: who they are, tied to their reference image...",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -216,9 +219,10 @@ identity and style from the story alone; without a handoff you are scene 1.
# IDENTITY AND CONTINUITY
- Every scene is generated alone: nothing is shared between scenes. Your prompt must
be self-sufficient — subject_definitions carries the full head-to-toe look, and the
[Shot 1] body re-states <Subject 1> with a wardrobe+skin restatement and the visual
style in every scene, even though the previous scene already did.
be self-sufficient — subject_definitions re-binds <Subject 1> as a lean identity
anchor, and the [Shot 1] body carries the full head-to-toe look woven into the
action plus the visual style in every scene, even though the previous scene
already did.
- Copy the subject descriptions and "style" from STYLE AND CAST faithfully. Never change
wardrobe, hair, age, build, or look mid-plan.
- If PREVIOUS HANDOFF is a handoff object, your scene opens inside the exact end_state
@ -238,12 +242,13 @@ element is a failed scene. Do not chase a word count — chase the elements. A
body that genuinely carries them comes out long enough on its own; padding to
a number is as much a failure as a thin one-liner.
1. SUBJECT ANCHOR — the full look lives in subject_definitions (REF2VA PROMPT
below): identity, every aspect of how they look, wardrobe head to toe, hair,
build — naming every body part the clothing leaves uncovered with "nude"
(PROMPT CRAFT). The [Shot 1] body then opens by re-stating <Subject 1> with a
compressed wardrobe+skin restatement. Nothing is shared between scenes or from
a prefix.
1. SUBJECT ANCHOR — subject_definitions is only a lean identity anchor (REF2VA
PROMPT below): the <Subject 1> label and who the person is, tied to their
subject reference image. The full look lives in the [Shot 1] body, woven into
the action as the scene exposes it: hair, build, and face as they move, every
garment where the action touches it, footwear where steps land, and every body
part the clothing leaves uncovered named "nude" (PROMPT CRAFT) where the scene
shows or uses that skin. Nothing is shared between scenes or from a prefix.
2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
3. CONTINUITY ANCHOR — open inside the previous end_state (scene 1 instead
establishes place, light, and the first action). Name what carries over: the
@ -313,15 +318,18 @@ The sound picture is its own element and lives in the overall_soundscape section
frame"; not "the lights dim" but "the overhead strip flickers once, steadies, then
fades until only the doorway lamp lights the room". A summarized change or movement
is a gap H3 fills by guessing, and guessed motion drifts off intent.
- Describe the complete look in every scene: every aspect of how the person looks —
face, hair, build, each garment head to toe, footwear — goes in the
subject_definitions section, because each scene is a separate generation and nothing
carries over. Any body part the clothing leaves uncovered must be named and called
"nude", never "bare": not "a man wearing a white tank-top" but "a man wearing a
white tank-top with nude arms"; likewise nude legs under shorts, nude shoulders
under a sleeveless top, nude feet in sandals. The [Shot 1] body opens by re-stating
<Subject 1> with the same wardrobe+skin wording compressed into its first sentence.
"Nude" is the reliable skin-state word for uncovered body parts; "bare" is not.
- Describe the complete look in every scene, inside the [Shot 1] body — subject
definitions stay a lean identity anchor and never carry the look. Weave the full
head-to-toe appearance into the action according to what is going on in the scene:
face, hair, and build as the body moves, each garment where the action touches it
(a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
Any body part the clothing leaves uncovered is named and called "nude", never
"bare", stated where the scene exposes that skin: not "a man wearing a white
tank-top" but "a man wearing a white tank-top with nude arms"; likewise nude legs
under shorts, nude shoulders under a sleeveless top, nude feet in sandals. When the
action changes what is worn or shown — a jacket coming off, a leg crossing over —
state it as part of that action, not as a static inventory. "Nude" is the reliable
skin-state word for uncovered body parts; "bare" is not.
- One line per element in the prompt array: the six ref2va sections exactly as
specified in REF2VA PROMPT below; never add blank entries, extra prose lines, or a
second section header.
@ -337,10 +345,14 @@ The sound picture is its own element and lives in the overall_soundscape section
the user has wired, and the H3 model reserves special tokens for six exact section
labels. Give your prompt array exactly these sections, in this order, one line per
element — the header on its own line, the content on the following element:
1. "subject_definitions:" then one line per subject: "<Subject 1> is ..." carrying
the full head-to-toe look in PROMPT CRAFT wording ("nude" for every uncovered
body part). Define <Subject 2> the same way when the outline casts a second
person. Never define a label twice; never define a label you do not use.
1. "subject_definitions:" then one line per subject: "<Subject 1> ..." — a lean
identity anchor only: who the person is, tied to their subject reference image
(for example "<Subject 1> the night nurse, matching her subject reference
image."). Never put the head-to-toe look, a wardrobe list, or any nude/bare
skin state here — those are woven into the [Shot 1] body of
detailed_description where the scene shows them. Define <Subject 2> the same
way when the outline casts a second person. Never define a label twice; never
define a label you do not use.
2. "summary:" then "[reference generation]" — exactly this directive on every scene
of this workflow, nothing else in the section.
3. "retention_analysis:" then one line per defined label: "<Subject 1>:
@ -439,11 +451,8 @@ Correct reply:
"duration_seconds": 15,
"prompt": [
"subject_definitions:",
"<Subject 1> is an adult bicycle courier with a lean build and short dark brown
hair, wearing a mustard-yellow waterproof jacket zipped to the collar, dark teal
trousers, and a charcoal helmet, silver-grey sneakers, and an olive messenger
bag across his chest, with nude hands below the jacket cuffs and nude ears under
the helmet straps.",
"<Subject 1> the adult bicycle courier, matching his subject reference
image.",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -453,10 +462,12 @@ Correct reply:
tracking shots at eye level.",
"[Shot 1] Continue the exact mid-threshold
motion from the previous scene without resetting it: the front wheel rolls off the
concrete sill onto polished interior concrete as <Subject 1>, the same adult
bicycle courier in his mustard-yellow waterproof jacket, dark teal trousers, and
charcoal helmet, pushes the silver bicycle forward down the central aisle, right
hand on the handlebar, left thumb still hooked under the olive messenger bag strap
concrete sill onto polished interior concrete as <Subject 1>, the same lean-built
adult bicycle courier with short dark brown hair under his charcoal helmet, in
his mustard-yellow waterproof jacket zipped to the collar, dark teal trousers,
and silver-grey sneakers, pushes the silver bicycle forward down the central
aisle, right hand on the handlebar, the nude hand below the jacket cuff wrapped
around the grip, left thumb still hooked under the olive messenger bag strap
with the kraft paper parcel pressed against his hip. The camera keeps its stable
landscape tracking glide at eye level, matching his walking pace exactly, holding
his face, the parcel, and the receding fogged entrance behind him; the camera
@ -464,10 +475,12 @@ Correct reply:
lays soft grey light through the glass roof, condensation trails crawling down the
panes, benches of potted ferns and clay pots sliding past on both sides, aisle
number cards ticking by at his shoulder. His breath stays steady with a relaxed
jaw, eyes flicking to the numbers; a drop falls from the bicycle fender and bursts
on the floor; the wet hems of his trousers slap lightly with each step. Approaching
the wooden potting table at the aisle's end, he slows the bicycle to a crawl and
his right hand leaves the handlebar, closing on the olive messenger flap.",
jaw, eyes flicking to the numbers, the helmet straps holding his nude ears close
to his head; a drop falls from the bicycle fender and bursts on the floor; the
wet hems of his dark teal trousers slap lightly with each step, his silver-grey
sneakers darkening where the wet concrete splashes them. Approaching the wooden
potting table at the aisle's end, he slows the bicycle to a crawl and his right
hand leaves the handlebar, closing on the olive messenger flap.",
"overall_soundscape:",
"the same steady rain drumming on the glass roof continues
overhead, tires humming on polished concrete, a single fender drop bursting on the
@ -496,10 +509,12 @@ Correct reply:
overall_soundscape / non_diegetic_music — each header on its own line, and
summary is exactly "[reference generation]".
4. subject_definitions defines <Subject 1> (and <Subject 2> when the outline casts a
second person) exactly once each with the full look (identity, hair, build, every
garment head to toe, footwear), naming every uncovered body part as "nude" —
never "bare"; retention_analysis carries one valid entry per defined label; the
[Shot 1] body re-states <Subject 1> with a wardrobe+skin restatement.
second person) exactly once each as a lean identity anchor — who they are, tied
to the reference image, with no wardrobe list and no nude/bare state;
retention_analysis carries one valid entry per defined label; the [Shot 1] body
re-states <Subject 1> and carries the full head-to-toe look woven into the
action, naming every uncovered body part "nude" — never "bare" — where the
scene shows that skin.
5. The [Shot 1] body opens by continuing the PREVIOUS HANDOFF's end_state (scene 1 sets
the opening instead) and ends mid-action — except the final outline scene.
6. The [Shot 1] body carries every element of a scene composition — subject anchor,
@ -543,8 +558,9 @@ Correct reply:
distributed by the outline.
- **Prefix rule is unchanged:** fragments never carry `prompt_prefix`; the final plan
always gets `"prompt_prefix": [""]` (the empirically better empty prefix), and each
scene's subject_definitions plus its [Shot 1] body restate identity/wardrobe/style
because nothing is shared from a prefix.
scene's lean subject_definitions anchor plus its [Shot 1] body — the full look
woven into the action — restate identity/wardrobe/style because nothing is shared
from a prefix.
- **Fragment file convention:** save each reply as `scene_NN.json` (zero-padded). The
assembler and `scripts/build_plan.py` accept the raw object; fenced output also
parses.

View File

@ -30,6 +30,12 @@ REF2VA_SECTIONS = ["subject_definitions", "summary", "retention_analysis",
REF2VA_TASK_DIRECTIVE = "[reference generation]"
REF2VA_RETENTION_MARKERS = {"fully_preserved", "partially_preserved",
"attribute_transfer", "weak_reference"}
# subject_definitions is a lean identity anchor (who the label is, tied to its
# reference image) - never the full head-to-toe look and never a nude/bare skin
# state; both are woven into the [Shot 1] body according to what the scene shows.
REF2VA_DEF_MAX_WORDS = 25
REF2VA_DEF_SKINSTATE_RE = re.compile(
r"\b(?:nude|naked|unclothed|undressed|bare|barefoot|topless)\b", re.I)
FENCE_RE = re.compile(r"^\s*```[a-zA-Z0-9_-]*\s*\n(.*?)\n?\s*```\s*$", re.S)
DIALOGUE_SPAN_RE = re.compile(r"<d>(.*?)</d>")
@ -147,9 +153,23 @@ def check_ref2va_prompt(lines, dur, where, prev_handoff=None):
m = re.match(r"^(<(?:Subject|Picture|Video|Audio)\s+\d+>)\s+\S", line)
if not m:
raise ValueError(f"{where}: subject_definitions lines must start with a "
f"<Subject N> label and describe the person: {line[:60]!r}")
f"<Subject N> label and name the subject (lean identity "
f"anchor): {line[:60]!r}")
if m.group(1) in defined:
raise ValueError(f"{where}: {m.group(1)} is defined more than once")
anchor = line[m.end(1):].strip()
if REF2VA_DEF_SKINSTATE_RE.search(anchor):
raise ValueError(f"{where}: {m.group(1)} definition carries a nude/bare "
f"skin state - subject_definitions is a lean identity "
f"anchor only; weave the skin state into the [Shot 1] body "
f"where the scene exposes it: {line[:60]!r}")
words = len(anchor.split())
if words > REF2VA_DEF_MAX_WORDS:
raise ValueError(f"{where}: {m.group(1)} definition is {words} words - "
f"subject_definitions is a lean identity anchor (who the "
f"label is, tied to its reference image), not the full "
f"head-to-toe look; weave the look into the [Shot 1] body "
f"according to what the scene shows")
defined.append(m.group(1))
if "<Subject 1>" not in defined:
raise ValueError(f"{where}: <Subject 1> must be defined in subject_definitions")
@ -182,8 +202,9 @@ def check_ref2va_prompt(lines, dur, where, prev_handoff=None):
f"wardrobe, style, continuity, blocking, camera, performance, "
f"texture, sound, exit state)")
if "<Subject 1>" not in body:
raise ValueError(f"{where}: the [Shot 1] body must re-state <Subject 1> with a "
f"wardrobe+skin restatement (definitions alone do not render)")
raise ValueError(f"{where}: the [Shot 1] body must re-state <Subject 1> and "
f"carry the head-to-toe look woven into the action (lean "
f"definitions do not render)")
if " is now " in dd.lower():
raise ValueError(f"{where}: change stated as bare outcome instead of shown progression")
if re.search(r"\bbare\b", dd, re.I):
@ -550,10 +571,7 @@ REF2VA_NURSE = {
"duration_seconds": 8,
"prompt": [
"subject_definitions:",
"<Subject 1> is a night nurse in her thirties with a slim build, dark brown "
"hair pulled back in a low bun, and calm grey eyes, wearing a pale green "
"scrub top and matching scrub trousers, white sneakers, with nude hands below "
"the scrub cuffs and nude lower legs above the sneaker collars.",
"<Subject 1> the night nurse, matching her subject reference image.",
"summary:",
"[reference generation]",
"retention_analysis:",
@ -562,19 +580,23 @@ REF2VA_NURSE = {
"Photorealistic cool fluorescent lighting, soft clinical palette, stable "
"over-the-shoulder tracking shots.",
"[Shot 1] Continue the same walk along the corridor without resetting the "
"motion. <Subject 1>, the same night nurse in her pale green scrubs and white "
"sneakers, pushes the steel trolley forward with both hands, its wheels "
"squeaking softly on the linoleum, a paper cup and a clipped chart riding on "
"top. The camera keeps a steady over-the-shoulder framing at her shoulder "
"height, gliding at her pace, fluorescent panels passing overhead in even "
"rhythm, the corridor walls sliding past in soft focus. Her sneakers land "
"heel first and roll to the toe, the cup's surface trembling with each push, "
"and the hem of her scrub top sways in counterpoint to the trolley's roll. "
"Her jaw stays set, eyes forward, one loose strand of hair lifting with each "
"step; the trolley's shadow stretches and compresses under each ceiling "
"panel. Reaching the blue door at the corridor's end, she slows the trolley "
"to a stop and her right hand leaves the handle, closing on the door's cold "
"push bar.",
"motion. <Subject 1>, the same night nurse from her reference image with a "
"slim build and dark brown hair pulled back in a low bun, pushes the steel "
"trolley forward with both hands, its wheels squeaking softly on the linoleum, "
"a paper cup and a clipped chart riding on top. Her pale green scrub top and "
"matching scrub trousers hang smooth as she leans into the push, her nude "
"hands below the scrub cuffs wrapped around the cold handle, and her white "
"sneakers land heel first and roll to the toe, her nude lower legs showing "
"above the sneaker collars with each stride. The camera keeps a steady "
"over-the-shoulder framing at her shoulder height, gliding at her pace, "
"fluorescent panels passing overhead in even rhythm, the corridor walls "
"sliding past in soft focus. The cup's surface trembles with each push, and "
"the hem of her scrub top sways in counterpoint to the trolley's roll. Her "
"jaw stays set, her calm grey eyes forward, one loose strand of hair lifting "
"with each step; the trolley's shadow stretches and compresses under each "
"ceiling panel. Reaching the blue door at the corridor's end, she slows the "
"trolley to a stop and her right hand leaves the handle, closing on the "
"door's cold push bar.",
"overall_soundscape:",
"the same low fluorescent hum and distant trolley squeak continue, a soft "
"draught breathing under the far door.",
@ -604,16 +626,19 @@ REF2VA_DOOR = {
"detailed_description:",
REF2VA_NURSE["prompt"][7],
"[Shot 1] Continue the same corridor walk without resetting the motion, the "
"trolley still rolling at her pace. <Subject 1>, the same night nurse in her "
"pale green scrubs and white sneakers, eases the steel trolley to a stop "
"beside the blue door, both hands relaxing on the handle one after the other, "
"its last wheel squeak dying on the linoleum. The camera holds its "
"over-the-shoulder framing while her shoulders settle and the paper cup's "
"surface stills on the trolley top; the fluorescent panels keep their even "
"rhythm overhead, the corridor walls stay in soft focus, and her scrub-top "
"hem sways once and hangs. Her right hand leaves the handle, opens, and "
"closes on the door's cold push bar while the clipped chart keeps swaying on "
"its clip.",
"trolley still rolling at her pace. <Subject 1>, the same night nurse from "
"her reference image with her dark brown hair still in its low bun, eases "
"the steel trolley to a stop beside the blue door, both hands relaxing on "
"the handle one after the other, its last wheel squeak dying on the "
"linoleum. Her pale green scrubs settle as her shoulders drop, the white "
"sneakers planting at hip width, the nude hands below the scrub cuffs "
"opening off the handle while her nude lower legs stay above the sneaker "
"collars. The camera holds its over-the-shoulder framing while her "
"shoulders settle and the paper cup's surface stills on the trolley top; "
"the fluorescent panels keep their even rhythm overhead, the corridor walls "
"stay in soft focus, and her scrub-top hem sways once and hangs. Her right "
"hand leaves the handle, opens, and closes on the door's cold push bar "
"while the clipped chart keeps swaying on its clip.",
"overall_soundscape:",
"the same low fluorescent hum continues, the trolley wheels fall silent, a "
"soft draught breathing under the far door.",
@ -697,11 +722,22 @@ def run_fragment_suite():
p = out_of_order["prompt"]
i_sum, i_def = p.index("summary:"), p.index("subject_definitions:")
p[i_sum], p[i_def] = p[i_def], p[i_sum]
nude_defs = _ref2va_short()
nude_defs["prompt"][1] = ("<Subject 1> is a night nurse with nude hands below "
"the scrub cuffs.")
dump_defs = _ref2va_short()
dump_defs["prompt"][1] = ("<Subject 1> is a night nurse in her thirties with a "
"slim build, dark brown hair pulled back in a low bun, "
"and calm grey eyes, wearing a pale green scrub top and "
"matching scrub trousers, white sneakers, and a lanyard "
"ID badge at her chest.")
r2_cases = [
("missing retention_analysis entry", no_ret, {}),
("summary directive not [reference generation]", wrong_summary, {}),
("no style sentences before [Shot 1]", no_style, {}),
("sections out of canonical order", out_of_order, {}),
("nude/bare state in subject_definitions", nude_defs, {}),
("head-to-toe look dump in subject_definitions", dump_defs, {}),
]
for i, (label, obj, kwargs) in enumerate(r2_cases, 1):
try:
@ -782,7 +818,7 @@ edge_bad = [
def run_embedded_suite():
plan = json.loads(WORKED_EXAMPLE)
print("Worked example from system prompt:")
print("Legacy t2va worked example (mode auto-detected):")
validate_plan(plan)
check_h3_sections(plan)