@agile-team/wl-skills-kit 2.1.6 → 2.1.7
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/README.md +7 -4
- package/bin/wl-skills.js +1 -1
- package/files/.github/guides/architecture.md +1 -1
- package/files/.github/skills/core/convention-audit/SKILL.md +1 -1
- package/files/.github/skills/sync/menu-sync/env/guide.md +23 -7
- package/files/.github/standards/12-base-table.md +25 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@agile-team/wl-skills-kit)
|
|
4
4
|
|
|
5
|
-
**AI Skill 模板包 v2.1.
|
|
5
|
+
**AI Skill 模板包 v2.1.7** — 一条命令将 13 条编码规范、6 个 AI Skill、组件文档、领域样例导入 Vue 3 项目。
|
|
6
6
|
|
|
7
7
|
让 AI 编辑器(Copilot / Cursor / Windsurf / Claude Code / Cline / Kiro / Trae / 通用 Agents)**真正理解项目规范**,从原型/详设到完整页面代码全流程自动化。
|
|
8
8
|
|
|
@@ -211,11 +211,14 @@ npx @agile-team/wl-skills-kit update
|
|
|
211
211
|
|
|
212
212
|
```typescript
|
|
213
213
|
// ✅ 正确:Date.now().toString(36) — 毫秒级唯一,永不重复,约 9 位 base-36
|
|
214
|
-
cid="mca-lhfge5hc"
|
|
215
|
-
cid: 'mca-customerName'
|
|
214
|
+
cid="mca-lhfge5hc" // 表格级:{页面首字母缩写}-{base36时间戳}
|
|
215
|
+
cid: 'mca-lhfge5hc-customerName' // 列级:{完整表格cid}-{fieldName}
|
|
216
|
+
cid: 'mca-lhfge5hc-sub1-customerName' // 子表列级:{完整子表cid}-{fieldName}
|
|
216
217
|
|
|
217
|
-
// ❌ 错误:截断十进制后6位(每11.5
|
|
218
|
+
// ❌ 错误:截断十进制后6位(每11.5天循环一次)
|
|
218
219
|
cid="mca-745831"
|
|
220
|
+
// ❌ 错误:列级只用缩写(同页面两张表都有steelCode → mca-steelCode 碰撞)
|
|
221
|
+
cid: 'mca-customerName'
|
|
219
222
|
```
|
|
220
223
|
|
|
221
224
|
**Pre-flight 中 AI 自动输出**:`✅ cid 已生成:mca-lhfge5hc(mmwr-customer-archive)`
|
package/bin/wl-skills.js
CHANGED
|
@@ -57,7 +57,7 @@ description: "Use when: auditing project source code against the 13 modular stan
|
|
|
57
57
|
| 09 | TypeScript | 滥用 any(>3 处/页) → 🟡 |
|
|
58
58
|
| 10 | Pinia | data.ts 内 import Store → 🔴 |
|
|
59
59
|
| 11 | 表单校验 | FORM_ROUTE 缺 validate / resetFields → 🔴 |
|
|
60
|
-
| 12 | BaseTable + cid | 用 el-table / 缺 render-type / cid 缺失或重复 → 🔴;cid 后缀使用旧格式(十进制截断后6位)→
|
|
60
|
+
| 12 | BaseTable + cid | 用 el-table / 缺 render-type / cid 缺失或重复 → 🔴;cid 后缀使用旧格式(十进制截断后6位)→ 🟡;列级 cid 只用缩写作前缀(同页面两张表同名列碰撞)→ 🔴 |
|
|
61
61
|
| 13 | 平台组件合规 | 用 el-form/el-table/el-date-picker 替代封装 → 🔴;3+ 复用 → 提取建议 |
|
|
62
62
|
|
|
63
63
|
---
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
# env.local.json 配置说明
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> 每位成员在本地维护自己的副本,首次使用时按本文档填写即可。
|
|
3
|
+
> 每位成员在本地维护自己的副本,已加入 `.gitignore`,**不会提交到远端仓库**。
|
|
5
4
|
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## 配置文件位置(优先使用新统一路径)
|
|
8
|
+
|
|
9
|
+
**新路径(v2.1.5+ 推荐)**:`.github/skills/sync/env.local.json`
|
|
10
|
+
**兼容路径(老版)**:`.github/skills/sync/menu-sync/env/env.local.json`
|
|
11
|
+
|
|
12
|
+
AI 优先读新路径,如不存在自动回落到兼容路径。
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 配置格式(菜单/字典/权限三合一)
|
|
9
17
|
|
|
10
18
|
```json
|
|
11
19
|
{
|
|
12
20
|
"gatewayPath": "http://192.168.10.50:9000",
|
|
13
|
-
"parentMenuId": "1803456789012345678",
|
|
14
21
|
"sysAppNo": "QjQuXy1kbKxZyjhS5N2",
|
|
15
|
-
"token": "eyJhbGci..."
|
|
22
|
+
"token": "eyJhbGci...",
|
|
23
|
+
|
|
24
|
+
"menu": {
|
|
25
|
+
"parentMenuId": "1803456789012345678"
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"dict": {
|
|
29
|
+
"moduleId": "7C909G0U2F8HI7E305LV0135LSJ3UBIO"
|
|
30
|
+
}
|
|
16
31
|
}
|
|
17
32
|
```
|
|
18
33
|
|
|
@@ -23,9 +38,10 @@
|
|
|
23
38
|
| 字段 | 说明 | 示例 |
|
|
24
39
|
|---|---|---|
|
|
25
40
|
| `gatewayPath` | 后端网关地址,含协议和端口,**末尾不加斜杠** | `http://192.168.10.50:9000` |
|
|
26
|
-
| `parentMenuId` | 目标父级目录的菜单数据库 ID(每套环境不同) | `1803456789012345678` |
|
|
27
41
|
| `sysAppNo` | 应用编码(非明文,从已有菜单接口响应中获取) | `QjQuXy1kbKxZyjhS5N2` |
|
|
28
42
|
| `token` | 当前登录用户的 Bearer Token,**不含 `bearer ` 前缀** | `eyJhbGci...` |
|
|
43
|
+
| `menu.parentMenuId` | 目标父级目录的菜单数据库 ID(每套环境不同) | `1803456789012345678` |
|
|
44
|
+
| `dict.moduleId` | 字典所属模块 ID(字典管理后台获取) | `7C909G0U2F8HI7E305LV0135LSJ3UBIO` |
|
|
29
45
|
|
|
30
46
|
---
|
|
31
47
|
|
|
@@ -35,7 +51,7 @@
|
|
|
35
51
|
|
|
36
52
|
询问后端同事,或查看浏览器 Network 面板中任意接口请求的 URL,取协议 + 域名/IP + 端口部分。
|
|
37
53
|
|
|
38
|
-
### parentMenuId
|
|
54
|
+
### menu.parentMenuId
|
|
39
55
|
|
|
40
56
|
**方法 A(推荐)**:系统管理后台 → 菜单管理 → 找到目标父级目录 → 点编辑/查看 → 复制菜单 ID
|
|
41
57
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<BaseTable
|
|
13
13
|
ref="tableRef"
|
|
14
14
|
render-type="agGrid"
|
|
15
|
-
cid="mca-
|
|
15
|
+
cid="mca-lhfge5hc"
|
|
16
16
|
:data="list"
|
|
17
17
|
:columns="columns"
|
|
18
18
|
showToolbar
|
|
@@ -58,27 +58,42 @@ AGGrid 通过 `cid` 持久化列配置(列宽、顺序、显示),**cid 必
|
|
|
58
58
|
### 列级 cid
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
格式:{
|
|
61
|
+
格式:{完整表格 cid}-{fieldName}
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
> ✅ 用完整表格 cid(而非仅缩写部分)作前缀,是防碌撞的关键。
|
|
65
|
+
> 同一页面两张表都有 `steelCode` 列时:
|
|
66
|
+
> - 主表(cid=`mca-lhfge5hc`):`mca-lhfge5hc-steelCode` ✅
|
|
67
|
+
> - 子表(cid=`mca-lhfge5hc-sub1`):`mca-lhfge5hc-sub1-steelCode` ✅
|
|
68
|
+
> - 如果用缩写作前缀:两张表同名列都会得到 `mca-steelCode` → 碰撞 ❌
|
|
69
|
+
|
|
64
70
|
```typescript
|
|
65
|
-
//
|
|
71
|
+
// 主表 cid="mca-lhfge5hc"
|
|
66
72
|
columnsDef(): TableColumnDesc<any>[] {
|
|
67
73
|
return [
|
|
68
74
|
{ type: 'selection' },
|
|
69
75
|
{ type: 'index' },
|
|
70
|
-
{ label: '取样', name: 'sampling', cid: 'mca-sampling', width: 70 },
|
|
71
|
-
{ label: '线上公告', name: 'onlineAnnouncement', cid: 'mca-onlineAnnouncement', width: 70 },
|
|
76
|
+
{ label: '取样', name: 'sampling', cid: 'mca-lhfge5hc-sampling', width: 70 },
|
|
77
|
+
{ label: '线上公告', name: 'onlineAnnouncement', cid: 'mca-lhfge5hc-onlineAnnouncement', width: 70 },
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// 子表 cid="mca-lhfge5hc-sub1"
|
|
82
|
+
subColumnsDef(): TableColumnDesc<any>[] {
|
|
83
|
+
return [
|
|
84
|
+
{ type: 'index' },
|
|
85
|
+
{ label: '钢种编码', name: 'steelCode', cid: 'mca-lhfge5hc-sub1-steelCode', width: 100 },
|
|
86
|
+
{ label: '规格', name: 'spec', cid: 'mca-lhfge5hc-sub1-spec', width: 80 },
|
|
72
87
|
]
|
|
73
88
|
}
|
|
74
|
-
```
|
|
75
89
|
|
|
76
90
|
---
|
|
77
91
|
|
|
78
92
|
## 禁止事项
|
|
79
93
|
|
|
80
94
|
- ❌ 随机短字符串 `cid="ipiCfsb"`(AI 重新生成时极易碰撞)
|
|
81
|
-
- ❌
|
|
95
|
+
- ❌ 纴字段名 `cid: "sampling"`(不同页面/不同表格同名字段必碰撞)
|
|
96
|
+
- ❌ 列级 cid 只用缩写 `cid: 'mca-steelCode'`(同页面两张表都有 steelCode 时碰撞)
|
|
82
97
|
- ❌ 省略 cid(列配置持久化完全失效)
|
|
83
98
|
- ❌ 跨页面复用同一 cid
|
|
84
99
|
|
|
@@ -88,7 +103,7 @@ columnsDef(): TableColumnDesc<any>[] {
|
|
|
88
103
|
|
|
89
104
|
```
|
|
90
105
|
✅ cid 已生成:mca-lhfge5hc(mmwr-customer-archive)
|
|
91
|
-
✅ 列级 cid 前缀:mca-
|
|
106
|
+
✅ 列级 cid 前缀:mca-lhfge5hc-(完整表格 cid 加连接符)
|
|
92
107
|
```
|
|
93
108
|
|
|
94
109
|
---
|
|
@@ -115,8 +130,8 @@ columnsDef(): TableColumnDesc<any>[] {
|
|
|
115
130
|
return [
|
|
116
131
|
{ type: 'selection' },
|
|
117
132
|
{ type: 'index' },
|
|
118
|
-
{ label: '客户名称', name: 'customerName', cid: 'mca-customerName', minWidth: 120 },
|
|
119
|
-
{ label: '状态', name: 'status', cid: 'mca-status', minWidth: 80 },
|
|
133
|
+
{ label: '客户名称', name: 'customerName', cid: 'mca-lhfge5hc-customerName', minWidth: 120 },
|
|
134
|
+
{ label: '状态', name: 'status', cid: 'mca-lhfge5hc-status', minWidth: 80 },
|
|
120
135
|
]
|
|
121
136
|
}
|
|
122
137
|
```
|