{
  "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\": \"C0006-SC04\", \"title\": \"先天大道\", \"summary\": \"系统认可美食，山主继续阐述后天仙道与先天大道的区别。 山主向李凡阐述后天仙道与先天大道的区别，并因李凡的启发而顿悟突破，兴奋地要报答李凡。李凡趁机提出拜师请求。\", \"type\": [\"系统/设定\", \"对话\", \"阐述\", \"内心独白\"], \"tone\": [\"庄严\", \"阐述\", \"兴奋\", \"诙谐\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\", \"直接画面\"], \"key_beats\": [\"系统心情提升\", \"山主讲解修行体系转变\", \"山主阐述后天与先天大道之别\", \"山主因顿悟而兴奋并要报答李凡\", \"李凡提出拜师请求\"], \"characters\": [\"李凡\", \"山主\"], \"locations\": [\"庭院\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0006\", \"source_start_para\": 195, \"source_end_para\": 201, \"text\": \"系统也表示赞同，\\n\\n‘李凡的心情大幅提升了1点’\\n\\n‘李凡的心情大幅提升了1点’\\n\\n‘李凡的心情大幅提升了1点’\\n\\n山主看李凡毫不推诿客气，吃喝得这么开心洒脱，倒也觉得这小子的性格颇合胃口，讲起道来也兴致高昂，而且总算开始讲人话了。\\n\\n“在太极化生万物之前，盘古开天辟地之初，洪荒混沌未明之际，曾有一些上古先天至尊，存在于鸿蒙宇宙之中，这些存在，即被称为‘太素道祖’。\\n\\n过去本界修行练气之士，修的是后天仙道，求的不过是长生久视，法天相地，尸解飞升的左术。最高也只能演化到万物化生，金蝉脱蜕的羽化仙境界。\\n直到万载之前，虚月显现，吾辈拜月参修，才得知先天太素，物非物的真解，更有小友这样的大机缘者，能临渊入梦，窥见太素六祖的真容，方才知晓天地间的真理，过去走入了左道。\\n吾等修行之人，自此开始修行宇宙之初，鸿蒙之始的先天大道，但求追根溯源，上探天机，有朝一日能一窥先天道祖的真容，并以身化太素，参悟先天演化的道理。\", \"text_preview\": \"系统也表示赞同， ‘李凡的心情大幅提升了1点’ ‘李凡的心情大幅提升了1点’ ‘李凡的心情大幅提升了1点’ 山主看李凡毫不推诿客气，吃喝得这么开心洒脱，倒也觉…\", \"candidate_meta\": {\"candidate_id\": \"C0006-SC04\", \"record_count\": 7, \"char_len\": 407, \"structure_counts\": {\"short_line\": 1, \"dialogue\": 4, \"body\": 2}, \"boundary_reasons_after\": [], \"matched_entities\": [{\"entity_id\": \"E000037\", \"name\": \"后天仙道\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"后天仙道\", \"左术\", \"左道\"], \"score\": 9.8}, {\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\", \"小友\", \"小子\"], \"score\": 9.8}, {\"entity_id\": \"E000042\", \"name\": \"道祖\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"道祖\", \"太素道祖\"], \"score\": 7.7}, {\"entity_id\": \"E000038\", \"name\": \"先天大道\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"先天大道\", \"先天太素\"], \"score\": 7.5}, {\"entity_id\": \"E000034\", \"name\": \"太素六祖\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"太素六祖\", \"先天道祖\"], \"score\": 7.3}, {\"entity_id\": \"E000009\", \"name\": \"山主\", \"type\": \"职位称号\", \"subtype\": \"\", \"matched_terms\": [\"山主\"], \"score\": 5.8}, {\"entity_id\": \"E000054\", \"name\": \"系统\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"matched_terms\": [\"系统\"], \"score\": 5.8}, {\"entity_id\": \"E000015\", \"name\": \"虚月\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"虚月\"], \"score\": 5.7}, {\"entity_id\": \"E000033\", \"name\": \"太素道祖\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"太素道祖\"], \"score\": 5.3}, {\"entity_id\": \"E000083\", \"name\": \"非物\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"非物\"], \"score\": 5.1}], \"heuristic_types\": [\"系统/设定\", \"对话\", \"动作\"], \"heuristic_tones\": [\"庄严\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0024\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0024\", \"narrative_order\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"temporal_anchor\": {\"label\": \"过去\", \"normalized_label\": \"flashback\", \"anchor_type\": \"flashback_marker\", \"relative_direction\": \"before\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0023\"}, \"constraints\": [{\"relation\": \"flashback_of\", \"target_scene_id\": \"S0023\", \"confidence\": 0.92, \"reason\": \"flashback_marker\"}, {\"relation\": \"before\", \"target_scene_id\": \"S0023\", \"confidence\": 0.88, \"reason\": \"flashback_before_anchor\"}], \"evidence\": [{\"kind\": \"flashback\", \"field\": \"text\", \"text\": \"过去\", \"snippet\": \"中，这些存在，即被称为‘太素道祖’。 过去本界修行练气之士，修的是后天仙道，求的不\"}, {\"kind\": \"flashback\", \"field\": \"text\", \"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\"}, {\"entity_uid\": \"E000039\", \"canonical_name\": \"庭院\", \"aliases\": [], \"type\": \"地点\", \"subtype\": \"场地/空地\", \"voice_card_id\": \"\"}], \"kg_entities\": [{\"entity_id\": \"E000039\", \"name\": \"庭院\", \"type\": \"地点\", \"subtype\": \"场地/空地\", \"aliases\": [], \"attributes\": {}, \"descriptions\": [], \"evidence\": [], \"mentions\": [], \"mention_count\": 0, \"observation_count\": 0, \"first_seen\": \"\", \"last_seen\": \"\"}, {\"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\": \"S0024\", \"scene_notes\": \"系统认可美食，山主继续阐述后天仙道与先天大道的区别。 山主向李凡阐述后天仙道与先天大道的区别，并因李凡的启发而顿悟突破，兴奋地要报答李凡。李凡趁机提出拜师请求。；重要性：主线；呈现：文字卡片 / 旁白+画面 / 对白驱动 / 直接画面；时间模式：flashback；时间顺序：叙事24->故事18；时间锚点：过去\", \"audio_notes\": \"动作点补音效；回忆段用清晰转场提示\", \"narrator_profile_id\": \"narrator_flashback_cn\", \"chronology\": {\"scene_id\": \"S0024\", \"narrative_order\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"temporal_anchor\": {\"label\": \"过去\", \"normalized_label\": \"flashback\", \"anchor_type\": \"flashback_marker\", \"relative_direction\": \"before\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0023\"}, \"constraints\": [{\"relation\": \"flashback_of\", \"target_scene_id\": \"S0023\", \"confidence\": 0.92, \"reason\": \"flashback_marker\"}, {\"relation\": \"before\", \"target_scene_id\": \"S0023\", \"confidence\": 0.88, \"reason\": \"flashback_before_anchor\"}], \"evidence\": [{\"kind\": \"flashback\", \"field\": \"text\", \"text\": \"过去\", \"snippet\": \"中，这些存在，即被称为‘太素道祖’。 过去本界修行练气之士，修的是后天仙道，求的不\"}, {\"kind\": \"flashback\", \"field\": \"text\", \"text\": \"过去\", \"snippet\": \"见太素六祖的真容，方才知晓天地间的真理，过去走入了左道。 吾等修行之人，自此开始修行\"}]}, \"shots\": [{\"shot_id\": \"S0024_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\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"anchor_label\": \"过去\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_flashback_cn\"}, {\"shot_id\": \"S0024_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\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"anchor_label\": \"过去\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_flashback_cn\", \"narration_delivery_hint\": \"带回忆感\"}, {\"shot_id\": \"S0024_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\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"anchor_label\": \"过去\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_flashback_cn\"}, {\"shot_id\": \"S0024_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\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"anchor_label\": \"过去\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_flashback_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0024\", \"source_chunk_id\": \"C0006\", \"source_start_para\": 195, \"source_end_para\": 201, \"characters\": [\"李凡\", \"山主\"], \"locations\": [\"庭院\"], \"key_beats\": [\"系统心情提升\", \"山主讲解修行体系转变\", \"山主阐述后天与先天大道之别\", \"山主因顿悟而兴奋并要报答李凡\"], \"shot_count_hint\": 4, \"scene_summary\": \"系统认可美食，山主继续阐述后天仙道与先天大道的区别。 山主向李凡阐述后天仙道与先天大道的区别，并因李凡的启发而顿悟突破，兴奋地要报答李凡。李凡趁机提出拜师请求。\", \"scene_text_preview\": \"系统也表示赞同， ‘李凡的心情大幅提升了1点’ ‘李凡的心情大幅提升了1点’ ‘李凡的心情大幅提升了1点’ 山主看李凡毫不推诿客气，吃喝得这么开心洒脱，倒也觉…\", \"chronology_summary\": {\"narrative_order\": 24, \"story_chronology_order\": 18, \"story_chronology_group\": \"CG0019\", \"time_mode\": \"flashback\", \"confidence\": 0.99, \"order_delta\": -6, \"anchor_label\": \"过去\", \"anchor_type\": \"flashback_marker\", \"constraint_count\": 2, \"evidence_count\": 2}}}"
    }
  ]
}