long-div / scripts /generate_tier3_batch01.py
ymyy307's picture
Upload folder using huggingface_hub
5b12ab1 verified
Raw History Blame Contribute Delete
39.1 kB
#!/usr/bin/env python3
"""Build Tier 3 diverse benchmark cases 01-05 from approved blueprints."""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
OUTPUT = ROOT / "generated" / "tier3_batch01.json"
def spec(v, action, sound, speaker=None, text=None):
return {"v": v, "a": action, "sound": sound, "speaker": speaker, "text": text}
def subject_action(text: str, visible: list[str]) -> str:
for index, char_id in enumerate(visible, start=1):
text = text.replace(f"@{char_id[5:-1]}", f"<Subject {index}>")
if "@" in text:
raise ValueError(f"action references a non-visible identity: {text}")
return text
def prompt_for(
shot_no: int,
shot: dict,
characters: dict[str, str],
appeared_seen: set[str],
) -> str:
visible = shot["v"]
action = subject_action(shot["a"], visible)
dialogue = ""
if shot["speaker"]:
subject_no = visible.index(shot["speaker"]) + 1
dialogue = (
f"\n\n<Subject {subject_no}> (S1) says: "
f"<d>[English] {shot['text']}</d>"
)
if shot_no == 1:
identities = " ".join(
f"<Subject {index}> is {characters[char_id]}."
for index, char_id in enumerate(visible, start=1)
)
return (
"integrated_multimodal_description:\n"
f"[Shot 1] {identities} {action}{dialogue}\n\n"
f"overall_soundscape:\n{shot['sound']}\n"
)
definitions = "\n".join(
f"<Subject {index}> is {characters[char_id]}."
for index, char_id in enumerate(visible, start=1)
)
retention = "\n".join(
f"<Subject {index}>: fully_preserved - Maintain identity."
for index, char_id in enumerate(visible, start=1)
if char_id in appeared_seen
)
retention_prefix = retention + "\n" if retention else ""
return (
f"subject_definitions:\n{definitions}\n{{{{REFERENCE_DEFINITIONS}}}}\n\n"
"summary:\n{{REFERENCE_SUMMARY}}\n\n"
f"retention_analysis:\n{retention_prefix}{{{{REFERENCE_RETENTION}}}}\n\n"
f"detailed_description:\n[Shot 1] {action}{dialogue}\n\n"
f"overall_soundscape:\n{shot['sound']}\n"
)
def build_case(case_id, characters, target, first, reappearance, shots):
first_spoken: set[str] = set()
appeared_seen: set[str] = set()
built = []
for shot_no, item in enumerate(shots, start=1):
speakers = [item["speaker"]] if item["speaker"] else []
first_time = [x for x in speakers if x not in first_spoken]
first_spoken.update(speakers)
dialogue = []
if item["speaker"]:
dialogue.append(
{"character": item["speaker"], "language": "English", "text": item["text"]}
)
built.append(
{
"shot_no": shot_no,
"visible_characters": item["v"],
"speakers": speakers,
"first_time_speakers": first_time,
"dialogue": dialogue,
"prompt": prompt_for(shot_no, item, characters, appeared_seen),
}
)
appeared_seen.update(item["v"])
return {
"case_id": case_id,
"tier": 3,
"target_identity": target,
"first_appearance_shot": first,
"reappearance_shot": reappearance,
"absence_gap": reappearance - first - 1,
"characters": characters,
"shots": built,
}
def lighthouse_case():
chars = {
"<char1>": "an older Afro-Caribbean male lighthouse keeper with close-cropped silver hair, a weathered navy coat, and a brass whistle on a dark cord",
"<char2>": "a young East Asian female heritage guide with a chin-length black bob, a rust-red windbreaker, and a cream wool scarf",
"<char3>": "a middle-aged white male visitor with sandy hair, a moss-green rain jacket, and a black walking cane",
}
shots = [
spec(["<char2>", "<char3>"], "A wide entrance-hall shot shows @2 opening the curved inner door while @3 steps off the cliff path and pauses beside the first iron stair. Wind presses briefly against the outer door behind them.", "Wind around stone, a door hinge, and distant surf.", "<char2>", "We can take the climb one landing at a time."),
spec(["<char3>"], "From stair level, @3 tests the first two steps with his cane, then looks upward through the hollow center of the spiral stair as a band of daylight moves across the wall.", "Cane tip on iron, low wind, and a faint gull call.", "<char3>", "The handrail feels steady from here."),
spec(["<char2>", "<char3>"], "A restrained lateral follow keeps @2 one step ahead of @3 as they round the first landing. She opens a narrow window latch, and both turn toward the sudden view of white water below.", "Footsteps on iron, a window latch, and stronger surf."),
spec(["<char2>", "<char3>"], "A vertical wide shot through the stairwell shows @2 and @3 climbing slowly past two landings, their coats moving in the draft while the lantern room brightens above them.", "Measured footfalls, fabric in the draft, and the tower's low resonance."),
spec(["<char1>", "<char2>", "<char3>"], "At the lantern landing, @1 holds the heavy curved door as @2 and @3 arrive. He points out the lee-side balcony, then immediately turns into the service stair and begins descending to assess the lower visitor path.", "A heavy door settling, wind against glass, and three sets of footsteps.", "<char1>", "The sheltered balcony is open; I will check the lower path before dusk."),
spec(["<char2>", "<char3>"], "Inside the lantern room, @2 walks around the fixed lens housing while @3 remains near the inner rail. A pale reflection travels across their faces as cloud passes outside.", "Soft mechanism hum, wind around glass, and slow footsteps."),
spec(["<char2>", "<char3>"], "@2 pushes the balcony door outward against the breeze and waits while @3 crosses the threshold carefully. The camera stays inside, framing both figures against moving gray water.", "Door hardware, steady wind, and surf below."),
spec(["<char3>"], "On the lee-side balcony, @3 sits on the built-in wall seat and watches a patch of sunlight move across the water. His cane rests against his knee rather than becoming the focus of the frame.", "Muffled wind, seabirds, and distant water."),
spec(["<char2>", "<char3>"], "A medium two-shot shows @2 standing beside the curved wall and @3 rising from the seat as the cloud thickens. They both turn when the lantern glass briefly loses its warm reflection.", "Wind softening, coat fabric, and the tower mechanism."),
spec(["<char2>"], "@2 steps back into the lantern room and follows the slow sweep of reflected light across the inner wall, pausing at each window rather than handling any equipment.", "Low mechanical rotation and wind at multiple panes.", "<char2>", "The next clear interval should reach the south windows."),
spec(["<char2>", "<char3>"], "@2 and @3 begin descending, seen from below through the open center of the stair. Their pace remains even, and each briefly turns toward a narrow window on the next landing.", "Iron steps, calm breathing, and distant surf."),
spec(["<char3>"], "At a deep window recess, @3 sits for a moment and watches spray lift beyond the cliff edge. A thin shaft of light returns across the stone beside him.", "Soft wind through the frame and a cane touching stone once."),
spec(["<char2>", "<char3>"], "@2 waits on the lower step while @3 stands from the recess. She looks through the glass toward the sheltered side of the tower, and he follows her gaze.", "Clothing movement, one footstep, and surf.", "<char2>", "The lee side is already calmer than the upper balcony."),
spec(["<char2>", "<char3>"], "They pass through a small side door onto a protected semicircular balcony. A locked-off wide shot lets their bodies and the tower wall show how little the wind reaches this side.", "Muted wind, a door latch, and distant gulls."),
spec(["<char2>", "<char3>"], "A close two-shot catches @2's scarf settling while @3 removes one hand from his hood. Both face the cliff path below as the moving cloud edge becomes visible over the sea.", "Fabric settling and a broader wash of surf."),
spec(["<char2>", "<char3>"], "Back inside, @2 leads @3 down the final flight. The entrance hall grows brighter with reflected evening light as they turn around the last central column.", "Descending iron steps and the outer door rattling lightly."),
spec(["<char3>"], "@3 pauses at the entrance window and studies the lower public path, now partly lit beyond the gate. He shifts his weight, then turns toward the exit.", "Wind beyond glass and a quiet cane adjustment.", "<char3>", "That lower stretch looks much more sheltered now."),
spec(["<char2>", "<char3>"], "@2 opens the outer door and steps onto the threshold first. @3 follows, and both stop briefly as the brighter cloud break reaches the tower wall.", "Outer door, open wind, and surf growing clearer."),
spec(["<char2>", "<char3>"], "A rear walking shot follows @2 and @3 down the first part of the public path. Low grass bends toward the cliff while the tower recedes behind them.", "Footsteps on packed gravel, grass in wind, and seabirds."),
spec(["<char2>", "<char3>"], "At a bend protected by a stone wall, @2 slows and lets @3 take the inside line. Their shadows lengthen as the path turns toward the lower gate.", "Gravel footsteps and softer wind behind stone."),
spec(["<char1>", "<char2>", "<char3>"], "The bend reveals @1 already holding the lower gate open from the sheltered side. @2 and @3 approach him while a clean band of sunlight reaches the path beyond.", "Gate hinges, subdued wind, footsteps, and surf."),
spec(["<char1>", "<char2>", "<char3>"], "A gentle lateral follow shows @1 walking beside @3 through the gate while @2 moves slightly ahead. No one rushes, and the stone wall continues to block the strongest gusts.", "Three walking rhythms on gravel and low coastal wind."),
spec(["<char1>", "<char3>"], "@1 stops at a broad viewpoint and lets @3 choose a position near the wall. Both turn toward the lighthouse as the lantern reflection returns in the clearing sky.", "Distant mechanism, surf, and quiet wind.", "<char1>", "This is the most protected viewpoint when the wind comes from the west."),
spec(["<char1>", "<char2>", "<char3>"], "A final wide shot holds all three figures on the lower path, spaced naturally along the wall as the lighthouse beam becomes visible in the early dusk.", "Even surf, a mild breeze, and the faint tower mechanism; no music."),
]
return build_case("worker_01_tier3", chars, "<char1>", 5, 21, shots)
def tram_case():
chars = {
"<char1>": "a middle-aged South Asian male tram conductor with neatly combed black hair, a burgundy transit jacket, and a silver pocket watch chain",
"<char2>": "a middle-aged Black female accessibility consultant with short natural curls, a cobalt coat, and a matte black forearm crutch",
"<char3>": "a young Latino male depot apprentice with wavy dark hair, a tan work jacket, and dark green trousers",
}
shots = [
spec(["<char2>", "<char3>"], "A platform-wide shot shows @2 approaching the stationary restored tram while @3 slides the center doors open from inside. Morning light runs along the empty inspection lane.", "Sliding doors, a quiet depot fan, and distant birds.", "<char2>", "Let us test the route from the platform before anyone boards."),
spec(["<char3>"], "@3 steps down to the platform and walks the full length of the tram, checking the clear space with his own stride rather than using a measuring tool.", "Boots on concrete and the soft electrical hum of the parked tram.", "<char3>", "The rear entrance has the widest approach."),
spec(["<char2>", "<char3>"], "A low platform-level shot follows @2 and @3 toward the rear doors. @2 turns through the approach once while @3 watches from beside the door frame.", "Crutch tip, footsteps, and an open doorway hum."),
spec(["<char2>", "<char3>"], "Inside the empty tram, @2 moves down the aisle and pauses at a transverse seat. @3 remains at the rear door, giving the narrow aisle a clear depth line.", "Interior ventilation and muted steps on the tram floor."),
spec(["<char1>", "<char2>", "<char3>"], "@1 enters from the front cab and demonstrates a smooth turn beside the priority seats, then opens the front cab door and continues out toward the alternate platform entrance.", "Cab door, light footsteps, and depot ambience.", "<char1>", "I will check the front approach while you continue from the rear."),
spec(["<char2>", "<char3>"], "@2 sits in the first priority seat and studies the view toward the open rear doors. @3 stands farther down the aisle to keep the passage visually clear.", "Seat cushion settling and steady ventilation."),
spec(["<char2>", "<char3>"], "@2 rises and walks toward the articulation joint while @3 steps into a doorway recess. Their positions show how two people can pass without crowding the aisle.", "Footsteps, clothing movement, and a faint tram relay click."),
spec(["<char3>"], "From outside, @3 lowers the manual rear ramp in one controlled motion and steps aside. The ramp meets the platform without anyone immediately crossing it.", "Ramp hinge and a firm rubber contact on concrete."),
spec(["<char2>"], "@2 approaches the ramp from an oblique angle, pauses, and then walks up at a natural pace. A fixed side view keeps her full movement visible.", "Crutch and shoes on the ramp, with quiet depot air."),
spec(["<char2>", "<char3>"], "Inside again, @2 turns toward the window while @3 raises the ramp and closes only the rear-left door. The opposite leaf remains open to preserve the route.", "Ramp folding, one door sliding, and ventilation."),
spec(["<char2>"], "@2 sits in a forward-facing seat and looks across the aisle, then toward the platform through the open doorway. Reflections from the depot roof move over the glass.", "Low electrical hum and a distant metal clink."),
spec(["<char2>", "<char3>"], "@3 walks outside along the inspection lane while @2 watches through successive windows. The camera tracks parallel to him at a restrained pace.", "Footsteps beside the tram and light outdoor air."),
spec(["<char3>"], "At the middle doors, @3 steps back aboard and sits briefly in the aisle-facing seat to compare its sightline with the rear section.", "Door threshold step and seat fabric.", "<char3>", "From here, the rear door signal is still easy to see."),
spec(["<char2>", "<char3>"], "@2 and @3 exchange positions: she moves to the aisle-facing seat while he stands near the center pole. Their motion is deliberate but conversational.", "Soft footsteps and interior ventilation."),
spec(["<char2>", "<char3>"], "They leave through the center doors and turn toward the tram's exterior lane. A wide shot holds the full stationary vehicle and their slow progress beside it.", "Concrete footsteps, open-air depot ambience, and a distant gull."),
spec(["<char2>"], "@2 stops opposite the front half of the tram and looks through the windows toward the empty seats. Her coat moves lightly in air passing through the depot.", "Fabric movement and the parked tram's low hum."),
spec(["<char2>", "<char3>"], "@3 opens the rear doors from the exterior button while @2 waits at a realistic boarding distance. Both watch the two door leaves clear the opening.", "Button tone and twin doors sliding."),
spec(["<char2>", "<char3>"], "A rear three-quarter view follows @2 into the tram with @3 several paces behind. The aisle ahead appears empty and evenly lit.", "Ramp-free threshold steps and quiet interior air."),
spec(["<char2>", "<char3>"], "They continue through the rear section, each turning sideways once around a vertical pole. The camera remains at seated eye level to emphasize the changing sightlines.", "Shoes on flooring and a faint pole vibration."),
spec(["<char2>"], "@2 pauses by the articulation joint and looks toward a figure seated farther ahead, still partly screened by the tram's bend. She continues forward without calling out.", "Interior hum and the soft creak of the articulation."),
spec(["<char1>", "<char2>", "<char3>"], "The bend opens to reveal @1 seated midway down the car, viewing the front doors from passenger height. He stands as @2 and @3 reach the same section.", "Seat movement, approaching footsteps, and quiet ventilation."),
spec(["<char1>", "<char2>"], "@1 takes the aisle position while @2 sits where he had been, allowing her to test the same front-door sightline. They turn toward the platform together.", "Clothing movement and a distant door relay."),
spec(["<char1>", "<char2>", "<char3>"], "@3 opens the front doors from the cab-side panel as @1 gestures toward the clear exit. @2 rises and approaches at her own pace.", "Front doors sliding and measured footsteps.", "<char1>", "This seat keeps both the exit and the platform edge in view."),
spec(["<char1>", "<char2>", "<char3>"], "All three step onto the covered platform through the front doors and spread naturally across the boarding area rather than forming a line.", "Three sets of footsteps and open depot ambience."),
spec(["<char1>", "<char2>", "<char3>"], "A final exterior wide holds the stationary tram as @2 walks the alternate approach with @1 beside her and @3 observing from the doorway.", "Light wind under the roof, footsteps, and a quiet parked tram; no music."),
]
return build_case("worker_02_tier3", chars, "<char1>", 5, 21, shots)
def courtyard_case():
chars = {
"<char1>": "a young Middle Eastern father with short dark curls, a slate-blue overshirt, and a mustard knitted scarf",
"<char2>": "an elderly East Asian female neighbor with a silver bob, a plum cardigan, and soft gray trousers",
"<char3>": "a young Black nonbinary graduate student with shoulder-length twists, a forest-green rain vest, and round amber glasses",
}
shots = [
spec(["<char2>"], "In a courtyard-wide morning shot, @2 walks beneath two laundry lines and lifts one white sheet edge to judge the strengthening breeze. Upper walkways frame the open sky above her.", "Fabric moving, courtyard birds, and distant neighborhood traffic.", "<char2>", "The air has changed; these sheets will need the covered passage soon."),
spec(["<char3>"], "@3 comes down the open stair carrying a light wicker basket against one hip, then stops at the landing to watch the first fine drops darken the rail.", "Basket weave, soft steps, and the first sparse rain.", "<char3>", "I can clear the upper line before the rain settles in."),
spec(["<char2>", "<char3>"], "A gentle upward pan follows @2 pointing toward the north balcony while @3 climbs the remaining stairs. A long towel lifts between them in the breeze.", "Cloth snapping softly and footsteps on concrete."),
spec(["<char2>", "<char3>"], "From the courtyard floor, @2 unclips one sheet and folds it loosely over her forearms while @3 reaches the upper walkway and opens a balcony door.", "Clothespins, fabric, and light rain on metal rails."),
spec(["<char1>", "<char2>", "<char3>"], "@1 steps onto the upper walkway with a small bundle of children's bedding. He exchanges a brief glance with @2 below, then carries the bedding through his apartment door before the rain increases.", "Door movement, fabric, and rain beginning on the courtyard paving.", "<char1>", "I will get this inside; use the covered passage for the larger sheets."),
spec(["<char2>", "<char3>"], "@3 descends with the now-empty basket while @2 crosses toward the sheltered passage carrying the loose sheet. Raindrops become visible across the center of the courtyard.", "Faster rain, footsteps, and broad fabric movement."),
spec(["<char2>", "<char3>"], "Under cover, @2 and @3 stand several paces apart and drape the sheet along the inner line, each holding one end before letting it settle.", "Rain on the passage roof and damp cloth shifting."),
spec(["<char3>"], "@3 returns briefly into the open courtyard, reaches up for two smaller garments, and steps back beneath the roof as water begins to run along the drain channel.", "Rain, quick footfalls, and clothespins releasing."),
spec(["<char2>"], "@2 sits on the passage ledge with folded linens beside her, watching the remaining laundry move under the rain. She makes no attempt to reorganize it further.", "Steady rain and fabric flutter under cover."),
spec(["<char2>", "<char3>"], "A doorway two-shot shows @3 standing near the courtyard edge while @2 rises from the ledge. They both turn toward a stronger burst of rain crossing the open center.", "Rain intensifying against paving and roof."),
spec(["<char2>", "<char3>"], "@2 and @3 walk the length of the covered passage, closing one exposed side gate and leaving the opposite end open for airflow.", "Gate hinge, footsteps, and rain echo."),
spec(["<char3>"], "At the open end, @3 leans lightly against the wall and watches water spill from a short roof chain into a stone basin.", "Water chain, basin splashes, and distant thunder."),
spec(["<char2>"], "@2 crosses from the passage into a ground-floor doorway during a softer interval and returns immediately with a dry shoulder wrap already around her.", "Door latch, reduced rain, and slippers on damp stone.", "<char2>", "The heaviest part is moving past us now."),
spec(["<char2>", "<char3>"], "They sit at opposite ends of the passage ledge as the sheet between them hangs stiller. Reflected light from the wet courtyard gradually brightens their faces.", "Rain easing and water continuing through the drains."),
spec(["<char3>"], "@3 stands and steps to the roof edge, holding one palm outside for a moment before looking up toward the broken cloud.", "Sparse drops from the roof and quiet courtyard ambience."),
spec(["<char2>", "<char3>"], "A wide shot shows @2 and @3 walking back into the courtyard. They leave the sheltered sheet in place and simply inspect the open space as the rain becomes intermittent.", "Light dripping, footsteps on wet paving, and birds returning."),
spec(["<char2>"], "@2 opens the side gate again and lets a mild breeze pass across the wet courtyard. The hanging garments begin to move without snapping.", "Gate movement, soft breeze, and water drops."),
spec(["<char2>", "<char3>"], "@3 climbs to the first landing while @2 remains below. They look across different levels toward sunlight reaching the opposite upper walkway.", "Stair footsteps, drain water, and distant voices beyond the building."),
spec(["<char3>"], "@3 reaches the north balcony and opens its door wider. A band of sun travels along the rail and catches small droplets on the remaining line.", "Balcony door and isolated drops from fabric."),
spec(["<char2>", "<char3>"], "@2 carries one end of the sheltered sheet into the courtyard while @3 comes down to meet the other end. They pause as another brief shower passes beyond the building but misses the courtyard.", "Broad cloth movement, stairs, and distant rain."),
spec(["<char2>", "<char3>"], "They return the sheet to the open line with a single coordinated lift, then step apart to see how the clearing breeze reaches it.", "Cloth settling, a few clothespins, and mild wind."),
spec(["<char1>", "<char2>", "<char3>"], "Across the courtyard, @1 opens an opposite upper door and steps onto the sunlit walkway. He holds the door wide while @2 and @3 look up from the line below.", "Upper door hinge, courtyard birds, and a light breeze."),
spec(["<char1>", "<char3>"], "@1 walks along the upper rail as @3 climbs toward him with the empty basket. Their movement converges at the landing without crowding the narrow space.", "Basket weave, steps, and water dripping from rails.", "<char1>", "The upper line is dry enough to use again."),
spec(["<char1>", "<char2>", "<char3>"], "@2 remains in the courtyard while @1 and @3 each open a different balcony door, creating a natural cross-breeze through the surrounding walkways.", "Two doors, fabric stirring, and neighborhood ambience."),
spec(["<char1>", "<char2>", "<char3>"], "A final courtyard-wide shot holds the three neighbors at separate levels as the linens move gently in clean post-rain light.", "Soft fabric, residual dripping, and distant street life; no music."),
]
return build_case("worker_03_tier3", chars, "<char1>", 5, 22, shots)
def wetland_case():
chars = {
"<char1>": "a middle-aged Indigenous female wetland ranger with two long black braids, a dark green field jacket, and carved cedar earrings",
"<char2>": "an older East Asian male birdwatcher with neatly cut gray hair, a brown waterproof coat, and compact binoculars",
"<char3>": "a young white female audio student with auburn hair in a low ponytail, a navy rain shell, and small over-ear field headphones",
}
shots = [
spec(["<char2>"], "A long-lens dawn view shows @2 stepping from the trailhead onto the first section of boardwalk. He pauses before raising his binoculars, letting a distant call pass first.", "Reeds, soft water, boardwalk steps, and distant birds.", "<char2>", "There is a low call beyond the first reed bend."),
spec(["<char3>"], "@3 follows several paces behind and removes one headphone cup to compare the open air with her recorder's quiet monitor level.", "Light footsteps, reed movement, and a faint equipment rustle.", "<char3>", "I will keep the monitor low and listen directly between stops."),
spec(["<char2>", "<char3>"], "A rear walking shot holds @2 and @3 moving around a reed-lined curve. Both stop when ripples spread beneath a patch of floating grass.", "Boardwalk creaks, water ripples, and layered bird calls."),
spec(["<char2>", "<char3>"], "Inside the first blind, @2 sits near a narrow opening while @3 remains standing at the darker rear wall. Dawn light outlines them without revealing any nearby wildlife.", "Muffled reeds, quiet breathing, and a distant wingbeat."),
spec(["<char2>", "<char3>"], "They leave the blind and continue toward a fork, using the outer rail only on the damp turn. The boardwalk ahead divides around a broad stand of reeds.", "Footsteps on damp wood and soft marsh wind."),
spec(["<char1>", "<char2>", "<char3>"], "At the fork, @1 steps from the alternate branch and gestures for everyone to pause. She describes the listening interval, then follows that branch away to inspect a low section touched by morning water.", "Reeds, quiet water beneath boards, and three still figures.", "<char1>", "Listen for a full minute here; I will check the lower branch ahead."),
spec(["<char2>", "<char3>"], "@2 and @3 remain at opposite rails of the fork. Neither speaks as a sequence of short calls shifts from the left reeds to the open water.", "Multiple distant bird calls, reeds, and water."),
spec(["<char3>"], "@3 sits on the low boardwalk rest ledge and closes her eyes for several seconds, then turns her head toward a call behind the blind.", "Headphone fabric, breeze, and a single hollow call."),
spec(["<char2>"], "@2 raises his binoculars toward the open sky rather than the reeds, follows one distant movement, and lowers them without pointing it out.", "Soft binocular strap and high bird calls."),
spec(["<char2>", "<char3>"], "They take the main branch together, walking slowly past water visible between the boards. @3 keeps one headphone cup off her ear.", "Alternating footsteps, water below, and reed hiss."),
spec(["<char2>", "<char3>"], "A wide environmental shot places both observers small against a broad reed bed. They stop at different points along the rail and face separate directions.", "Marsh wind and scattered dawn calls."),
spec(["<char3>"], "@3 crouches briefly near the rail to listen closer to the water surface, then stands as a frog call repeats farther down the channel.", "Frog calls, gentle water, and clothing movement."),
spec(["<char2>"], "@2 sits on a narrow bench cut into the boardwalk widening and watches the reeds bend in a passing breeze.", "Bench wood, breeze through reeds, and distant waterfowl."),
spec(["<char2>", "<char3>"], "@3 joins @2 at the widening but remains standing. They exchange a glance when the same three-note call returns from the opposite bank.", "Three-note bird call and soft marsh ambience.", "<char3>", "That one has moved across the channel since the fork."),
spec(["<char2>", "<char3>"], "They continue toward a second blind with @2 leading. The camera tracks from the parallel bank, keeping their steady pace within the larger wetland.", "Boardwalk rhythm and open water ambience."),
spec(["<char2>"], "Within the second blind, @2 stands at a high slit and slowly turns from the water view to a gap in the reeds behind him.", "Muffled bird calls and wood settling."),
spec(["<char3>"], "@3 remains outside beneath the blind's small overhang, listening to droplets fall from its roof into the marsh grass.", "Roof drops, grass movement, and a distant call."),
spec(["<char2>", "<char3>"], "@2 exits the blind and both observers walk down a straight section toward the observation shelter now visible beyond low reeds.", "Footsteps, light wind, and broader open-water sound."),
spec(["<char2>", "<char3>"], "A side profile shows them slowing together as a group of distant birds crosses high above the shelter. They look up without raising equipment.", "High wingbeats and quiet boardwalk creaks."),
spec(["<char3>"], "@3 removes her headphones fully and lets them rest around her neck as the soundscape becomes clearer near open water.", "Headphone movement, water, and layered calls.", "<char3>", "The open water is carrying the calls much farther."),
spec(["<char2>", "<char3>"], "They reach a final bend where damp boards brighten in the rising sun. @2 takes the inside rail and @3 follows across the dry center.", "Footsteps and a mild breeze."),
spec(["<char2>"], "@2 pauses outside the shelter entrance, lowers his binoculars, and looks through the open structure toward a newly active reed bed.", "Reed chatter and the shelter roof creaking lightly."),
spec(["<char1>", "<char2>", "<char3>"], "Inside the shelter, @1 is already seated on the far bench facing the reed bed. @2 enters first while @3 remains at the doorway, and the three listen without immediate conversation.", "Dense but distant bird calls, water, and still human movement."),
spec(["<char1>", "<char2>"], "@1 stands from the bench and moves to a side opening beside @2. She indicates a listening direction with her gaze rather than a broad gesture.", "Reeds and one repeating liquid call.", "<char1>", "The deeper call is coming from the flooded grass, not the open channel."),
spec(["<char1>", "<char2>", "<char3>"], "A final long-lens view from outside frames all three as quiet silhouettes in separate shelter openings while the wetland brightens around them.", "Birds, reeds, and calm water; no music."),
]
return build_case("worker_04_tier3", chars, "<char1>", 6, 23, shots)
def theater_case():
chars = {
"<char1>": "a middle-aged Latina female actor with shoulder-length dark curls, a deep red rehearsal blouse, and black wide-leg trousers",
"<char2>": "a young Black male actor with short twists, a pale blue crewneck sweater, and charcoal trousers",
"<char3>": "an older white male director with swept-back gray hair, a soft brown jacket, and thin rectangular glasses",
}
shots = [
spec(["<char2>"], "An auditorium-wide shot shows @2 walking from the rear aisle to the empty stage, crossing through a band of work light before stopping at center.", "Measured footsteps, room tone, and a faint curtain rail.", "<char2>", "I can hold the first pause at center instead of near the chair."),
spec(["<char3>"], "@3 sits alone in the fifth row, watches the empty space beside center stage, then stands and moves two seats toward the aisle for a clearer diagonal view.", "Seat cushions, clothing movement, and quiet theater air.", "<char3>", "Keep the pause visible from both side sections."),
spec(["<char2>", "<char3>"], "@2 crosses from center to the single stage chair while @3 walks down the side aisle in parallel. Neither handles notes or props.", "Stage boards and aisle footsteps."),
spec(["<char2>", "<char3>"], "A wing-framed view shows @2 sit, wait through a silent beat, and rise only after @3 reaches the front row. The curtain edge moves slightly beside the camera.", "Chair legs, subtle curtain movement, and room tone."),
spec(["<char1>", "<char2>", "<char3>"], "@1 enters from stage left, crosses behind the chair, and stops in a shared eyeline with @2. After one short line, she continues through the upstage crossover to rehearse a later entrance from the far auditorium aisle.", "Stage footsteps, curtain fabric, and a backstage door.", "<char1>", "I will let the silence arrive before I cross behind you."),
spec(["<char2>", "<char3>"], "@2 repeats the seated pause while @3 remains at the front row. This time @2 looks toward the empty stage-left entrance, then deliberately returns his gaze to the audience.", "Chair settling and distant backstage room tone."),
spec(["<char3>"], "@3 walks onto the stage and stands where the absent entrance had ended, checking the eyeline from actor height before moving away.", "Shoes on stage boards.", "<char3>", "The turn reads better when it begins after the second breath."),
spec(["<char2>", "<char3>"], "@2 and @3 walk the diagonal together from the chair to downstage right, maintaining enough distance for two distinct silhouettes.", "Two walking rhythms and soft theater ventilation."),
spec(["<char2>"], "Alone on stage, @2 crosses toward the side aisle, steps down carefully, and continues three rows into the auditorium before turning back toward the chair.", "Stage step and aisle carpet underfoot."),
spec(["<char2>", "<char3>"], "From the stage, @3 watches the reversed direction and slowly turns his head from the chair to @2 in the aisle.", "Quiet room tone and a distant building creak."),
spec(["<char2>", "<char3>"], "@2 returns to the stage by the opposite step while @3 moves into the wing. Their paths cross at different depths without meeting.", "Footsteps on carpet and wood."),
spec(["<char2>"], "@2 sits in the chair facing three-quarters away from the auditorium, then rotates only his shoulders toward the empty aisle entrance.", "Chair fabric and a faint curtain shift.", "<char2>", "If I stay seated, the entrance carries more weight."),
spec(["<char2>", "<char3>"], "@3 steps from the wing and walks around @2's sightline, testing whether his own movement distracts from the intended entrance.", "Soft shoes and room tone."),
spec(["<char3>"], "@3 takes a seat at the end of the first row and looks back through the auditorium toward the far doors, now visible as a bright rectangle.", "Seat settling and distant lobby ventilation."),
spec(["<char2>"], "@2 leaves the chair and crosses slowly toward stage left, stopping before the wing so the empty chair remains in the same frame.", "Stage boards and restrained breathing."),
spec(["<char2>", "<char3>"], "A locked auditorium wide shows @2 hold the stage-left position while @3 walks halfway up the center aisle and turns to compare the composition.", "Aisle footsteps fading into the room."),
spec(["<char3>"], "@3 sits midway up the aisle section and gestures once for the sequence to continue, then lowers his hands and simply watches.", "Clothing movement and steady room tone."),
spec(["<char2>"], "@2 enters again from the wing, crosses behind the chair, and lets the final two steps slow before he faces the far auditorium doors.", "Stage footsteps and curtain fabric."),
spec(["<char2>", "<char3>"], "@2 steps down into the side aisle while @3 moves toward the opposite aisle, creating two quiet lines through the empty seating.", "Carpeted footsteps on opposite sides."),
spec(["<char2>"], "From near the front row, @2 looks toward the rear doors as their lobby light dims slightly, then sits at the aisle end without speaking.", "Seat cushion and low ventilation."),
spec(["<char3>"], "@3 reaches the back cross-aisle and turns toward the stage, leaving the center route completely clear.", "Distant footsteps and auditorium room tone.", "<char3>", "Hold this spacing; the far entrance now has a clean path."),
spec(["<char2>", "<char3>"], "A long static shot holds @2 seated near the front and @3 standing at the back as both wait through the planned silent interval.", "Quiet building ambience and a slight curtain rail click."),
spec(["<char1>", "<char2>", "<char3>"], "The rear doors open and @1 enters from the lobby, walking down the center aisle at an unhurried pace. @2 turns from his seat only after she reaches the middle rows, while @3 watches from the side.", "Doors opening, measured aisle footsteps, and room tone."),
spec(["<char1>", "<char2>"], "@1 stops beside @2's row and holds his gaze across the empty seats. He stands, and they take the final few steps toward the stage together.", "Seat folding and two sets of footsteps."),
spec(["<char1>", "<char2>", "<char3>"], "On stage, @1 crosses behind the chair as rehearsed while @2 remains seated and @3 observes from the first row. The pause lands without additional movement.", "Stage boards, chair fabric, and quiet air.", "<char1>", "I thought the room would feel smaller when I came back."),
spec(["<char1>", "<char2>", "<char3>"], "A final auditorium wide shows @1 and @2 standing on opposite sides of the chair while @3 walks slowly back up the aisle, ending the rehearsal without applause or music.", "Soft footsteps, stage room tone, and a curtain settling; no music."),
]
return build_case("worker_05_tier3", chars, "<char1>", 5, 23, shots)
def main():
cases = [lighthouse_case(), tram_case(), courtyard_case(), wetland_case(), theater_case()]
OUTPUT.parent.mkdir(parents=True, exist_ok=True)
OUTPUT.write_text(json.dumps(cases, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
print(json.dumps({"output": str(OUTPUT), "cases": len(cases), "shots": sum(len(c["shots"]) for c in cases)}, indent=2))
if __name__ == "__main__":
main()