Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{
"name": "ragkit",
"source": "./plugins/ragkit",
"version": "0.1.2",
"version": "0.1.3",
"description": "Standalone knowledge-base RAG plugin (vector/lexical/metadata multi-channel recall).",
"category": "database",
"homepage": "https://github.com/qxbyte/pluginhub",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ragkit/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ragkit",
"version": "0.1.2",
"version": "0.1.3",
"description": "Standalone knowledge-base RAG: chunk + embed + multi-channel recall (vector/lexical/metadata, RRF-fused) over distill-style knowledge-base/ directories.",
"author": {
"name": "xueqiang",
Expand Down
5 changes: 5 additions & 0 deletions plugins/ragkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

## 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 里,单独处理。)
- **临时探针 spike**:`skills/query/SKILL.md` 加 `__env_probe__` 哨兵——检索词为 `__env_probe__` 时不查询、改跑自包含 bash,打印各 harness 在 **skill 上下文**里提供的 `CLAUDE_SKILL_DIR` / `CLAUDE_PLUGIN_ROOT` / `CODEBUDDY_*` 变量、路径形态、及候选 resolver 是否命中。用于定死"harness 无关的 skill 脚本定位"最终写法(去掉 `${VAR:-default}` + `find`,消除 Windows msys 路径 bug)。正常检索不受影响,**下一版删探针、落地正式 resolver**。

## 0.1.2 (2026-07-06) — skill description 统一模板

- 四个 skill(embed / query / status / eval)的 frontmatter `description`(渐进式加载唯一常驻的元数据)统一为「Use when 场景 → 做什么 → Trigger 触发词/命令 → 边界」轻量模板:补上 `/ragkit:*` 触发命令与彼此的交叉引用边界(query↔embed↔status)。零行为变化。
Expand Down
2 changes: 1 addition & 1 deletion plugins/ragkit/skills/embed/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
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.
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."
---

# RagKit Embed
Expand Down
2 changes: 1 addition & 1 deletion plugins/ragkit/skills/eval/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
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.
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."
---

# RagKit Eval
Expand Down
26 changes: 25 additions & 1 deletion plugins/ragkit/skills/query/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
---
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.
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."
---

# RagKit Query

对项目 `knowledge-base/` 做多路召回(向量+词汇+元数据,RRF 融合),返回**定位卡片**。

## 环境探针(临时 spike 诊断,仅本版 0.1.3)

**如果检索词恰好是 `__env_probe__`**:不要查询、不要调 `ragkit.py`,改为运行下面这段自包含 bash,把它的输出**原样、完整**回贴给用户,然后结束。(用途:确定当前 harness 在 skill 上下文里到底提供哪个变量、路径是什么形态,据此定死 resolver 的最终写法。请在两台机器各跑一次——Claude Code 与 CodeBuddy——对照输出。)

```sh
echo "=== RAGKIT HARNESS PROBE ==="
echo "CLAUDE_SKILL_DIR =[${CLAUDE_SKILL_DIR}]"
echo "CODEBUDDY_SKILL_DIR =[${CODEBUDDY_SKILL_DIR}]"
echo "CLAUDE_PLUGIN_ROOT =[${CLAUDE_PLUGIN_ROOT}]"
echo "CODEBUDDY_PLUGIN_ROOT =[${CODEBUDDY_PLUGIN_ROOT}]"
echo "combined_dash =[${CLAUDE_PLUGIN_ROOT:-$CODEBUDDY_PLUGIN_ROOT}]"
echo "cwd =$(pwd)"
echo "uname =$(uname -s 2>/dev/null || echo n/a)"
A="${CLAUDE_SKILL_DIR}/../../scripts/run.sh"
B="${CLAUDE_PLUGIN_ROOT}/scripts/run.sh"
C="${CODEBUDDY_PLUGIN_ROOT}/scripts/run.sh"
echo "A skilldir/../../scripts/run.sh exists=$([ -f "$A" ] && echo YES || echo NO) [$A]"
echo "B pluginroot/scripts/run.sh exists=$([ -f "$B" ] && echo YES || echo NO) [$B]"
echo "C cbroot/scripts/run.sh exists=$([ -f "$C" ] && echo YES || echo NO) [$C]"
echo "=== END PROBE ==="
```

否则(正常检索词)按下面执行。

## 执行

```sh
Expand Down
2 changes: 1 addition & 1 deletion plugins/ragkit/skills/status/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
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.
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."
---

# RagKit Status
Expand Down
Loading