@agile-team/wl-skills-kit 2.11.0 → 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.
Files changed (95) hide show
  1. package/CHANGELOG.md +47 -9
  2. package/README.md +41 -23
  3. package/bin/wl-skills.js +133 -39
  4. package/docs/agent-pipeline-runbook.md +3 -3
  5. package/docs//345/205/250/347/233/230/345/210/206/346/236/220/344/270/216/346/231/272/350/203/275/344/275/223/346/220/255/345/273/272/346/214/207/345/215/227.md +4 -4
  6. package/files/.wl-skills/copilot-instructions-full.md +233 -233
  7. package/files/.wl-skills/docs/jh-pagination.md +505 -505
  8. package/files/.wl-skills/docs/page-spec-schema.md +109 -0
  9. package/files/.wl-skills/docs/request.md +940 -940
  10. package/files/.wl-skills/guides/architecture.md +1 -1
  11. package/files/.wl-skills/skills/core/convention-audit/SKILL.md +3 -3
  12. package/files/.wl-skills/skills/core/page-codegen/SKILL.md +10 -4
  13. package/files/.wl-skills/skills/core/spec-doc-parse/SKILL.md +332 -332
  14. package/files/.wl-skills/skills/core/spec-doc-parse/USAGE.md +97 -97
  15. package/files/.wl-skills/skills/sync/permission-sync/USAGE.md +107 -107
  16. package/files/.wl-skills/src/components/global/C_ParentView/index.vue +3 -3
  17. package/files/.wl-skills/src/components/global/C_RightToolbar/index.vue +157 -157
  18. package/files/.wl-skills/src/components/global/C_SvgIcon/index.vue +31 -31
  19. package/files/.wl-skills/src/components/global/C_SvgIcon/svgicon.js +10 -10
  20. package/files/.wl-skills/src/components/global/C_TagStatus/README.md +264 -264
  21. package/files/.wl-skills/src/components/global/C_TagStatus/config.ts +192 -192
  22. package/files/.wl-skills/src/components/global/C_TagStatus/index.vue +106 -106
  23. package/files/.wl-skills/src/components/global/C_TagStatus/types.ts +64 -64
  24. package/files/.wl-skills/src/components/global/C_Tree/README.md +153 -153
  25. package/files/.wl-skills/src/components/global/C_Tree/index.scss +42 -42
  26. package/files/.wl-skills/src/components/global/C_Tree/index.vue +78 -78
  27. package/files/.wl-skills/src/components/global/C_Tree/types.ts +59 -59
  28. package/files/.wl-skills/src/components/local/c_formModal/README.md +235 -235
  29. package/files/.wl-skills/src/components/local/c_formModal/data.ts +95 -95
  30. package/files/.wl-skills/src/components/local/c_formModal/index.scss +8 -8
  31. package/files/.wl-skills/src/components/local/c_formModal/index.vue +107 -107
  32. package/files/.wl-skills/src/components/local/c_formSections/data.ts +175 -175
  33. package/files/.wl-skills/src/components/local/c_formSections/index.scss +280 -280
  34. package/files/.wl-skills/src/components/local/c_formSections/index.vue +429 -429
  35. package/files/.wl-skills/src/components/local/c_listModal/data.ts +41 -41
  36. package/files/.wl-skills/src/components/local/c_listModal/index.vue +136 -136
  37. package/files/.wl-skills/src/components/local/c_spliterTitle/index.scss +25 -25
  38. package/files/.wl-skills/src/components/local/c_spliterTitle/index.vue +21 -21
  39. package/files/.wl-skills/src/components/remote/AGGrid/README.md +530 -530
  40. package/files/.wl-skills/src/components/remote/BaseForm/README.md +508 -508
  41. package/files/.wl-skills/src/components/remote/BaseQuery/README.md +865 -865
  42. package/files/.wl-skills/src/components/remote/BaseTable/README.md +941 -941
  43. package/files/.wl-skills/src/components/remote/BaseToolbar/README.md +496 -496
  44. package/files/.wl-skills/src/types/page.ts +24 -24
  45. package/files/.wl-skills/standards/04-coding-basics.md +39 -1
  46. package/files/.wl-skills/standards/09-typescript.md +26 -3
  47. package/files/.wl-skills/standards/14-layout-containers.md +6 -6
  48. package/files/.wl-skills/standards/index.md +2 -2
  49. package/files/.wl-skills/templates/README.md +44 -44
  50. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/api.md +54 -54
  51. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/data.ts +346 -346
  52. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.scss +1 -1
  53. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add/index.vue +28 -28
  54. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/data.ts +115 -115
  55. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.scss +44 -44
  56. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-add-form/index.vue +43 -43
  57. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/data.ts +338 -338
  58. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.scss +1 -1
  59. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change/index.vue +28 -28
  60. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/data.ts +115 -115
  61. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.scss +44 -44
  62. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-apply-change-form/index.vue +43 -43
  63. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/api.md +88 -88
  64. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/data.ts +601 -601
  65. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.scss +1 -1
  66. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-archive/index.vue +64 -64
  67. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/api.md +67 -67
  68. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/data.ts +286 -286
  69. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.scss +139 -139
  70. package/files/.wl-skills/templates/produce/aiflow/mmwr-customer-detail/index.vue +318 -318
  71. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/api.md +98 -98
  72. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/data.ts +543 -543
  73. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.scss +1 -1
  74. package/files/.wl-skills/templates/produce/aiflow/mmwr-temp-customer-archive/index.vue +52 -52
  75. package/files/.wl-skills/templates/sale/demo/add-demo/data.ts +518 -518
  76. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/data.ts +524 -524
  77. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.scss +154 -154
  78. package/files/.wl-skills/templates/sale/demo/billet-flame-cut-plan/index.vue +117 -117
  79. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/data.ts +308 -308
  80. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.scss +99 -99
  81. package/files/.wl-skills/templates/sale/demo/domestic-trade-order/index.vue +77 -77
  82. package/files/.wl-skills/templates/sale/demo/heat-batch-return/data.ts +367 -367
  83. package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.scss +100 -100
  84. package/files/.wl-skills/templates/sale/demo/heat-batch-return/index.vue +170 -170
  85. package/files/.wl-skills/templates/sale/demo/heat-batch-return/meltDialog.vue +320 -320
  86. package/files/.wl-skills/templates/sale/demo/metallurgical-spec/data.ts +824 -824
  87. package/lib/ast-rules.js +304 -9
  88. package/lib/page-spec.js +588 -0
  89. package/lib/safe-fix.js +115 -0
  90. package/mcp/config.js +47 -47
  91. package/mcp/registry.js +6 -1
  92. package/mcp/tools/projectTools.js +19 -1
  93. package/package.json +16 -11
  94. package/files/.wl-skills/src/components/global/C_Splitter/index.scss +0 -61
  95. package/files/.wl-skills/src/components/global/C_Splitter/index.vue +0 -149
