AI agent 不是只选一个 theme,它是在写一张体验配方。
配方里每一层职责不同:theme 决定长相,placement 决定位置,trigger 决定时机,traffic/UTM 决定人群和来源条件。最后 SDK 在浏览器里拿当前 URL、referrer、visit state 去判断该展示哪一个 experience。
每个能力都要能回答:看哪个 demo、进哪个 Admin、跑哪个 smoke。
这张表是给 operator 和 AI agent 的导航层。先用它定位功能,再进入对应 tab 或 Admin surface;不要把 trigger、traffic 和 connector pipeline 混在一起验。
pnpm smoke:public-submit-browserpnpm smoke:demo-foundationpnpm smoke:branch-conditionpnpm smoke:contact-show-ifpnpm audit:theme-placement-visualpnpm smoke:targeting-selectionpnpm smoke:demo-foundationruntime resolve evidencepnpm smoke:production-packpnpm smoke:admin-operator-surfaces一项能力一个入口:Tab、Demo、Admin、Verify、Evidence。
这里是 Demo Center 的目录层。要看效果先点 Demo,要改配置进正确 Admin,要验收就跑 Verify;证据文件记录最近一次通过的结果。
pnpm smoke:public-submit-browserpnpm smoke:demo-foundationEvidence: docs/discussions/wo-50-bottom-up-product-chain-current-pass-evidence.mdpnpm smoke:branch-conditionpnpm smoke:contact-show-ifEvidence: docs/discussions/wo-50-branch-condition-smoke.jsonpnpm audit:theme-placement-visualpnpm smoke:demo-foundationEvidence: docs/discussions/wo-50-theme-placement-visual-audit.jsonpnpm smoke:demo-foundationpnpm audit:foundation-visualEvidence: docs/discussions/wo-50-foundation-visual-audit.jsonpnpm smoke:trigger-interactionpnpm smoke:admin-workbench-draft-syncEvidence: docs/discussions/wo-51-admin-workbench-draft-sync-smoke-evidence.mdpnpm smoke:targeting-selectionpnpm smoke:admin-workbench-draft-syncEvidence: docs/discussions/wo-50-targeting-selection-smoke.jsonpnpm smoke:production-packpnpm smoke:admin-operator-surfacesEvidence: docs/discussions/wo-48y-production-pack-live-evidence.mdpnpm smoke:admin-form-authoringpnpm smoke:admin-workbench-draft-syncEvidence: docs/discussions/wo-51-admin-workbench-draft-sync-smoke-evidence.md先证明普通表格能展示、校验、提交、返回结果,并触发基础邮件/结果页。
steps + identity + routes
决定不同答案最后落到哪个 result tier 和 route;这是 connector 之前的基础分岔层。
flow.branch_rules
决定视觉语言。同一个 schema 换 token 后,按钮、选项、边框、节奏应该一起变化。
presentation.theme_pack
决定表单出现在哪个表面:页面内、弹窗、侧滑、顶部/底部条或浮动按钮。
placements[].mode
决定什么时候打开 placement。它是时间点,不是流量来源。
placements[].trigger
决定谁符合展示条件,同时作为 hidden field 进入提交上下文。
targeting + hidden_fields
决定提交后跑哪些第三方读取、计算、写入、等待和报告生成步骤。
pipeline.pipeline_id
每个能力必须能说明用途、schema 位置、可见 demo 和发版检查项。
docs/DEMO-QA-RUNBOOK.md
Agent 最终写出的核心结构
这不是“一个按钮弹一个表单”那么简单,而是 experience schema 里的组合关系。
这层解决什么
QA 快速检查
- 切换 tab 后 URL 带 `?tab=`,刷新仍能回到对应 tab。
- 所有 iframe 都使用 same-origin demo,除最终报告证明外不打生产提交。
- 页面能解释 UTM 是 targeting/context,不是 trigger。
用人话讲:基础表单是地基,branch 是表单内分岔,theme/placement/trigger/traffic 决定用户看到什么,connector pipeline 才是提交后的业务流程。
最基础的能力:表单能填、能提交、能返回结果、能发邮件。
这一层不谈 AI,也不谈 connector。先证明普通用户看到的表格是稳定的:字段渲染正确、校验可用、提交路径清楚,contact / qualification / pipeline 三种提交结果不会互相混淆。
基础表单验收顺序
Basic form 在配方里的位置
验收
- Contact demo 一屏表单能提交,且只 start 一次 attempt。
- Qualification demo 能按答案显示对应结果 tier 和资源投递说明。
- Pipeline-backed Fengtalk 表单提交后进入报告生成,不被误当普通 qualification。
- 轻量 smoke 不真实发邮件;生产 provider receipt 由 heavier smoke pack 覆盖。
Branch 是表单内部的分岔,不是 connector 之后才发生的事。
AI agent 可以设置不同 condition:用户答案、分数、hidden field、traffic context 都能决定下一步、结果 tier 或 route。运行时按确定性规则判断,不临时让 AI 猜。
Branch / condition 验收顺序
Branch 在配方里的位置
验收
- High / low / fallback 三条路径都能显示对应结果和 route id。
- Contact `show_if` 能根据答案显示/隐藏相关字段。
- 裸 answer id 与 `answers.` 两种写法都可命中。
- 没有命中的 branch rule 会退回 score threshold,不会随机走。
用人话讲:Branch 先解决“这个用户在表单里该走哪条路”。Connector pipeline 后面的 branch 解决“第三方/报告结果回来后该做什么”。这两层不能混成一个概念。
Theme 是 token,不应该是硬编码皮肤。
同一个表单 schema 换 theme token,表单的材质、按钮、选项、边框、节奏应该整体变化;placement 变了,设计语言也应该保持一致。
推荐保留的主题
Theme 在配方里的位置
验收
- 每个主题都有独立页面,可切换不同 placement。
- 同一主题在 embed、modal、sticky、slide、floating 里保持同一设计语言。
- 废弃主题不出现在推荐列表里。
Placement 只回答一个问题:表单出现在哪个表面。
同一个配方可以用 embed 做内容页内嵌,也可以用 modal 做 CTA,也可以用 sticky 或 slide 做轻提醒。它不决定“谁看”和“什么时候看”。
Placement demo 清单
Placement 在配方里的位置
验收
- 每个 placement 页面返回 200,并加载 same-origin `/sdk.js`。
- 对应展示形态可见,且不会在页面加载时全部一起炸开。
- 桌面和手机宽度无横向溢出。
Trigger 只回答:什么时候启动这个 placement。
点击、滚动、延迟、退出意图、URL match、GTM event、API call、revisit、inactivity 都应该能单独验收。agent 生成配方时,要把 trigger 写进对应 placement。
Trigger cases
Trigger 在配方里的位置
验收
- 每个 trigger case 都是 preview schema,不创建真实 lead。
- 点击、滚动、延迟、URL match、API call 能按预期触发。
- 退出意图、回访、冷却类逻辑要确认不会重复骚扰。
UTM 和 traffic source 是分流条件,也是提交后的上下文。
它们可以决定“Google CPC 进来的人看报价表,LinkedIn 进来的人看白皮书表单”,也会作为 hidden field 进入提交记录和 pipeline。
当前 URL 解析结果
Traffic 在配方里的位置
验收
- Google CPC、LinkedIn paid、Email、Referral 示例能更新解析结果。
- click id 如 `gclid=demo`、`li_fat_id=demo` 被归类到正确 source_type。
- 说明文字明确 hidden fields 会进入提交和 pipeline。
上线实现里,traffic 判断进入 targeting/audience 层;表单提交时再把 attribution.utm_*、click id、referrer、landing page 写入 hidden fields,给 enrichment 和后续 connector 使用。
Connector pipeline 是提交后的真实业务流水线。
WO-35j 已证明:旧的 Fengtalk HS code + 公司背景调查表单,可以从 authoring template 创建成新表单,并通过 `trade_enrichment` connector pipeline 跑到报告页和邮件审计。
已验收的执行链路
Agent/Admin 不需要重写旧硬编码表单。它应该从 `tpl_fengtalk_trade_enrichment` 开始,先看 readiness,再创建 draft,发布后由 Workflow 执行 connectors。
Connectors 在配方里的位置
验收
- template readiness 是 runtime ready,缺配置为 0。
- public submit 启动 Workflow-backed enrichment job。
- 报告页服务最终 HTML,邮件 outcome guard 写入 D1。
- 临时 smoke copy 归档且 unpublished。
编排关系:不是排一串 API,而是确定哪些能并跑、哪些要 fallback、哪些要分岔
- Agent 先用 `smartform_list_connectors` 看 `required_inputs`、`branch_fields`、`side_effects` 和 `default_dry_run`。
- API 会用 `pipeline_orchestration_not_safe` 拦住 parallel/race 里的非 dry-run WRITE。
- 数学和格式转换用 `formula_compute` / `field_transform`;AI 只放进分类、抽取、评分或报告类 TRANSFORM。
Async WAIT:付款和预约不能从 WRITE 直接放行
Stripe 和 Cal.com 这类第三方结果不是马上返回。正确链路是 WRITE 发起动作,WAIT 暂停 Cloudflare Workflow,provider webhook 带 `job_id` 唤醒,然后 branch 决定后续。
- 已通过生产 simulated/signed smoke:Stripe paid branch、Cal booked branch、Cal native signature、Cal metadata routing、Cal true provider booking + cleanup、Cloudflare Browser screenshot R2 ref、Firecrawl fallback。
- 后续真实验收看 `docs/discussions/wo-44-wait-webhook-continuation-evidence.md`,不是看 checkout 或 booking 创建是否成功。
- 所有 follow-up email/CRM/write 动作保持 `config.dry_run: true`,直到 operator 明确批准真实副作用。
Admin UI 现有 Forms 页已经展示 `Fengtalk draft` 和 connector readiness/setup actions。本轮没有改 admin repo,因为那里有既有未提交工作,避免混入无关 diff。
Mobile uses a direct report link instead of an embedded report iframe, so the demo page stays readable while preserving the same production evidence.
Open final report