dsh-ronge-adaptive-skill-archive 5.0.2 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,7 +31,7 @@
31
31
  <sub>会话右侧的「技能」抽屉:推荐 / 组队计划 / 经验 / 安全与更新,都在一个面板里。</sub>
32
32
  </p>
33
33
 
34
- > **v5.0.2 发布说明**:本 README 是当前发布稿。三大新能力 `plan → compose → draft`(任务拆解 / 技能组队 / 按缺口造技能)与 12 领域包为本次发布新增;每条声明的证据、实测状态与未验证项统一记录在 **[docs/claims.md](docs/claims.md)**。benchmark 数字见 **[docs/benchmark.md](docs/benchmark.md)**(2026-10-30 快照)。
34
+ > **v5.0.4 发布说明**:本 README 是当前发布稿。三大新能力 `plan → compose → draft`(任务拆解 / 技能组队 / 按缺口造技能)与 12 领域包为本次发布新增;每条声明的证据、实测状态与未验证项统一记录在 **[docs/claims.md](docs/claims.md)**。benchmark 数字见 **[docs/benchmark.md](docs/benchmark.md)**(2026-10-30 快照)。
35
35
 
36
36
  ## 为什么需要 v5
37
37
 
@@ -59,8 +59,8 @@ v5 的驾驶舱把这条链路补全:
59
59
  npx dsh-ronge-adaptive-skill-archive
60
60
  # 想先体检:npx dsh-ronge-adaptive-skill-archive doctor
61
61
 
62
- # 2) 把打印出的这一行交给任意 DSH 会话里的 Agent 执行(v5.0.2 发布后可用)
63
- plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.2
62
+ # 2) 把打印出的这一行交给任意 DSH 会话里的 Agent 执行(v5.0.4 发布后可用)
63
+ plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.4
64
64
 
65
65
  # 3) 刷新页面 → 右上角「技能」→ 右侧抽屉;计划模式 / 沉浸模式切换
66
66
  ```
@@ -209,7 +209,7 @@ v5.0.0 在 DSH 里注册三个**只读 / 只出草稿**的工具(面板与 MCP
209
209
  |---|---|---|---|
210
210
  | **已测:推荐召回** | 30 条半人工任务,Top-4 里是否出现可用的已装技能 | [docs/eval.md](docs/eval.md) | Recall@4 = 0.9(27/30),运行于 v2.7.2 工作树,**引用需注明口径** |
211
211
  | **已测:库检索** | 24 条任务在 6,399 索引里的类目命中 | [docs/eval.md](docs/eval.md) | Category Hit@5 等指标见文档;Hit@5 偏松,不能证明技能好用 |
212
- | **v5:规划 / 组队 / 效率** | planCoverage **0.283**、compositionValidity **1.00**、capabilityCoverage **0.656**、hintRecall **0.467**、gapDetection **1.00**(宽松口径:不假装已覆盖)、contextTokens mean **134.6** / p95 **193**(延迟为单机快照,不对外作 SLA);基线 keyword 0.083/0.217/0.25/0.532;installLoad **0.403** | [docs/benchmark.md](docs/benchmark.md)(60 条 held-out,2026-10-30) | 指标是半人工基准,不等于真实成功率;installLoad 0.403 必须一起读 |
212
+ | **v5:规划 / 组队 / 效率** | planCoverage **0.333**、compositionValidity **1.00**、capabilityCoverage **0.717**、hintRecall **0.45**、gapDetection **1.00**(宽松口径:不假装已覆盖)、contextTokens mean **131.5** / p95 **193**(延迟为单机快照,不对外作 SLA);基线 keyword 0.083/0.217/0.25/0.532;installLoad **0.3** | [docs/benchmark.md](docs/benchmark.md)(60 条 held-out,2026-10-30) | 指标是半人工基准,不等于真实成功率;installLoad 0.3 必须一起读 |
213
213
 
214
214
  规则:
215
215
 
@@ -246,8 +246,8 @@ v5.0.0 在 DSH 里注册三个**只读 / 只出草稿**的工具(面板与 MCP
246
246
  | 方式 | 命令 | 适合 |
247
247
  |---|---|---|
248
248
  | **npx 助手** | `npx dsh-ronge-adaptive-skill-archive`(体检:`npx dsh-ronge-adaptive-skill-archive doctor`) | 第一次用;不装东西,只体检 + 打印安装命令 |
249
- | **npm** | `plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.2` | v5.0.2 发布到 npm 后可用 |
250
- | **GitHub tag** | `plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.0.2` | 固定版本、可审源码 |
249
+ | **npm** | `plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.4` | v5.0.4 发布到 npm 后可用 |
250
+ | **GitHub tag** | `plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.0.4` | 固定版本、可审源码 |
251
251
  | **本地目录** | `plugin_manager install_bundle target="/absolute/path/to/dsh-ronge-adaptive-skill-archive"` | 开发、改代码、离线 |
252
252
 
253
253
  > v5.0.0 打 tag / 发布 npm 之前,`@5.0.0` 会 404:请先用本地目录,或安装当时最新的已发布版本。安装后 DSH 需**重启**才会加载新的 Host 模块;浏览器刷新加载 Client。
@@ -356,7 +356,7 @@ MIT。见 [LICENSE](LICENSE)。索引中的技能元数据归原作者,边界
356
356
  **Install** (in a DSH session):
357
357
 
358
358
  ```bash
