# Codex优化建议:课程规则接入现有系统 V1 > 基于你提供的 CURRENT_ARCHITECTURE.md 与课程拆解。结论:不建议大改架构,重点做 Prompt Builder V2、规则库接入、角色一致性测试台、队列化补强。 ## 1. 当前架构判断 现有系统已经具备生产系统骨架: - Story Bible ✅ - Character Library ✅ - ActorProfile ✅ - ActorLock ✅ - Prompt Builder V1 ✅ - AI Router ✅ - Provider 抽象 ✅ - FFmpeg ✅ - QA/重试 ✅ - 成本日志 ✅ - LipSync 占位 ✅ 因此课程内容不应导致重构,而应转成规则和模板进入现有模块。 --- ## 2. 优先开发 P0 ### P0-1 Prompt Builder V2 目标:把课程里的提示词结构拆成可配置模板。 建议新增或强化表: ```text prompt_templates prompt_template_sections negative_prompt_templates scene_templates camera_templates sound_cue_templates ``` Prompt Builder 输入应包含: ```json { "scene_type": "rich_arrival", "shot_role": "premium_moment", "emotion_score": 8, "importance_score": 9, "action_score": 3, "provider_code": "minimax_hailuo_23_fast", "characters": [], "location": "rainy city street", "main_action": "butler steps out of Rolls-Royce" } ``` 输出: ```json { "prompt": "...", "negative_prompt": "...", "template_ids": [], "rules_applied": [] } ``` ### P0-2 Scene Type 标准化 需要统一 scene_type 枚举: ```text engagement_breakup humiliation lonely_exit rich_arrival identity_reveal asset_reveal_insert regret_reaction regret_return power_exit bank_balance_reveal boardroom_face_slap ceo_entrance dimensional_break_laptop dharma_giant_form ``` ### P0-3 Camera Engine 把 emotion/importance/action 转换为 camera shot 和 movement: ```text emotion > 8 -> close_up / slow_push_in importance > 7 -> premium / low_angle_or_close_up action > 5 -> split_action_beats or premium provider ``` --- ## 3. 优先开发 P1 ### P1-1 Character Consistency Test Bench 新增角色测试入口,不依赖剧情: ```text 生成同一角色 5 个动作镜头: 1. walk forward 2. sit down 3. turn head 4. phone call 5. enter car ``` 质检维度: ```text face consistency hair consistency outfit consistency body consistency action completion ``` 只有通过一致性测试的角色,才建议进入正式短剧项目。 ### P1-2 Asset Library 运营化 课程强调道具/场景/神兽设计。对你先做都市短剧,应优先沉淀: ```text 豪车 酒店 宴会厅 咖啡厅 银行VIP室 集团办公室 会议室 黑金卡 股权文件 合同 ``` ### P1-3 Prompt模板绑定 Provider Profile Hailuo、Kling、Seedance 应有不同 Prompt Profile。 Hailuo: ```text 短动作 单镜头 单主要动作 避免复杂表演 ``` Kling: ```text 高价值动作 强运镜 高潮镜头 ``` Seedance/Vidu: ```text 视觉冲击 特效 次元壁 ``` --- ## 4. 优先开发 P2 ### P2-1 Worker 队列化 CURRENT_ARCHITECTURE 中已经指出重任务仍有同步执行。建议优先迁移: ```text video_clip_generation clip_quality_check clip_retry ffmpeg_episode_render post_production_mix ``` 每个任务必须支持: ```text pause resume retry cancel cost_freeze cost_release ``` ### P2-2 ROI回流 把 ProviderLog 与平台播放数据结合: ```text shot_type -> cost -> success_rate -> play_data -> ROI ``` 未来 Router 不只按质量路由,还按 ROI 路由。 --- ## 5. 不建议现在做 暂缓: - 全量 Lip Sync - 全量接入 Veo / Runway - 同时做中英多语言 - 古装/修仙/战争大场景 - 推倒重写 Provider 层 - 推倒重写数据库 --- ## 6. 给 Codex 的执行指令 ```text 请不要重构现有系统架构。 基于当前 LiveActionPromptBuilderService、AI Router、StoryboardShot、ActorProfile、Provider Profile 实现 Prompt Builder V2。 目标: 1. 增加 scene_type 标准模板; 2. 增加 camera_rules / emotion_rules / negative_prompt_templates; 3. 根据 scene_type + scores + provider_code 自动选择模板; 4. Prompt 输出必须记录 template_ids 和 rules_applied; 5. 不修改已有 API 兼容性; 6. 增加单元测试或最小测试用例; 7. 保留当前 Hailuo 流程,只增强 prompt 质量。 ``` --- ## 7. 第一条实测建议 项目: ```text 《被未婚妻退婚后,我成了首富》第1集 ``` 只测: ```text DeepSeek + Hailuo + Prompt Builder V2 + FFmpeg ``` 不要接: ```text Lip Sync Kling Veo 多语言 自动发布 ``` 目标: ```text 45-60秒 8-10个镜头 总成本 <=20元 角色一致性 >=80 成片可看懂 ```