{
  "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\": \"C0015-SC03\", \"title\": \"茯苓询问\", \"summary\": \"茯苓听到动静，从隔壁出声询问。\", \"type\": [\"对话\"], \"tone\": [\"中性\", \"关切\"], \"importance\": \"支线\", \"presentation\": [\"旁白+画面\"], \"key_beats\": [\"茯苓出声询问\"], \"characters\": [\"茯苓\"], \"locations\": [], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0015\", \"source_start_para\": 444, \"source_end_para\": 444, \"text\": \"“怎么了？”这时茯苓的声音从隔壁传来。\", \"text_preview\": \"“怎么了？”这时茯苓的声音从隔壁传来\", \"candidate_meta\": {\"candidate_id\": \"C0015-SC03\", \"record_count\": 1, \"char_len\": 19, \"structure_counts\": {\"dialogue\": 1}, \"boundary_reasons_after\": [], \"matched_entities\": [{\"entity_id\": \"E000070\", \"name\": \"茯苓\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"茯苓\"], \"score\": 5.8}], \"heuristic_types\": [\"内心独白\"], \"heuristic_tones\": [\"中性\"], \"heuristic_presentation\": [\"旁白+画面\"], \"heuristic_importance\": \"支线\"}, \"scene_id\": \"S0051\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0051\", \"narrative_order\": 51, \"story_chronology_order\": 42, \"story_chronology_group\": \"CG0042\", \"time_mode\": \"mainline\", \"confidence\": 0.88, \"order_delta\": -9, \"temporal_anchor\": {\"label\": \"这时\", \"normalized_label\": \"same_time\", \"anchor_type\": \"same_time_marker\", \"relative_direction\": \"same_time\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0049\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0049\", \"confidence\": 0.78, \"reason\": \"narrative_forward\"}], \"evidence\": [{\"kind\": \"same_time\", \"field\": \"preview\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来\"}, {\"kind\": \"same_time\", \"field\": \"text\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来。\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000070\", \"canonical_name\": \"茯苓\", \"aliases\": [\"茯苓姐姐\", \"美妇\", \"姐姐\", \"女婢\", \"茯苓姐\", \"神仙姐姐\", \"玄女\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000070\"}], \"kg_entities\": [{\"entity_id\": \"E000070\", \"name\": \"茯苓\", \"type\": \"人物\", \"subtype\": \"\", \"aliases\": [\"茯苓姐姐\", \"美妇\", \"姐姐\", \"女婢\", \"茯苓姐\", \"神仙姐姐\", \"玄女\"], \"attributes\": {}, \"descriptions\": [\"告退离开\", \"招待李凡\", \"提醒宗门事\", \"讲述墨竹山历史\", \"提醒李凡小心\", \"答应寻灵食\", \"带李凡见师兄\", \"被李凡评价颜值\"], \"evidence\": [\"茯苓白了他一眼\", \"茯苓花了十年开辟内景\", \"茯苓倒是一眼就看出他在想什么\", \"茯苓苦笑\", \"茯苓想了想说道\", \"茯苓失笑摇头\", \"茯苓倒是一口答应了下来\", \"茯苓素颜的话78不能更高了\"], \"mentions\": [{\"chunk_id\": \"C0022\", \"summary\": \"在商会处理事务\", \"evidence\": [\"看着她查账点货\"], \"attributes\": {}}, {\"chunk_id\": \"C0023\", \"summary\": \"牵李凡入塔介绍\", \"evidence\": [\"又牵着李凡带到船里细细打理了一番\"], \"attributes\": {}}, {\"chunk_id\": \"C0023\", \"summary\": \"仙像之一创教祖\", \"evidence\": [\"左手是一名素面纤纤的仙子\"], \"attributes\": {}}, {\"chunk_id\": \"C0024\", \"summary\": \"捏李凡脸说话\", \"evidence\": [\"茯苓没好气得捏了李凡脸蛋一把\"], \"attributes\": {}}, {\"chunk_id\": \"C0027\", \"summary\": \"生气并办事\", \"evidence\": [\"茯苓一副气冲冲得模样\"], \"attributes\": {}}, {\"chunk_id\": \"C0028\", \"summary\": \"安排牧龙任务\", \"evidence\": [\"茯苓白了他一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0029\", \"summary\": \"十年开辟内景\", \"evidence\": [\"茯苓花了十年开辟内景\"], \"attributes\": {}}, {\"chunk_id\": \"C0036\", \"summary\": \"招待李凡提醒宗门\", \"evidence\": [\"茯苓倒是一眼就看出他在想什么\"], \"attributes\": {}}, {\"chunk_id\": \"C0037\", \"summary\": \"讲述墨竹山两派\", \"evidence\": [\"茯苓想了想说道\"], \"attributes\": {}}, {\"chunk_id\": \"C0037\", \"summary\": \"提醒李凡小心同门\", \"evidence\": [\"我是要提醒你\"], \"attributes\": {}}, {\"chunk_id\": \"C0038\", \"summary\": \"带李凡见师兄\", \"evidence\": [\"茯苓白了他一眼\"], \"attributes\": {}}, {\"chunk_id\": \"C0047\", \"summary\": \"李凡评价其颜值\", \"evidence\": [\"茯苓素颜的话78不能更高了\"], \"attributes\": {}}], \"mention_count\": 28, \"observation_count\": 28, \"first_seen\": \"C0012\", \"last_seen\": \"C0047\"}]}\n\nSCRIPT CANDIDATE:\n{\"scene_id\": \"S0051\", \"scene_notes\": \"茯苓听到动静，从隔壁出声询问。；重要性：支线；呈现：旁白+画面；时间顺序：叙事51->故事42；时间锚点：这时\", \"audio_notes\": \"保留对白节奏\", \"narrator_profile_id\": \"narrator_main_cn\", \"chronology\": {\"scene_id\": \"S0051\", \"narrative_order\": 51, \"story_chronology_order\": 42, \"story_chronology_group\": \"CG0042\", \"time_mode\": \"mainline\", \"confidence\": 0.88, \"order_delta\": -9, \"temporal_anchor\": {\"label\": \"这时\", \"normalized_label\": \"same_time\", \"anchor_type\": \"same_time_marker\", \"relative_direction\": \"same_time\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0049\"}, \"constraints\": [{\"relation\": \"after\", \"target_scene_id\": \"S0049\", \"confidence\": 0.78, \"reason\": \"narrative_forward\"}], \"evidence\": [{\"kind\": \"same_time\", \"field\": \"preview\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来\"}, {\"kind\": \"same_time\", \"field\": \"text\", \"text\": \"这时\", \"snippet\": \"“怎么了？”这时茯苓的声音从隔壁传来。\"}]}, \"shots\": [{\"shot_id\": \"S0051_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\": 51, \"story_chronology_order\": 42, \"story_chronology_group\": \"CG0042\", \"time_mode\": \"mainline\", \"confidence\": 0.88, \"order_delta\": -9, \"anchor_label\": \"这时\", \"anchor_type\": \"same_time_marker\", \"constraint_count\": 1, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0051_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\": 51, \"story_chronology_order\": 42, \"story_chronology_group\": \"CG0042\", \"time_mode\": \"mainline\", \"confidence\": 0.88, \"order_delta\": -9, \"anchor_label\": \"这时\", \"anchor_type\": \"same_time_marker\", \"constraint_count\": 1, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_main_cn\"}, {\"shot_id\": \"S0051_SH03\", \"camera\": \"正反打\", \"description\": \"对白推进核心信息\", \"actions\": [\"茯苓出声询问\"], \"dialogue\": [{\"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\": 51, \"story_chronology_order\": 42, \"story_chronology_group\": \"CG0042\", \"time_mode\": \"mainline\", \"confidence\": 0.88, \"order_delta\": -9, \"anchor_label\": \"这时\", \"anchor_type\": \"same_time_marker\", \"constraint_count\": 1, \"evidence_count\": 2}}, \"narrator_profile_id\": \"narrator_main_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0051\", \"source_chunk_id\": \"C0015\", \"source_start_para\": 444, \"source_end_para\": 444, \"characters\": [\"茯苓\"], \"locations\": [], \"key_beats\": [\"茯苓出声询问\"], \"shot_count_hint\": 3, \"scene_summary\": \"茯苓听到动静，从隔壁出声询问。\", \"scene_text_preview\": \"“怎么了？”这时茯苓的声音从隔壁传来\", \"chronology_summary\": {\"narrative_order\": 51, \"story_chronology_order\": 42, \"story_chronology_group\": \"CG0042\", \"time_mode\": \"mainline\", \"confidence\": 0.88, \"order_delta\": -9, \"anchor_label\": \"这时\", \"anchor_type\": \"same_time_marker\", \"constraint_count\": 1, \"evidence_count\": 2}}}"
    }
  ]
}