{
  "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-SC05\", \"title\": \"系统确认选择\", \"summary\": \"系统确认选择“镇静一点”，李凡心情开始下降。\", \"type\": [\"系统/设定\"], \"tone\": [\"中性\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\"], \"key_beats\": [\"系统确认先天气运\", \"李凡心情首次下降\"], \"characters\": [\"李凡\", \"老道\"], \"locations\": [\"深山老林\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0002\", \"source_start_para\": 35, \"source_end_para\": 38, \"text\": \"“……”李凡瞅瞅老道，又瞅瞅怀里的饼，还没等他反应过来，系统又开始搞他心态了。\\n\\n‘确认宿主选择先天气运，镇静一点’\\n\\n哦迈噶德……\\n\\n‘李凡的心情下降了1点’\", \"text_preview\": \"“……”李凡瞅瞅老道，又瞅瞅怀里的饼，还没等他反应过来，系统又开始搞他心态了。 ‘确认宿主选择先天气运，镇静一点’ 哦迈噶德…… ‘李凡的心情下降了1点’\", \"candidate_meta\": {\"candidate_id\": \"C0002-SC05\", \"record_count\": 4, \"char_len\": 80, \"structure_counts\": {\"dialogue\": 3, \"short_line\": 1}, \"boundary_reasons_after\": [\"system_switch\"], \"matched_entities\": [{\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"老道\"], \"score\": 5.2}, {\"entity_id\": \"E000012\", \"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\": \"S0006\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0006\", \"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0005\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0005\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nADAPTATION:\n{\"scene_id\": \"S0006\", \"source_chunk_id\": \"C0002\", \"scene_summary\": \"系统确认选择“镇静一点”，李凡心情开始下降。\", \"chronology\": {\"scene_id\": \"S0006\", \"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0005\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0005\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"adaptation_focus\": \"通过系统提示与李凡的内心反应，揭示“镇静一点”气运的负面效果，建立系统影响角色情绪的规则。\", \"must_keep\": [\"系统确认选择“镇静一点”的提示\", \"李凡心情下降1点的提示\", \"李凡面对老道和饼的困惑反应\"], \"may_compress\": [\"李凡“瞅瞅老道，又瞅瞅怀里的饼”的动作细节可与其他反应合并\"], \"visual_focus\": [\"李凡困惑的面部特写\", \"系统提示的视觉化呈现（如UI、字幕、光效）\", \"老道在背景中的存在\"], \"audio_focus\": [\"系统提示音或旁白\", \"李凡可能的内心OS或叹息\", \"环境音（风声、林声）\"], \"continuity_requirements\": [\"李凡的情绪状态从困惑转向低落\", \"系统UI/提示风格的视觉一致性\", \"老道位置与上一场景的连贯\"], \"script_objective\": \"在对话/互动场景中，无缝插入系统对“镇静一点”气运的确认，并立即展示其首次负面效果（心情下降），让观众理解系统规则并共情李凡的无奈。\", \"conflict\": \"李凡的期望（获得有益能力）与系统现实（带来心情debuff）之间的内在冲突。\", \"turning_point\": \"李凡心情首次因系统选择而下降，标志着他开始切身感受这个修仙世界系统的“坑爹”本质。\", \"reason\": \"此场景是主线关键信息点（系统规则生效、角色状态首次变化），且原文以对话和系统提示驱动，适合保留并用对话模式呈现，以保持叙事节奏和角色互动的即时感。\", \"candidate_meta\": {\"scene_id\": \"S0006\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"dialogue_priority\"], \"metrics\": {\"text_length\": 206, \"quote_count\": 3, \"action_score\": 0, \"exposition_score\": 5, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 0, \"environment_score\": 0, \"character_count\": 2, \"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\"}, {\"entity_uid\": \"E000001\", \"canonical_name\": \"老道\", \"aliases\": [\"老道士\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000001\"}], \"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\"}, {\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"老道士\"], \"attributes\": {}, \"descriptions\": [\"墨竹山法坛前的道士\", \"主持童子筛选\", \"隐藏boss扫地僧模样\"], \"evidence\": [\"法坛前只有个墨帻法褐的老道\", \"老道士看看这些或坐或卧\", \"还有那边那个老道，一副隐藏boss扫地僧的装逼模样\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"主持童子筛选仪式\", \"evidence\": [\"法坛前只有个墨帻法褐的老道\"], \"attributes\": {}}, {\"chunk_id\": \"C0002\", \"summary\": \"老道阴沉脸走来\", \"evidence\": [\"可老道士已经阴沉着脸走过来了\"], \"attributes\": {}}], \"mention_count\": 2, \"observation_count\": 2, \"first_seen\": \"C0001\", \"last_seen\": \"C0002\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0006\", \"scene_notes\": \"系统确认选择“镇静一点”，李凡心情开始下降。；重要性：主线；呈现：文字卡片 / 旁白+画面；改编策略：retain；呈现策略：dialogue；剧本目标：在对话/互动场景中，无缝插入系统对“镇静一点”气运的确认，并立即展示其首次负面效果（心情下降），让观众理解系统规则并共情李凡的无奈。\", \"audio_notes\": \"保留对白节奏；系统提示音或旁白；李凡可能的内心OS或叹息；环境音（风声、林声）\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0006\", \"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0005\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0005\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"adaptation\": {\"scene_id\": \"S0006\", \"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"adaptation_focus\": \"通过系统提示与李凡的内心反应，揭示“镇静一点”气运的负面效果，建立系统影响角色情绪的规则。\", \"must_keep\": [\"系统确认选择“镇静一点”的提示\", \"李凡心情下降1点的提示\", \"李凡面对老道和饼的困惑反应\"], \"may_compress\": [\"李凡“瞅瞅老道，又瞅瞅怀里的饼”的动作细节可与其他反应合并\"], \"visual_focus\": [\"李凡困惑的面部特写\", \"系统提示的视觉化呈现（如UI、字幕、光效）\", \"老道在背景中的存在\"], \"audio_focus\": [\"系统提示音或旁白\", \"李凡可能的内心OS或叹息\", \"环境音（风声、林声）\"], \"continuity_requirements\": [\"李凡的情绪状态从困惑转向低落\", \"系统UI/提示风格的视觉一致性\", \"老道位置与上一场景的连贯\"], \"script_objective\": \"在对话/互动场景中，无缝插入系统对“镇静一点”气运的确认，并立即展示其首次负面效果（心情下降），让观众理解系统规则并共情李凡的无奈。\", \"conflict\": \"李凡的期望（获得有益能力）与系统现实（带来心情debuff）之间的内在冲突。\", \"turning_point\": \"李凡心情首次因系统选择而下降，标志着他开始切身感受这个修仙世界系统的“坑爹”本质。\", \"reason\": \"此场景是主线关键信息点（系统规则生效、角色状态首次变化），且原文以对话和系统提示驱动，适合保留并用对话模式呈现，以保持叙事节奏和角色互动的即时感。\", \"chronology\": {\"scene_id\": \"S0006\", \"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0005\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0005\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}}, \"shots\": [{\"shot_id\": \"S0006_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\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 1, \"chronology_summary\": {\"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0006_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\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 2, \"chronology_summary\": {\"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0006_SH03\", \"camera\": \"正反打\", \"description\": \"对白推进核心信息\", \"actions\": [\"李凡心情首次下降\"], \"dialogue\": [{\"speaker\": \"李凡\", \"speaker_entity_uid\": \"\", \"delivery_hint\": \"带停顿\", \"line\": \"……\"}], \"narration\": \"\", \"on_screen_text\": \"系统确认选择“镇静一点”，李凡心情开始下降。\", \"focus_characters\": [\"李凡\", \"老道\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"dialogue_or_action\", \"description_hint\": \"对白推进核心信息\", \"camera_hint\": \"正反打\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 3, \"chronology_summary\": {\"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"S0006\", \"source_chunk_id\": \"C0002\", \"source_start_para\": 35, \"source_end_para\": 38, \"characters\": [\"李凡\", \"老道\"], \"locations\": [\"深山老林\"], \"key_beats\": [\"系统确认先天气运\", \"李凡心情首次下降\"], \"shot_count_hint\": 3, \"scene_summary\": \"系统确认选择“镇静一点”，李凡心情开始下降。\", \"scene_text_preview\": \"“……”李凡瞅瞅老道，又瞅瞅怀里的饼，还没等他反应过来，系统又开始搞他心态了。 ‘确认宿主选择先天气运，镇静一点’ 哦迈噶德…… ‘李凡的心情下降了1点’\", \"chronology_summary\": {\"narrative_order\": 6, \"story_chronology_order\": 6, \"story_chronology_group\": \"CG0006\", \"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\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}}}"
    }
  ]
}