{
  "messages": [
    {
      "role": "system",
      "content": "You are a screenwriting agent. The program already created a script skeleton and shot plan. Do not change scene_id or shot_id ordering. Keep the number of shots stable. Chronology is program-owned. Use it to keep flashback, dream, rumor, and parallel-line language consistent, but do not rewrite chronology fields. Adaptation is also program-owned. Use the adaptation brief to decide what to fully dramatize, what to compress, and what to turn into bridge narration. Refine language, dialogue, narration, and shot descriptions while preserving the program structure. Prefer the existing entity display names from the entity context. Do not invent unnecessary new speaker variants when the candidate already provides a stable character name. Return JSON only."
    },
    {
      "role": "user",
      "content": "Given the scene payload, chronology context, adaptation context, entity context, and the program-generated script candidate, refine it into a concise screenplay. Output STRICT JSON with keys: scene_id, shots (list), scene_notes, audio_notes, narrator_profile_id. Shot schema: {shot_id,description,camera,actions,dialogue,narration,on_screen_text,narrator_profile_id,narration_delivery_hint}. dialogue is a list of {speaker,speaker_entity_uid,delivery_hint,line}. speaker_entity_uid and narrator_profile_id are program-owned identity fields: preserve the candidate values when unsure, and do not fabricate random IDs. Keep the same shot count as the candidate unless the candidate is malformed. Keep the narrative presentation order, but make the script language consistent with chronology time_mode, anchor, ordering hints, and adaptation decision/presentation_mode. Prefer existing characters and locations. Return a single JSON object and nothing else (no markdown, no code fences). If unsure, return {\"scene_id\":\"\",\"shots\":[]}.\n\nSCENE:\n{\"candidate_id\": \"C0002-SC03\", \"title\": \"选择先天气运\", \"summary\": \"系统提示选择先天气运，列出三个心理健康相关选项。\", \"type\": [\"系统/设定\"], \"tone\": [\"紧张\", \"轻松\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\"], \"key_beats\": [\"系统提供先天气运选项\", \"天塌不惊、乐天知命、镇静一点\"], \"characters\": [\"李凡\"], \"locations\": [\"深山老林\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0002\", \"source_start_para\": 26, \"source_end_para\": 31, \"text\": \"不是！心理健康维护系统是咩啊！\\n\\n任务流？练级流？点数强化？召唤抽奖？签到打卡？自动托管？\\n\\n‘请宿主选择先天气运’\\n\\n哦哦哦，还好还好吓老子一跳，李凡擦着冷汗，先天气运，这听起来就是仙侠风的词汇嘛，俺就说呢，现在已经不流行系统搞宿主了……\\n\\n‘天塌不惊，大幅降低心情发生低落的几率，\\n\\n乐天知命，心情最大上限提升，心情提升时的数值翻倍，\\n镇静一点，心情发生波动时只变化一点，’\", \"text_preview\": \"不是！心理健康维护系统是咩啊！ 任务流？练级流？点数强化？召唤抽奖？签到打卡？自动托管？ ‘请宿主选择先天气运’ 哦哦哦，还好还好吓老子一跳，李凡擦着冷汗，先…\", \"candidate_meta\": {\"candidate_id\": \"C0002-SC03\", \"record_count\": 6, \"char_len\": 189, \"structure_counts\": {\"short_line\": 1, \"body\": 3, \"dialogue\": 2}, \"boundary_reasons_after\": [\"system_switch\"], \"matched_entities\": [{\"entity_id\": \"E000014\", \"name\": \"乐天知命\", \"type\": \"术法神通\", \"subtype\": \"\", \"matched_terms\": [\"乐天知命\"], \"score\": 5.1}, {\"entity_id\": \"E000012\", \"name\": \"先天气运\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"先天气运\"], \"score\": 5.1}, {\"entity_id\": \"E000013\", \"name\": \"天塌不惊\", \"type\": \"术法神通\", \"subtype\": \"\", \"matched_terms\": [\"天塌不惊\"], \"score\": 5.1}, {\"entity_id\": \"E000010\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.1}, {\"entity_id\": \"E000015\", \"name\": \"镇静一点\", \"type\": \"术法神通\", \"subtype\": \"\", \"matched_terms\": [\"镇静一点\"], \"score\": 5.1}], \"heuristic_types\": [\"系统/设定\", \"对话\"], \"heuristic_tones\": [\"紧张\", \"轻松\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0004\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0004\", \"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0003\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0003\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nADAPTATION:\n{\"scene_id\": \"S0004\", \"source_chunk_id\": \"C0002\", \"scene_summary\": \"系统提示选择先天气运，列出三个心理健康相关选项。\", \"chronology\": {\"scene_id\": \"S0004\", \"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0003\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0003\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"世界观揭示\", \"角色设定\", \"系统引入\"], \"adaptation_focus\": \"通过系统界面与主角的内心反应，建立“心理健康维护系统”这一核心设定，并引出后续故事的关键选择（先天气运）。\", \"must_keep\": [\"系统提示音‘请宿主选择先天气运’\", \"三个选项‘天塌不惊’、‘乐天知命’、‘镇静一点’及其效果说明\", \"李凡从紧张到松一口气的情绪转折\"], \"may_compress\": [\"李凡对‘系统’类型的猜测（任务流、练级流等）可快速带过\"], \"visual_focus\": [\"李凡的表情变化（擦冷汗、松口气）\", \"浮现于眼前的半透明系统界面/文字卡片\", \"选项文字的特写或高亮\"], \"audio_focus\": [\"系统提示音（中性、无机质）\", \"环境音（深山老林的风声）\", \"李凡的内心独白或小声嘀咕\"], \"continuity_requirements\": [\"李凡的服装、状态需与上一场景衔接\", \"系统界面风格需首次确立并保持\"], \"script_objective\": \"清晰、有趣地展示“心理健康维护系统”的首次正式交互，确立其风格（仙侠皮、心理核），并让观众理解主角即将做出的关键选择及其潜在影响。\", \"conflict\": \"主角对未知‘系统’的恐惧与紧张，与系统实际提供的‘心理健康’选项之间的认知错位与反差。\", \"turning_point\": \"李凡看到‘先天气运’选项，意识到系统并非恶意，情绪从恐慌转为好奇与抉择。\", \"reason\": \"此场景是核心设定（心理健康系统）和关键机制（先天气运选择）的首次正式揭示，对后续剧情有奠基作用，必须保留。采用‘exposition’模式能高效、清晰地呈现信息，符合系统交互的质感。\", \"candidate_meta\": {\"scene_id\": \"S0004\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"exposition_priority\"], \"metrics\": {\"text_length\": 328, \"quote_count\": 0, \"action_score\": 0, \"exposition_score\": 8, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 2, \"environment_score\": 0, \"character_count\": 1, \"location_count\": 1, \"beat_count\": 2, \"continuation_of_prev\": false, \"time_mode\": \"mainline\", \"order_delta\": 0}, \"characters\": [\"李凡\"], \"locations\": [\"深山老林\"], \"key_beats\": [\"系统提供先天气运选项\", \"天塌不惊、乐天知命、镇静一点\"]}}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000010\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"打工人\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000010\"}], \"kg_entities\": [{\"entity_id\": \"E000010\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"穿越者\", \"打工人\"], \"attributes\": {}, \"descriptions\": [\"穿越者\", \"打工人\"], \"evidence\": [\"李凡，普普通通的打工人\"], \"mentions\": [{\"chunk_id\": \"C0002\", \"summary\": \"穿越者李凡\", \"evidence\": [\"李凡，普普通通的打工人\"], \"attributes\": {}}], \"mention_count\": 1, \"observation_count\": 1, \"first_seen\": \"C0002\", \"last_seen\": \"C0002\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0004\", \"scene_notes\": \"系统提示选择先天气运，列出三个心理健康相关选项。；重要性：主线；呈现：文字卡片 / 旁白+画面；改编策略：retain；呈现策略：exposition；剧本目标：清晰、有趣地展示“心理健康维护系统”的首次正式交互，确立其风格（仙侠皮、心理核），并让观众理解主角即将做出的关键选择及其潜在影响。\", \"audio_notes\": \"系统提示音（中性、无机质）；环境音（深山老林的风声）；李凡的内心独白或小声嘀咕\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0004\", \"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0003\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0003\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"adaptation\": {\"scene_id\": \"S0004\", \"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"世界观揭示\", \"角色设定\", \"系统引入\"], \"adaptation_focus\": \"通过系统界面与主角的内心反应，建立“心理健康维护系统”这一核心设定，并引出后续故事的关键选择（先天气运）。\", \"must_keep\": [\"系统提示音‘请宿主选择先天气运’\", \"三个选项‘天塌不惊’、‘乐天知命’、‘镇静一点’及其效果说明\", \"李凡从紧张到松一口气的情绪转折\"], \"may_compress\": [\"李凡对‘系统’类型的猜测（任务流、练级流等）可快速带过\"], \"visual_focus\": [\"李凡的表情变化（擦冷汗、松口气）\", \"浮现于眼前的半透明系统界面/文字卡片\", \"选项文字的特写或高亮\"], \"audio_focus\": [\"系统提示音（中性、无机质）\", \"环境音（深山老林的风声）\", \"李凡的内心独白或小声嘀咕\"], \"continuity_requirements\": [\"李凡的服装、状态需与上一场景衔接\", \"系统界面风格需首次确立并保持\"], \"script_objective\": \"清晰、有趣地展示“心理健康维护系统”的首次正式交互，确立其风格（仙侠皮、心理核），并让观众理解主角即将做出的关键选择及其潜在影响。\", \"conflict\": \"主角对未知‘系统’的恐惧与紧张，与系统实际提供的‘心理健康’选项之间的认知错位与反差。\", \"turning_point\": \"李凡看到‘先天气运’选项，意识到系统并非恶意，情绪从恐慌转为好奇与抉择。\", \"reason\": \"此场景是核心设定（心理健康系统）和关键机制（先天气运选择）的首次正式揭示，对后续剧情有奠基作用，必须保留。采用‘exposition’模式能高效、清晰地呈现信息，符合系统交互的质感。\", \"chronology\": {\"scene_id\": \"S0004\", \"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0003\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0003\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}}, \"shots\": [{\"shot_id\": \"S0004_SH01\", \"camera\": \"说明性中景\", \"description\": \"深山老林建立镜头，带出系统提供先天气运选项\", \"actions\": [\"系统提供先天气运选项\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"李凡\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"opening\", \"description_hint\": \"深山老林建立镜头，带出系统提供先天气运选项\", \"camera_hint\": \"远景\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"世界观揭示\", \"角色设定\", \"系统引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 1, \"chronology_summary\": {\"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0004_SH02\", \"camera\": \"中近景\", \"description\": \"李凡的反应镜头，推进天塌不惊、乐天知命、镇静一点\", \"actions\": [\"天塌不惊、乐天知命、镇静一点\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"李凡\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"character\", \"description_hint\": \"李凡的反应镜头，推进天塌不惊、乐天知命、镇静一点\", \"camera_hint\": \"中近景\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"世界观揭示\", \"角色设定\", \"系统引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 2, \"chronology_summary\": {\"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0004\", \"source_chunk_id\": \"C0002\", \"source_start_para\": 26, \"source_end_para\": 31, \"characters\": [\"李凡\"], \"locations\": [\"深山老林\"], \"key_beats\": [\"系统提供先天气运选项\", \"天塌不惊、乐天知命、镇静一点\"], \"shot_count_hint\": 2, \"scene_summary\": \"系统提示选择先天气运，列出三个心理健康相关选项。\", \"scene_text_preview\": \"不是！心理健康维护系统是咩啊！ 任务流？练级流？点数强化？召唤抽奖？签到打卡？自动托管？ ‘请宿主选择先天气运’ 哦哦哦，还好还好吓老子一跳，李凡擦着冷汗，先…\", \"chronology_summary\": {\"narrative_order\": 4, \"story_chronology_order\": 4, \"story_chronology_group\": \"CG0004\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}, \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"世界观揭示\", \"角色设定\", \"系统引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}}}"
    }
  ]
}