{
  "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. 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, 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, 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-SC02\", \"title\": \"童子入法坛\", \"summary\": \"老道接待修士送来的童子，并告诫他们夜间规矩。\", \"type\": [\"对话\", \"环境描写\", \"角色引入\"], \"tone\": [\"庄严\", \"紧张\", \"诡异\"], \"importance\": \"主线\", \"presentation\": [\"对白驱动\", \"氛围镜头\", \"群像\"], \"key_beats\": [\"修士送来童子\", \"老道画圈告诫\", \"李凡内心惊疑\"], \"characters\": [\"老道\", \"修士\", \"童子\", \"李凡\"], \"locations\": [\"瑶光洞\", \"墨竹山法坛\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0001\", \"source_start_para\": 5, \"source_end_para\": 18, \"text\": \"法坛四面，则各有七纵七横，摆出四十九个蒲团，散若天星。\\n此时法坛前只有个墨帻法褐的老道，怀抱着一把三尺七寸的朱木剑，嘴里叼着片青竹叶，把脑袋耷拉着，一点一顿得打盹。\\n正睡得安稳，从墨林深处，却传来叮叮当当得，三声金鸣，两击铃响。\\n\\n老道嗅嗅鼻子抬起头，弹弹手指好似拨动了风中的弦。\\n于是竹林间沙沙作响，不一会儿，就有人影幢幢，一群访客从竹林间走出来。\\n领头的是三个皂衣青冠，锦帛覆面的修道士，当先居中的修士，背上缚着把三尺三寸的铜钱剑，用红绳斜串在肩头。左右又有两人，手执金钟银铃跟随。\\n\\n他们身后，则跟着大大小小的童子二十一人，最大的不过十三四岁，小的也就四五岁，有些锦衣佩玉，有些麻衣短裘，一个个只懵懵懂懂得跟着铃音走过来。\\n\\n“上师。”三个蒙面修士一齐稽首。\\n\\n老道撅撅嘴，用叼着的竹叶指指那些童子。\\n于是手捧铜剑的修士说道，“前阵子瑶光洞的玉蟾婆来观里作客，和山主弈棋输了，耍起疯来，吃了不少童子。于是弟子等奉命，往人间去，又挑了一批元阳未泻的金童，烦请上师瞅瞅。”\\n手捧金钟的也笑着添了一句，“灵根不够的扔到外门作工，天生道心的收作内门侍奉，暗藏魔胎的，呵呵，送去给山主下酒。”\\n\\n老道鼻子里哼了一声，撇撇嘴似是应了。\\n\\n于是三个修士又作一辑，引着童子们入座，给他们一人分一个蒲团，安置好了，就躬身出林等候。\\n老道士看看这些或坐或卧，守在蒲团上的小子，吐掉嘴里的柳叶站起身，把朱木剑拿在手里，挨个走过这些童子身前，给他们蒲团外画了二十一个圈，随后又一屁股坐回自己的位置，只不过方向却与之前反了过来，不是面向竹林，而是面向那座魔尊，抱着剑发呆。\\n于是林中陷入了安静，这二十一个童子，也不哭不闹的，就木头人似的在蒲团上坐着。\\n\\n坐了大约有两个时辰，童子中有一个实在是装不下去了，偷偷摸摸的偏过头，看看老道士的背影。然后偷偷扭头看看身后的墨竹林，露出满脸的纠结。\\n\\n然后老道也不回头，自言自语似得开口。\\n\\n“今晚在这坐一宿，睡一觉什么事也没有，若是睡不着，晚上不管听到什么，看到什么，只要不走出圈子，可保性命无虞。”\\n\\n那童子被吓了一跳，赶紧装模作样得缩回脖子装傻，心里已然知道其实自己这点伎俩，全被人家看在眼里，只好暗暗叫苦。\\n\\n甚么情况啊这是？\\n\\n到底甚——嘛情况啊这是！？\\n\\n核聚变民用化都快实现了，轨道电梯都安排上了，老子还想上月面都市旅游呢，你居然给老子安排穿越？苍天啊！这根本就不科学啊！\\n没错，这二十一人中，有一个平平无奇的小童，是一名穿越者。\\n李凡，普普通通的打工人，标标准准，普普通通，平平凡凡，甚至于到了连穿越设定，都是，‘啊！一觉醒来我居然穿越啦！’这种……\", \"text_preview\": \"法坛四面，则各有七纵七横，摆出四十九个蒲团，散若天星。 此时法坛前只有个墨帻法褐的老道，怀抱着一把三尺七寸的朱木剑，嘴里叼着片青竹叶，把脑袋耷拉着，一点一顿得…\", \"candidate_meta\": {\"candidate_id\": \"C0001-SC02\", \"record_count\": 14, \"char_len\": 1092, \"structure_counts\": {\"body\": 8, \"dialogue\": 2, \"short_line\": 4}, \"boundary_reasons_after\": [\"hard_length_break\"], \"matched_entities\": [{\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\", \"穿越者\", \"小童\"], \"score\": 9.2}, {\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"老道\", \"老道士\"], \"score\": 7.2}, {\"entity_id\": \"E000010\", \"name\": \"山主\", \"type\": \"职位称号\", \"subtype\": \"\", \"matched_terms\": [\"山主\"], \"score\": 5.1}, {\"entity_id\": \"E000020\", \"name\": \"木剑\", \"type\": \"物品\", \"subtype\": \"兵器\", \"matched_terms\": [\"木剑\"], \"score\": 5.1}, {\"entity_id\": \"E000005\", \"name\": \"朱木剑\", \"type\": \"物品\", \"subtype\": \"兵器\", \"matched_terms\": [\"朱木剑\"], \"score\": 5.1}, {\"entity_id\": \"E000008\", \"name\": \"玉蟾婆\", \"type\": \"生物种族\", \"subtype\": \"\", \"matched_terms\": [\"玉蟾婆\"], \"score\": 5.1}, {\"entity_id\": \"E000007\", \"name\": \"瑶光洞\", \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"matched_terms\": [\"瑶光洞\"], \"score\": 5.1}, {\"entity_id\": \"E000019\", \"name\": \"蒲团\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"蒲团\"], \"score\": 5.1}, {\"entity_id\": \"E000006\", \"name\": \"铜钱剑\", \"type\": \"物品\", \"subtype\": \"兵器\", \"matched_terms\": [\"铜钱剑\"], \"score\": 5.1}, {\"entity_id\": \"E000017\", \"name\": \"魔尊\", \"type\": \"生物种族\", \"subtype\": \"\", \"matched_terms\": [\"魔尊\"], \"score\": 5.1}], \"heuristic_types\": [\"对话\", \"内心独白\", \"环境描写\"], \"heuristic_tones\": [\"庄严\", \"紧张\"], \"heuristic_presentation\": [\"对白驱动\", \"氛围镜头\", \"旁白+画面\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0002\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0002\", \"narrative_order\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"temporal_anchor\": {\"label\": \"不一会儿\", \"normalized_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"relative_direction\": \"after\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0001\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0001\", \"confidence\": 0.78, \"reason\": \"narrative_forward\"}], \"evidence\": [{\"kind\": \"forward\", \"field\": \"text\", \"text\": \"不一会儿\", \"snippet\": \"似拨动了风中的弦。 于是竹林间沙沙作响，不一会儿，就有人影幢幢，一群访客从竹林间走出来。\"}, {\"kind\": \"forward\", \"field\": \"text\", \"text\": \"随后\", \"snippet\": \"些童子身前，给他们蒲团外画了二十一个圈，随后又一屁股坐回自己的位置，只不过方向却与之\"}, {\"kind\": \"same_time\", \"field\": \"preview\", \"text\": \"此时\", \"snippet\": \"七纵七横，摆出四十九个蒲团，散若天星。 此时法坛前只有个墨帻法褐的老道，怀抱着一把三\"}, {\"kind\": \"same_time\", \"field\": \"text\", \"text\": \"此时\", \"snippet\": \"七纵七横，摆出四十九个蒲团，散若天星。 此时法坛前只有个墨帻法褐的老道，怀抱着一把三\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000001\", \"canonical_name\": \"老道\", \"aliases\": [\"老道士\", \"老头\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000001\"}, {\"entity_uid\": \"E000012\", \"canonical_name\": \"修士\", \"aliases\": [], \"type\": \"人物\", \"subtype\": \"角色姓名\", \"voice_card_id\": \"VO000012\"}, {\"entity_uid\": \"E000013\", \"canonical_name\": \"童子\", \"aliases\": [], \"type\": \"人物\", \"subtype\": \"角色姓名\", \"voice_card_id\": \"VO000013\"}, {\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"小童\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}, {\"entity_uid\": \"E000007\", \"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\": {}}, {\"chunk_id\": \"C0002\", \"summary\": \"主角吐槽系统\", \"evidence\": [\"李凡实在是忍不住了\"], \"attributes\": {}}], \"mention_count\": 2, \"observation_count\": 2, \"first_seen\": \"C0001\", \"last_seen\": \"C0002\"}, {\"entity_id\": \"E000007\", \"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\"}, {\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"老道士\", \"老头\"], \"attributes\": {}, \"descriptions\": [\"墨竹山法坛前的老道士\"], \"evidence\": [\"法坛前只有个墨帻法褐的老道\", \"老道士已经阴沉着脸走过来了\", \"老道士突然爆发出一声怪笑\"], \"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\"}, {\"entity_id\": \"E000013\", \"name\": \"童子\", \"type\": \"人物\", \"subtype\": \"角色姓名\", \"aliases\": [], \"attributes\": {}, \"descriptions\": [], \"evidence\": [], \"mentions\": [], \"mention_count\": 0, \"observation_count\": 0, \"first_seen\": \"\", \"last_seen\": \"\"}, {\"entity_id\": \"E000012\", \"name\": \"修士\", \"type\": \"人物\", \"subtype\": \"角色姓名\", \"aliases\": [], \"attributes\": {}, \"descriptions\": [], \"evidence\": [], \"mentions\": [], \"mention_count\": 0, \"observation_count\": 0, \"first_seen\": \"\", \"last_seen\": \"\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0002\", \"scene_notes\": \"老道接待修士送来的童子，并告诫他们夜间规矩。；重要性：主线；呈现：对白驱动 / 氛围镜头 / 群像；时间顺序：叙事2->故事3；时间锚点：不一会儿\", \"audio_notes\": \"保留对白节奏；环境音先行\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0002\", \"narrative_order\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"temporal_anchor\": {\"label\": \"不一会儿\", \"normalized_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"relative_direction\": \"after\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0001\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0001\", \"confidence\": 0.78, \"reason\": \"narrative_forward\"}], \"evidence\": [{\"kind\": \"forward\", \"field\": \"text\", \"text\": \"不一会儿\", \"snippet\": \"似拨动了风中的弦。 于是竹林间沙沙作响，不一会儿，就有人影幢幢，一群访客从竹林间走出来。\"}, {\"kind\": \"forward\", \"field\": \"text\", \"text\": \"随后\", \"snippet\": \"些童子身前，给他们蒲团外画了二十一个圈，随后又一屁股坐回自己的位置，只不过方向却与之\"}, {\"kind\": \"same_time\", \"field\": \"preview\", \"text\": \"此时\", \"snippet\": \"七纵七横，摆出四十九个蒲团，散若天星。 此时法坛前只有个墨帻法褐的老道，怀抱着一把三\"}, {\"kind\": \"same_time\", \"field\": \"text\", \"text\": \"此时\", \"snippet\": \"七纵七横，摆出四十九个蒲团，散若天星。 此时法坛前只有个墨帻法褐的老道，怀抱着一把三\"}]}, \"shots\": [{\"shot_id\": \"S0002_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\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"anchor_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\", \"narration_delivery_hint\": \"平稳陈述\"}, {\"shot_id\": \"S0002_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\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"anchor_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\", \"narration_delivery_hint\": \"平稳陈述\"}, {\"shot_id\": \"S0002_SH03\", \"camera\": \"正反打\", \"description\": \"对白推进核心信息\", \"actions\": [\"老道画圈告诫\", \"李凡内心惊疑\"], \"dialogue\": [{\"speaker\": \"老道\", \"speaker_entity_uid\": \"\", \"delivery_hint\": \"平稳陈述\", \"line\": \"上师。\"}, {\"speaker\": \"修士\", \"speaker_entity_uid\": \"\", \"delivery_hint\": \"平稳陈述\", \"line\": \"前阵子瑶光洞的玉蟾婆来观里作客，和山主弈棋输了，耍起疯来，吃了不少童子。于是弟子等奉命，往人间去，又挑了一批元阳未泻的金童，烦请上师瞅瞅。\"}, {\"speaker\": \"\", \"speaker_entity_uid\": \"\", \"delivery_hint\": \"平稳陈述\", \"line\": \"灵根不够的扔到外门作工，天生道心的收作内门侍奉，暗藏魔胎的，呵呵，送去给山主下酒。\"}, {\"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\": \"正反打\", \"shot_index\": 3, \"chronology_summary\": {\"narrative_order\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"anchor_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0002_SH04\", \"camera\": \"特写\", \"description\": \"老道收束镜头，停在李凡内心惊疑\", \"actions\": [\"李凡内心惊疑\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"老道\"], \"focus_locations\": [\"瑶光洞\"], \"candidate_meta\": {\"shot_role\": \"closing\", \"description_hint\": \"老道收束镜头，停在李凡内心惊疑\", \"camera_hint\": \"特写\", \"shot_index\": 4, \"chronology_summary\": {\"narrative_order\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"anchor_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0002\", \"source_chunk_id\": \"C0001\", \"source_start_para\": 5, \"source_end_para\": 18, \"characters\": [\"老道\", \"修士\", \"童子\", \"李凡\"], \"locations\": [\"瑶光洞\", \"墨竹山法坛\"], \"key_beats\": [\"修士送来童子\", \"老道画圈告诫\", \"李凡内心惊疑\"], \"shot_count_hint\": 4, \"scene_summary\": \"老道接待修士送来的童子，并告诫他们夜间规矩。\", \"scene_text_preview\": \"法坛四面，则各有七纵七横，摆出四十九个蒲团，散若天星。 此时法坛前只有个墨帻法褐的老道，怀抱着一把三尺七寸的朱木剑，嘴里叼着片青竹叶，把脑袋耷拉着，一点一顿得…\", \"chronology_summary\": {\"narrative_order\": 2, \"story_chronology_order\": 3, \"story_chronology_group\": \"CG0002\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": 1, \"anchor_label\": \"不一会儿\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}}"
    }
  ]
}