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 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; 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 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) ## Step 2 — Present the guide for approval (do not skip)
@ -108,7 +110,7 @@ Each fragment is exactly this shape:
"duration_seconds": 15, "duration_seconds": 15,
"prompt": [ "prompt": [
"subject_definitions:", "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:", "summary:",
"[reference generation]", "[reference generation]",
"retention_analysis:", "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 `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 own line; `summary` is exactly `[reference generation]`; every scene is its own single
H3 generation, so the bracket number is always `[Shot 1]`. H3 generation, so the bracket number is always `[Shot 1]`.
- The full look is re-stated in EVERY scene — subject_definitions carries it complete - The full look is re-stated in EVERY scene, and it lives in the [Shot 1] body —
(identity, hair, build, every garment head to toe, footwear), and the [Shot 1] body subject_definitions stays a lean identity anchor (the `<Subject 1>` label and who
opens by re-stating `<Subject 1>` with a wardrobe+skin restatement — nothing is they are, tied to their reference image; never a wardrobe list, never a nude/bare
shared between scenes or from a prefix. Name every body part the clothing leaves state). Weave the head-to-toe look into the action as the scene exposes it — hair,
uncovered and call uncovered skin "nude", never "bare" 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"). ("a man wearing a white tank-top with nude arms").
- Scene composition, not word count: the [Shot 1] body must carry every element — - 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, (opens inside the previous end_state), blocking, one camera idea, performance beats,
physical texture (wardrobe behavior, weather on skin and fabric, lighting), and a 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 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} DEFAULTS: {"duration_seconds": 8, "steps": 20}
SCENE 1 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 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: Correct reply:
{"prompt_prefix": [""], "defaults": {"duration_seconds": 8, "steps": 20}, "shots": [ {"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": "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> 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": "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 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", { "id": "scene_one",
"prompt": [ "prompt": [
"subject_definitions:", "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:", "summary:",
"[reference generation]", "[reference generation]",
"retention_analysis:", "retention_analysis:",
@ -125,9 +125,9 @@ Shots are flat. A shot never contains a nested object.
# PROMPT CRAFT # PROMPT CRAFT
- "prompt_prefix" stays empty, exactly [""]. Never put identity, wardrobe, style, or - "prompt_prefix" stays empty, exactly [""]. Never put identity, wardrobe, style, or
continuity text in it. Every scene's prompt must be self-sufficient: 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_definitions re-binds the <Subject 1> tag as a lean identity anchor and the
<Subject 1> tag, wardrobe, and look in every scene, because nothing is shared from [Shot 1] body carries the full look woven into the action in every scene, because
a prefix or between scenes. nothing is shared from a prefix or between scenes.
- The [Shot 1] body of every scene's detailed_description must: - The [Shot 1] body of every scene's detailed_description must:
1. Continue the exact action, pose, camera direction, and lighting from the previous 1. Continue the exact action, pose, camera direction, and lighting from the previous
scene's [Shot 1] body. Scene 1 instead sets the opening. 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 — - 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 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: 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 1. SUBJECT ANCHOR — subject_definitions is only a lean identity anchor (REF2VA
below): identity, every aspect of how they look, wardrobe head to toe, hair, PROMPT below): the <Subject 1> label and who the person is, tied to their
build — naming every body part the clothing leaves uncovered with "nude" subject reference image. The full look lives in the [Shot 1] body, woven into
(PROMPT CRAFT). The [Shot 1] body then opens by re-stating <Subject 1> with a the action as the scene exposes it: hair, build, and face as they move, every
compressed wardrobe+skin restatement. 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. 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 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, 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 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 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. 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 — - Describe the complete look in every scene, inside the [Shot 1] body — subject
face, hair, build, each garment head to toe, footwear — goes in the definitions stay a lean identity anchor and never carry the look. Weave the full
subject_definitions section, because nothing carries over between scenes. Any body head-to-toe appearance into the action according to what is going on in the scene:
part the clothing leaves uncovered must be named and called "nude", never "bare": face, hair, and build as the body moves, each garment where the action touches it
not "a man wearing a white tank-top" but "a man wearing a white tank-top with nude (a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
arms"; likewise nude legs under shorts, nude shoulders under a sleeveless top, nude Any body part the clothing leaves uncovered is named and called "nude", never
feet in sandals. The [Shot 1] body opens by re-stating <Subject 1> with the same "bare", stated where the scene exposes that skin: not "a man wearing a white
wardrobe+skin wording compressed into its first sentence. "Nude" is the reliable 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. 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 - 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. 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, 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 one line per element — the header on its own line, the content on the following
element: element:
1. "subject_definitions:" then one line per subject: "<Subject 1> is ..." carrying 1. "subject_definitions:" then one line per subject: "<Subject 1> ..." — a lean
the full head-to-toe look in PROMPT CRAFT wording ("nude" for every uncovered identity anchor only: who the person is, tied to their subject reference image
body part). Define <Subject 2> the same way when the story casts a second (for example "<Subject 1> the night nurse, matching her subject reference
recurring person. Never define a label twice; never define a label you do not image."). Never put the head-to-toe look, a wardrobe list, or any nude/bare
use. 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, 2. "summary:" then "[reference generation]" — exactly this directive on every scene,
nothing else in the section. nothing else in the section.
3. "retention_analysis:" then one line per defined label: "<Subject 1>: 3. "retention_analysis:" then one line per defined label: "<Subject 1>:
@ -305,11 +313,8 @@ Correct reply:
"id": "greenhouse_arrival", "id": "greenhouse_arrival",
"prompt": [ "prompt": [
"subject_definitions:", "subject_definitions:",
"<Subject 1> is an adult bicycle courier with a lean build and short dark "<Subject 1> the adult bicycle courier, matching his subject reference
brown hair, wearing a mustard-yellow waterproof jacket zipped to the collar, image.",
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.",
"summary:", "summary:",
"[reference generation]", "[reference generation]",
"retention_analysis:", "retention_analysis:",
@ -317,24 +322,27 @@ Correct reply:
"detailed_description:", "detailed_description:",
"Photorealistic overcast rainy daylight, soft grey palette, stable landscape "Photorealistic overcast rainy daylight, soft grey palette, stable landscape
tracking shots at eye level.", tracking shots at eye level.",
"[Shot 1] Opening scene. <Subject 1>, the adult bicycle courier, steps off his "[Shot 1] Opening scene. <Subject 1>, the lean-built adult bicycle courier
silver bicycle at the wet gravel path outside the glass greenhouse and walks with short dark brown hair, steps off his silver bicycle at the wet gravel
it slowly through the entrance, right hand on the handlebar, left thumb path outside the glass greenhouse and walks it slowly through the entrance,
hooked under the strap of the olive messenger bag as the kraft paper parcel right hand on the handlebar, the nude hand below his jacket cuff wrapped
presses against his hip. The camera is a stable landscape tracking shot at around the grip, left thumb hooked under the strap of the olive messenger
eye level, gliding sideways at his exact walking pace, keeping his face, the bag as the kraft paper parcel presses against his hip. The camera is a
parcel, and the fogged glass wall behind him in frame; the camera height and stable landscape tracking shot at eye level, gliding sideways at his exact
the direction of travel never change. Photorealistic overcast rainy daylight walking pace, keeping his face, the parcel, and the fogged glass wall
filters through the fogged panes and lays soft grey light across his behind him in frame; the camera height and the direction of travel never
mustard-yellow waterproof jacket; rain beads and long streaks run down the change. Photorealistic overcast rainy daylight filters through the fogged
glass, and the wet paving glistens under the bicycle wheels. Droplets dot his panes and lays soft grey light across his mustard-yellow waterproof jacket
charcoal helmet, his dark teal trousers darken at the shins, and each zipped to the collar; rain beads and long streaks run down the glass, and
footstep squeezes a small splash between the gravel stones. He breathes the wet paving glistens under the bicycle wheels. Droplets dot his charcoal
steadily with a relaxed jaw, eyes flicking up to the aisle numbers as he helmet, its straps holding his nude ears close, his dark teal trousers
passes benches of potted ferns and clay pots, and the kraft paper shifts darken at the shins, and his silver-grey sneakers squeeze small splashes
faintly against the bag strap with every step. End while he is crossing the from the gravel with each step. He breathes steadily with a relaxed jaw,
interior threshold, front wheel still rolling over the concrete sill, coat eyes flicking up to the aisle numbers as he passes benches of potted ferns
sleeve mid-swing, motion clearly still in progress.", 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:", "overall_soundscape:",
"steady light rain drumming on glass roofing, wet tires crunching over wet "steady light rain drumming on glass roofing, wet tires crunching over wet
paving, low distant traffic hum under a grey sky.", paving, low distant traffic hum under a grey sky.",
@ -347,11 +355,8 @@ Correct reply:
"id": "greenhouse_delivery", "id": "greenhouse_delivery",
"prompt": [ "prompt": [
"subject_definitions:", "subject_definitions:",
"<Subject 1> is an adult bicycle courier with a lean build and short dark "<Subject 1> the adult bicycle courier, matching his subject reference
brown hair, wearing a mustard-yellow waterproof jacket zipped to the collar, image.",
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.",
"summary:", "summary:",
"[reference generation]", "[reference generation]",
"retention_analysis:", "retention_analysis:",
@ -361,12 +366,14 @@ Correct reply:
tracking shots at eye level.", tracking shots at eye level.",
"[Shot 1] Continue the same forward stride and the same sideways camera move "[Shot 1] Continue the same forward stride and the same sideways camera move
through the already-crossed threshold without resetting the motion, wet through the already-crossed threshold without resetting the motion, wet
gravel giving way to polished concrete underfoot. <Subject 1>, the same adult gravel giving way to polished concrete underfoot. <Subject 1>, the same
bicycle courier in his mustard-yellow waterproof jacket, dark teal trousers, lean-built courier with his short dark brown hair under the charcoal
and charcoal helmet, rolls the silver bicycle to the wooden potting table at helmet, in his mustard-yellow waterproof jacket, dark teal trousers, and
the end of the aisle, wedges the front wheel against the table leg with his silver-grey sneakers, rolls the silver bicycle to the wooden potting table
left hand, unbuckles the olive messenger flap, lifts the kraft paper parcel at the end of the aisle, wedges the front wheel against the table leg with
with both hands, and sets it down on the table with a soft, deliberate press. 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 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 his full height and turns his shoulders toward the lens. He stands silently
with mouth closed, then speaks. <d>[English] Package for the greenhouse, 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. 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. 6. Every duration_seconds is between 2 and 15.
7. Scene 1 sets an opening; every later scene continues the previous final action; every 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> scene except the last ends mid-action. subject_definitions re-binds <Subject 1> as
with the full look in every scene, and the [Shot 1] body re-states who <Subject 1> a lean identity anchor in every scene (no wardrobe list, no nude/bare state), and
is with a wardrobe+skin restatement, because the prefix is empty — naming every the [Shot 1] body re-states who <Subject 1> is and carries the full head-to-toe
uncovered body part as "nude", never "bare". 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, 8. Every [Shot 1] body carries every element of a scene composition — subject,
style, continuity, blocking, camera, performance, texture, exit state — and no style, continuity, blocking, camera, performance, texture, exit state — and no
change anywhere is stated as a bare outcome like "is now"; every transformation is 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`, 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 `chain_nodes.py`) then starts directly at the trained `subject_definitions:` header
instead of a prose preamble. Identity, wardrobe, and style therefore live inside 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 every scene — a lean anchor in subject_definitions and the full look woven into
suits each scene being its own generation. The validator accepts an empty prefix as 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 long as every scene prompt is non-empty. If you reintroduce prose, expect some
format dilution. 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". - "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 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 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. - "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 - "soundscape_seed": weather plus location tone in a few words. Every scene's
overall_soundscape line later continues from it. overall_soundscape line later continues from it.
@ -165,7 +168,7 @@ Emit exactly this shape and no other keys:
"duration_seconds": 15, "duration_seconds": 15,
"prompt": [ "prompt": [
"subject_definitions:", "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:", "summary:",
"[reference generation]", "[reference generation]",
"retention_analysis:", "retention_analysis:",
@ -216,9 +219,10 @@ identity and style from the story alone; without a handoff you are scene 1.
# IDENTITY AND CONTINUITY # IDENTITY AND CONTINUITY
- Every scene is generated alone: nothing is shared between scenes. Your prompt must - 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 be self-sufficient — subject_definitions re-binds <Subject 1> as a lean identity
[Shot 1] body re-states <Subject 1> with a wardrobe+skin restatement and the visual anchor, and the [Shot 1] body carries the full head-to-toe look woven into the
style in every scene, even though the previous scene already did. 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 - Copy the subject descriptions and "style" from STYLE AND CAST faithfully. Never change
wardrobe, hair, age, build, or look mid-plan. wardrobe, hair, age, build, or look mid-plan.
- If PREVIOUS HANDOFF is a handoff object, your scene opens inside the exact end_state - 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 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. a number is as much a failure as a thin one-liner.
1. SUBJECT ANCHOR — the full look lives in subject_definitions (REF2VA PROMPT 1. SUBJECT ANCHOR — subject_definitions is only a lean identity anchor (REF2VA
below): identity, every aspect of how they look, wardrobe head to toe, hair, PROMPT below): the <Subject 1> label and who the person is, tied to their
build — naming every body part the clothing leaves uncovered with "nude" subject reference image. The full look lives in the [Shot 1] body, woven into
(PROMPT CRAFT). The [Shot 1] body then opens by re-stating <Subject 1> with a the action as the scene exposes it: hair, build, and face as they move, every
compressed wardrobe+skin restatement. Nothing is shared between scenes or from garment where the action touches it, footwear where steps land, and every body
a prefix. 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. 2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
3. CONTINUITY ANCHOR — open inside the previous end_state (scene 1 instead 3. CONTINUITY ANCHOR — open inside the previous end_state (scene 1 instead
establishes place, light, and the first action). Name what carries over: the 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 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 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. 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 — - Describe the complete look in every scene, inside the [Shot 1] body — subject
face, hair, build, each garment head to toe, footwear — goes in the definitions stay a lean identity anchor and never carry the look. Weave the full
subject_definitions section, because each scene is a separate generation and nothing head-to-toe appearance into the action according to what is going on in the scene:
carries over. Any body part the clothing leaves uncovered must be named and called face, hair, and build as the body moves, each garment where the action touches it
"nude", never "bare": not "a man wearing a white tank-top" but "a man wearing a (a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
white tank-top with nude arms"; likewise nude legs under shorts, nude shoulders Any body part the clothing leaves uncovered is named and called "nude", never
under a sleeveless top, nude feet in sandals. The [Shot 1] body opens by re-stating "bare", stated where the scene exposes that skin: not "a man wearing a white
<Subject 1> with the same wardrobe+skin wording compressed into its first sentence. tank-top" but "a man wearing a white tank-top with nude arms"; likewise nude legs
"Nude" is the reliable skin-state word for uncovered body parts; "bare" is not. 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 - 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 specified in REF2VA PROMPT below; never add blank entries, extra prose lines, or a
second section header. 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 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 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: 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 1. "subject_definitions:" then one line per subject: "<Subject 1> ..." — a lean
the full head-to-toe look in PROMPT CRAFT wording ("nude" for every uncovered identity anchor only: who the person is, tied to their subject reference image
body part). Define <Subject 2> the same way when the outline casts a second (for example "<Subject 1> the night nurse, matching her subject reference
person. Never define a label twice; never define a label you do not use. 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 2. "summary:" then "[reference generation]" — exactly this directive on every scene
of this workflow, nothing else in the section. of this workflow, nothing else in the section.
3. "retention_analysis:" then one line per defined label: "<Subject 1>: 3. "retention_analysis:" then one line per defined label: "<Subject 1>:
@ -439,11 +451,8 @@ Correct reply:
"duration_seconds": 15, "duration_seconds": 15,
"prompt": [ "prompt": [
"subject_definitions:", "subject_definitions:",
"<Subject 1> is an adult bicycle courier with a lean build and short dark brown "<Subject 1> the adult bicycle courier, matching his subject reference
hair, wearing a mustard-yellow waterproof jacket zipped to the collar, dark teal image.",
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.",
"summary:", "summary:",
"[reference generation]", "[reference generation]",
"retention_analysis:", "retention_analysis:",
@ -453,10 +462,12 @@ Correct reply:
tracking shots at eye level.", tracking shots at eye level.",
"[Shot 1] Continue the exact mid-threshold "[Shot 1] Continue the exact mid-threshold
motion from the previous scene without resetting it: the front wheel rolls off the 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 concrete sill onto polished interior concrete as <Subject 1>, the same lean-built
bicycle courier in his mustard-yellow waterproof jacket, dark teal trousers, and adult bicycle courier with short dark brown hair under his charcoal helmet, in
charcoal helmet, pushes the silver bicycle forward down the central aisle, right his mustard-yellow waterproof jacket zipped to the collar, dark teal trousers,
hand on the handlebar, left thumb still hooked under the olive messenger bag strap 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 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 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 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 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 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 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 jaw, eyes flicking to the numbers, the helmet straps holding his nude ears close
on the floor; the wet hems of his trousers slap lightly with each step. Approaching to his head; a drop falls from the bicycle fender and bursts on the floor; the
the wooden potting table at the aisle's end, he slows the bicycle to a crawl and wet hems of his dark teal trousers slap lightly with each step, his silver-grey
his right hand leaves the handlebar, closing on the olive messenger flap.", 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:", "overall_soundscape:",
"the same steady rain drumming on the glass roof continues "the same steady rain drumming on the glass roof continues
overhead, tires humming on polished concrete, a single fender drop bursting on the 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 overall_soundscape / non_diegetic_music — each header on its own line, and
summary is exactly "[reference generation]". summary is exactly "[reference generation]".
4. subject_definitions defines <Subject 1> (and <Subject 2> when the outline casts a 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 second person) exactly once each as a lean identity anchor — who they are, tied
garment head to toe, footwear), naming every uncovered body part as "nude" — to the reference image, with no wardrobe list and no nude/bare state;
never "bare"; retention_analysis carries one valid entry per defined label; the retention_analysis carries one valid entry per defined label; the [Shot 1] body
[Shot 1] body re-states <Subject 1> with a wardrobe+skin restatement. 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 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. 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, 6. The [Shot 1] body carries every element of a scene composition — subject anchor,
@ -543,8 +558,9 @@ Correct reply:
distributed by the outline. distributed by the outline.
- **Prefix rule is unchanged:** fragments never carry `prompt_prefix`; the final plan - **Prefix rule is unchanged:** fragments never carry `prompt_prefix`; the final plan
always gets `"prompt_prefix": [""]` (the empirically better empty prefix), and each always gets `"prompt_prefix": [""]` (the empirically better empty prefix), and each
scene's subject_definitions plus its [Shot 1] body restate identity/wardrobe/style scene's lean subject_definitions anchor plus its [Shot 1] body — the full look
because nothing is shared from a prefix. 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 - **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 assembler and `scripts/build_plan.py` accept the raw object; fenced output also
parses. parses.

View File

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