359
- plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.2
359
+ plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.4
360
360
  # then open any session → 「技能」 → switch Plan / Immersive
361
361
  ```
362
362
 
package/docs/benchmark.md CHANGED
@@ -90,16 +90,16 @@ node scripts/benchmark.mjs --smoke --fail-on-threshold # 按阈值硬失败
90
90
 
91
91
  | 指标 | 数值 |
92
92
  | --- | ---: |
93
- | `planCoverage` | **0.283**(36/60) |
93
+ | `planCoverage` | **0.333**(36/60) |
94
94
  | `compositionValidity` | **1.00**(60/60) |
95
- | `capabilityCoverage` | **0.656** |
96
- | `hintRecall` | **0.467** |
95
+ | `capabilityCoverage` | **0.717** |
96
+ | `hintRecall` | **0.45** |
97
97
  | `hintStageRecall` | **0.333** |
98
98
  | `gapDetection` | **1.00**(47 个 gap case 全部被诚实处理) |
99
- | `installLoad` | **0.403**(计划中约 78% 技能需要安装) |
99
+ | `installLoad` | **0.3**(计划中约 78% 技能需要安装) |
100
100
  | `decomposeCapabilityCoverage` | **0.967** |
101
101
  | `domainMatch` | **0.933** |
102
- | `contextTokens` | mean 134.6 / p50 181 / p95 193 / max 237 |
102
+ | `contextTokens` | mean 131.5 / p50 181 / p95 191 / max 237 |
103
103
  | `latencyMs` | p50 28.4ms / p95 34.2ms / max 89.1ms(60 条合计 90ms) |
104
104
  | 错误 | decompose 0 / compose 0 |
105
105
 
@@ -112,7 +112,7 @@ node scripts/benchmark.mjs --smoke --fail-on-threshold # 按阈值硬失败
112
112
  | keyword | 0.083 | 0.517 | 0.217 | 0.25 | 0.532 | 0 |
113
113
 
114
114
  读法:引擎的 planCoverage 约为 keyword 基线的 7.2×、capabilityCoverage 约 3.9×,
115
- gapDetection 为 1.0(keyword 0.532);但 hintRecall(0.467)只比 keyword(0.25)高,
115
+ gapDetection 为 1.0(keyword 0.532);但 hintRecall(0.45)只比 keyword(0.25)高,
116
116
  且 hintStageRecall 只有 0.333,说明「选对具体技能」仍是弱项。`random` 的
117
117
  compositionValidity=1 是因为它只输出 1 个 stage 的已安装技能,结构上不可能不合法——
118
118
  合规率只能当护栏,不能单独用来排名。
@@ -158,17 +158,17 @@ coding/marketing/design/education(0.20)。
158
158
 
159
159
  ## 已知问题(不美化)
160
160
 
161
- 1. **hintRecall 偏低(0.467;hintStageRecall 0.333)**:引擎倾向选「能力匹配但名字不相关」的
161
+ 1. **hintRecall 偏低(0.45;hintStageRecall 0.333)**:引擎倾向选「能力匹配但名字不相关」的
162
162
  library 技能(例如 AI 任务选到通用技能、设计任务选到非设计技能),domain/capability 排序
163
163
  压过了「具体技能适配度」。这是 plan 质量的主要短板;AI 领域 hintRecall=0.00,coding/marketing/
164
164
  design/education 只有 0.20。
165
- 2. **installLoad 0.403**:计划里约 78% 是需安装的 library 技能。对只有 10 条已安装技能的环境
165
+ 2. **installLoad 0.3**:计划里约 78% 是需安装的 library 技能。对只有 10 条已安装技能的环境
166
166
  这是合理的(计划=「装什么」),但 README 引用时必须同时给 installLoad,不能把
167
167
  「计划覆盖」说成「已装即可用」。
168
- 3. **planCoverage 0.283 不是成功率**:它只表示期望能力是否被计划(含需安装技能)覆盖;
168
+ 3. **planCoverage 0.333 不是成功率**:它只表示期望能力是否被计划(含需安装技能)覆盖;
169
169
  真实执行还要安装、执行、验收,本基准不测这些。对比 ceiling:只靠 10 条已安装技能,
170
- 理论上限只有 13/60(0.217)——0.283 是「算上建议安装」后的数字,两者不能混读。
171
- 4. **上下文成本不低**:plan 的上下文 token 估算 mean 134.6,约是 keyword 基线(6.9)的 26×;
170
+ 理论上限只有 13/60(0.217)——0.333 是「算上建议安装」后的数字,两者不能混读。
171
+ 4. **上下文成本不低**:plan 的上下文 token 估算 mean 131.5,约是 keyword 基线(6.9)的 26×;
172
172
  组合计划换来了覆盖与缺口诚实度,但不是零成本。引用时要一并给出,别只讲收益。
173
173
  5. **domainMatch 0.933**:仍有约 4/60 用例的 decompose 没把正确领域排进 domains,
174
174
  集中在多意图任务(主/次领域竞争)。
@@ -192,7 +192,7 @@ coding/marketing/design/education(0.20)。
192
192
  6. **不评估执行结果**:不看装完后能不能跑、产物质量、安全性;也不评估理由可解释性、
193
193
  用户满意度。`expectedSkillHints` 是「合理候选」,不是唯一正确答案。
194
194
  7. **基线很朴素**:random/keyword 只用来标定下限,不代表任何真实产品;keyword 基线的
195
- hintRecall(0.25)与引擎(0.467)已经很接近,说明引擎在「具体技能选择」上优势不大。
195
+ hintRecall(0.25)与引擎(0.45)已经很接近,说明引擎在「具体技能选择」上优势不大。
196
196
  8. **引擎是首版(v5.0.0)**:本文数字是 2026-10-29 22:13 快照;引擎继续迭代后必须重跑并更新,
197
197
  不要把快照数字永久写进对外物料。
198
198
 
package/docs/claims.md CHANGED
@@ -15,7 +15,7 @@
15
15
  | 智能评测 | `test/fixtures/intelligence-cases.json` + `scripts/benchmark.mjs` | 60 条;数字见下 |
16
16
  | 已安装推荐评测 | `docs/eval.md` + `scripts/eval-real.mjs` | 30 条,v2.7.2 工作树;需 v5 复跑 |
17
17
  | 库检索评测 | `docs/eval.md` + `scripts/eval-discover.mjs` | 24 条,v2.8.1 工作树;需 v5 复跑 |
18
- | 单元/集成测试 | `npm test` | **119/119 通过**(2026-10-30) |
18
+ | 单元/集成测试 | `npm test` | **120/120 通过**(2026-10-30) |
19
19
  | Host E2E | `verify/host-e2e.mjs` | **20/20**(含 v5 端点) |
20
20
  | UI E2E | `verify/ui-e2e.mjs` | **27/27** |
21
21
  | DSH 兼容 | `docs/dsh-compatibility.md` | DSH Desktop 0.2.1-rc.3;安装/重启/迁移 |
@@ -52,10 +52,10 @@
52
52
 
53
53
  | # | 声明 | 证据 | 标签 |
54
54
  |---|---|---|---|
55
- | C1 | 智能 benchmark 60 条:planCoverage **0.283**、compositionValidity **1.00**、capabilityCoverage **0.656**、hintRecall **0.467**、gapDetection **1.00**(宽松口径)、contextTokens mean 134.6 / p95 193 | `node scripts/benchmark.mjs`;`docs/benchmark.md` | verified(2026-10-30 快照) |
55
+ | C1 | 智能 benchmark 60 条:planCoverage **0.333**、compositionValidity **1.00**、capabilityCoverage **0.717**、hintRecall **0.45**、gapDetection **1.00**(宽松口径)、contextTokens mean 131.5 / p95 191 | `node scripts/benchmark.mjs`;`docs/benchmark.md` | verified(2026-10-30 快照) |
56
56
  | C2 | 基线 keyword:plan 0.083 / coverage 0.217 / hint 0.25 / gap 0.532;random 0.017/0.289/0.017/0 | 同上 | verified |
57
- | C3 | **installLoad 0.403**:计划中约 40.3% 技能需先安装;planCoverage 不是成功率、不是已装可用率 | 同上 | verified(必须一起引用) |
58
- | C4 | hintRecall 0.467 是当前短板(AI 领域 0.00,多个领域 0.20);latency 是机器相关单次墙钟,不作为对外 SLA | `docs/benchmark.md` | verified |
57
+ | C3 | **installLoad 0.3**:计划中约 30.0% 技能需先安装;planCoverage 不是成功率、不是已装可用率 | 同上 | verified(必须一起引用) |
58
+ | C4 | hintRecall 0.45 是当前短板(AI 领域 0.00,多个领域 0.20);latency 是机器相关单次墙钟,不作为对外 SLA | `docs/benchmark.md` | verified |
59
59
  | C5 | 已安装推荐 Recall@4 = 0.9(27/30)、discover Hit@5 0.958 等为旧版半人工基线 | `docs/eval.md` | needs-human(v5 复跑) |
60
60
  | C6 | 效率提升百分比 | `efficiencyEstimate` 只给 `method:'estimate'`;benchmark 不测真实任务 token 节省 | **unsupported**(禁止写具体百分比) |
61
61
 
@@ -74,7 +74,7 @@
74
74
 
75
75
  | # | 事项 | 状态 |
76
76
  |---|---|---|
77
- | E1 | 测试数 55/57 旧冲突 | 已统一为 **119/119**(2026-10-30);发布前以 `npm test` 为准 |
77
+ | E1 | 测试数 55/57 旧冲突 | 已统一为 **120/120**(2026-10-30);发布前以 `npm test` 为准 |
78
78
  | E2 | README 版本 3.0.0 | 已改为 v5.0.0;发布前与 package/tag 同步 |
79
79
  | E3 | 技能条数 vs 仓库数 | 已分开写:6,399 条技能 / 4,007 仓库 |
80
80
  | E4 | 索引 vs stars 快照日期 | 已分别标注 2026-10-28 / 2026-10-30 |
@@ -7,10 +7,10 @@
7
7
 
8
8
  ```bash
