@teamix-evo/skills 0.5.0 → 0.6.0

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 (72) hide show
  1. package/package.json +2 -2
  2. package/src/teamix-evo-design-opentrek/SKILL.md +210 -42
  3. package/src/teamix-evo-design-opentrek/boundaries.md +3 -3
  4. package/src/teamix-evo-design-opentrek/components.md +41 -40
  5. package/src/teamix-evo-design-opentrek/examples/detail-ai-gateway-1.html +1069 -0
  6. package/src/teamix-evo-design-opentrek/examples/detail-ai-gateway-instance.html +941 -0
  7. package/src/teamix-evo-design-opentrek/examples/detail-page-api-doc.html +906 -0
  8. package/src/teamix-evo-design-opentrek/examples/detail-page-config.html +993 -0
  9. package/src/teamix-evo-design-opentrek/examples/detail-page-monitor.html +1339 -0
  10. package/src/teamix-evo-design-opentrek/examples/detail-page.html +933 -0
  11. package/src/teamix-evo-design-opentrek/examples/settings-page.html +1119 -0
  12. package/src/teamix-evo-design-opentrek/examples/standard-card-list.html +1094 -0
  13. package/src/teamix-evo-design-opentrek/examples/standard-table-list.html +1361 -0
  14. package/src/teamix-evo-design-opentrek/examples/wizard-form-page.html +877 -0
  15. package/src/teamix-evo-design-opentrek/flows.md +85 -12
  16. package/src/teamix-evo-design-opentrek/foundations.md +9 -9
  17. package/src/teamix-evo-design-opentrek/generation-flow.md +15 -3
  18. package/src/teamix-evo-design-opentrek/pages/detail-page/SKILL.md +260 -0
  19. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/api-doc-detail.md +163 -0
  20. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/comparison-detail.md +100 -0
  21. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/monitor-detail.md +190 -0
  22. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/resource-detail.md +148 -0
  23. package/src/teamix-evo-design-opentrek/pages/form-page/SKILL.md +362 -0
  24. package/src/teamix-evo-design-opentrek/pages/list-page/SKILL.md +286 -0
  25. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/action-column-spec.md +60 -0
  26. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/column-meta-rules.md +117 -0
  27. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/search-combo-spec.md +194 -0
  28. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/state-action-pattern.md +51 -0
  29. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/advanced-filter-list.md +94 -0
  30. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list.md +558 -0
  31. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/drawer-list.md +76 -0
  32. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/expandable-list.md +70 -0
  33. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/l2-sidebar-list.md +73 -0
  34. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list.md +198 -0
  35. package/src/teamix-evo-design-opentrek/patterns/color-mapping.md +1 -1
  36. package/src/teamix-evo-design-opentrek/patterns/detail-page.md +217 -152
  37. package/src/teamix-evo-design-opentrek/patterns/form-page.md +437 -231
  38. package/src/teamix-evo-design-opentrek/patterns/list-page.md +220 -292
  39. package/src/teamix-evo-design-opentrek/patterns/page-types.md +40 -130
  40. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AGENT RUNTIME.svg +1 -0
  41. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI GATEWAY.svg +1 -0
  42. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI STUDIO.svg +1 -0
  43. package/src/teamix-evo-design-opentrek/rules/_assets/OP_DEV-2.svg +1 -0
  44. package/src/teamix-evo-design-opentrek/rules/_assets/OP_LOGO.svg +1 -0
  45. package/src/teamix-evo-design-opentrek/rules/_assets/OP_OPS.svg +1 -0
  46. package/src/teamix-evo-design-opentrek/rules/boundaries.rules.json +3 -3
  47. package/src/teamix-evo-design-opentrek/rules/business-mapping.json +124 -0
  48. package/src/teamix-evo-design-opentrek/rules/common-components.json +924 -0
  49. package/src/teamix-evo-design-opentrek/rules/component-specs.json +1083 -0
  50. package/src/teamix-evo-design-opentrek/rules/design-tokens.css +433 -0
  51. package/src/teamix-evo-design-opentrek/rules/design-tokens.json +2798 -0
  52. package/src/teamix-evo-design-opentrek/rules/layout-rules.json +218 -0
  53. package/src/teamix-evo-design-opentrek/rules/page-flow.json +351 -0
  54. package/src/teamix-evo-design-opentrek/rules/page-frame.json +241 -0
  55. package/src/teamix-evo-design-opentrek/rules/page-header-spec.md +123 -0
  56. package/src/teamix-evo-design-opentrek/rules/page-types.json +206 -0
  57. package/src/teamix-evo-design-opentrek/rules/sidebar-spec.md +217 -0
  58. package/src/teamix-evo-design-opentrek/rules/styling.json +188 -0
  59. package/src/teamix-evo-design-opentrek/rules/token-mapping.md +284 -0
  60. package/src/teamix-evo-design-uni-manager/SKILL.md +1 -1
  61. package/src/teamix-evo-design-uni-manager/boundaries.md +3 -3
  62. package/src/teamix-evo-design-uni-manager/brand.md +1 -1
  63. package/src/teamix-evo-design-uni-manager/components.md +30 -28
  64. package/src/teamix-evo-design-uni-manager/foundations.md +21 -21
  65. package/src/teamix-evo-design-uni-manager/generation-flow.md +3 -1
  66. package/src/teamix-evo-design-uni-manager/patterns/detail-page.md +1 -1
  67. package/src/teamix-evo-design-uni-manager/patterns/form-page.md +18 -18
  68. package/src/teamix-evo-design-uni-manager/patterns/list-page.md +29 -29
  69. package/src/teamix-evo-design-uni-manager/patterns/page-types.md +11 -11
  70. package/src/teamix-evo-design-uni-manager/philosophy.md +1 -1
  71. package/src/teamix-evo-design-uni-manager/rules/boundaries.rules.json +3 -3
  72. package/src/teamix-evo-design-opentrek/patterns/sidebar.md +0 -122
