{
  "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. Refine language, dialogue, narration, and shot descriptions while preserving the program structure. Return JSON only."
    },
    {
      "role": "user",
      "content": "Given the scene payload, chronology 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. Shot schema: {shot_id,description,camera,actions,dialogue,narration,on_screen_text}. dialogue is a list of {speaker,line}. 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, and ordering hints. 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\": \"E000047\", \"name\": \"竹山\", \"type\": \"组织\", \"subtype\": \"\", \"matched_terms\": [\"竹山\", \"墨竹山\"], \"score\": 7.8}, {\"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\nENTITY CONTEXT:\n[{\"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\": \"介绍墨竹山险恶环境与山中法坛魔尊法相。；重要性：铺垫；呈现：氛围镜头 / 全景\", \"audio_notes\": \"以旁白驱动\", \"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\": \"远景\", \"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}}}, {\"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\": \"中近景\", \"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}}}, {\"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\": \"近景\", \"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}}}], \"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}}}"
    }
  ]
}