{
  "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\": \"E000002\", \"name\": \"墨竹山\", \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"matched_terms\": [\"墨竹山\"], \"score\": 5.1}, {\"entity_id\": \"E000003\", \"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\": \"此为纯环境描写与设定铺垫场景，无人物与直接情节，适合压缩。采用‘dramatize’模式可通过精心设计的镜头（如航拍、推近）和音效，将静态描述转化为富有冲击力和悬念感的视觉奇观，高效完成开篇定调任务。\", \"candidate_meta\": {\"scene_id\": \"S0001\", \"decision_reasons\": [\"supporting_scene\"], \"presentation_reasons\": [\"default_dramatize\"], \"metrics\": {\"text_length\": 263, \"quote_count\": 0, \"action_score\": 0, \"exposition_score\": 0, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 5, \"environment_score\": 1, \"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\": \"E000002\", \"canonical_name\": \"墨竹山\", \"aliases\": [], \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"voice_card_id\": \"\"}], \"kg_entities\": [{\"entity_id\": \"E000002\", \"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\": \"此为纯环境描写与设定铺垫场景，无人物与直接情节，适合压缩。采用‘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\": 3}, \"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\": 3}, \"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\": 3}, \"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\": 3}}}"
    }
  ]
}