Skip to content

Commit 81a83a5

Browse files
committed
docs(v0.13.6): 规格自查修订——细目通道/新命令/矩阵表述
1 parent fc6d7ef commit 81a83a5

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

‎docs/superpowers/specs/2026-08-23-v0.13.6-video-profile-classification-refinement-design.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
新 video_profile_platform_map.rs——全部纯逻辑无 IO,golden 单测)
1515
业务层:ProfileMemory 扩展(coarse+细目记忆)、检测链装配(detect_video_profile /
1616
detect_video_domain 纯函数升级)
17-
系统层:preheat_domain_hotwords 接线(候选=粗∪细目种子);命令签名不变(零新命令)
17+
系统层:preheat_domain_hotwords 接线(候选=粗∪细目种子);新增 1 命令
18+
remember_video_profile_domain(镜像 remember_video_profile_form)+ update_live_profile
19+
增可选参数 fine——既有命令签名不变(向后兼容)
1820
UI 层:ProfileDetector/ LiveProfileStrip(形态 10 下拉 + 领域 20 下拉 + 细目多选 chips)、
1921
KnowledgeSystemWizard/KnowledgeTreeView(契约修复)、NotesPage/NoteEditView(即时刷新)
2022
```
@@ -49,7 +51,7 @@ UI 层:ProfileDetector/ LiveProfileStrip(形态 10 下拉 + 领域 20 下拉
4951
- `NotesPage`:新增统一「编辑退出刷新」回调——`get_note(id)` → `setSelected(fresh)` + `void load(...)`(复用 `handleNoteChanged` 语义,见 NotesPage.tsx:207);三出口(完成按钮 / Ctrl+E / ESC)全部走该回调。
5052
- 时序:`handleDone` await 了保存 → `get_note` 读到新数据,无竞态;ESC 路径保存由卸载自动保存兜底(dirty 快照,NoteEditView.tsx:227),刷新回调异步 `get_note`——与卸载保存并发时有极小窗口,接受(下一次交互即回正;不引入额外等待)。
5153
- 切笔记(`handleSelect`)卸载保存路径不变(防串写,NotesPage.tsx:238)。
52-
- **验收**:编辑标题 → 完成 → 右栏标题/正文立即更新 + 列表行更新;ESC 退出后列表刷新;viest 新用例(invoke 顺序断言:update_note → get_note)。
54+
- **验收**:编辑标题 → 完成 → 右栏标题/正文立即更新 + 列表行更新;ESC 退出后列表刷新;vitest 新用例(invoke 顺序断言:update_note → get_note)。
5355

5456
## 三、M2 形态展平 7 → 10
5557

@@ -78,7 +80,7 @@ UI 层:ProfileDetector/ LiveProfileStrip(形态 10 下拉 + 领域 20 下拉
7880
旧类映射回归对应新形态(替代现"会议→对话、直播→音频"的折叠):
7981

8082
- `Meeting` → `Some(ContentForm::Meeting)`(default_tier 保持 Low)
81-
- `Live` → `Some(ContentForm::Live)`(default_tier Low→**None 改 Low**:新形态语义为"浅画面",OCR 待命;tier 重评可升)
83+
- `Live` → `Some(ContentForm::Live)`(旧 `ProfileKind::Live` 的 default_tier 由 None 改 Low——新形态语义为"浅画面",OCR 待命;tier 重评可升)
8284
- 其余不动(Whiteboard→Lecture、FollowAlong/GameTutorial→HandsOn、TalkingHead→Explainer、Podcast→Audio)
8385

8486
### 3.4 前端
@@ -139,8 +141,9 @@ UI 层:ProfileDetector/ LiveProfileStrip(形态 10 下拉 + 领域 20 下拉
139141
### 4.3 UI(`ProfileDetector.tsx` / `LiveProfileStrip.tsx`)
140142

141143
- `DOMAIN_OPTIONS` 15→20 项;领域区改为两级:粗领域下拉 + **细目多选 chips**(检测预选;用户可改;至少选 1 时生效,0 个=仅粗领域)
142-
- 修改即记忆(见 §5.4):确认时把 (coarse, 细目多选) 写入记忆;`changeDomain` 载荷 `{ kind, fine_ids: [...] }`
143-
- hotwords:领域确认/检测命中时预热候选 = `粗种子 ∪ 已选细目种子`(`preheat_domain_hotwords` 扩展签名或新内部通道,命令对外签名不变——新增可选参数 `fine`,缺省向后兼容)
144+
- **确认通道扩展**:采集态 `update_live_profile` 增可选参数 `fine: Option<Vec<String>>`(细目 kebab id 数组;None=不覆写,向后兼容)——热切换时 coarse+细目一起写入 profile_override;检测卡(采集前)确认走父层 profile 传递,同载荷
145+
- 修改即记忆(见 §5.4):确认时把 (coarse, 细目多选) 写入记忆——新增命令 `remember_video_profile_domain(title, coarse, fine)`(镜像 `remember_video_profile_form`;title=记忆键,粗+细目一次写入)
146+
- hotwords:领域确认/检测命中时预热候选 = `粗种子 ∪ 已选细目种子`(`preheat_domain_hotwords` 增可选参数 `fine`,缺省 None 向后兼容)
144147

145148
## 五、M4 检测链升级
146149

@@ -200,7 +203,8 @@ UI 层:ProfileDetector/ LiveProfileStrip(形态 10 下拉 + 领域 20 下拉
200203

201204
- `MemoryEntry` 增 `domain: Option<DomainTag>` 字段(`#[serde(default)]`——旧 JSON 零迁移)
202205
- 新 API:`remember_domain(keyword, &DomainTag)`(series 键剥离逻辑与 remember_form 同口径);`lookup_domain(title)` 最长关键词优先(同 lookup_form 模式)
203-
- 接线:检测卡"修改即记忆"(领域/细目确认)写入;`detect_video_profile` 领域结果 = 映射/检测 > 记忆兜底(与形态同优先级纪律)
206+
- 命令通道:新增 `remember_video_profile_domain(title, coarse, fine)`(coarse 白名单校验;fine 逐项 `parse_fine` 校验非法即报错;写入记忆 + 可顺带触发 hotwords 预热)
207+
- 接线:检测卡/采集条"修改即记忆"(领域/细目确认)写入;`detect_video_profile` 领域结果 = 映射/检测 > 记忆兜底(与形态同优先级纪律)
204208

205209
## 六、测试与验证
206210

@@ -212,6 +216,7 @@ UI 层:ProfileDetector/ LiveProfileStrip(形态 10 下拉 + 领域 20 下拉
212216
- 记忆:旧 JSON(无 domain 字段)加载零失败;remember_domain/lookup_domain series 键;覆盖/追加
213217
- 检测链优先级:5 源全组合用例(映射 > 用户 > 标题 > 开场 > 术语 > none),映射未命中回落现状断言
214218
- 领域种子词:新 5 粗类 + 细目种子词匹配 goldens
219+
- 命令层:`update_live_profile` 增参 `fine`(合法/非法/缺省 None 向后兼容断言);`remember_video_profile_domain`(coarse 白名单、fine 逐项校验、记忆写入断言)
215220

216221
**前端(vitest + tsc + vite build)**:
217222

0 commit comments

Comments
 (0)