## Parent - #198 ## 来源 2026-07-28 对 #198 落地代码的 Spec review。 ## 问题 #198 要求 source-kind 判断与 source label 映射收敛为单份,同时声明“零行为变更”。收敛前存在真实漂移: - Settings / runtime attribution 使用 `Managed Skill`; - slash command collector 对 enterprise 使用 `Enterprise Skill`。 本次实现统一走 `getSkillSourceLabel()` 后,slash command 输出从 `Enterprise Skill` 变为 `Managed Skill`,但 #198 没有把这一行为归一化列为显式决策,也没有测试锁住 enterprise 分支。enterprise 当前没有生产接线,所以没有现网迁移负担,但继续不明确会让下次消费方再次发明第三种文案。 ## 决策 将 enterprise source 的规范英文标签统一为: ```text Managed Skill ``` 理由:该来源表达由组织/管理员集中提供和管理的 Skill;`Managed Skill` 已是 Settings 与 runtime attribution 的既有术语。slash command collector 采用同一标签,不再保留上下文特例。 这是对 #198 “零行为变更”的一个明确、低风险例外,应在本票记录并用测试固定,而不是继续作为未说明的副作用。 ## 实现要求 - `getSkillSourceLabel()` 保持唯一映射来源。 - 不在 command collector、skill-manager、runtime 中重新增加 enterprise 专用 switch。 - 为所有 source kind 的标签映射增加表驱动测试,至少覆盖:built-in、project、project-nested、project-additional、user、enterprise。 - slash command collector 测试增加 enterprise entry,断言 `sourceLabel === 'Managed Skill'` 且 source/target/qualified name 不变。 - 检查 Settings view 与 runtime attribution 继续使用同一 helper。 - 在 #198 的完成说明中明确记录该规范化例外。 ## 验收标准 - [ ] enterprise 在所有表面统一显示 `Managed Skill`。 - [ ] 全库只有一份 source-kind → label 映射。 - [ ] enterprise 分支有直接回归测试,不依赖未来生产接线。 - [ ] 其他 source kind 文案逐字节不变。 - [ ] command、deepagent skill 相关测试与 `pnpm run typecheck` 通过。 ## 非目标 - 不新增 enterprise Skill 的生产目录接线。 - 不改变 source precedence、shadowing、Scene exposure 或 Conversation Skill Snapshot。 - 不修改 Skill 的持久化格式或 IPC 契约。 - 不对全部技术来源标签做 i18n 重构。
Activity
suntianc commentedon Jul 29, 2026
已在 #245 完成实现并推送;Ubuntu、macOS、Windows CI 均通过。