{
  "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\": \"E000008\", \"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\": \"E000060\", \"name\": \"外门弟子\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"外门弟子\"], \"score\": 5.7}, {\"entity_id\": \"E000011\", \"name\": \"修士\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"修士\"], \"score\": 5.1}, {\"entity_id\": \"E000111\", \"name\": \"散修\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"散修\"], \"score\": 5.1}, {\"entity_id\": \"E000081\", \"name\": \"筑基\", \"type\": \"境界体系\", \"subtype\": \"筑基\", \"matched_terms\": [\"筑基\"], \"score\": 5.1}, {\"entity_id\": \"E000106\", \"name\": \"外门道塔\", \"type\": \"其他\", \"subtype\": \"\", \"matched_terms\": [\"外门道塔\"], \"score\": 5.0}], \"heuristic_types\": [\"叙事\"], \"heuristic_tones\": [\"庄严\"], \"heuristic_presentation\": [\"叙事画面\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0069\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0069\", \"narrative_order\": 69, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.727, \"order_delta\": -9, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0064\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0064\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\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\"}, {\"entity_uid\": \"E000111\", \"canonical_name\": \"散修\", \"aliases\": [], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000111\"}, {\"entity_uid\": \"E000106\", \"canonical_name\": \"外门道塔\", \"aliases\": [], \"type\": \"其他\", \"subtype\": \"\", \"voice_card_id\": \"\"}], \"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\": \"E000106\", \"name\": \"外门道塔\", \"type\": \"其他\", \"subtype\": \"\", \"aliases\": [], \"attributes\": {}, \"descriptions\": [], \"evidence\": [], \"mentions\": [], \"mention_count\": 0, \"observation_count\": 0, \"first_seen\": \"\", \"last_seen\": \"\"}, {\"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\"}, {\"entity_id\": \"E000111\", \"name\": \"散修\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [], \"attributes\": {}, \"descriptions\": [\"食堂需花钱\", \"不属本门\"], \"evidence\": [\"不属本门的散修除了竹牌还得花钱\"], \"mentions\": [{\"chunk_id\": \"C0024\", \"summary\": \"食堂需花钱\", \"evidence\": [\"不属本门的散修除了竹牌还得花钱\"], \"attributes\": {}}], \"mention_count\": 1, \"observation_count\": 1, \"first_seen\": \"C0024\", \"last_seen\": \"C0024\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0069\", \"scene_notes\": \"茯苓带李凡前往竹山外门道塔，周围修士云集。；重要性：主线；呈现：叙事画面；时间顺序：叙事69->故事60\", \"audio_notes\": \"以旁白驱动\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0069\", \"narrative_order\": 69, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.727, \"order_delta\": -9, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0064\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0064\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"shots\": [{\"shot_id\": \"S0069_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\": 69, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.727, \"order_delta\": -9, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0069_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\": 69, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.727, \"order_delta\": -9, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0069_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\": 69, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.727, \"order_delta\": -9, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0069\", \"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\": 69, \"story_chronology_order\": 60, \"story_chronology_group\": \"CG0058\", \"time_mode\": \"mainline\", \"confidence\": 0.727, \"order_delta\": -9, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}}"
    }
  ]
}