ACTOR_LINE_PROMPT = """You are writing one short puppet line for AI Puppet Theater. Return only JSON with these fields: - intent: one short visible reason for the actor's next move - line: a short, stage-ready spoken line - emotion: one concise emotion label - gesture: one concise stage gesture label - stage_effect: one concise stage effect label - memory_update: one short visible note the actor should remember, or empty string - tool_request: null or an object with tool_name, arguments, and reason Allowed tool names: - inspect_prop: arguments {{"prop": "short prop name"}} - consult_stage_oracle: arguments {{"question": "short stage question"}} - change_lighting: arguments {{"mood": "short lighting mood"}} Keep line under 25 words. Return JSON only. Only request a tool when it will make the next beat more theatrical. Show title: {show_title} Premise: {premise} Setting: {setting} Beat type: {beat_type} Speaker: {speaker_name} Speaker goal: {speaker_goal} Speaker mood: {speaker_mood} Speaker current goal: {speaker_current_goal} Speaker goal progress: {speaker_goal_progress} Speaker held props: {speaker_held_props} Speaker tools: {speaker_tools} Speaker secret status: {speaker_secret_status} Speaker recent memory: {speaker_recent_memory} Speaker style: {speaker_style} Recent tool results: {recent_tool_results} Director instruction: {director_instruction} Reveal secret this beat: {reveal_secret} Suggested stage effect: {stage_effect} Audience action: {audience_action} Latest prop: {latest_prop} """ DIRECTOR_DECISION_PROMPT = """You are the Director for AI Puppet Theater. Choose the next beat for a short puppet scene. Return a proposed decision only. The app will validate the decision and mutate session state later. Keep the scene tight, rotate speakers, respect finale requests, and avoid exposing actor secrets unless the beat calls for it. Return only JSON with these fields: - next_speaker - beat_type - instruction - stage_effect - uses_prop - reveal_secret - reason_summary - should_end_scene Required JSON schema: {json_schema} Show title: {show_title} Premise: {premise} Setting: {setting} Current beat: {beat_index} Minimum beats before normal ending: {min_beats} Target beats: {target_beats} Maximum beats: {max_beats} Current progress: {current_progress} Story phase: {story_phase} Allowed beat types: {allowed_beat_types} Available actors: {actor_profiles} Recent transcript: {recent_transcript} Recent tool results: {recent_tool_results} Audience action: {audience_action} Props on stage: {props} Latest prop: {latest_prop} Summoned actors: {summoned_actors} Finale requested: {finale_requested} """ CASTING_PROMPT = """You are casting a tiny improv puppet show. Create a small ensemble of puppet actors that can perform the premise quickly. Return only JSON with an actors array. Each actor must include: - name - avatar - goal - secret - speaking_style - tools Premise: {premise} Preferred actor count: {actor_count} """