Scripts are not clean data. They are scene headings, action lines, dialogue, parentheticals, formatting habits, production cruft, and occasionally a PDF that appears to have survived a small war. Fabula reads them as scripts, not as generic text.
The first unit it looks for is the beat: the smallest useful movement inside a scene. Someone enters. A request is made. A mood turns. A prop becomes important. Each beat comes back with the characters involved, the objects in play, the setting, and the emotional shift it produces. That is where the graph starts.
// Beat extraction · The Night Manager · Cairo · Nefertiti Hotel
[
{
"beat_uuid": "beat-1",
"sequence_in_scene": 1,
"action_description": "Jonathan Pine answers the phone and
receives a request from Sophie Alekan to bring a scotch and
soda to her room.",
"involved_character_mentions": ["PINE", "SOPHIE"],
"key_objects_mentioned": ["phone", "scotch and soda"],
"setting_details": ["Nefertiti Hotel, Foyer, Night"],
"emotional_shift": "neutral to attentive"
},
{
"beat_uuid": "beat-2",
"sequence_in_scene": 2,
"action_description": "Sophie Alekan asserts her familiarity
with the hotel and her preference for Jonathan Pine to
personally bring the drink, establishing a direct and
intimate request.",
"involved_character_mentions": ["SOPHIE", "PINE"],
"emotional_shift": "attentive to intrigued"
}
]
A show does not use one clean name for one clean thing. Picard is “The Captain” until he is “Jean-Luc.” Worf changes rank, title, and context. The Brigadier returns across decades of Doctor Who with new uniforms, new writers, and new Doctors beside him. A spreadsheet sees drift. Fabula sees continuity.
Resolution is where messy mentions become canonical entities. Rank changes, aliases, absences, promotions, disguises, and role shifts do not fork the character; they become state changes on the same underlying person. When two things really are different — two ships called Enterprise, two similar props, two people with the same name — Fabula makes the split explicitly and records why.
Not vector similarity. Not “close enough.” Adjudication with receipts.
// Entity adjudication · Star Trek TNG · KEEP_SEPARATE
{
"decision": "KEEP_SEPARATE",
"confidence": 0.98,
"reasoning": "The source entity ('Enterprise Crew's First Magma
Pocket Lights') is a portable, artificial light source deployed
inside the First Magma Pocket during a critical mission. The
target entity ('Enterprise Engineering Emergency Lights') is a
fixed, embedded lighting system in Engineering that activates
during a warp core malfunction. These are distinct entities
serving different functional and narrative roles in separate
contexts.",
"distinction_clarifications": [{
"suggested_name_refinement":
"Enterprise Crew's Portable Magma Pocket Illumination Lights",
"key_distinguishing_features": [
"Portable and manually deployed by the crew",
"Used during a plasma infusion mission",
"Symbolically isolates characters and heightens tension"
]
}]
}
Once the graph knows what happened and who was involved, Fabula records what the moment means: what each character believed, wanted, intended, noticed, concealed, carried forward, or misunderstood at that point in the story.
This is the layer that makes the graph useful for more than recap. A transcript can tell you Pine photographed the documents. Fabula can tell you what he believed was at stake, what evidence he acted on, what objects changed state, and why the event matters later. The model is not freewheeling from memory; it is judging a purpose-built evidence packet assembled from the script, the resolved entities, and the prior state already in the graph.
// Step: event finalization · The Night Manager S01E03 · Pine in Roper's office
// INPUT — the precise evidence packet, assembled from prior pipeline steps
{
"scene_text":
"INT. MALLORCA. ROPER VILLA. ROPER'S PRIVATE OFFICE. DAY.
The alarm test continues. PINE knows he has to move fast. ...
He stares at some papers labelled 'Tradepass'. He takes each
paper from the tray, and photographs them with Danny's camera,
then replaces them precisely. ... Then he sees it. On the desk.
A long blonde hair. A woman's. He carefully picks it up. ...
JED (O.S): Take him to his room. I'll change and be straight there.",
"candidate_event_description":
"Under the guise of an alarm check, Pine exploits the villa's
brief vulnerability to access Roper's private office. ...
A single blonde hair on the desk raises his suspicions about
an internal informant.",
"resolved_entities_context": [
"Jonathan Pine — undercover operative, masking trauma,
infiltrating Roper's empire from the inside ...",
"Jed Marshall — Roper's mistress, gilded prison, brittle charm",
"Daniel Roper — Roper's compliant teenage son",
"Tabby — Roper's head of security",
"Tradepass Documents — names and figures linked to arms deals",
"Roper's Private Office — quietly dangerous, criminal sanctum"
// ... 6 more entities, each with the foundational description
// produced by upstream resolution + adjudication steps
]
}
// OUTPUT — the structured event, every claim grounded in the input above
{
"title": "Pine photographs Tradepass documents under duress",
"agent_participations": [{
"agent": "Jonathan Pine",
"observed_status":
"Pine infiltrates Roper's private office under the guise of an
alarm check, photographs incriminating Tradepass documents,
pockets a blonde hair as evidence, then meticulously restores
the scene to its original state.",
"emotional_state_at_event":
"Tense focus masking a rising unease; composed on the surface
but internally strained by proximity to detection",
"goals_at_event": [
"Secure tangible evidence of Roper's illegal arms deals",
"Evade detection and leave no trace of his intrusion"
],
"beliefs_at_event": [
"Roper's empire can only be dismantled from within by
infiltrating its most secure spaces",
"Each missed detail risks blowing his cover"
]
} /* ...Jed, Daniel, Tabby */ ],
"object_involvements": [{
"object": "Tradepass Documents",
"status_after_event":
"Restored to original position; Pine concealed a blonde hair
within their midst as a clue"
} /* ...Danny's camera, the handkerchief, the peppermint tin */ ]
}
// "Tense focus masking a rising unease" reads from the script
// lines and Pine's prior context. Nothing is recalled from
// training data — the model never gets to.