{
  "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-SC02\", \"title\": \"系统确认\", \"summary\": \"李凡看着饼发愣，系统确认选择先天气运“镇静一点”，导致心情下降。\", \"type\": [\"系统/设定\", \"对话\"], \"tone\": [\"庄严\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"key_beats\": [\"系统确认气运\", \"心情下降1点\"], \"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-SC02\", \"record_count\": 4, \"char_len\": 80, \"structure_counts\": {\"dialogue\": 3, \"short_line\": 1}, \"boundary_reasons_after\": [\"system_switch\"], \"matched_entities\": [{\"entity_id\": \"E000013\", \"name\": \"镇静一点\", \"type\": \"术法神通\", \"subtype\": \"\", \"matched_terms\": [\"镇静一点\", \"先天气运\"], \"score\": 7.1}, {\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.8}, {\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"老道\"], \"score\": 5.7}], \"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\": [\"系统提示音（庄严、机械、非人声）\", \"环境音（风声、竹林声）\", \"李凡可能的短促吸气或叹气声\"], \"continuity_requirements\": [\"李凡的服装、状态与上一场景一致\", \"老道的位置与姿态连贯\", \"系统UI风格与后续场景统一\"], \"script_objective\": \"清晰、简洁地展示系统对“先天气运”选择的确认及其带来的负面情绪影响，强化系统作为独立、强制性存在的设定，并为李凡后续的“心情”状态变化埋下伏笔。\", \"conflict\": \"李凡的期望（获得好处）与系统实际效果（心情下降）之间的微小冲突；穿越者认知与世界规则（系统）的初次直接碰撞。\", \"turning_point\": \"系统提示“心情下降了1点”的时刻，标志着李凡首次明确体验到系统带来的负面反馈，打破了其可能对“金手指”的单纯幻想。\", \"reason\": \"该场景是系统规则首次对角色状态产生直接影响的关键展示，属于主线信息，对话（系统提示）驱动，且“心情”是后续可能反复出现的重要状态变量，必须保留并清晰呈现。\", \"candidate_meta\": {\"scene_id\": \"S0006\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"dialogue_priority\"], \"metrics\": {\"text_length\": 210, \"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\": 0, \"beat_count\": 2, \"continuation_of_prev\": false, \"time_mode\": \"mainline\", \"order_delta\": 0}, \"characters\": [\"李凡\", \"老道\"], \"locations\": [], \"key_beats\": [\"系统确认气运\", \"心情下降1点\"]}}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"小相公\", \"小友\", \"天生道子\", \"小子\", \"清月\", \"李清月\", \"道子\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}, {\"entity_uid\": \"E000001\", \"canonical_name\": \"老道\", \"aliases\": [\"老道士\", \"秦剑师\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000001\"}], \"kg_entities\": [{\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"穿越者\", \"小相公\", \"小友\", \"天生道子\", \"小子\", \"清月\", \"李清月\", \"道子\"], \"attributes\": {}, \"descriptions\": [\"被侍婢簇拥喂酒\", \"吃青团喝仙酒\", \"天生道种\", \"能望到虚星\", \"童子\", \"想学法术逃跑\", \"主角\", \"山主派给望舒的童子\"], \"evidence\": [\"李凡口干舌燥，磕磕绊绊得答道\", \"李凡强堆起笑脸\", \"李凡的心情大幅提升了1点\", \"李凡点点头\", \"李凡侧身避过\", \"王爷和李凡都傻逼了\", \"李凡的右手不甘示弱得比了个中指\", \"谢仙子教诲，清月记下了\"], \"mentions\": [{\"chunk_id\": \"C0004\", \"summary\": \"被山主和老道观察\", \"evidence\": [\"李凡缩着脖子扭头望去\"], \"attributes\": {}}, {\"chunk_id\": \"C0005\", \"summary\": \"山主请李凡吃酒\", \"evidence\": [\"山主站起身冲李凡微笑\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"被侍婢簇拥喂酒\", \"evidence\": [\"李凡正被莺莺燕燕簇拥着喂酒\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"吃青团喝仙酒\", \"evidence\": [\"李凡也不客气，取了个青团嚼嚼\"], \"attributes\": {}}, {\"chunk_id\": \"C0007\", \"summary\": \"求拜山主为师\", \"evidence\": [\"小子李凡，诚心求道，想拜山主为师\"], \"attributes\": {}}, {\"chunk_id\": \"C0008\", \"summary\": \"回答望舒真人问题\", \"evidence\": [\"李凡口干舌燥，磕磕绊绊得答道\"], \"attributes\": {}}, {\"chunk_id\": \"C0009\", \"summary\": \"想学御剑飞天逃跑\", \"evidence\": [\"李凡强堆起笑脸，心里决定了，等一学会飞，立马找个机会从这妖魔鬼怪盘踞的魔窟逃跑。\"], \"attributes\": {}}, {\"chunk_id\": \"C0009\", \"summary\": \"抱住望舒真人小腿\", \"evidence\": [\"李凡可不客气，把山主给的眼泪往兜里一揣，伸手就抱住望舒真人小腿。\"], \"attributes\": {}}, {\"chunk_id\": \"C0010\", \"summary\": \"犹豫选择功法\", \"evidence\": [\"看出李凡还有点犹犹豫豫\"], \"attributes\": {}}, {\"chunk_id\": \"C0010\", \"summary\": \"进入经楼拜天鬼\", \"evidence\": [\"李凡侧身避过门前悬空的宝剑\"], \"attributes\": {}}, {\"chunk_id\": \"C0011\", \"summary\": \"被玄天剑意操控\", \"evidence\": [\"李凡张着下巴呆了半天\"], \"attributes\": {}}, {\"chunk_id\": \"C0012\", \"summary\": \"被望舒真人教导\", \"evidence\": [\"望舒真人蹙蹙秀眉，“清月，不可欺压同门\"], \"attributes\": {}}], \"mention_count\": 16, \"observation_count\": 16, \"first_seen\": \"C0001\", \"last_seen\": \"C0012\"}, {\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"老道士\", \"秦剑师\"], \"attributes\": {}, \"descriptions\": [\"墨竹山法坛前打盹的老道\", \"墨竹山法坛前的老道\", \"墨竹山法坛前老道\", \"称李凡为道种\", \"坐忘功夫不到家\", \"听了李凡描述后魔形显化\"], \"evidence\": [\"老道士已经阴沉着脸走过来了\", \"突然眼前有大风拂面而过\", \"老道把脸直凑到李凡的面前\", \"老道士告状似得\", \"老道一边说着追随着山主\", \"老道封闭六识\", \"山主称秦剑师坐忘不到家\", \"刚才有个老道士，秦剑师？他听了就长出一堆手\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"法坛前打盹老道\", \"evidence\": [\"老道撅撅嘴，用叼着的竹叶指指那些童子\"], \"attributes\": {}}, {\"chunk_id\": \"C0002\", \"summary\": \"给李凡芝麻饼\", \"evidence\": [\"老道士也瞪了李凡一会儿\"], \"attributes\": {}}, {\"chunk_id\": \"C0003\", \"summary\": \"挖眼质问李凡\", \"evidence\": [\"老道把脸直凑到李凡的面前\"], \"attributes\": {}}, {\"chunk_id\": \"C0003\", \"summary\": \"掐诀拜山主\", \"evidence\": [\"双手掐诀作辑，弯腰叩首拜倒\"], \"attributes\": {}}, {\"chunk_id\": \"C0004\", \"summary\": \"向山主报告李凡情况\", \"evidence\": [\"老道士告状似得\"], \"attributes\": {}}, {\"chunk_id\": \"C0005\", \"summary\": \"老道封闭六识\", \"evidence\": [\"老道坐在竹叶上封闭六识\"], \"attributes\": {}}, {\"chunk_id\": \"C0008\", \"summary\": \"李凡提及秦剑师反应\", \"evidence\": [\"刚才有个老道士，秦剑师？他听了就长出一堆手\"], \"attributes\": {}}], \"mention_count\": 7, \"observation_count\": 7, \"first_seen\": \"C0001\", \"last_seen\": \"C0008\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0006\", \"scene_notes\": \"李凡看着饼发愣，系统确认选择先天气运“镇静一点”，导致心情下降。；重要性：主线；呈现：文字卡片 / 旁白+画面 / 对白驱动；改编策略：retain；呈现策略：dialogue；剧本目标：清晰、简洁地展示系统对“先天气运”选择的确认及其带来的负面情绪影响，强化系统作为独立、强制性存在的设定，并为李凡后续的“心情”状态变化埋下伏笔。\", \"audio_notes\": \"保留对白节奏；系统提示音（庄严、机械、非人声）；环境音（风声、竹林声）；李凡可能的短促吸气或叹气声\", \"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\": [\"系统提示音（庄严、机械、非人声）\", \"环境音（风声、竹林声）\", \"李凡可能的短促吸气或叹气声\"], \"continuity_requirements\": [\"李凡的服装、状态与上一场景一致\", \"老道的位置与姿态连贯\", \"系统UI风格与后续场景统一\"], \"script_objective\": \"清晰、简洁地展示系统对“先天气运”选择的确认及其带来的负面情绪影响，强化系统作为独立、强制性存在的设定，并为李凡后续的“心情”状态变化埋下伏笔。\", \"conflict\": \"李凡的期望（获得好处）与系统实际效果（心情下降）之间的微小冲突；穿越者认知与世界规则（系统）的初次直接碰撞。\", \"turning_point\": \"系统提示“心情下降了1点”的时刻，标志着李凡首次明确体验到系统带来的负面反馈，打破了其可能对“金手指”的单纯幻想。\", \"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\": 4, \"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\": \"李凡的反应镜头，推进心情下降1点\", \"actions\": [\"心情下降1点\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"李凡\", \"老道\"], \"focus_locations\": [], \"candidate_meta\": {\"shot_role\": \"character\", \"description_hint\": \"李凡的反应镜头，推进心情下降1点\", \"camera_hint\": \"双人中景\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"信息揭示\", \"角色反应\", \"系统规则建立\"], \"must_keep_count\": 4, \"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\": [\"心情下降1点\"], \"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\": 4, \"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\": [\"系统确认气运\", \"心情下降1点\"], \"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\": 4, \"audio_focus_count\": 3}}}"
    }
  ]
}