本文所有 prompt 摘录 直接从生产 PostgreSQL 拉取——不是 repo seed。 发现 3 处关键 drift:(a) 生产比 repo 多 2 个阶段(intake-dialogue / source-intake)· (b) 27/27 prompt 三段全部改过,其中 15 段变化 > 100 字符 · (c) 生产已是 本地 V36 · 商业包装设计质量升级,repo 只到 V24。
从 prompt_versions 表拉取。每次生产切换都是运维手工跑 DbSql/set_prompt_version_v??_current_*.sql —— 后台管理页只做只读比对,不能编辑发布(P1 债)。
逐段对比 backend/app/bootstrap/packaging_stage_prompts.py vs 生产 prompt_definitions。 没有一段是相同的 —— 说明 V25~V36 之间生产做了 12 次迭代,repo seed 完全没跟上。 这也是为什么"看 repo 就以为了解现在的 prompt"是不对的 —— 要看生产。
重构 pivot 时,基线必须是生产 DB 的 V36,不是 repo seed。同时应当: ① 把 packaging_stage_prompts.py 从 python 常量迁到 YAML/MD 文件,让每次 prompt 版本变更都能 diff review; ② 加一条 CI check repo seed 跟 prod DB 定期对齐,防止 drift 累积; ③ agent 化后每个 sub-agent 的 prompt 都进 DB 版本化,repo 只留骨架而不留内容。
新版依赖图加上了 intake-dialogue(顾问对话)—— 它发生在 用户点确认之前,是 workflow_run 的前置节点。产出 confirmation_json 后触发 S1 装配,才进入 10 阶段流水线。
graph LR
S0["Stage 00
intake-dialogue
顾问对话
抽取 confirmation"]
S1["Stage 01
source-intake
装配基线"]
S2["Stage 02
packaging-intelligence
竞品+品类情报"]
S3["Stage 03
brand-strategy
定位+目标用户"]
S4["Stage 04
copy-compliance
frontCopy 白名单"]
S5["Stage 05
creative-exploration
12-18 概念池
fan-out"]
S6["Stage 06
director-selection
选 6 方向
合同签署点"]
S7["Stage 07
designer-directions
6 方向执行 brief"]
S8["Stage 08
image-brief
调图片模型"]
S9["Stage 09
difference-review
仅 upgrade"]
S10["Stage 10
report-presentation
装配 + 改稿"]
S0 ==confirmation_json==> S1
S1 ==confirmation==> S2
S1 ==confirmation==> S3
S1 ==confirmation==> S4
S1 ==assets==> S8
S1 -.kind==upgrade?.-> S9
S2 ==references==> S3
S3 ==brandPositioning==> S4
S4 ==frontCopy==> S5
S4 ==frontCopy==> S7
S4 ==complianceChecklist==> S10
S5 ==territories==> S6
S6 ==selectedDirections==> S7
S6 -.6 方向 title.-> S10
S7 ==imagePrompt+visualText==> S8
S7 ==visualText/craftNotes.==> S10
S7 -.directions.-> S9
S8 ==imageUrl 主推==> S10
S8 -.imageUrl included/paid.-> S10
S9 -.differences.-> S10
classDef intake fill:#cfd9e0,stroke:#4a6b7c,stroke-width:2px
classDef fanOut fill:#fff3e0,stroke:#e67e22,stroke-width:2px
classDef fanIn fill:#e8f5e9,stroke:#27ae60,stroke-width:2px
classDef skip fill:#eee,stroke:#999,stroke-dasharray:5 5
class S0 intake
class S5 fanOut
class S6 fanIn
class S9 skip
每张卡:阶段编号 + stage_code + 一句话智力活 + system / developer / user 三段 prompt 摘录(取前若干行避免爆版) + drift 标签。 system 段是完整原文,developer 段取前 ~35 行 / 2000 字符,user template 段取前 ~20 行 / 800 字符。
跟上版比,新增/修订部分:(a) 补上 intake-dialogue 作为独立 agent · (b) V36 里 director-selection 加了 100 分制评分 · (c) copy-compliance 合规规则更厚。
它发生在 workflow 触发前 —— 用户在 chat 里跟 AI 顾问对话时,每一轮 turn 都调这个 prompt(5438 字 dev,全项目第 2 长)。职责:提取 confirmation 字段 / 判断缺哪个 / 生成下一句 / 决定是否弹确认卡。
Agent 化建议:这是天然的 intake-agent —— 独立可测、独立 repair、独立版本化。别再当"确认卡渲染前的一个 chat 阶段",要当独立 sub-system 设计。
V36 起硬编码 5 维评分:商业转化 25 / 视觉资产 25 / 品类渠道 20 / 可制造 15 / 跨语言 15。加 7 条主推硬规则禁"大字口号+普通背景 / 默认黑体 / 通用高级感"当推荐方向。
Agent 化建议:这套评分可以抽成 design-quality-scorer tool,让 director-agent 显式调用打分而不是在脑子里判断 —— 分数可存 stage_artifacts 供回溯。
V36 里 director-selection 和 designer-directions 的 developer 段开头都写了 合同版本:direction-contract-v3-design-quality。这是 prompt 自我标注版本,方便下游 log/debug 追溯。
Agent 化建议:不要把 contract version 塞在 prompt 字符串里 —— agent 化后应该作为 tool signature 的一部分,agent 调用时明确"用哪个版本合同"。
V36 里 designer-directions 的 dev prompt 反而缩了 466 字(2636→2170),但依然是一次 LLM 调用产出 6 份 —— 说明设计上仍保留"6 份一致性"的隐式合同。
Agent 化建议:拆 6 sub-agent 并行,把"一致性"从 prompt 约束升级成 shared brief object + post-processing merger。
V24→V36 里 image-brief 的 user template 从 960 字缩到 253 字,说明生产已经把 "对图片模型的详细指令" 从 user 段搬到 运行时套壳的硬编码合同(_proposal_board_image_prompt)里。
Agent 化建议:正好验证了 image-contract agent 拆分方向 —— 硬编码合同层已经成型,只是没做成独立 agent。
V36 里 copy-compliance 的 developer 段从 1631→2096,加厚了品类风险模板(食品/宠物/美妆/酒类/营养补充等各自的高风险表达清单)。
Agent 化建议:品类风险规则本质是规则表,不是 prompt。抽出 compliance-router tool 从"prompt 里一大堆 if"变成"结构化 rules DB",按品类查表返回该品类的合规约束 —— 比 prompt 里的 case-when 更可维护、更可测。
整个工作流最长 prompt · V24→V36 涨 447 字。里面 9 个必备 section id + 4 张表 columns 中文硬字符串 + 主推方案短结构模板全在这里。
Agent 化建议:把 section 结构和 table columns 下推到 report-template registry(YAML)· 让 report-assembly agent 只专注"填内容",不管"结构长啥样"。
27/27 段全都变了 —— 说明没人再更新 packaging_stage_prompts.py,生产改动都直接落 DbSql/ 手工 SQL。
Agent 化建议:迁到 YAML/MD 文件 + Alembic-style 迁移脚本,让 prompt 变更走 PR review · CI 加对比检查 · repo 版本 = 生产版本。别再"生产是黑盒"这样搞。
现在是 V36 商业包装设计质量升级 · 添加了评分体系 / 合同版本标记 / 更厚合规规则。
Agent 化不是从 V24 起步,是从 V36 起步 —— 至少要包含:
intake-agent(顾问) ·
intelligence-agent(情报) ·
strategy-agent(策略) ·
compliance-router(rule tool 不是 agent) ·
creative-agent(发散) ·
director-agent(收敛,内嵌 quality-scorer tool) ·
designer-agent × 6(fan-out) ·
image-contract-agent(套壳合同) ·
image-generator × 6(并行) ·
difference-agent(可跳过) ·
report-assembler(装配) ·
orchestrator 编排 DAG。
Prompt 迁到 YAML · 硬编码约束抽 tool · 每 agent 自带 repair loop · orchestrator 用 conditional edge 取代硬 if。