Spaces:
Build error
Build error
| """Demo examples for the LLM Improvement Loop workflow. | |
| This module provides example configs showing the progression through | |
| the Mystery Deepening workflow: | |
| - Round 1: Environment (plant clues in descriptions) | |
| - Round 2: Characters (hidden motivations) | |
| - Round 3: Choices (investigation options) | |
| - Round 4: Tension (red herrings and reveals) | |
| """ | |
| # Original starter config (7 states, basic mystery) | |
| DEMO_MYSTERY_STARTER = '''{ | |
| "investigation": { | |
| "crime_scene": { | |
| "description": "A dimly lit office. Papers scattered everywhere. A broken window.", | |
| "choices": ["Examine the desk", "Check the window", "Leave"], | |
| "transitions": { | |
| "Examine the desk": "desk_clue", | |
| "Check the window": "window_clue", | |
| "Leave": "hallway" | |
| } | |
| }, | |
| "desk_clue": { | |
| "description": "The desk has a half-written letter and an empty coffee cup.", | |
| "choices": ["Read the letter", "Back to scene"], | |
| "transitions": { | |
| "Read the letter": "letter_reveal", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "window_clue": { | |
| "description": "Glass shards on the inside. Someone broke in from outside.", | |
| "choices": ["Look outside", "Back to scene"], | |
| "transitions": { | |
| "Look outside": "outside_view", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "letter_reveal": { | |
| "description": "The letter mentions a meeting tonight. It's unfinished.", | |
| "choices": ["Continue investigating"], | |
| "transitions": { | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "outside_view": { | |
| "description": "Footprints in the mud lead toward the parking lot.", | |
| "choices": ["Follow the footprints", "Back inside"], | |
| "transitions": { | |
| "Follow the footprints": "hallway", | |
| "Back inside": "crime_scene" | |
| } | |
| }, | |
| "hallway": { | |
| "description": "The hallway is quiet. A security guard approaches.", | |
| "choices": ["Talk to guard", "Return to office"], | |
| "transitions": { | |
| "Talk to guard": "guard_talk", | |
| "Return to office": "crime_scene" | |
| } | |
| }, | |
| "guard_talk": { | |
| "description": "The guard says he heard nothing unusual tonight.", | |
| "choices": ["Press for details", "Thank him and leave"], | |
| "transitions": { | |
| "Press for details": "guard_talk", | |
| "Thank him and leave": "hallway" | |
| } | |
| } | |
| } | |
| }''' | |
| # After Round 1: Environment focus - plant clues in descriptions | |
| DEMO_AFTER_ROUND_1 = '''{ | |
| "investigation": { | |
| "crime_scene": { | |
| "description": "A dimly lit corner office on the 14th floor. Papers are scattered across the mahogany desk and floor - financial reports, all dated from last month. A broken window lets in cold night air, and you notice the glass shards fell inward, onto an expensive Persian rug now stained with what looks like coffee. A framed photo lies face-down near the overturned chair.", | |
| "choices": ["Examine the desk", "Check the window", "Look at the photo", "Leave"], | |
| "transitions": { | |
| "Examine the desk": "desk_clue", | |
| "Check the window": "window_clue", | |
| "Look at the photo": "photo_clue", | |
| "Leave": "hallway" | |
| } | |
| }, | |
| "desk_clue": { | |
| "description": "The desk has a half-written letter addressed to 'M' - the handwriting grows increasingly shaky toward the end. An empty coffee cup sits beside it, a faint lipstick mark on the rim despite this being a man's office. The desk drawer is slightly ajar, revealing a corner of what looks like a passport.", | |
| "choices": ["Read the letter", "Check the drawer", "Examine the coffee cup", "Back to scene"], | |
| "transitions": { | |
| "Read the letter": "letter_reveal", | |
| "Check the drawer": "drawer_contents", | |
| "Examine the coffee cup": "coffee_clue", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "window_clue": { | |
| "description": "Glass shards cover the inside of the windowsill and floor - definitely broken from outside. But something's wrong: the window latch is still locked from the inside. On the exterior ledge, you spot a small piece of torn fabric caught on a nail, dark blue like a uniform.", | |
| "choices": ["Look outside", "Examine the fabric", "Back to scene"], | |
| "transitions": { | |
| "Look outside": "outside_view", | |
| "Examine the fabric": "fabric_clue", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "photo_clue": { | |
| "description": "The frame's glass is cracked. The photo shows two men shaking hands at what looks like a company event - one is clearly the office's occupant, the other wears a security uniform. On the back, someone has written 'Partners - Nov 2019' in neat handwriting.", | |
| "choices": ["Keep the photo", "Put it back", "Back to scene"], | |
| "transitions": { | |
| "Keep the photo": "crime_scene", | |
| "Put it back": "crime_scene", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "letter_reveal": { | |
| "description": "The letter reads: 'Dear M, I can't keep doing this. They're going to find out about the transfers, and when they do...' The writing stops abruptly. A single drop of dried coffee stains the page, as if the cup was knocked over mid-sentence.", | |
| "choices": ["Continue investigating"], | |
| "transitions": { | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "drawer_contents": { | |
| "description": "Inside the drawer: a passport with several recent stamps to the Cayman Islands, a burner phone with a cracked screen, and a sticky note with a phone number and the words 'CALL BEFORE FRIDAY' underlined three times.", | |
| "choices": ["Take the phone", "Note the number", "Back to desk"], | |
| "transitions": { | |
| "Take the phone": "desk_clue", | |
| "Note the number": "desk_clue", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "coffee_clue": { | |
| "description": "The lipstick shade is a distinctive coral pink. The cup still has dregs at the bottom - the coffee smells slightly bitter, different from regular office coffee. There's a faint residue around the rim that doesn't look like dried cream.", | |
| "choices": ["Back to desk"], | |
| "transitions": { | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "fabric_clue": { | |
| "description": "The fabric is from a security uniform - you can see part of a stitched logo. It's torn at an angle suggesting someone climbed up, not down. But why would security break in through a window?", | |
| "choices": ["Back to window"], | |
| "transitions": { | |
| "Back to window": "window_clue" | |
| } | |
| }, | |
| "outside_view": { | |
| "description": "Footprints in the mud lead toward the parking lot - two sets, one coming and one going. The incoming prints are deep, as if carrying something heavy. The outgoing prints are lighter, faster, heading toward a side exit that bypasses the main security desk.", | |
| "choices": ["Follow the footprints", "Back inside"], | |
| "transitions": { | |
| "Follow the footprints": "hallway", | |
| "Back inside": "crime_scene" | |
| } | |
| }, | |
| "hallway": { | |
| "description": "The hallway is quiet, lit by flickering fluorescent lights. A security camera in the corner has a small red light - but you notice it's pointing at the wall, not the office door. A security guard approaches, his boots leaving muddy prints on the polished floor.", | |
| "choices": ["Talk to guard", "Check the camera", "Return to office"], | |
| "transitions": { | |
| "Talk to guard": "guard_talk", | |
| "Check the camera": "camera_check", | |
| "Return to office": "crime_scene" | |
| } | |
| }, | |
| "camera_check": { | |
| "description": "The camera has been manually rotated away from the office door. The adjustment screw is loose, recently turned. Whoever did this knew exactly which camera to move.", | |
| "choices": ["Back to hallway"], | |
| "transitions": { | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "guard_talk": { | |
| "description": "The guard - his name tag reads 'Martinez' - says he heard nothing unusual tonight. His uniform is slightly disheveled, and there's a small tear near his sleeve. He keeps glancing at his watch.", | |
| "choices": ["Press for details", "Thank him and leave"], | |
| "transitions": { | |
| "Press for details": "guard_pressed", | |
| "Thank him and leave": "hallway" | |
| } | |
| }, | |
| "guard_pressed": { | |
| "description": "'Look, I was on my rounds, okay? The 14th floor wasn't scheduled until midnight.' He shifts his weight nervously. 'Ask Jenkins at the front desk - he'll confirm my times.' But you notice his boots match the muddy prints in the hallway.", | |
| "choices": ["Confront about the boots", "Let it go", "Ask about the photo"], | |
| "transitions": { | |
| "Confront about the boots": "confrontation", | |
| "Let it go": "hallway", | |
| "Ask about the photo": "photo_question" | |
| } | |
| }, | |
| "confrontation": { | |
| "description": "Martinez's face pales. 'Those... those aren't... look, I can explain.' His hand moves toward his radio, then stops. 'Not here. Meet me in the parking garage in ten minutes. There are things you need to know about what really happened in that office.'", | |
| "choices": ["Agree to meet", "Detain him now"], | |
| "transitions": { | |
| "Agree to meet": "hallway", | |
| "Detain him now": "hallway" | |
| } | |
| }, | |
| "photo_question": { | |
| "description": "At the mention of the photo, Martinez goes very still. 'Where did you find that? That was supposed to be... nevermind.' He takes a deep breath. 'Richardson and I go way back. But that was before I knew what he was really doing with those accounts.'", | |
| "choices": ["Ask about the accounts", "Back to hallway"], | |
| "transitions": { | |
| "Ask about the accounts": "accounts_info", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "accounts_info": { | |
| "description": "'He was moving money - lots of it. Company funds to offshore accounts. I found out six months ago and... I should have reported it. But he promised me a cut.' Martinez looks defeated. 'Tonight, someone else found out too. Someone who doesn't negotiate.'", | |
| "choices": ["Who else knew?", "Back to hallway"], | |
| "transitions": { | |
| "Who else knew?": "hallway", | |
| "Back to hallway": "hallway" | |
| } | |
| } | |
| } | |
| }''' | |
| # After Round 2: Characters focus - hidden motivations, personality through dialogue | |
| DEMO_AFTER_ROUND_2 = '''{ | |
| "investigation": { | |
| "crime_scene": { | |
| "description": "A dimly lit corner office on the 14th floor. Papers are scattered across the mahogany desk and floor - financial reports, all dated from last month. A broken window lets in cold night air, and you notice the glass shards fell inward, onto an expensive Persian rug now stained with what looks like coffee. A framed photo lies face-down near the overturned chair. On the desk, a half-eaten sandwich suggests Richardson left in a hurry - or was interrupted mid-meal.", | |
| "choices": ["Examine the desk", "Check the window", "Look at the photo", "Leave"], | |
| "transitions": { | |
| "Examine the desk": "desk_clue", | |
| "Check the window": "window_clue", | |
| "Look at the photo": "photo_clue", | |
| "Leave": "hallway" | |
| } | |
| }, | |
| "desk_clue": { | |
| "description": "The desk has a half-written letter addressed to 'M' - the handwriting grows increasingly shaky toward the end, betraying Richardson's fear. An empty coffee cup sits beside it, a faint coral lipstick mark on the rim - Richardson's wife wears red, not coral. The desk drawer is slightly ajar, revealing a corner of what looks like a passport. A sticky note on the monitor reads 'MIRANDA CALLED - URGENT' in what looks like a secretary's handwriting.", | |
| "choices": ["Read the letter", "Check the drawer", "Examine the coffee cup", "Back to scene"], | |
| "transitions": { | |
| "Read the letter": "letter_reveal", | |
| "Check the drawer": "drawer_contents", | |
| "Examine the coffee cup": "coffee_clue", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "window_clue": { | |
| "description": "Glass shards cover the inside of the windowsill and floor - definitely broken from outside. But something's wrong: the window latch is still locked from the inside. On the exterior ledge, you spot a small piece of torn fabric caught on a nail, dark blue like a security uniform. The tear pattern suggests someone climbed up, not down - but Martinez is the only guard on duty tonight.", | |
| "choices": ["Look outside", "Examine the fabric", "Back to scene"], | |
| "transitions": { | |
| "Look outside": "outside_view", | |
| "Examine the fabric": "fabric_clue", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "photo_clue": { | |
| "description": "The frame's glass is cracked. The photo shows two men shaking hands at the company Christmas party 2019 - Richardson in an expensive suit, Martinez in his security uniform, both grinning like old friends. On the back, someone has written 'Partners in crime - Nov 2019' in feminine handwriting, with a small heart. The same coral lipstick has left a faint kiss mark in the corner.", | |
| "choices": ["Keep the photo", "Put it back", "Back to scene"], | |
| "transitions": { | |
| "Keep the photo": "crime_scene", | |
| "Put it back": "crime_scene", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "letter_reveal": { | |
| "description": "The letter reads: 'Dear M, I can't keep doing this. They're going to find out about the transfers, and when they do, neither of us will be safe. Elena is getting suspicious - she found the Cayman statements. I need to disappear, but I can't leave you behind. Meet me at the usual place at midnight. If I'm not there by 12:30, assume the worst and run. Don't trust Martinez anymore - he's been asking questions. All my love, R.' The writing stops mid-sentence, a single drop of dried coffee staining the page.", | |
| "choices": ["Continue investigating"], | |
| "transitions": { | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "drawer_contents": { | |
| "description": "Inside the drawer: a passport with several recent stamps to the Cayman Islands - the last trip was three days ago. A burner phone with a cracked screen shows the last call was to 'M' at 11:47 PM. A sticky note reads 'CALL BEFORE FRIDAY - E knows' with 'E' underlined three times. Elena, Richardson's wife, is known for her jealous streak and family money.", | |
| "choices": ["Take the phone", "Note the number", "Back to desk"], | |
| "transitions": { | |
| "Take the phone": "desk_clue", | |
| "Note the number": "desk_clue", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "coffee_clue": { | |
| "description": "The coral lipstick shade is distinctive - 'Sunset Kiss' by Luxe, the kind sold at high-end department stores. Richardson's secretary Miranda wears this exact shade. The cup still has dregs at the bottom - the coffee smells bitter, with an underlying chemical note. There's a faint crystalline residue around the rim. Either Miranda has unusual taste in coffee additives, or someone wanted to make sure Richardson didn't finish his drink.", | |
| "choices": ["Back to desk"], | |
| "transitions": { | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "fabric_clue": { | |
| "description": "The fabric is from a security uniform - you can see part of a stitched company logo. It's torn at an angle suggesting someone climbed up, not down. The thread count matches Martinez's uniform exactly, but the tear on his sleeve is on the right arm. This fabric came from a left sleeve. Either Martinez changed uniforms, or there's another security guard involved.", | |
| "choices": ["Back to window"], | |
| "transitions": { | |
| "Back to window": "window_clue" | |
| } | |
| }, | |
| "outside_view": { | |
| "description": "Footprints in the mud lead toward the parking lot - two sets, one coming and one going. The incoming prints are deep, size 11 work boots, carrying something heavy. The outgoing prints are lighter, faster, size 7 women's heels, heading toward a side exit. A cigarette butt near the window smells fresh - Virginia Slims, a women's brand. Miranda smokes Virginia Slims.", | |
| "choices": ["Follow the footprints", "Back inside"], | |
| "transitions": { | |
| "Follow the footprints": "hallway", | |
| "Back inside": "crime_scene" | |
| } | |
| }, | |
| "hallway": { | |
| "description": "The hallway is quiet, lit by flickering fluorescent lights. A security camera in the corner has a small red light - but you notice it's pointing at the wall, not the office door. Martinez approaches, his boots leaving muddy prints on the polished floor. His jaw is tight, eyes darting. 'Detective. Didn't expect you so soon.' His hand rests near his radio, as if ready to call for backup - or warn someone.", | |
| "choices": ["Talk to guard", "Check the camera", "Return to office"], | |
| "transitions": { | |
| "Talk to guard": "guard_talk", | |
| "Check the camera": "camera_check", | |
| "Return to office": "crime_scene" | |
| } | |
| }, | |
| "camera_check": { | |
| "description": "The camera has been manually rotated away from the office door. The adjustment screw is loose, recently turned - you can still see fresh scratches on the metal. Whoever did this knew exactly which camera to move. The timestamp log shows the adjustment happened at 11:42 PM, five minutes before the estimated time of the incident. Martinez clocked in at 11:30 PM.", | |
| "choices": ["Back to hallway"], | |
| "transitions": { | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "guard_talk": { | |
| "description": "'Evening, Detective.' Martinez's voice is steady but his hands aren't - they're shaking slightly. His name tag reads 'Martinez, J.' - the same J.M. initialed on the back of the photo in Richardson's office. His uniform is disheveled, with a small tear near his left sleeve. 'I heard nothing unusual tonight. Just doing my rounds.' He keeps glancing at his watch. It's 12:15 AM.", | |
| "choices": ["Press for details", "Thank him and leave"], | |
| "transitions": { | |
| "Press for details": "guard_pressed", | |
| "Thank him and leave": "hallway" | |
| } | |
| }, | |
| "guard_pressed": { | |
| "description": "'Look, I was on my rounds, okay?' Martinez's voice rises, defensive. 'The 14th floor wasn't scheduled until midnight.' He shifts his weight, mud flaking from his boots. 'Ask Jenkins at the front desk - he'll confirm my times.' His phone buzzes. He glances at it and his face goes pale. 'I need to... excuse me.' He starts to turn away. His boots are definitely size 11.", | |
| "choices": ["Confront about the boots", "Let it go", "Ask about the photo"], | |
| "transitions": { | |
| "Confront about the boots": "confrontation", | |
| "Let it go": "hallway", | |
| "Ask about the photo": "photo_question" | |
| } | |
| }, | |
| "confrontation": { | |
| "description": "Martinez's face drains of color. 'Those... those aren't...' He takes a shaky breath. 'Fine. Yes, I was up there tonight. But not to hurt him - to WARN him.' His voice cracks. 'Richardson and I... we were partners. In more ways than one. Someone found out about the money, about us. They called Richardson at 11:30, threatened to tell his wife everything unless he paid. I went up to help him figure out what to do. But when I got there...' He stops, unable to continue.", | |
| "choices": ["Agree to meet", "Detain him now"], | |
| "transitions": { | |
| "Agree to meet": "hallway", | |
| "Detain him now": "hallway" | |
| } | |
| }, | |
| "photo_question": { | |
| "description": "At the mention of the photo, Martinez goes rigid. 'Where did you find that? That was supposed to be... Miranda was supposed to get rid of it.' He realizes what he's said too late. 'Look, Richardson and I were close, okay? Closer than his wife knew. Miranda found out - she's been covering for us, but lately she's been acting strange. Jealous, maybe. She kept saying if she couldn't have him, no one would.'", | |
| "choices": ["Ask about the accounts", "Back to hallway"], | |
| "transitions": { | |
| "Ask about the accounts": "accounts_info", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "accounts_info": { | |
| "description": "'He was moving money - lots of it. Company funds to offshore accounts. We were going to leave together, start fresh in Costa Rica.' Martinez's voice is hollow. 'I found out six months ago what he was doing. Should have reported it. But he promised we'd run away, disappear. Tonight was supposed to be the night.' He looks at his watch again - 12:28 AM. 'Someone else found out. Someone who doesn't make deals. Elena Richardson has family in organized crime. She called Richardson at 11:30 PM. I heard her voice through the door.'", | |
| "choices": ["Who else knew?", "Back to hallway"], | |
| "transitions": { | |
| "Who else knew?": "hallway", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "miranda_lead": { | |
| "description": "You find Miranda Chen at her desk on the 12th floor, still typing despite the late hour. Her coral lipstick is freshly applied, and she startles when she sees you. 'Detective! I didn't hear about... is Mr. Richardson alright?' Her voice is too high, too practiced. On her desk sits an empty coffee cup - the same brand as the one in Richardson's office. A Virginia Slims pack peeks from her purse.", | |
| "choices": ["Ask about Richardson", "Ask about the coffee", "Leave"], | |
| "transitions": { | |
| "Ask about Richardson": "miranda_confession", | |
| "Ask about the coffee": "miranda_coffee", | |
| "Leave": "hallway" | |
| } | |
| }, | |
| "miranda_confession": { | |
| "description": "'He was going to leave.' Miranda's composure cracks. 'After everything I did for him - covering up the affair with Martinez, hiding the money transfers, lying to Elena when she called. And he was going to take HIM instead of me.' Her hands tremble. 'I brought him coffee at 11:40. We talked. I told him I knew about the midnight flight. He laughed. Said I wasn't his type.' She looks at you with hollow eyes. 'I didn't mean for... the pills were just supposed to make him sleepy. Elena's man must have arrived while he was drowsy.'", | |
| "choices": ["Continue investigating"], | |
| "transitions": { | |
| "Continue investigating": "hallway" | |
| } | |
| }, | |
| "miranda_coffee": { | |
| "description": "'I always bring Mr. Richardson his evening coffee. It's part of my job.' Miranda's smile is too bright. 'Tonight was no different.' But her eyes flick to her purse. Inside, you can see an empty prescription bottle - the label reads 'Alprazolam.' Enough dissolved in coffee would make anyone confused, disoriented. Easy prey.", | |
| "choices": ["Confront about pills", "Back away"], | |
| "transitions": { | |
| "Confront about pills": "miranda_confession", | |
| "Back away": "hallway" | |
| } | |
| } | |
| } | |
| }''' | |
| # After Round 3: Choices focus - investigation options, multiple approaches | |
| DEMO_AFTER_ROUND_3 = '''{ | |
| "investigation": { | |
| "crime_scene": { | |
| "description": "A dimly lit corner office on the 14th floor. Papers are scattered across the mahogany desk and floor - financial reports, all dated from last month. A broken window lets in cold night air, and you notice the glass shards fell inward, onto an expensive Persian rug now stained with what looks like coffee. A framed photo lies face-down near the overturned chair. On the desk, a half-eaten sandwich suggests Richardson left in a hurry - or was interrupted mid-meal.", | |
| "choices": ["Examine the desk carefully", "Check the broken window", "Look at the fallen photo", "Search the floor for evidence", "Leave and check the hallway"], | |
| "transitions": { | |
| "Examine the desk carefully": "desk_clue", | |
| "Check the broken window": "window_clue", | |
| "Look at the fallen photo": "photo_clue", | |
| "Search the floor for evidence": "floor_search", | |
| "Leave and check the hallway": "hallway" | |
| } | |
| }, | |
| "desk_clue": { | |
| "description": "The desk has a half-written letter addressed to 'M' - the handwriting grows increasingly shaky toward the end, betraying Richardson's fear. An empty coffee cup sits beside it, a faint coral lipstick mark on the rim - Richardson's wife wears red, not coral. The desk drawer is slightly ajar, revealing a corner of what looks like a passport. A sticky note on the monitor reads 'MIRANDA CALLED - URGENT' in what looks like a secretary's handwriting.", | |
| "choices": ["Read the letter", "Check the drawer", "Examine the coffee cup", "Look at the sticky note closely", "Back to scene"], | |
| "transitions": { | |
| "Read the letter": "letter_reveal", | |
| "Check the drawer": "drawer_contents", | |
| "Examine the coffee cup": "coffee_clue", | |
| "Look at the sticky note closely": "sticky_note_clue", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "window_clue": { | |
| "description": "Glass shards cover the inside of the windowsill and floor - definitely broken from outside. But something's wrong: the window latch is still locked from the inside. On the exterior ledge, you spot a small piece of torn fabric caught on a nail, dark blue like a security uniform. The tear pattern suggests someone climbed up, not down - but Martinez is the only guard on duty tonight.", | |
| "choices": ["Look outside carefully", "Examine the fabric closely", "Test the lock mechanism", "Check for fingerprints", "Back to scene"], | |
| "transitions": { | |
| "Look outside carefully": "outside_view", | |
| "Examine the fabric closely": "fabric_clue", | |
| "Test the lock mechanism": "lock_test", | |
| "Check for fingerprints": "fingerprint_search", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "photo_clue": { | |
| "description": "The frame's glass is cracked. The photo shows two men shaking hands at the company Christmas party 2019 - Richardson in an expensive suit, Martinez in his security uniform, both grinning like old friends. On the back, someone has written 'Partners in crime - Nov 2019' in feminine handwriting, with a small heart. The same coral lipstick has left a faint kiss mark in the corner.", | |
| "choices": ["Keep the photo as evidence", "Study the handwriting", "Compare the lipstick shade", "Put it back for now", "Back to scene"], | |
| "transitions": { | |
| "Keep the photo as evidence": "evidence_collected", | |
| "Study the handwriting": "handwriting_analysis", | |
| "Compare the lipstick shade": "lipstick_comparison", | |
| "Put it back for now": "crime_scene", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "floor_search": { | |
| "description": "Crouching low, you scan the Persian rug and hardwood floor. Beneath the overturned chair, you find a crumpled receipt from a pharmacy dated today - Alprazolam prescription filled at 6:15 PM, patient name obscured by a coffee stain. Near the window, a single pearl earring catches the light. Elena Richardson was photographed wearing pearls at last month's gala.", | |
| "choices": ["Pocket the receipt", "Examine the earring", "Check under the desk", "Back to scene"], | |
| "transitions": { | |
| "Pocket the receipt": "receipt_clue", | |
| "Examine the earring": "earring_clue", | |
| "Check under the desk": "under_desk", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "letter_reveal": { | |
| "description": "The letter reads: 'Dear M, I can't keep doing this. They're going to find out about the transfers, and when they do, neither of us will be safe. Elena is getting suspicious - she found the Cayman statements. I need to disappear, but I can't leave you behind. Meet me at the usual place at midnight. If I'm not there by 12:30, assume the worst and run. Don't trust Martinez anymore - he's been asking questions. All my love, R.' The writing stops mid-sentence, a single drop of dried coffee staining the page.", | |
| "choices": ["Who is 'M'?", "What transfers?", "Why not trust Martinez?", "Continue investigating"], | |
| "transitions": { | |
| "Who is 'M'?": "m_mystery", | |
| "What transfers?": "transfer_investigation", | |
| "Why not trust Martinez?": "martinez_suspicion", | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "drawer_contents": { | |
| "description": "Inside the drawer: a passport with several recent stamps to the Cayman Islands - the last trip was three days ago. A burner phone with a cracked screen shows the last call was to 'M' at 11:47 PM. A sticky note reads 'CALL BEFORE FRIDAY - E knows' with 'E' underlined three times. Elena, Richardson's wife, is known for her jealous streak and family money.", | |
| "choices": ["Take the phone", "Check the passport dates", "Examine the sticky note", "Look for hidden compartments", "Back to desk"], | |
| "transitions": { | |
| "Take the phone": "phone_evidence", | |
| "Check the passport dates": "passport_clue", | |
| "Examine the sticky note": "friday_deadline", | |
| "Look for hidden compartments": "secret_compartment", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "coffee_clue": { | |
| "description": "The coral lipstick shade is distinctive - 'Sunset Kiss' by Luxe, the kind sold at high-end department stores. Richardson's secretary Miranda wears this exact shade. The cup still has dregs at the bottom - the coffee smells bitter, with an underlying chemical note. There's a faint crystalline residue around the rim. Either Miranda has unusual taste in coffee additives, or someone wanted to make sure Richardson didn't finish his drink.", | |
| "choices": ["Smell the coffee", "Scrape the residue for analysis", "Photograph the lipstick mark", "Back to desk"], | |
| "transitions": { | |
| "Smell the coffee": "poison_hint", | |
| "Scrape the residue for analysis": "residue_analysis", | |
| "Photograph the lipstick mark": "lipstick_evidence", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "sticky_note_clue": { | |
| "description": "The handwriting on 'MIRANDA CALLED - URGENT' is hurried, slanted - written by someone right-handed in a rush. But Richardson is left-handed. Someone else wrote this. The time stamp in the corner reads 11:35 PM. Miranda Chen is Richardson's secretary. Her desk is on the 12th floor.", | |
| "choices": ["Go find Miranda", "Call Miranda's extension", "Back to desk"], | |
| "transitions": { | |
| "Go find Miranda": "miranda_lead", | |
| "Call Miranda's extension": "miranda_call", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "fabric_clue": { | |
| "description": "The fabric is from a security uniform - you can see part of a stitched company logo. It's torn at an angle suggesting someone climbed up, not down. The thread count matches Martinez's uniform exactly, but the tear on his sleeve is on the right arm. This fabric came from a left sleeve. Either Martinez changed uniforms, or there's another security guard involved.", | |
| "choices": ["Check the security roster", "Confront Martinez about this", "Examine more closely", "Back to window"], | |
| "transitions": { | |
| "Check the security roster": "security_roster", | |
| "Confront Martinez about this": "confrontation", | |
| "Examine more closely": "fabric_detail", | |
| "Back to window": "window_clue" | |
| } | |
| }, | |
| "outside_view": { | |
| "description": "Footprints in the mud lead toward the parking lot - two sets, one coming and one going. The incoming prints are deep, size 11 work boots, carrying something heavy. The outgoing prints are lighter, faster, size 7 women's heels, heading toward a side exit. A cigarette butt near the window smells fresh - Virginia Slims, a women's brand. Miranda smokes Virginia Slims.", | |
| "choices": ["Follow the boot prints", "Follow the heel prints", "Collect the cigarette butt", "Photograph the prints", "Back inside"], | |
| "transitions": { | |
| "Follow the boot prints": "parking_lot", | |
| "Follow the heel prints": "side_exit", | |
| "Collect the cigarette butt": "cigarette_evidence", | |
| "Photograph the prints": "print_documentation", | |
| "Back inside": "crime_scene" | |
| } | |
| }, | |
| "hallway": { | |
| "description": "The hallway is quiet, lit by flickering fluorescent lights. A security camera in the corner has a small red light - but you notice it's pointing at the wall, not the office door. Martinez approaches, his boots leaving muddy prints on the polished floor. His jaw is tight, eyes darting. 'Detective. Didn't expect you so soon.' His hand rests near his radio, as if ready to call for backup - or warn someone.", | |
| "choices": ["Talk to Martinez directly", "Check the security camera first", "Examine his muddy boots", "Ask about other staff on duty", "Return to office"], | |
| "transitions": { | |
| "Talk to Martinez directly": "guard_talk", | |
| "Check the security camera first": "camera_check", | |
| "Examine his muddy boots": "boot_examination", | |
| "Ask about other staff on duty": "staff_inquiry", | |
| "Return to office": "crime_scene" | |
| } | |
| }, | |
| "camera_check": { | |
| "description": "The camera has been manually rotated away from the office door. The adjustment screw is loose, recently turned - you can still see fresh scratches on the metal. Whoever did this knew exactly which camera to move. The timestamp log shows the adjustment happened at 11:42 PM, five minutes before the estimated time of the incident. Martinez clocked in at 11:30 PM.", | |
| "choices": ["Check the camera footage", "Dust for prints on the camera", "Confront Martinez about timing", "Back to hallway"], | |
| "transitions": { | |
| "Check the camera footage": "footage_review", | |
| "Dust for prints on the camera": "camera_prints", | |
| "Confront Martinez about timing": "timing_confrontation", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "guard_talk": { | |
| "description": "'Evening, Detective.' Martinez's voice is steady but his hands aren't - they're shaking slightly. His name tag reads 'Martinez, J.' - the same J.M. initialed on the back of the photo in Richardson's office. His uniform is disheveled, with a small tear near his left sleeve. 'I heard nothing unusual tonight. Just doing my rounds.' He keeps glancing at his watch. It's 12:15 AM.", | |
| "choices": ["Press for details about tonight", "Ask about his relationship with Richardson", "Point out the tear in his uniform", "Thank him and leave"], | |
| "transitions": { | |
| "Press for details about tonight": "guard_pressed", | |
| "Ask about his relationship with Richardson": "relationship_question", | |
| "Point out the tear in his uniform": "uniform_confrontation", | |
| "Thank him and leave": "hallway" | |
| } | |
| }, | |
| "guard_pressed": { | |
| "description": "'Look, I was on my rounds, okay?' Martinez's voice rises, defensive. 'The 14th floor wasn't scheduled until midnight.' He shifts his weight, mud flaking from his boots. 'Ask Jenkins at the front desk - he'll confirm my times.' His phone buzzes. He glances at it and his face goes pale. 'I need to... excuse me.' He starts to turn away. His boots are definitely size 11.", | |
| "choices": ["Confront about the muddy boots", "Demand to see his phone", "Let him go and follow", "Ask about the photo"], | |
| "transitions": { | |
| "Confront about the muddy boots": "confrontation", | |
| "Demand to see his phone": "phone_demand", | |
| "Let him go and follow": "follow_martinez", | |
| "Ask about the photo": "photo_question" | |
| } | |
| }, | |
| "confrontation": { | |
| "description": "Martinez's face drains of color. 'Those... those aren't...' He takes a shaky breath. 'Fine. Yes, I was up there tonight. But not to hurt him - to WARN him.' His voice cracks. 'Richardson and I... we were partners. In more ways than one. Someone found out about the money, about us. They called Richardson at 11:30, threatened to tell his wife everything unless he paid. I went up to help him figure out what to do. But when I got there...' He stops, unable to continue.", | |
| "choices": ["What did you find when you arrived?", "Who called Richardson?", "Tell me about Elena Richardson", "You're under arrest"], | |
| "transitions": { | |
| "What did you find when you arrived?": "martinez_discovery", | |
| "Who called Richardson?": "caller_identity", | |
| "Tell me about Elena Richardson": "elena_info", | |
| "You're under arrest": "arrest_martinez" | |
| } | |
| }, | |
| "photo_question": { | |
| "description": "At the mention of the photo, Martinez goes rigid. 'Where did you find that? That was supposed to be... Miranda was supposed to get rid of it.' He realizes what he's said too late. 'Look, Richardson and I were close, okay? Closer than his wife knew. Miranda found out - she's been covering for us, but lately she's been acting strange. Jealous, maybe. She kept saying if she couldn't have him, no one would.'", | |
| "choices": ["Tell me more about Miranda", "Ask about the accounts", "Was Miranda here tonight?", "Back to hallway"], | |
| "transitions": { | |
| "Tell me more about Miranda": "miranda_background", | |
| "Ask about the accounts": "accounts_info", | |
| "Was Miranda here tonight?": "miranda_whereabouts", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "accounts_info": { | |
| "description": "'He was moving money - lots of it. Company funds to offshore accounts. We were going to leave together, start fresh in Costa Rica.' Martinez's voice is hollow. 'I found out six months ago what he was doing. Should have reported it. But he promised we'd run away, disappear. Tonight was supposed to be the night.' He looks at his watch again - 12:28 AM. 'Someone else found out. Someone who doesn't make deals. Elena Richardson has family in organized crime. She called Richardson at 11:30 PM. I heard her voice through the door.'", | |
| "choices": ["Tell me about Elena's family", "Who else knew about the money?", "What happened at 11:30?", "Back to hallway"], | |
| "transitions": { | |
| "Tell me about Elena's family": "elena_family", | |
| "Who else knew about the money?": "money_knowledge", | |
| "What happened at 11:30?": "eleven_thirty", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "miranda_lead": { | |
| "description": "You find Miranda Chen at her desk on the 12th floor, still typing despite the late hour. Her coral lipstick is freshly applied, and she startles when she sees you. 'Detective! I didn't hear about... is Mr. Richardson alright?' Her voice is too high, too practiced. On her desk sits an empty coffee cup - the same brand as the one in Richardson's office. A Virginia Slims pack peeks from her purse.", | |
| "choices": ["Ask about Richardson directly", "Ask about the coffee", "Mention the cigarettes outside", "Ask why she's working late", "Leave quietly"], | |
| "transitions": { | |
| "Ask about Richardson directly": "miranda_richardson", | |
| "Ask about the coffee": "miranda_coffee", | |
| "Mention the cigarettes outside": "miranda_cigarettes", | |
| "Ask why she's working late": "miranda_late", | |
| "Leave quietly": "hallway" | |
| } | |
| }, | |
| "miranda_confession": { | |
| "description": "'He was going to leave.' Miranda's composure cracks. 'After everything I did for him - covering up the affair with Martinez, hiding the money transfers, lying to Elena when she called. And he was going to take HIM instead of me.' Her hands tremble. 'I brought him coffee at 11:40. We talked. I told him I knew about the midnight flight. He laughed. Said I wasn't his type.' She looks at you with hollow eyes. 'I didn't mean for... the pills were just supposed to make him sleepy. Elena's man must have arrived while he was drowsy.'", | |
| "choices": ["What pills did you use?", "Who is Elena's man?", "You're under arrest", "Continue investigating"], | |
| "transitions": { | |
| "What pills did you use?": "pills_confession", | |
| "Who is Elena's man?": "elenas_enforcer", | |
| "You're under arrest": "miranda_arrest", | |
| "Continue investigating": "hallway" | |
| } | |
| }, | |
| "miranda_coffee": { | |
| "description": "'I always bring Mr. Richardson his evening coffee. It's part of my job.' Miranda's smile is too bright. 'Tonight was no different.' But her eyes flick to her purse. Inside, you can see an empty prescription bottle - the label reads 'Alprazolam.' Enough dissolved in coffee would make anyone confused, disoriented. Easy prey.", | |
| "choices": ["Confront about the prescription", "Ask who else visited tonight", "Mention the lipstick on the cup", "Back away slowly"], | |
| "transitions": { | |
| "Confront about the prescription": "miranda_confession", | |
| "Ask who else visited tonight": "visitor_info", | |
| "Mention the lipstick on the cup": "lipstick_confrontation", | |
| "Back away slowly": "hallway" | |
| } | |
| }, | |
| "lock_test": { | |
| "description": "You examine the window lock mechanism carefully. It's a standard sash lock, latched from the inside. But there are faint scratches around the latch - someone jimmied it closed AFTER the glass was broken. This wasn't a break-in. It was staged to look like one. The real entrance was probably the office door.", | |
| "choices": ["Check the office door lock", "Re-examine the glass pattern", "Back to scene"], | |
| "transitions": { | |
| "Check the office door lock": "door_lock", | |
| "Re-examine the glass pattern": "glass_analysis", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "fingerprint_search": { | |
| "description": "Dusting the window frame reveals multiple prints. Most are smudged, but you get two clean sets: one matches the security database (Martinez), and another belongs to a woman - long, manicured nails. The woman's prints are on the INSIDE of the window latch. Someone closed it from inside after the glass was broken.", | |
| "choices": ["Run the unknown prints", "Confront Martinez", "Back to scene"], | |
| "transitions": { | |
| "Run the unknown prints": "print_results", | |
| "Confront Martinez": "confrontation", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "evidence_collected": { | |
| "description": "You slip the photo into an evidence bag. The connection between Martinez and Richardson goes deeper than a professional relationship. The feminine handwriting and lipstick mark suggest a third party - someone close enough to Richardson to know about his affairs, someone who might feel betrayed.", | |
| "choices": ["Continue investigating"], | |
| "transitions": { | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "handwriting_analysis": { | |
| "description": "The handwriting on the photo back is distinctive - elegant, educated, with a slight leftward slant. Comparing it to the sticky note on Richardson's monitor, you notice similarities. Both were written by the same person. Miranda Chen is left-handed.", | |
| "choices": ["Go find Miranda", "Back to scene"], | |
| "transitions": { | |
| "Go find Miranda": "miranda_lead", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "m_mystery": { | |
| "description": "Who is 'M'? The letter suggests an intimate relationship. Martinez's first name is Jorge - that doesn't match. But Miranda Chen's last name starts with M. Or could 'M' refer to someone else entirely? Richardson's wife Elena was born Elena Morrison. Three suspects, one initial.", | |
| "choices": ["Focus on Martinez", "Investigate Miranda", "Look into Elena", "Continue investigating"], | |
| "transitions": { | |
| "Focus on Martinez": "guard_talk", | |
| "Investigate Miranda": "miranda_lead", | |
| "Look into Elena": "elena_investigation", | |
| "Continue investigating": "crime_scene" | |
| } | |
| } | |
| } | |
| }''' | |
| # After Round 4: Tension focus - time pressure, red herrings, dramatic reveals | |
| DEMO_AFTER_ROUND_4 = '''{ | |
| "investigation": { | |
| "crime_scene": { | |
| "description": "A dimly lit corner office on the 14th floor. Papers are scattered across the mahogany desk and floor - financial reports, all dated from last month. A broken window lets in cold night air, and you notice the glass shards fell inward, onto an expensive Persian rug now stained with what looks like coffee. A framed photo lies face-down near the overturned chair. On the desk, a half-eaten sandwich suggests Richardson left in a hurry - or was interrupted mid-meal. Your phone buzzes: 'URGENT - Richardson's wife just landed at the airport. ETA 45 minutes.' The clock is ticking.", | |
| "choices": ["Examine the desk carefully", "Check the broken window", "Look at the fallen photo", "Search the floor for evidence", "Leave and check the hallway"], | |
| "transitions": { | |
| "Examine the desk carefully": "desk_clue", | |
| "Check the broken window": "window_clue", | |
| "Look at the fallen photo": "photo_clue", | |
| "Search the floor for evidence": "floor_search", | |
| "Leave and check the hallway": "hallway" | |
| } | |
| }, | |
| "desk_clue": { | |
| "description": "The desk has a half-written letter addressed to 'M' - the handwriting grows increasingly shaky toward the end, betraying Richardson's fear. An empty coffee cup sits beside it, a faint coral lipstick mark on the rim - Richardson's wife wears red, not coral. The desk drawer is slightly ajar, revealing a corner of what looks like a passport. A sticky note on the monitor reads 'MIRANDA CALLED - URGENT' in what looks like a secretary's handwriting. Wait - there's another note underneath: 'Elena knows. Tonight. Midnight.' Someone warned him, but he didn't run.", | |
| "choices": ["Read the letter", "Check the drawer", "Examine the coffee cup", "Look at both sticky notes", "Back to scene"], | |
| "transitions": { | |
| "Read the letter": "letter_reveal", | |
| "Check the drawer": "drawer_contents", | |
| "Examine the coffee cup": "coffee_clue", | |
| "Look at both sticky notes": "sticky_notes_comparison", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "window_clue": { | |
| "description": "Glass shards cover the inside of the windowsill and floor - definitely broken from outside. But something's wrong: the window latch is still locked from the inside. RED HERRING ALERT: Your gut says this is staged. On the exterior ledge, you spot a small piece of torn fabric caught on a nail, dark blue like a security uniform. But wait - security uniforms were switched to BLACK last month. This fabric is from an OLD uniform. Someone planted this.", | |
| "choices": ["Look outside carefully", "Examine the planted fabric", "Test the lock mechanism", "Check for fingerprints", "Back to scene"], | |
| "transitions": { | |
| "Look outside carefully": "outside_view", | |
| "Examine the planted fabric": "fabric_clue", | |
| "Test the lock mechanism": "lock_test", | |
| "Check for fingerprints": "fingerprint_search", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "photo_clue": { | |
| "description": "The frame's glass is cracked. The photo shows two men shaking hands at the company Christmas party 2019 - Richardson in an expensive suit, Martinez in his security uniform, both grinning like old friends. On the back, someone has written 'Partners in crime - Nov 2019' in feminine handwriting, with a small heart. The same coral lipstick has left a faint kiss mark in the corner. But here's what catches your eye: the photo has been recently handled - fresh fingerprints over old dust. Someone looked at this TONIGHT.", | |
| "choices": ["Keep the photo as evidence", "Study the fresh fingerprints", "Compare the lipstick shade", "Check for hidden messages", "Back to scene"], | |
| "transitions": { | |
| "Keep the photo as evidence": "evidence_collected", | |
| "Study the fresh fingerprints": "fresh_prints", | |
| "Compare the lipstick shade": "lipstick_comparison", | |
| "Check for hidden messages": "hidden_message", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "floor_search": { | |
| "description": "Crouching low, you scan the Persian rug and hardwood floor. Beneath the overturned chair, you find a crumpled receipt from a pharmacy dated today - Alprazolam prescription filled at 6:15 PM, patient name obscured by a coffee stain. Near the window, a single pearl earring catches the light. Elena Richardson was photographed wearing pearls at last month's gala. But pearls are common - is this really hers, or another planted clue?", | |
| "choices": ["Pocket the receipt - crucial evidence", "Examine the earring skeptically", "Check under the desk", "Look for more planted evidence", "Back to scene"], | |
| "transitions": { | |
| "Pocket the receipt - crucial evidence": "receipt_clue", | |
| "Examine the earring skeptically": "earring_analysis", | |
| "Check under the desk": "under_desk", | |
| "Look for more planted evidence": "planted_evidence_search", | |
| "Back to scene": "crime_scene" | |
| } | |
| }, | |
| "letter_reveal": { | |
| "description": "The letter reads: 'Dear M, I can't keep doing this. They're going to find out about the transfers, and when they do, neither of us will be safe. Elena is getting suspicious - she found the Cayman statements. I need to disappear, but I can't leave you behind. Meet me at the usual place at midnight. If I'm not there by 12:30, assume the worst and run. Don't trust Martinez anymore - he's been asking questions. All my love, R.' The writing stops mid-sentence. WAIT - the ink at the end is different. Someone ADDED that last line about Martinez. The original letter ended at 'run.'", | |
| "choices": ["Examine the different inks", "Who is 'M'?", "Why was Martinez's name added?", "Continue investigating"], | |
| "transitions": { | |
| "Examine the different inks": "ink_analysis", | |
| "Who is 'M'?": "m_mystery", | |
| "Why was Martinez's name added?": "martinez_framed", | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "drawer_contents": { | |
| "description": "Inside the drawer: a passport with several recent stamps to the Cayman Islands - the last trip was three days ago. A burner phone with a cracked screen shows the last call was to 'M' at 11:47 PM - just fifteen minutes before the estimated incident. A sticky note reads 'CALL BEFORE FRIDAY - E knows' with 'E' underlined three times. Your phone buzzes again: 'Elena Richardson's car just passed the highway exit. 30 minutes.' You need to solve this before she arrives and lawyers up.", | |
| "choices": ["Grab the phone - check call history", "Check the passport dates", "Examine the 'E knows' note", "Look for hidden compartments", "Back to desk"], | |
| "transitions": { | |
| "Grab the phone - check call history": "phone_evidence", | |
| "Check the passport dates": "passport_clue", | |
| "Examine the 'E knows' note": "friday_deadline", | |
| "Look for hidden compartments": "secret_compartment", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "coffee_clue": { | |
| "description": "The coral lipstick shade is distinctive - 'Sunset Kiss' by Luxe, sold exclusively at Nordstrom. Richardson's secretary Miranda wears this exact shade - you've seen her wear it. But so does ELENA RICHARDSON in her Instagram photos. The cup still has dregs at the bottom - the coffee smells bitter, with an underlying chemical note. There's a faint crystalline residue around the rim. TWIST: The residue isn't a sedative. Field test shows it's artificial sweetener - the expensive kind Elena uses for her diet. Miranda takes her coffee black.", | |
| "choices": ["This changes everything", "Test the residue again", "Photograph the evidence", "Back to desk"], | |
| "transitions": { | |
| "This changes everything": "elena_revelation", | |
| "Test the residue again": "residue_confirmation", | |
| "Photograph the evidence": "evidence_photo", | |
| "Back to desk": "desk_clue" | |
| } | |
| }, | |
| "hallway": { | |
| "description": "The hallway is quiet, lit by flickering fluorescent lights. A security camera in the corner has a small red light - but you notice it's pointing at the wall, not the office door. Martinez approaches, his boots leaving muddy prints on the polished floor. His jaw is tight, eyes darting. 'Detective. Didn't expect you so soon.' His hand rests near his radio. Then he says something strange: 'Whatever they told you about me and Richardson - it's not the whole story. Elena's people got here first. I tried to warn him.' He looks genuinely scared.", | |
| "choices": ["What do you mean, Elena's people?", "Check the security camera first", "Examine his muddy boots", "Ask about the warning", "Return to office"], | |
| "transitions": { | |
| "What do you mean, Elena's people?": "elena_people", | |
| "Check the security camera first": "camera_check", | |
| "Examine his muddy boots": "boot_examination", | |
| "Ask about the warning": "warning_details", | |
| "Return to office": "crime_scene" | |
| } | |
| }, | |
| "camera_check": { | |
| "description": "The camera has been manually rotated away from the office door. The adjustment screw is loose, recently turned - you can still see fresh scratches on the metal. Whoever did this knew exactly which camera to move. The timestamp log shows the adjustment happened at 11:42 PM. But here's the CRUCIAL DETAIL: there are TWO sets of scratches. Someone adjusted this camera TWICE. First at 11:42 PM, then again at 11:58 PM - after the incident. Someone came back to make sure it was still pointed away.", | |
| "choices": ["Check footage from other cameras", "Who came back at 11:58?", "Confront Martinez about timing", "Back to hallway"], | |
| "transitions": { | |
| "Check footage from other cameras": "other_cameras", | |
| "Who came back at 11:58?": "second_adjustment", | |
| "Confront Martinez about timing": "timing_confrontation", | |
| "Back to hallway": "hallway" | |
| } | |
| }, | |
| "guard_talk": { | |
| "description": "'Evening, Detective.' Martinez's voice is steady but his hands aren't - they're shaking. His name tag reads 'Martinez, J.' His uniform is disheveled, with a small tear near his left sleeve. 'I heard nothing unusual tonight. Just doing my rounds.' He keeps glancing at his watch. It's 12:15 AM. Then he leans closer and whispers: 'The woman who came up at 11:35 - it wasn't Miranda. It was Elena. She was wearing Miranda's coat, but I recognized her perfume. Chanel No. 5. I didn't say anything because... her family...' He draws a finger across his throat.", | |
| "choices": ["Elena was HERE?", "Tell me about her family", "Why didn't you stop her?", "You're lying to protect yourself"], | |
| "transitions": { | |
| "Elena was HERE?": "elena_presence", | |
| "Tell me about her family": "family_connections", | |
| "Why didn't you stop her?": "martinez_fear", | |
| "You're lying to protect yourself": "martinez_defense" | |
| } | |
| }, | |
| "guard_pressed": { | |
| "description": "'Look, I was on my rounds, okay?' Martinez's voice rises, then drops to a whisper. 'The 14th floor wasn't scheduled until midnight. But I went up early because Richardson texted me at 11:25 - said someone was coming, someone dangerous. When I got there at 11:40, I heard voices inside. A woman, screaming. Then silence. I... I hid. I'm not proud of it.' He shows you his phone - the text from Richardson reads: 'SHE FOUND OUT. Coming to office. Help me. Please.' Sent at 11:25 PM.", | |
| "choices": ["Who is 'she'?", "Why did you hide?", "Show me the rest of the texts", "What happened after the silence?"], | |
| "transitions": { | |
| "Who is 'she'?": "she_identity", | |
| "Why did you hide?": "hiding_reason", | |
| "Show me the rest of the texts": "full_texts", | |
| "What happened after the silence?": "aftermath" | |
| } | |
| }, | |
| "confrontation": { | |
| "description": "Martinez breaks down completely. 'Fine! Yes, Richardson and I were together. For two years. But I didn't hurt him - I LOVED him.' Tears stream down his face. 'When I got to the office, he was already on the floor. The coffee cup was knocked over. A woman in Miranda's coat was climbing out the window - that's why there's fabric on the ledge. But the way she moved... it wasn't Miranda. It was Elena, I swear to God. She set this whole thing up to frame Miranda, frame me. She's been planning this for months.'", | |
| "choices": ["How do you know it was Elena?", "Where is Richardson now?", "What do you mean, planning for months?", "You're under arrest"], | |
| "transitions": { | |
| "How do you know it was Elena?": "elena_identification", | |
| "Where is Richardson now?": "richardson_fate", | |
| "What do you mean, planning for months?": "long_con", | |
| "You're under arrest": "arrest_martinez" | |
| } | |
| }, | |
| "photo_question": { | |
| "description": "At the mention of the photo, Martinez's face changes from fear to realization. 'That photo... Elena found it last month. She came to me, showed it to me. Said she'd destroy both our careers unless I helped her.' He pulls out his phone, shows you a text thread. Elena Richardson: 'I know about you and my husband. Friday night. You will let me into the building after hours. You will turn off the camera. Or these photos go to HR, the board, and every news outlet in the city.' Dated three days ago.", | |
| "choices": ["She blackmailed you into helping", "Did you know what she planned?", "Why didn't you warn Richardson?", "Show this to my captain"], | |
| "transitions": { | |
| "She blackmailed you into helping": "blackmail_reveal", | |
| "Did you know what she planned?": "plan_knowledge", | |
| "Why didn't you warn Richardson?": "warning_failure", | |
| "Show this to my captain": "evidence_secured" | |
| } | |
| }, | |
| "accounts_info": { | |
| "description": "'He was moving money - lots of it. Company funds to offshore accounts.' Martinez wipes his eyes. 'We were going to leave together, start fresh. But Elena found out about everything - the money AND us. She didn't just want a divorce. She wanted revenge.' He checks his watch nervously. 'Her family has connections to people who make problems disappear. The coffee, the staged break-in - this was a professional hit made to look like a crime of passion. And I...' His voice breaks. 'I let her in. God help me, I let her in.'", | |
| "choices": ["Where is Elena now?", "The coffee was poisoned?", "Who else helped her?", "We need to find Richardson"], | |
| "transitions": { | |
| "Where is Elena now?": "elena_location", | |
| "The coffee was poisoned?": "poison_confirmation", | |
| "Who else helped her?": "accomplices", | |
| "We need to find Richardson": "richardson_search" | |
| } | |
| }, | |
| "miranda_lead": { | |
| "description": "You find Miranda Chen at her desk on the 12th floor, furiously packing a box. She freezes when she sees you. 'Detective! I was just... organizing.' Her coral lipstick is smeared, mascara running. 'I heard sirens. Is Mr. Richardson okay?' She's lying - her coat is hanging on the back of her chair, dry and clean. But someone wearing her coat was at the scene. On her desk, a resignation letter dated TODAY. She was planning to leave before any of this happened.", | |
| "choices": ["Where's your other coat, Miranda?", "Who borrowed your coat tonight?", "Why are you resigning?", "Did you bring Richardson coffee tonight?"], | |
| "transitions": { | |
| "Where's your other coat, Miranda?": "coat_question", | |
| "Who borrowed your coat tonight?": "coat_borrower", | |
| "Why are you resigning?": "resignation_reason", | |
| "Did you bring Richardson coffee tonight?": "coffee_denial" | |
| } | |
| }, | |
| "miranda_confession": { | |
| "description": "'I didn't hurt him!' Miranda sobs. 'Yes, I brought him coffee at 11:40. Yes, I've been in love with him for three years. But when I got to his office, Elena was already there. She was wearing MY coat - must have taken it from my desk earlier. She told me to leave, that this was between her and her husband. I... I ran. I was scared.' She pulls out her phone. 'Look - I called 911 at 11:52 PM. Anonymously. That's how you got here so fast. I tried to help him, I swear.'", | |
| "choices": ["The 911 call - that was you?", "What did you see Elena doing?", "Why was she wearing your coat?", "You're coming with me"], | |
| "transitions": { | |
| "The 911 call - that was you?": "911_confirmation", | |
| "What did you see Elena doing?": "elena_actions", | |
| "Why was she wearing your coat?": "coat_explanation", | |
| "You're coming with me": "miranda_detained" | |
| } | |
| }, | |
| "miranda_coffee": { | |
| "description": "'I always bring Mr. Richardson his evening coffee.' Miranda's hands shake as she grabs the edge of her desk. 'But tonight - tonight Elena intercepted me in the hallway. Took the cup right out of my hands. Said she wanted to make up with her husband, bring him coffee as a peace offering. I thought it was sweet.' Her face crumbles. 'Oh God. She put something in it, didn't she? She used MY cup, MY lipstick shade - she was setting me up from the start.'", | |
| "choices": ["Elena took the coffee from you?", "She planned to frame you", "What time was this?", "I need you to come with me"], | |
| "transitions": { | |
| "Elena took the coffee from you?": "coffee_interception", | |
| "She planned to frame you": "frame_job", | |
| "What time was this?": "timeline_clarification", | |
| "I need you to come with me": "miranda_witness" | |
| } | |
| }, | |
| "ink_analysis": { | |
| "description": "Examining the letter under your UV light, the truth becomes clear. The original letter was written with Richardson's usual fountain pen - blue-black Montblanc ink. But the last line about Martinez was added with a cheap ballpoint, common office supply. Someone added that line to redirect suspicion toward Martinez and away from the real killer. The handwriting is close to Richardson's but not exact - slightly more angular. Elena Richardson is known for her perfect forgery skills; she handles all the household documents.", | |
| "choices": ["Elena forged this line", "Test the ballpoint ink", "Check security footage for document tampering", "Continue investigating"], | |
| "transitions": { | |
| "Elena forged this line": "forgery_confirmed", | |
| "Test the ballpoint ink": "ink_test", | |
| "Check security footage for document tampering": "document_footage", | |
| "Continue investigating": "crime_scene" | |
| } | |
| }, | |
| "final_confrontation": { | |
| "description": "Your phone buzzes one final time: 'Elena Richardson just pulled into the parking garage. She's heading for the elevator.' You have minutes to make a decision. The evidence points to a calculated murder disguised as a crime of passion. Elena poisoned her husband's coffee, staged the break-in, framed Miranda and Martinez, and is about to walk into this building pretending to be the grieving widow. Martinez is willing to testify. Miranda is a witness. The forged letter and planted evidence tell the story. But Elena's family connections mean this case needs to be airtight.", | |
| "choices": ["Arrest Elena in the lobby", "Gather more evidence first", "Confront her in the office", "Call for backup and wait"], | |
| "transitions": { | |
| "Arrest Elena in the lobby": "lobby_arrest", | |
| "Gather more evidence first": "more_evidence", | |
| "Confront her in the office": "office_confrontation", | |
| "Call for backup and wait": "backup_ending" | |
| } | |
| }, | |
| "true_ending": { | |
| "description": "As Elena Richardson steps off the elevator, her face a perfect mask of concern, you step forward with your badge. 'Mrs. Richardson. We have witnesses placing you at your husband's office at 11:35 PM, wearing Miranda Chen's coat. We have the forged addition to your husband's letter. We have your artificial sweetener in the poisoned coffee. And we have your blackmail texts to Jorge Martinez.' Her mask slips, just for a moment, revealing cold fury. 'You can't prove anything. My family will—' 'Your family will read about this in tomorrow's paper,' you interrupt. 'Elena Richardson, you're under arrest for the murder of David Richardson.' As the cuffs click, Martinez finally stops shaking. Miranda stops crying. Sometimes, the truth finds a way through the lies.", | |
| "choices": ["Case closed"], | |
| "transitions": { | |
| "Case closed": "crime_scene" | |
| } | |
| } | |
| } | |
| }''' | |
| # Demo workflow guide | |
| DEMO_WORKFLOW_GUIDE = """ | |
| ## LLM Improvement Loop Demo: Mystery Deepening Workflow | |
| This demo shows how to iteratively improve a game config using the Mystery Deepening workflow. | |
| ### Starting Config | |
| - 7 states | |
| - Basic mystery structure | |
| - Short descriptions (8-15 words each) | |
| - 2 choices per state on average | |
| ### Workflow Steps | |
| **Round 1: Environment Focus** | |
| - Click "1: environment" in Mystery Deepening column | |
| - Generate prompt → Copy to ChatGPT/Claude | |
| - LLM adds: environmental clues, sensory details, hidden objects | |
| - Result: 18 states, rich atmospheric descriptions | |
| **Round 2: Characters Focus** | |
| - Click "2: characters" | |
| - Generate prompt with Round 1 config | |
| - LLM adds: NPC motivations, dialogue revealing personality, relationships | |
| - Result: Character depth, suspicious behaviors, backstory hints | |
| **Round 3: Choices Focus** | |
| - Click "3: choices" | |
| - Generate prompt with Round 2 config | |
| - LLM adds: investigation options, different approaches, hidden paths | |
| - Result: 3-4 choices per state, multiple investigation strategies | |
| **Round 4: Tension Focus** | |
| - Click "4: tension" | |
| - Generate prompt with Round 3 config | |
| - LLM adds: time pressure, red herrings, dramatic reveals | |
| - Result: Heightened stakes, misleading clues, climactic moments | |
| ### Metrics Progression (Example) | |
| | Round | States | Avg Choices | Avg Desc Length | | |
| |-------|--------|-------------|-----------------| | |
| | Start | 7 | 2.0 | 12 words | | |
| | R1 | 18 | 2.8 | 45 words | | |
| | R2 | 22 | 3.1 | 52 words | | |
| | R3 | 25 | 3.6 | 55 words | | |
| | R4 | 28 | 3.8 | 62 words | | |
| ### Tips | |
| 1. Each round builds on previous improvements | |
| 2. The prompt includes round context for continuity | |
| 3. Use "Revert" if a round's changes don't work | |
| 4. Export history to save your improvement journey | |
| """ | |
| if __name__ == "__main__": | |
| import json | |
| # Validate all rounds | |
| rounds = [ | |
| ("Starter (R0)", DEMO_MYSTERY_STARTER), | |
| ("Round 1 - Environment", DEMO_AFTER_ROUND_1), | |
| ("Round 2 - Characters", DEMO_AFTER_ROUND_2), | |
| ("Round 3 - Choices", DEMO_AFTER_ROUND_3), | |
| ("Round 4 - Tension", DEMO_AFTER_ROUND_4), | |
| ] | |
| print("=== Demo Config Validation ===\n") | |
| for name, config_str in rounds: | |
| config = json.loads(config_str) | |
| states = config.get('investigation', {}) | |
| total_choices = sum(len(s.get('choices', [])) for s in states.values()) | |
| avg_choices = total_choices / len(states) if states else 0 | |
| print(f"{name}: {len(states)} states, {avg_choices:.1f} avg choices") | |
| print("\n" + DEMO_WORKFLOW_GUIDE) | |