@epoint-testtech/ep-stage-skill 0.0.17 → 0.0.18

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: code-list-generate
3
3
  description: 使用时机:当用户(上游研发/出码方)要「生成 / 编写 / 产出 code_list.json5(出码总结、测试输入物料清单)」、交付需求给下游胶水测试流程、或显式触发 `/code-list-generate <源码根路径>` 时使用。即使用户只说「帮我把这个需求的源码整理成下游测试要的输入文件」「code_list 怎么写」,也应主动使用本 skill。本 skill 引导从 epoint 系源码(perpage/*.html + *Action.java + Entity.java)和 PRD 中提取事实,产出符合下游契约的 code_list.json5。
4
- version: 2026-08-20+6cf6d2e
4
+ version: 2026-08-28+5ba92fd
5
5
  argument-hint: "<源码根路径>(可选;不给则打印输入引导逐项询问)"
6
6
  ---
7
7
 
@@ -125,7 +125,10 @@ node <skill目录>/scripts/validate-code-list.mjs <需求目录>/_docs/code_list
125
125
 
126
126
  ## 查询字段与数据主键
127
127
 
128
- - `pages[role=list].queryFields[]`:`component: 'mini-textbox'` 输入框;`'mini-combobox'` → 下拉。带 `bind: 'dataBean.xxx'` 时下游能推出字段名。
128
+ - `pages[role=list].queryFields[].component` 必须如实记录源码中的 MiniUI 原名,不要为了适配下游把日期/树伪写成 `mini-combobox`。带 `bind: 'dataBean.xxx'` 时下游能推出字段名。
129
+ - glue 白名单映射:`mini-textbox / mini-password / mini-textarea` → `input`;`mini-combobox / mini-listbox` → `listbox`;`mini-datepicker / mini-daterangepicker / mini-monthpicker` → `datepicker`;`mini-filtertree / mini-tree / mini-treeselect` → `tree`。
130
+ - 白名单外的真实组件名仍如实写入 code_list。下游会保留原名,登记 `unresolvedSlots`,并把该查询用例路由到 AI runtime,不再静默压成 listbox。
131
+ - `component` 缺失时下游为保持主链路会暂时按 input 处理,再由运行前 `calibrate` 校准;因此静态能确认时不得省略。
129
132
  - 查询字段若同时出现在新增页 `formFields[]`,下游会为它生成完整 增/查/改/删 四条用例;只在列表页出现的只生成查询用例。
130
133
  - `entities[].fields[]` 里标 `dataKey: true` 的字段是业务主键(如场所名称),下游用它做测试数据的种子值。
131
134
 
@@ -152,6 +155,7 @@ node <skill目录>/scripts/validate-code-list.mjs <需求目录>/_docs/code_list
152
155
  - [ ] 落盘位置是 `<需求名目录>/_docs/code_list.json5`(父目录必须叫 `_docs`,否则下游需求名推导出错)
153
156
  - [ ] `sourceRoot.root` 是绝对路径,所有 `pages[].path`、`sourceFiles` 路径在其下真实存在
154
157
  - [ ] `pages[role=list]` 有 `queryFields`、`buttons`、`rowActions`;`directUrl` 已知则填,不知留空
158
+ - [ ] `queryFields[].component` 已按源码保留 MiniUI 原名;日期/树控件没有伪写成 combobox,未识别原名也没有删除
155
159
  - [ ] 每个按钮的 `action` 分类与上表一致,`custom` 按钮带 `customAction` + `backendMethod`
156
160
  - [ ] 子表列的 `component` 只写了 `input` / `listbox`(或直接省略),没有写 MiniUI 组件名
157
161
  - [ ] `businessRules` 覆盖源码里所有校验/阻断文案;删除类规则带 `assertionHint`(一条规则一个主文案),且只有记录级阻断规则标 `scope: ['delete']`(拦截提示标 `ui`)
@@ -140,7 +140,7 @@
140
140
  directUrl: '<待测列表页直达链接;不确定留空,下游交互补齐>',
141
141
  description: '<页面能力一句话>',
142
142
  queryFields: [
143
- // mini-textbox 输入框;mini-combobox 下拉(补 modelRef)
143
+ // 如实写 MiniUI 原名:textbox/combobox/daterangepicker/filtertree 等;白名单外由下游路由 AI
144
144
  { label: '<查询字段中文标签>', bind: 'dataBean.<field>', component: 'mini-textbox' },
145
145
  { label: '<下拉查询字段>', bind: 'dataBean.<field>', component: 'mini-combobox', modelRef: '<field>Model' },
146
146
  ],
@@ -78,13 +78,15 @@
78
78
  |---|---|
79
79
  | `label` | **必填**,中文标签(下游按 label 生成定位表达式) |
80
80
  | `bind` | `dataBean.<field>`,下游据此推英文字段名 |
81
- | `component` | `mini-textbox`(输入框)/ `mini-combobox`(下拉)/ 其他 MiniUI 组件原名 |
81
+ | `component` | 如实记录 MiniUI 组件原名。glue 已支持:`mini-textbox/mini-password/mini-textarea`、`mini-combobox/mini-listbox`、`mini-datepicker/mini-daterangepicker/mini-monthpicker`、`mini-filtertree/mini-tree/mini-treeselect`。白名单外仍保留原名,下游路由 AI runtime;禁止伪装成 combobox |
82
82
  | `modelRef` | 下拉时必填,指向顶层 `dataModels[].ref` |
83
83
  | `required` / `maxLength` | 表单字段的校验事实 |
84
84
  | `elementHints` | 元素线索(attr/value 对),供下游拼 locator,非最终 locator |
85
85
 
86
86
  > 已知边界(实测观察):下游 create 用例对"必填但不是查询条件"的表单字段依赖内置「默认填充」假设,无法从 code_list 落约具体填值。上游能做的是**把 formFields 的 required/component 标全标准**——必填事实越准,下游默认填充的命中面越清楚。
87
87
 
88
+ > 白名单语义:它表示当前有确定性骨架交互实现,不是 code_list 的合法值全集。静态端必须优先保真;白名单外值由下游的 `unresolvedSlots + uncoveredCandidates` 承载,并由运行时形态知识库持续扩展。
89
+
88
90
  ### childGrids[]
89
91
 
90
92
  `id` / `label` / `actions[]`(label+actionName)/ `columns[]`(field/label/required/modelRef/component)。可选 `editMode: 'cell_edit' | 'row_button_dialog' | 'none'` 覆盖推断。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoint-testtech/ep-stage-skill",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",