pnpm-plugin-skills 0.0.1
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/log/app.call.log
ADDED
|
File without changes
|
|
File without changes
|
package/log/app.log
ADDED
|
File without changes
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pnpm-plugin-skills",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"registry": "https://registry.npmjs.org/"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
# 20260330-init
|
|
2
|
+
|
|
3
|
+
## 目标
|
|
4
|
+
|
|
5
|
+
做一个独立的 npm CLI 包,定位类似 pnpm 的 skill package manager。
|
|
6
|
+
|
|
7
|
+
`0.1.0` 版本目标:
|
|
8
|
+
|
|
9
|
+
1. 提供 `skills add` / `skills install`
|
|
10
|
+
2. 生成并维护 `skills.json`
|
|
11
|
+
3. 生成并维护 `skills-lock.yaml`
|
|
12
|
+
4. 能通过 `pnpm` 的 `configDependencies` 集成,在 `pnpm install` 时自动安装 skills
|
|
13
|
+
|
|
14
|
+
## 参考命令
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npx skills add rstackjs/agent-skills --skill rspack-best-practices
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 已确认设计
|
|
21
|
+
|
|
22
|
+
### 包结构
|
|
23
|
+
|
|
24
|
+
仓库采用 monorepo 结构:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
packages/
|
|
28
|
+
skills-pm/
|
|
29
|
+
pnpm-plugin-skills/
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- `packages/skills-pm`
|
|
33
|
+
- npm 包名:`skills-pm`
|
|
34
|
+
- 提供 CLI 命令:`skills add`、`skills install`
|
|
35
|
+
- 内含核心实现:manifest / lock / resolver / installer
|
|
36
|
+
- `packages/pnpm-plugin-skills`
|
|
37
|
+
- npm 包名:`pnpm-plugin-skills`
|
|
38
|
+
- 用于 `pnpm-workspace.yaml > configDependencies`
|
|
39
|
+
- 在 `pnpm install` 时调用与 `skills install` 等价的安装逻辑
|
|
40
|
+
- 只能在源码/构建层复用 `skills-pm` 的核心实现,发布后不能在运行时依赖 `skills-pm`
|
|
41
|
+
|
|
42
|
+
### 首版命令范围
|
|
43
|
+
|
|
44
|
+
只做:
|
|
45
|
+
|
|
46
|
+
- `skills add`
|
|
47
|
+
- `skills install`
|
|
48
|
+
|
|
49
|
+
首版不做:
|
|
50
|
+
|
|
51
|
+
- `remove`
|
|
52
|
+
- `list`
|
|
53
|
+
- `prune`
|
|
54
|
+
- skill 之间的依赖解析
|
|
55
|
+
|
|
56
|
+
### 与 pnpm 的集成
|
|
57
|
+
|
|
58
|
+
集成点采用 `pnpm-workspace.yaml` 的 `configDependencies`,而不是 `package.json`。
|
|
59
|
+
|
|
60
|
+
目标使用方式:
|
|
61
|
+
|
|
62
|
+
```yaml
|
|
63
|
+
configDependencies:
|
|
64
|
+
pnpm-plugin-skills: "0.1.0+<integrity>"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
然后执行:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
pnpm install
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
由 `pnpm-plugin-skills` 自动读取项目根目录的 `skills.json` / `skills-lock.yaml`,完成安装。
|
|
74
|
+
|
|
75
|
+
### pnpm 插件 hook 设计
|
|
76
|
+
|
|
77
|
+
基于 pnpm 10 的 hooks 设计,`pnpm-plugin-skills` 推荐使用 `preResolution` 作为自动安装入口:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
module.exports = {
|
|
81
|
+
hooks: {
|
|
82
|
+
async preResolution(options) {
|
|
83
|
+
// 基于 options.lockfileDir 定位 workspace root
|
|
84
|
+
// 执行一次与 `skills install` 等价的逻辑
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
选择 `preResolution` 的原因:
|
|
91
|
+
|
|
92
|
+
- 能拿到 `lockfileDir`,便于定位项目根目录
|
|
93
|
+
- 时机够早,适合在依赖解析前确保 skills 已同步
|
|
94
|
+
- 比模块顶层副作用更清晰
|
|
95
|
+
- 比 `updateConfig` 更符合用途
|
|
96
|
+
|
|
97
|
+
插件侧安装逻辑必须满足:
|
|
98
|
+
|
|
99
|
+
- 幂等
|
|
100
|
+
- 快速 no-op
|
|
101
|
+
- 没有 `skills.json` 时直接跳过
|
|
102
|
+
- 有 `skills.json` 但没有 `skills-lock.yaml` 时失败
|
|
103
|
+
|
|
104
|
+
### skills.json 结构
|
|
105
|
+
|
|
106
|
+
采用尽量接近 `package.json` 的结构:
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"$schema": "https://unpkg.com/skills-pm/schema/skills.schema.json",
|
|
111
|
+
"installDir": ".agents/skills",
|
|
112
|
+
"linkTargets": [
|
|
113
|
+
".cursor/skills"
|
|
114
|
+
],
|
|
115
|
+
"skills": {
|
|
116
|
+
"rspack-best-practices": "https://github.com/vercel-labs/agent-skills.git#path:/skills/rspack-best-practices"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
字段含义:
|
|
122
|
+
|
|
123
|
+
- `installDir`
|
|
124
|
+
- 默认值:`.agents/skills`
|
|
125
|
+
- `linkTargets`
|
|
126
|
+
- 其他需要暴露 skill 的目录,采用软链形式同步
|
|
127
|
+
- `skills`
|
|
128
|
+
- 类似 `dependencies`
|
|
129
|
+
- key 为 skill 名称
|
|
130
|
+
- value 为 specifier
|
|
131
|
+
|
|
132
|
+
### skills-lock.yaml 结构
|
|
133
|
+
|
|
134
|
+
锁文件负责保存可重放的解析结果,首版只记录安装所需事实。
|
|
135
|
+
|
|
136
|
+
建议结构:
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
lockfileVersion: '0.1'
|
|
140
|
+
|
|
141
|
+
installDir: .agents/skills
|
|
142
|
+
linkTargets:
|
|
143
|
+
- .cursor/skills
|
|
144
|
+
|
|
145
|
+
skills:
|
|
146
|
+
rspack-best-practices:
|
|
147
|
+
specifier: https://github.com/vercel-labs/agent-skills.git#path:/skills/rspack-best-practices
|
|
148
|
+
resolution:
|
|
149
|
+
type: git
|
|
150
|
+
url: https://github.com/vercel-labs/agent-skills.git
|
|
151
|
+
commit: 6cb0992a176f2ca142e19f64dca8ac12025b035e
|
|
152
|
+
path: skills/rspack-best-practices
|
|
153
|
+
digest: sha256-xxxxx
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### specifier 设计
|
|
157
|
+
|
|
158
|
+
目标是尽量对齐 pnpm。
|
|
159
|
+
|
|
160
|
+
已确认的方向:
|
|
161
|
+
|
|
162
|
+
- Git/GitHub/GitLab 尽量使用 pnpm 风格:
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
repo.git#ref&path:/relative/path
|
|
166
|
+
repo.git#path:/relative/path
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
- file 类型也支持统一的 `#path:/...` 形式,便于解析器统一
|
|
170
|
+
- git 类型在 manifest 中尽量保存为完整 `.git` URL,而不是自定义 `github:` 协议
|
|
171
|
+
|
|
172
|
+
支持的输入类型:
|
|
173
|
+
|
|
174
|
+
- GitHub shorthand
|
|
175
|
+
- Full GitHub URL
|
|
176
|
+
- 指向 repo 子目录的 GitHub URL
|
|
177
|
+
- GitLab URL
|
|
178
|
+
- 任意 git URL
|
|
179
|
+
- 本地路径
|
|
180
|
+
- npm 包形式
|
|
181
|
+
|
|
182
|
+
示例:
|
|
183
|
+
|
|
184
|
+
```sh
|
|
185
|
+
npx skills add vercel-labs/agent-skills --skill rspack-best-practices
|
|
186
|
+
npx skills add https://github.com/vercel-labs/agent-skills
|
|
187
|
+
npx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines
|
|
188
|
+
npx skills add https://gitlab.com/org/repo
|
|
189
|
+
npx skills add git@github.com:vercel-labs/agent-skills.git
|
|
190
|
+
npx skills add ./my-local-skills
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
manifest 中的示例 specifier:
|
|
194
|
+
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"skills": {
|
|
198
|
+
"rspack-best-practices": "https://github.com/vercel-labs/agent-skills.git#path:/skills/rspack-best-practices",
|
|
199
|
+
"web-design-guidelines": "https://github.com/vercel-labs/agent-skills.git#main&path:/skills/web-design-guidelines",
|
|
200
|
+
"foo": "file:./my-local-skills#path:/skills/foo",
|
|
201
|
+
"foo-skill": "npm:@scope/skills-pack@1.2.3#path:/skills/foo-skill"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### add 的职责
|
|
207
|
+
|
|
208
|
+
`skills add <specifier> [--skill <name>]`:
|
|
209
|
+
|
|
210
|
+
1. 解析用户输入
|
|
211
|
+
2. 生成规范化 specifier
|
|
212
|
+
3. 写入/更新 `skills.json`
|
|
213
|
+
4. 解析来源并锁定结果
|
|
214
|
+
5. 写入/更新 `skills-lock.yaml`
|
|
215
|
+
|
|
216
|
+
边界:
|
|
217
|
+
|
|
218
|
+
- `add` 负责“声明 + 锁定”
|
|
219
|
+
- 同名 skill 且 specifier 变更时,默认报冲突,不静默覆盖
|
|
220
|
+
- 对用户显式输入的 ref(如 `tree/main`)可保留在 manifest 中
|
|
221
|
+
|
|
222
|
+
典型场景:
|
|
223
|
+
|
|
224
|
+
#### repo + `--skill`
|
|
225
|
+
|
|
226
|
+
```sh
|
|
227
|
+
skills add vercel-labs/agent-skills --skill rspack-best-practices
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
可落盘为:
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"skills": {
|
|
235
|
+
"rspack-best-practices": "https://github.com/vercel-labs/agent-skills.git#path:/skills/rspack-best-practices"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
#### 直接 skill 子目录 URL
|
|
241
|
+
|
|
242
|
+
```sh
|
|
243
|
+
skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
可落盘为:
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"skills": {
|
|
251
|
+
"web-design-guidelines": "https://github.com/vercel-labs/agent-skills.git#main&path:/skills/web-design-guidelines"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### 本地目录
|
|
257
|
+
|
|
258
|
+
```sh
|
|
259
|
+
skills add ./my-local-skills --skill foo
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
可落盘为:
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"skills": {
|
|
267
|
+
"foo": "file:./my-local-skills#path:/skills/foo"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
若用户直接传单个 skill 目录:
|
|
273
|
+
|
|
274
|
+
```sh
|
|
275
|
+
skills add ./my-local-skills/skills/foo
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
则可直接写为:
|
|
279
|
+
|
|
280
|
+
```json
|
|
281
|
+
{
|
|
282
|
+
"skills": {
|
|
283
|
+
"foo": "file:./my-local-skills/skills/foo"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### install 的职责
|
|
289
|
+
|
|
290
|
+
`skills install`:
|
|
291
|
+
|
|
292
|
+
1. 读取 `skills.json` 和 `skills-lock.yaml`
|
|
293
|
+
2. 校验 lock 覆盖当前声明
|
|
294
|
+
3. 按 lock 物化安装到 `installDir`
|
|
295
|
+
4. 为 `linkTargets` 创建软链
|
|
296
|
+
|
|
297
|
+
边界:
|
|
298
|
+
|
|
299
|
+
- `install` 只消费 lock,不重新解析来源
|
|
300
|
+
- 锁过期或缺失时,报错并提示重新执行 `add`
|
|
301
|
+
- 单个 skill 安装失败则整体失败
|
|
302
|
+
|
|
303
|
+
### manifest 与 lock 一致性规则
|
|
304
|
+
|
|
305
|
+
`install` 时需要验证:
|
|
306
|
+
|
|
307
|
+
- `skills.json` 中每个 `skills[name]` 在 lock 中存在同名条目
|
|
308
|
+
- lock 条目的 `specifier` 与 manifest 完全一致
|
|
309
|
+
- lock 顶层 `installDir` / `linkTargets` 与 manifest 一致
|
|
310
|
+
|
|
311
|
+
任一不一致,则视为 lock 失效。
|
|
312
|
+
|
|
313
|
+
### 安装状态与快速跳过
|
|
314
|
+
|
|
315
|
+
为避免在 plugin 模式下每次都执行完整安装,建议写入一个状态文件:
|
|
316
|
+
|
|
317
|
+
```text
|
|
318
|
+
.agents/skills/.skills-pm-install-state.json
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
示例:
|
|
322
|
+
|
|
323
|
+
```json
|
|
324
|
+
{
|
|
325
|
+
"lockDigest": "sha256-abc",
|
|
326
|
+
"installDir": ".agents/skills",
|
|
327
|
+
"linkTargets": [".cursor/skills"],
|
|
328
|
+
"installedAt": "2026-03-30T12:00:00.000Z",
|
|
329
|
+
"installerVersion": "0.1.0"
|
|
330
|
+
}
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
每次自动安装时:
|
|
334
|
+
|
|
335
|
+
1. 读取 `skills-lock.yaml`
|
|
336
|
+
2. 计算整体 digest
|
|
337
|
+
3. 与状态文件中的 `lockDigest` 对比
|
|
338
|
+
4. 一致则直接跳过
|
|
339
|
+
5. 不一致才真正执行安装
|
|
340
|
+
|
|
341
|
+
### 安装目录与软链策略
|
|
342
|
+
|
|
343
|
+
真实安装目录默认:
|
|
344
|
+
|
|
345
|
+
```text
|
|
346
|
+
.agents/skills/<skillName>
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
例如:
|
|
350
|
+
|
|
351
|
+
```text
|
|
352
|
+
.agents/
|
|
353
|
+
skills/
|
|
354
|
+
rspack-best-practices/
|
|
355
|
+
SKILL.md
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
若 `linkTargets` 包含 `.cursor/skills`,则采用“每个 skill 单独软链”的方式:
|
|
359
|
+
|
|
360
|
+
```text
|
|
361
|
+
.cursor/
|
|
362
|
+
skills/
|
|
363
|
+
rspack-best-practices -> ../../.agents/skills/rspack-best-practices
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
规则:
|
|
367
|
+
|
|
368
|
+
- 每个 skill 单独建软链,不直接整体软链整个目录
|
|
369
|
+
- 只覆盖本工具已管理的安装目录/软链
|
|
370
|
+
- 不覆盖用户自己创建的普通文件或普通目录
|
|
371
|
+
- 可在每个安装目录中写入 `.skills-pm.json` 作为管理标记
|
|
372
|
+
- `0.1.0` 不做自动 prune / delete
|
|
373
|
+
|
|
374
|
+
### skill 目录合法性检查
|
|
375
|
+
|
|
376
|
+
安装一个 skill 前,首版至少检查:
|
|
377
|
+
|
|
378
|
+
- 目标目录存在
|
|
379
|
+
- 目录内包含 `SKILL.md`
|
|
380
|
+
|
|
381
|
+
允许存在的附加资源包括:
|
|
382
|
+
|
|
383
|
+
- `references/`
|
|
384
|
+
- `scripts/`
|
|
385
|
+
- `assets/`
|
|
386
|
+
|
|
387
|
+
若目录存在但缺少 `SKILL.md`,报错示例:
|
|
388
|
+
|
|
389
|
+
```text
|
|
390
|
+
Invalid skill at <path>: missing SKILL.md
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### 缓存策略
|
|
394
|
+
|
|
395
|
+
建议使用项目内缓存目录:
|
|
396
|
+
|
|
397
|
+
```text
|
|
398
|
+
node_modules/.cache/skills-pm/
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
用于缓存:
|
|
402
|
+
|
|
403
|
+
- git repo checkout / fetch 结果
|
|
404
|
+
- npm tarball 解包结果
|
|
405
|
+
- digest 结果
|
|
406
|
+
- 规范化后的 source metadata
|
|
407
|
+
|
|
408
|
+
### 错误处理与退出码
|
|
409
|
+
|
|
410
|
+
`0.1.0` 先统一退出码:
|
|
411
|
+
|
|
412
|
+
- 成功:`0`
|
|
413
|
+
- 失败:`1`
|
|
414
|
+
|
|
415
|
+
典型失败类型:
|
|
416
|
+
|
|
417
|
+
- 用户输入错误
|
|
418
|
+
- 来源解析失败
|
|
419
|
+
- 写文件失败
|
|
420
|
+
- lock 缺失或失效
|
|
421
|
+
- 安装目标冲突
|
|
422
|
+
- 远程获取失败
|
|
423
|
+
|
|
424
|
+
plugin 模式下:
|
|
425
|
+
|
|
426
|
+
- 没有 `skills.json`:跳过
|
|
427
|
+
- 有 `skills.json` 但没有 `skills-lock.yaml`:失败
|
|
428
|
+
|
|
429
|
+
### 并发与原子性
|
|
430
|
+
|
|
431
|
+
建议增加项目级锁文件:
|
|
432
|
+
|
|
433
|
+
```text
|
|
434
|
+
.agents/.skills-pm.lock
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
行为:
|
|
438
|
+
|
|
439
|
+
- 安装前尝试获取锁
|
|
440
|
+
- 避免多个进程同时替换同一目录
|
|
441
|
+
- source fetch 可以有限并发
|
|
442
|
+
- 物化安装与软链替换阶段优先保证稳定,可串行执行
|
|
443
|
+
|
|
444
|
+
安装时采用临时目录 + 原子替换策略,避免半安装状态。
|
|
445
|
+
|
|
446
|
+
### 测试策略
|
|
447
|
+
|
|
448
|
+
`0.1.0` 建议覆盖四层测试:
|
|
449
|
+
|
|
450
|
+
1. 单元测试
|
|
451
|
+
- specifier 解析
|
|
452
|
+
- manifest / lock 读写
|
|
453
|
+
- digest 计算
|
|
454
|
+
- 路径规范化
|
|
455
|
+
- 软链目标计算
|
|
456
|
+
2. 集成测试
|
|
457
|
+
- `skills add` 生成 `skills.json`
|
|
458
|
+
- `skills add` 更新 `skills-lock.yaml`
|
|
459
|
+
- `skills install` 安装本地 file source
|
|
460
|
+
- `skills install` 创建 linkTargets
|
|
461
|
+
3. fixture 仓库测试
|
|
462
|
+
- git repo with `/skills/foo`
|
|
463
|
+
- local directory with skill
|
|
464
|
+
- npm package fixture with `/skills/bar`
|
|
465
|
+
4. pnpm 插件联调测试
|
|
466
|
+
- 最小 workspace fixture 执行 `pnpm install`
|
|
467
|
+
- 验证插件自动加载、真实安装、软链建立和二次 no-op
|
|
468
|
+
|
|
469
|
+
### 构建与发布形态
|
|
470
|
+
|
|
471
|
+
- `skills-pm`
|
|
472
|
+
- 正常 CLI 包
|
|
473
|
+
- 提供 `bin`
|
|
474
|
+
- `pnpm-plugin-skills`
|
|
475
|
+
- 必须是自包含发布物
|
|
476
|
+
- 不声明运行时依赖
|
|
477
|
+
- 不依赖 lifecycle scripts
|
|
478
|
+
- `pnpmfile.cjs` 只 require 本包内已打包好的 runtime
|
|
479
|
+
|
|
480
|
+
建议发布包结构:
|
|
481
|
+
|
|
482
|
+
```text
|
|
483
|
+
pnpmfile.cjs
|
|
484
|
+
dist/
|
|
485
|
+
runtime.js
|
|
486
|
+
package.json
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
`pnpmfile.cjs` 示例:
|
|
490
|
+
|
|
491
|
+
```js
|
|
492
|
+
const { preResolution } = require('./dist/runtime')
|
|
493
|
+
|
|
494
|
+
module.exports = {
|
|
495
|
+
hooks: {
|
|
496
|
+
preResolution,
|
|
497
|
+
},
|
|
498
|
+
}
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### 0.1.0 推荐实现顺序
|
|
502
|
+
|
|
503
|
+
1. `skills.json` / `skills-lock.yaml` schema 与读写
|
|
504
|
+
2. `file:` source + 本地 skill 安装
|
|
505
|
+
3. `skills install` 的真实目录 + 软链逻辑
|
|
506
|
+
4. `skills add` 的本地路径支持
|
|
507
|
+
5. git source resolve + install
|
|
508
|
+
6. `pnpm-plugin-skills` `preResolution` 接入
|
|
509
|
+
7. no-op install state / cache
|
|
510
|
+
8. npm source 支持
|
|
511
|
+
|
|
512
|
+
### 0.1.0 明确不做的事情
|
|
513
|
+
|
|
514
|
+
- 不做自动 prune / delete
|
|
515
|
+
- 不做 skill 间依赖关系解析
|
|
516
|
+
- 不做 registry 协议设计
|
|
517
|
+
- 不做 install 阶段的自动升级/重新锁定
|
|
518
|
+
- 不做复杂的退出码分层
|
|
519
|
+
- 不做全局 store 设计
|
|
520
|
+
|
|
521
|
+
## 当前待补充设计
|
|
522
|
+
|
|
523
|
+
1. resolver / fetcher 的更细模块边界
|
|
524
|
+
2. CLI 输出格式与日志级别
|
|
525
|
+
3. `skills add` 在未传 `--skill` 场景下与外部工具对齐的精确行为
|
|
526
|
+
4. npm source 的首版优先级与实现范围
|
|
527
|
+
|
|
528
|
+
## 备注
|
|
529
|
+
|
|
530
|
+
这是当前阶段的设计草稿,用于先保存共识;后续会继续补齐剩余设计并整理为正式设计文档。
|