From 56d8d9739fd5e8494cf28c741a60c73d4966256a Mon Sep 17 00:00:00 2001 From: qxbyte <126648675+qxbyte@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:05:09 +0800 Subject: [PATCH] refactor(ragkit) 0.1.4: drop commands/, skills become user-invocable (fix Record-2 improvisation) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code merged commands into skills — a default (no `user-invocable`) skill already provides both the `/ragkit:*` slash entry AND model auto-invocation. So: - deleted the 4 thin `commands/*.md` wrappers - removed `user-invocable: false` from the 4 skills (embed/query/status/eval) `/ragkit:query` etc. are unchanged for users — now served directly by the skill. This ROOT-FIXES the Record-2 failure: the old command body said "Follow the plugin skill at `skills/query/SKILL.md`" (a relative path), which led a weak model on CodeBuddy to Search the PROJECT dir for that file, find nothing (it's in the plugin cache), abandon the plugin, and reimplement retrieval manually (install numpy, call the embedding API, hand-roll cosine+RRF → wrong results). Dropping the command layer removes that "go find the file" indirection — the model can only invoke the skill by name. specode's by-name `ragkit:query` calls are unaffected; the `__env_probe__` probe remains (pending CodeBuddy run). Co-Authored-By: Claude Fable 5 Co-Authored-By: qxbyte <126648675+qxbyte@users.noreply.github.com> --- .claude-plugin/marketplace.json | 2 +- plugins/ragkit/.claude-plugin/plugin.json | 2 +- plugins/ragkit/CHANGELOG.md | 6 ++++++ plugins/ragkit/commands/embed.md | 7 ------- plugins/ragkit/commands/eval.md | 7 ------- plugins/ragkit/commands/query.md | 7 ------- plugins/ragkit/commands/status.md | 7 ------- plugins/ragkit/skills/embed/SKILL.md | 1 - plugins/ragkit/skills/eval/SKILL.md | 1 - plugins/ragkit/skills/query/SKILL.md | 1 - plugins/ragkit/skills/status/SKILL.md | 1 - 11 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 plugins/ragkit/commands/embed.md delete mode 100644 plugins/ragkit/commands/eval.md delete mode 100644 plugins/ragkit/commands/query.md delete mode 100644 plugins/ragkit/commands/status.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index fea456b..51006f8 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -58,7 +58,7 @@ { "name": "ragkit", "source": "./plugins/ragkit", - "version": "0.1.3", + "version": "0.1.4", "description": "Standalone knowledge-base RAG plugin (vector/lexical/metadata multi-channel recall).", "category": "database", "homepage": "https://github.com/qxbyte/pluginhub", diff --git a/plugins/ragkit/.claude-plugin/plugin.json b/plugins/ragkit/.claude-plugin/plugin.json index e1ab33f..19bb520 100644 --- a/plugins/ragkit/.claude-plugin/plugin.json +++ b/plugins/ragkit/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "ragkit", - "version": "0.1.3", + "version": "0.1.4", "description": "Standalone knowledge-base RAG: chunk + embed + multi-channel recall (vector/lexical/metadata, RRF-fused) over distill-style knowledge-base/ directories.", "author": { "name": "xueqiang", diff --git a/plugins/ragkit/CHANGELOG.md b/plugins/ragkit/CHANGELOG.md index 91332d4..0f87f98 100644 --- a/plugins/ragkit/CHANGELOG.md +++ b/plugins/ragkit/CHANGELOG.md @@ -2,6 +2,12 @@ ## Unreleased +## 0.1.4 (2026-07-08) — 去 commands,skill 直接出斜杠(修记录 2 脱轨元凶) + +- **删掉 `commands/` 目录**(4 个薄壳命令),并从 4 个 skill 去掉 `user-invocable: false`。Claude Code 里 command 已并入 skill——默认(不写 `user-invocable`)的 skill 自动就有 `/ragkit:*` 斜杠入口 + 模型自动调,两样都占。`/ragkit:query` 等入口不变,只是现在**直接由 skill 提供**。 +- **根治"模型绕开插件手搓检索"**:旧 command body 那句 `Follow the plugin skill at skills/query/SKILL.md`(相对文件路径)会**诱导弱模型去项目目录搜该文件**(执行记录-2 实证:`Search **/skills/query/SKILL.md` in project → 0 命中 → 放弃插件、装 numpy 自己算)。去掉这层 command 间接,模型只能按名 `Skill(ragkit:query)`,不再被指去搜文件。 +- specode 按名调用 `ragkit:query` 不受影响(skill 名不变)。`__env_probe__` 探针仍在(待 CodeBuddy 实跑)。 + ## 0.1.3 (2026-07-08) — 修 skill YAML + 临时探针 spike - **修 frontmatter YAML 解析失败(P0)**:0.1.2 的四个 skill `description` 含 `Trigger: `(冒号+空格),未加引号导致 YAML 解析失败——`claude plugin validate` 报错、且**运行时 frontmatter 被整体静默丢弃**(name/description 全丢,影响 skill 发现)。修法:四个 description 全部加双引号。(同款 bug 也在 specode / task-swarm 的 skill 里,单独处理。) diff --git a/plugins/ragkit/commands/embed.md b/plugins/ragkit/commands/embed.md deleted file mode 100644 index ca2c00f..0000000 --- a/plugins/ragkit/commands/embed.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -description: RagKit 向量索引构建与更新 -argument-hint: "[--kb 路径] [--rebuild]" ---- - -Follow the plugin skill at `skills/embed/SKILL.md` (use the Skill tool: `ragkit:embed`). -User input: $ARGUMENTS diff --git a/plugins/ragkit/commands/eval.md b/plugins/ragkit/commands/eval.md deleted file mode 100644 index b0a671a..0000000 --- a/plugins/ragkit/commands/eval.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -description: RagKit 检索精度评估 -argument-hint: "[--kb 路径] [--channels ...]" ---- - -Follow the plugin skill at `skills/eval/SKILL.md` (use the Skill tool: `ragkit:eval`). -User input: $ARGUMENTS diff --git a/plugins/ragkit/commands/query.md b/plugins/ragkit/commands/query.md deleted file mode 100644 index 6e22e35..0000000 --- a/plugins/ragkit/commands/query.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -description: RagKit 多路召回查询(向量+词汇+元数据,RRF 融合) -argument-hint: "<检索问题>" ---- - -Follow the plugin skill at `skills/query/SKILL.md` (use the Skill tool: `ragkit:query`). -User input: $ARGUMENTS diff --git a/plugins/ragkit/commands/status.md b/plugins/ragkit/commands/status.md deleted file mode 100644 index 558380d..0000000 --- a/plugins/ragkit/commands/status.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -description: RagKit 索引健康检查 -argument-hint: "[--kb 路径]" ---- - -Follow the plugin skill at `skills/status/SKILL.md` (use the Skill tool: `ragkit:status`). -User input: $ARGUMENTS diff --git a/plugins/ragkit/skills/embed/SKILL.md b/plugins/ragkit/skills/embed/SKILL.md index 960b9bb..b7adcf8 100644 --- a/plugins/ragkit/skills/embed/SKILL.md +++ b/plugins/ragkit/skills/embed/SKILL.md @@ -1,6 +1,5 @@ --- name: embed -user-invocable: false description: "Use when building or refreshing the RagKit index for a project `knowledge-base/` (e.g. after distill added/updated knowledge points). Trigger: /ragkit:embed. Querying instead → ragkit:query; index health → ragkit:status." --- diff --git a/plugins/ragkit/skills/eval/SKILL.md b/plugins/ragkit/skills/eval/SKILL.md index ac80632..a056248 100644 --- a/plugins/ragkit/skills/eval/SKILL.md +++ b/plugins/ragkit/skills/eval/SKILL.md @@ -1,6 +1,5 @@ --- name: eval -user-invocable: false description: "Use when measuring or tuning RagKit retrieval accuracy — runs the golden evalset, reports recall@k / MRR per bucket. Trigger: /ragkit:eval. Run before/after any retrieval-param change to keep a baseline." --- diff --git a/plugins/ragkit/skills/query/SKILL.md b/plugins/ragkit/skills/query/SKILL.md index 41b6cd6..aa11984 100644 --- a/plugins/ragkit/skills/query/SKILL.md +++ b/plugins/ragkit/skills/query/SKILL.md @@ -1,6 +1,5 @@ --- name: query -user-invocable: false description: "Use when retrieving from a project `knowledge-base/` — multi-channel RAG recall (vector + lexical + metadata, RRF-fused) returning locate-pointer cards; multi-round/multi-angle querying allowed. Trigger: /ragkit:query, or called by name by workflows like specode. Building/refreshing the index instead → ragkit:embed." --- diff --git a/plugins/ragkit/skills/status/SKILL.md b/plugins/ragkit/skills/status/SKILL.md index 93aa9f2..f91a4a1 100644 --- a/plugins/ragkit/skills/status/SKILL.md +++ b/plugins/ragkit/skills/status/SKILL.md @@ -1,6 +1,5 @@ --- name: status -user-invocable: false description: "Use when checking RagKit index health — doc/chunk counts, backend resolution, staleness and drift between `knowledge-base/` and index. Trigger: /ragkit:status. Rebuilding after drift → ragkit:embed." ---