{
  "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\": \"C0035-SC04\", \"title\": \"鲲之真身\", \"summary\": \"系统提示抽奖奖励为鲲，当前为幼体，需养几千年，李凡与剑意吐槽。\", \"type\": [\"系统/设定\", \"对话\"], \"tone\": [\"中性\", \"戏谑\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"对白驱动\"], \"key_beats\": [\"系统确认奖励为鲲\", \"李凡质疑鲲的形态\", \"剑意解释需长时间培养\"], \"characters\": [\"玄天剑意\"], \"locations\": [], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0035\", \"source_start_para\": 975, \"source_end_para\": 978, \"text\": \"‘系统抽奖奖励，鲲，已送达，当前充能进度71/100，抽奖冷却未完成。’\\n\\n……系统你是不是在搞老子？鲲是这样的啊？？\\n\\n‘玄天剑意表示，鲲还就是这样的，养个几千年就好了。’\\n\\n卧尼玛……剑意你给老子闭嘴！\", \"text_preview\": \"‘系统抽奖奖励，鲲，已送达，当前充能进度71/100，抽奖冷却未完成。’ ……系统你是不是在搞老子？鲲是这样的啊？？ ‘玄天剑意表示，鲲还就是这样的，养个几千…\", \"candidate_meta\": {\"candidate_id\": \"C0035-SC04\", \"record_count\": 4, \"char_len\": 103, \"structure_counts\": {\"dialogue\": 2, \"body\": 1, \"short_line\": 1}, \"boundary_reasons_after\": [\"chapter_heading\"], \"matched_entities\": [{\"entity_id\": \"E000063\", \"name\": \"玄天剑意\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"matched_terms\": [\"玄天剑意\", \"系统\"], \"score\": 7.8}, {\"entity_id\": \"E000064\", \"name\": \"系统\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"matched_terms\": [\"系统\"], \"score\": 5.8}, {\"entity_id\": \"E000126\", \"name\": \"系统\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"matched_terms\": [\"系统\"], \"score\": 5.0}], \"heuristic_types\": [\"系统/设定\", \"对话\"], \"heuristic_tones\": [\"中性\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0100\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0100\", \"narrative_order\": 100, \"story_chronology_order\": 81, \"story_chronology_group\": \"CG0081\", \"time_mode\": \"mainline\", \"confidence\": 0.56, \"order_delta\": -19, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0098\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0098\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000063\", \"canonical_name\": \"玄天剑意\", \"aliases\": [\"小剑\", \"奖品\", \"系统\", \"白光\", \"签约道具\", \"玄天剑祖\"], \"type\": \"系统面板\", \"subtype\": \"系统\", \"voice_card_id\": \"VO000063\"}], \"kg_entities\": [{\"entity_id\": \"E000063\", \"name\": \"玄天剑意\", \"type\": \"系统面板\", \"subtype\": \"系统\", \"aliases\": [\"小剑\", \"奖品\", \"系统\", \"白光\", \"签约道具\", \"玄天剑祖\"], \"attributes\": {}, \"descriptions\": [\"传授绝招\", \"评论霸体功法\", \"建议见神杀神剑法\", \"警告宿主勿拔术剑\", \"建议购买雷觞酒\", \"回忆北辰剑宗\", \"在酒中遨游\", \"回忆过往\"], \"evidence\": [\"玄天剑意表示宿主不必妄自菲薄\", \"玄天剑意表示，那还用说吗\", \"玄天剑意表示画不出来\", \"玄天剑意明白李凡\", \"玄天剑意表示，就是叫见神杀神\", \"玄天剑意表示，宿主不要作死\", \"玄天剑意就仿佛真的喝醉了似的\", \"就只是单纯在回忆\"], \"mentions\": [{\"chunk_id\": \"C0035\", \"summary\": \"保护肉身评论鲲\", \"evidence\": [\"玄天剑意表示...主动留在人间道保护宿主肉身；玄天剑意表示，鲲还就是这样的\"], \"attributes\": {}}, {\"chunk_id\": \"C0036\", \"summary\": \"解释鲲能力\", \"evidence\": [\"玄天剑意表示不是鲶鱼是鲲\"], \"attributes\": {}}, {\"chunk_id\": \"C0037\", \"summary\": \"反驳茯苓观点\", \"evidence\": [\"玄天剑意表示，这女娃资质愚钝\"], \"attributes\": {}}, {\"chunk_id\": \"C0038\", \"summary\": \"建议筑基\", \"evidence\": [\"玄天剑意表示\"], \"attributes\": {}}, {\"chunk_id\": \"C0040\", \"summary\": \"与李凡对话\", \"evidence\": [\"玄天剑意表示宿主\"], \"attributes\": {}}, {\"chunk_id\": \"C0041\", \"summary\": \"评价资质与蟠龙\", \"evidence\": [\"玄天剑意表示宿主不必妄自菲薄\"], \"attributes\": {}}, {\"chunk_id\": \"C0042\", \"summary\": \"指点李凡修炼\", \"evidence\": [\"玄天剑意表示宿主正好可以试习\"], \"attributes\": {}}, {\"chunk_id\": \"C0043\", \"summary\": \"表示童子在练武功\", \"evidence\": [\"玄天剑意表示\"], \"attributes\": {}}, {\"chunk_id\": \"C0044\", \"summary\": \"介绍见神杀神剑法\", \"evidence\": [\"玄天剑意表示，就是叫见神杀神\"], \"attributes\": {}}, {\"chunk_id\": \"C0044\", \"summary\": \"警告勿拔术剑\", \"evidence\": [\"玄天剑意表示，宿主不要作死\"], \"attributes\": {}}, {\"chunk_id\": \"C0046\", \"summary\": \"建议购买雷觞酒\", \"evidence\": [\"玄天剑意表示\"], \"attributes\": {}}, {\"chunk_id\": \"C0047\", \"summary\": \"在酒坛中游动\", \"evidence\": [\"玄天剑意就仿佛真的喝醉了似的\"], \"attributes\": {}}], \"mention_count\": 36, \"observation_count\": 36, \"first_seen\": \"C0011\", \"last_seen\": \"C0047\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0100\", \"scene_notes\": \"系统提示抽奖奖励为鲲，当前为幼体，需养几千年，李凡与剑意吐槽。；重要性：主线；呈现：文字卡片 / 对白驱动；时间顺序：叙事100->故事81\", \"audio_notes\": \"以旁白驱动\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0100\", \"narrative_order\": 100, \"story_chronology_order\": 81, \"story_chronology_group\": \"CG0081\", \"time_mode\": \"mainline\", \"confidence\": 0.56, \"order_delta\": -19, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0098\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0098\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"shots\": [{\"shot_id\": \"S0100_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\": 100, \"story_chronology_order\": 81, \"story_chronology_group\": \"CG0081\", \"time_mode\": \"mainline\", \"confidence\": 0.56, \"order_delta\": -19, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0100_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\": 100, \"story_chronology_order\": 81, \"story_chronology_group\": \"CG0081\", \"time_mode\": \"mainline\", \"confidence\": 0.56, \"order_delta\": -19, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0100_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\": 100, \"story_chronology_order\": 81, \"story_chronology_group\": \"CG0081\", \"time_mode\": \"mainline\", \"confidence\": 0.56, \"order_delta\": -19, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0100\", \"source_chunk_id\": \"C0035\", \"source_start_para\": 975, \"source_end_para\": 978, \"characters\": [\"玄天剑意\"], \"locations\": [], \"key_beats\": [\"系统确认奖励为鲲\", \"李凡质疑鲲的形态\", \"剑意解释需长时间培养\"], \"shot_count_hint\": 3, \"scene_summary\": \"系统提示抽奖奖励为鲲，当前为幼体，需养几千年，李凡与剑意吐槽。\", \"scene_text_preview\": \"‘系统抽奖奖励，鲲，已送达，当前充能进度71/100，抽奖冷却未完成。’ ……系统你是不是在搞老子？鲲是这样的啊？？ ‘玄天剑意表示，鲲还就是这样的，养个几千…\", \"chronology_summary\": {\"narrative_order\": 100, \"story_chronology_order\": 81, \"story_chronology_group\": \"CG0081\", \"time_mode\": \"mainline\", \"confidence\": 0.56, \"order_delta\": -19, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}}"
    }
  ]
}