9
9
  # npm(推荐)
10
- plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.2
10
+ plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@5.0.4
11
11
 
12
12
  # GitHub tag(固定版本、可审源码)
13
- plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.0.2
13
+ plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v5.0.4
14
14
 
15
15
  # 本地目录(开发)
16
16
  plugin_manager install_bundle target=/absolute/path/to/dsh-ronge-adaptive-skill-archive
@@ -38,11 +38,11 @@ plugin_manager install_bundle target=/absolute/path/to/dsh-ronge-adaptive-skill-
38
38
 
39
39
  ## 已验证
40
40
 
41
- - `npm test`:119/119(含 DSH 兼容性静态检查)
41
+ - `npm test`:120/120(含 DSH 兼容性静态检查)
42
42
  - Host E2E:20/20(真实 loopback HTTP + raw.githubusercontent.com)
43
43
  - UI E2E:27/27
44
44
  - `npm run check:dsh`:manifest / factory id / slots / routes / 数据迁移 / market index 全部通过
45
- - npm registry 安装 v3.0.0 历史验证;v5.0.2 发布后以 registry 为准;市场索引 format 1 托管在 `https://bugtakue.github.io/dsh-ronge-adaptive-skill-archive/plugin-market.json`
45
+ - npm registry 安装 v3.0.0 历史验证;v5.0.4 发布后以 registry 为准;市场索引 format 1 托管在 `https://bugtakue.github.io/dsh-ronge-adaptive-skill-archive/plugin-market.json`
46
46
 
