{
  "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. Adaptation is also program-owned. Use the adaptation brief to decide what to fully dramatize, what to compress, and what to turn into bridge narration. 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, adaptation 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, ordering hints, and adaptation decision/presentation_mode. 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\": \"C0002-SC06\", \"title\": \"心情持续下降\", \"summary\": \"李凡吐槽系统，心情连续下降，最终显示为97/100。\", \"type\": [\"系统/设定\", \"内心独白\"], \"tone\": [\"中性\", \"诙谐\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\"], \"key_beats\": [\"李凡吐槽系统\", \"心情多次下降\", \"显示当前心情值\"], \"characters\": [\"李凡\"], \"locations\": [\"深山老林\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0002\", \"source_start_para\": 39, \"source_end_para\": 44, \"text\": \"卧丢你母的……这什么吊系统啊……\\n\\n‘李凡的心情下降了1点’\\n\\n闭嘴好吧你！\\n\\n‘李凡的心情下降了1点’\\n\\n李凡白眼一翻往蒲团上一趟，看着自己的头顶。\\n\\n‘李凡，心情，97/100’\", \"text_preview\": \"卧丢你母的……这什么吊系统啊…… ‘李凡的心情下降了1点’ 闭嘴好吧你！ ‘李凡的心情下降了1点’ 李凡白眼一翻往蒲团上一趟，看着自己的头顶。 ‘李凡，心情，…\", \"candidate_meta\": {\"candidate_id\": \"C0002-SC06\", \"record_count\": 6, \"char_len\": 91, \"structure_counts\": {\"short_line\": 2, \"dialogue\": 3, \"body\": 1}, \"boundary_reasons_after\": [], \"matched_entities\": [{\"entity_id\": \"E000010\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.1}, {\"entity_id\": \"E000017\", \"name\": \"蒲团\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"蒲团\"], \"score\": 5.1}], \"heuristic_types\": [\"系统/设定\", \"对话\"], \"heuristic_tones\": [\"中性\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0007\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0007\", \"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0006\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0006\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}\n\nADAPTATION:\n{\"scene_id\": \"S0007\", \"source_chunk_id\": \"C0002\", \"scene_summary\": \"李凡吐槽系统，心情连续下降，最终显示为97/100。\", \"chronology\": {\"scene_id\": \"S0007\", \"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0006\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0006\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"角色塑造\", \"系统设定展示\"], \"adaptation_focus\": \"通过李凡与系统的互动，揭示系统运作机制，并展现主角初期的挫败感和性格。\", \"must_keep\": [\"李凡吐槽系统\", \"心情值连续下降的机制\", \"最终心情值97/100的显示\"], \"may_compress\": [\"重复的下降提示音效或字幕\", \"李凡躺下的具体动作时长\"], \"visual_focus\": [\"李凡的表情变化（从吐槽到无奈）\", \"系统提示的视觉化呈现（如浮动文字、UI）\", \"深山老林的环境与李凡的孤立感\"], \"audio_focus\": [\"李凡的吐槽对白\", \"系统提示音（若有）\", \"环境音（风声、虫鸣）\"], \"continuity_requirements\": [\"李凡的情绪状态从S0006延续\", \"系统UI/提示方式的视觉一致性\"], \"script_objective\": \"以简洁、诙谐的方式，具象化系统对主角心情的实时影响，建立主角与“系统”这一核心设定的初次冲突性互动。\", \"conflict\": \"李凡（主角）的主观意愿与系统（客观规则/存在）之间的微小摩擦。\", \"turning_point\": \"李凡放弃吐槽，躺下并最终看到“97/100”的数值，标志着他暂时接受/无奈于系统的存在。\", \"reason\": \"此场景是系统功能的关键展示和主角性格的生动刻画，虽短但信息密度高，适合用说明性镜头（exposition）快速、清晰地呈现，为后续剧情铺垫。\", \"candidate_meta\": {\"scene_id\": \"S0007\", \"decision_reasons\": [\"main_conflict_or_dialogue_dense\"], \"presentation_reasons\": [\"exposition_priority\"], \"metrics\": {\"text_length\": 228, \"quote_count\": 0, \"action_score\": 0, \"exposition_score\": 4, \"inner_score\": 0, \"transition_score\": 0, \"reveal_score\": 0, \"tension_score\": 0, \"environment_score\": 0, \"character_count\": 1, \"location_count\": 1, \"beat_count\": 3, \"continuation_of_prev\": false, \"time_mode\": \"mainline\", \"order_delta\": 0}, \"characters\": [\"李凡\"], \"locations\": [\"深山老林\"], \"key_beats\": [\"李凡吐槽系统\", \"心情多次下降\", \"显示当前心情值\"]}}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"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\": \"C0002\", \"summary\": \"穿越者李凡\", \"evidence\": [\"李凡，普普通通的打工人\"], \"attributes\": {}}], \"mention_count\": 1, \"observation_count\": 1, \"first_seen\": \"C0002\", \"last_seen\": \"C0002\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0007\", \"scene_notes\": \"李凡吐槽系统，心情连续下降，最终显示为97/100。；重要性：主线；呈现：文字卡片 / 旁白+画面；改编策略：retain；呈现策略：exposition；剧本目标：以简洁、诙谐的方式，具象化系统对主角心情的实时影响，建立主角与“系统”这一核心设定的初次冲突性互动。\", \"audio_notes\": \"李凡的吐槽对白；系统提示音（若有）；环境音（风声、虫鸣）\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0007\", \"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0006\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0006\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}, \"adaptation\": {\"scene_id\": \"S0007\", \"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"角色塑造\", \"系统设定展示\"], \"adaptation_focus\": \"通过李凡与系统的互动，揭示系统运作机制，并展现主角初期的挫败感和性格。\", \"must_keep\": [\"李凡吐槽系统\", \"心情值连续下降的机制\", \"最终心情值97/100的显示\"], \"may_compress\": [\"重复的下降提示音效或字幕\", \"李凡躺下的具体动作时长\"], \"visual_focus\": [\"李凡的表情变化（从吐槽到无奈）\", \"系统提示的视觉化呈现（如浮动文字、UI）\", \"深山老林的环境与李凡的孤立感\"], \"audio_focus\": [\"李凡的吐槽对白\", \"系统提示音（若有）\", \"环境音（风声、虫鸣）\"], \"continuity_requirements\": [\"李凡的情绪状态从S0006延续\", \"系统UI/提示方式的视觉一致性\"], \"script_objective\": \"以简洁、诙谐的方式，具象化系统对主角心情的实时影响，建立主角与“系统”这一核心设定的初次冲突性互动。\", \"conflict\": \"李凡（主角）的主观意愿与系统（客观规则/存在）之间的微小摩擦。\", \"turning_point\": \"李凡放弃吐槽，躺下并最终看到“97/100”的数值，标志着他暂时接受/无奈于系统的存在。\", \"reason\": \"此场景是系统功能的关键展示和主角性格的生动刻画，虽短但信息密度高，适合用说明性镜头（exposition）快速、清晰地呈现，为后续剧情铺垫。\", \"chronology\": {\"scene_id\": \"S0007\", \"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"temporal_anchor\": {\"label\": \"\", \"normalized_label\": \"unknown\", \"anchor_type\": \"unknown\", \"relative_direction\": \"unknown\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": false, \"anchor_scene_id\": \"S0006\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0006\", \"confidence\": 0.58, \"reason\": \"narrative_forward\"}], \"evidence\": []}}, \"shots\": [{\"shot_id\": \"S0007_SH01\", \"camera\": \"说明性中景\", \"description\": \"深山老林建立镜头，带出李凡吐槽系统\", \"actions\": [\"李凡吐槽系统\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"李凡\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"opening\", \"description_hint\": \"深山老林建立镜头，带出李凡吐槽系统\", \"camera_hint\": \"远景\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"角色塑造\", \"系统设定展示\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 1, \"chronology_summary\": {\"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0007_SH02\", \"camera\": \"中近景\", \"description\": \"李凡的反应镜头，推进心情多次下降\", \"actions\": [\"心情多次下降\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"\", \"focus_characters\": [\"李凡\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"character\", \"description_hint\": \"李凡的反应镜头，推进心情多次下降\", \"camera_hint\": \"中近景\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"角色塑造\", \"系统设定展示\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 2, \"chronology_summary\": {\"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0007_SH03\", \"camera\": \"近景\", \"description\": \"动作或状态变化的推进镜头\", \"actions\": [\"心情多次下降\", \"显示当前心情值\"], \"dialogue\": [], \"narration\": \"\", \"on_screen_text\": \"李凡吐槽系统，心情连续下降，最终显示为97/100。\", \"focus_characters\": [\"李凡\"], \"focus_locations\": [\"深山老林\"], \"candidate_meta\": {\"shot_role\": \"dialogue_or_action\", \"description_hint\": \"动作或状态变化的推进镜头\", \"camera_hint\": \"近景\", \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"角色塑造\", \"系统设定展示\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}, \"shot_index\": 3, \"chronology_summary\": {\"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0007\", \"source_chunk_id\": \"C0002\", \"source_start_para\": 39, \"source_end_para\": 44, \"characters\": [\"李凡\"], \"locations\": [\"深山老林\"], \"key_beats\": [\"李凡吐槽系统\", \"心情多次下降\", \"显示当前心情值\"], \"shot_count_hint\": 3, \"scene_summary\": \"李凡吐槽系统，心情连续下降，最终显示为97/100。\", \"scene_text_preview\": \"卧丢你母的……这什么吊系统啊…… ‘李凡的心情下降了1点’ 闭嘴好吧你！ ‘李凡的心情下降了1点’ 李凡白眼一翻往蒲团上一趟，看着自己的头顶。 ‘李凡，心情，…\", \"chronology_summary\": {\"narrative_order\": 7, \"story_chronology_order\": 7, \"story_chronology_group\": \"CG0007\", \"time_mode\": \"mainline\", \"confidence\": 0.86, \"order_delta\": 0, \"anchor_label\": \"\", \"anchor_type\": \"unknown\", \"constraint_count\": 1, \"evidence_count\": 0}, \"adaptation_summary\": {\"decision\": \"retain\", \"presentation_mode\": \"exposition\", \"story_function\": [\"信息揭示\", \"角色塑造\", \"系统设定展示\"], \"must_keep_count\": 3, \"audio_focus_count\": 3}}}"
    }
  ]
}