@agile-team/wl-skills-kit 2.2.0 → 2.3.1

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +33 -22
  2. package/README.md +11 -103
  3. package/bin/wl-skills.js +2 -42
  4. package/files/.github/guides/README.md +13 -13
  5. package/files/.github/guides/architecture.md +555 -555
  6. package/files/.github/guides/usage.md +176 -173
  7. package/files/.github/reports/README.md +65 -65
  8. package/files/.github/reports/SYS_DICT_INFO.md +50 -50
  9. package/files/.github/reports/SYS_MENU_INFO.md +247 -247
  10. package/files/.github/reports/SYS_PERMISSION_INFO.md +20 -20
  11. package/files/.github/reports//347/273/204/344/273/266/346/217/220/345/217/226/345/273/272/350/256/256.md +33 -33
  12. package/files/.github/reports//350/247/204/350/214/203/345/256/241/346/237/245/346/212/245/345/221/212.md +44 -44
  13. package/files/.github/skills/_compat/README.md +108 -108
  14. package/files/.github/skills/_compat/headers/agents.txt +8 -8
  15. package/files/.github/skills/_compat/headers/claude-code.txt +7 -7
  16. package/files/.github/skills/_compat/headers/cline.txt +7 -7
  17. package/files/.github/skills/_compat/headers/cursor-mdc.txt +16 -16
  18. package/files/.github/skills/_compat/headers/cursor-rules.txt +7 -7
  19. package/files/.github/skills/_compat/headers/github-copilot.txt +1 -1
  20. package/files/.github/skills/_compat/headers/kiro.txt +10 -10
  21. package/files/.github/skills/_compat/headers/trae.txt +11 -11
  22. package/files/.github/skills/_compat/headers/windsurf.txt +7 -7
  23. package/files/.github/skills/_registry.md +81 -81
  24. package/files/.github/skills/core/api-contract/SKILL.md +344 -344
  25. package/files/.github/skills/core/api-contract/USAGE.md +110 -110
  26. package/files/.github/skills/core/convention-audit/SKILL.md +189 -189
  27. package/files/.github/skills/core/convention-audit/USAGE.md +99 -99
  28. package/files/.github/skills/core/page-codegen/SKILL.md +973 -973
  29. package/files/.github/skills/core/page-codegen/USAGE.md +102 -102
  30. package/files/.github/skills/core/page-codegen/templates/_index.md +46 -46
  31. package/files/.github/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +107 -107
  32. package/files/.github/skills/core/page-codegen/templates/domains/produce/TPL-OPERATION-STATION.md +442 -442
  33. package/files/.github/skills/core/page-codegen/templates/domains/sale/README.md +26 -26
  34. package/files/.github/skills/core/page-codegen/templates/universal/TPL-CHANGE-HISTORY.md +276 -276
  35. package/files/.github/skills/core/page-codegen/templates/universal/TPL-DETAIL-TABS.md +1145 -1145
  36. package/files/.github/skills/core/page-codegen/templates/universal/TPL-DRIVEN.md +124 -124
  37. package/files/.github/skills/core/page-codegen/templates/universal/TPL-FORM-ROUTE.md +436 -436
  38. package/files/.github/skills/core/page-codegen/templates/universal/TPL-LIST.md +191 -191
  39. package/files/.github/skills/core/page-codegen/templates/universal/TPL-MASTER-DETAIL.md +148 -148
  40. package/files/.github/skills/core/page-codegen/templates/universal/TPL-RECORD-FORM.md +376 -376
  41. package/files/.github/skills/core/page-codegen/templates/universal/TPL-TREE-LIST.md +186 -186
  42. package/files/.github/skills/core/prototype-scan/SKILL.md +498 -498
  43. package/files/.github/skills/core/prototype-scan/USAGE.md +95 -95
  44. package/files/.github/skills/core/template-extract/SKILL.md +139 -139
  45. package/files/.github/skills/core/template-extract/USAGE.md +93 -93
  46. package/files/.github/skills/domain/README.md +51 -51
  47. package/files/.github/skills/sync/env.local.json +2 -1
  48. package/files/.github/skills/sync/menu-sync/SKILL.md +263 -263
  49. package/files/.github/skills/sync/menu-sync/USAGE.md +104 -104
  50. package/files/.github/skills/sync/menu-sync/env/env.local.json +7 -7
  51. package/files/.github/skills/sync/menu-sync/env/guide.md +99 -99
  52. package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -91
  53. package/files/.github/standards/01-toolchain.md +57 -57
  54. package/files/.github/standards/02-code-structure.md +111 -111
  55. package/files/.github/standards/03-comments.md +53 -53
  56. package/files/.github/standards/04-coding-basics.md +33 -33
  57. package/files/.github/standards/05-logging.md +38 -38
  58. package/files/.github/standards/06-security.md +44 -44
  59. package/files/.github/standards/07-config.md +52 -52
  60. package/files/.github/standards/08-git.md +60 -60
  61. package/files/.github/standards/09-typescript.md +71 -71
  62. package/files/.github/standards/10-pinia.md +57 -57
  63. package/files/.github/standards/11-form-validation.md +81 -81
  64. package/files/.github/standards/12-base-table.md +153 -153
  65. package/files/.github/standards/13-platform-components.md +123 -123
  66. package/files/.github/standards/index.md +89 -89
  67. package/files/demo/produce/aiflow/mmwr-customer-apply-add/api.md +1 -1
  68. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
  69. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
  70. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
  71. package/files/docs/jh-date-range.md +257 -257
  72. package/files/docs/jh-date.md +222 -222
  73. package/files/docs/jh-dept-picker.md +190 -190
  74. package/files/docs/jh-drag-row.md +590 -590
  75. package/files/docs/jh-file-upload.md +216 -216
  76. package/files/docs/jh-picker.md +218 -218
  77. package/files/docs/jh-select.md +148 -148
  78. package/files/docs/jh-text.md +248 -248
  79. package/files/docs/jh-user-picker.md +197 -197
  80. package/files/docs/request.md +24 -9
  81. package/files/src/components/global/C_RightToolbar/data.ts +228 -0
  82. package/files/src/components/global/C_RightToolbar/index.scss +44 -0
  83. package/files/src/components/global/C_RightToolbar/index.vue +34 -336
  84. package/files/src/components/global/C_Splitter/index.scss +61 -0
  85. package/files/src/components/global/C_Splitter/index.vue +2 -64
  86. package/files/src/components/global/C_SvgIcon/index.scss +15 -0
  87. package/files/src/components/global/C_SvgIcon/index.vue +20 -50
  88. package/files/src/components/global/C_TagStatus/index.scss +20 -0
  89. package/files/src/components/global/C_TagStatus/index.vue +1 -22
  90. package/files/src/components/global/C_Tree/data.ts +61 -0
  91. package/files/src/components/global/C_Tree/index.vue +12 -53
  92. package/files/src/components/local/c_listModal/index.scss +4 -0
  93. package/files/src/components/local/c_listModal/index.vue +1 -1
  94. package/mcp/api/client.js +76 -0
  95. package/mcp/api/dictApi.js +40 -0
  96. package/mcp/api/menuApi.js +32 -0
  97. package/mcp/config.js +47 -0
  98. package/mcp/server.js +210 -0
  99. package/mcp/tools/dictSync.js +173 -0
  100. package/mcp/tools/menuSync.js +96 -0
  101. package/package.json +6 -9
