{
  "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-SC04\", \"title\": \"老道赠饼\", \"summary\": \"李凡对系统吐槽，惊动老道，老道赠予芝麻饼后返回。\", \"type\": [\"动作\", \"对话\"], \"tone\": [\"庄严\", \"诙谐\"], \"importance\": \"主线\", \"presentation\": [\"对白驱动\", \"旁白+画面\"], \"key_beats\": [\"李凡咆哮惊动老道\", \"老道赠饼\", \"李凡紧张反应\"], \"characters\": [\"李凡\", \"老道\"], \"locations\": [\"深山老林\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0002\", \"source_start_para\": 32, \"source_end_para\": 34, \"text\": \"“哦，镇静一点……镇静尼玛个头啊！真特码的是心理健康的系统给的BUFF也加心理健康啊艹！”\\n\\n李凡实在是忍不住了，跳起来嗷呜一声恶龙咆哮。\\n然后他就看到老道扭头瞪着自己，赶忙点头哈腰得盘腿坐好，“不好意思不好意思！别介意别介意！”\\n可老道士已经阴沉着脸走过来了，枯树干一样沉着脸立在李凡面前，投下的巨大阴影几乎遮住他的脸。就好像晚自习冲进教室抓人的班主任。\\n\\n李凡流着冷汗，咕咚一声，咽了口唾沫瞅着对方。\\n老道士也瞪了李凡一会儿，手一抓，从虚空里抓出几个芝麻饼来扔到他怀里，随即又扭头走回蒲团上坐着。\", \"text_preview\": \"“哦，镇静一点……镇静尼玛个头啊！真特码的是心理健康的系统给的BUFF也加心理健康啊艹！” 李凡实在是忍不住了，跳起来嗷呜一声恶龙咆哮。 然后他就看到老道扭头…\", \"candidate_meta\": {\"candidate_id\": \"C0002-SC04\", \"record_count\": 3, \"char_len\": 250, \"structure_counts\": {\"dialogue\": 1, \"body\": 2}, \"boundary_reasons_after\": [\"system_switch\"], \"matched_entities\": [{\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"老道\", \"老道士\"], \"score\": 7.2}, {\"entity_id\": \"E000010\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.1}, {\"entity_id\": \"E000016\", \"name\": \"芝麻饼\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"芝麻饼\"], \"score\": 5.1}, {\"entity_id\": \"E000017\", \"name\": \"蒲团\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"蒲团\"], \"score\": 5.1}, {\"entity_id\": \"E000015\", \"name\": \"镇静一点\", \"type\": \"术法神通\", \"subtype\": \"\", \"matched_terms\": [\"镇静一点\"], \"score\": 5.1}], \"heuristic_types\": [\"系统/设定\", \"对话\", \"动作\"], \"heuristic_tones\": [\"庄严\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0005\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0005\", \"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0004\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0004\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nADAPTATION:\n{\"scene_id\": \"S0005\", \"source_chunk_id\": \"C0002\", \"scene_summary\": \"李凡对系统吐槽，惊动老道，老道赠予芝麻饼后返回。\", \"chronology\": {\"scene_id\": \"S0005\", \"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0004\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0004\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"角色塑造\", \"关系建立\", \"悬念设置\"], \"adaptation_focus\": \"通过李凡的失态与老道的意外反应，建立两人之间神秘且略带压迫感的关系，并引入“芝麻饼”这一关键道具。\", \"must_keep\": [\"李凡因系统而情绪失控咆哮\", \"老道被惊动并阴沉走近\", \"老道从虚空抓取芝麻饼赠与李凡\", \"李凡的紧张与敬畏反应\"], \"may_compress\": [\"李凡咆哮的具体用词可调整\", \"老道走回蒲团的过程\"], \"visual_focus\": [\"李凡从坐姿跳起的夸张动作\", \"老道投下的巨大阴影笼罩李凡\", \"老道从虚空抓取芝麻饼的特写\", \"李凡吞咽口水的面部特写\"], \"audio_focus\": [\"李凡咆哮的音效\", \"环境音（深山风声）的突然静默\", \"李凡咽口水的声音\", \"老道脚步的沉重感\"], \"continuity_requirements\": [\"李凡的穿越者身份与系统设定\", \"老道的神秘与威严感\", \"深山老林的环境氛围\"], \"script_objective\": \"在紧张与诙谐交织的氛围中，完成李凡与关键NPC老道的首次直接互动，展现老道的深不可测，并为后续剧情埋下“芝麻饼”的伏笔。\", \"conflict\": \"李凡的现代人失控行为（内在冲突外化）与老道所代表的严肃、神秘修仙世界规则的冲突。\", \"turning_point\": \"老道没有惩罚或斥责，而是赠与芝麻饼，行为出乎意料，打破了李凡的恐惧预期，将场景从紧张推向神秘。\", \"reason\": \"此场景是主角与关键引导者（老道）的首次实质性互动，对角色关系和世界观揭示至关重要。对话和动作密集，适合对白驱动呈现，以捕捉角色的即时反应和微妙张力。\", \"candidate_meta\": {\"scene_id\": \"S0005\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"dialogue_priority\"], \"metrics\": {\"text_length\": 382, \"quote_count\": 3, \"action_score\": 1, \"exposition_score\": 3, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 3, \"environment_score\": 0, \"character_count\": 2, \"location_count\": 1, \"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\": \"E000010\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"打工人\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000010\"}, {\"entity_uid\": \"E000001\", \"canonical_name\": \"老道\", \"aliases\": [\"老道士\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000001\"}], \"kg_entities\": [{\"entity_id\": \"E000010\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"穿越者\", \"打工人\"], \"attributes\": {}, \"descriptions\": [\"穿越者\", \"打工人\"], \"evidence\": [\"李凡，普普通通的打工人\"], \"mentions\": [{\"chunk_id\": \"C0002\", \"summary\": \"穿越者李凡\", \"evidence\": [\"李凡，普普通通的打工人\"], \"attributes\": {}}], \"mention_count\": 1, \"observation_count\": 1, \"first_seen\": \"C0002\", \"last_seen\": \"C0002\"}, {\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"老道士\"], \"attributes\": {}, \"descriptions\": [\"墨竹山法坛前的道士\", \"主持童子筛选\", \"隐藏boss扫地僧模样\"], \"evidence\": [\"法坛前只有个墨帻法褐的老道\", \"老道士看看这些或坐或卧\", \"还有那边那个老道，一副隐藏boss扫地僧的装逼模样\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"主持童子筛选仪式\", \"evidence\": [\"法坛前只有个墨帻法褐的老道\"], \"attributes\": {}}, {\"chunk_id\": \"C0002\", \"summary\": \"老道阴沉脸走来\", \"evidence\": [\"可老道士已经阴沉着脸走过来了\"], \"attributes\": {}}], \"mention_count\": 2, \"observation_count\": 2, \"first_seen\": \"C0001\", \"last_seen\": \"C0002\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0005\", \"scene_notes\": \"李凡对系统吐槽，惊动老道，老道赠予芝麻饼后返回。；重要性：主线；呈现：对白驱动 / 旁白+画面；改编策略：retain；呈现策略：dialogue；剧本目标：在紧张与诙谐交织的氛围中，完成李凡与关键NPC老道的首次直接互动，展现老道的深不可测，并为后续剧情埋下“芝麻饼”的伏笔。\", \"audio_notes\": \"保留对白节奏；动作点补音效；李凡咆哮的音效；环境音（深山风声）的突然静默\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0005\", \"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0004\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0004\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"adaptation\": {\"scene_id\": \"S0005\", \"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"角色塑造\", \"关系建立\", \"悬念设置\"], \"adaptation_focus\": \"通过李凡的失态与老道的意外反应，建立两人之间神秘且略带压迫感的关系，并引入“芝麻饼”这一关键道具。\", \"must_keep\": [\"李凡因系统而情绪失控咆哮\", \"老道被惊动并阴沉走近\", \"老道从虚空抓取芝麻饼赠与李凡\", \"李凡的紧张与敬畏反应\"], \"may_compress\": [\"李凡咆哮的具体用词可调整\", \"老道走回蒲团的过程\"], \"visual_focus\": [\"李凡从坐姿跳起的夸张动作\", \"老道投下的巨大阴影笼罩李凡\", \"老道从虚空抓取芝麻饼的特写\", \"李凡吞咽口水的面部特写\"], \"audio_focus\": [\"李凡咆哮的音效\", \"环境音（深山风声）的突然静默\", \"李凡咽口水的声音\", \"老道脚步的沉重感\"], \"continuity_requirements\": [\"李凡的穿越者身份与系统设定\", \"老道的神秘与威严感\", \"深山老林的环境氛围\"], \"script_objective\": \"在紧张与诙谐交织的氛围中，完成李凡与关键NPC老道的首次直接互动，展现老道的深不可测，并为后续剧情埋下“芝麻饼”的伏笔。\", \"conflict\": \"李凡的现代人失控行为（内在冲突外化）与老道所代表的严肃、神秘修仙世界规则的冲突。\", \"turning_point\": \"老道没有惩罚或斥责，而是赠与芝麻饼，行为出乎意料，打破了李凡的恐惧预期，将场景从紧张推向神秘。\", \"reason\": \"此场景是主角与关键引导者（老道）的首次实质性互动，对角色关系和世界观揭示至关重要。对话和动作密集，适合对白驱动呈现，以捕捉角色的即时反应和微妙张力。\", \"chronology\": {\"scene_id\": \"S0005\", \"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0004\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0004\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}}, \"shots\": [{\"shot_id\": \"S0005_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\": 4, \"audio_focus_count\": 4}, \"shot_index\": 1, \"chronology_summary\": {\"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0005_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\": \"dialogue\", \"story_function\": [\"角色塑造\", \"关系建立\", \"悬念设置\"], \"must_keep_count\": 4, \"audio_focus_count\": 4}, \"shot_index\": 2, \"chronology_summary\": {\"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0005_SH03\", \"camera\": \"正反打\", \"description\": \"对白推进核心信息\", \"actions\": [\"老道赠饼\", \"李凡紧张反应\"], \"dialogue\": [{\"speaker\": \"李凡\", \"speaker_entity_uid\": \"\", \"delivery_hint\": \"情绪更强；带停顿\", \"line\": \"哦，镇静一点……镇静尼玛个头啊！真特码的是心理健康的系统给的BUFF也加心理健康啊艹！\"}, {\"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\": 4, \"audio_focus_count\": 4}, \"shot_index\": 3, \"chronology_summary\": {\"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0005_SH04\", \"camera\": \"特写\", \"description\": \"李凡收束镜头，停在李凡紧张反应\", \"actions\": [\"李凡紧张反应\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"李凡\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"closing\", \"description_hint\": \"李凡收束镜头，停在李凡紧张反应\", \"camera_hint\": \"特写\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"dialogue\", \"story_function\": [\"角色塑造\", \"关系建立\", \"悬念设置\"], \"must_keep_count\": 4, \"audio_focus_count\": 4}, \"shot_index\": 4, \"chronology_summary\": {\"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": \"S0005\", \"source_chunk_id\": \"C0002\", \"source_start_para\": 32, \"source_end_para\": 34, \"characters\": [\"李凡\", \"老道\"], \"locations\": [\"深山老林\"], \"key_beats\": [\"李凡咆哮惊动老道\", \"老道赠饼\", \"李凡紧张反应\"], \"shot_count_hint\": 4, \"scene_summary\": \"李凡对系统吐槽，惊动老道，老道赠予芝麻饼后返回。\", \"scene_text_preview\": \"“哦，镇静一点……镇静尼玛个头啊！真特码的是心理健康的系统给的BUFF也加心理健康啊艹！” 李凡实在是忍不住了，跳起来嗷呜一声恶龙咆哮。 然后他就看到老道扭头…\", \"chronology_summary\": {\"narrative_order\": 5, \"story_chronology_order\": 5, \"story_chronology_group\": \"CG0005\", \"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\": 4, \"audio_focus_count\": 4}}}"
    }
  ]
}