{
  "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\": \"C0015-SC02\", \"title\": \"剑气初成\", \"summary\": \"李凡理解玄天剑意的用意，观想剑形，成功凝炼出第一道紫霞剑气。\", \"type\": [\"动作\", \"修炼\", \"内心独白\"], \"tone\": [\"紧张\", \"专注\", \"成就\"], \"importance\": \"主线\", \"presentation\": [\"直接画面\", \"氛围镜头\", \"旁白+画面\"], \"key_beats\": [\"理解玄天剑意选功法的缘由\", \"观想剑形并凝炼剑气\", \"剑气初成并测试威力\"], \"characters\": [\"李凡\", \"玄天剑意\"], \"locations\": [\"净室\", \"经楼\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0015\", \"source_start_para\": 435, \"source_end_para\": 443, \"text\": \"其实看到这一点，李凡就明白玄天剑意执意替他选这部功法的缘由了。\\n剑意剑意，那它之前不管有何种手段，都是剑法上的神通修为。竹山教虽然没有什么高深的末期功法，但玄天剑意有啊！它都一路杀到虚星道祖面前了，还差高级剑法？\\n所以这部练气期，上来就能炼出一堆气剑使用的基础剑气入门，站在玄天剑意的角度看，那确实是上上等的功法了。\\n\\n那么具体要怎么炼呢？\\n\\n其实真的很简单，用脑子想的。\\n\\n说白了，就是在神庭，也就是脑子里，先观想投影出‘观’，以《基础剑气入门》为例，就是直接幻想出一把意念中的宝剑。然后将形成的‘剑观’，以神光照应在内景炁海里，即可将炁海内的真炁，依此‘观’凝结，淬炼出‘剑气’了。\\n如此也可以看出，这最后成型的‘剑气’品质如何，完全取决于一开始的‘观’，要是从源头上就误入歧途，那自然谬以千里，最后啥玩意也淬炼不出。所以才需要求取真经，观看正宗的修炼功法，以‘观’正道。\\n\\n尤其一般五行遁法修炼的真炁，属于自然现象，比较难以用图文描述，因此那些墨竹的功法上，都会用法术刻录幻像一般的‘观想’，方便修行者在入定时置身幻境之中，好方便修炼五行真炁。\\n而《基础剑气入门》就不必那么复杂了，毕竟观想的是实物，确实比较容易想象，而且李凡一看这剑式就认得了，就是经楼门口悬的那把剑嘛！还晃了老子一眼呢！\\n\\n‘玄天剑意建议宿主先参考功法尺寸，把剑制先原样临摹出来……’\\n\\n切，不就是CAD制图嘛，简单得很！\\n\\n李凡参考剑气入门里标注的尺寸和细节，直接在脑子里来个三维投影，治具开模，激光打印，一气呵成！\\n哧，一道锋锐无匹的气剑，自刚才李凡运气走过的右手经脉中泄出，一击劈破净室内盘旋袅绕的香烟，悬空凝成一把八面汉剑。\\n剑身直挺，圆茎尖锋，剑长三尺，茎长五寸，与那把墨剑，确实一模一样的规格。如果非要说还有什么瑕疵或不同，就是这把剑的材质并非金玉，而很明显的，是以李凡之前在外山墨竹林的蒲团上，打坐一百秒时，吐纳入体，开辟出炁海内景的紫霞真炁所化。\\n\\n剑脊浓如墨色，剑锋上紫气缭绕，李凡把剑卧在手里，明显能感觉剑茎依然与右臂的经脉相连，插在掌心里直通炁海，不断消耗着真炁维持成型。\\n他持剑随手乱挥了一下，谁知这气剑全无重量，快如一道紫电，剑锋扫过净室里的床铺台案，把桌椅凳子都齐齐斩成两段，笔墨纸砚噼里啪啦摔了一地。\", \"text_preview\": \"其实看到这一点，李凡就明白玄天剑意执意替他选这部功法的缘由了。 剑意剑意，那它之前不管有何种手段，都是剑法上的神通修为。竹山教虽然没有什么高深的末期功法，但玄…\", \"candidate_meta\": {\"candidate_id\": \"C0015-SC02\", \"record_count\": 9, \"char_len\": 953, \"structure_counts\": {\"body\": 5, \"short_line\": 3, \"dialogue\": 1}, \"boundary_reasons_after\": [\"time_transition\", \"structure_break\", \"long_scene_transition\", \"hard_length_break\"], \"matched_entities\": [{\"entity_id\": \"E000068\", \"name\": \"真炁\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"真炁\", \"紫霞真炁\"], \"score\": 7.8}, {\"entity_id\": \"E000046\", \"name\": \"竹山\", \"type\": \"组织\", \"subtype\": \"\", \"matched_terms\": [\"竹山\", \"竹山教\"], \"score\": 7.8}, {\"entity_id\": \"E000042\", \"name\": \"道祖\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"道祖\", \"虚星道祖\"], \"score\": 7.7}, {\"entity_id\": \"E000055\", \"name\": \"基础剑气入门\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"基础剑气入门\", \"剑气入门\"], \"score\": 7.3}, {\"entity_id\": \"E000045\", \"name\": \"炁海\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"炁海\", \"内景\"], \"score\": 7.2}, {\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.8}, {\"entity_id\": \"E000018\", \"name\": \"蒲团\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"蒲团\"], \"score\": 5.4}, {\"entity_id\": \"E000047\", \"name\": \"经楼\", \"type\": \"地点\", \"subtype\": \"洞府/殿阁\", \"matched_terms\": [\"经楼\"], \"score\": 5.3}, {\"entity_id\": \"E000052\", \"name\": \"紫霞\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"紫霞\"], \"score\": 5.2}, {\"entity_id\": \"E000073\", \"name\": \"五行遁法\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"五行遁法\"], \"score\": 5.1}], \"heuristic_types\": [\"动作\", \"内心独白\", \"环境描写\"], \"heuristic_tones\": [\"庄严\", \"紧张\"], \"heuristic_presentation\": [\"直接画面\", \"氛围镜头\", \"旁白+画面\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0051\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0051\", \"narrative_order\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"temporal_anchor\": {\"label\": \"幻境\", \"normalized_label\": \"dream\", \"anchor_type\": \"dream_marker\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0050\"}, \"constraints\": [{\"relation\": \"same_time\", \"target_scene_id\": \"S0050\", \"confidence\": 0.45, \"reason\": \"dream_attached_to_frame\"}], \"evidence\": [{\"kind\": \"dream\", \"field\": \"text\", \"text\": \"幻境\", \"snippet\": \"像一般的‘观想’，方便修行者在入定时置身幻境之中，好方便修炼五行真炁。 而《基础剑气\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"小相公\", \"小友\", \"小子\", \"清月\", \"李清月\", \"道子\", \"小色鬼\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}, {\"entity_uid\": \"E000021\", \"canonical_name\": \"小剑\", \"aliases\": [\"玄天剑意\", \"剑意\"], \"type\": \"物品\", \"subtype\": \"兵器\", \"voice_card_id\": \"\"}, {\"entity_uid\": \"E000047\", \"canonical_name\": \"经楼\", \"aliases\": [\"书阁\"], \"type\": \"地点\", \"subtype\": \"洞府/殿阁\", \"voice_card_id\": \"\"}], \"kg_entities\": [{\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"小相公\", \"小友\", \"小子\", \"清月\", \"李清月\", \"道子\", \"小色鬼\"], \"attributes\": {}, \"descriptions\": [\"修炼基础剑气入门\", \"观想出气剑\", \"墨竹山娄观道受道弟子\", \"喝五仙汤修炼\", \"修炼剑法\", \"练习乾坤飞龙剑\", \"被望舒真人带回\", \"道子\"], \"evidence\": [\"李凡在心中腹诽着\", \"李凡立刻知道，是玄天剑意在传授自己剑招\", \"李凡就先自己试了一下\", \"清月跟我来吧\", \"李凡一阵傻眼\", \"清月，你拜过月也该知道\", \"查出来你这个道子\", \"李凡艰难得咽了口唾沫\"], \"mentions\": [{\"chunk_id\": \"C0019\", \"summary\": \"询问竹山货币\", \"evidence\": [\"李凡在一旁听得傻眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0020\", \"summary\": \"被茯苓束发戴冠\", \"evidence\": [\"茯苓招招手，把李凡半搂到怀里帮他束发戴冠\"], \"attributes\": {}}, {\"chunk_id\": \"C0021\", \"summary\": \"注意到不知面效果\", \"evidence\": [\"李凡还注意到一点\"], \"attributes\": {}}, {\"chunk_id\": \"C0021\", \"summary\": \"猜测玄天剑意意图\", \"evidence\": [\"李凡眼珠子转了转\"], \"attributes\": {}}, {\"chunk_id\": \"C0022\", \"summary\": \"从幻境醒来全身墨臭\", \"evidence\": [\"李凡从幻境中醒来\"], \"attributes\": {}}, {\"chunk_id\": \"C0023\", \"summary\": \"仰望道塔牌匾\", \"evidence\": [\"李凡仰望高塔上《墨竹山娄观道》的牌匾\"], \"attributes\": {}}, {\"chunk_id\": \"C0024\", \"summary\": \"喝五仙汤修炼\", \"evidence\": [\"李凡也看到了\"], \"attributes\": {}}, {\"chunk_id\": \"C0026\", \"summary\": \"施展剑法杀猴\", \"evidence\": [\"李凡居然感觉到明显的气机牵引\"], \"attributes\": {}}, {\"chunk_id\": \"C0027\", \"summary\": \"练习乾坤飞龙剑\", \"evidence\": [\"李凡就先自己试了一下\"], \"attributes\": {}}, {\"chunk_id\": \"C0028\", \"summary\": \"对牧龙任务傻眼\", \"evidence\": [\"李凡一阵傻眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0029\", \"summary\": \"被望舒教导先天大道\", \"evidence\": [\"李凡也不由得默认\"], \"attributes\": {}}, {\"chunk_id\": \"C0030\", \"summary\": \"看到白光掠出\", \"evidence\": [\"李凡艰难得咽了口唾沫\"], \"attributes\": {}}], \"mention_count\": 33, \"observation_count\": 33, \"first_seen\": \"C0001\", \"last_seen\": \"C0030\"}, {\"entity_id\": \"E000047\", \"name\": \"经楼\", \"type\": \"地点\", \"subtype\": \"洞府/殿阁\", \"aliases\": [\"书阁\"], \"attributes\": {}, \"descriptions\": [\"存放道法的书阁\"], \"evidence\": [\"来到内院一间书阁前\", \"进去经楼里\", \"推开门进入经楼里\", \"走出了经楼\"], \"mentions\": [{\"chunk_id\": \"C0009\", \"summary\": \"李凡挑选道法之处\", \"evidence\": [\"你就进去经楼里，随便挑选两部看中的道法好了。\"], \"attributes\": {}}, {\"chunk_id\": \"C0010\", \"summary\": \"李凡进入经楼\", \"evidence\": [\"推开门进入经楼里\"], \"attributes\": {}}, {\"chunk_id\": \"C0011\", \"summary\": \"存放道法的书阁\", \"evidence\": [\"走出了经楼\"], \"attributes\": {}}], \"mention_count\": 3, \"observation_count\": 3, \"first_seen\": \"C0009\", \"last_seen\": \"C0011\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0051\", \"scene_notes\": \"李凡理解玄天剑意的用意，观想剑形，成功凝炼出第一道紫霞剑气。；重要性：主线；呈现：直接画面 / 氛围镜头 / 旁白+画面；时间模式：dream；时间顺序：叙事51->故事40；时间锚点：幻境\", \"audio_notes\": \"环境音先行；动作点补音效；梦境段强调朦胧氛围\", \"narrator_profile_id\": \"narrator_dream_cn\", \"chronology\": {\"scene_id\": \"S0051\", \"narrative_order\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"temporal_anchor\": {\"label\": \"幻境\", \"normalized_label\": \"dream\", \"anchor_type\": \"dream_marker\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0050\"}, \"constraints\": [{\"relation\": \"same_time\", \"target_scene_id\": \"S0050\", \"confidence\": 0.45, \"reason\": \"dream_attached_to_frame\"}], \"evidence\": [{\"kind\": \"dream\", \"field\": \"text\", \"text\": \"幻境\", \"snippet\": \"像一般的‘观想’，方便修行者在入定时置身幻境之中，好方便修炼五行真炁。 而《基础剑气\"}]}, \"shots\": [{\"shot_id\": \"S0051_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\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"anchor_label\": \"幻境\", \"anchor_type\": \"dream_marker\", \"constraint_count\": 1, \"evidence_count\": 1}}, \"narrator_profile_id\": \"narrator_dream_cn\"}, {\"shot_id\": \"S0051_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\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"anchor_label\": \"幻境\", \"anchor_type\": \"dream_marker\", \"constraint_count\": 1, \"evidence_count\": 1}}, \"narrator_profile_id\": \"narrator_dream_cn\", \"narration_delivery_hint\": \"带梦境感\"}, {\"shot_id\": \"S0051_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\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"anchor_label\": \"幻境\", \"anchor_type\": \"dream_marker\", \"constraint_count\": 1, \"evidence_count\": 1}}, \"narrator_profile_id\": \"narrator_dream_cn\"}, {\"shot_id\": \"S0051_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\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"anchor_label\": \"幻境\", \"anchor_type\": \"dream_marker\", \"constraint_count\": 1, \"evidence_count\": 1}}, \"narrator_profile_id\": \"narrator_dream_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0051\", \"source_chunk_id\": \"C0015\", \"source_start_para\": 435, \"source_end_para\": 443, \"characters\": [\"李凡\", \"玄天剑意\"], \"locations\": [\"净室\", \"经楼\"], \"key_beats\": [\"理解玄天剑意选功法的缘由\", \"观想剑形并凝炼剑气\", \"剑气初成并测试威力\"], \"shot_count_hint\": 4, \"scene_summary\": \"李凡理解玄天剑意的用意，观想剑形，成功凝炼出第一道紫霞剑气。\", \"scene_text_preview\": \"其实看到这一点，李凡就明白玄天剑意执意替他选这部功法的缘由了。 剑意剑意，那它之前不管有何种手段，都是剑法上的神通修为。竹山教虽然没有什么高深的末期功法，但玄…\", \"chronology_summary\": {\"narrative_order\": 51, \"story_chronology_order\": 40, \"story_chronology_group\": \"CG0040\", \"time_mode\": \"dream\", \"confidence\": 0.92, \"order_delta\": -11, \"anchor_label\": \"幻境\", \"anchor_type\": \"dream_marker\", \"constraint_count\": 1, \"evidence_count\": 1}}}"
    }
  ]
}