# 智能预约助手 M0 执行队列
> 日期:2026-08-02
> 状态:**Batch 2 session orchestration completed / Batch 3 ready**
> RC Included:`No`
> 当前优先级说明:不抢占 `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 | Done | Batch 0 冻结资产 |
| 实现智能预约会话与只读预约编排 | Backend Core | Done | 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 | `Done — 2026-08-02` |
| 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 stub;30 条文字 fixture;无效 JSON/schema 降级;未配置密钥时应用正常启动 |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | [`petstore-backend@77c6d69`](https://git.s-good.com/petstore/petstore-backend/commit/77c6d69) |
| Blocker Owner | `None`(真实 provider smoke 不在本任务验收内) |
| Commit / RC | `77c6d69 / RC No` |
| 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。
完成证据:
- 已实现文字意图与语音转写 provider interface、阿里云适配器、默认关闭配置和本地 HTTP stub;
- 30 条文字 fixture 覆盖标准表达、相对时间、歧义、服务同义词、无效时间、修改和边界输入;
- 无效 JSON、schema 不匹配、超时、敏感输入与未配置密钥均 fail closed;
- `mvn test`:258 tests,0 failures,0 errors;测试未访问真实云 API。
## Task:实现智能预约会话与只读预约编排
| 字段 | 值 |
|---|---|
| Task Name | 实现智能预约会话与只读预约编排 |
| Role | `Backend Core` |
| Owner Agent | `Backend Core` |
| Paired QA | `Core Flow QA` |
| Workstream | `Core Booking Flow` |
| Track | `Coding` |
| Status | `Done — 2026-08-02` |
| 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 | 五个 endpoint;customer 归属;六态状态机;draftVersion;30 分钟 TTL/24 小时清理;只读宠物/服务/容量;三个低敏事件;不存在 `/confirm` |
| RC Included | `No` |
| Due Date | `TBD` |
| Output Link | [`petstore-backend@3c00065`](https://git.s-good.com/petstore/petstore-backend/commit/3c00065) |
| Blocker Owner | `None` |
| Commit / RC | `3c00065 / RC No` |
| Architecture Review Required | `Yes — completed by M0 ADR` |
| Data Model Review Required | `Yes — implementation diff completed; frozen schema unchanged` |
| Access / Privacy Review Required | `Yes — development boundary completed` |
额外门禁:
- `storeId` 创建时必填,后续只从 session 读取;
- session 必须用 `sessionId + current.userId` 查询;
- 整套测试验证不调用 `AppointmentService.createBooking` / `AppointmentMapper.save`;
- 迁移包含索引、状态验证和 TTL 清理验证查询;
- 实现时同步把对应本体证据从 `documented` 更新为 `anchored`。
完成证据:
- 五个冻结 endpoint 已注册,全部要求 customer;session 使用 `sessionId + current.userId` 带锁查询;
- 六态、`draftVersion`、固定 30 分钟 TTL、每小时过期和 24 小时物理清理已实现;
- Pet、ServiceType、日期时间和号源均由后端在 owner/store 范围重新解析,容量查询复用现有只读模型;
- 音频按 3 MB、文件头、MIME 和 60 秒权威复核,转写不自动提交消息;
- 三个低敏 BusinessEvent 已实现,`draft_json` 不含原文、查询词、音频或模型响应;
- `mvn test`:292 tests,0 failures,0 errors;无 `/confirm`,契约测试禁止 `AppointmentMapper.save`。
## 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 Key;20 条已授权语音;隐私告知;实现任务完成 |
| 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。