@agile-team/wl-skills-kit 2.11.1 → 2.11.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 +13 -0
- package/README.md +1 -1
- package/bin/wl-skills.js +27 -3
- package/files/.wl-skills/docs/jh-pagination.md +505 -505
- package/files/.wl-skills/docs/request.md +940 -940
- package/files/.wl-skills/guides/architecture.md +1 -1
- package/files/.wl-skills/skills/core/convention-audit/SKILL.md +3 -3
- package/files/.wl-skills/skills/core/spec-doc-parse/SKILL.md +332 -332
- package/files/.wl-skills/skills/core/spec-doc-parse/USAGE.md +97 -97
- package/files/.wl-skills/skills/sync/permission-sync/USAGE.md +107 -107
- package/files/.wl-skills/src/components/global/C_ParentView/index.vue +3 -3
- package/files/.wl-skills/src/components/global/C_RightToolbar/index.vue +157 -157
- package/files/.wl-skills/src/components/global/C_SvgIcon/index.vue +31 -31
- package/files/.wl-skills/src/components/global/C_SvgIcon/svgicon.js +10 -10
- package/files/.wl-skills/src/components/global/C_TagStatus/README.md +264 -264
- package/files/.wl-skills/src/components/global/C_TagStatus/config.ts +192 -192
- package/files/.wl-skills/src/components/global/C_TagStatus/index.vue +106 -106
- package/files/.wl-skills/src/components/global/C_TagStatus/types.ts +64 -64
- package/files/.wl-skills/src/components/global/C_Tree/README.md +153 -153
- package/files/.wl-skills/src/components/global/C_Tree/index.scss +42 -42
- package/files/.wl-skills/src/components/global/C_Tree/index.vue +78 -78
- package/files/.wl-skills/src/components/global/C_Tree/types.ts +59 -59
- package/files/.wl-skills/src/components/local/c_formModal/README.md +235 -235
- package/files/.wl-skills/src/components/local/c_formModal/data.ts +95 -95
- package/files/.wl-skills/src/components/local/c_formModal/index.scss +8 -8
- package/files/.wl-skills/src/components/local/c_formModal/index.vue +107 -107
- package/files/.wl-skills/src/components/local/c_formSections/data.ts +175 -175
- package/files/.wl-skills/src/components/local/c_formSections/index.scss +280 -280
- package/files/.wl-skills/src/components/local/c_formSections/index.vue +429 -429
- package/files/.wl-skills/src/components/local/c_listModal/data.ts +41 -41
- package/files/.wl-skills/src/components/local/c_listModal/index.vue +136 -136
- package/files/.wl-skills/src/components/local/c_spliterTitle/index.scss +25 -25
- package/files/.wl-skills/src/components/local/c_spliterTitle/index.vue +21 -21
- package/files/.wl-skills/src/components/remote/AGGrid/README.md +530 -530
- package/files/.wl-skills/src/components/remote/BaseForm/README.md +508 -508
- package/files/.wl-skills/src/components/remote/BaseQuery/README.md +865 -865
- package/files/.wl-skills/src/components/remote/BaseTable/README.md +941 -941
- package/files/.wl-skills/src/components/remote/BaseToolbar/README.md +496 -496
- package/files/.wl-skills/src/types/page.ts +24 -24
- package/files/.wl-skills/standards/04-coding-basics.md +39 -1
- package/files/.wl-skills/standards/09-typescript.md +26 -3
- package/files/.wl-skills/standards/index.md +2 -2
- package/files/.wl-skills/templates/README.md +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/api.md +54 -54
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -346
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -28
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -115
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -43
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -338
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -28
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -115
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -44
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -43
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/api.md +88 -88
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/data.ts +601 -601
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.vue +64 -64
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/api.md +67 -67
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/data.ts +286 -286
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.scss +139 -139
- package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.vue +318 -318
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -98
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -543
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -1
- package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -52
- package/files/.wl-skills/templates/sale/demo/add-demo/data.ts +518 -518
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/data.ts +524 -524
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.scss +154 -154
- package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.vue +117 -117
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/data.ts +308 -308
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.scss +99 -99
- package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.vue +77 -77
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/data.ts +367 -367
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.scss +100 -100
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.vue +170 -170
- package/files/.wl-skills/templates/sale/demo/heat-batch-return/meltDialog.vue +320 -320
- package/files/.wl-skills/templates/sale/demo/metallurgical-spec/data.ts +824 -824
- package/lib/ast-rules.js +304 -9
- package/mcp/config.js +46 -46
- package/mcp/registry.js +6 -1
- package/mcp/tools/projectTools.js +9 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.11.2] - 2026-06-21
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **R13 圈复杂度执行器(standard 04,阻断级)**:新增 `lib/ast-rules.js` 的 R13,对 `index.vue`/`data.ts` 的每个函数计算 McCabe 圈复杂度(与 ESLint `complexity` 规则定义一致),`> 10` 报 error 阻断提交。补齐 standard 04 第 14 条核心约定 + 降复杂度手法示例(提前 return / 查表驱动 / 抽子函数)
|
|
8
|
+
- **R14 类型错误零容忍执行器(standard 09,阻断级)**:新增 `runTypeCheck`,委托 `vue-tsc --noEmit`(回退 `tsc`)解析 TS error;无 `tsconfig`/checker 时优雅降级 warn。CLI 新增 `--typecheck`、MCP `wls_validate_page` 新增 `typecheck` 入参双通道一致。CI 应固定 `validate --typecheck --strict`
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **standard 09 由 🟡建议 升级为 🔴必遵 + 阻断**:`vue-tsc --noEmit` 必须 0 error,职责分离——ESLint 管风格,R14 管类型正确性
|
|
13
|
+
- `rule-coverage.md` 执行器图例 R1~R12 → R1~R14,登记 R13/R14 两条阻断约定;`convention-audit` 维度 09 改为 R14 委托
|
|
14
|
+
- `eslint.config.ts` 复杂度 `warn 60` 修正为 `warn 10`(项目级硬阻断由 R13 兜底,此处仅作 kit 自身开发提示)
|
|
15
|
+
|
|
3
16
|
## [2.11.1] - 2026-06-15
|
|
4
17
|
|
|
5
18
|
### Added
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @agile-team/wl-skills-kit
|
|
2
2
|
|
|
3
|
-
**AI Skill 模板包 v2.11.
|
|
3
|
+
**AI Skill 模板包 v2.11.2** — 一键将 14 条规范、11 个 AI Skill、17 个 MCP Tool、编辑器 MCP 配置、文档导入 Vue 3 项目。
|
|
4
4
|
|
|
5
5
|
让 AI 编辑器(Copilot / Cursor / Windsurf / Claude Code / Cline / Kiro / Trae / Qoder / 通用 Agents)**真正理解项目规范**,从原型/详设到完整页面代码全流程自动化。
|
|
6
6
|
|
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.11.
|
|
4
|
+
* wl-skills-kit CLI v2.11.2
|
|
5
5
|
*
|
|
6
6
|
* 命令:
|
|
7
7
|
* init 全量安装(默认,向后兼容)
|
|
@@ -27,6 +27,7 @@ const {
|
|
|
27
27
|
runAstRules,
|
|
28
28
|
getStagedFiles,
|
|
29
29
|
hasAstAvailable,
|
|
30
|
+
runTypeCheck,
|
|
30
31
|
} = require("../lib/ast-rules");
|
|
31
32
|
|
|
32
33
|
// ─── page-spec 比对引擎(v2.11.1+,"约定 vs 代码"确定性核对)────────────
|
|
@@ -66,6 +67,7 @@ const KNOWN_FLAGS = new Set([
|
|
|
66
67
|
"--all",
|
|
67
68
|
"--pre-commit",
|
|
68
69
|
"--strict",
|
|
70
|
+
"--typecheck",
|
|
69
71
|
]);
|
|
70
72
|
|
|
71
73
|
const dryRun = args.includes("--dry-run");
|
|
@@ -74,6 +76,7 @@ const keepReports = args.includes("--keep-reports");
|
|
|
74
76
|
const force = args.includes("--force");
|
|
75
77
|
const preCommit = args.includes("--pre-commit");
|
|
76
78
|
const strict = args.includes("--strict");
|
|
79
|
+
const typeCheck = args.includes("--typecheck");
|
|
77
80
|
|
|
78
81
|
// 校验所有 flag 是否已知(--help 优先,跳过校验直接显示帮助)
|
|
79
82
|
if (!showHelp) {
|
|
@@ -118,7 +121,8 @@ if (showHelp) {
|
|
|
118
121
|
check 环境预检(Node / 工具链 / MCP 配置 / manifest)
|
|
119
122
|
diff 对比已安装文件与当前 kit 版本的差异
|
|
120
123
|
validate 静态检查 src/views 页面文件、AGGrid、skills-ui runtime、mock
|
|
121
|
-
v2.10.1+ 集成 AST 语义级检测(R1~
|
|
124
|
+
v2.10.1+ 集成 AST 语义级检测(R1~R14),覆盖正则无法检测的规则
|
|
125
|
+
R13 圈复杂度 / R14 类型错误(R14 需 --typecheck 开启)
|
|
122
126
|
validate-page validate 的别名,适用于单页/目录检查
|
|
123
127
|
doctor-ui 检查 @agile-team/wk-skills-ui 接入完整性
|
|
124
128
|
export 导出 reports/SYS_* 数据为 xlsx
|
|
@@ -133,6 +137,8 @@ if (showHelp) {
|
|
|
133
137
|
--all mock-clean 清理全部 mock(保留 _utils.ts)
|
|
134
138
|
--pre-commit validate 仅检测 git staged 文件,error 阻断提交,warn 仅提示
|
|
135
139
|
--strict validate 的 error 和 warn 都导致退出码 1(CI 用)
|
|
140
|
+
--typecheck validate 额外执行 vue-tsc/tsc --noEmit(R14 类型错误零容忍)
|
|
141
|
+
体积较大,CI / pre-push 必跑,pre-commit 不建议开启
|
|
136
142
|
--help 显示帮助
|
|
137
143
|
|
|
138
144
|
示例:
|
|
@@ -142,6 +148,7 @@ if (showHelp) {
|
|
|
142
148
|
pnpm dlx @agile-team/wl-skills-kit check 检查本地环境
|
|
143
149
|
pnpm dlx @agile-team/wl-skills-kit diff 查看当前项目与最新 kit 差异
|
|
144
150
|
pnpm dlx @agile-team/wl-skills-kit validate 检查 src/views 页面文件
|
|
151
|
+
pnpm dlx @agile-team/wl-skills-kit validate --typecheck 含类型检查 R14(CI 用)
|
|
145
152
|
pnpm dlx @agile-team/wl-skills-kit validate-page src/views/mdata/model/demo
|
|
146
153
|
pnpm dlx @agile-team/wl-skills-kit doctor-ui 检查 wk-skills-ui 接入
|
|
147
154
|
pnpm dlx @agile-team/wl-skills-kit export 导出菜单/字典/权限 xlsx
|
|
@@ -1272,12 +1279,27 @@ function runValidate() {
|
|
|
1272
1279
|
issues.push(...specIssues);
|
|
1273
1280
|
}
|
|
1274
1281
|
|
|
1282
|
+
// ── 类型检查 R14(v2.11.2+,vue-tsc/tsc 委托,仅 --typecheck 触发)───
|
|
1283
|
+
// 体积较大(整项目编译),validate 默认不跑;pre-commit 不建议开启,CI 必跑。
|
|
1284
|
+
// 无 tsconfig / 无 checker → 优雅降级为 warn,不阻断。
|
|
1285
|
+
let tcRan = false;
|
|
1286
|
+
let tcErrors = 0;
|
|
1287
|
+
if (typeCheck) {
|
|
1288
|
+
const tc = runTypeCheck(TARGET_DIR);
|
|
1289
|
+
tcRan = tc.ran;
|
|
1290
|
+
tcErrors = tc.errorCount || 0;
|
|
1291
|
+
issues.push(...tc.issues);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1275
1294
|
// ── 输出 ───────────────────────────────────────────────────────────
|
|
1276
1295
|
console.log(
|
|
1277
1296
|
" 页面目录: " +
|
|
1278
1297
|
pages.length +
|
|
1279
1298
|
(astResult.pages ? "(AST 扫描 " + astResult.pages + ")" : "") +
|
|
1280
|
-
(specAlignedPages ? "(spec-align " + specAlignedPages + ")" : "")
|
|
1299
|
+
(specAlignedPages ? "(spec-align " + specAlignedPages + ")" : "") +
|
|
1300
|
+
(typeCheck
|
|
1301
|
+
? "(类型检查 " + (tcRan ? "已执行 " + tcErrors + " error" : "已跳过") + ")"
|
|
1302
|
+
: ""),
|
|
1281
1303
|
);
|
|
1282
1304
|
console.log(" 提示项: " + issues.length);
|
|
1283
1305
|
console.log("");
|
|
@@ -1384,6 +1406,8 @@ const AST_FIX_SUGGESTIONS = {
|
|
|
1384
1406
|
R10: { fix: '\u66ff\u6362\u539f\u751f el-* \u7ec4\u4ef6\u4e3a\u5e73\u53f0\u5c01\u88c5\uff08jh-select/jh-date/jh-pagination \u7b49\uff09', ref: 'standards/13-platform-components.md', auto: true },
|
|
1385
1407
|
R11: { fix: '\u4ece data.ts \u4e2d\u79fb\u9664 Pinia Store import\uff0cStore \u5e94\u5728\u7ec4\u4ef6\u5c42\u4f7f\u7528', ref: 'standards/10-pinia.md', auto: true },
|
|
1386
1408
|
R12: { fix: '\u5c06\u786c\u7f16\u7801 IP/URL \u79fb\u81f3 .env.* \u73af\u5883\u53d8\u91cf', ref: 'standards/07-config.md', auto: true },
|
|
1409
|
+
R13: { fix: '\u62c6\u5206\u9ad8\u590d\u6742\u5ea6\u51fd\u6570\uff1a\u6309\u804c\u8d23\u62bd\u53d6\u5b50\u51fd\u6570\u3001\u7528\u63d0\u524d return \u4ee3\u66ff\u5d4c\u5957 if\u3001\u67e5\u8868\u9a71\u52a8\u53d6\u4ee3 if-else \u94fe\u3001\u7b56\u7565\u6a21\u5f0f\u6d88\u9664\u591a\u5206\u652f', ref: 'standards/04-coding-basics.md', auto: false },
|
|
1410
|
+
R14: { fix: '\u6309 TS \u9519\u8bef\u4fee\u590d\u7c7b\u578b\uff08\u8865\u7c7b\u578b\u6807\u6ce8 / \u4fee\u6b63\u8c03\u7528\u53c2\u6570 / \u8865 any \u8fb9\u754c\u6ce8\u91ca\uff09\uff1b\u672a\u88c5 vue-tsc \u65f6\u5b89\u88c5\u540e\u7eb3\u5165 CI', ref: 'standards/09-typescript.md', auto: false },
|
|
1387
1411
|
// S 系列:page-spec 约定 vs 代码确定性核对(v2.11.1+)
|
|
1388
1412
|
S0: { fix: '\u4fee\u6b63 page-spec.json \u7ed3\u6784\uff08page/query/columns/toolbar/operations\uff09', ref: '.wl-skills/skills/core/page-codegen/SKILL.md', auto: false },
|
|
1389
1413
|
S1: { fix: '\u8c03\u6574 queryDef() \u67e5\u8be2\u5b57\u6bb5\u987a\u5e8f\u4e0e page-spec.json query \u4e25\u683c\u4e00\u81f4', ref: '.wl-skills/skills/core/page-codegen/SKILL.md', auto: true },
|