@agile-team/wl-skills-kit 2.10.0 → 2.11.0
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 +35 -0
- package/README.md +7 -7
- package/bin/wl-skills.js +418 -29
- package/files/.github/copilot-instructions.md +24 -369
- package/files/.wl-skills/copilot-instructions-full.md +233 -0
- package/files/{docs → .wl-skills/docs}/jh-pagination.md +2 -2
- package/files/{docs → .wl-skills/docs}/page-query-hook-best-practices.md +3 -3
- package/files/{.github → .wl-skills}/guides/README.md +1 -1
- package/files/{.github → .wl-skills}/guides/architecture.md +5 -5
- package/files/{.github → .wl-skills}/guides/mcp-setup.md +1 -1
- package/files/{.github → .wl-skills}/guides/usage.md +8 -8
- package/files/{.github → .wl-skills}/reports/SYS_MENU_INFO.md +1 -1
- package/files/{.github → .wl-skills}/reports/SYS_PERMISSION_INFO.md +1 -1
- package/files/{.github → .wl-skills}/reports//347/273/204/344/273/266/346/217/220/345/217/226/345/273/272/350/256/256.md +1 -1
- package/files/{.github → .wl-skills}/skills/_best-practices.md +20 -7
- package/files/{.github → .wl-skills}/skills/_compat/README.md +1 -1
- package/files/{.github → .wl-skills}/skills/_compat/editors.json +1 -1
- package/files/{.github → .wl-skills}/skills/_compat/headers/cursor-mdc.txt +1 -1
- package/files/{.github → .wl-skills}/skills/_compat/headers/kiro.txt +1 -1
- package/files/{.github → .wl-skills}/skills/_compat/headers/trae.txt +1 -1
- package/files/{.github → .wl-skills}/skills/_pipeline.md +23 -11
- package/files/{.github → .wl-skills}/skills/_registry.md +10 -4
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/SKILL.md +27 -27
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/USAGE.md +22 -22
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/templates/business-index.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/templates/business-open-questions.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/templates/module-dictionary.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/templates/module-field.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/templates/module-index.md +2 -2
- package/files/{.github → .wl-skills}/skills/core/business-doc-extract/templates/module-requirement.md +2 -2
- package/files/{.github → .wl-skills}/skills/core/convention-audit/SKILL.md +52 -7
- package/files/{.github → .wl-skills}/skills/core/convention-audit/USAGE.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/page-codegen/SKILL.md +33 -13
- package/files/{.github → .wl-skills}/skills/core/page-codegen/USAGE.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-DETAIL-TABS.md +7 -7
- package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-DRIVEN.md +5 -5
- package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-FORM-ROUTE.md +2 -2
- package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-RECORD-FORM.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-TREE-LIST.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/prototype-scan/SKILL.md +11 -11
- package/files/{.github → .wl-skills}/skills/core/prototype-scan/USAGE.md +3 -3
- package/files/{.github → .wl-skills}/skills/core/spec-doc-parse/SKILL.md +9 -9
- package/files/{.github → .wl-skills}/skills/core/spec-doc-parse/USAGE.md +6 -6
- package/files/{.github → .wl-skills}/skills/core/template-extract/SKILL.md +1 -1
- package/files/{.github → .wl-skills}/skills/core/template-extract/USAGE.md +1 -1
- package/files/{.github → .wl-skills}/skills/ops/code-fix/SKILL.md +135 -96
- package/files/{.github → .wl-skills}/skills/sync/_mcp-guardrail.md +3 -3
- package/files/{.github → .wl-skills}/skills/sync/dict-sync/SKILL.md +5 -5
- package/files/{.github → .wl-skills}/skills/sync/dict-sync/USAGE.md +2 -2
- package/files/{.github → .wl-skills}/skills/sync/menu-sync/SKILL.md +6 -6
- package/files/{.github → .wl-skills}/skills/sync/menu-sync/USAGE.md +3 -3
- package/files/{.github → .wl-skills}/skills/sync/menu-sync/env/guide.md +2 -2
- package/files/{.github → .wl-skills}/skills/sync/permission-sync/SKILL.md +3 -3
- package/files/{.github → .wl-skills}/skills/sync/permission-sync/USAGE.md +1 -1
- package/files/{src → .wl-skills/src}/components/global/C_Splitter/index.vue +2 -2
- package/files/{src → .wl-skills/src}/components/local/c_formModal/README.md +1 -1
- package/files/{src → .wl-skills/src}/components/local/c_formSections/README.md +2 -2
- package/files/{src → .wl-skills/src}/components/remote/BaseForm/README.md +2 -2
- package/files/{src → .wl-skills/src}/components/remote/BaseQuery/README.md +4 -4
- package/files/{src → .wl-skills/src}/components/remote/BaseTable/README.md +2 -2
- package/files/{src → .wl-skills/src}/components/remote/BaseToolbar/README.md +1 -1
- package/files/{.github → .wl-skills}/standards/02-code-structure.md +1 -1
- package/files/{.github → .wl-skills}/standards/08-git.md +1 -1
- package/files/{.github → .wl-skills}/standards/11-form-validation.md +1 -1
- package/files/{.github → .wl-skills}/standards/13-platform-components.md +15 -15
- package/files/{.github → .wl-skills}/standards/14-layout-containers.md +4 -4
- package/files/{.github → .wl-skills}/standards/index.md +1 -1
- package/files/{demo → .wl-skills/templates}/README.md +3 -3
- package/files/eslint.config.wl-skills.cjs +123 -0
- package/lib/ast-rules.js +769 -0
- package/lib/vite-plugin-wl-skills.js +97 -0
- package/mcp/tools/projectTools.js +17 -1
- package/package.json +19 -2
- /package/files/{docs → .wl-skills/docs}/jh-date-range.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-date.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-dept-picker.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-drag-row.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-file-upload.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-picker.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-select.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-text.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-textarea.md +0 -0
- /package/files/{docs → .wl-skills/docs}/jh-user-picker.md +0 -0
- /package/files/{docs → .wl-skills/docs}/mock-architecture.md +0 -0
- /package/files/{docs → .wl-skills/docs}/request.md +0 -0
- /package/files/{.github → .wl-skills}/reports/README.md +0 -0
- /package/files/{.github → .wl-skills}/reports/SYS_DICT_INFO.md +0 -0
- /package/files/{.github → .wl-skills}/reports//350/247/204/350/214/203/345/256/241/346/237/245/346/212/245/345/221/212.md" +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/agents.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/claude-code.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/cline.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/cursor-rules.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/github-copilot.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/qoder.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/_compat/headers/windsurf.txt +0 -0
- /package/files/{.github → .wl-skills}/skills/core/api-contract/SKILL.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/api-contract/USAGE.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/_index.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/domains/produce/TPL-OPERATION-STATION.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/domains/sale/README.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-CHANGE-HISTORY.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-LIST.md +0 -0
- /package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-MASTER-DETAIL.md +0 -0
- /package/files/{.github → .wl-skills}/skills/domain/README.md +0 -0
- /package/files/{.github → .wl-skills}/skills/ops/code-fix/USAGE.md +0 -0
- /package/files/{.github → .wl-skills}/skills/sync/env.local.json +0 -0
- /package/files/{.github → .wl-skills}/skills/sync/menu-sync/env/env.local.json +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_ParentView/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_RightToolbar/data.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_RightToolbar/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_RightToolbar/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_Splitter/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_SvgIcon/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_SvgIcon/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_SvgIcon/svgicon.js +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_TagStatus/README.md +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_TagStatus/config.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_TagStatus/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_TagStatus/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_TagStatus/types.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_Tree/README.md +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_Tree/data.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_Tree/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_Tree/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/global/C_Tree/types.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_formModal/data.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_formModal/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_formModal/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_formSections/data.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_formSections/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_formSections/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_listModal/data.ts +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_listModal/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_listModal/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_spliterTitle/index.scss +0 -0
- /package/files/{src → .wl-skills/src}/components/local/c_spliterTitle/index.vue +0 -0
- /package/files/{src → .wl-skills/src}/components/remote/AGGrid/README.md +0 -0
- /package/files/{src → .wl-skills/src}/types/page.ts +0 -0
- /package/files/{.github → .wl-skills}/standards/01-toolchain.md +0 -0
- /package/files/{.github → .wl-skills}/standards/03-comments.md +0 -0
- /package/files/{.github → .wl-skills}/standards/04-coding-basics.md +0 -0
- /package/files/{.github → .wl-skills}/standards/05-logging.md +0 -0
- /package/files/{.github → .wl-skills}/standards/06-security.md +0 -0
- /package/files/{.github → .wl-skills}/standards/07-config.md +0 -0
- /package/files/{.github → .wl-skills}/standards/09-typescript.md +0 -0
- /package/files/{.github → .wl-skills}/standards/10-pinia.md +0 -0
- /package/files/{.github → .wl-skills}/standards/12-base-table.md +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add/api.md +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add-form/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add-form/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add-form/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-form/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-form/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-form/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-history/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-history/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-history/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-archive/api.md +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-archive/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-archive/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-archive/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-detail/api.md +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-detail/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-detail/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-detail/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/api.md +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/add-demo/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/add-demo/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/add-demo/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/billet-flame-cut-plan/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/billet-flame-cut-plan/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/billet-flame-cut-plan/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/domestic-trade-order/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/domestic-trade-order/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/domestic-trade-order/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/heat-batch-return/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/heat-batch-return/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/heat-batch-return/index.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/heat-batch-return/meltDialog.vue +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/metallurgical-spec/data.ts +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/metallurgical-spec/index.scss +0 -0
- /package/files/{demo → .wl-skills/templates}/sale/demo/metallurgical-spec/index.vue +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* lib/vite-plugin-wl-skills.js — wl-skills-kit Vite 构建时约束插件
|
|
5
|
+
*
|
|
6
|
+
* 这是不依赖业务项目配置 CI 的"第五层防线":
|
|
7
|
+
* dev 模式 → 启动时扫描 src/views,在终端输出 warning
|
|
8
|
+
* build 模式 → 构建前全量扫描,有 error 级别违规时中断构建
|
|
9
|
+
*
|
|
10
|
+
* 使用方式(业务项目 vite.config.ts):
|
|
11
|
+
* import wlSkillsPlugin from "@agile-team/wl-skills-kit/lib/vite-plugin-wl-skills.js";
|
|
12
|
+
* export default defineConfig({
|
|
13
|
+
* plugins: [vue(), wlSkillsPlugin()],
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* 或在 init/update 时自动注入到 vite.config.ts 的 plugins 数组(可选)。
|
|
17
|
+
*
|
|
18
|
+
* 约束层级定位:
|
|
19
|
+
* ① AI 指令层(文字) → 可被忽略
|
|
20
|
+
* ② validate 检测层 → 手动调用
|
|
21
|
+
* ③ pre-commit 层 → --no-verify 可绕过
|
|
22
|
+
* ④ CI 层 → 业务项目需手动配置
|
|
23
|
+
* ⑤ Vite 插件层(本插件) → 构建时自动执行,无需额外配置 ← 不可绕开
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const path = require("path");
|
|
27
|
+
|
|
28
|
+
let astRules = null;
|
|
29
|
+
try {
|
|
30
|
+
astRules = require("./ast-rules.js");
|
|
31
|
+
} catch {
|
|
32
|
+
astRules = null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function wlSkillsPlugin(options) {
|
|
36
|
+
options = options || {};
|
|
37
|
+
const scanRel = options.scanRel || "src/views";
|
|
38
|
+
const failOnWarn = options.failOnWarn || false; // build 模式下 warn 也中断(等同 --strict)
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
name: "wl-skills-guard",
|
|
42
|
+
apply: "all", // serve + build 都生效
|
|
43
|
+
|
|
44
|
+
configResolved(config) {
|
|
45
|
+
// 只在业务项目运行,跳过 kit 自身
|
|
46
|
+
if (!astRules || !astRules.hasAstAvailable()) return;
|
|
47
|
+
|
|
48
|
+
const root = config.root || process.cwd();
|
|
49
|
+
const isBuild = config.command === "build";
|
|
50
|
+
|
|
51
|
+
const result = astRules.runAstRules(root, scanRel);
|
|
52
|
+
if (!result.astAvailable) return;
|
|
53
|
+
|
|
54
|
+
const errors = result.issues.filter((i) => i.level === "error");
|
|
55
|
+
const warns = result.issues.filter((i) => i.level === "warn");
|
|
56
|
+
|
|
57
|
+
if (result.issues.length === 0) {
|
|
58
|
+
if (isBuild) {
|
|
59
|
+
console.log("\n ✔ wl-skills-guard: 页面规范检查通过(" + result.pages + " 个页面)\n");
|
|
60
|
+
}
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 输出所有问题
|
|
65
|
+
console.log("\n wl-skills-guard: 发现 " + result.issues.length + " 个规范偏差(" + result.pages + " 页面)");
|
|
66
|
+
for (const issue of result.issues.slice(0, 30)) {
|
|
67
|
+
const icon = issue.level === "error" ? "✖" : "⚠";
|
|
68
|
+
console.log(" " + icon + " [" + issue.rule + "] " + issue.dir + " — " + issue.text);
|
|
69
|
+
}
|
|
70
|
+
if (result.issues.length > 30) {
|
|
71
|
+
console.log(" ... 还有 " + (result.issues.length - 30) + " 条");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// build 模式:error 中断构建
|
|
75
|
+
if (isBuild && errors.length > 0) {
|
|
76
|
+
console.log("\n ✖ wl-skills-guard: 构建中断 — " + errors.length + " 个 error 级规范违规");
|
|
77
|
+
console.log(" → 修复后重新构建,或使用 wl-skills:ignore 标记豁免");
|
|
78
|
+
throw new Error(
|
|
79
|
+
"wl-skills-guard: " + errors.length + " 个 error 级规范违规,构建已中断",
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// build 模式 + failOnWarn:warn 也中断
|
|
84
|
+
if (isBuild && failOnWarn && warns.length > 0) {
|
|
85
|
+
console.log("\n ✖ wl-skills-guard: 构建中断 — " + warns.length + " 个 warn 级规范违规(failOnWarn)");
|
|
86
|
+
throw new Error(
|
|
87
|
+
"wl-skills-guard: " + warns.length + " 个 warn 级违规(failOnWarn 模式)",
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
console.log("");
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
module.exports = wlSkillsPlugin;
|
|
97
|
+
module.exports.default = wlSkillsPlugin;
|
|
@@ -4,6 +4,7 @@ const fs = require("fs");
|
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const { execFileSync } = require("child_process");
|
|
6
6
|
const https = require("https");
|
|
7
|
+
const { runAstRules } = require("../../lib/ast-rules");
|
|
7
8
|
|
|
8
9
|
function getProjectRoot() {
|
|
9
10
|
return process.env.WL_PROJECT_ROOT
|
|
@@ -188,13 +189,28 @@ async function handleValidatePage(args) {
|
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
|
|
192
|
+
// ── AST 语义级规则检测(v2.10.0+)─────────────────────────────────
|
|
193
|
+
const astResult = runAstRules(root, scanPath);
|
|
194
|
+
if (astResult.astAvailable === false) {
|
|
195
|
+
issues.push([
|
|
196
|
+
scanPath,
|
|
197
|
+
"warn",
|
|
198
|
+
"AST 引擎不可用,跳过语义级规则(R1~R7)",
|
|
199
|
+
]);
|
|
200
|
+
} else {
|
|
201
|
+
for (const iss of astResult.issues) {
|
|
202
|
+
issues.push([iss.dir, iss.level, `[${iss.rule}] ${iss.text}`]);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
191
206
|
const errors = issues.filter((item) => item[1] === "error").length;
|
|
192
207
|
const lines = [
|
|
193
208
|
`✅ 页面校验完成:${scanPath}`,
|
|
194
209
|
"",
|
|
195
210
|
`- 页面目录:${pages.length}`,
|
|
196
211
|
`- error:${errors}`,
|
|
197
|
-
`- warn:${issues.length - errors}`,
|
|
212
|
+
`- warn:${issues.length - errors - issues.filter(i => i[1] === "info").length}`,
|
|
213
|
+
`- info:${issues.filter(i => i[1] === "info").length}`,
|
|
198
214
|
"",
|
|
199
215
|
];
|
|
200
216
|
if (issues.length === 0) lines.push("✔ 未发现偏差");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agile-team/wl-skills-kit",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "AI Skill 模板包 v2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
|
+
"description": "AI Skill 模板包 v2.11.0 — 14 条编码规范 + 11 个 AI Skill + 17 个 MCP Tool,一条命令导入 Vue 3 项目(.wl-skills/ 统一隔离架构)",
|
|
5
5
|
"main": "./bin/wl-skills.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"wl-skills": "bin/wl-skills.js"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
|
11
11
|
"files/",
|
|
12
|
+
"lib/",
|
|
12
13
|
"mcp/",
|
|
13
14
|
"docs/",
|
|
14
15
|
"README.md",
|
|
@@ -51,6 +52,22 @@
|
|
|
51
52
|
"dependencies": {
|
|
52
53
|
"xlsx": "^0.18.5"
|
|
53
54
|
},
|
|
55
|
+
"optionalDependencies": {
|
|
56
|
+
"@vue/compiler-sfc": "^3.2.0",
|
|
57
|
+
"@babel/parser": "^7.20.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@vue/compiler-sfc": "^3.2.0",
|
|
61
|
+
"@babel/parser": "^7.20.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependenciesMeta": {
|
|
64
|
+
"@vue/compiler-sfc": {
|
|
65
|
+
"optional": true
|
|
66
|
+
},
|
|
67
|
+
"@babel/parser": {
|
|
68
|
+
"optional": true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
54
71
|
"devDependencies": {
|
|
55
72
|
"@commitlint/cli": "^20.5.3",
|
|
56
73
|
"@commitlint/config-conventional": "^20.5.3",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/domains/sale/README.md
RENAMED
|
File without changes
|
|
File without changes
|
/package/files/{.github → .wl-skills}/skills/core/page-codegen/templates/universal/TPL-LIST.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add/index.scss
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add/index.vue
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add-form/data.ts
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add-form/index.scss
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-add-form/index.vue
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change/data.ts
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change/index.scss
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change/index.vue
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-apply-change-form/data.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-customer-archive/index.scss
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/api.md
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/data.ts
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/index.scss
RENAMED
|
File without changes
|
/package/files/{demo → .wl-skills/templates}/produce/aiflow/mmwr-temp-customer-archive/index.vue
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|