{
  "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\": \"C0002-SC09\", \"title\": \"虚月当空\", \"summary\": \"李凡研究系统，天色变黑，老道警告不要抬头，李凡抬头看见双月异象，竹林骤起风暴。 李凡经历幻象风暴后，抽奖完成获得小剑，系统提示心情值持续下降。\", \"type\": [\"系统/设定\", \"对话\", \"内心独白\", \"环境描写\"], \"tone\": [\"庄严\", \"悬疑\", \"紧张\"], \"importance\": \"主线\", \"presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\", \"氛围镜头\"], \"key_beats\": [\"李凡分析系统机制\", \"老道警告虚月当空\", \"李凡抬头见双月异象\", \"幻象风暴消散\", \"获得星光小剑\", \"心情值持续下降\"], \"characters\": [\"老道\", \"李凡\"], \"locations\": [\"墨色竹林\", \"紫色天幕岩层\"], \"continuation_of_prev\": false, \"source_chunk_id\": \"C0002\", \"source_start_para\": 62, \"source_end_para\": 69, \"text\": \"李凡吃力得揉着太阳穴，摊上这么个坑爹系统可真尼玛累啊……\\n总之目前看来，这系统的点数，是基于李凡的心理状态增减的，每一次心理波动，都会给抽奖充能，从进度进程看，上下波动，双向的数值变化都有效，总计到100点就能抽奖一次。\\n虽然不知道能抽出什么样的坑爹玩意，但至少这系统不是单纯的白板，也给李凡留了个念想，抽奖都有了，签到任务练级什么的还会远吗？慢慢开发好了。\\n\\n可现在比较尴尬的是，偏偏李凡一开始的先天气运，莫名其妙的选到了那什么‘镇静一点’，每次波动的数值只有一点！\\n好坑啊！这样上一点下一点的，要到猴年马月才能充能一次哦艹！\\n这边李凡正愁眉苦脸得研究着自己的搞心态系统，不知不觉的天色就黑下来。\\n\\n“哈！虚月当空！”坐在前边的老道士突然爆发出一声怪笑，“小子！你运气不好！等会儿顶不住就把眼珠子扣了吧！还有！不想死的话，就不要抬头看！”\\n\\n啥？\\n\\n如果你不想让人抬头，就别特码叫人别抬头！可惜这么简单的道理那老头都不知道，于是就把李凡坑了。\\n他正斜躺在蒲团上抠鼻子，下意识得抬起头，望向遮蔽天穹的夜幕。\\n\\n两轮又大又圆的明月倒映在他的瞳孔里。\\n\\n这摆明了不是地球的月亮，一左一右，一大一小，一青一紫，仿佛两轮火球被那八臂魔尊托在掌心，当空照耀。\\n把那魔尊的六道首级脸面，照映得一边铁青，一边绛紫，头颅上镶嵌的黑曜石金光烁烁，好像睁开了数不尽的眼睛。\\n隐约间李凡好像听到一声龙吟似的剑鸣，接着整个墨色竹林中，突然蒸腾起黑紫色的瘴气，再随后烟云聚拢，狂风大作，平地里刮起了一阵龙卷，环绕着李凡蒲团外，被老道士用木剑所画的圆圈所遮挡，卷起了一层层一道道的烟幕，几乎遮蔽了天幕。\\n\\n李凡仿佛整个人置身于暴风雨之中，惊得手足抓着蒲团直伏身趴着，眼前的黑风狂卷，飞沙走石，形成了一道直通苍穹的漩涡，把李凡的视界都遮蔽，只在他的眼前，留下那轮闪烁着紫光的明月。\\n而不等他眨眼的工夫，下一瞬间这旋风又消逝了，万籁俱寂，\\n刚才摧枯拉朽，毁天灭地般的狂沙龙卷更都消散如烟。\", \"text_preview\": \"李凡吃力得揉着太阳穴，摊上这么个坑爹系统可真尼玛累啊…… 总之目前看来，这系统的点数，是基于李凡的心理状态增减的，每一次心理波动，都会给抽奖充能，从进度进程看…\", \"candidate_meta\": {\"candidate_id\": \"C0002-SC09\", \"record_count\": 8, \"char_len\": 828, \"structure_counts\": {\"body\": 5, \"dialogue\": 1, \"short_line\": 2}, \"boundary_reasons_after\": [], \"matched_entities\": [{\"entity_id\": \"E000001\", \"name\": \"老道\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"老道\", \"老道士\"], \"score\": 7.5}, {\"entity_id\": \"E000016\", \"name\": \"虚月\", \"type\": \"概念法则\", \"subtype\": \"\", \"matched_terms\": [\"虚月\", \"明月\"], \"score\": 7.3}, {\"entity_id\": \"E000017\", \"name\": \"魔尊\", \"type\": \"生物种族\", \"subtype\": \"\", \"matched_terms\": [\"魔尊\", \"八臂魔尊\"], \"score\": 7.2}, {\"entity_id\": \"E000013\", \"name\": \"镇静一点\", \"type\": \"术法神通\", \"subtype\": \"\", \"matched_terms\": [\"镇静一点\", \"先天气运\"], \"score\": 7.1}, {\"entity_id\": \"E000002\", \"name\": \"李凡\", \"type\": \"人物\", \"subtype\": \"\", \"matched_terms\": [\"李凡\"], \"score\": 5.8}, {\"entity_id\": \"E000019\", \"name\": \"蒲团\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"蒲团\"], \"score\": 5.3}, {\"entity_id\": \"E000018\", \"name\": \"墨色竹林\", \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"matched_terms\": [\"墨色竹林\"], \"score\": 5.1}, {\"entity_id\": \"E000020\", \"name\": \"木剑\", \"type\": \"物品\", \"subtype\": \"兵器\", \"matched_terms\": [\"木剑\"], \"score\": 5.1}, {\"entity_id\": \"E000026\", \"name\": \"金光\", \"type\": \"物品\", \"subtype\": \"\", \"matched_terms\": [\"金光\"], \"score\": 5.1}], \"heuristic_types\": [\"系统/设定\", \"对话\", \"内心独白\"], \"heuristic_tones\": [\"庄严\", \"悬疑\"], \"heuristic_presentation\": [\"文字卡片\", \"旁白+画面\", \"对白驱动\"], \"heuristic_importance\": \"主线\"}, \"scene_id\": \"S0013\"}\n\nCHRONOLOGY:\n{\"scene_id\": \"S0013\", \"narrative_order\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"temporal_anchor\": {\"label\": \"随后\", \"normalized_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"relative_direction\": \"after\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0012\"}, \"constraints\": [{\"relation\": \"same_time\", \"target_scene_id\": \"S0012\", \"confidence\": 0.45, \"reason\": \"dream_attached_to_frame\"}], \"evidence\": [{\"kind\": \"forward\", \"field\": \"text\", \"text\": \"随后\", \"snippet\": \"个墨色竹林中，突然蒸腾起黑紫色的瘴气，再随后烟云聚拢，狂风大作，平地里刮起了一阵龙卷\"}, {\"kind\": \"dream\", \"field\": \"summary\", \"text\": \"幻象\", \"snippet\": \"头看见双月异象，竹林骤起风暴。 李凡经历幻象风暴后，抽奖完成获得小剑，系统提示心情值\"}, {\"kind\": \"dream\", \"field\": \"key_beat_4\", \"text\": \"幻象\", \"snippet\": \"幻象风暴消散\"}]}\n\nENTITY CONTEXT:\n{\"registry_entities\": [{\"entity_uid\": \"E000001\", \"canonical_name\": \"老道\", \"aliases\": [\"老道士\", \"秦剑师\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000001\"}, {\"entity_uid\": \"E000002\", \"canonical_name\": \"李凡\", \"aliases\": [\"穿越者\", \"小童\", \"小友\", \"小相公\"], \"type\": \"人物\", \"subtype\": \"\", \"voice_card_id\": \"VO000002\"}, {\"entity_uid\": \"E000018\", \"canonical_name\": \"墨色竹林\", \"aliases\": [], \"type\": \"地点\", \"subtype\": \"山岳/洞天\", \"voice_card_id\": \"\"}], \"kg_entities\": [{\"entity_id\": \"E000018\", \"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\"}, {\"entity_id\": \"E000001\", \"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\": {}}], \"mention_count\": 5, \"observation_count\": 5, \"first_seen\": \"C0001\", \"last_seen\": \"C0005\"}, {\"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\": \"S0013\", \"scene_notes\": \"李凡研究系统，天色变黑，老道警告不要抬头，李凡抬头看见双月异象，竹林骤起风暴。 李凡经历幻象风暴后，抽奖完成获得小剑，系统提示心情值持续下降。；重要性：主线；呈现：文字卡片 / 旁白+画面 / 对白驱动 / 氛围镜头；时间模式：dream；时间顺序：叙事13->故事12；时间锚点：随后\", \"audio_notes\": \"保留对白节奏；环境音先行；动作点补音效；梦境段强调朦胧氛围\", \"narrator_profile_id\": \"narrator_dream_cn\", \"chronology\": {\"scene_id\": \"S0013\", \"narrative_order\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"temporal_anchor\": {\"label\": \"随后\", \"normalized_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"relative_direction\": \"after\", \"amount\": null, \"unit\": \"\", \"time_of_day\": \"\", \"explicit\": true, \"anchor_scene_id\": \"S0012\"}, \"constraints\": [{\"relation\": \"same_time\", \"target_scene_id\": \"S0012\", \"confidence\": 0.45, \"reason\": \"dream_attached_to_frame\"}], \"evidence\": [{\"kind\": \"forward\", \"field\": \"text\", \"text\": \"随后\", \"snippet\": \"个墨色竹林中，突然蒸腾起黑紫色的瘴气，再随后烟云聚拢，狂风大作，平地里刮起了一阵龙卷\"}, {\"kind\": \"dream\", \"field\": \"summary\", \"text\": \"幻象\", \"snippet\": \"头看见双月异象，竹林骤起风暴。 李凡经历幻象风暴后，抽奖完成获得小剑，系统提示心情值\"}, {\"kind\": \"dream\", \"field\": \"key_beat_4\", \"text\": \"幻象\", \"snippet\": \"幻象风暴消散\"}]}, \"shots\": [{\"shot_id\": \"S0013_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\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_dream_cn\", \"narration_delivery_hint\": \"带梦境感\"}, {\"shot_id\": \"S0013_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\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_dream_cn\"}, {\"shot_id\": \"S0013_SH03\", \"camera\": \"正反打\", \"description\": \"对白推进核心信息\", \"actions\": [\"老道警告虚月当空\", \"李凡抬头见双月异象\"], \"dialogue\": [{\"speaker\": \"老道\", \"speaker_entity_uid\": \"\", \"delivery_hint\": \"情绪更强\", \"line\": \"哈！虚月当空！\"}, {\"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\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_dream_cn\"}, {\"shot_id\": \"S0013_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\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 3}}, \"narrator_profile_id\": \"narrator_dream_cn\"}], \"candidate_meta\": {\"scene_id\": \"S0013\", \"source_chunk_id\": \"C0002\", \"source_start_para\": 62, \"source_end_para\": 69, \"characters\": [\"老道\", \"李凡\"], \"locations\": [\"墨色竹林\", \"紫色天幕岩层\"], \"key_beats\": [\"李凡分析系统机制\", \"老道警告虚月当空\", \"李凡抬头见双月异象\", \"幻象风暴消散\"], \"shot_count_hint\": 4, \"scene_summary\": \"李凡研究系统，天色变黑，老道警告不要抬头，李凡抬头看见双月异象，竹林骤起风暴。 李凡经历幻象风暴后，抽奖完成获得小剑，系统提示心情值持续下降。\", \"scene_text_preview\": \"李凡吃力得揉着太阳穴，摊上这么个坑爹系统可真尼玛累啊…… 总之目前看来，这系统的点数，是基于李凡的心理状态增减的，每一次心理波动，都会给抽奖充能，从进度进程看…\", \"chronology_summary\": {\"narrative_order\": 13, \"story_chronology_order\": 12, \"story_chronology_group\": \"CG0012\", \"time_mode\": \"dream\", \"confidence\": 0.99, \"order_delta\": -1, \"anchor_label\": \"随后\", \"anchor_type\": \"forward_marker\", \"constraint_count\": 1, \"evidence_count\": 3}}}"
    }
  ]
}