{
  "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\": \"C0016-SC01\", \"title\": \"深夜惊扰\", \"summary\": \"李凡练习剑气惊动茯苓，随后理解炼气与筑基的区别，玄天剑意准备示范行功。\", \"type\": [\"对话\", \"动作\", \"内心独白\"], \"tone\": [\"紧张\", \"庄严\"], \"importance\": \"主线\", \"presentation\": [\"对白驱动\", \"直接画面\", \"旁白+画面\"], \"key_beats\": [\"剑气惊动茯苓\", \"理解筑基原理\", \"玄天剑意准备示范\"], \"characters\": [\"李凡\", \"茯苓\"], \"locations\": [], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0016\", \"source_start_para\": 444, \"source_end_para\": 453, \"text\": \"“怎么了？”这时茯苓的声音从隔壁传来。\\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\": \"C0016-SC01\", \"record_count\": 10, \"char_len\": 642, \"structure_counts\": {\"dialogue\": 4, \"body\": 3, \"short_line\": 3}, \"boundary_reasons_after\": [\"time_transition\", \"system_switch\"], \"matched_entities\": [{\"entity_id\": \"E000075\", \"name\": \"道息\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"道息\", \"真炁\", \"紫霞真炁\", \"玄冥真炁\"], \"score\": 11.7}, {\"entity_id\": \"E000051\", \"name\": \"内景\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"内景\", \"炁海\"], \"score\": 7.8}, {\"entity_id\": \"E000008\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\", \"宿主\"], \"score\": 7.8}, {\"entity_id\": \"E000066\", \"name\": \"竹山剑\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"竹山剑\", \"竹山剑法\"], \"score\": 7.4}, {\"entity_id\": \"E000063\", \"name\": \"玄天剑意\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"matched_terms\": [\"玄天剑意\"], \"score\": 5.8}, {\"entity_id\": \"E000044\", \"name\": \"竹山\", \"type\": \"组织\", \"subtype\": \"\", \"matched_terms\": [\"竹山\"], \"score\": 5.8}, {\"entity_id\": \"E000070\", \"name\": \"茯苓\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"茯苓\"], \"score\": 5.8}, {\"entity_id\": \"E000061\", \"name\": \"五行遁法\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"五行遁法\"], \"score\": 5.3}, {\"entity_id\": \"E000081\", \"name\": \"筑基\", \"type\": \"境界体系\", \"subtype\": \"筑基\", \"matched_terms\": [\"筑基\"], \"score\": 5.1}, {\"entity_id\": \"E000191\", \"name\": \"炼气\", \"type\": \"境界体系\", \"subtype\": \"练气\", \"matched_terms\": [\"炼气\"], \"score\": 5.0}], \"heuristic_types\": [\"对话\", \"动作\", \"内心独白\"], \"heuristic_tones\": [\"紧张\", \"庄严\"], \"heuristic_presentation\": [\"对白驱动\", \"直接画面\", \"旁白+画面\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0052\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0052\", \"narrative_order\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"temporal_anchor\": {\"label\": \"随后\", \"normalized_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"relative_direction\": \"after\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0051\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0051\", \"confidence\": 0.78, \"reason\": \"narrative_forward\"}], \"evidence\": [{\"kind\": \"forward\", \"field\": \"summary\", \"text\": \"随后\", \"snippet\": \"李凡练习剑气惊动茯苓，随后理解炼气与筑基的区别，玄天剑意准备示范行\"}, {\"kind\": \"same_time\", \"field\": \"preview\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来。 “没事没事从床上\"}, {\"kind\": \"same_time\", \"field\": \"text\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来。 “没事没事从床\"}, {\"kind\": \"time_of_day\", \"field\": \"title\", \"text\": \"深夜\", \"snippet\": \"深夜惊扰\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000008\", \"canonical_name\": \"李凡\", \"aliases\": [\"小友\", \"小相公\", \"天生道子\", \"小子\", \"清月\", \"李清月\", \"道子\", \"童子\", \"傻小子\", \"宿主\", \"道友\", \"清月师弟\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000008\"}, {\"entity_uid\": \"E000070\", \"canonical_name\": \"茯苓\", \"aliases\": [\"茯苓姐姐\", \"美妇\", \"姐姐\", \"女婢\", \"茯苓姐\", \"神仙姐姐\", \"玄女\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000070\"}], \"kg_entities\": [{\"entity_id\": \"E000008\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"小友\", \"小相公\", \"天生道子\", \"小子\", \"清月\", \"李清月\", \"道子\", \"童子\", \"傻小子\", \"宿主\", \"道友\", \"清月师弟\"], \"attributes\": {}, \"descriptions\": [\"探头看酒坛\", \"运起赤脉童子法门\", \"观察武林中人实力\", \"打量太监\", \"观察太监商人\", \"想找鲲撤离\", \"躲在桌子底下\", \"吐槽龙门客栈\"], \"evidence\": [\"然后李凡探头往酒坛子里张望了一眼\", \"无聊得运起赤脉童子的法门\", \"李凡凝聚目力不是看人家少妇身材的\", \"李凡又看了一眼\", \"李凡收回视线\", \"李凡缩到桌子底下张望\", \"躲在桌子底下的李凡翻了个白眼\", \"李凡也是醉了\"], \"mentions\": [{\"chunk_id\": \"C0042\", \"summary\": \"修炼剑法炼神识\", \"evidence\": [\"李凡当即开始\"], \"attributes\": {}}, {\"chunk_id\": \"C0043\", \"summary\": \"用神识看童子打架\", \"evidence\": [\"李凡用神识一扫\"], \"attributes\": {}}, {\"chunk_id\": \"C0044\", \"summary\": \"尝试赤脉童子剑法\", \"evidence\": [\"李凡尝试不运剑气\"], \"attributes\": {}}, {\"chunk_id\": \"C0044\", \"summary\": \"戒备散修盗龙\", \"evidence\": [\"李凡也估计到这些修行者大部分都是半道打劫起家的\"], \"attributes\": {}}, {\"chunk_id\": \"C0045\", \"summary\": \"抓鲲搂剑取食盒\", \"evidence\": [\"抓起鲲，搂着剑，从玉佩里取出茯苓准备的食盒\"], \"attributes\": {}}, {\"chunk_id\": \"C0046\", \"summary\": \"询问不周山\", \"evidence\": [\"李凡遥望远方\"], \"attributes\": {}}, {\"chunk_id\": \"C0046\", \"summary\": \"购买雷觞酒\", \"evidence\": [\"李凡走进客栈\"], \"attributes\": {}}, {\"chunk_id\": \"C0047\", \"summary\": \"看酒坛中玄天剑意\", \"evidence\": [\"然后李凡探头往酒坛子里张望了一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0047\", \"summary\": \"运法门观旅人\", \"evidence\": [\"无聊得运起赤脉童子的法门\"], \"attributes\": {}}, {\"chunk_id\": \"C0048\", \"summary\": \"观察萱娘等人\", \"evidence\": [\"李凡凝聚目力不是看人家少妇身材的\"], \"attributes\": {}}, {\"chunk_id\": \"C0049\", \"summary\": \"观察太监商人\", \"evidence\": [\"李凡又看了一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0050\", \"summary\": \"躲在桌下吐槽\", \"evidence\": [\"躲在桌子底下的李凡翻了个白眼\"], \"attributes\": {}}], \"mention_count\": 66, \"observation_count\": 66, \"first_seen\": \"C0001\", \"last_seen\": \"C0050\"}, {\"entity_id\": \"E000070\", \"name\": \"茯苓\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"茯苓姐姐\", \"美妇\", \"姐姐\", \"女婢\", \"茯苓姐\", \"神仙姐姐\", \"玄女\"], \"attributes\": {}, \"descriptions\": [\"告退离开\", \"招待李凡\", \"提醒宗门事\", \"讲述墨竹山历史\", \"提醒李凡小心\", \"答应寻灵食\", \"带李凡见师兄\", \"被李凡评价颜值\"], \"evidence\": [\"茯苓白了他一眼\", \"茯苓花了十年开辟内景\", \"茯苓倒是一眼就看出他在想什么\", \"茯苓苦笑\", \"茯苓想了想说道\", \"茯苓失笑摇头\", \"茯苓倒是一口答应了下来\", \"茯苓素颜的话78不能更高了\"], \"mentions\": [{\"chunk_id\": \"C0022\", \"summary\": \"在商会处理事务\", \"evidence\": [\"看着她查账点货\"], \"attributes\": {}}, {\"chunk_id\": \"C0023\", \"summary\": \"牵李凡入塔介绍\", \"evidence\": [\"又牵着李凡带到船里细细打理了一番\"], \"attributes\": {}}, {\"chunk_id\": \"C0023\", \"summary\": \"仙像之一创教祖\", \"evidence\": [\"左手是一名素面纤纤的仙子\"], \"attributes\": {}}, {\"chunk_id\": \"C0024\", \"summary\": \"捏李凡脸说话\", \"evidence\": [\"茯苓没好气得捏了李凡脸蛋一把\"], \"attributes\": {}}, {\"chunk_id\": \"C0027\", \"summary\": \"生气并办事\", \"evidence\": [\"茯苓一副气冲冲得模样\"], \"attributes\": {}}, {\"chunk_id\": \"C0028\", \"summary\": \"安排牧龙任务\", \"evidence\": [\"茯苓白了他一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0029\", \"summary\": \"十年开辟内景\", \"evidence\": [\"茯苓花了十年开辟内景\"], \"attributes\": {}}, {\"chunk_id\": \"C0036\", \"summary\": \"招待李凡提醒宗门\", \"evidence\": [\"茯苓倒是一眼就看出他在想什么\"], \"attributes\": {}}, {\"chunk_id\": \"C0037\", \"summary\": \"讲述墨竹山两派\", \"evidence\": [\"茯苓想了想说道\"], \"attributes\": {}}, {\"chunk_id\": \"C0037\", \"summary\": \"提醒李凡小心同门\", \"evidence\": [\"我是要提醒你\"], \"attributes\": {}}, {\"chunk_id\": \"C0038\", \"summary\": \"带李凡见师兄\", \"evidence\": [\"茯苓白了他一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0047\", \"summary\": \"李凡评价其颜值\", \"evidence\": [\"茯苓素颜的话78不能更高了\"], \"attributes\": {}}], \"mention_count\": 28, \"observation_count\": 28, \"first_seen\": \"C0012\", \"last_seen\": \"C0047\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0052\", \"scene_notes\": \"李凡练习剑气惊动茯苓，随后理解炼气与筑基的区别，玄天剑意准备示范行功。；重要性：主线；呈现：对白驱动 / 直接画面 / 旁白+画面；时间顺序：叙事52->故事43；时间锚点：随后\", \"audio_notes\": \"保留对白节奏\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0052\", \"narrative_order\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"temporal_anchor\": {\"label\": \"随后\", \"normalized_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"relative_direction\": \"after\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0051\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0051\", \"confidence\": 0.78, \"reason\": \"narrative_forward\"}], \"evidence\": [{\"kind\": \"forward\", \"field\": \"summary\", \"text\": \"随后\", \"snippet\": \"李凡练习剑气惊动茯苓，随后理解炼气与筑基的区别，玄天剑意准备示范行\"}, {\"kind\": \"same_time\", \"field\": \"preview\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来。 “没事没事从床上\"}, {\"kind\": \"same_time\", \"field\": \"text\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来。 “没事没事从床\"}, {\"kind\": \"time_of_day\", \"field\": \"title\", \"text\": \"深夜\", \"snippet\": \"深夜惊扰\"}]}, \"shots\": [{\"shot_id\": \"S0052_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\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0052_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\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0052_SH03\", \"camera\": \"正反打\", \"description\": \"对白推进核心信息\", \"actions\": [\"理解筑基原理\", \"玄天剑意准备示范\"], \"dialogue\": [{\"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\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0052_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\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0052\", \"source_chunk_id\": \"C0016\", \"source_start_para\": 444, \"source_end_para\": 453, \"characters\": [\"李凡\", \"茯苓\"], \"locations\": [], \"key_beats\": [\"剑气惊动茯苓\", \"理解筑基原理\", \"玄天剑意准备示范\"], \"shot_count_hint\": 4, \"scene_summary\": \"李凡练习剑气惊动茯苓，随后理解炼气与筑基的区别，玄天剑意准备示范行功。\", \"scene_text_preview\": \"“怎么了？”这时茯苓的声音从隔壁传来。 “没事没事从床上摔下来了。” 李凡吓了一跳，随手就把紫霞剑气朝墙外一甩，在竹墙上穿出一道剑痕，化成紫光飞入湖心去了。 …\", \"chronology_summary\": {\"narrative_order\": 52, \"story_chronology_order\": 43, \"story_chronology_group\": \"CG0043\", \"time_mode\": \"mainline\", \"confidence\": 0.99, \"order_delta\": -9, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 4}}}"
    }
  ]
}