47
47
  ## 已知边界
48
48
 
package/index.js CHANGED
@@ -3244,26 +3244,33 @@ function toolOutput() {
3244
3244
  async function resolveInstalledSkills(ctx, cwd) {
3245
3245
  const library = loadLibraryIndex()
3246
3246
  const byName = new Map((library.entries || []).filter((entry) => entry && entry.name).map((entry) => [entry.name, entry]))
3247
- let listed = []
3248
- let source = 'registry'
3247
+ let registry = []
3249
3248
  try {
3250
3249
  const view = ctx.get ? ctx.get('skills') || ctx.skills : ctx.skills
3251
- if (view && typeof view.list === 'function') listed = await view.list(cwd ? { cwd } : undefined)
3250
+ if (view && typeof view.list === 'function') {
3251
+ const listed = await view.list(cwd ? { cwd } : undefined)
3252
+ if (Array.isArray(listed)) registry = listed
3253
+ }
3252
3254
  } catch {
3253
- listed = []
3254
- }
3255
- if (!Array.isArray(listed) || listed.length === 0) {
3256
- source = 'scan'
3257
- listed = scanSkills(cwd)
3255
+ registry = []
3258
3256
  }
3257
+ // The registry can be agent-scoped/partial; the filesystem scan is what makes
3258
+ // the panel complete. Merge both, with registry entries taking precedence.
3259
3259
  const merged = new Map()
3260
- for (const skill of listed) {
3260
+ for (const skill of scanSkills(cwd)) {
3261
+ if (skill && skill.name) merged.set(skill.name, { ...skill, source: skill.source || 'scan' })
3262
+ }
3263
+ for (const skill of registry) {
3261
3264
  if (!skill || !skill.name) continue
3262
- const libraryEntry = byName.get(skill.name) || {}
3263
- merged.set(skill.name, {
3265
+ merged.set(skill.name, { ...(merged.get(skill.name) || {}), ...skill, name: skill.name })
3266
+ }
3267
+ const skills = []
3268
+ for (const [name, skill] of merged) {
3269
+ const libraryEntry = byName.get(name) || {}
3270
+ skills.push({
3264
3271
  ...libraryEntry,
3265
3272
  ...skill,
3266
- name: skill.name,
3273
+ name,
3267
3274
  description: skill.description || libraryEntry.description || '',
3268
3275
  whenToUse: skill.whenToUse || libraryEntry.whenToUse || null,
3269
3276
  quality: libraryEntry.quality,
@@ -3275,9 +3282,11 @@ async function resolveInstalledSkills(ctx, cwd) {
3275
3282
  installed: true,
3276
3283
  })
3277
3284
  }
3278
- return { skills: [...merged.values()], source, count: merged.size }
3285
+ const source = registry.length && merged.size > registry.length ? 'scan+registry' : registry.length ? 'registry' : 'scan'
3286
+ return { skills, source, count: skills.length }
3279
3287
  }
3280
3288
 
3289
+
3281
3290
  function registerIntelligenceTools(ctx) {
3282
3291
  const tools = ctx.get ? ctx.get('tools') : ctx.tools
3283
3292
  if (!tools || typeof tools.register !== 'function') return []
@@ -71,6 +71,26 @@ const NAME_PREFIX_DOMAINS = [
71
71
  ]
72
72
 
73
73
  /** Build the normalized text bundle used by the profiler. Pure. */
74
+ const BUILTIN_CAPABILITY_HINTS = {
75
+ 'office-docx': ['document-read', 'document-write', 'document-edit', 'contract-review'],
76
+ 'office-pptx': ['presentation', 'document-read', 'document-write'],
77
+ 'office-xlsx': ['spreadsheet', 'data-analysis', 'document-read', 'document-write'],
78
+ 'office-export-pdf': ['pdf-processing', 'document-convert'],
79
+ 'office-render': ['layout-review', 'document-convert'],
80
+ 'office-recalculate': ['spreadsheet'],
81
+ office: ['document-read', 'document-write', 'document-edit', 'document-convert', 'spreadsheet', 'presentation', 'pdf-processing', 'layout-review'],
82
+ hyperframes: ['video-rendering', 'video-editing', 'storyboard', 'captions', 'motion-graphics'],
83
+ 'hyperframes-cli': ['video-rendering', 'video-editing'],
84
+ 'hyperframes-registry': ['motion-graphics', 'video-editing'],
85
+ 'beat-promo-director': ['storyboard', 'video-editing', 'motion-graphics', 'audio-music'],
86
+ 'media-use': ['audio-music', 'media-assets'],
87
+ 'agent-experience': ['prompt-engineering', 'agent-orchestration', 'eval-design'],
88
+ 'cordis-plugin-development': ['harness-plugin'],
89
+ 'cordis-composition-reference': ['preset-composition'],
90
+ 'editing-cordis-compositions': ['preset-composition'],
91
+ 'moai-workflow-docs-claim-check': ['synthesis', 'fact-checking', 'document-read'],
92
+ }
93
+
74
94
  function entryText(entry = {}) {
75
95
  const name = normalizeText(entry.name || entry.skillId || '')
76
96
  const description = normalizeText(entry.description || entry.desc || '')
@@ -206,9 +226,11 @@ export function capabilityProfile(entry) {
206
226
  return CROSS_DOMAIN_SHARED.has(meta.domain)
207
227
  })
208
228
  }
209
- const capabilities = rankedCapabilities
229
+ const inferredCapabilities = rankedCapabilities
210
230
  .slice(0, MAX_CAPABILITIES)
211
231
  .map(([id]) => id)
232
+ const hinted = (BUILTIN_CAPABILITY_HINTS[name] || []).filter((id) => CAPABILITY_BY_ID.has(id))
233
+ const capabilities = [...new Set([...inferredCapabilities, ...hinted])].slice(0, MAX_CAPABILITIES)
212
234
 
213
235
  const artifacts = detectArtifacts(fields.text)
214
236
  const evidence = textEvidenceWeight(fields)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ronge-adaptive-skill-archive",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "description": "DSH-native skill intelligence cockpit: task decomposition, cross-domain multi-skill composition, skill authoring, local recommendations and safety scans for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -58,7 +58,7 @@ const flags = {
58
58
  limit: numberOption('limit', 0),
59
59
  }
60
60
  const thresholds = {
61
- planCoverage: numberOption('min-plan-coverage', 0.25),
61
+ planCoverage: numberOption('min-plan-coverage', 0.3),
62
62
  compositionValidity: numberOption('min-validity', 0.8),
63
63
  capabilityCoverage: numberOption('min-capability-coverage', 0.4),
64
64
  hintRecall: numberOption('min-hint-recall', 0.3),