{
  "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\": \"C0022-SC04\", \"title\": \"前往外门\", \"summary\": \"茯苓带李凡前往竹山外门道塔，周围修士云集。\", \"type\": [\"叙事\", \"过渡\"], \"tone\": [\"庄严\", \"平静\"], \"importance\": \"主线\", \"presentation\": [\"叙事画面\"], \"key_beats\": [\"茯苓带李凡前往外门道塔\"], \"characters\": [\"李凡\", \"茯苓\", \"竹山外门弟子\"], \"locations\": [\"外门道塔\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0022\", \"source_start_para\": 644, \"source_end_para\": 644, \"text\": \"人脉关系挺广的呵，那行吧，那这贼赃还是得在手里藏一藏。\\n于是茯苓那边把事情收拾完毕，又牵着李凡带到船里细细打理了一番，这才带着他驭起轻舟，往那边高达三十丈的外门道塔边落下。\\n这边就基本都是修士了，除了皂衣褐袍的竹山外门弟子之外，还有些打扮花里胡哨的散修。绝大部分都是练气期的弟子，筑基的也有不少，但像茯苓这样，站在金丹门槛上的修士，还是屈指可数。不过这随便往外门总坛都能见到几个，数量也不少了。\", \"text_preview\": \"人脉关系挺广的呵，那行吧，那这贼赃还是得在手里藏一藏。 于是茯苓那边把事情收拾完毕，又牵着李凡带到船里细细打理了一番，这才带着他驭起轻舟，往那边高达三十丈的外…\", \"candidate_meta\": {\"candidate_id\": \"C0022-SC04\", \"record_count\": 1, \"char_len\": 197, \"structure_counts\": {\"body\": 1}, \"boundary_reasons_after\": [], \"matched_entities\": [{\"entity_id\": \"E000110\", \"name\": \"外门道塔\", \"type\": \"地点\", \"subtype\": \"\", \"matched_terms\": [\"外门道塔\", \"外门总坛\"], \"score\": 7.3}, {\"entity_id\": \"E000007\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.8}, {\"entity_id\": \"E000043\", \"name\": \"竹山\", \"type\": \"组织\", \"subtype\": \"\", \"matched_terms\": [\"竹山\"], \"score\": 5.8}, {\"entity_id\": \"E000070\", \"name\": \"茯苓\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"茯苓\"], \"score\": 5.8}, {\"entity_id\": \"E000093\", \"name\": \"外门\", \"type\": \"组织\", \"subtype\": \"\", \"matched_terms\": [\"外门\"], \"score\": 5.1}, {\"entity_id\": \"E000084\", \"name\": \"筑基\", \"type\": \"境界体系\", \"subtype\": \"筑基\", \"matched_terms\": [\"筑基\"], \"score\": 5.1}, {\"entity_id\": \"E000059\", \"name\": \"外门弟子\", \"type\": \"人物\", \"subtype\": \"角色姓名\", \"matched_terms\": [\"外门弟子\"], \"score\": 5.0}, {\"entity_id\": \"E000004\", \"name\": \"修道士\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"修士\"], \"score\": 2.2}], \"heuristic_types\": [\"叙事\"], \"heuristic_tones\": [\"庄严\"], \"heuristic_presentation\": [\"叙事画面\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0070\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0070\", \"narrative_order\": 70, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.76, \"order_delta\": -10, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0065\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0065\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000007\", \"canonical_name\": \"李凡\", \"aliases\": [\"小友\", \"小相公\", \"小子\", \"清月\", \"李清月\", \"道子\", \"小色鬼\", \"童子\", \"傻小子\", \"清月师弟\", \"宿主\", \"道爷\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000007\"}, {\"entity_uid\": \"E000070\", \"canonical_name\": \"茯苓\", \"aliases\": [\"姐姐\", \"茯苓姐\", \"神仙姐姐\", \"玄女\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000070\"}, {\"entity_uid\": \"E000110\", \"canonical_name\": \"外门道塔\", \"aliases\": [\"外门总坛\"], \"type\": \"地点\", \"subtype\": \"\", \"voice_card_id\": \"\"}], \"kg_entities\": [{\"entity_id\": \"E000110\", \"name\": \"外门道塔\", \"type\": \"地点\", \"subtype\": \"\", \"aliases\": [\"外门总坛\"], \"attributes\": {}, \"descriptions\": [\"竹山外门据点\", \"修士聚集\", \"高达三十丈\", \"有前殿神像\"], \"evidence\": [\"往那边高达三十丈的外门道塔边落下；这边就基本都是修士了\", \"往那边高达三十丈的外门道塔边落下\"], \"mentions\": [{\"chunk_id\": \"C0022\", \"summary\": \"竹山外门据点\", \"evidence\": [\"往那边高达三十丈的外门道塔边落下\"], \"attributes\": {}}, {\"chunk_id\": \"C0022\", \"summary\": \"茯苓带李凡前往\", \"evidence\": [\"这才带着他驭起轻舟，往那边高达三十丈的外门道塔边落下\"], \"attributes\": {}}, {\"chunk_id\": \"C0023\", \"summary\": \"高达三十丈建筑\", \"evidence\": [\"往那边高达三十丈的外门道塔边落下\"], \"attributes\": {}}], \"mention_count\": 3, \"observation_count\": 3, \"first_seen\": \"C0022\", \"last_seen\": \"C0023\"}, {\"entity_id\": \"E000070\", \"name\": \"茯苓\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"姐姐\", \"茯苓姐\", \"神仙姐姐\", \"玄女\"], \"attributes\": {}, \"descriptions\": [\"曾被望舒现形吓疯\", \"招待李凡\", \"给鲲喂食\", \"向李凡解释墨竹山历史\", \"提醒李凡小心同门\", \"答应寻灵食\", \"带李凡见师兄\", \"被李凡评价颜值\"], \"evidence\": [\"茯苓第一次见我现形的时候，人都吓疯了\", \"茯苓倒是一眼就看出他在想什么；茯苓白了李凡一眼\", \"茯苓想了想说道\", \"茯苓指指望舒小居外边\", \"茯苓失笑摇头\", \"茯苓倒是一口答应了下来\", \"今儿先领你去见个师兄\", \"茯苓素颜的话78不能更高了\"], \"mentions\": [{\"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\": \"C0027\", \"summary\": \"替李凡请道牒\", \"evidence\": [\"替清月请了道牒\"], \"attributes\": {}}, {\"chunk_id\": \"C0028\", \"summary\": \"安排牧龙任务\", \"evidence\": [\"茯苓白了他一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0029\", \"summary\": \"对比李凡资质\", \"evidence\": [\"茯苓花了十年才开辟内景\"], \"attributes\": {}}, {\"chunk_id\": \"C0033\", \"summary\": \"曾被望舒吓疯\", \"evidence\": [\"茯苓第一次见我现形的时候，人都吓疯了\"], \"attributes\": {}}, {\"chunk_id\": \"C0036\", \"summary\": \"招待李凡喂鲲\", \"evidence\": [\"茯苓倒是一眼就看出他在想什么；茯苓白了李凡一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0037\", \"summary\": \"解释墨竹山历史\", \"evidence\": [\"茯苓想了想说道\"], \"attributes\": {}}, {\"chunk_id\": \"C0038\", \"summary\": \"答应寻灵食，带李凡见师兄\", \"evidence\": [\"茯苓倒是一口答应了下来\"], \"attributes\": {}}, {\"chunk_id\": \"C0047\", \"summary\": \"李凡评价其颜值\", \"evidence\": [\"茯苓素颜的话78不能更高了\"], \"attributes\": {}}], \"mention_count\": 26, \"observation_count\": 26, \"first_seen\": \"C0012\", \"last_seen\": \"C0047\"}, {\"entity_id\": \"E000007\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"小友\", \"小相公\", \"小子\", \"清月\", \"李清月\", \"道子\", \"小色鬼\", \"童子\", \"傻小子\", \"清月师弟\", \"宿主\", \"道爷\"], \"attributes\": {}, \"descriptions\": [\"探头看酒坛\", \"运赤脉童子法门\", \"看萱娘身材\", \"打量太监护卫\", \"观察太监商人\", \"想找鲲撤离\", \"躲在桌子底下\", \"吐槽系统\"], \"evidence\": [\"李凡遥望远方，确实地貌景色和竹山那边明显不同了\", \"李凡探头往酒坛子里张望了一眼\", \"无聊得运起赤脉童子的法门\", \"当然主要还是去看那个唤作萱娘的少妇，也不排除有人看五弟的大胸肌就是了咳咳……\", \"李凡又看了一眼，他还真没见过活生生的太监呢，虽然影视作品中，这种职业都是反派丑角出现的，不过实话实说哈，眼前这太监其实底子很好，五官端正，称得上是挺帅的，不是一眼就能看出来的那种阴阳人。\", \"李凡又看了一眼\", \"李凡收回视线\", \"躲在桌子底下的李凡翻了个白眼。\"], \"mentions\": [{\"chunk_id\": \"C0041\", \"summary\": \"看龙兴奋\", \"evidence\": [\"李凡被溅起的水花打了一头一脸\"], \"attributes\": {}}, {\"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\": \"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\": 61, \"observation_count\": 61, \"first_seen\": \"C0001\", \"last_seen\": \"C0050\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0070\", \"scene_notes\": \"茯苓带李凡前往竹山外门道塔，周围修士云集。；重要性：主线；呈现：叙事画面；时间顺序：叙事70->故事60\", \"audio_notes\": \"以旁白驱动\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0070\", \"narrative_order\": 70, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.76, \"order_delta\": -10, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0065\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0065\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"shots\": [{\"shot_id\": \"S0070_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\": 70, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.76, \"order_delta\": -10, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0070_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\": 70, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.76, \"order_delta\": -10, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0070_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\": 70, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.76, \"order_delta\": -10, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0070\", \"source_chunk_id\": \"C0022\", \"source_start_para\": 644, \"source_end_para\": 644, \"characters\": [\"李凡\", \"茯苓\", \"竹山外门弟子\"], \"locations\": [\"外门道塔\"], \"key_beats\": [\"茯苓带李凡前往外门道塔\"], \"shot_count_hint\": 3, \"scene_summary\": \"茯苓带李凡前往竹山外门道塔，周围修士云集。\", \"scene_text_preview\": \"人脉关系挺广的呵，那行吧，那这贼赃还是得在手里藏一藏。 于是茯苓那边把事情收拾完毕，又牵着李凡带到船里细细打理了一番，这才带着他驭起轻舟，往那边高达三十丈的外…\", \"chronology_summary\": {\"narrative_order\": 70, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.76, \"order_delta\": -10, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}}"
    }
  ]
}