{
  "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\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\", \"小友\"], \"score\": 7.8}, {\"entity_id\": \"E000010\", \"name\": \"山主\", \"type\": \"职位称号\", \"subtype\": \"\", \"matched_terms\": [\"山主\"], \"score\": 5.7}, {\"entity_id\": \"E000016\", \"name\": \"虚月\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"虚月\"], \"score\": 5.3}, {\"entity_id\": \"E000031\", \"name\": \"太素道祖\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"太素道祖\"], \"score\": 5.2}, {\"entity_id\": \"E000038\", \"name\": \"先天大道\", \"type\": \"功法体系\", \"subtype\": \"\", \"matched_terms\": [\"先天大道\"], \"score\": 5.1}, {\"entity_id\": \"E000033\", \"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\": \"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\": \"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}}}"
    }
  ]
}