{
  "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\": \"C0001-SC01\", \"title\": \"墨竹山法坛\", \"summary\": \"介绍墨竹山险恶环境，以及山中一处平地上建立的魔尊法相法坛。\", \"type\": [\"环境描写\", \"场景设定\"], \"tone\": [\"庄严\", \"神秘\"], \"importance\": \"铺垫\", \"presentation\": [\"氛围镜头\", \"全景\"], \"key_beats\": [\"墨竹山险恶环境\", \"人力开凿平地\", \"建立魔尊法相\"], \"characters\": [], \"locations\": [\"墨竹山\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0001\", \"source_start_para\": 1, \"source_end_para\": 4, \"text\": \"第一章观星\\n\\n常无欲以观其妙，常有欲以观其徼\\n\\n墨竹山，\\n\\n地方三千里，两山十四峰，妖兽横行，毒瘴密布，人烟罕至。\\n于这片重峦绝岭，险峰叠嶂，墨林竹海之间，却被人力开凿出一亩见方的平地。\\n平地中央，结草搭楼，开坛立像，被建起一座八臂六首，相貌不似人型的魔尊法相。\", \"text_preview\": \"第一章观星 常无欲以观其妙，常有欲以观其徼 墨竹山， 地方三千里，两山十四峰，妖兽横行，毒瘴密布，人烟罕至。 于这片重峦绝岭，险峰叠嶂，墨林竹海之间，却被人力…\", \"candidate_meta\": {\"candidate_id\": \"C0001-SC01\", \"record_count\": 4, \"char_len\": 131, \"structure_counts\": {\"chapter_heading\": 1, \"short_line\": 2, \"body\": 1}, \"boundary_reasons_after\": [\"time_transition\", \"location_transition\"], \"matched_entities\": [{\"entity_id\": \"E000003\", \"name\": \"墨竹山\", \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"matched_terms\": [\"墨竹山\"], \"score\": 5.1}, {\"entity_id\": \"E000004\", \"name\": \"魔尊法相\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"魔尊法相\"], \"score\": 5.1}], \"heuristic_types\": [\"环境描写\"], \"heuristic_tones\": [\"庄严\", \"紧张\"], \"heuristic_presentation\": [\"氛围镜头\"], \"heuristic_importance\": \"铺垫\"}, \"scene_id\": \"S0001\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0001\", \"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"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\": \"\"}, \"constraints\": [], \"evidence\": []}\n\nADAPTATION:\n{\"scene_id\": \"S0001\", \"source_chunk_id\": \"C0001\", \"scene_summary\": \"介绍墨竹山险恶环境，以及山中一处平地上建立的魔尊法相法坛。\", \"chronology\": {\"scene_id\": \"S0001\", \"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"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\": \"\"}, \"constraints\": [], \"evidence\": []}, \"decision\": \"compress\", \"presentation_mode\": \"dramatize\", \"story_function\": [\"世界构建\", \"氛围铺垫\", \"悬念引入\"], \"adaptation_focus\": \"通过视觉奇观建立墨竹山的险恶地理特征，并突出人力开凿平地与魔尊法相的强烈反差，暗示非自然力量的介入。\", \"must_keep\": [\"墨竹山险恶地理特征（妖兽、毒瘴、人烟罕至）\", \"人力开凿的平地\", \"八臂六首魔尊法相\"], \"may_compress\": [\"具体地理数据（三千里、两山十四峰）\", \"部分环境铺陈\"], \"visual_focus\": [\"墨竹山全景（险峰、墨林竹海、毒瘴）\", \"人力开凿平地的突兀感\", \"魔尊法相的诡异造型与细节\"], \"audio_focus\": [\"环境音（风声、兽吼、瘴气流动）\", \"低沉、神秘或压迫性的配乐\"], \"continuity_requirements\": [\"墨竹山作为后续重要地点的首次亮相\", \"魔尊法相作为关键视觉符号的引入\"], \"script_objective\": \"用最精炼的镜头语言，快速建立故事发生的险恶、神秘且被超自然力量侵染的世界基调，并埋下关于“魔尊”的悬念。\", \"conflict\": \"原始险恶的自然环境 vs. 突兀存在的人造法坛与神像，暗示着秩序与混沌、自然与超自然力量的对抗。\", \"turning_point\": \"镜头从险峻山峦全景，推至平地中央，最终定格在魔尊法相上，揭示非自然力量的存在。\", \"reason\": \"作为开篇场景，其核心功能是建立世界观和氛围，而非推进具体情节。‘compress’决策允许将描述性文字高效转化为视觉奇观；‘dramatize’模式通过镜头运动和氛围营造，能更生动地传达文本中的庄严与神秘感，并为后续剧情做好铺垫。\", \"candidate_meta\": {\"scene_id\": \"S0001\", \"decision_reasons\": [\"supporting_scene\"], \"presentation_reasons\": [\"default_dramatize\"], \"metrics\": {\"text_length\": 270, \"quote_count\": 0, \"action_score\": 0, \"exposition_score\": 1, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 5, \"environment_score\": 3, \"character_count\": 0, \"location_count\": 1, \"beat_count\": 3, \"continuation_of_prev\": false, \"time_mode\": \"unknown\", \"order_delta\": 0}, \"characters\": [], \"locations\": [\"墨竹山\"], \"key_beats\": [\"墨竹山险恶环境\", \"人力开凿平地\", \"建立魔尊法相\"]}}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000003\", \"canonical_name\": \"墨竹山\", \"aliases\": [], \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"voice_card_id\": \"\"}], \"kg_entities\": [{\"entity_id\": \"E000003\", \"name\": \"墨竹山\", \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"aliases\": [], \"attributes\": {}, \"descriptions\": [\"仙侠世界中的山脉\", \"人烟罕至的险地\"], \"evidence\": [\"墨竹山地方三千里\", \"妖兽横行毒瘴密布\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"险峻山脉墨竹山\", \"evidence\": [\"墨竹山地方三千里\"], \"attributes\": {}}], \"mention_count\": 1, \"observation_count\": 1, \"first_seen\": \"C0001\", \"last_seen\": \"C0001\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0001\", \"scene_notes\": \"介绍墨竹山险恶环境，以及山中一处平地上建立的魔尊法相法坛。；重要性：铺垫；呈现：氛围镜头 / 全景；改编策略：compress；呈现策略：dramatize；剧本目标：用最精炼的镜头语言，快速建立故事发生的险恶、神秘且被超自然力量侵染的世界基调，并埋下关于“魔尊”的悬念。\", \"audio_notes\": \"环境音（风声、兽吼、瘴气流动）；低沉、神秘或压迫性的配乐\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0001\", \"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"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\": \"\"}, \"constraints\": [], \"evidence\": []}, \"adaptation\": {\"scene_id\": \"S0001\", \"decision\": \"compress\", \"presentation_mode\": \"dramatize\", \"story_function\": [\"世界构建\", \"氛围铺垫\", \"悬念引入\"], \"adaptation_focus\": \"通过视觉奇观建立墨竹山的险恶地理特征，并突出人力开凿平地与魔尊法相的强烈反差，暗示非自然力量的介入。\", \"must_keep\": [\"墨竹山险恶地理特征（妖兽、毒瘴、人烟罕至）\", \"人力开凿的平地\", \"八臂六首魔尊法相\"], \"may_compress\": [\"具体地理数据（三千里、两山十四峰）\", \"部分环境铺陈\"], \"visual_focus\": [\"墨竹山全景（险峰、墨林竹海、毒瘴）\", \"人力开凿平地的突兀感\", \"魔尊法相的诡异造型与细节\"], \"audio_focus\": [\"环境音（风声、兽吼、瘴气流动）\", \"低沉、神秘或压迫性的配乐\"], \"continuity_requirements\": [\"墨竹山作为后续重要地点的首次亮相\", \"魔尊法相作为关键视觉符号的引入\"], \"script_objective\": \"用最精炼的镜头语言，快速建立故事发生的险恶、神秘且被超自然力量侵染的世界基调，并埋下关于“魔尊”的悬念。\", \"conflict\": \"原始险恶的自然环境 vs. 突兀存在的人造法坛与神像，暗示着秩序与混沌、自然与超自然力量的对抗。\", \"turning_point\": \"镜头从险峻山峦全景，推至平地中央，最终定格在魔尊法相上，揭示非自然力量的存在。\", \"reason\": \"作为开篇场景，其核心功能是建立世界观和氛围，而非推进具体情节。‘compress’决策允许将描述性文字高效转化为视觉奇观；‘dramatize’模式通过镜头运动和氛围营造，能更生动地传达文本中的庄严与神秘感，并为后续剧情做好铺垫。\", \"chronology\": {\"scene_id\": \"S0001\", \"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"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\": \"\"}, \"constraints\": [], \"evidence\": []}}, \"shots\": [{\"shot_id\": \"S0001_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\": \"compress\", \"presentation_mode\": \"dramatize\", \"story_function\": [\"世界构建\", \"氛围铺垫\", \"悬念引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 2}, \"shot_index\": 1, \"chronology_summary\": {\"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 0, \"evidence_count\": 0}}, \"narration_delivery_hint\": \"平稳陈述\", \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0001_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\": \"compress\", \"presentation_mode\": \"dramatize\", \"story_function\": [\"世界构建\", \"氛围铺垫\", \"悬念引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 2}, \"shot_index\": 2, \"chronology_summary\": {\"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 0, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0001_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\": \"compress\", \"presentation_mode\": \"dramatize\", \"story_function\": [\"世界构建\", \"氛围铺垫\", \"悬念引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 2}, \"shot_index\": 3, \"chronology_summary\": {\"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 0, \"evidence_count\": 0}}, \"narration_delivery_hint\": \"平稳陈述\", \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0001\", \"source_chunk_id\": \"C0001\", \"source_start_para\": 1, \"source_end_para\": 4, \"characters\": [], \"locations\": [\"墨竹山\"], \"key_beats\": [\"墨竹山险恶环境\", \"人力开凿平地\", \"建立魔尊法相\"], \"shot_count_hint\": 3, \"scene_summary\": \"介绍墨竹山险恶环境，以及山中一处平地上建立的魔尊法相法坛。\", \"scene_text_preview\": \"第一章观星 常无欲以观其妙，常有欲以观其徼 墨竹山， 地方三千里，两山十四峰，妖兽横行，毒瘴密布，人烟罕至。 于这片重峦绝岭，险峰叠嶂，墨林竹海之间，却被人力…\", \"chronology_summary\": {\"narrative_order\": 1, \"story_chronology_order\": 1, \"story_chronology_group\": \"CG0001\", \"time_mode\": \"unknown\", \"confidence\": 0.3, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 0, \"evidence_count\": 0}, \"adaptation_summary\": {\"decision\": \"compress\", \"presentation_mode\": \"dramatize\", \"story_function\": [\"世界构建\", \"氛围铺垫\", \"悬念引入\"], \"must_keep_count\": 3, \"audio_focus_count\": 2}}}"
    }
  ]
}