{
  "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\": \"C0004-SC03\", \"title\": \"血泪赠礼\", \"summary\": \"山主闻道后泪流满面，血泪化为珍珠赠予李凡，并邀请他吃酒，同时放出两道金光环绕。\", \"type\": [\"系统/设定\", \"对话\", \"动作\"], \"tone\": [\"庄严\", \"轻松\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"key_beats\": [\"山主流血泪，泪化珍珠\", \"山主赠珍珠并邀李凡吃酒\", \"山主放出两道金光环绕\"], \"characters\": [\"李凡\", \"山主\"], \"locations\": [], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0004\", \"source_start_para\": 125, \"source_end_para\": 130, \"text\": \"李凡没有听到系统开口，呵呵，大概是他现在自己都已经精神麻木到，见到这种场景也无所谓的境界了吧……\\n倒是那个山主露出了一脸至福的满足感，就那种，憋久了蹲马桶上，一下子全身心放松输出的那种，至上的幸福感……\\n好吧，那句话怎么说来着，只有作死的宿主，没有给错的系统，搞不好这个世界的修行者，大部分都有严重的精神疾病和心里问题……\\n\\n“闻道可死矣。”山主捂着脸，泪流满面。字面意义的泪流满面，眼白里六只瞳孔，从眼角直接多溢出三倍的血泪，那些眼泪叮叮当当得滚落在地上，化成一颗颗红色的珍珠。\\n\\n“感谢小友助我修行，这些就是本座的答礼。”\\n\\n他说着抓了一把血泪凝结的珍珠，塞到李凡怀里让他揣着。\\n\\n李凡，“……”\\n\\n特码的谁要啊！不过李凡可不敢作死，他依稀记起刚才有个蒙面人说过，搞不过关要送去给山主下酒，大概就是指眼前这疯子，所以就硬着头皮捧着。\\n随后山主站起身，冲李凡微笑着点点头，“小友拜月入道，第一眼就能临渊知命，果然是天生道子，前途不可限量，来，本座请你吃酒。”\\n他把衣袖一抖，从红袍里洒出两道金光，一弹一跳，眨眼睛拉出两条金线，绕着两人身边，如两只长蜻蜓似得盘旋着打转。\", \"text_preview\": \"李凡没有听到系统开口，呵呵，大概是他现在自己都已经精神麻木到，见到这种场景也无所谓的境界了吧…… 倒是那个山主露出了一脸至福的满足感，就那种，憋久了蹲马桶上，…\", \"candidate_meta\": {\"candidate_id\": \"C0004-SC03\", \"record_count\": 6, \"char_len\": 485, \"structure_counts\": {\"body\": 3, \"dialogue\": 2, \"short_line\": 1}, \"boundary_reasons_after\": [], \"matched_entities\": [{\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\", \"小友\", \"道子\"], \"score\": 9.8}, {\"entity_id\": \"E000027\", \"name\": \"金光\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"金光\", \"金线\"], \"score\": 7.1}, {\"entity_id\": \"E000009\", \"name\": \"山主\", \"type\": \"职位称号\", \"subtype\": \"\", \"matched_terms\": [\"山主\"], \"score\": 5.8}, {\"entity_id\": \"E000054\", \"name\": \"系统\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"matched_terms\": [\"系统\"], \"score\": 5.8}, {\"entity_id\": \"E000024\", \"name\": \"道种\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"道子\"], \"score\": 2.3}], \"heuristic_types\": [\"系统/设定\", \"对话\", \"动作\"], \"heuristic_tones\": [\"庄严\", \"轻松\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0019\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0019\", \"narrative_order\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"temporal_anchor\": {\"label\": \"记起\", \"normalized_label\": \"flashback\", \"anchor_type\": \"flashback_marker\", \"relative_direction\": \"before\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0017\"}, \"constraints\": [{\"relation\": \"flashback_of\", \"target_scene_id\": \"S0017\", \"confidence\": 0.92, \"reason\": \"flashback_marker\"}, {\"relation\": \"before\", \"target_scene_id\": \"S0017\", \"confidence\": 0.88, \"reason\": \"flashback_before_anchor\"}], \"evidence\": [{\"kind\": \"flashback\", \"field\": \"text\", \"text\": \"记起\", \"snippet\": \"特码的谁要啊！不过李凡可不敢作死，他依稀记起刚才有个蒙面人说过，搞不过关要送去给山主\"}, {\"kind\": \"forward\", \"field\": \"text\", \"text\": \"随后\", \"snippet\": \"就是指眼前这疯子，所以就硬着头皮捧着。 随后山主站起身，冲李凡微笑着点点头，“小友拜\"}, {\"kind\": \"parallel\", \"field\": \"summary\", \"text\": \"同时\", \"snippet\": \"面，血泪化为珍珠赠予李凡，并邀请他吃酒，同时放出两道金光环绕。\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"小相公\", \"小友\", \"小子\", \"清月\", \"李清月\", \"道子\", \"小色鬼\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}, {\"entity_uid\": \"E000009\", \"canonical_name\": \"山主\", \"aliases\": [\"仙尊\", \"师尊\"], \"type\": \"职位称号\", \"subtype\": \"\", \"voice_card_id\": \"VO000009\"}], \"kg_entities\": [{\"entity_id\": \"E000009\", \"name\": \"山主\", \"type\": \"职位称号\", \"subtype\": \"\", \"aliases\": [\"仙尊\", \"师尊\"], \"attributes\": {}, \"descriptions\": [\"墨竹山的首领\"], \"evidence\": [\"山主\", \"大概就是那什么山主了\", \"山主站起身\", \"山主则伸手把李凡右腕一握\", \"山主的人影一下子化作虹光远遁\", \"山主抱着一卷画轴\", \"山主说得满面红光\", \"山主座下的真传弟子\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"墨竹山首领\", \"evidence\": [\"和山主弈棋输了\"], \"attributes\": {}}, {\"chunk_id\": \"C0003\", \"summary\": \"老道叩拜山主\", \"evidence\": [\"山主\"], \"attributes\": {}}, {\"chunk_id\": \"C0004\", \"summary\": \"询问老道并观察李凡\", \"evidence\": [\"大概就是那什么山主了\"], \"attributes\": {}}, {\"chunk_id\": \"C0005\", \"summary\": \"山主请李凡吃酒\", \"evidence\": [\"山主站起身\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"化作虹光远遁\", \"evidence\": [\"山主的人影一下子化作虹光远遁\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"抱画轴回庭院\", \"evidence\": [\"山主抱着一卷画轴，回到庭院中的时候\"], \"attributes\": {}}, {\"chunk_id\": \"C0007\", \"summary\": \"突破在即要闭关\", \"evidence\": [\"本座这些年也在化神期停滞徘徊\"], \"attributes\": {}}, {\"chunk_id\": \"C0008\", \"summary\": \"请李凡吃酒\", \"evidence\": [\"难怪师尊请你吃酒\"], \"attributes\": {}}], \"mention_count\": 8, \"observation_count\": 8, \"first_seen\": \"C0001\", \"last_seen\": \"C0008\"}, {\"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\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0019\", \"scene_notes\": \"山主闻道后泪流满面，血泪化为珍珠赠予李凡，并邀请他吃酒，同时放出两道金光环绕。；重要性：主线；呈现：文字卡片 / 旁白+画面 / 对白驱动；时间模式：flashback；时间顺序：叙事19->故事14；时间锚点：记起\", \"audio_notes\": \"保留对白节奏；动作点补音效；回忆段用清晰转场提示\", \"narrator_profile_id\": \"narrator_flashback_cn\", \"chronology\": {\"scene_id\": \"S0019\", \"narrative_order\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"temporal_anchor\": {\"label\": \"记起\", \"normalized_label\": \"flashback\", \"anchor_type\": \"flashback_marker\", \"relative_direction\": \"before\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0017\"}, \"constraints\": [{\"relation\": \"flashback_of\", \"target_scene_id\": \"S0017\", \"confidence\": 0.92, \"reason\": \"flashback_marker\"}, {\"relation\": \"before\", \"target_scene_id\": \"S0017\", \"confidence\": 0.88, \"reason\": \"flashback_before_anchor\"}], \"evidence\": [{\"kind\": \"flashback\", \"field\": \"text\", \"text\": \"记起\", \"snippet\": \"特码的谁要啊！不过李凡可不敢作死，他依稀记起刚才有个蒙面人说过，搞不过关要送去给山主\"}, {\"kind\": \"forward\", \"field\": \"text\", \"text\": \"随后\", \"snippet\": \"就是指眼前这疯子，所以就硬着头皮捧着。 随后山主站起身，冲李凡微笑着点点头，“小友拜\"}, {\"kind\": \"parallel\", \"field\": \"summary\", \"text\": \"同时\", \"snippet\": \"面，血泪化为珍珠赠予李凡，并邀请他吃酒，同时放出两道金光环绕。\"}]}, \"shots\": [{\"shot_id\": \"S0019_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\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"anchor_label\": \"记起\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_flashback_cn\"}, {\"shot_id\": \"S0019_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\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"anchor_label\": \"记起\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_flashback_cn\", \"narration_delivery_hint\": \"带回忆感\"}, {\"shot_id\": \"S0019_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\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"anchor_label\": \"记起\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_flashback_cn\"}, {\"shot_id\": \"S0019_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\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"anchor_label\": \"记起\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_flashback_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0019\", \"source_chunk_id\": \"C0004\", \"source_start_para\": 125, \"source_end_para\": 130, \"characters\": [\"李凡\", \"山主\"], \"locations\": [], \"key_beats\": [\"山主流血泪，泪化珍珠\", \"山主赠珍珠并邀李凡吃酒\", \"山主放出两道金光环绕\"], \"shot_count_hint\": 4, \"scene_summary\": \"山主闻道后泪流满面，血泪化为珍珠赠予李凡，并邀请他吃酒，同时放出两道金光环绕。\", \"scene_text_preview\": \"李凡没有听到系统开口，呵呵，大概是他现在自己都已经精神麻木到，见到这种场景也无所谓的境界了吧…… 倒是那个山主露出了一脸至福的满足感，就那种，憋久了蹲马桶上，…\", \"chronology_summary\": {\"narrative_order\": 19, \"story_chronology_order\": 14, \"story_chronology_group\": \"CG0015\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -5, \"anchor_label\": \"记起\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 3}}}"
    }
  ]
}