{
  "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-SC07\", \"title\": \"抽奖诱惑\", \"summary\": \"系统提示可抽奖，李凡兴奋，但抽奖功能暂不可用。\", \"type\": [\"系统/设定\", \"对话\"], \"tone\": [\"中性\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"key_beats\": [\"系统提示抽奖\", \"心情上升\", \"功能暂不可用\"], \"characters\": [\"李凡\"], \"locations\": [], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0002\", \"source_start_para\": 53, \"source_end_para\": 57, \"text\": \"‘本系统还可进行抽奖。’\\n\\n可以抽奖！\\n\\n‘李凡的心情上升了1点。’\\n\\n抽抽抽！\\n\\n‘抽奖功能暂不可用，当前充能进度，8/100’\", \"text_preview\": \"‘本系统还可进行抽奖。’ 可以抽奖！ ‘李凡的心情上升了1点。’ 抽抽抽！ ‘抽奖功能暂不可用，当前充能进度，8/100’\", \"candidate_meta\": {\"candidate_id\": \"C0002-SC07\", \"record_count\": 5, \"char_len\": 65, \"structure_counts\": {\"dialogue\": 3, \"short_line\": 2}, \"boundary_reasons_after\": [\"system_switch\"], \"matched_entities\": [{\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.8}, {\"entity_id\": \"E000015\", \"name\": \"抽奖功能\", \"type\": \"系统面板\", \"subtype\": \"\", \"matched_terms\": [\"抽奖功能\"], \"score\": 5.1}], \"heuristic_types\": [\"系统/设定\", \"对话\"], \"heuristic_tones\": [\"中性\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0011\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0011\", \"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0010\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0010\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nADAPTATION:\n{\"scene_id\": \"S0011\", \"source_chunk_id\": \"C0002\", \"scene_summary\": \"系统提示可抽奖，李凡兴奋，但抽奖功能暂不可用。\", \"chronology\": {\"scene_id\": \"S0011\", \"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0010\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0010\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"悬念设置\", \"角色反应\"], \"adaptation_focus\": \"通过系统提示与李凡反应的对比，建立抽奖功能的悬念，并揭示系统充能进度的设定。\", \"must_keep\": [\"系统提示可抽奖\", \"李凡的兴奋反应\", \"抽奖功能暂不可用\", \"充能进度8/100\"], \"may_compress\": [\"系统提示的详细措辞\", \"心情上升的数值化表达\"], \"visual_focus\": [\"李凡的表情变化（从期待到失望）\", \"系统界面或提示的视觉呈现\", \"充能进度条的暗示\"], \"audio_focus\": [\"系统提示音\", \"李凡可能的呼吸或语气变化\", \"环境音的衬托\"], \"continuity_requirements\": [\"李凡的情绪状态延续\", \"系统功能的首次提及\"], \"script_objective\": \"在快速交代系统新功能（抽奖）的同时，通过“暂不可用”制造一个小悬念，并自然引出“充能进度”这一后续关键设定，保持叙事节奏。\", \"conflict\": \"李凡对抽奖的渴望与系统功能未解锁的现实之间的微小冲突。\", \"turning_point\": \"“抽奖功能暂不可用”的提示出现，将期待转为悬念。\", \"reason\": \"该场景虽短，但兼具信息揭示（新功能、充能机制）、角色反应（李凡的期待）和悬念设置（功能未解锁）三重功能，是系统设定展示和观众期待管理的关键节点，适合以简洁的说明性画面（exposition）快速带过，服务于整体叙事节奏。\", \"candidate_meta\": {\"scene_id\": \"S0011\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"exposition_priority\"], \"metrics\": {\"text_length\": 175, \"quote_count\": 0, \"action_score\": 0, \"exposition_score\": 6, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 0, \"environment_score\": 0, \"character_count\": 1, \"location_count\": 0, \"beat_count\": 3, \"continuation_of_prev\": false, \"time_mode\": \"mainline\", \"order_delta\": 0}, \"characters\": [\"李凡\"], \"locations\": [], \"key_beats\": [\"系统提示抽奖\", \"心情上升\", \"功能暂不可用\"]}}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"小相公\", \"小友\", \"天生道子\", \"小子\", \"清月\", \"李清月\", \"道子\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}], \"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\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0011\", \"scene_notes\": \"系统提示可抽奖，李凡兴奋，但抽奖功能暂不可用。；重要性：主线；呈现：文字卡片 / 旁白+画面 / 对白驱动；改编策略：retain；呈现策略：exposition；剧本目标：在快速交代系统新功能（抽奖）的同时，通过“暂不可用”制造一个小悬念，并自然引出“充能进度”这一后续关键设定，保持叙事节奏。\", \"audio_notes\": \"系统提示音；李凡可能的呼吸或语气变化；环境音的衬托\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0011\", \"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0010\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0010\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"adaptation\": {\"scene_id\": \"S0011\", \"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"悬念设置\", \"角色反应\"], \"adaptation_focus\": \"通过系统提示与李凡反应的对比，建立抽奖功能的悬念，并揭示系统充能进度的设定。\", \"must_keep\": [\"系统提示可抽奖\", \"李凡的兴奋反应\", \"抽奖功能暂不可用\", \"充能进度8/100\"], \"may_compress\": [\"系统提示的详细措辞\", \"心情上升的数值化表达\"], \"visual_focus\": [\"李凡的表情变化（从期待到失望）\", \"系统界面或提示的视觉呈现\", \"充能进度条的暗示\"], \"audio_focus\": [\"系统提示音\", \"李凡可能的呼吸或语气变化\", \"环境音的衬托\"], \"continuity_requirements\": [\"李凡的情绪状态延续\", \"系统功能的首次提及\"], \"script_objective\": \"在快速交代系统新功能（抽奖）的同时，通过“暂不可用”制造一个小悬念，并自然引出“充能进度”这一后续关键设定，保持叙事节奏。\", \"conflict\": \"李凡对抽奖的渴望与系统功能未解锁的现实之间的微小冲突。\", \"turning_point\": \"“抽奖功能暂不可用”的提示出现，将期待转为悬念。\", \"reason\": \"该场景虽短，但兼具信息揭示（新功能、充能机制）、角色反应（李凡的期待）和悬念设置（功能未解锁）三重功能，是系统设定展示和观众期待管理的关键节点，适合以简洁的说明性画面（exposition）快速带过，服务于整体叙事节奏。\", \"chronology\": {\"scene_id\": \"S0011\", \"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0010\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0010\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}}, \"shots\": [{\"shot_id\": \"S0011_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\": 4, \"audio_focus_count\": 3}, \"shot_index\": 1, \"chronology_summary\": {\"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0011_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\": 4, \"audio_focus_count\": 3}, \"shot_index\": 2, \"chronology_summary\": {\"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0011_SH03\", \"camera\": \"近景\", \"description\": \"动作或状态变化的推进镜头\", \"actions\": [\"心情上升\", \"功能暂不可用\"], \"dialogue\": [], \"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\": \"exposition\", \"story_function\": [\"信息揭示\", \"悬念设置\", \"角色反应\"], \"must_keep_count\": 4, \"audio_focus_count\": 3}, \"shot_index\": 3, \"chronology_summary\": {\"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": \"S0011\", \"source_chunk_id\": \"C0002\", \"source_start_para\": 53, \"source_end_para\": 57, \"characters\": [\"李凡\"], \"locations\": [], \"key_beats\": [\"系统提示抽奖\", \"心情上升\", \"功能暂不可用\"], \"shot_count_hint\": 3, \"scene_summary\": \"系统提示可抽奖，李凡兴奋，但抽奖功能暂不可用。\", \"scene_text_preview\": \"‘本系统还可进行抽奖。’ 可以抽奖！ ‘李凡的心情上升了1点。’ 抽抽抽！ ‘抽奖功能暂不可用，当前充能进度，8/100’\", \"chronology_summary\": {\"narrative_order\": 11, \"story_chronology_order\": 11, \"story_chronology_group\": \"CG0011\", \"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\": 4, \"audio_focus_count\": 3}}}"
    }
  ]
}