@@ -0,0 +1,109 @@
1
+ # page-spec.json 规范(精准实现的"真值锚点")
2
+
3
+ > **为什么需要它**:`page-codegen` 的精准约定——查询字段顺序、表格列顺序、按钮顺序与颜色、操作列严格对应原型、按钮文字保真——过去只活在 AI 的对话上下文里,没有机器可比对的真值。
4
+ > `page-spec.json` 把这份"原型约定"固化到页面目录,`wl-skills validate`(S1~S5 规则)据此**确定性核对 data.ts 是否按约定实现**,让"生成即精准"可被验证、可被卡控。
5
+
6
+ ---
7
+
8
+ ## 落点
9
+
10
+ 每个由 `prototype-scan` / `spec-doc-parse` / `page-codegen` 产出的页面目录下,写入一份 `page-spec.json`:
11
+
12
+ ```
13
+ src/views/[域]/[模块]/[页面]/
14
+ ├── index.vue
15
+ ├── data.ts
16
+ ├── index.scss
17
+ ├── api.md
18
+ └── page-spec.json ← 原型/说明书约定的结构化真值(单一数据源)
19
+ ```
20
+
21
+ > `page-spec.json` 是**约定真值**,data.ts 是**实现**。validate 比对二者,偏差即报。
22
+
23
+ ---
24
+
25
+ ## Schema
26
+
27
+ ```jsonc
28
+ {
29
+ "page": "客户档案", // 必填,页面中文名
30
+ "dir": "src/views/mdata/customer", // 可选,页面目录(相对项目根)
31
+ "mode": "LIST", // 可选,交互模式(LIST/MASTER_DETAIL/...)
32
+
33
+ // 查询字段:顺序 = 原型从左到右、从上到下
34
+ "query": [
35
+ { "name": "customerCode", "label": "客户编码" },
36
+ { "name": "customerName", "label": "客户名称" }
37
+ ],
38
+
39
+ // 表格列:顺序 = 原型表头从左到右(selection/index/_action 可省略,不参与比对)
40
+ "columns": [
41
+ { "name": "customerCode", "label": "客户编码" },
42
+ { "name": "customerName", "label": "客户名称" },
43
+ { "name": "enableStatus", "label": "状态" }
44
+ ],
45
+
46
+ // 工具栏按钮:顺序 = 原型从左到右;color 取原型颜色
47
+ "toolbar": [
48
+ { "label": "新增", "color": "primary", "plain": false },
49
+ { "label": "批量删除", "color": "danger", "plain": false },
50
+ { "label": "导出", "color": "default", "plain": true }
51
+ ],
52
+
53
+ // 操作列按钮:与原型严格一一对应,禁止自行增减
54
+ "operations": [
55
+ { "label": "编辑" },
56
+ { "label": "删除" }
57
+ ]
58
+ }
59
+ ```
60
+
61
+ ### 字段说明
62
+
63
+ | 字段 | 类型 | 必填 | 比对规则 | 偏差级别 |
64
+ |---|---|---|---|---|
65
+ | `page` | string | ✅ | — | — |
66
+ | `query[].name` | string | — | 与 `queryDef()` 字段**集合 + 顺序**比对 | S1 warn |
67
+ | `columns[].name` | string | — | 与 `columnsDef()` 列**集合 + 顺序**比对(忽略 selection/index/_action) | S2 error |
68
+ | `toolbar[].label` | string | — | 与 `toolbarDef()` 按钮**集合 + 顺序**比对 | S3 error |
69
+ | `toolbar[].color` | enum | — | 集合一致时逐个核对颜色(primary/danger/warning/success/default) | S3 warn |
70
+ | `operations[].label` | string | — | 与 `renderOps([...])` 按钮**集合**比对 | S4 error |
71
+
72
+ > `color` 合法值:`primary` `danger` `warning` `success` `default`
73
+ > 颜色映射见 `page-codegen/SKILL.md` §按钮颜色映射表。
74
+
75
+ ---
76
+
77
+ ## 校验规则(validate S1~S5)
78
+
79
+ 执行 `wl-skills validate src/views/xxx` 时,若页面目录存在 `page-spec.json`,自动追加比对:
80
+
81
+ | 规则 | 检查 | 级别 | 含义 |
82
+ |---|---|---|---|
83
+ | S0 | page-spec.json 结构合法性 | warn/info | JSON 解析、字段类型、color 枚举 |
84
+ | S1 | 查询字段顺序/集合 | warn | queryDef 与 spec.query 不一致 |
85
+ | S2 | 表格列顺序/集合 | **error** | columnsDef 与 spec.columns 不一致(阻断提交)|
86
+ | S3 | 工具栏按钮顺序/集合/颜色 | **error**/warn | toolbarDef 与 spec.toolbar 不一致 |
87
+ | S4 | 操作列按钮集合 | **error** | renderOps 与 spec.operations 不一致(含"多了原型外按钮")|
88
+
89
+ - 无 `page-spec.json` 的页面**静默跳过**,不影响其他检查
90
+ - 解析失败降级为 info,不误报
91
+ - error 级别在 `--pre-commit` 时阻断提交,形成"生成 → 卡控 → 修复 → 复扫"闭环
92
+
93
+ ---
94
+
95
+ ## 与 Pipeline 的关系
96
+
97
+ ```
98
+ prototype-scan / spec-doc-parse
99
+ └─ 产出 page-spec(reports/*_PARSE_*.md 含完整 JSON)
100
+
101
+ page-codegen
102
+ └─ 把 page-spec 写入页面目录 page-spec.json(真值落盘)
103
+ └─ 按 page-spec 生成 data.ts(精准实现)
104
+
105
+ wl-skills validate(S1~S5)
106
+ └─ 比对 page-spec.json vs data.ts → 偏差即报 → 闭环
107
+ ```
108
+
109
+ > 这一步让"精准实现"从 **AI 自觉** 升级为 **代码卡控**。