{
  "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\": \"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\": [\"李凡与老道的位置关系（面对面或近距离）\", \"李凡手中持有芝麻饼\", \"场景氛围（夜晚、法坛附近）\"], \"script_objective\": \"在人物对话的间隙，插入系统对主角的强制性干预，展现主角（李凡）在外部世界互动与内部系统规则之间的割裂感，为后续系统持续影响剧情埋下伏笔。\", \"conflict\": \"李凡试图理解/应对老道与当前处境 vs. 系统无视其意愿，单方面确认选择并施加负面效果。\", \"turning_point\": \"系统提示“李凡的心情下降了1点”，将主角从与NPC（老道）的现实互动，强行拉回被系统规则支配的荒诞现实。\", \"reason\": \"此场景是系统功能与主角主观体验冲突的典型展现，属于核心设定揭示。采用对话模式（穿插系统语音/字幕）能自然融入前后对话场景，保持叙事流畅，同时通过视听手段强化系统的存在感与压迫感。\", \"candidate_meta\": {\"scene_id\": \"S0006\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"dialogue_priority\"], \"metrics\": {\"text_length\": 206, \"quote_count\": 2, \"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\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"老道士\", \"老头\", \"秦剑师\"], \"attributes\": {}, \"descriptions\": [\"墨竹山法坛前的老道士\", \"负责挑选童子\", \"揪起李凡\", \"手持赤剑\", \"坐忘功夫不到家\", \"封闭六识\"], \"evidence\": [\"法坛前只有个墨帻法褐的老道\", \"老道士看看这些或坐或卧\", \"老道士已经阴沉着脸走过来\", \"老道士突然爆发出一声怪笑\", \"有人伸出手，揪着李凡的衣领\", \"老道把脸直凑到李凡的面前\", \"老道士告状似得\", \"老道坐在竹叶上封闭六识\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"法坛前打盹的老道\", \"evidence\": [\"法坛前只有个墨帻法褐的老道\"], \"attributes\": {}}, {\"chunk_id\": \"C0002\", \"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\": {}}], \"mention_count\": 7, \"observation_count\": 7, \"first_seen\": \"C0001\", \"last_seen\": \"C0005\"}, {\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"穿越者\", \"小童\", \"道种\", \"道子\", \"小友\", \"小相公\", \"天生道子\"], \"attributes\": {}, \"descriptions\": [\"二十一名童子之一\", \"来自现代的穿越者\", \"置身于暴风雨中\", \"独自坐在紫色天幕\", \"拜月入道\", \"天生道子\", \"被侍婢簇拥喂酒\", \"吃青团喝仙酒\"], \"evidence\": [\"李凡实在是忍不住了\", \"李凡流着冷汗\", \"李凡仿佛整个人置身于暴风雨之中\", \"只剩下李凡一个人\", \"李凡缩着脖子扭头望去。\", \"山主冲李凡微笑点头\", \"李凡正被莺莺燕燕簇拥着喂酒\", \"李凡也不客气，取了个青团嚼嚼\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"穿越者童子李凡\", \"evidence\": [\"李凡普普通通的打工人\"], \"attributes\": {}}, {\"chunk_id\": \"C0002\", \"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\": \"C0006\", \"summary\": \"被侍婢簇拥\", \"evidence\": [\"李凡正被莺莺燕燕簇拥着喂酒\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"吃青团喝仙酒\", \"evidence\": [\"李凡也不客气，取了个青团嚼嚼\"], \"attributes\": {}}], \"mention_count\": 9, \"observation_count\": 9, \"first_seen\": \"C0001\", \"last_seen\": \"C0006\"}]}\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\": [\"李凡与老道的位置关系（面对面或近距离）\", \"李凡手中持有芝麻饼\", \"场景氛围（夜晚、法坛附近）\"], \"script_objective\": \"在人物对话的间隙，插入系统对主角的强制性干预，展现主角（李凡）在外部世界互动与内部系统规则之间的割裂感，为后续系统持续影响剧情埋下伏笔。\", \"conflict\": \"李凡试图理解/应对老道与当前处境 vs. 系统无视其意愿，单方面确认选择并施加负面效果。\", \"turning_point\": \"系统提示“李凡的心情下降了1点”，将主角从与NPC（老道）的现实互动，强行拉回被系统规则支配的荒诞现实。\", \"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\": \"李凡的反应镜头，推进李凡心情下降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\": 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\": [\"李凡心情下降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\": 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\": [\"系统确认气运选择\", \"李凡心情下降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\": 3, \"audio_focus_count\": 3}}}"
    }
  ]
}