From fd4863899af88b81838ba91a79ff39aca57a1b2a Mon Sep 17 00:00:00 2001 From: weichen Date: Wed, 30 Sep 2026 10:44:48 +0000 Subject: [PATCH] Add the porting criterion and full catalog disposition table Why: deciding what enters the library from an external prompt catalog needs a stated rule (carrier mechanism or future slot) and an auditable per-item disposition, otherwise coverage drifts by reviewer taste. Evidence: table maps every Claude Code catalog entry to a library module or an explicit not-ported reason. Impact: guide gains section 9; no code change. Refs: feature/prompt-catalog-coverage task card. --- docs/guides/prompt-library-design.md | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/guides/prompt-library-design.md b/docs/guides/prompt-library-design.md index 427fb1e..3f1bb75 100644 --- a/docs/guides/prompt-library-design.md +++ b/docs/guides/prompt-library-design.md @@ -107,3 +107,45 @@ frontmatter 刻意最小(无 YAML 依赖,解析器在 parse.go);正文 - ❌ 无 version 的文案变更(用户副本漂移不可知)。 - ❌ 触发词太泛("文件"、"帮我")造成误触发。 - ❌ 只有正面要求没有反模式禁令与缺失表述规则(模型会用默认行为填空)。 + +## 9. 外部提示词目录的移植判定(以 Claude Code 目录为例) + +借鉴外部提示词体系时,逐条判定能否入库,标准只有两条(满足其一): + +1. **有承载机制**:我们的系统里存在该提示词描述的对象(工具/角色/模式/功能), + 注入后有真实消费方。 +2. **有可挂接的未来功能位**:功能虽未实现,但属于系统演进的合理档位—— + 以 aux/agent 模板先行入库,frontmatter 描述注明接线点。 + +两条都不满足的,**不入库**:给不存在的工具写描述、为不存在的模式写行为规范, +一旦被组装注入就是错误指引,死数据比缺数据更糟。 + +按此标准对 Claude Code 提示词目录的处置(44 个已入库 + 明确不移植清单): + +| 目录条目 | 处置 | 落点 | +|---|---|---| +| 1.1-1.2 身份/简介、2.1 双用途安全 | 合并 | base.identity | +| 1.4 任务执行 | 移植 | base.behavior | +| 1.5 谨慎操作 | 移植 | base.caution | +| 1.6 工具使用 | 移植 | base.tools | +| 1.7-1.8 语气/输出效率 | 合并 | base.style | +| 1.9 环境信息 | 移植 | env.runtime | +| 1.3 系统行为、1.10 hooks/临时目录/token 预算 | **不移植** | 描述 Claude 运行时机制(权限模式/system-reminder/hooks/自动压缩),我们无对应机制;机制落地时按 env/base 块补 | +| 2.2 卧底模式 | **不移植** | 隐藏 AI 身份的提交伪装;无提交代理场景,且与"如实报告"基座冲突,需独立授权框架 | +| 3.1 自主模式(Sleep/tick) | **不移植** | 需常驻调度器,无该运行档 | +| 3.2 协调器模式 | 语义已承载 | agent.squad.* + tool.squad_orchestrate | +| 3.3 队友通信 SendMessage | **不移植** | 无该工具 | +| 4.1-4.5 通用/探索/规划/验证 | 移植 | agent.sub.* | +| 4.6 向导 | 移植 | agent.docs-wizard | +| 4.7 记忆提取 | 移植 | agent.memory-extractor | +| 5.x 工具描述(15 个) | 按需移植 | 仅本系统真实存在的工具(7 个);其余 8 个(Bash/FileRead/FileWrite/FileEdit/Glob/Grep/WebFetch/WebSearch/Sleep/Skill/AskUserQuestion/NotebookEdit/Brief)**不移植**——无对应工具 | +| 6.1 会话压缩 | 移植 | aux.session-compact | +| 6.2 Session Memory | 移植 | aux.session-memory | +| 6.3 Magic Docs | 移植 | aux.magic-docs | +| 7.1-7.2 输出风格 | 移植 | style.explanatory / style.learning | +| 8.1 标题生成、8.2 命令解释 | 移植 | aux.title-gen / aux.command-explain | +| 8.3 伴侣气泡 | **不移植** | UI 功能不存在 | +| 8.4 Chrome 自动化 | **不移植** | 无浏览器工具 | +| 附录 组装架构 | 已实现 | prompts.Service 代码本身(不是提示词数据) | + +新增系统的真实机制(新工具、新角色、新档位)时,回头检查此表补齐对应模块。 -- 2.54.0