Phase 1 implementation: script ingestion + AI extraction pipeline
Complete working pipeline from Fountain script to validated scene JSON: - Schemas (Pydantic): all 7 layers defined upfront - Fountain parser + normalizer (Layer 1) - AI scene extractor with prompt contracts (Layer 2) - Schema validator + scene-specific semantic validator - Structured JSON logging per layer/scene execution - Versioned output writer (never overwrites) - Retry engine with 4-level failure escalation - Stop condition evaluator (per-unit + global halts) - Diff/drift detector for re-run comparison - CLI entry point with --dry-run, --scene, --test, --force - 3 test scripts (dialogue-heavy, action-heavy, nonstandard) - Expected output files for regression testing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
Title: Loose Threads
|
||||
Author: Test Script
|
||||
|
||||
====
|
||||
|
||||
apartment - morning
|
||||
|
||||
NADIA wakes up on the couch. Still in yesterday's clothes. Her phone buzzes on the coffee table — 14 missed calls.
|
||||
|
||||
She ignores it and walks to the kitchen.
|
||||
|
||||
NADIA
|
||||
(to herself)
|
||||
Not today.
|
||||
|
||||
She opens the fridge. Empty except for a bottle of hot sauce.
|
||||
|
||||
INT GROCERY STORE DAY
|
||||
|
||||
Nadia pushes a cart through fluorescent aisles. She looks half-asleep. Her phone rings again. She silences it.
|
||||
|
||||
at the checkout, TOMMY (20s, works here, knows everybody) scans her items.
|
||||
|
||||
TOMMY
|
||||
You look rough.
|
||||
|
||||
NADIA
|
||||
Didn't sleep.
|
||||
|
||||
TOMMY
|
||||
Your brother was in here earlier looking for you.
|
||||
|
||||
Nadia freezes.
|
||||
|
||||
NADIA
|
||||
What did you tell him?
|
||||
|
||||
TOMMY
|
||||
Nothing. I don't get involved.
|
||||
|
||||
EXT. PARKING LOT - DAY
|
||||
|
||||
Nadia loads groceries into her car. A beat-up sedan is parked three spaces away. DEREK (30s, her brother, intense) leans against it.
|
||||
|
||||
DEREK
|
||||
We need to talk.
|
||||
|
||||
NADIA
|
||||
No we don't.
|
||||
|
||||
DEREK
|
||||
It's about the house.
|
||||
|
||||
NADIA
|
||||
I said no.
|
||||
|
||||
She gets in her car and drives away. Derek watches her go.
|
||||
|
||||
nadia's apartment - night
|
||||
|
||||
Nadia sits at her kitchen table eating cereal. A KNOCK at the door. She doesn't move. Another KNOCK.
|
||||
|
||||
MRS. PETROV (O.S.)
|
||||
Nadia, I know you're in there. I can hear the television.
|
||||
|
||||
Nadia mutes the TV and stays quiet.
|
||||
|
||||
MRS. PETROV (O.S.)
|
||||
Your rent is late again, dear.
|
||||
|
||||
NADIA
|
||||
(calling out)
|
||||
I'll have it Friday!
|
||||
|
||||
MRS. PETROV (O.S.)
|
||||
That's what you said last Friday.
|
||||
|
||||
Silence. Footsteps recede.
|
||||
|
||||
EXT. BUS STOP - EARLY MORNING
|
||||
|
||||
Nadia waits at a bus stop, duffel bag at her feet. The sun is barely up. Nobody else around.
|
||||
|
||||
Her phone rings. She looks at the screen — "DEREK." She answers.
|
||||
|
||||
NADIA
|
||||
What.
|
||||
|
||||
DEREK (V.O.)
|
||||
The lawyer says we have to both sign or we lose everything.
|
||||
|
||||
NADIA
|
||||
Maybe we should lose everything.
|
||||
|
||||
DEREK (V.O.)
|
||||
You don't mean that.
|
||||
|
||||
NADIA
|
||||
Don't tell me what I mean.
|
||||
|
||||
She hangs up. The bus arrives. She boards.
|
||||
|
||||
INT - BUS - MORNING
|
||||
|
||||
Nadia sits in the back. PASSENGER (elderly woman) across the aisle knits something blue.
|
||||
|
||||
PASSENGER
|
||||
Going far?
|
||||
|
||||
NADIA
|
||||
Hopefully.
|
||||
|
||||
The bus pulls away.
|
||||
|
||||
EXT GAS STATION - AFTERNOON
|
||||
|
||||
The bus has stopped. Passengers mill around. Nadia buys a sandwich from a vending machine and sits on the curb.
|
||||
|
||||
Her phone has 3 new texts from Derek. She reads them:
|
||||
|
||||
"Please just call me"
|
||||
"This isn't about us this is about mom's house"
|
||||
"Nadia"
|
||||
|
||||
She types: "I need a few days." Sends it.
|
||||
|
||||
.FLASHBACK - INT. FAMILY HOUSE - KITCHEN - YEARS AGO
|
||||
|
||||
Young NADIA (12) and young DEREK (16) sit at the kitchen table. Their MOTHER sets plates in front of them.
|
||||
|
||||
MOTHER
|
||||
Eat your dinner before it gets cold.
|
||||
|
||||
YOUNG DEREK
|
||||
Mom, can I go to Tyler's after?
|
||||
|
||||
MOTHER
|
||||
After you clean your room.
|
||||
|
||||
YOUNG NADIA
|
||||
His room is disgusting.
|
||||
|
||||
YOUNG DEREK
|
||||
Shut up.
|
||||
|
||||
MOTHER
|
||||
Both of you. Eat.
|
||||
|
||||
A normal evening. Nothing special. Everything special.
|
||||
|
||||
INT. MOTEL ROOM - NIGHT
|
||||
|
||||
Cheap. Clean enough. Nadia drops her duffel on the bed and lies down without undressing.
|
||||
|
||||
She stares at the ceiling for a long time.
|
||||
|
||||
Then she calls Derek.
|
||||
|
||||
DEREK (V.O.)
|
||||
Nadia?
|
||||
|
||||
NADIA
|
||||
Tell the lawyer I'll sign.
|
||||
|
||||
DEREK (V.O.)
|
||||
Really?
|
||||
|
||||
NADIA
|
||||
But I want to go through the house first. Before they clear it.
|
||||
|
||||
DEREK (V.O.)
|
||||
...okay. Yeah. We can do that.
|
||||
|
||||
NADIA
|
||||
I'll be back Thursday.
|
||||
|
||||
DEREK (V.O.)
|
||||
Okay. Drive safe. Or... bus safe. Whatever.
|
||||
|
||||
NADIA
|
||||
(almost smiling)
|
||||
Goodnight, Derek.
|
||||
|
||||
She hangs up. Closes her eyes.
|
||||
|
||||
> FADE OUT.
|
||||
Reference in New Issue
Block a user