📚 docs(kb): 同步 matcher 4 字段(includeAll/excludeAny/excludeAll)完整语义与填充机制 - #57
Merged
Conversation
…ll)完整语义与填充机制 - Agent 侧规则(三端 + Core templates zh/en):f2s-flow2spec-unified-entry 的匹配口径从「只读 includeAny」扩为 4 字段;f2s-topic-authoring 新增 §3「matcher 分片字段语义」写作准则(否决门恒胜、AND/排除词用法、阈值提示)。 - 知识库:kb-routing-summary topic 补「matcher 分片字段语义」+「4 字段填充机制」两节(revision → 2);Core templates 双语新建 kb-routing-summary topic;index.md 3 处 includeAny 单字段口径改为 4 字段;m-kb-routing-summary matcher 补 9 个新召回词。 - 同步 npm run sync:agents 分发的三端配置根(hooks/rules/skills 镜像更新)。 - 追认 PR #55 让 routing.match() 生效的 4 字段能力,Agent 侧与公共 API 侧从此对齐。相关:PR #55、Issue #54、Issue #56(后续半自动填充备忘)。
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
PR #55 让
packages/core/lib/routing.js:match()完整消费 matcher 4 字段(includeAny/includeAll/excludeAny/excludeAll),但 Flow2Spec 有两条并行的匹配路径:routing.match()):PR 🐛 fix(core): matcher includeAll/excludeAny/excludeAll 字段在路由匹配中生效 #55 已修好 ✅includeAny」,Agent 就依然只会用includeAny扫盘发现本仓 Agent 侧规则(
.claude/.cursor/.codex+ Core templates 真源) + 知识库(.Knowledge/topics/.Knowledge/index.md)共 7 处仍是includeAny单字段口径。不补,Agent 拿到的说明书就还是过期的,新能力对它是隐藏功能。本 PR 追认 PR #55 的能力,补齐 Agent 侧说明书,让两条路径口径一致。
改动范围
知识库(本仓
.Knowledge/)topics/kb-routing-summary.md:revision 0 → 2,新增两节task精确命中 + 存量兼容index.md:3 处includeAny单字段口径改为 4 字段;topic 简介同步matchers/m-kb-routing-summary.json:includeAny补 9 个新召回词(includeAll/excludeAny/excludeAll/matcher 字段/matcher 4 字段/否决门/资格门/路由匹配/路由字段)manifest-routing.json:taskToTopicRules[kb-routing-summary].summary由kb build从 topic frontmatter 机械同步本仓规则(三端手写镜像)
.claude/rules/f2s-topic-authoring.md:新增 §3「matcher 分片字段语义」写作准则(何时用 AND / 何时上排除词 / 阈值提示 / 打分池合并);原编号顺移,内部引用更新.claude/rules/f2s-flow2spec-unified-entry.md:读取顺序 / matcherPath 字段项 / 缺口处理表 三处口径改 4 字段.cursor/rules/*.mdc:同上镜像.codex/topics/*.md:同上镜像Core templates 真源(下游
flow2spec init分发用)packages/core/templates/{zh-CN,en-US}/knowledge/topics/kb-routing-summary.md(双语)packages/core/templates/{zh-CN,en-US}/rules/f2s-topic-authoring.md:同本仓改动packages/core/templates/{zh-CN,en-US}/rules/f2s-flow2spec-unified-entry.md:同本仓改动packages/core/templates/{zh-CN,en-US}/knowledge/index.md:同本仓改动顺带同步(
npm run sync:agents分发产物)同 commit 内包含少量 hooks / kb-* skill 镜像的例行同步(用户明确执行过
npm run sync:agents)。自检门禁(全绿)
flow2spec kb check --strict=knowledge check: ok / topics: 20 / routing drift: nonpm run version:check= CLI 3.6.2 / Core 3.7.2 / Template 3.6.2 / Protocol 2 一致npm test15 个脚本全绿(含routing semantics tests passed)兼容性
includeAny)行为不变npm run version:set:template单独发一次;当前不阻塞相关