@agile-team/wl-skills-kit 2.11.1 → 2.11.3
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 +25 -0
- package/README.md +38 -21
- 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/docs/validate-exempt.md +113 -0
- package/files/.wl-skills/guides/architecture.md +1 -1
- package/files/.wl-skills/skills/_compat/headers/cursor-mdc.txt +1 -1
- package/files/.wl-skills/skills/_compat/headers/kiro.txt +1 -1
- package/files/.wl-skills/skills/_compat/headers/trae.txt +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/12-base-table.md +56 -4
- package/files/.wl-skills/standards/13-platform-components.md +1 -0
- 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 +395 -12
- package/mcp/config.js +46 -46
- package/mcp/registry.js +6 -1
- package/mcp/tools/projectTools.js +9 -1
- package/package.json +2 -2
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# validate 豁免配置(.wl-skills-validate.json)
|
|
2
|
+
|
|
3
|
+
> **版本**:v2.11.3+ 引入。对应执行器 `loadExemptions`(`lib/ast-rules.js`)。
|
|
4
|
+
> **零功能影响**:kit 不主动创建该文件;不存在时 validate 行为完全不变。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 用途
|
|
9
|
+
|
|
10
|
+
对"标准列表页强制 `BaseTable + AGGrid`"等规则,**批量豁免特殊场景目录**:
|
|
11
|
+
表单设计器内嵌表格、行内编辑明细表等 BaseTable 受限的场景。
|
|
12
|
+
|
|
13
|
+
与单文件注释豁免(`<!-- wl-skills:ignore R3 -->`)互补:
|
|
14
|
+
|
|
15
|
+
| 机制 | 粒度 | 适用 |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| 单文件注释 | 精确到单个文件 | 个别特殊页面 |
|
|
18
|
+
| 项目级配置(本文件) | 批量到目录前缀 | 整片特殊场景(设计器/编辑器域) |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 文件位置
|
|
23
|
+
|
|
24
|
+
业务项目**根目录**(与 `.wl-skills-manifest.json` 同级):
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
你的业务项目/
|
|
28
|
+
├── .wl-skills-validate.json ← 本文件(可选,按需创建)
|
|
29
|
+
├── .wl-skills-manifest.json
|
|
30
|
+
└── src/
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Schema
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"exemptions": [
|
|
40
|
+
{
|
|
41
|
+
"paths": ["<页面目录前缀,支持 /**>"],
|
|
42
|
+
"rules": ["<规则编号,如 R3 R10,大小写不敏感>"],
|
|
43
|
+
"reason": "<必填,审计用途,说明为何豁免>"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 字段说明
|
|
50
|
+
|
|
51
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `exemptions` | array | 是 | 豁免条目数组 |
|
|
54
|
+
| `exemptions[].paths` | string[] | 是 | 页面目录前缀。支持 `/**` glob;命中该目录**及其子目录**下所有页面 |
|
|
55
|
+
| `exemptions[].rules` | string[] | 是 | 规则编号(`R3`/`R10` 等),大小写不敏感 |
|
|
56
|
+
| `exemptions[].reason` | string | 是 | 审计字段,说明豁免原因,避免滥用 |
|
|
57
|
+
|
|
58
|
+
### 路径匹配规则
|
|
59
|
+
|
|
60
|
+
- `src/views/produce/designer` → 命中 `src/views/produce/designer` 及 `src/views/produce/designer/**`
|
|
61
|
+
- `src/views/sale/order/**` → 等价于上一行(显式 glob)
|
|
62
|
+
- 路径分隔符自动规范化(Windows `\` → `/`),末尾 `/` 被忽略
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 当前可豁免规则
|
|
67
|
+
|
|
68
|
+
| 规则 | 检测内容 | 典型豁免场景 |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `R3` | el-table 未用 BaseTable | 表单设计器内嵌表格、行内编辑明细表 |
|
|
71
|
+
| `R10` | el-form/el-select 等原生组件未用平台封装 | 设计器/自定义编辑器内部 |
|
|
72
|
+
|
|
73
|
+
> 其他规则(R1/R2/R4~R9/R11~R14)原则上不豁免;确有需要时用单文件注释豁免。
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 完整示例
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"exemptions": [
|
|
82
|
+
{
|
|
83
|
+
"paths": ["src/views/produce/designer"],
|
|
84
|
+
"rules": ["R3", "R10"],
|
|
85
|
+
"reason": "表单设计器内嵌表格 + 自定义编辑器,BaseTable AGGrid 内联编辑受限"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"paths": ["src/views/sale/order-edit/**"],
|
|
89
|
+
"rules": ["R3"],
|
|
90
|
+
"reason": "订单行内编辑明细表,AGGrid 行编辑成本高于收益"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"paths": ["src/components/business/rich-table"],
|
|
94
|
+
"rules": ["R3"],
|
|
95
|
+
"reason": "复杂合并单元格/自定义行列布局,AGGrid 不易实现"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 验证
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# 跑 validate,命中豁免的页面不再报对应规则
|
|
107
|
+
wl-skills validate src/views
|
|
108
|
+
|
|
109
|
+
# 豁免配置格式错误时,validate 输出 warn 提示(不阻断),行为退化为无豁免
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
> 豁免项升级为主列表页时,必须迁移回 `BaseTable + AGGrid` 并从本文件移除豁免。
|
|
113
|
+
> `convention-audit` 审计会列出所有豁免项供人工复核。
|
|
@@ -10,7 +10,7 @@ alwaysApply: true
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
<!-- Cursor MDC 规则文件。由 @agile-team/wl-skills-kit 自动生成。 -->
|
|
13
|
-
<!-- 源文件:.
|
|
13
|
+
<!-- 源文件:.wl-skills/copilot-instructions-full.md,更新方式:npx @agile-team/wl-skills-kit@latest update -->
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ description: 项目编码规范(14 条标准 + 11 个 Skill 自动调度)
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Kiro Steering 规则。由 @agile-team/wl-skills-kit 自动生成。-->
|
|
7
|
-
<!-- 源文件:.
|
|
7
|
+
<!-- 源文件:.wl-skills/copilot-instructions-full.md,更新方式:npx @agile-team/wl-skills-kit@latest update -->
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ alwaysApply: true
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<!-- Trae Rules 规则。由 @agile-team/wl-skills-kit 自动生成。-->
|
|
8
|
-
<!-- 源文件:.
|
|
8
|
+
<!-- 源文件:.wl-skills/copilot-instructions-full.md,更新方式:npx @agile-team/wl-skills-kit@latest update -->
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -112,7 +112,7 @@ description: "Use when: auditing project source code against the 14 modular stan
|
|
|
112
112
|
| 06 | 安全规范 | 静态扫描 | `v-html` 无注释 / `import axios` / `eval` / `new Function` → 🔴 |
|
|
113
113
|
| 07 | 配置管理 | 静态扫描 | 硬编码 `http://` IP → 🔴;API 路径散落 → 🟡 |
|
|
114
114
|
| 08 | Git 规范 | Git 命令 + 文件检测 | 工具链缺失 → 🔴;分支名不规范 → 🟡;近期提交不规范 → 🟡;历史 → 🟢 |
|
|
115
|
-
| 09 | TypeScript | tsc
|
|
115
|
+
| 09 | TypeScript 类型 + 类型错误 | R14(vue-tsc/tsc 委托)+ AI | 类型检查器缺失 → 🔴;`vue-tsc --noEmit` 非 0 → 🔴;`any` 滥用 → 🟡 |
|
|
116
116
|
| 10 | Pinia | 静态扫描 | `data.ts` 内 import Store → 🔴 |
|
|
117
117
|
| 11 | 表单校验 | AI 场景判断 | FORM_ROUTE 缺 validate / resetFields → 🔴 |
|
|
118
118
|
| 12 | BaseTable + cid | 静态 + 场景判断 | 主列表用 el-table → 🔴;cid 缺失/重复 → 🔴;弹窗小表格见豁免规则 |
|
|
@@ -158,14 +158,14 @@ description: "Use when: auditing project source code against the 14 modular stan
|
|
|
158
158
|
1. 读取 `standards/01 ~ 14` 全部规范文件
|
|
159
159
|
2. 检测工具链状态:
|
|
160
160
|
- ESLint:是否可执行
|
|
161
|
-
- TypeScript:`tsc --noEmit`
|
|
161
|
+
- TypeScript:`vue-tsc --noEmit`(回退 `tsc --noEmit`)是否可执行、是否 0 error(R14)
|
|
162
162
|
- Git:当前分支 / 最近提交
|
|
163
163
|
- Husky:`.husky/pre-commit`、`.husky/commit-msg` 是否存在
|
|
164
164
|
3. 读取 `package.json` 获取项目脚本名称
|
|
165
165
|
|
|
166
166
|
### 步骤 3:扫描源码
|
|
167
167
|
|
|
168
|
-
逐个文件检查
|
|
168
|
+
逐个文件检查 14 个维度。同时记录:
|
|
169
169
|
|
|
170
170
|
- **扫描统计**:目录数、文件数、页面数、类型分布
|
|
171
171
|
- **跨页面相同 el-\* 模式**(统计出现次数和位置)
|