@@ -0,0 +1,217 @@
1
+ # Sidebar 完整规格
2
+
3
+ > 适用于所有 L1/L2 页面的侧边栏框架组件。Sidebar 是全局框架组件(`page-frame.json` → `frameComponents.sidebar`),所有含 Sidebar 的页面自动继承此规范。
4
+ >
5
+ > **真相源**:
6
+ > - 宽度/Token → [`design-tokens.json`](./design-tokens.json) → `sidebarRules`
7
+ > - 框架继承 → [`page-frame.json`](./page-frame.json) → `frameComponents.sidebar`
8
+ > - 品牌 Logo SVG → [`_assets/`](./_assets/)
9
+
10
+ ---
11
+
12
+ ## 1. 整体容器
13
+
14
+ | 属性 | 值 | 说明 |
15
+ |------|------|------|
16
+ | position | `fixed` | 固定定位,不随内容滚动 |
17
+ | width | `var(--layout-sidebar-width)` (240px) | 展开态宽度 |
18
+ | background | `hsl(var(--sidebar))` | 即 `--gray-muted` |
19
+ | z-index | `100` | 高于内容层 |
20
+ | display | `flex` / `flex-direction: column` | 垂直排列 header + content + footer |
21
+ | transition | `width 0.2s ease` | 展开/收起动画 |
22
+
23
+ ---
24
+
25
+ ## 2. sidebar-header 容器
26
+
27
+ | 属性 | 值 | 说明 |
28
+ |------|------|------|
29
+ | height | 不固定(由内容撑开) | 禁止硬编码 56px 等固定高度 |
30
+ | padding | `16px 16px 0` | 顶部 16px 保证 Logo 距页面顶边距 |
31
+ | display | `flex` | 水平排列 Logo + 折叠按钮 |
32
+ | align-items | `center` | 垂直居中 |
33
+ | gap | `var(--gap-xs)` (4px) | Logo 与折叠按钮间距 |
34
+
35
+ ---
36
+
37
+ ## 3. sidebar-logo 容器
38
+
39
+ | 属性 | 值 | 说明 |
40
+ |------|------|------|
41
+ | height | `32px` | Logo 可视区域高度 |
42
+ | display | `flex` | 内部元素水平排列 |
43
+ | align-items | `center` | 垂直居中 |
44
+ | overflow | `hidden` | 防止内容溢出 |
45
+ | flex-shrink | `0` | 禁止压缩 |
46
+
47
+ ---
48
+
49
+ ## 4. 品牌 SVG Logo
50
+
51
+ | 属性 | 值 | 说明 |
52
+ |------|------|------|
53
+ | width | `154px` | 保持宽高比 404:84 |
54
+ | height | `32px` | 与容器高度一致 |
55
+ | viewBox | `0 0 404 84` | 原始设计稿尺寸 |
56
+ | 来源文件 | `OP_DEV-2.svg` | 完整品牌矢量图(默认产品) |
57
+
58
+ ---
59
+
60
+ ## 5. sidebar-content 区域
61
+
62
+ | 属性 | 值 | 说明 |
63
+ |------|------|------|
64
+ | flex | `1` | 占满剩余空间 |
65
+ | padding-top | `24px` | 导航菜单与 header 的间距 |
66
+ | padding-bottom | `12px` | 底部留白 |
67
+ | overflow-y | `auto` | 内容超出时可滚动 |
68
+
69
+ ---
70
+
71
+ ## 6. 收起态(Collapsed)
72
+
73
+ > 点击收起按钮后,侧栏从 240px 收窄至 68px,Logo 切换为纯图标,展开按钮置于 Logo 下方。
74
+
75
+ ### 6.1 整体布局
76
+
77
+ | 属性 | 展开态 | 收起态 | 说明 |
78
+ |------|--------|--------|------|
79
+ | sidebar width | `240px` | `68px` | CSS 变量 `--layout-sidebar-width` 仅控制展开态 |
80
+ | transition | — | `width 0.2s ease` | 展开/收起动画 |
81
+ | overflow | `hidden` | `visible` | 收起态允许 flyout 溢出 |
82
+
83
+ ### 6.2 sidebar-header 收起态
84
+
85
+ | 属性 | 值 | 说明 |
86
+ |------|------|------|
87
+ | padding | `16px 0 0` | 仅保留顶部间距,水平归零 |
88
+ | flex-direction | `column` | 垂直排列 Logo + 展开按钮 |
89
+ | align-items | `center` | 水平居中 |
90
+
91
+ ### 6.3 收起态 Logo
92
+
93
+ | 属性 | 值 | 说明 |
94
+ |------|------|------|
95
+ | 来源文件 | `OP_LOGO.svg` | 仅图标(黑色圆角矩形 + 白色钻石图案),无产品文字 |
96
+ | width × height | `30px × 30px` | 适配 68px 侧栏宽度 |
97
+ | viewBox | `0 0 84 84` | 原始正方形画布 |
98
+ | 切换逻辑 | 完整 Logo 隐藏 → 收起 Logo 显示 | CSS class `.collapsed-logo` 控制 |
99
+
100
+ ### 6.4 展开按钮
101
+
102
+ | 属性 | 值 | 说明 |
103
+ |------|------|------|
104
+ | 位置 | Logo 正下方 | `margin-top: 8px` |
105
+ | 尺寸 | `18px × 18px` | 与收起按钮一致 |
106
+ | 图标 | Lucide `PanelLeftOpen` | `<path d="m14 9 3 3-3 3"/>` 方向朝右 |
107
+ | 颜色 | `hsl(var(--muted-foreground))` | hover → `hsl(var(--gray-primary))` |
108
+ | 展开态可见性 | `display: none` | 仅收起态显示 |
109
+
110
+ ### 6.5 收起/展开按钮对照
111
+
112
+ | 按钮 | 图标 | 可见条件 | 位置 |
113
+ |------|------|----------|------|
114
+ | 收起按钮 `.sidebar-collapse-btn` | Lucide `PanelLeftClose`(箭头朝左) | 展开态 | sidebar-header 右侧(`margin-left: auto`) |
115
+ | 展开按钮 `.sidebar-expand-btn` | Lucide `PanelLeftOpen`(箭头朝右) | 收起态 | Logo 下方居中 |
116
+
117
+ ---
118
+
119
+ ## 7. 品牌 Logo 资源清单
120
+
121
+ | 文件名 | 用途 | 存放路径 |
122
+ |--------|------|----------|
123
+ | `OP_DEV-2.svg` | 展开态完整 Logo(含 OPENTREK DEV 文字) | `rules/_assets/` |
124
+ | `OP_LOGO.svg` | 收起态纯图标 Logo | `rules/_assets/` |
125
+ | `OP_AI STUDIO.svg` | AI Studio 产品变体 | `rules/_assets/` |
126
+ | `OP_AGENT RUNTIME.svg` | Agent Runtime 产品变体 | `rules/_assets/` |
127
+ | `OP_OPS.svg` | OPS 产品变体 | `rules/_assets/` |
128
+ | `OP_AI GATEWAY.svg` | AI Gateway 产品变体 | `rules/_assets/` |
129
+
130
+ ### 7.1 Logo 资源引用规则
131
+
132
+ 品牌 Logo **必须使用** `_assets/` 目录中的 SVG 文件,禁止使用文字占位或外部图片链接。
133
+
134
+ **资源映射表**:
135
+
136
+ | 产品线 | SVG 文件 | 使用场景 |
137
+ |---|---|---|
138
+ | AI Gateway | `_assets/OP_AI GATEWAY.svg` | AI 网关相关页面 |
139
+ | AI Studio | `_assets/OP_AI STUDIO.svg` | AI 开发平台相关页面 |
140
+ | Agent Runtime | `_assets/OP_AGENT RUNTIME.svg` | Agent 运行时相关页面 |
141
+ | DEV | `_assets/OP_DEV-2.svg` | 开发者工具相关页面 |
142
+ | OPS | `_assets/OP_OPS.svg` | 运维相关页面 |
143
+ | 通用 Logo | `_assets/OP_LOGO.svg` | 产品线未明确时使用 |
144
+
145
+ **引用方式**:
146
+ - 生成页面时,根据当前产品线从上表选择对应 SVG
147
+ - Logo 放置在 Sidebar 品牌区域(顶部),与产品名文字并排
148
+ - **必须以 inline SVG 方式嵌入**(直接将 SVG path 写入 JSX/HTML),禁止用 `<img src>` 或外部引用
149
+ - 仅截取 SVG 的**图标部分**(viewBox `0 0 84 84`),文字(OPENTREK / AI GATEWAY)由 Sidebar 右侧 `<span>` 双行渲染
150
+
151
+ **inline SVG 实现要求**:
152
+ - 外层 `<rect>` 使用 `fill="currentColor"`,内层图案使用 `fill="white"` — 容器通过 `text-foreground` 类控色,自动适配主题
153
+ - `<clipPath>` 的 `id` 必须全局唯一(按页面命名,如 `opai-logo-clip-{page-name}`),避免同 DOM 多个 SVG id 冲突
154
+ - Logo 组件尺寸:`size-8`(32×32px),与 §3 sidebar-logo 容器 `height: 32px` 对齐
155
+ - path 数据必须来自 `_assets/` 中对应 SVG 文件的真实内容,禁止简化或自绘近似图形
156
+
157
+ **禁止项**:
158
+ - ❌ 使用纯文字模拟 Logo(如用 div + font-weight:bold 模拟品牌标识)
159
+ - ❌ 使用 Lucide/其他图标库图标占位(如 Layers、Diamond 等)
160
+ - ❌ 使用外部 URL 引用 Logo
161
+ - ❌ 使用非 `_assets/` 目录的图片资源
162
+ - ❌ 自绘简化 SVG path 代替真实 Logo(即使视觉近似也不允许)
163
+ - ❌ 多个页面使用相同的 clipPath id(会导致渲染冲突)
164
+
165
+ ---
166
+
167
+ ## 8. Sidebar Footer 用户信息区域
168
+
169
+ > 侧边栏底部固定的用户身份展示区域。
170
+
171
+ | 属性 | 值 | 说明 |
172
+ |------|------|------|
173
+ | padding | `12px 12px 16px 24px` | 展开态内边距 |
174
+ | display | `flex` | 水平排列 |
175
+ | align-items | `center` | 垂直居中 |
176
+ | gap | `var(--button-gap)` (8px) | 元素间距 |
177
+
178
+ ### 8.1 头像(sidebar-avatar)
179
+
180
+ | 属性 | 值 | 说明 |
181
+ |------|------|------|
182
+ | 尺寸 | `28px × 28px` | 固定圆形 |
183
+ | border-radius | `50%` | 圆形 |
184
+ | background | `hsl(var(--sidebar-active))` | 与菜单激活态背景一致 |
185
+ | font-size | `var(--font-size-base)` (12px) | 头像内文字 |
186
+ | font-weight | `600` | 半粗体 |
187
+ | 内容 | 用户姓名**最后一个字** | 如「小王」→ 显示「王」 |
188
+
189
+ ### 8.2 用户名(sidebar-username)
190
+
191
+ | 属性 | 值 | 说明 |
192
+ |------|------|------|
193
+ | font-size | `var(--font-size-lg)` (14px) | 用户名字号 |
194
+ | font-weight | `var(--font-weight-medium)` (500) | 中等字重 |
195
+ | color | `hsl(var(--sidebar-item))` | 与菜单项文字颜色一致 |
196
+ | overflow | `hidden` + `text-overflow: ellipsis` | 超长截断 |
197
+ | white-space | `nowrap` | 禁止换行 |
198
+ | 默认值 | `小王` | 占位用户名 |
199
+
200
+ ### 8.3 更多按钮(sidebar-more)
201
+
202
+ | 属性 | 值 | 说明 |
203
+ |------|------|------|
204
+ | 尺寸 | `28px × 28px` | 正方形点击区域 |
205
+ | border-radius | `var(--radius-sm)` (4px) | 微圆角 |
206
+ | 图标 | 三点竖排(MoreVertical) | `<circle cx="12" cy="5/12/19" r="2"/>` |
207
+ | color | `hsl(var(--muted-foreground))` | hover → `hsl(var(--gray-primary))` |
208
+ | hover background | `hsl(var(--sidebar-hover))` | 悬停底色 |
209
+
210
+ ### 8.4 收起态 Footer
211
+
212
+ | 属性 | 值 | 说明 |
213
+ |------|------|------|
214
+ | padding | `12px 10px 16px` | 收窄内边距 |
215
+ | justify-content | `center` | 居中显示头像 |
216
+ | 用户名 | `display: none` | 隐藏 |
217
+ | 更多按钮 | `display: none` | 隐藏 |
@@ -0,0 +1,188 @@
1
+ {
2
+ "version": "7.0",
3
+ "description": "@teamix-evo/ui 样式规范 + TrekClaw 全局禁止事项。8条样式规则(S1-S8)+ 10条禁止事项(F1-F10),所有页面类型通用。",
4
+ "stylingRules": [
5
+ {
6
+ "id": "S1",
7
+ "rule": "className仅用于布局,不用于覆盖组件颜色/字体",
8
+ "severity": "ERROR",
9
+ "scope": "global",
10
+ "forbidden": "className=\"bg-blue-100 text-blue-900 font-bold\"",
11
+ "correct": "className=\"max-w-md mx-auto\"",
12
+ "fixPriority": 1
13
+ },
14
+ {
15
+ "id": "S2",
16
+ "rule": "不用 space-x-* / space-y-*,改用 flex + gap-*",
17
+ "severity": "ERROR",
18
+ "scope": "global",
19
+ "forbidden": "className=\"space-y-4\"",
20
+ "correct": "className=\"flex flex-col gap-4\"",
21
+ "fixPriority": 2
22
+ },
23
+ {
24
+ "id": "S3",
25
+ "rule": "等宽高用 size-*,不用 w-* h-*",
26
+ "severity": "WARN",
27
+ "scope": "global",
28
+ "forbidden": "className=\"w-10 h-10\"",
29
+ "correct": "className=\"size-10\"",
30
+ "fixPriority": 3
31
+ },
32
+ {
33
+ "id": "S4",
34
+ "rule": "用 truncate 简写文本截断",
35
+ "severity": "WARN",
36
+ "scope": "global",
37
+ "forbidden": "className=\"overflow-hidden text-ellipsis whitespace-nowrap\"",
38
+ "correct": "className=\"truncate\"",
39
+ "fixPriority": 4
40
+ },
41
+ {
42
+ "id": "S5",
43
+ "rule": "不用手动 dark: 颜色覆盖,用语义 token",
44
+ "severity": "ERROR",
45
+ "scope": "global",
46
+ "forbidden": "className=\"bg-white dark:bg-gray-950\"",
47
+ "correct": "className=\"bg-background text-foreground\"",
48
+ "fixPriority": 5
49
+ },
50
+ {
51
+ "id": "S6",
52
+ "rule": "用 cn() 处理条件类名,不用模板字符串三元表达式",
53
+ "severity": "ERROR",
54
+ "scope": "global",
55
+ "forbidden": "className={`flex ${isActive ? 'bg-primary' : 'bg-muted'}`}",
56
+ "correct": "className={cn('flex', isActive ? 'bg-primary text-primary-foreground' : 'bg-muted')}",
57
+ "fixPriority": 6
58
+ },
59
+ {
60
+ "id": "S7",
61
+ "rule": "overlay 组件不手动设置 z-index",
62
+ "severity": "ERROR",
63
+ "scope": "global",
64
+ "forbidden": "Dialog/Sheet/Popover/Tooltip 等加 className=\"z-50\"",
65
+ "correct": "移除 z-index,组件自带层级管理",
66
+ "fixPriority": 7
67
+ },
68
+ {
69
+ "id": "S8",
70
+ "rule": "不用原始色值表示状态/状态指示",
71
+ "severity": "ERROR",
72
+ "scope": "global",
73
+ "forbidden": "className=\"text-emerald-600\" / className=\"text-green-500\"",
74
+ "correct": "<Badge variant=\"secondary\">+20.1%</Badge> / <span className=\"text-destructive\">-3.2%</span>",
75
+ "fixPriority": 8
76
+ }
77
+ ],
78
+ "customizationPriority": [
79
+ "1. 内置 variants(variant=\"outline\"/\"destructive\" 等)",
80
+ "2. 语义色值(bg-primary / text-muted-foreground 等)",
81
+ "3. CSS 变量(在全局 CSS 文件中定义,见 customization.md)"
82
+ ],
83
+ "keyPatterns": {
84
+ "spacing": {
85
+ "correct": "flex flex-col gap-4",
86
+ "wrong": "space-y-4"
87
+ },
88
+ "dimensions": {
89
+ "correct": "size-10",
90
+ "wrong": "w-10 h-10"
91
+ },
92
+ "statusColor": {
93
+ "correct": "<Badge variant=\"secondary\">+20.1%</Badge>",
94
+ "wrong": "<span className=\"text-emerald-600\">+20.1%</span>"
95
+ },
96
+ "iconInButton": {
97
+ "correct": "<SearchIcon data-icon=\"inline-start\" />",
98
+ "wrong": "<SearchIcon className=\"mr-2 size-4\" />"
99
+ }
100
+ },
101
+ "forbiddenRules": [
102
+ {
103
+ "id": "F1",
104
+ "rule": "禁止硬编码色值(如 #333333、rgb(...))",
105
+ "severity": "ERROR",
106
+ "scope": "global",
107
+ "correct": "使用 hsl(var(--gray-primary)) 等 CSS 变量引用,见 design-tokens.json colorMapping",
108
+ "fixPriority": 1
109
+ },
110
+ {
111
+ "id": "F2",
112
+ "rule": "禁止硬编码尺寸(如 h-8、text-xs)",
113
+ "severity": "ERROR",
114
+ "scope": "global",
115
+ "correct": "使用 CSS 变量(如 h-[var(--input-height)]),见 design-tokens.json componentDimensions",
116
+ "fixPriority": 2
117
+ },
118
+ {
119
+ "id": "F3",
120
+ "rule": "禁止按组件新增重复语义变量",
121
+ "severity": "ERROR",
122
+ "scope": "global",
123
+ "correct": "检索 design-tokens.css 中已有变量,找到语义匹配的变量直接复用;仅当完全没有可对应变量时才允许新增",
124
+ "fixPriority": 3
125
+ },
126
+ {
127
+ "id": "F4",
128
+ "rule": "禁止页头添加底色或下边框",
129
+ "severity": "ERROR",
130
+ "scope": "PageHeader",
131
+ "correct": "页头保持透明无底色",
132
+ "fixPriority": 4
133
+ },
134
+ {
135
+ "id": "F5",
136
+ "rule": "outline 按钮禁止使用 border-input",
137
+ "severity": "ERROR",
138
+ "scope": "Button",
139
+ "correct": "使用 border-gray-line",
140
+ "fixPriority": 5
141
+ },
142
+ {
143
+ "id": "F6",
144
+ "rule": "禁止直接在组件中写 font-size: 12px",
145
+ "severity": "ERROR",
146
+ "scope": "global",
147
+ "correct": "使用 var(--input-font-size)",
148
+ "fixPriority": 6
149
+ },
150
+ {
151
+ "id": "F7",
152
+ "rule": "禁止使用 gap-4 替代变量",
153
+ "severity": "ERROR",
154
+ "scope": "global",
155
+ "correct": "使用 gap-[var(--card-gap)]",
156
+ "fixPriority": 7
157
+ },
158
+ {
159
+ "id": "F8",
160
+ "rule": "禁止在 DialogTitle 中加图标",
161
+ "severity": "ERROR",
162
+ "scope": "Dialog",
163
+ "correct": "标题区只放纯文字",
164
+ "fixPriority": 8
165
+ },
166
+ {
167
+ "id": "F9",
168
+ "rule": "弹窗确定按钮禁止加 disabled 禁用态",
169
+ "severity": "ERROR",
170
+ "scope": "Dialog",
171
+ "correct": "始终可点击,校验后反馈错误信息",
172
+ "fixPriority": 9
173
+ },
174
+ {
175
+ "id": "F10",
176
+ "rule": "hover 时禁止将 boxShadow 设为 undefined",
177
+ "severity": "WARN",
178
+ "scope": "HoverCard",
179
+ "correct": "与 breathingGlow 0% 帧一致的初始值 + animation",
180
+ "fixPriority": 10
181
+ }
182
+ ],
183
+
184
+ "designPrinciplesRef": {
185
+ "reference": "foundations.md §1 + boundaries.md §自定义优先级",
186
+ "description": "设计原则集中定义在 foundations.md,本文件只关注样式规则(S1-S8)。"
187
+ }
188
+ }