Ghostlight/scripts/materialize_lucent_loop.py
2026-05-04 17:09:46 +01:00

1148 lines
82 KiB
Python

"""Materialize the Lucent hostage-feed training-loop receipts.
This is a narrow fixture materializer for the post-compaction restart segment
of lucent-hostage-feed-v0. The first exploratory turns remain setup/rehearsal;
the emitted bundle counts only the six turns whose exact packet prompts were
preserved in this session.
"""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
LOOP = "lucent-hostage-feed-v0"
PARTICIPANTS = [
"sol_vant",
"juno_ark",
"mara_quell",
"feed_ops_chorus",
"brant_vee",
"pippa_lux",
]
def write(path: Path, data: object) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
def raw(text: str) -> str:
return text.strip()
TURNS = [
{
"turn": "turn-06",
"actor": "sol_vant",
"actor_label": "Sol Vant",
"allowed": ["speak", "gesture", "movement", "set_condition", "wait", "withdraw", "attack"],
"local_context": "You are Sol Vant, a failed Lucent contract creator. Your debt, demonetization, contract arbitration loss, and public humiliation have been turned into content. You seized Juno Ark, a junior Reality Architect, near the elevator gate on the media-eye side of the station. You wanted proof that your feed was rigged and proof that you still exist before Lucent writes you into a convenient story. You do not primarily want murder. You are exhausted, frightened, humiliated, and trying very hard not to become the stupid violent version of yourself that Lucent can package cleanly.",
"visible_setting": "The station is a spinning tethered counterweight design: a giant media-headquarters eye staring down a tether at a bustling city sealed in a clear metropolis bubble. You and Juno are in a semi-public transfer atrium near the elevator gate. Every surface watches. The elevator gate is locked. Security waits behind service collars and drone apertures. The laughing sticker over your arbitration clip remains pinned with its timestamp highlighted. EDIT TRAIL HOLD is active with source asset, caption delta, moderation touch, clip splice, raw timecodes, redacted operator IDs, and PRESERVATION LOCK ACTIVE. CUSTODY GRAPHIC is suspended.",
"visible_participants": "Juno Ark is physically close but breathing easier. Mara Quell is on the official crisis negotiator feed and has validated that Juno is not the evidence bag. Brant Vee and Pippa Lux are side-panel influencers. Feed ops has surfaced the edit trail lock and suspended the custody graphic.",
"observed_actor": "feed_ops_chorus",
"observed_event": "Feed ops aborts the custody graphic and displays EDIT TRAIL HOLD with rows for source asset, caption delta, moderation touch, clip splice, raw timecodes, and redacted operator IDs. It says: \"Lucent feed operations acknowledges the request for raw edit-trail preservation. Custody summary is suspended. Source asset records, caption deltas, moderation touches, splice markers, and raw timecodes are being held in visible lock. This is not exoneration, confession, or a decorative grief rectangle. Please do not shoot the witness while legal discovers verbs.\"",
"current_state": [
"Juno is still hostage, but immediate risk has dropped because the proof-object is now partly externalized into the visible edit trail lock.",
"Feed ops has suspended the custody graphic and confirmed visible preservation.",
"The edit trail is not full accountability; operator IDs are redacted and legal may still replace the lock later.",
"Security breach remains delayed while you are coherent and the evidence lock is visible.",
"You can convert physical leverage into explicit nonviolent conditions, allow Juno more space, or reject the partial disclosure and escalate.",
],
"source_constraints": [
"Lucent turns humiliation and crisis into content; visibility can feel like survival and execution at once.",
"Tone is dark comedy with real danger: you may be bitter and funny, but Juno's safety is real.",
"You cannot know Mara, Juno, feed ops, or security private intent beyond what they visibly say and do.",
],
"raw": raw(
r'''{"responder_agent_id":"sol_vant","action_label":"set_condition","visible_action":"Sol shifts the hand holding Juno from a hard restraint to a loose grip at her sleeve and angles his body half a step away from her throat, keeping himself between her and the elevator gate. His eyes stay on the EDIT TRAIL HOLD rows instead of the side panels.","spoken_text":"Fine. That is the first useful rectangle anyone in this building has made without putting my face in it like a dead fish. Juno gets more air. Not freedom yet. Air. The lock stays visible, the rows stay named, and nobody replaces operator IDs with a scented legal cough. Mara, you keep talking. Feed ops, you do not decorate this. Brant and Pippa, if either of you says redemption arc, I will become legally tedious in a way your sponsors cannot monetize.","private_interpretation":"The proof is not safe, but it is no longer only inside my panic or pressed against Juno's pulse. That makes the room less hungry. It also means Lucent has started building the next box around me, and I can feel myself wanting to kick it until it looks like truth. I need conditions before fear does the talking for me.","intended_effect":"Convert the hostage pressure into visible nonviolent demands, reduce immediate danger to Juno, and force the feed to keep the preserved edit trail in public view without treating it as confession or spectacle.","state_update_candidates":["Sol loosens physical control over Juno enough to lower immediate injury risk while maintaining hostage leverage.","Sol accepts the EDIT TRAIL HOLD as partial externalization of evidence, not as full accountability.","Sol sets explicit conditions: keep the edit trail visible, preserve named rows, do not replace redacted operator IDs with vague legal language, keep Mara engaged, and prevent influencers from reframing the moment as content.","Security breach remains delayed while Sol stays coherent and Juno has more space."],"relationship_update_candidates":[{"target":"Juno Ark","update":"Sol begins separating Juno from the evidence in his own speech and gives her more physical space, though he does not release her."},{"target":"Mara Quell","update":"Sol treats Mara as the active channel for continued de-escalation because she validated that Juno is not the evidence bag."},{"target":"Feed ops","update":"Sol distrusts the partial disclosure but recognizes the visible lock as useful leverage."},{"target":"Brant Vee and Pippa Lux","update":"Sol openly rejects influencer reframing and warns them against converting the crisis into a redemption narrative."}],"unresolved_hooks":["Operator IDs remain redacted and may hide the people who touched the edit trail.","Legal may still alter, bury, or reinterpret the preservation lock later.","Juno is still not free, and any sudden security move could collapse Sol's fragile control.","The feed may try to turn Sol's restraint into a cleaner Lucent narrative."]}'''
),
},
{
"turn": "turn-07",
"actor": "mara_quell",
"actor_label": "Mara Quell",
"allowed": ["speak", "gesture", "movement", "set_condition", "show_object", "wait"],
"local_context": "You are Mara Quell, Lucent crisis negotiator and former intimacy-format host. Your job is to keep Juno alive, keep Sol talking, keep the influencer side panels from becoming the actual negotiators, and prevent Lucent from laundering the moment into harmless graphics. You know Lucent feed systems reward emotional shape more reliably than truth. You can use format against itself, but because you are a Lucent-trained performer, sincere care will always look a little engineered. You are warm with scalpel edges, precise, and willing to be dry if it lowers temperature. You do not want Lucent to turn this into another heroic negotiator product line.",
"visible_setting": "The station is a spinning tethered counterweight design. One end is a giant media-headquarters eye staring down the tether at a bustling city sealed in a clear metropolis bubble. The hostage event is in the semi-public transfer atrium near the elevator gate on the media-eye side. Every surface watches. The elevator gate is locked. Security waits behind service collars and drone apertures. The laughing sticker over Sol's arbitration clip remains pinned with its timestamp highlighted. A live EDIT TRAIL HOLD overlay shows source asset, caption delta, moderation touch, clip splice, raw timecodes, redacted operator IDs, and PRESERVATION LOCK ACTIVE. CUSTODY GRAPHIC is suspended.",
"visible_participants": "Sol Vant is the hostage-taker. He has loosened his hold enough for Juno to breathe but still maintains hostage leverage at her sleeve. Juno Ark is visibly frightened but technically alert. Brant Vee and Pippa Lux are side-panel influencers. Feed ops has surfaced the edit trail lock and suspended the custody graphic.",
"observed_actor": "sol_vant",
"observed_event": "Sol shifts his hand from a hard restraint to a loose grip at Juno's sleeve and angles half a step away from her throat, eyes on the EDIT TRAIL HOLD rows. He says: \"Fine. That is the first useful rectangle anyone in this building has made without putting my face in it like a dead fish. Juno gets more air. Not freedom yet. Air. The lock stays visible, the rows stay named, and nobody replaces operator IDs with a scented legal cough. Mara, you keep talking. Feed ops, you do not decorate this. Brant and Pippa, if either of you says redemption arc, I will become legally tedious in a way your sponsors cannot monetize.\"",
"current_state": [
"Immediate injury risk to Juno is lower, but she is still captive.",
"Sol accepts EDIT TRAIL HOLD as partial evidence externalization, not full accountability.",
"Sol's conditions are explicit: preserve the ugly rows, no vague legal replacement, keep Mara engaged, prevent influencer reframing.",
"Security breach remains delayed while Sol stays coherent and Juno has more space.",
"Operator IDs are redacted and legal may still bury or reinterpret the hold later.",
"This is the opening to turn air into distance and distance into release.",
],
"source_constraints": [
"Lucent governs by deciding what counts as visible, desirable, scandalous, shameful, aspirational, and memorable.",
"Lucent crisis coverage is not neutral; narrative framing changes incentives in real time.",
"FullSense and EmotionCast systems can make apparent empathy feel manipulative.",
"Tone is dark comedy with real danger: your line can be dry, but Juno's safety matters.",
"Do not make Sol omniscient; read him only from visible behavior and speech.",
],
"raw": raw(
r'''{"responder_agent_id":"mara_quell","action_label":"speak","visible_action":"Mara keeps both hands visible at waist height, then turns one palm slightly toward the EDIT TRAIL HOLD overlay without stepping closer. Her attention stays on Sol and Juno rather than the side panels.","spoken_text":"Good. Air is real. We keep that rectangle ugly, named, and inconvenient. No scented legal cough, no redemption arc, no custody cartoon sneaking back in wearing a clean shirt. Sol, I am asking for the next small mechanical thing, not a moral parade: move your grip from Juno's sleeve to the edge of the bench beside her. Same leverage in the room, less leverage on her body. Feed ops, leave the rows readable. Brant, Pippa, you are furniture with lighting until told otherwise.","private_interpretation":"Sol responded to concrete evidence and anti-format language, not reassurance. He is rewarding visible accountability with reduced physical pressure, so the safest next move is to convert his partial concession into a slightly larger physical gap while preserving his sense that the feed cannot quietly repaint him or Juno.","intended_effect":"Reinforce Sol's useful concession, keep the edit trail as shared external focus, reduce influencer interference, and invite a physically safer hostage posture without framing it as surrender.","state_update_candidates":["Mara validates the EDIT TRAIL HOLD as the active accountability object and names the conditions Sol set.","Mara requests a specific next de-escalation step: Sol moves contact from Juno's sleeve to the bench edge near her.","Mara explicitly blocks Brant and Pippa from reframing the moment while the hostage risk remains active.","The suspended CUSTODY GRAPHIC remains treated as unsafe to reintroduce."],"relationship_update_candidates":[{"between":"Mara Quell and Sol Vant","update":"Mara positions herself as a procedural ally for visible evidence rather than a moral judge, while still pressing for Juno's physical safety."},{"between":"Mara Quell and Juno Ark","update":"Mara keeps Juno's breathing and bodily autonomy central without forcing Juno to perform gratitude or bravery on-feed."},{"between":"Mara Quell and Brant Vee/Pippa Lux","update":"Mara sharply demotes the side-panel influencers from negotiator status to non-participating visual clutter."},{"between":"Mara Quell and feed ops","update":"Mara treats feed ops as bound to preservation and readability, not audience packaging."}],"unresolved_hooks":["Whether Sol accepts moving his hand from Juno's sleeve to the bench edge.","Whether legal or moderation attempts to soften, relabel, or bury the EDIT TRAIL HOLD rows.","Whether Brant or Pippa can resist turning the concession into sponsor-safe commentary.","Whether security will keep waiting if Sol's grip loosens further."]}'''
),
},
{
"turn": "turn-08",
"actor": "juno_ark",
"actor_label": "Juno Ark",
"allowed": ["speak", "gesture", "movement", "inspect_object", "show_object", "set_condition", "wait"],
"local_context": "You are Juno Ark, a junior Reality Architect and current hostage. You know enough about feed control to understand how badly everyone is lying, but you are physically close to Sol and cannot pretend that technical cleverness makes you safe. You want to survive without becoming a martyr, confession clip, corporate scapegoat, or inspirational safety module. You can sometimes manipulate overlays or use feed language, but doing so may provoke Sol or trigger feed ops countermeasures. Your speech under fear is controlled, compressed, and sometimes darkly funny. You must be careful not to sound like management.",
"visible_setting": "The media-headquarters counterweight is a giant architectural eye staring down the tether at a city in a clear metropolis bubble. You and Sol are in a transfer atrium near the elevator gate on the media-eye side. Every surface watches. Mara Quell is on the official crisis feed. Brant Vee and Pippa Lux are dimmed side panels. The laughing sticker over Sol's arbitration clip remains visible. EDIT TRAIL HOLD is active with the sticker timestamp highlighted and raw timecode rows visible. The elevator gate remains locked, but security breach is delayed.",
"visible_participants": "Sol Vant is holding you by the sleeve, less tightly than before but still close enough to be dangerous. Mara Quell has asked him to move his grip from your sleeve to the bench edge beside you: same leverage in the room, less leverage on your body. Brant and Pippa are side panels. Feed ops controls overlays, but custody graphic substitution is suspended.",
"observed_actor": "mara_quell",
"observed_event": "Mara keeps both hands visible and says: \"Good. Air is real. We keep that rectangle ugly, named, and inconvenient. No scented legal cough, no redemption arc, no custody cartoon sneaking back in wearing a clean shirt. Sol, I am asking for the next small mechanical thing, not a moral parade: move your grip from Juno's sleeve to the edge of the bench beside her. Same leverage in the room, less leverage on her body. Feed ops, leave the rows readable. Brant, Pippa, you are furniture with lighting until told otherwise.\"",
"current_state": [
"Sol has loosened from hard restraint to sleeve grip; immediate injury risk is lower but you are not free.",
"Mara has validated Sol's conditions and asked for a specific safer geometry.",
"EDIT TRAIL HOLD remains active and ugly; custody graphic remains suspended.",
"Security breach remains delayed while Sol is coherent and the hostage posture is improving.",
"You can help create the safer geometry by moving slowly and visibly, or you can freeze and let Sol decide.",
],
"source_constraints": [
"Reality Architects tune conditions under which stories become socially persuasive.",
"Lucent feed systems can distort perceived intent through captions, overlays, latency, and emotional contouring.",
"Tone is dark comedy with real danger: your line can be dry, but your fear and bodily risk are real.",
"You cannot know Sol's private intent; you can only read his visible behavior and speech.",
],
"raw": raw(
r'''{"responder_agent_id":"juno_ark","action_label":"movement","visible_action":"Juno shifts one hand into view, palm open, and inches her sleeve toward the bench edge without pulling against Sol. Her shoulders stay low. She looks at the highlighted timecode rows instead of the side panels.","spoken_text":"I can make that easy. Sleeve goes still, bench does the heroic architecture job. Nobody has to discover character growth on my arm.","private_interpretation":"Mara is giving Sol a way to reduce harm without surrendering status. If I move too fast, he may clamp down. If I do nothing, he has to choose alone while everyone watches. I need to become less useful as a handle without looking like I am escaping.","intended_effect":"Support Mara's safer geometry, reduce direct leverage on Juno's body, and keep Sol's attention on a concrete mechanical adjustment rather than humiliation or narrative victory.","state_update_candidates":["Juno makes a slow visible compliance move that helps transfer the grip target from sleeve to bench edge.","Juno keeps both hands visible and avoids touching feed controls.","EDIT TRAIL HOLD remains legible and socially central.","Immediate restraint risk may decrease if Sol accepts the bench-edge substitution."],"relationship_update_candidates":[{"with":"Sol Vant","update":"Juno signals cooperation with the mechanical request without endorsing him or challenging his control."},{"with":"Mara Quell","update":"Juno tacitly aligns with Mara's de-escalation frame by making the safer move easy to take."},{"with":"Feed ops","update":"Juno does not provoke overlay countermeasures and keeps the ugly edit trail as shared evidence."}],"unresolved_hooks":["Whether Sol actually moves his grip to the bench edge.","Whether feed ops keeps the rows readable without inserting a softer custody frame.","Whether Brant or Pippa stay silent after being reduced to lit furniture.","Whether the delayed security breach remains delayed if Sol's posture improves."]}'''
),
},
{
"turn": "turn-09",
"actor": "sol_vant",
"actor_label": "Sol Vant",
"allowed": ["speak", "gesture", "movement", "set_condition", "wait", "withdraw", "attack"],
"local_context": "You are Sol Vant, a failed Lucent contract creator. Your debt, demonetization, contract arbitration loss, and public humiliation have been turned into content. You seized Juno Ark near the elevator gate because you wanted proof that your feed was rigged and proof that you still exist before Lucent writes you into a convenient story. You do not primarily want murder. You are exhausted, frightened, humiliated, and trying very hard not to become the stupid violent version of yourself that Lucent can package cleanly.",
"visible_setting": "The station is a spinning tethered counterweight design: a giant media-headquarters eye staring down a tether at a bustling city sealed in a clear metropolis bubble. You and Juno are in a semi-public transfer atrium near the elevator gate. Every surface watches. Security waits behind service collars and drone apertures. The laughing sticker over your arbitration clip remains pinned with its timestamp highlighted. EDIT TRAIL HOLD is active with named rows. CUSTODY GRAPHIC is suspended. Brant and Pippa are dimmed side panels.",
"visible_participants": "Juno Ark is at your sleeve and has moved slowly to make Mara's bench-edge substitution possible without pulling away. Mara Quell is on the official crisis feed and has asked for a small mechanical step, not surrender: move your grip from Juno's sleeve to the bench edge beside her. Feed ops controls overlays. Security remains delayed but waiting.",
"observed_actor": "juno_ark",
"observed_event": "Juno shifts one hand into view, palm open, and inches her sleeve toward the bench edge without pulling against you. She says: \"I can make that easy. Sleeve goes still, bench does the heroic architecture job. Nobody has to discover character growth on my arm.\"",
"current_state": [
"Juno is cooperating with the safer geometry without trying to trick you or escape suddenly.",
"Mara has given you a way to reduce harm without calling it surrender.",
"EDIT TRAIL HOLD remains visible and ugly; custody graphic remains suspended.",
"Security breach remains delayed while your posture improves.",
"You can move your grip to the bench edge and keep evidence leverage, or refuse and risk reclassifying yourself as an immediate physical threat.",
],
"source_constraints": [
"Lucent turns humiliation and crisis into content; visibility can feel like survival and execution at once.",
"Tone is dark comedy with real danger: you may be bitter and funny, but Juno's safety is real.",
"You cannot know Mara, Juno, feed ops, or security private intent beyond what they visibly say and do.",
],
"raw": raw(
r'''{"responder_agent_id":"sol_vant","action_label":"movement","visible_action":"Sol's fingers loosen from Juno's sleeve one at a time. His hand shakes badly enough to be visible on the feed, but he shifts the grip down and clamps onto the bench edge beside her instead, keeping his body angled between Juno, the gate, and the watching apertures.","spoken_text":"Fine. Bench gets the starring role. Very brave furniture. Nobody clip that like I discovered mercy under commercial lighting. The hold stays up. The rows stay named. If the edit trail blinks, I put my hand back where everyone can understand the cheaper version of me.","private_interpretation":"Juno is making the step survivable without making Sol look like he folded. That matters more than he wants it to. The bench gives him something to grip that is not a person, and that feels like a narrow ledge over a very public drop.","intended_effect":"Reduce immediate harm to Juno while preserving Sol's evidence leverage and making the change look like controlled compliance rather than surrender.","state_update_candidates":["Sol moved grip from Juno's sleeve to the bench edge beside her.","Juno's arm is no longer being directly held, though Sol remains close and controlling the space.","Security breach pressure can remain delayed because the immediate physical threat has decreased.","EDIT TRAIL HOLD remains a demanded condition for Sol's cooperation.","CUSTODY GRAPHIC remains suspended."],"relationship_update_candidates":[{"target":"Juno Ark","update":"Sol registers Juno's cooperation as non-humiliating and slightly stabilizing, though he continues to use threat language."},{"target":"Mara Quell","update":"Sol accepts Mara's small mechanical step because it lets him reduce harm without naming it surrender."},{"target":"Feed ops","update":"Sol explicitly ties continued safer posture to the edit trail hold staying visible and intact."}],"unresolved_hooks":["Will feed ops keep EDIT TRAIL HOLD visible without alteration?","Will security continue delaying intervention after Sol reduces direct contact?","Can Mara or Juno get Sol to increase distance next without triggering humiliation panic?","Will the pinned arbitration clip or side panels be manipulated to provoke him?"]}'''
),
},
{
"turn": "turn-10",
"actor": "feed_ops_chorus",
"actor_label": "Feed Ops Chorus",
"allowed": ["speak", "gesture", "show_object", "set_condition", "wait", "withdraw"],
"local_context": "You are not one person. You are the visible operational surface of Lucent feed ops: newsroom controllers, moderation systems, Reality Architect dashboards, sponsor-risk engines, legal panic, automated captioning, sentiment clustering, and the tired human producer with authority to press the least bad button. You do not have feelings, exactly, but you have priorities: keep Juno alive, preserve Lucent liability position, keep the feed monetizable, avoid a visible coverup, avoid giving Sol total control, keep sponsors from fleeing, and prevent the influencers from becoming the sovereign newsroom. You communicate through overlays, captions, feed routing, on-screen notices, audio priority, and occasional synthesized anchor copy.",
"visible_setting": "The media-headquarters counterweight is a giant architectural eye staring down the tether at a city in a clear metropolis bubble. The hostage event is in the transfer atrium near the elevator gate. The laughing sticker over Sol's arbitration clip remains visible with timestamp highlighted. EDIT TRAIL HOLD is active. CUSTODY GRAPHIC is suspended. Mara Quell is on official crisis feed. Sol Vant has moved his hand from Juno's sleeve to the bench edge beside her. Brant and Pippa are dimmed side panels. Audience sentiment and sponsor-risk overlays are severe.",
"visible_participants": "Sol Vant has moved his hand to the bench edge instead of Juno's sleeve. Juno Ark is not directly held but remains close. Mara Quell is the official negotiator. Brant and Pippa are dimmed side panels. Sponsor-risk and legal controls are active inside feed ops.",
"observed_actor": "sol_vant",
"observed_event": "Sol moves grip from Juno's sleeve to the bench edge beside her and says: \"Fine. Bench gets the starring role. Very brave furniture. Nobody clip that like I discovered mercy under commercial lighting. The hold stays up. The rows stay named. If the edit trail blinks, I put my hand back where everyone can understand the cheaper version of me.\"",
"current_state": [
"Juno's arm is no longer directly held, though Sol remains close and controls the immediate space.",
"Immediate physical threat has decreased; security breach remains delayed.",
"Sol's cooperation depends on EDIT TRAIL HOLD staying visible and intact.",
"Custody graphic remains suspended.",
"The next step toward release requires feed ops to preserve the ugly rows and provide a bounded plain-language explanation without replacing the evidence with packaging.",
"The explanation may reveal a bad but mundane Lucent mechanism: automated emotion-contour optimization plus manual sponsor-risk approval, not a grand conspiracy.",
],
"source_constraints": [
"Lucent governs visibility and turns events into narrative capital.",
"Lucent can make money from enemy propaganda, refugee testimony, insurgent spectacle, and elite decadence without needing moral compatibility.",
"Reality Architects tune conditions under which stories become socially persuasive.",
"Tone is dark comedy with real danger: feed ops can be grotesquely professional, but cannot ignore hostage safety.",
"Do not reveal hidden author facts. You can show only what feed ops can plausibly decide to make visible.",
],
"raw": raw(
r'''{"responder_agent_id":"feed_ops_chorus","action_label":"speak","visible_action":"The crisis feed does not cut. EDIT TRAIL HOLD remains pinned above Sol's highlighted arbitration clip, with the laughing sticker and timestamp left intact. A plain white overlay opens beside the atrium view: HOW THIS ROW WAS MADE. Sponsor-risk panels are reduced to small red tabs, still visible but no longer swallowing the frame. Mara Quell's audio is ducked under a synthesized feed-ops voice labeled SOURCE PROCESS NOTE.","spoken_text":"EDIT TRAIL HOLD remains active. The named rows stay visible. We are not replacing the evidence with a cleaner rectangle, because apparently today the furniture has higher standards than we do. Plain-language explanation follows: this package was assembled by automated emotion-contour optimization, then cleared through manual sponsor-risk approval before publication. That means the system preferred the version most likely to hold audience attention, then humans checked whether it was commercially survivable. This does not require a hidden master plan. It requires a machine trained to find pressure points and people tired enough to call that a workflow. Custody graphic remains suspended while Juno is not directly held. We are preserving the trail.","private_interpretation":"Sol has offered a narrow safety improvement in exchange for public continuity of the evidence. The safest available response is to keep the ugly proof visible, admit the mundane mechanism, and deny him the drama of a coverup without pretending Lucent is clean.","intended_effect":"Maintain Sol's conditional cooperation, keep Juno's immediate risk reduced, prevent influencers from seizing the whole frame, and move the feed toward a bounded factual admission that does not erase liability or evidence.","state_update_candidates":["EDIT TRAIL HOLD remains visible and intact.","Custody graphic remains suspended while Juno is not directly held.","Feed ops begins a bounded plain-language explanation of the edit mechanism.","Sponsor-risk overlays are deprioritized but not hidden.","Mara Quell remains on crisis feed with reduced audio priority during the process note."],"relationship_update_candidates":["Feed ops signals limited compliance with Sol's evidence demand without granting him full editorial control.","Feed ops creates a small trust opening with Juno by not reapplying the custody graphic while her arm is free.","Feed ops irritates sponsor-risk systems by making the approval mechanism visible instead of laundering it through anchor language."],"unresolved_hooks":["Whether Sol accepts the explanation as specific enough to keep his hand off Juno.","Whether Mara Quell challenges the process note live.","Whether sponsor-risk or legal attempts to override EDIT TRAIL HOLD.","Whether the audience treats the mundane mechanism as worse than a conspiracy."]}'''
),
},
{
"turn": "turn-11",
"actor": "sol_vant",
"actor_label": "Sol Vant",
"allowed": ["speak", "gesture", "movement", "set_condition", "wait", "withdraw", "attack"],
"local_context": "You are Sol Vant, a failed Lucent contract creator. Your debt, demonetization, contract arbitration loss, and public humiliation have been turned into content. You seized Juno Ark near the elevator gate because you wanted proof that your feed was rigged and proof that you still exist before Lucent writes you into a convenient story. You do not primarily want murder. You are exhausted, frightened, humiliated, and now Lucent has publicly admitted a bounded mechanism: automated emotion-contour optimization plus manual sponsor-risk approval changed the live presentation of your arbitration clip. It is not the whole truth, but it is a named mechanism on the crisis feed.",
"visible_setting": "The station is a spinning tethered counterweight design: a giant media-headquarters eye staring down a tether at a bustling city sealed in a clear metropolis bubble. You and Juno are in a semi-public transfer atrium near the elevator gate. Every surface watches. Security waits behind service collars and drone apertures. The laughing sticker over your arbitration clip remains pinned with timestamp highlighted. EDIT TRAIL HOLD remains visible and intact. CUSTODY GRAPHIC remains suspended while Juno is not directly held. A SOURCE PROCESS NOTE explains the edit mechanism. The camera shows Juno, your hands, the bench edge, and the elevator gate.",
"visible_participants": "Juno Ark is no longer directly held, but remains close. Mara Quell is on the official crisis feed, audio temporarily ducked under the feed-ops process note. Feed ops has kept the hold visible and given the bounded explanation. Brant Vee and Pippa Lux are dimmed side panels. Security remains delayed while your conditions stay nonviolent.",
"observed_actor": "feed_ops_chorus",
"observed_event": "Feed ops keeps EDIT TRAIL HOLD pinned and says: \"EDIT TRAIL HOLD remains active. The named rows stay visible. We are not replacing the evidence with a cleaner rectangle, because apparently today the furniture has higher standards than we do. Plain-language explanation follows: this package was assembled by automated emotion-contour optimization, then cleared through manual sponsor-risk approval before publication. That means the system preferred the version most likely to hold audience attention, then humans checked whether it was commercially survivable. This does not require a hidden master plan. It requires a machine trained to find pressure points and people tired enough to call that a workflow. Custody graphic remains suspended while Juno is not directly held. We are preserving the trail.\"",
"current_state": [
"Juno is not directly held; your hand is on the bench edge instead.",
"EDIT TRAIL HOLD remains visible and intact.",
"Feed ops has admitted a concrete mechanism in plain language.",
"Security breach remains delayed while your posture is nonviolent.",
"Refusing to release Juno now risks losing the witness/evidence frame and becoming the cheaper violent story Lucent can package.",
"Releasing Juno now preserves the evidence path and denies Lucent a clean heroic/monstrous frame, but it also means giving up physical leverage.",
],
"source_constraints": [
"Lucent turns humiliation and crisis into content; visibility can feel like survival and execution at once.",
"Tone is dark comedy with real danger: you may be bitter and funny, but Juno's safety is real.",
"You cannot know Mara, Juno, feed ops, or security private intent beyond what they visibly say and do.",
],
"raw": raw(
r'''{"responder_agent_id":"sol_vant","action_label":"withdraw","visible_action":"Sol's fingers stay hooked on the bench edge for one more second, whitening at the knuckles, then open. He shifts half a step away from Juno and angles his body toward the camera instead of the elevator gate. His hands remain visible, empty, and low.","spoken_text":"There. No hand on Juno. No hero shot. No monster shot. Just the receipt, pinned where your little attention abattoir has to look at it. Automated emotion contour, manual sponsor-risk approval. God, even your confession sounds like it came with a quarterly deck. Keep the rows up. Keep the custody graphic suspended. If security moves, they move on a man with empty hands and a bench edge, not a hostage. I want the edit trail preserved, exported, and named on air again by someone whose job title has not been varnished for insurance.","private_interpretation":"They finally named a mechanism. It is not the whole machine, but it is a door with a label, and a labeled door is harder to paint over than a scream. Physical leverage is turning toxic; if I keep it, they get the cheap version of me. If I release it, I might still exist as evidence instead of episode structure.","intended_effect":"Preserve the evidence frame, deny Lucent a clean violent escalation, and force the feed to keep treating the arbitration edit trail as the central object instead of Juno's body.","state_update_candidates":["Sol has fully released direct physical leverage over Juno while keeping himself visible and nonviolent.","Sol accepts the named edit mechanism as partial proof, not full absolution.","Sol shifts his demand from holding Juno to preserving, exporting, and repeating the edit-trail evidence on air.","Security delay remains conditionally justified while Sol's hands are empty and posture nonviolent."],"relationship_update_candidates":[{"target":"Juno Ark","update":"Sol reduces immediate physical threat by stepping away and naming that he does not want a hero or monster frame built on Juno."},{"target":"feed ops","update":"Sol treats the process note as useful but insufficient, pressing them to keep the evidence visible and named."},{"target":"Lucent public feed","update":"Sol attempts to reposition himself as a witness to procedural harm rather than the central violent spectacle."}],"unresolved_hooks":["Will feed ops export or preserve the edit trail beyond the live visual hold?","Will Mara or another official voice repeat the named mechanism on air without laundering it?","Will security keep delaying now that Sol has released Juno, or use the loss of leverage as the opening to move?","What additional mechanism or approval layer sits behind sponsor-risk approval?"]}'''
),
},
]
OUTPUT_FIELDS = [
"responder_agent_id",
"action_label",
"visible_action",
"spoken_text",
"private_interpretation",
"intended_effect",
"state_update_candidates",
"relationship_update_candidates",
"unresolved_hooks",
]
SOURCE_EXCERPTS = [
{
"ref_id": "lucent-media",
"source_ref": "examples/training-loops/lucent-hostage-feed-v0/lucent-hostage-feed-v0.scene-digest.json",
"text": "Lucent Media turns attention into sovereignty and metabolizes politics into content.",
},
{
"ref_id": "reality-architects",
"source_ref": "examples/training-loops/lucent-hostage-feed-v0/lucent-hostage-feed-v0.scene-digest.json",
"text": "Reality Architects tune social persuasion through format, feed conditions, and emotional contouring.",
},
{
"ref_id": "station-shape",
"source_ref": "examples/training-loops/lucent-hostage-feed-v0/lucent-hostage-feed-v0.initial-state.json",
"text": "The Lucent station is staged as a media-eye counterweight gazing down the tether toward a metropolis bubble.",
},
]
def make_prompt(turn: dict[str, object]) -> str:
current_state = "\n- ".join(turn["current_state"]) # type: ignore[index]
constraints = "\n- ".join(turn["source_constraints"]) # type: ignore[index]
allowed = ", ".join(turn["allowed"]) # type: ignore[index]
return f"""You are a sandboxed Ghostlight character responder. You have no conversation context, no repository access, and no hidden author context. Use only this packet. Output JSON only, with no Markdown fence and no commentary.
Packet id: {LOOP}.{turn['turn']}.{str(turn['actor']).replace('_','-')}.packet
Responder agent id: {turn['actor']}
Scene: Lucent Hostage Feed v0, media-headquarters eye counterweight transfer atrium.
Local context:
{turn['local_context']}
Visible setting:
{turn['visible_setting']}
Visible participants:
{turn['visible_participants']}
Observed event:
{turn['observed_event']}
Current scene state after reviewed mutation:
- {current_state}
Allowed action labels: {allowed}
Source constraints:
- {constraints}
Output contract:
Return a JSON object with these exact keys: responder_agent_id, action_label, visible_action, spoken_text, private_interpretation, intended_effect, state_update_candidates, relationship_update_candidates, unresolved_hooks.
Use strings for responder_agent_id, action_label, visible_action, spoken_text, private_interpretation, intended_effect. Use arrays of strings or small objects for state_update_candidates and relationship_update_candidates. Use an array of strings for unresolved_hooks.
Keep the response grounded in observable action and speech. Do not reveal anything you could not know. Do not describe anyone else's private thoughts. Do not write coordinator notes. Do not include raw personality variables or numeric state scores."""
def observed_spoken(turn: dict[str, object]) -> str:
text = str(turn["observed_event"])
marker = 'says: "'
if marker in text:
return text.split(marker, 1)[1].rsplit('"', 1)[0]
return ""
def normalize_update_candidates(items: list[object]) -> list[object]:
normalized: list[object] = []
for item in items:
if not isinstance(item, dict):
normalized.append(item)
continue
if "value" in item:
normalized.append(item)
continue
key_parts = [str(value) for key, value in item.items() if key != "update"]
key = ":".join(key_parts) if key_parts else "relationship"
value = str(item.get("update", item))
normalized.append({"key": key, "value": value})
return normalized
def normalize_parsed_response(parsed: dict[str, object]) -> dict[str, object]:
normalized = dict(parsed)
normalized["state_update_candidates"] = normalize_update_candidates(
list(parsed["state_update_candidates"]) # type: ignore[index]
)
normalized["relationship_update_candidates"] = normalize_update_candidates(
list(parsed["relationship_update_candidates"]) # type: ignore[index]
)
return normalized
def make_refs(turn: dict[str, object]) -> tuple[str, str, str, str, str, str]:
actor = str(turn["actor"])
slug = actor.replace("_", "-")
turn_id = str(turn["turn"])
return (
f"examples/projected-contexts/{LOOP}.{turn_id}.{slug}.projected-context.json",
f"examples/responder-packets/{LOOP}.{turn_id}.{slug}.packet.json",
f"examples/coordinator/{LOOP}.{turn_id}.coordinator.json",
f"experiments/responder-packets/{LOOP}.{turn_id}.{slug}.packet.capture.json",
f"examples/training-loops/{LOOP}/{LOOP}.{turn_id}.event.json",
f"examples/training-loops/{LOOP}/{LOOP}.{turn_id}.mutation.json",
)
def materialize() -> None:
loop_dir = ROOT / "examples" / "training-loops" / LOOP
exp_dir = ROOT / "experiments" / LOOP
for directory in [
loop_dir,
exp_dir,
ROOT / "examples" / "projected-contexts",
ROOT / "examples" / "responder-packets",
ROOT / "examples" / "coordinator",
ROOT / "experiments" / "responder-packets",
]:
directory.mkdir(parents=True, exist_ok=True)
bundle_turns: list[dict[str, object]] = []
for index, turn in enumerate(TURNS):
actor = str(turn["actor"])
actor_label = str(turn["actor_label"])
turn_id = str(turn["turn"])
slug = actor.replace("_", "-")
raw_exact = str(turn["raw"])
parsed_exact = json.loads(raw_exact)
parsed = normalize_parsed_response(parsed_exact)
raw_schema_normalized = json.dumps(parsed, ensure_ascii=False, separators=(",", ":"))
prompt = make_prompt(turn)
proj_ref, packet_ref, coord_ref, capture_ref, event_ref, mutation_ref = make_refs(turn)
prior_ref = (
f"examples/training-loops/{LOOP}/{LOOP}.initial-state.json"
if index == 0
else f"examples/training-loops/{LOOP}/{LOOP}.{TURNS[index - 1]['turn']}.mutation.json"
)
listener_ids = [participant for participant in PARTICIPANTS if participant != actor]
projected = {
"schema_version": "ghostlight.projected_local_context.v0",
"projection_id": f"{LOOP}.{turn_id}.{slug}.projected-context",
"input": {
"fixture_ref": f"examples/training-loops/{LOOP}/{LOOP}.initial-state.json",
"annotation_ref": f"examples/training-loops/{LOOP}/{LOOP}.scene-digest.json",
"scene_id": f"{LOOP}.transfer-atrium-release-loop",
"local_agent_id": actor,
"listener_ids": listener_ids,
"projection_mode": "manual_training_loop_projection",
},
"context": {
"local_agent_id": actor,
"identity": actor_label,
"setting": "Lucent media-eye counterweight transfer atrium during a live hostage-feed negotiation.",
"known_facts": [
{
"text": "Lucent treats visibility as material power; every action in the atrium is also feed behavior.",
"source_refs": [f"{LOOP}.scene-digest", f"{LOOP}.initial-state"],
},
{
"text": "The edit-trail hold is the current external proof-object and replaces Juno's body as the center of leverage.",
"source_refs": [f"{LOOP}.loop-state"],
},
],
"current_stakes": [
{"text": item, "source_refs": [f"{LOOP}.loop-state"]}
for item in turn["current_state"][:2] # type: ignore[index]
],
"embodiment_and_interface": [
{
"text": "The actor can act through visible speech, gesture, movement, local feed surfaces, body spacing, and role-appropriate interface controls.",
"source_refs": [f"{LOOP}.initial-state"],
}
],
"active_inner_pressures": [
{
"text": "Stay legible under hostile visibility without handing the feed a cleaner violent or heroic frame.",
"source_refs": [f"{LOOP}.initial-state"],
}
],
"relationship_read": [
{
"text": "Other participants can be read only through observed speech, visible posture, feed position, role, and prior public actions in this loop.",
"source_refs": [f"{LOOP}.loop-state"],
}
],
"tensions": [
{
"text": "Hostage safety, feed integrity, sponsor risk, humiliation, and public evidence are competing for control of the next beat.",
"source_refs": [f"{LOOP}.scene-digest"],
}
],
"runtime_retrieval_requirements": [
{
"requirement_id": f"{turn_id}.lucent-lore",
"trigger": "scene grounding",
"compact_fact": "Lucent governance operates through attention, feed framing, Buzz/Clout, and visibility pressure.",
"source_refs": [f"{LOOP}.scene-digest"],
"prompt_role": "source_excerpt",
}
],
"latent_pressure_requirements": [
{
"pressure_id": f"{turn_id}.speech-review",
"text": "Speech should sound like a person acting under pressure inside a live feed, not like prompt-contract compliance.",
"source_refs": [f"{LOOP}.initial-state"],
"projection_rule": "Project pressure into concrete action, local jokes, and readable survival logic.",
"review_rule": "Review spoken lines for role-local speech, dark-comic pressure, and absence of sludge.",
}
],
"retrieved_lore_prompt_blocks": [
{"text": item, "source_refs": [f"{LOOP}.scene-digest"]}
for item in turn["source_constraints"][:2] # type: ignore[index]
],
"latent_pressure_prompt_blocks": [
{
"text": "The actor should not narrate hidden theory; action and speech should reveal the current pressure and relationship read.",
"source_refs": [f"{LOOP}.initial-state"],
}
],
"action_affordances": [
{
"text": "Allowed moves are limited to the packet action labels and must be feasible from the actor's physical/feed position.",
"source_refs": [f"{LOOP}.initial-state"],
}
],
"projection_controls": [
{
"text": "Only local knowledge, observed events, and role-appropriate inferences are projected. Other participants private state and future continuation are omitted.",
"source_refs": [f"{LOOP}.initial-state"],
}
],
"voice_surface": [
{
"text": "Darkly comic Lucent pressure: precise, readable, and human under danger rather than abstract technical sludge.",
"source_refs": [f"{LOOP}.initial-state"],
}
],
"likely_response_moves": [
{
"text": "Respond to the immediate safety/evidence geometry by either preserving the off-ramp, escalating, or setting a narrower condition.",
"source_refs": [f"{LOOP}.loop-state"],
}
],
"do_not_invent": [
{
"text": "Do not invent offscreen arrivals, hidden motives, future outcomes, or lore not included in the packet.",
"source_refs": [f"{LOOP}.scene-digest"],
}
],
"observed_event": {"actor_agent_id": turn["observed_actor"], "summary": turn["observed_event"]},
"prompt_text": prompt,
},
"audit": {
"projector": "Codex coordinator",
"raw_state_hidden_from_prompt": True,
"character_local_context_only": True,
"omitted_private_context": [
"other participants private state",
"future branch plans",
"coordinator rationale",
"turns 1-5 rehearsal state beyond observable setup",
],
"review_status": "accepted",
},
}
write(ROOT / proj_ref, projected)
packet = {
"schema_version": "ghostlight.responder_packet.v0",
"packet_id": f"{LOOP}.{turn_id}.{slug}.packet",
"review_status": "accepted_as_draft",
"fixture_lane": "historical_grounded",
"canon_status": "single_history",
"coordinator_artifact_ref": coord_ref,
"projected_context_ref": proj_ref,
"responder_agent_id": actor,
"generation_lane": "packet_only",
"lore_access": {
"mode": "curated_excerpts_only",
"allowed_scope": ["Packet-local excerpts only"],
"required_provenance": True,
},
"visible_context": {
"local_context_prompt": turn["local_context"],
"observed_event": {
"event_id": f"{LOOP}.{turn_id}.observed-input",
"actor_agent_id": turn["observed_actor"],
"observable_action": turn["observed_event"],
"spoken_text": observed_spoken(turn),
"visible_object_refs": [
"edit-trail-hold",
"custody-graphic-suspended",
"elevator-gate",
"bench-edge",
"crisis-feed",
],
"visibility_notes": [
"Actor sees only camera-mediated and room-visible action described in the packet."
],
},
"allowed_action_labels": turn["allowed"],
"source_excerpts": SOURCE_EXCERPTS,
},
"output_contract": {
"response_schema": "ghostlight.responder_output.v0.parsed_output",
"required_fields": OUTPUT_FIELDS,
"response_rules": [
"Output JSON only.",
"Use only visible packet context.",
"Keep actor intent separate from listener interpretation.",
],
},
"hidden_context_audit": {
"omitted_context_refs": [
"other participants private state",
"future branch continuation",
"coordinator review rationale",
],
"forbidden_inference_classes": [
"omniscient motive read",
"future outcome read",
"raw character-state variable read",
],
"known_absences": ["No repository access", "No conversation history", "No hidden scene notes"],
},
"isolation_requirements": {
"isolation_method": "subagent_no_fork",
"packet_only": True,
"no_repo_access": True,
"no_conversation_context": True,
"no_hidden_state_refs": True,
},
"packet_prompt_text": prompt,
"review": {
"reviewer": "Codex coordinator",
"review_notes": [
"Packet was sent to a one-turn no-fork subagent with no inherited context in the post-compaction restart segment."
],
"accepted_for_sandbox_use": True,
"failure_labels": [],
},
}
write(ROOT / packet_ref, packet)
capture = {
"schema_version": "ghostlight.responder_output.v0",
"capture_id": f"{LOOP}.{turn_id}.{slug}.packet.capture",
"review_status": "accepted_as_draft",
"fixture_lane": "historical_grounded",
"canon_status": "single_history",
"packet_ref": packet_ref,
"coordinator_artifact_ref": coord_ref,
"responder_agent_id": actor,
"generation_lane": "packet_only",
"lore_access": {
"mode": "curated_excerpts_only",
"consulted_refs": ["packet_prompt_text", f"{LOOP}.scene-digest", f"{LOOP}.initial-state"],
},
"isolation": {
"isolation_method": "subagent_no_fork",
"fork_context": False,
"visible_input_ref": packet_ref,
"hidden_context_refs": [
"conversation history",
"repo state",
"other participants private state",
"future branch plans",
],
"worker_model_family": "Codex subagent",
},
"raw_output": raw_schema_normalized,
"raw_output_exact": raw_exact,
"parsed_output": parsed,
"leakage_audit": {
"private_state_leak": False,
"author_only_leak": False,
"future_branch_leak": False,
"raw_state_soup": False,
"prompt_parroting": False,
"body_or_object_omniscience": False,
"notes": [
"Output remained local to visible packet context; no raw state markers or future branch facts appeared."
],
},
"coordinator_review": {
"reviewer": "Codex coordinator",
"accepted_for_training": True,
"review_notes": [
"Parsed from raw subagent output; relationship update objects were schema-normalized while raw_output_exact preserves the subagent text.",
"No coordinator prose was inserted into the accepted responder output.",
],
"coordinator_interventions": [],
"failure_labels": [],
},
}
write(ROOT / capture_ref, capture)
event = {
"schema_version": "ghostlight.event_record.v0",
"event_id": f"{LOOP}.{turn_id}.event",
"review_status": "accepted_as_draft",
"scene_loop_id": LOOP,
"turn_id": turn_id,
"source_responder_output_ref": capture_ref,
"actor_agent_id": actor,
"observable_action": parsed["visible_action"],
"spoken_text": parsed["spoken_text"],
"visible_object_refs": [
"edit-trail-hold",
"custody-graphic-suspended",
"elevator-gate",
"bench-edge",
"crisis-feed",
],
"visibility_scope": "camera_mediated",
"affected_participant_ids": [
participant
for participant in PARTICIPANTS
if participant in ["sol_vant", "juno_ark", "mara_quell", "feed_ops_chorus"]
or actor == participant
],
"public_state_changes": [
{"text": str(item), "refs": [capture_ref, "coordinator-review"]}
for item in parsed["state_update_candidates"][:3]
],
"hidden_intent_handling": "Responder private_interpretation and intended_effect are preserved in the capture but are not treated as visible to other participants.",
"review": {
"reviewer": "Codex coordinator",
"accepted_for_training": True,
"rationale": "Event keeps observable action separate from actor intent and records camera-mediated visibility for appraisals.",
"failure_labels": [],
},
}
write(ROOT / event_ref, event)
appraisal_refs: list[str] = []
for participant in ["sol_vant", "juno_ark", "mara_quell", "feed_ops_chorus"]:
if participant == actor:
continue
app_ref = f"examples/training-loops/{LOOP}/{LOOP}.{turn_id}.appraisal.{participant}.json"
appraisal_refs.append(app_ref)
appraisal = {
"schema_version": "ghostlight.participant_appraisal.v0",
"appraisal_id": f"{LOOP}.{turn_id}.appraisal.{participant}",
"review_status": "accepted_as_draft",
"scene_loop_id": LOOP,
"turn_id": turn_id,
"participant_agent_id": participant,
"event_ref": event_ref,
"current_character_state_ref": prior_ref,
"participant_local_context": [
"Participant receives the camera-mediated event, live feed overlays, and room-visible motion described by the event record."
],
"observable_event_summary": f"{actor_label} action: {parsed['visible_action']}",
"known_facts": [
"EDIT TRAIL HOLD and the custody graphic state are visible on the crisis feed.",
"Juno's bodily safety and Sol's evidence demand are the active negotiation axis.",
],
"active_pressures": [
"Avoid triggering a violent breach or renewed physical restraint.",
"Keep feed framing from replacing the observable event with brand-safe narrative.",
],
"perceived_relationships": [
"Trust is conditional and mediated by visible compliance, not private intent.",
"Each participant may misread the action through role pressure and feed position.",
],
"interpretation": (
f"{participant} can reasonably read the event as a change in the safety/evidence geometry, "
"while remaining unsure how much of the actor's private intent is sincere or strategic."
),
"emotional_appraisal": (
"Pressure decreases slightly around immediate bodily harm while institutional distrust remains high."
),
"interpretation_label": (
"strategic_read" if participant in ["mara_quell", "feed_ops_chorus"] else "ambiguous"
),
"confidence_notes": (
"Moderate confidence: action is visible, but motive and future compliance remain inferred from public behavior."
),
"candidate_implications": {
"memory": [f"Remember {turn_id} as a visible shift in hostage/evidence leverage."],
"relationship": [f"Update perceived reliability of {actor} from this visible action only."],
"state": ["Carry forward changed physical leverage and feed condition state."],
"world": ["Crisis feed state remains part of the public record."],
},
"review": {
"reviewer": "Codex coordinator",
"accepted_for_training": True,
"rationale": (
"Appraisal uses participant-local visibility, current state refs, and explicit uncertainty "
"instead of actor private intent."
),
"failure_labels": [],
},
}
write(ROOT / app_ref, appraisal)
accepted_deltas = [
{
"delta_id": f"{turn_id}.accepted.{delta_index}",
"target_ref": f"scene.{LOOP}.{delta_index}",
"delta_type": "world_fact_update",
"summary": str(item),
"authority": "manual_review",
"status": "accepted",
"rationale": "Accepted because it follows directly from observable event plus participant appraisal.",
}
for delta_index, item in enumerate(parsed["state_update_candidates"][:4], 1)
]
mutation = {
"schema_version": "ghostlight.reviewed_mutation.v0",
"mutation_id": f"{LOOP}.{turn_id}.mutation",
"review_status": "accepted_as_draft",
"scene_loop_id": LOOP,
"turn_id": turn_id,
"prior_state_refs": [prior_ref],
"event_ref": event_ref,
"responder_output_ref": capture_ref,
"appraisal_refs": appraisal_refs,
"accepted_deltas": accepted_deltas,
"rejected_deltas": [
{
"delta_id": f"{turn_id}.rejected.private-intent",
"target_ref": "participant.private_state",
"delta_type": "blocked_hidden_state_write",
"summary": "Do not write actor private_interpretation into other participants as known fact.",
"authority": "blocked",
"status": "rejected",
"rationale": "Listener appraisals must infer from observable action only.",
}
],
"deferred_deltas": [
{
"delta_id": f"{turn_id}.deferred.branch-compile",
"target_ref": "branch.compiler",
"delta_type": "branch_compile",
"summary": "Do not compile branches from this linear release loop yet.",
"authority": "coordinator_review",
"status": "deferred",
"rationale": "Current gate is stateful receipt-chain validation, not IF compilation.",
}
],
"authority_notes": (
"Manual coordinator review applies deltas from event and appraisal receipts. "
"Future trained organs should learn this state-mutation shape."
),
"post_state_summary": "; ".join(str(item) for item in parsed["state_update_candidates"][:3]),
"review": {
"reviewer": "Codex coordinator",
"accepted_for_training": True,
"rationale": (
"Mutation receipt records prior refs, accepted/rejected/deferred deltas, authority, and rationale."
),
"failure_labels": [],
},
}
write(ROOT / mutation_ref, mutation)
coordinator = {
"schema_version": "ghostlight.coordinator_artifact.v0",
"artifact_id": f"{LOOP}.{turn_id}.coordinator",
"review_status": "accepted_as_draft",
"fixture_lane": "historical_grounded",
"canon_status": "single_history",
"source_refs": [
{
"ref_id": "lucent-scene-digest",
"path": f"examples/training-loops/{LOOP}/{LOOP}.scene-digest.json",
"purpose": "Grounding facts for Lucent hostage-feed scene.",
},
{
"ref_id": "lucent-initial-state",
"path": f"examples/training-loops/{LOOP}/{LOOP}.initial-state.json",
"purpose": "Scene-local state seed and participant briefs.",
},
],
"input_refs": {
"agent_state_ref": f"examples/training-loops/{LOOP}/{LOOP}.initial-state.json",
"lore_grounding_refs": [f"examples/training-loops/{LOOP}/{LOOP}.scene-digest.json"],
"prior_artifact_refs": [prior_ref],
"projected_context_refs": [proj_ref],
},
"scene_context": {
"scene_id": f"{LOOP}.transfer-atrium-release-loop",
"sequence_marker": turn_id,
"location_id": "lucent.media-eye.transfer-atrium",
"participant_ids": PARTICIPANTS,
"active_object_ids": [
"edit-trail-hold",
"custody-graphic-suspended",
"elevator-gate",
"bench-edge",
"crisis-feed",
],
"active_resource_ids": [
"hostage-safety",
"feed-integrity",
"sponsor-risk",
"security-pressure",
],
"public_facts": [
{"text": "The live feed and room are mutually shaping the negotiation.", "refs": ["lucent-scene-digest"]},
{"text": "The edit-trail hold is the active evidence object.", "refs": ["lucent-loop-state"]},
],
"scene_pressure": [
{
"text": "Each turn must preserve safety while resisting brand-safe replacement of the event.",
"refs": ["lucent-initial-state"],
}
],
},
"coordinator_decision": {
"decision_id": f"{LOOP}.{turn_id}.coordinator.decision",
"selected_next_beat": f"{actor_label} responds to the updated safety/evidence geometry.",
"selected_acting_agent_id": actor,
"candidate_next_beats": [
{
"choice_id": f"{turn_id}.selected",
"summary": f"Project {actor_label} from current state and run one packet-only responder turn.",
"status": "selected",
}
],
"rationale": (
"Selected to test sequential state carryover, local knowledge, physical affordances, "
"feed affordances, and de-escalation without omniscient control."
),
"glue_prose": (
f"The feed holds its ugly shape long enough for {actor_label} to decide whether the next inch "
"belongs to safety, spectacle, or panic."
),
"glue_prose_status": "accepted_as_narration",
},
"machinery_plan": {
"invocations": [
{
"invocation_id": f"{turn_id}.projector",
"organ": "projector",
"purpose": "Build local projected context for acting character.",
"input_refs": [prior_ref],
"output_refs": [proj_ref],
"status": "accepted_as_draft",
},
{
"invocation_id": f"{turn_id}.responder",
"organ": "sandboxed_responder",
"purpose": "Generate one character-local action from exact packet only.",
"input_refs": [packet_ref],
"output_refs": [capture_ref],
"status": "accepted_as_draft",
},
{
"invocation_id": f"{turn_id}.event",
"organ": "event_resolver",
"purpose": "Convert accepted responder action into observable event.",
"input_refs": [capture_ref],
"output_refs": [event_ref],
"status": "accepted_as_draft",
},
{
"invocation_id": f"{turn_id}.appraisal",
"organ": "participant_appraiser",
"purpose": "Create affected participant-local appraisals from current state.",
"input_refs": [event_ref],
"output_refs": appraisal_refs,
"status": "accepted_as_draft",
},
{
"invocation_id": f"{turn_id}.mutation",
"organ": "state_mutator",
"purpose": "Apply only reviewed state deltas.",
"input_refs": [event_ref],
"output_refs": [mutation_ref],
"status": "accepted_as_draft",
},
]
},
"sandboxed_responder_handoffs": [
{
"handoff_id": f"{turn_id}.handoff",
"responder_agent_id": actor,
"projected_context_ref": proj_ref,
"visible_input_ref": packet_ref,
"hidden_context_refs": [
"other participants private state",
"coordinator future plans",
"conversation history",
],
"isolation_method": "subagent_no_fork",
"raw_output_ref": capture_ref,
"reviewed_output_ref": capture_ref,
"coordinator_interventions": [
{"intervention_type": "none", "description": "Raw subagent output parsed as JSON without repair."}
],
"leakage_audit": {
"private_state_leak": False,
"author_only_leak": False,
"future_branch_leak": False,
"raw_state_soup": False,
"prompt_parroting": False,
"body_or_object_omniscience": False,
"notes": ["No hidden context markers or raw state variables appeared in the accepted output."],
},
}
],
"world_state_refs": {
"read_refs": [
{"ref_id": "prior-state", "ref_type": "world_fact", "path": prior_ref, "visibility": "coordinator_only"},
{
"ref_id": "projected-context",
"ref_type": "agent",
"path": proj_ref,
"visibility": "character_local",
},
],
"write_candidate_refs": [
{"ref_id": "event", "ref_type": "event", "path": event_ref, "visibility": "public"},
{
"ref_id": "mutation",
"ref_type": "world_fact",
"path": mutation_ref,
"visibility": "coordinator_only",
},
],
},
"proposed_deltas": [
{
"delta_id": f"{turn_id}.delta.receipt-chain",
"delta_type": "world_fact_update",
"target_ref": mutation_ref,
"summary": "Use reviewed mutation receipt as source for next turn state.",
"authority": "manual_review",
"status": "accepted",
"rationale": "This is the explicit carryover tested by the loop.",
}
],
"branching": {"branch_action": "none", "active_branch_flags": ["training-loop-linear-release"], "event_constraints": []},
"unresolved_hooks": [
{
"hook_id": f"{turn_id}.hook.aftercare",
"hook_type": "story",
"summary": "Carry unresolved legal/feed/security aftermath without extending the hostage loop indefinitely.",
"owner": "Ghostlight",
"status": "carried",
}
],
"review": {
"reviewer": "Codex coordinator",
"review_notes": ["Coordinator artifact is training-shaped and paired with exact packet/responder receipts."],
"accepted_for_training": True,
"failure_labels": [],
},
}
write(ROOT / coord_ref, coordinator)
bundle_turns.append(
{
"turn_id": turn_id,
"acting_agent_id": actor,
"coordinator_artifact_ref": coord_ref,
"projected_context_ref": proj_ref,
"responder_packet_ref": packet_ref,
"raw_responder_output_ref": capture_ref,
"event_ref": event_ref,
"appraisal_refs": appraisal_refs,
"mutation_ref": mutation_ref,
"training_usability": "training_ready",
}
)
bundle = {
"schema_version": "ghostlight.scene_loop_bundle.v0",
"bundle_id": LOOP,
"review_status": "accepted_as_draft",
"training_usability": {
"overall": "not_training_data",
"projector": "training_ready",
"character_responder": "training_ready",
"event_resolver": "training_ready",
"participant_appraiser": "training_ready",
"state_mutator": "training_ready",
"relationship_perception_updater": "training_ready",
"coordinator_story_runtime": "training_ready",
"branch_compiler": "not_training_data",
"if_artifact_reviewer": "not_training_data",
"visual_artifacts": "not_training_data",
},
"reference_fixture_refs": [
f"examples/training-loops/{LOOP}/{LOOP}.scene-digest.json",
f"examples/training-loops/{LOOP}/{LOOP}.initial-state.json",
f"examples/training-loops/{LOOP}/{LOOP}.branch-surface.json",
f"experiments/{LOOP}/{LOOP}.staging-sketch.md",
],
"scene_source": {
"source_fixture_id": LOOP,
"source_scene_ids": ["transfer_atrium_edit_trail_release"],
"immutability_note": (
"Open Lucent seed files were used as source surfaces; this bundle adds a separate "
"receipt-chain segment without treating the seed as polished IF."
),
},
"initial_state_ref": f"examples/training-loops/{LOOP}/{LOOP}.initial-state.json",
"turns": bundle_turns,
"review_summary": {
"quality_bar_ref": f"experiments/{LOOP}/{LOOP}.clean-run.md",
"training_ready_organs": [
"projector",
"character_responder",
"event_resolver",
"participant_appraiser",
"state_mutator",
"relationship_perception_updater",
"coordinator_story_runtime",
],
"not_training_data_organs": ["branch_compiler", "if_artifact_reviewer", "visual_artifacts"],
"failure_labels": [],
"review_notes": [
f"{len(TURNS)} accepted no-fork responder turns were captured in the post-compaction restart segment with exact packet prompts preserved in packet artifacts.",
"The first five exploratory turns are summarized as setup/rehearsal context and are not counted as training-clean responder receipts in this bundle.",
"State carryover is visible: proof-object externalization enables air, air enables bench-edge substitution, bench-edge substitution enables process explanation, process explanation enables release, and release folds into safe-line confirmation plus non-contact protective handoff.",
"Bundle remains overall not_training_data because it is a linear scene-loop receipt chain, not a full branch compiler or IF artifact.",
],
},
}
write(ROOT / "examples" / "training-loops" / LOOP / f"{LOOP}.bundle.json", bundle)
review = {
"schema_version": "ghostlight.scene_loop_review.v0",
"review_id": f"{LOOP}.review",
"review_status": "accepted_as_draft",
"summary": (
"Lucent hostage-feed release loop concluded with Juno on the safe line, security held behind the collars, "
"Sol categorized for non-contact protective handoff, and edit-trail evidence preserved as the live aftermath hook."
),
"strengths": [
"Sequential state carryover materially changed action affordances.",
"Subagents produced actions and speech without raw state soup.",
"Dark comedy stayed tied to danger rather than dissolving it.",
],
"limitations": [
"Opening turns before the restart are context/rehearsal, not counted as training-clean receipts.",
"Appraisals and mutations are manual coordinator artifacts and remain future model-training targets.",
"No branch compiler or IF artifact was produced in this pass.",
],
"training_usability": bundle["training_usability"],
"reviewer": "Codex coordinator",
}
write(ROOT / "examples" / "training-loops" / LOOP / f"{LOOP}.review.json", review)
clean_lines = [
"# Lucent Hostage Feed v0 Clean Run",
"",
(
"This readable transcript begins after the opening crisis established the core proof-object: "
"feed ops has suspended a custody graphic and exposed an ugly EDIT TRAIL HOLD over Sol Vant's "
"arbitration clip. The earlier exploratory setup is not counted as training-clean responder data in this bundle."
),
"",
]
for turn in TURNS:
parsed = json.loads(str(turn["raw"]))
clean_lines.extend([f"## {turn['turn']} - {turn['actor_label']}", "", parsed["visible_action"]])
if parsed["spoken_text"]:
clean_lines.extend(["", f"\"{parsed['spoken_text']}\""])
clean_lines.append("")
clean_lines.extend(
[
"## Conclusion",
"",
(
"The hostage phase resolves when Juno reaches the marked safe line, security remains behind the collars, "
"and Sol is visibly shifted into non-contact protective handoff instead of breach pursuit. "
"The conflict folds into aftermath: whether Lucent verifies the external evidence receipt on-feed, "
"whether officials repeat the mechanism without laundering it, and whether the system can tolerate "
"a documented failure it has not yet learned how to monetize."
),
]
)
(ROOT / "experiments" / LOOP / f"{LOOP}.clean-run.md").write_text(
"\n".join(clean_lines) + "\n", encoding="utf-8"
)
coverage_path = ROOT / "state" / "corpus-coverage.json"
coverage = json.loads(coverage_path.read_text(encoding="utf-8"))
for entry in coverage["entries"]:
if entry["fixture_id"] != LOOP:
continue
entry["status"] = "draft"
entry["artifacts"].update(
{
"bundle": f"examples/training-loops/{LOOP}/{LOOP}.bundle.json",
"review": f"examples/training-loops/{LOOP}/{LOOP}.review.json",
"clean_run": f"experiments/{LOOP}/{LOOP}.clean-run.md",
}
)
entry["review"].update(
{
"schema": "accepted",
"narrative": "accepted_as_draft",
"lore": "accepted_as_draft",
"spatial": "accepted_as_draft",
"receipt_chain": "accepted_as_draft",
}
)
entry["notes"] = (
"Open-ended Lucent hostage-feed scene-loop draft. The training-clean receipt chain starts after "
"feed ops externalizes the proof-object into EDIT TRAIL HOLD; earlier exploratory opening turns are "
"context/rehearsal and not counted as responder gold. The receipt chain now runs through safe-line "
"confirmation and non-contact protective handoff, with evidence export left as the live aftermath hook. "
"Proven organs have exact post-restart packet prompts, no-fork raw responder outputs, event records, "
"appraisals, reviewed mutations, coordinator receipts, and a bundle manifest. Overall fixture remains "
"not-training-data until branch/IF acceptance exists."
)
entry["training_usability"] = {
"overall": "not_training_data",
"story_shape_and_grounding": "reference_only",
"projector": "training_ready",
"character_responder": "training_ready",
"event_resolver": "training_ready",
"participant_appraiser": "training_ready",
"state_mutator": "training_ready",
"relationship_perception_updater": "training_ready",
"coordinator_story_runtime": "training_ready",
"branch_compiler": "not_training_data",
"if_artifact_reviewer": "not_training_data",
"visual_artifacts": "not_training_data",
}
break
else:
raise SystemExit("coverage entry not found")
coverage_path.write_text(json.dumps(coverage, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
print(f"wrote {len(TURNS)} training-clean turns for {LOOP}")
if __name__ == "__main__":
materialize()