petstore-docs/智能预约助手-M0执行队列-2026-08-02.md
2026-08-02 15:23:55 +08:00

182 lines
8.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 智能预约助手 M0 执行队列
> 日期2026-08-02<br>
> 状态:**Batch 0 contract frozen / coding not started**<br>
> RC Included`No`<br>
> 当前优先级说明:不抢占 `phase2-pilot-rc6` 真实门店基线问题;按独立 feature flag 开发
**冻结输入**
- [架构决策M0 契约与数据模型](./架构决策-智能预约助手M0契约与数据模型-2026-08-02.md)
- [`booking-intent-v1` JSON Schema](./contracts/booking-intent-v1.schema.json)
- [M0 OpenAPI 契约](./contracts/booking-agent-m0.openapi.yaml)
- [M0 编码任务 brief](./智能预约助手-M0编码任务brief-2026-08-02.md)
## 队列摘要
| Task Name | Owner Agent | Status | Depends On |
|---|---|---|---|
| 实现智能预约供应商适配与契约测试 | Backend Core | Ready | Batch 0 冻结资产 |
| 实现智能预约会话与只读预约编排 | Backend Core | Ready | Batch 0 冻结资产provider interface |
| 实现宠主一句话预约与草稿回填 | Customer Experience FE | Ready | OpenAPI可先用 mock |
| 验收智能预约 M0 草稿链路 | Core Flow QA | Ready | 可先写 fixture/smoke执行依赖前三项 |
| 完成真实供应商对照与生产隐私复核 | Backend Ops | Blocked | 云账号、密钥、授权语音和上线授权 |
## Task实现智能预约供应商适配与契约测试
| 字段 | 值 |
|---|---|
| Task Name | 实现智能预约供应商适配与契约测试 |
| Role | `Backend Core` |
| Owner Agent | `Backend Core` |
| Paired QA | `Core Flow QA` |
| Workstream | `Core Booking Flow` |
| Track | `Coding` |
| Status | `Ready` |
| Priority | `P0` |
| Repo/Path | `backend/src/main/java/com/petstore/bookingagent/provider`、对应 config/test |
| Service Lock | `backend:booking-agent-provider` |
| Depends On | M0 ADR、JSON Schema、供应商选型 |
| Acceptance | provider interface + 本地 HTTP stub30 条文字 fixture无效 JSON/schema 降级;未配置密钥时应用正常启动 |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | `TBD — implementation commit` |
| Blocker Owner | `None`(真实 provider smoke 不在本任务验收内) |
| Commit / RC | `Not Frozen` |
| Architecture Review Required | `Yes — completed by M0 ADR` |
| Data Model Review Required | `No` |
| Access / Privacy Review Required | `Yes — development boundary completed; live smoke pending` |
额外门禁:
- 使用 JDK `HttpClient` 和可注入 timeout
- 测试不得访问公网;
- prompt、原文、Authorization、API Key 和模型原始响应不进日志;
- `booking-intent-v1` 未通过完整校验时不返回部分 patch。
## Task实现智能预约会话与只读预约编排
| 字段 | 值 |
|---|---|
| Task Name | 实现智能预约会话与只读预约编排 |
| Role | `Backend Core` |
| Owner Agent | `Backend Core` |
| Paired QA | `Core Flow QA` |
| Workstream | `Core Booking Flow` |
| Track | `Coding` |
| Status | `Ready` |
| Priority | `P0` |
| Repo/Path | `backend/src/main/java/com/petstore/bookingagent`、`backend/db/migrations/20260802_create_booking_agent_session.sql` |
| Service Lock | `backend:booking-agent-session+appointment-read-tools` |
| Depends On | M0 ADR、OpenAPI、provider interface |
| Acceptance | 五个 endpointcustomer 归属六态状态机draftVersion30 分钟 TTL/24 小时清理;只读宠物/服务/容量;三个低敏事件;不存在 `/confirm` |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | `TBD — implementation commit` |
| Blocker Owner | `None` |
| Commit / RC | `Not Frozen` |
| Architecture Review Required | `Yes — completed by M0 ADR` |
| Data Model Review Required | `Yes — proposal completed; implementation diff requires Data Model review` |
| Access / Privacy Review Required | `Yes — development boundary completed` |
额外门禁:
- `storeId` 创建时必填,后续只从 session 读取;
- session 必须用 `sessionId + current.userId` 查询;
- 整套测试验证不调用 `AppointmentService.createBooking` / `AppointmentMapper.save`
- 迁移包含索引、状态验证和 TTL 清理验证查询;
- 实现时同步把对应本体证据从 `documented` 更新为 `anchored`
## Task实现宠主一句话预约与草稿回填
| 字段 | 值 |
|---|---|
| Task Name | 实现宠主一句话预约与草稿回填 |
| Role | `Customer Experience Frontend` |
| Owner Agent | `Customer Experience FE` |
| Paired QA | `Core Flow QA` |
| Workstream | `Core Booking Flow` |
| Track | `Coding` |
| Status | `Ready` |
| Priority | `P0` |
| Repo/Path | `frontend/src/pages/appointment`、`frontend/src/api/index.js`、`frontend/src/utils/bookingAgentDraft.js`、`frontend/src/pages.json` |
| Service Lock | `frontend:customer-booking-agent+shared-api` |
| Depends On | M0 OpenAPI后端未完成前允许契约 mock |
| Acceptance | 先选门店customer 入口;文字链路;按住说话与隐私告知;转写可编辑;选择芯片;草稿卡;一次性回填;失败不影响普通表单 |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | `TBD — implementation commit` |
| Blocker Owner | `None`(真机录音最终验收依赖测试设备) |
| Commit / RC | `Not Frozen` |
| Architecture Review Required | `Yes — completed by M0 ADR` |
| Data Model Review Required | `No` |
| Access / Privacy Review Required | `Yes — 语音首次告知与权限拒绝降级必须 review` |
额外门禁:
- 未选门店时先使用现有门店控件,不创建 agent session
- 转写不得自动调用 messages
- 对话消息不写 Storage一次性 handoff 草稿消费后删除;
- `frontend/src/api/index.js` 写入前通知 Backend Core 并持有 `shared-api` 锁;
- H5 不具备录音能力时只隐藏语音按钮,文字主链路仍可用。
## Task验收智能预约 M0 草稿链路
| 字段 | 值 |
|---|---|
| Task Name | 验收智能预约 M0 草稿链路 |
| Role | `Core Flow QA` |
| Owner Agent | `Core Flow QA` |
| Paired QA | `Backend Core` + `Customer Experience FE` |
| Workstream | `Core Booking Flow` |
| Track | `QA` |
| Status | `Ready` |
| Priority | `P0` |
| Repo/Path | `docs/qa-reports`、必要 smoke 脚本;不改业务代码 |
| Service Lock | `docs:qa-booking-agent-m0` |
| Depends On | 立即可写 fixture/smoke执行依赖三个实现任务 |
| Acceptance | 权限/跨 customer状态与版本时间解析真实号源语音限制日志脱敏无写路径普通预约回归H5/mp-weixin 构建 |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | `TBD — QA report` |
| Blocker Owner | `None` |
| Commit / RC | `Not Frozen` |
| Architecture Review Required | `No` |
| Data Model Review Required | `No` |
| Access / Privacy Review Required | `Yes — 验收日志与语音告知` |
QA 必须提供反证:
- 后端没有 `/api/booking-agent/sessions/{sessionId}/confirm`
- M0 测试执行期间没有 `AppointmentMapper.save`
- 他人/不存在 session 返回同一 `SESSION_NOT_FOUND`
- provider 超时、无效 JSON、ASR 失败均能回到普通预约;
- 原始语音、当轮原文、模型响应和密钥不出现在库、日志、截图或 fixture。
## Task完成真实供应商对照与生产隐私复核
| 字段 | 值 |
|---|---|
| Task Name | 完成真实供应商对照与生产隐私复核 |
| Role | `Backend Ops` |
| Owner Agent | `Backend Ops` |
| Paired QA | `Core Flow QA` |
| Workstream | `Release` |
| Track | `Review` |
| Status | `Blocked` |
| Priority | `P1` |
| Repo/Path | 本地密钥存储、低敏 smoke 证据、`docs/qa-reports`;不改业务逻辑 |
| Service Lock | `ops:booking-agent-provider-smoke` |
| Depends On | 阿里云北京 Workspace/API Key20 条已授权语音;隐私告知;实现任务完成 |
| Acceptance | 30 条文字/20 条语音门槛;腾讯 ASR 对照p50/p95费用告警日志审计默认 flag 关闭 |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | `TBD — provider evaluation report` |
| Blocker Owner | `Product Owner / Access & Privacy / Cloud Account Owner` |
| Commit / RC | `Not Frozen` |
| Architecture Review Required | `Yes — supplier result may change baseline` |
| Data Model Review Required | `No` |
| Access / Privacy Review Required | `Yes — pending` |
阻塞条件不会阻塞前三项本地开发。真实 Workspace ID 和 API Key 只从密钥存储读取,不进入任务评论或 Git。