@@ -1,124 +1,124 @@
1
- # TEMPLATE_DRIVEN:配置驱动模板页(识别参考)
2
-
3
- > ⚠️ **本文件为识别参考,不是代码生成模板。**
4
- > 配置驱动页面已由现有业务模板组件封装,AI **只需生成 config 配置对象**,不得套用 TPL-A 至 TPL-G 的结构重新手写页面逻辑。
5
-
6
- ---
7
-
8
- ## 什么是配置驱动模板页
9
-
10
- 这类页面的 `index.vue` 极为简单,只有 1-3 行:
11
-
12
- ```vue
13
- <template>
14
- <div class="app-container app-page-container">
15
- <XxxTemplate :config="xxxConfig" />
16
- </div>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import { xxxConfig } from "./data";
21
- </script>
22
- ```
23
-
24
- 所有业务逻辑(查询、表格列、导出、翻译等)全部由模板组件内部处理,`data.ts` 只需导出一个 `config` 对象。
25
-
26
- ---
27
-
28
- ## 已知配置驱动模板一览
29
-
30
- > ⚠️ **以下模板是基于高度相似的特定业务场景提炼的**,仅适用于列出的具体页面类型。不得因为"看起来相似"就套用到其他业务场景,否则会出现功能异常。
31
-
32
- ### 1. ResultQueryTemplate(轧钢实绩查询类)
33
-
34
- **适用范围**:`production-mmwr/sjtj/` 下的各工序实绩查询页(查询+表格+导出,无新增/编辑/删除)
35
-
36
- **识别特征**:
37
- - 原型中只有查询区 + 数据表格 + 导出按钮
38
- - 无 CRUD 操作,纯查询
39
- - 字段较多,表格列数 10+
40
-
41
- **生成规则**:
42
-
43
- ```typescript
44
- // data.ts — 只导出一个 config 对象
45
- import type { ResultQueryConfig } from "@/components/template/ResultQueryTemplate/types";
46
- import { BusLogicDataType } from "@/types/page";
47
-
48
- export const [pageName]Config: ResultQueryConfig = {
49
- api: {
50
- list: "/[服务缩写]/[资源名]/list",
51
- export: "/[服务缩写]/[资源名]/export" // 有导出时才加
52
- },
53
- queryItems: [
54
- // 同 Template A 的 queryDef 格式
55
- { name: "[field]", label: "[中文名]", placeholder: "请输入" },
56
- {
57
- name: "[dateField]",
58
- type: "range",
59
- startName: "[startDate]",
60
- endName: "[endDate]",
61
- label: "[日期名]",
62
- logicType: BusLogicDataType.date,
63
- rangeSeparator: "至"
64
- }
65
- ],
66
- columns: [
67
- // 同 Template A 的 columnsDef 格式(无 selection/index/操作列)
68
- { label: "[列名]", name: "[fieldName]", minWidth: 120 }
69
- ]
70
- };
71
- ```
72
-
73
- ```vue
74
- <!-- index.vue -->
75
- <template>
76
- <ResultQueryTemplate :config="[pageName]Config" />
77
- </template>
78
-
79
- <script setup lang="ts">
80
- import ResultQueryTemplate from "@/components/template/ResultQueryTemplate/index.vue";
81
- import { [pageName]Config } from "./data";
82
- </script>
83
- ```
84
-
85
- ---
86
-
87
- ### 2. FinishingAchievementTemplate(精整实绩类)
88
-
89
- **适用范围**:`production-mmwr/jzsj/` 下的各精整工序实绩管理页(喷砂、倒棱、矫直、剥皮、检验、酸洗、包装)
90
-
91
- **识别特征**:
92
- - 原型标题含"实绩"二字且在精整工序列表中
93
- - 有固定的查询区 + 实绩录入 + 汇总数据结构
94
- - 字段结构高度统一(同一套模板 7 个页面共用)
95
-
96
- **生成规则**:参考 `src/components/template/FinishingAchievementTemplate/` 内的 `types.ts` 定义,只生成对应的 config 配置。
97
-
98
- ---
99
-
100
- ### 3. ApplicationDeterminationTemplate(申请判定类)
101
-
102
- **适用范围**:`production-mmwr/` 下的申请判定类页面(如 mmwr-application-determination-jz、mmwr-application-determination-sj)
103
-
104
- **识别特征**:原型中有"申请"列表 + "判定"操作的双状态工作流页面
105
-
106
- ---
107
-
108
- ### 4. SamplingCommissionTemplate(取样委托类)
109
-
110
- **适用范围**:`production-mmwr/jhgl/` 下的取样委托管理页(如 mmwr-sampling-commission-jz、mmwr-sampling-commission-sj)
111
-
112
- **识别特征**:原型中有"委托单"列表 + 取样记录结构
113
-
114
- ---
115
-
116
- ## AI 操作规范
117
-
118
- 1. **识别阶段**:在 page-spec 前置检查时,若页面落入以上任一范围,将交互模式标记为 `TEMPLATE_DRIVEN` 并注明具体模板名
119
- 2. **生成阶段**:只生成 `data.ts`(config 对象)+ `index.vue`(2-3行)+ `index.scss`(空或极少样式)
120
- 3. **禁止行为**:
121
- - ❌ 不得手写 `createPage()` + `AbstractPageQueryHook` 结构
122
- - ❌ 不得添加独立的 `BaseQuery` / `BaseTable` / `jh-pagination`(模板内部已处理)
123
- - ❌ 不得将其他业务场景的页面识别为 TEMPLATE_DRIVEN 并套用以上 config 格式
124
- 4. **不确定时**:如果不确定是否适用配置驱动模板,使用 Template A(LIST)代替,更安全
1
+ # TEMPLATE_DRIVEN:配置驱动模板页(识别参考)
2
+
3
+ > ⚠️ **本文件为识别参考,不是代码生成模板。**
4
+ > 配置驱动页面已由现有业务模板组件封装,AI **只需生成 config 配置对象**,不得套用 TPL-A 至 TPL-G 的结构重新手写页面逻辑。
5
+
6
+ ---
7
+
8
+ ## 什么是配置驱动模板页
9
+
10
+ 这类页面的 `index.vue` 极为简单,只有 1-3 行:
11
+
12
+ ```vue
13
+ <template>
14
+ <div class="app-container app-page-container">
15
+ <XxxTemplate :config="xxxConfig" />
16
+ </div>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { xxxConfig } from "./data";
21
+ </script>
22
+ ```
23
+
24
+ 所有业务逻辑(查询、表格列、导出、翻译等)全部由模板组件内部处理,`data.ts` 只需导出一个 `config` 对象。
25
+
26
+ ---
27
+
28
+ ## 已知配置驱动模板一览
29
+
30
+ > ⚠️ **以下模板是基于高度相似的特定业务场景提炼的**,仅适用于列出的具体页面类型。不得因为"看起来相似"就套用到其他业务场景,否则会出现功能异常。
31
+
32
+ ### 1. ResultQueryTemplate(轧钢实绩查询类)
33
+
34
+ **适用范围**:`production-mmwr/sjtj/` 下的各工序实绩查询页(查询+表格+导出,无新增/编辑/删除)
35
+
36
+ **识别特征**:
37
+ - 原型中只有查询区 + 数据表格 + 导出按钮
38
+ - 无 CRUD 操作,纯查询
39
+ - 字段较多,表格列数 10+
40
+
41
+ **生成规则**:
42
+
43
+ ```typescript
44
+ // data.ts — 只导出一个 config 对象
45
+ import type { ResultQueryConfig } from "@/components/template/ResultQueryTemplate/types";
46
+ import { BusLogicDataType } from "@/types/page";
47
+
48
+ export const [pageName]Config: ResultQueryConfig = {
49
+ api: {
50
+ list: "/[服务缩写]/[资源名]/list",
51
+ export: "/[服务缩写]/[资源名]/export" // 有导出时才加
52
+ },
53
+ queryItems: [
54
+ // 同 Template A 的 queryDef 格式
55
+ { name: "[field]", label: "[中文名]", placeholder: "请输入" },
56
+ {
57
+ name: "[dateField]",
58
+ type: "range",
59
+ startName: "[startDate]",
60
+ endName: "[endDate]",
61
+ label: "[日期名]",
62
+ logicType: BusLogicDataType.date,
63
+ rangeSeparator: "至"
64
+ }
65
+ ],
66
+ columns: [
67
+ // 同 Template A 的 columnsDef 格式(无 selection/index/操作列)
68
+ { label: "[列名]", name: "[fieldName]", minWidth: 120 }
69
+ ]
70
+ };
71
+ ```
72
+
73
+ ```vue
74
+ <!-- index.vue -->
75
+ <template>
76
+ <ResultQueryTemplate :config="[pageName]Config" />
77
+ </template>
78
+
79
+ <script setup lang="ts">
80
+ import ResultQueryTemplate from "@/components/template/ResultQueryTemplate/index.vue";
81
+ import { [pageName]Config } from "./data";
82
+ </script>
83
+ ```
84
+
85
+ ---
86
+
87
+ ### 2. FinishingAchievementTemplate(精整实绩类)
88
+
89
+ **适用范围**:`production-mmwr/jzsj/` 下的各精整工序实绩管理页(喷砂、倒棱、矫直、剥皮、检验、酸洗、包装)
90
+
91
+ **识别特征**:
92
+ - 原型标题含"实绩"二字且在精整工序列表中
93
+ - 有固定的查询区 + 实绩录入 + 汇总数据结构
94
+ - 字段结构高度统一(同一套模板 7 个页面共用)
95
+
96
+ **生成规则**:参考 `src/components/template/FinishingAchievementTemplate/` 内的 `types.ts` 定义,只生成对应的 config 配置。
97
+
98
+ ---
99
+
100
+ ### 3. ApplicationDeterminationTemplate(申请判定类)
101
+
102
+ **适用范围**:`production-mmwr/` 下的申请判定类页面(如 mmwr-application-determination-jz、mmwr-application-determination-sj)
103
+
104
+ **识别特征**:原型中有"申请"列表 + "判定"操作的双状态工作流页面
105
+
106
+ ---
107
+
108
+ ### 4. SamplingCommissionTemplate(取样委托类)
109
+
110
+ **适用范围**:`production-mmwr/jhgl/` 下的取样委托管理页(如 mmwr-sampling-commission-jz、mmwr-sampling-commission-sj)
111
+
112
+ **识别特征**:原型中有"委托单"列表 + 取样记录结构
113
+
114
+ ---
115
+
116
+ ## AI 操作规范
117
+
118
+ 1. **识别阶段**:在 page-spec 前置检查时,若页面落入以上任一范围,将交互模式标记为 `TEMPLATE_DRIVEN` 并注明具体模板名
119
+ 2. **生成阶段**:只生成 `data.ts`(config 对象)+ `index.vue`(2-3行)+ `index.scss`(空或极少样式)
120
+ 3. **禁止行为**:
121
+ - ❌ 不得手写 `createPage()` + `AbstractPageQueryHook` 结构
122
+ - ❌ 不得添加独立的 `BaseQuery` / `BaseTable` / `jh-pagination`(模板内部已处理)
123
+ - ❌ 不得将其他业务场景的页面识别为 TEMPLATE_DRIVEN 并套用以上 config 格式
124
+ 4. **不确定时**:如果不确定是否适用配置驱动模板,使用 Template A(LIST)代替,更安全