@agile-team/wl-skills-kit 2.4.1 → 2.4.2
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/CHANGELOG.md +16 -0
- package/README.md +46 -2
- package/bin/wl-skills.js +152 -36
- package/docs/ai/345/205/250/346/231/257/345/210/206/346/236/220.md +3 -3
- package/files/.github/guides/architecture.md +6 -3
- package/files/.github/guides/usage.md +16 -3
- package/files/.github/skills/_compat/README.md +4 -2
- package/package.json +31 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.2] - 2026-05-05
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- 更新 README、业务项目指南、架构说明和多编辑器兼容文档,补齐 2.4.x 生命周期、MCP、manifest、规范插件和桥接说明
|
|
8
|
+
- 同步版本文案到 2.4.2,避免发布文档仍停留在 2.4.0/2.4.1
|
|
9
|
+
- 明确 `@agile-team/wk-skills-ui` 仅为可选桥接包,两者不建立强依赖
|
|
10
|
+
|
|
11
|
+
## [2.4.1] - 2026-05-04
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- CLI 安装完成后新增 `@agile-team/wk-skills-ui` 可选桥接提醒,保持两包独立分工、不强耦合
|
|
16
|
+
- 新增 `standards:init` 脚本,统一指向 `npx @robot-admin/git-standards init`
|
|
17
|
+
- README 补充 wk-skills-ui 可选桥接说明与规范插件入口
|
|
18
|
+
|
|
3
19
|
## [2.4.0] - 2026-05-02
|
|
4
20
|
|
|
5
21
|
### 🚀 Agent Pipeline + MCP 项目感知 + CLI 质量工具
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @agile-team/wl-skills-kit
|
|
2
2
|
|
|
3
|
-
**AI Skill 模板包 v2.4.
|
|
3
|
+
**AI Skill 模板包 v2.4.2** — 一条命令将 13 条编码规范、9 个 AI Skill、14 个 MCP Tool、多编辑器规则、MCP 配置、组件文档和领域样例导入 Vue 3 项目。
|
|
4
4
|
|
|
5
5
|
让 AI 编辑器(Copilot / Cursor / Windsurf / Claude Code / Cline / Kiro / Trae / Qoder / 通用 Agents)**真正理解项目规范**,从原型/详设到完整页面代码全流程自动化。
|
|
6
6
|
|
|
@@ -11,11 +11,27 @@
|
|
|
11
11
|
```bash
|
|
12
12
|
npx @robot-admin/git-standards init # 工程化前置(必须)
|
|
13
13
|
npx @agile-team/wl-skills-kit # 安装 AI 体系
|
|
14
|
+
npm run standards:init # 本包维护/业务项目均可复用的规范插件入口
|
|
14
15
|
# 在 AI 对话中:
|
|
15
16
|
"扫描 docs/prototypes/ 下的原型生成页面清单"
|
|
16
17
|
"基于上一步生成所有 api.md,再 codegen 出页面"
|
|
17
18
|
```
|
|
18
19
|
|
|
20
|
+
> 可选桥接:如业务项目也需要统一 UI 风格、老系统化妆层和 UI 扫描修复,可单独安装 `@agile-team/wk-skills-ui`。两包职责独立,不互相强依赖:`wl-skills-kit` 负责编码规范/页面生成/菜单字典权限,`wk-skills-ui` 负责视觉一致性/设计令牌/化妆层/Runtime 渲染。
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 版本亮点
|
|
25
|
+
|
|
26
|
+
当前 2.4.x 版本重点完善生命周期、规范插件和跨包协作体验:
|
|
27
|
+
|
|
28
|
+
- `init/update/diff/clean/check/validate/export` 覆盖安装、升级、对比、清理、体检、页面完整性检查和基线导出
|
|
29
|
+
- manifest 记录安装文件哈希,`reports/`、`src/components/`、`src/types/` 等关键资产受到保护
|
|
30
|
+
- 自动生成 Copilot、Claude Code、Cursor、Windsurf、Cline、Kiro、Trae、Qoder、通用 Agents 规则文件
|
|
31
|
+
- 内置 MCP Server,支持菜单、字典、权限和项目感知类工具
|
|
32
|
+
- 接入 `@robot-admin/git-standards`,仓库维护和业务项目可共用 lint、commitlint、husky、commitizen
|
|
33
|
+
- 可选桥接 `@agile-team/wk-skills-ui`:kit 负责页面/规范/菜单字典权限,wk-skills-ui 负责 UI 风格/化妆层/Runtime
|
|
34
|
+
|
|
19
35
|
---
|
|
20
36
|
|
|
21
37
|
## 这个包到底干什么?
|
|
@@ -134,6 +150,7 @@ wl-skills-kit/ ← 你正看的这个仓库
|
|
|
134
150
|
├── .clinerules Cline
|
|
135
151
|
├── .kiro/steering/conventions.md Kiro(含 inclusion frontmatter)
|
|
136
152
|
├── .trae/rules/conventions.md Trae(含 alwaysApply frontmatter)
|
|
153
|
+
├── .qoder/rules/conventions.md Qoder
|
|
137
154
|
│
|
|
138
155
|
├── docs/ 12 个组件 API 文档
|
|
139
156
|
├── demo/ 13 个领域样例
|
|
@@ -143,7 +160,7 @@ wl-skills-kit/ ← 你正看的这个仓库
|
|
|
143
160
|
```
|
|
144
161
|
|
|
145
162
|
> **业务项目方准则**:
|
|
146
|
-
> - 主入口是 `.github/copilot-instructions.md`(Copilot
|
|
163
|
+
> - 主入口是 `.github/copilot-instructions.md`(Copilot 用),**其他根配置文件是它的拷贝 + 各自特化 frontmatter**
|
|
147
164
|
> - 修改规范 → **不要**改业务项目里的副本,**升级 wl-skills-kit 包 + `update`** 才不会被覆盖
|
|
148
165
|
> - reports/ 里的内容是团队累积数据,`update` 不会覆盖,可放心 commit
|
|
149
166
|
|
|
@@ -151,6 +168,9 @@ wl-skills-kit/ ← 你正看的这个仓库
|
|
|
151
168
|
|
|
152
169
|
## CLI 命令
|
|
153
170
|
|
|
171
|
+
所有命令默认作用于当前工作目录;如需先预览,请加 `--dry-run`。
|
|
172
|
+
|
|
173
|
+
|
|
154
174
|
```bash
|
|
155
175
|
# 全量安装(默认)
|
|
156
176
|
npx @agile-team/wl-skills-kit
|
|
@@ -184,6 +204,17 @@ npx @agile-team/wl-skills-kit update --dry-run
|
|
|
184
204
|
|
|
185
205
|
---
|
|
186
206
|
|
|
207
|
+
## 生命周期文件
|
|
208
|
+
|
|
209
|
+
安装后会生成 `.wl-skills-manifest.json`,记录本次安装版本和文件哈希:
|
|
210
|
+
|
|
211
|
+
- `update`:对比 manifest 与包内文件,仅更新有变化的内容
|
|
212
|
+
- `diff`:查看当前项目与最新 kit 内容差异
|
|
213
|
+
- `clean`:按 manifest 清理 AI 辅助文件,默认保留 `src/components/` 和 `src/types/`
|
|
214
|
+
- `check`:检查 Node、MCP、manifest 和工程化配置
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
187
218
|
## MCP Tools 概览
|
|
188
219
|
|
|
189
220
|
| 类别 | Tools |
|
|
@@ -264,6 +295,19 @@ npx @agile-team/wl-skills-kit update
|
|
|
264
295
|
|
|
265
296
|
---
|
|
266
297
|
|
|
298
|
+
## 与 wk-skills-ui 的边界
|
|
299
|
+
|
|
300
|
+
`wl-skills-kit` 和 `wk-skills-ui` 是可组合但不强耦合的两个包:
|
|
301
|
+
|
|
302
|
+
| 包 | 主要职责 | 典型触发 |
|
|
303
|
+
|---|---|---|
|
|
304
|
+
| `wl-skills-kit` | 编码规范、页面生成、菜单/字典/权限同步、Agent Pipeline | “生成页面”“同步菜单”“规范审计” |
|
|
305
|
+
| `wk-skills-ui` | UI 风格一致性、老项目化妆层、设计令牌、Runtime 渲染、UI 扫描修复 | “统一 UI 风格”“老项目化妆”“UI 扫描修复” |
|
|
306
|
+
|
|
307
|
+
如果业务项目同时安装两者,AI 可先用 kit 生成/审计页面,再用 wk-skills-ui 做视觉一致性扫描;任意一包都不自动安装另一包。
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
267
311
|
## 进一步阅读
|
|
268
312
|
|
|
269
313
|
- 📚 业务方使用指南:`.github/guides/usage.md`(业务项目内)
|
package/bin/wl-skills.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* wl-skills-kit CLI v2.4.
|
|
4
|
+
* wl-skills-kit CLI v2.4.2
|
|
5
5
|
*
|
|
6
6
|
* 命令:
|
|
7
7
|
* init 全量安装(默认,向后兼容)
|
|
@@ -143,7 +143,7 @@ function removeFileAndEmptyParents(filePath) {
|
|
|
143
143
|
} else {
|
|
144
144
|
break;
|
|
145
145
|
}
|
|
146
|
-
} catch
|
|
146
|
+
} catch {
|
|
147
147
|
break;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
@@ -154,7 +154,7 @@ function readManifest() {
|
|
|
154
154
|
if (fs.existsSync(MANIFEST_PATH)) {
|
|
155
155
|
try {
|
|
156
156
|
return JSON.parse(fs.readFileSync(MANIFEST_PATH, "utf8"));
|
|
157
|
-
} catch
|
|
157
|
+
} catch {
|
|
158
158
|
return null;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -332,9 +332,11 @@ function runInstall(incremental) {
|
|
|
332
332
|
if (dryRun) {
|
|
333
333
|
const exists = fs.existsSync(dest);
|
|
334
334
|
console.log(" " + (exists ? "覆盖" : "新增") + " " + relPath);
|
|
335
|
-
exists
|
|
335
|
+
if (exists) updated++;
|
|
336
|
+
else created++;
|
|
336
337
|
} else {
|
|
337
|
-
copyFileSafe(src, dest) === "created"
|
|
338
|
+
if (copyFileSafe(src, dest) === "created") created++;
|
|
339
|
+
else updated++;
|
|
338
340
|
}
|
|
339
341
|
}
|
|
340
342
|
|
|
@@ -372,9 +374,11 @@ function runInstall(incremental) {
|
|
|
372
374
|
console.log(
|
|
373
375
|
" " + (ecExists ? "覆盖" : "新增") + " [编辑器] " + ecPath,
|
|
374
376
|
);
|
|
375
|
-
ecExists
|
|
377
|
+
if (ecExists) updated++;
|
|
378
|
+
else created++;
|
|
376
379
|
} else {
|
|
377
|
-
writeFile(ecDest, ecContent) === "created"
|
|
380
|
+
if (writeFile(ecDest, ecContent) === "created") created++;
|
|
381
|
+
else updated++;
|
|
378
382
|
}
|
|
379
383
|
}
|
|
380
384
|
}
|
|
@@ -411,6 +415,20 @@ function runInstall(incremental) {
|
|
|
411
415
|
|
|
412
416
|
if (!dryRun) writeManifest(newManifest);
|
|
413
417
|
|
|
418
|
+
// ── Step 5: 非耦合桥接提醒(不自动安装 wk-skills-ui)───────────────────────
|
|
419
|
+
|
|
420
|
+
const targetPkgPath = path.join(TARGET_DIR, "package.json");
|
|
421
|
+
let hasUiPackage = false;
|
|
422
|
+
if (fs.existsSync(targetPkgPath)) {
|
|
423
|
+
try {
|
|
424
|
+
const targetPkg = JSON.parse(fs.readFileSync(targetPkgPath, "utf8"));
|
|
425
|
+
const deps = { ...targetPkg.dependencies, ...targetPkg.devDependencies };
|
|
426
|
+
hasUiPackage = Boolean(deps["@agile-team/wk-skills-ui"]);
|
|
427
|
+
} catch {
|
|
428
|
+
hasUiPackage = false;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
414
432
|
// ── 输出统计 ──────────────────────────────────────────────────────
|
|
415
433
|
|
|
416
434
|
const total = created + updated + unchanged;
|
|
@@ -455,6 +473,19 @@ function runInstall(incremental) {
|
|
|
455
473
|
}
|
|
456
474
|
}
|
|
457
475
|
console.log("");
|
|
476
|
+
if (hasUiPackage) {
|
|
477
|
+
console.log(
|
|
478
|
+
" ℹ 检测到 @agile-team/wk-skills-ui:两包独立分工,可组合触发 UI 风格对齐流程。",
|
|
479
|
+
);
|
|
480
|
+
} else {
|
|
481
|
+
console.log(
|
|
482
|
+
" ℹ 可选桥接:如需统一 UI 风格/老项目化妆层,可安装 @agile-team/wk-skills-ui。",
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
console.log(
|
|
486
|
+
" ℹ 规范插件:建议执行 npx @robot-admin/git-standards init 接入代码质量与提交规范。",
|
|
487
|
+
);
|
|
488
|
+
console.log("");
|
|
458
489
|
}
|
|
459
490
|
|
|
460
491
|
// ─── 命令: clean ────────────────────────────────────────────────────────
|
|
@@ -537,7 +568,11 @@ function expectedManifestFiles() {
|
|
|
537
568
|
for (const relPath of files) {
|
|
538
569
|
expected[relPath] = fileMd5(path.join(FILES_DIR, relPath));
|
|
539
570
|
}
|
|
540
|
-
const instructionsSrc = path.join(
|
|
571
|
+
const instructionsSrc = path.join(
|
|
572
|
+
FILES_DIR,
|
|
573
|
+
".github",
|
|
574
|
+
"copilot-instructions.md",
|
|
575
|
+
);
|
|
541
576
|
if (fs.existsSync(instructionsSrc)) {
|
|
542
577
|
const raw = fs.readFileSync(instructionsSrc, "utf8");
|
|
543
578
|
for (const [ecPath, ecContent] of getEditorConfigs(raw)) {
|
|
@@ -567,19 +602,34 @@ function runCheck() {
|
|
|
567
602
|
|
|
568
603
|
const toolFiles = [".prettierrc.js", "eslint.config.ts", ".husky"];
|
|
569
604
|
for (const rel of toolFiles) {
|
|
570
|
-
add(
|
|
605
|
+
add(
|
|
606
|
+
rel,
|
|
607
|
+
fs.existsSync(path.join(TARGET_DIR, rel)),
|
|
608
|
+
fs.existsSync(path.join(TARGET_DIR, rel)) ? "存在" : "缺失",
|
|
609
|
+
);
|
|
571
610
|
}
|
|
572
611
|
|
|
573
612
|
const manifest = readManifest();
|
|
574
|
-
add(
|
|
613
|
+
add(
|
|
614
|
+
MANIFEST_NAME,
|
|
615
|
+
Boolean(manifest),
|
|
616
|
+
manifest ? "已安装 v" + manifest.version : "未安装",
|
|
617
|
+
);
|
|
575
618
|
|
|
576
|
-
const envPath = path.join(
|
|
619
|
+
const envPath = path.join(
|
|
620
|
+
TARGET_DIR,
|
|
621
|
+
".github",
|
|
622
|
+
"skills",
|
|
623
|
+
"sync",
|
|
624
|
+
"env.local.json",
|
|
625
|
+
);
|
|
577
626
|
let envOk = false;
|
|
578
627
|
let envDetail = "缺失";
|
|
579
628
|
if (fs.existsSync(envPath)) {
|
|
580
629
|
try {
|
|
581
630
|
const env = JSON.parse(fs.readFileSync(envPath, "utf8"));
|
|
582
|
-
const gatewayOk =
|
|
631
|
+
const gatewayOk =
|
|
632
|
+
env.gatewayPath && !String(env.gatewayPath).includes("你的网关");
|
|
583
633
|
const tokenOk = env.token && !String(env.token).includes("Bearer Token");
|
|
584
634
|
envOk = Boolean(gatewayOk && tokenOk);
|
|
585
635
|
envDetail = envOk ? "已填写 gatewayPath/token" : "存在但仍含占位值";
|
|
@@ -589,15 +639,33 @@ function runCheck() {
|
|
|
589
639
|
}
|
|
590
640
|
add("MCP env.local.json", envOk, envDetail);
|
|
591
641
|
|
|
592
|
-
const mcpServer = path.join(
|
|
593
|
-
|
|
642
|
+
const mcpServer = path.join(
|
|
643
|
+
TARGET_DIR,
|
|
644
|
+
"node_modules",
|
|
645
|
+
"@agile-team",
|
|
646
|
+
"wl-skills-kit",
|
|
647
|
+
"mcp",
|
|
648
|
+
"server.js",
|
|
649
|
+
);
|
|
650
|
+
add(
|
|
651
|
+
"MCP server",
|
|
652
|
+
fs.existsSync(mcpServer) ||
|
|
653
|
+
fs.existsSync(path.join(__dirname, "..", "mcp", "server.js")),
|
|
654
|
+
"server.js 可发现",
|
|
655
|
+
);
|
|
594
656
|
|
|
595
657
|
for (const item of checks) {
|
|
596
|
-
console.log(
|
|
658
|
+
console.log(
|
|
659
|
+
" " + statusIcon(item.ok) + " " + item.name + " — " + item.detail,
|
|
660
|
+
);
|
|
597
661
|
}
|
|
598
662
|
const failed = checks.filter((item) => !item.ok).length;
|
|
599
663
|
console.log("");
|
|
600
|
-
console.log(
|
|
664
|
+
console.log(
|
|
665
|
+
failed === 0
|
|
666
|
+
? " ✔ 环境预检通过"
|
|
667
|
+
: " ⚠ 环境预检完成,发现 " + failed + " 项需处理",
|
|
668
|
+
);
|
|
601
669
|
console.log("");
|
|
602
670
|
if (failed > 0) process.exitCode = 1;
|
|
603
671
|
}
|
|
@@ -633,7 +701,9 @@ function runDiff() {
|
|
|
633
701
|
}
|
|
634
702
|
}
|
|
635
703
|
|
|
636
|
-
console.log(
|
|
704
|
+
console.log(
|
|
705
|
+
" 当前 manifest: " + (manifest ? "v" + manifest.version : "未找到"),
|
|
706
|
+
);
|
|
637
707
|
console.log(" 最新 kit: v" + PKG.version);
|
|
638
708
|
console.log(" 新增/缺失: " + added.length);
|
|
639
709
|
console.log(" 内容不同: " + changed.length);
|
|
@@ -645,7 +715,8 @@ function runDiff() {
|
|
|
645
715
|
if (list.length === 0) return;
|
|
646
716
|
console.log(" " + title + ":");
|
|
647
717
|
for (const relPath of list.slice(0, 80)) console.log(" - " + relPath);
|
|
648
|
-
if (list.length > 80)
|
|
718
|
+
if (list.length > 80)
|
|
719
|
+
console.log(" ... 还有 " + (list.length - 80) + " 项");
|
|
649
720
|
console.log("");
|
|
650
721
|
}
|
|
651
722
|
|
|
@@ -671,7 +742,9 @@ function scanPageDirs(scanRel) {
|
|
|
671
742
|
let apiConfigCount = 0;
|
|
672
743
|
const dataPath = path.join(TARGET_DIR, dir, "data.ts");
|
|
673
744
|
if (fs.existsSync(dataPath)) {
|
|
674
|
-
apiConfigCount = (
|
|
745
|
+
apiConfigCount = (
|
|
746
|
+
fs.readFileSync(dataPath, "utf8").match(/API_CONFIG/g) || []
|
|
747
|
+
).length;
|
|
675
748
|
}
|
|
676
749
|
pages.push({
|
|
677
750
|
dir,
|
|
@@ -685,7 +758,8 @@ function scanPageDirs(scanRel) {
|
|
|
685
758
|
}
|
|
686
759
|
|
|
687
760
|
function runValidate() {
|
|
688
|
-
const scanPath =
|
|
761
|
+
const scanPath =
|
|
762
|
+
args.find((a) => !a.startsWith("-") && a !== command) || "src/views";
|
|
689
763
|
const pages = scanPageDirs(scanPath);
|
|
690
764
|
console.log("");
|
|
691
765
|
console.log(" wl-skills-kit v" + PKG.version + " [validate]");
|
|
@@ -701,9 +775,20 @@ function runValidate() {
|
|
|
701
775
|
|
|
702
776
|
const issues = [];
|
|
703
777
|
for (const page of pages) {
|
|
704
|
-
if (!page.hasDataTs)
|
|
705
|
-
|
|
706
|
-
|
|
778
|
+
if (!page.hasDataTs)
|
|
779
|
+
issues.push({
|
|
780
|
+
level: "warn",
|
|
781
|
+
dir: page.dir,
|
|
782
|
+
text: "缺 data.ts(需结合页面复杂度判断)",
|
|
783
|
+
});
|
|
784
|
+
if (!page.hasIndexScss)
|
|
785
|
+
issues.push({ level: "warn", dir: page.dir, text: "缺 index.scss" });
|
|
786
|
+
if (page.apiConfigCount > 0 && !page.hasApiMd)
|
|
787
|
+
issues.push({
|
|
788
|
+
level: "warn",
|
|
789
|
+
dir: page.dir,
|
|
790
|
+
text: "检测到 API_CONFIG 但缺 api.md",
|
|
791
|
+
});
|
|
707
792
|
}
|
|
708
793
|
|
|
709
794
|
console.log(" 页面目录: " + pages.length);
|
|
@@ -721,7 +806,12 @@ function parseMarkdownTable(content) {
|
|
|
721
806
|
return content
|
|
722
807
|
.split(/\r?\n/)
|
|
723
808
|
.filter((line) => /^\|.*\|$/.test(line) && !/^\|\s*-+/.test(line))
|
|
724
|
-
.map((line) =>
|
|
809
|
+
.map((line) =>
|
|
810
|
+
line
|
|
811
|
+
.split("|")
|
|
812
|
+
.slice(1, -1)
|
|
813
|
+
.map((cell) => cell.trim()),
|
|
814
|
+
);
|
|
725
815
|
}
|
|
726
816
|
|
|
727
817
|
function runExport() {
|
|
@@ -743,7 +833,11 @@ function runExport() {
|
|
|
743
833
|
if (!fs.existsSync(full)) continue;
|
|
744
834
|
const content = fs.readFileSync(full, "utf8");
|
|
745
835
|
let rows = parseMarkdownTable(content);
|
|
746
|
-
if (rows.length === 0)
|
|
836
|
+
if (rows.length === 0)
|
|
837
|
+
rows = content
|
|
838
|
+
.split(/\r?\n/)
|
|
839
|
+
.filter(Boolean)
|
|
840
|
+
.map((line) => [line]);
|
|
747
841
|
sheets.push([sheetName, rows]);
|
|
748
842
|
addedSheets++;
|
|
749
843
|
}
|
|
@@ -764,13 +858,19 @@ function runExport() {
|
|
|
764
858
|
let XLSX;
|
|
765
859
|
try {
|
|
766
860
|
XLSX = require("xlsx");
|
|
767
|
-
} catch
|
|
768
|
-
console.error(
|
|
861
|
+
} catch {
|
|
862
|
+
console.error(
|
|
863
|
+
" ✖ 未找到 xlsx 依赖,请重新安装最新 @agile-team/wl-skills-kit",
|
|
864
|
+
);
|
|
769
865
|
process.exit(1);
|
|
770
866
|
}
|
|
771
867
|
const wb = XLSX.utils.book_new();
|
|
772
868
|
for (const [sheetName, rows] of sheets) {
|
|
773
|
-
XLSX.utils.book_append_sheet(
|
|
869
|
+
XLSX.utils.book_append_sheet(
|
|
870
|
+
wb,
|
|
871
|
+
XLSX.utils.aoa_to_sheet(rows),
|
|
872
|
+
sheetName,
|
|
873
|
+
);
|
|
774
874
|
}
|
|
775
875
|
fs.mkdirSync(outDir, { recursive: true });
|
|
776
876
|
XLSX.writeFile(wb, outFile);
|
|
@@ -783,14 +883,30 @@ function runExport() {
|
|
|
783
883
|
// ─── 主路由 ─────────────────────────────────────────────────────────────
|
|
784
884
|
|
|
785
885
|
switch (command) {
|
|
786
|
-
case "init":
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
case "
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
case "
|
|
886
|
+
case "init":
|
|
887
|
+
runInstall(false);
|
|
888
|
+
break;
|
|
889
|
+
case "update":
|
|
890
|
+
runInstall(true);
|
|
891
|
+
break;
|
|
892
|
+
case "clean":
|
|
893
|
+
runClean();
|
|
894
|
+
break;
|
|
895
|
+
case "check":
|
|
896
|
+
runCheck();
|
|
897
|
+
break;
|
|
898
|
+
case "diff":
|
|
899
|
+
runDiff();
|
|
900
|
+
break;
|
|
901
|
+
case "validate":
|
|
902
|
+
runValidate();
|
|
903
|
+
break;
|
|
904
|
+
case "export":
|
|
905
|
+
runExport();
|
|
906
|
+
break;
|
|
793
907
|
default:
|
|
794
|
-
console.error(
|
|
908
|
+
console.error(
|
|
909
|
+
' ✖ 未知命令: "' + command + '",请使用 --help 查看可用命令',
|
|
910
|
+
);
|
|
795
911
|
process.exit(1);
|
|
796
912
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI 辅助开发全景分析 & 架构演进蓝图
|
|
2
2
|
|
|
3
|
-
> **基于 wl-skills-kit v2.4.
|
|
3
|
+
> **基于 wl-skills-kit v2.4.x 架构**
|
|
4
4
|
> **日期**:2026-05-02
|
|
5
5
|
> **目标**:企业级通用 · 质量精度高 · 速度快 · 节省 token · 还原度高 · 开箱即用 · 支持 Agent Pipeline
|
|
6
6
|
|
|
@@ -33,7 +33,7 @@ L7 自演化体系 🔭 需要足够审计报告与模板样本后再规
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
## 3. v2.4.
|
|
36
|
+
## 3. v2.4.x 关键能力
|
|
37
37
|
|
|
38
38
|
### 3.1 Agent Pipeline
|
|
39
39
|
|
|
@@ -134,7 +134,7 @@ wls_code_scan
|
|
|
134
134
|
|
|
135
135
|
## 6. 结论
|
|
136
136
|
|
|
137
|
-
v2.4.
|
|
137
|
+
v2.4.x 后,wl-skills-kit 已具备搭建通用智能体的基础条件:
|
|
138
138
|
|
|
139
139
|
- 有 Skills 作为结构化能力单元
|
|
140
140
|
- 有 MCP 作为实时项目感知与副作用执行工具
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **读者**:团队技术负责人 / wl-skills-kit 维护者 / 对体系设计感兴趣的团队成员
|
|
4
4
|
> **更新方式**:重大架构变更后追加对应章节,旧章节原文保留(历史可溯)
|
|
5
|
-
> **当前版本**:v2.4.
|
|
5
|
+
> **当前版本**:v2.4.2(2026-05-05)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -58,7 +58,7 @@ AI 编辑器(Copilot / Cursor / Windsurf 等)知道通用编程知识,但
|
|
|
58
58
|
1. 规范分层、按任务类型懒加载(token 高效利用)
|
|
59
59
|
2. Skill 触发词驱动(开发者用自然语言,AI 读结构化 SKILL.md)
|
|
60
60
|
3. Pre-flight 约定式声明(消除 AI "假执行"黑盒问题)
|
|
61
|
-
4. 多 AI 编辑器适配(一套内容,自动生成
|
|
61
|
+
4. 多 AI 编辑器适配(一套内容,自动生成 Copilot/Claude/Cursor/Windsurf/Cline/Kiro/Trae/Qoder/Agents 配置,解耦可扩展)
|
|
62
62
|
5. 报告层追加不覆盖(累积团队知识,不丢失审计历史)
|
|
63
63
|
|
|
64
64
|
---
|
|
@@ -102,7 +102,9 @@ wl-skills.js init/update
|
|
|
102
102
|
│ - reports/*.md 已存在则跳过(保护团队累积数据)
|
|
103
103
|
│ - 其他文件:覆盖写入
|
|
104
104
|
│
|
|
105
|
-
|
|
105
|
+
├─ 5. 写入/更新 .wl-skills-manifest.json(文件哈希快照)
|
|
106
|
+
│
|
|
107
|
+
└─ 6. 输出 wk-skills-ui 可选桥接提醒与 git-standards 规范插件建议
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
---
|
|
@@ -124,6 +126,7 @@ AI 编辑器(Copilot / Cursor / Windsurf / Claude Code / Cline / Kiro / Trae
|
|
|
124
126
|
│ Cline → .clinerules
|
|
125
127
|
│ Kiro → .kiro/steering/conventions.md
|
|
126
128
|
│ Trae → .trae/rules/conventions.md
|
|
129
|
+
│ Qoder → .qoder/rules/conventions.md
|
|
127
130
|
│ 通用 → AGENTS.md
|
|
128
131
|
│
|
|
129
132
|
│ 根配置包含:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# wl-skills-kit 使用指南
|
|
2
2
|
|
|
3
3
|
> **目标读者**:使用 `@agile-team/wl-skills-kit` 的 Vue 3 业务项目团队成员。
|
|
4
|
-
> **适用版本**:v2.
|
|
4
|
+
> **适用版本**:v2.4.x
|
|
5
5
|
> **维护者**:CHENY(工号 409322)
|
|
6
6
|
|
|
7
7
|
---
|
|
@@ -34,7 +34,7 @@ npx @agile-team/wl-skills-kit
|
|
|
34
34
|
- Trae
|
|
35
35
|
- Qoder
|
|
36
36
|
|
|
37
|
-
打开项目后,AI
|
|
37
|
+
打开项目后,AI 会按编辑器自动加载对应规则文件:Copilot 读 `.github/copilot-instructions.md`,Claude Code 读 `CLAUDE.md`,Cline 读 `.clinerules`,通用 Agent 读 `AGENTS.md`,Qoder 读 `.qoder/rules/conventions.md`。
|
|
38
38
|
|
|
39
39
|
### 第 3 步:开始使用
|
|
40
40
|
|
|
@@ -79,7 +79,7 @@ AI 会自动识别意图,触发对应的 Skill。
|
|
|
79
79
|
├── .github/
|
|
80
80
|
│ ├── copilot-instructions.md AI 主入口
|
|
81
81
|
│ ├── standards/ 13 条模块化规范
|
|
82
|
-
│ ├── skills/
|
|
82
|
+
│ ├── skills/ 9 个启用 Skill + 多编辑器适配
|
|
83
83
|
│ ├── guides/ 使用指南 + 架构设计
|
|
84
84
|
│ └── reports/ AI 生成报告(SYS_MENU_INFO 等)
|
|
85
85
|
├── docs/ 12 个组件 API 文档(jh-* / request 等)
|
|
@@ -131,6 +131,9 @@ Windsurf、Cline、Trae、Qoder 仅支持全局配置,需手动操作一次,
|
|
|
131
131
|
|
|
132
132
|
配置完成后在 `.github/skills/sync/env.local.json` 中填好 `token`、`gatewayPath`、`menu.domainId`,重启编辑器,对 AI 说「扩展菜单」或「加字典」,AI 会自动调用 MCP 工具完成同步,无需手动粘贴接口响应。
|
|
133
133
|
|
|
134
|
+
**Q: 如何和 wk-skills-ui 一起用?**
|
|
135
|
+
A: 两个包不互相依赖。先用 `wl-skills-kit` 做页面生成、规范审计、菜单字典权限同步;如需统一 UI 风格或老系统化妆层,再单独安装 `@agile-team/wk-skills-ui` 并执行 `wk-ui init/update`。
|
|
136
|
+
|
|
134
137
|
**Q: 部署到生产环境前如何清理 AI 文件?**
|
|
135
138
|
A: 执行 `npx @agile-team/wl-skills-kit clean`。会移除所有 AI 辅助文件,保留 `src/components/` 和 `src/types/`。
|
|
136
139
|
|
|
@@ -138,6 +141,16 @@ A: 执行 `npx @agile-team/wl-skills-kit clean`。会移除所有 AI 辅助文
|
|
|
138
141
|
|
|
139
142
|
## 升级与维护
|
|
140
143
|
|
|
144
|
+
### 生命周期命令
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npx @agile-team/wl-skills-kit check # 环境/MCP/manifest 体检
|
|
148
|
+
npx @agile-team/wl-skills-kit diff # 查看与当前包版本差异
|
|
149
|
+
npx @agile-team/wl-skills-kit update # 增量更新
|
|
150
|
+
npx @agile-team/wl-skills-kit clean # 清理 AI 文件,保留 src/components + src/types
|
|
151
|
+
npx @agile-team/wl-skills-kit export # 导出菜单/字典/权限基线 xlsx
|
|
152
|
+
```
|
|
153
|
+
|
|
141
154
|
### 增量更新
|
|
142
155
|
|
|
143
156
|
```bash
|
|
@@ -29,7 +29,8 @@ _compat/
|
|
|
29
29
|
├── cline.txt
|
|
30
30
|
├── kiro.txt (.kiro/steering/conventions.md,含 frontmatter)
|
|
31
31
|
├── trae.txt (.trae/rules/conventions.md,含 frontmatter)
|
|
32
|
-
|
|
32
|
+
├── agents.txt (AGENTS.md 通用代理)
|
|
33
|
+
└── qoder.txt (.qoder/rules/conventions.md)
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
---
|
|
@@ -57,7 +58,7 @@ bin/wl-skills.js (init/update)
|
|
|
57
58
|
| ------------------------------------- | ----------------------------- | --------------------------- |
|
|
58
59
|
| 团队不用 Cursor,从 editors.json 删除 | `.cursorrules`、`.cursor/` | `.github/`、CLAUDE.md、其他 |
|
|
59
60
|
| 团队新增某 AI 编辑器(如 Augment) | 加 headers/augment.txt + 注册 | 其他文件不动 |
|
|
60
|
-
| `copilot-instructions.md` 内容更新 |
|
|
61
|
+
| `copilot-instructions.md` 内容更新 | 全部编辑器根配置同步更新 | headers/ 不变(只是模板) |
|
|
61
62
|
|
|
62
63
|
---
|
|
63
64
|
|
|
@@ -104,5 +105,6 @@ bin/wl-skills.js (init/update)
|
|
|
104
105
|
| Kiro | `.kiro/steering/*.md` | ✅ | 需 inclusion 字段 |
|
|
105
106
|
| Trae | `.trae/rules/*.md` | ✅ | 需 description 字段 |
|
|
106
107
|
| 通用 Agent | `AGENTS.md` (root) | ❌ | 新兴跨平台规范 |
|
|
108
|
+
| Qoder | `.qoder/rules/conventions.md` | ✅ | 项目规则文件 |
|
|
107
109
|
|
|
108
110
|
> 所有这些编辑器在加载完根配置后,**都支持按指令读取项目内任意文件**(含 `.github/standards/`、`.github/skills/`、`.github/guides/`),所以本架构的"懒加载门控 + 子目录规范"对所有编辑器**有效**。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agile-team/wl-skills-kit",
|
|
3
|
-
"version": "2.4.
|
|
4
|
-
"description": "AI Skill 模板包 v2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
|
+
"description": "AI Skill 模板包 v2.4.2 — 13 条编码规范 + 9 个 AI Skill + 14 个 MCP Tool,一条命令导入 Vue 3 项目",
|
|
5
5
|
"main": "./bin/wl-skills.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"wl-skills": "bin/wl-skills.js"
|
|
@@ -35,7 +35,36 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=16.0.0"
|
|
37
37
|
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"standards:init": "npx @robot-admin/git-standards init",
|
|
40
|
+
"prepare": "husky",
|
|
41
|
+
"cz": "git-cz",
|
|
42
|
+
"lint": "eslint ."
|
|
43
|
+
},
|
|
38
44
|
"dependencies": {
|
|
39
45
|
"xlsx": "^0.18.5"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@commitlint/cli": "^20.5.3",
|
|
49
|
+
"@commitlint/config-conventional": "^20.5.3",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.59.2",
|
|
51
|
+
"@typescript-eslint/parser": "^8.59.2",
|
|
52
|
+
"@vue/eslint-config-typescript": "^14.7.0",
|
|
53
|
+
"commitizen": "^4.3.1",
|
|
54
|
+
"cz-customizable": "^7.5.4",
|
|
55
|
+
"eslint": "^10.3.0",
|
|
56
|
+
"eslint-plugin-vue": "^10.9.0",
|
|
57
|
+
"husky": "^9.1.7",
|
|
58
|
+
"lint-staged": "^16.4.0"
|
|
59
|
+
},
|
|
60
|
+
"config": {
|
|
61
|
+
"commitizen": {
|
|
62
|
+
"path": "node_modules/cz-customizable"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"lint-staged": {
|
|
66
|
+
"src/**/*.{js,jsx,ts,tsx,vue}": [
|
|
67
|
+
"eslint --fix --no-cache"
|
|
68
|
+
]
|
|
40
69
|
}
|
|
41
70
|
}
|