{
  "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\": 7.8}, {\"entity_id\": \"E000026\", \"name\": \"金光\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"金光\", \"金线\"], \"score\": 7.1}, {\"entity_id\": \"E000010\", \"name\": \"山主\", \"type\": \"职位称号\", \"subtype\": \"\", \"matched_terms\": [\"山主\"], \"score\": 5.7}, {\"entity_id\": \"E000024\", \"name\": \"道种\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"道子\"], \"score\": 2.1}], \"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\": \"就是指眼前这疯子，所以就硬着头皮捧着。 随后山主站起身，冲李凡微笑着点点头，“小友拜\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"小童\", \"小友\", \"小相公\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}, {\"entity_uid\": \"E000010\", \"canonical_name\": \"山主\", \"aliases\": [], \"type\": \"职位称号\", \"subtype\": \"\", \"voice_card_id\": \"VO000010\"}], \"kg_entities\": [{\"entity_id\": \"E000010\", \"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\": \"C0005\", \"summary\": \"山主吩咐修士\", \"evidence\": [\"山主也不瞧他们\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"化作虹光远遁\", \"evidence\": [\"山主的人影一下子化作虹光远遁\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"展示画卷讲道\", \"evidence\": [\"山主看李凡玩得开心，也展颜一笑\"], \"attributes\": {}}], \"mention_count\": 7, \"observation_count\": 7, \"first_seen\": \"C0001\", \"last_seen\": \"C0006\"}, {\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"穿越者\", \"小童\", \"小友\", \"小相公\"], \"attributes\": {}, \"descriptions\": [\"穿越到仙侠世界的普通人\", \"拥有心理健康维护系统\"], \"evidence\": [\"李凡实在是忍不住了\", \"李凡流着冷汗\", \"李凡仿佛整个人置身于暴风雨之中\", \"李凡缩着脖子扭头望去\", \"李凡可不敢作死\", \"李凡眨眨眼睛仔细一看\", \"李凡咽了口唾沫\", \"李凡正被莺莺燕燕簇拥着喂酒\"], \"mentions\": [{\"chunk_id\": \"C0001\", \"summary\": \"穿越者李凡\", \"evidence\": [\"二十一人中有一个穿越者李凡\"], \"attributes\": {}}, {\"chunk_id\": \"C0002\", \"summary\": \"研究系统心情波动\", \"evidence\": [\"李凡实在是忍不住了\"], \"attributes\": {}}, {\"chunk_id\": \"C0003\", \"summary\": \"置身风暴中\", \"evidence\": [\"李凡仿佛整个人置身于暴风雨之中\"], \"attributes\": {}}, {\"chunk_id\": \"C0004\", \"summary\": \"被山主和老道观察\", \"evidence\": [\"李凡缩着脖子扭头望去\"], \"attributes\": {}}, {\"chunk_id\": \"C0005\", \"summary\": \"李凡捧剑不敢作死\", \"evidence\": [\"李凡可不敢作死\"], \"attributes\": {}}, {\"chunk_id\": \"C0005\", \"summary\": \"李凡看飞剑\", \"evidence\": [\"李凡眨眨眼睛仔细一看\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"被侍婢簇拥喂酒\", \"evidence\": [\"李凡正被莺莺燕燕簇拥着喂酒\"], \"attributes\": {}}, {\"chunk_id\": \"C0006\", \"summary\": \"吃青团喝仙酒\", \"evidence\": [\"取了个青团嚼嚼，浅杯里仙酒一啜\"], \"attributes\": {}}], \"mention_count\": 8, \"observation_count\": 8, \"first_seen\": \"C0001\", \"last_seen\": \"C0006\"}]}\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\": \"就是指眼前这疯子，所以就硬着头皮捧着。 随后山主站起身，冲李凡微笑着点点头，“小友拜\"}]}, \"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\": 2}}, \"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\": 2}}, \"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\": 2}}, \"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\": 2}}, \"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\": 2}}}"
    }
  ]
}