@teamix-evo/skills 0.12.0 → 0.13.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 (84) hide show
  1. package/README.md +1 -1
  2. package/manifest.json +11 -28
  3. package/package.json +2 -2
  4. package/src/teamix-evo-code-opentrek/SKILL.md +13 -13
  5. package/src/teamix-evo-code-opentrek/api-layering.md +53 -44
  6. package/src/teamix-evo-code-opentrek/checklist.md +24 -24
  7. package/src/teamix-evo-code-opentrek/file-structure.md +55 -36
  8. package/src/teamix-evo-code-opentrek/forms-and-validation.md +17 -16
  9. package/src/teamix-evo-code-opentrek/reuse-first.md +6 -9
  10. package/src/teamix-evo-code-opentrek/testing.md +14 -14
  11. package/src/teamix-evo-code-uni-manager/SKILL.md +15 -15
  12. package/src/teamix-evo-code-uni-manager/api-layering.md +74 -58
  13. package/src/teamix-evo-code-uni-manager/checklist.md +28 -28
  14. package/src/teamix-evo-code-uni-manager/error-and-loading.md +2 -2
  15. package/src/teamix-evo-code-uni-manager/file-structure.md +77 -62
  16. package/src/teamix-evo-code-uni-manager/forms-and-validation.md +17 -15
  17. package/src/teamix-evo-code-uni-manager/reuse-first.md +7 -10
  18. package/src/teamix-evo-code-uni-manager/routing-and-codesplit.md +1 -1
  19. package/src/teamix-evo-code-uni-manager/testing.md +37 -37
  20. package/src/teamix-evo-design-opentrek/SKILL.md +41 -20
  21. package/src/teamix-evo-design-opentrek/boundaries.md +1 -1
  22. package/src/teamix-evo-design-opentrek/checklist.md +5 -5
  23. package/src/teamix-evo-design-opentrek/components.md +19 -19
  24. package/src/teamix-evo-design-opentrek/examples/standard-card-list.html +1 -1
  25. package/src/teamix-evo-design-opentrek/examples/standard-table-list.html +1 -1
  26. package/src/teamix-evo-design-opentrek/foundations.md +17 -17
  27. package/src/teamix-evo-design-opentrek/pages/dashboard-page/SKILL.md +18 -19
  28. package/src/teamix-evo-design-opentrek/pages/dashboard-page/patterns/dashboard-opentrek.md +6 -6
  29. package/src/teamix-evo-design-opentrek/pages/detail-page/SKILL.md +24 -25
  30. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/api-doc-detail.md +3 -7
  31. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/comparison-detail.md +3 -7
  32. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/monitor-detail.md +3 -7
  33. package/src/teamix-evo-design-opentrek/pages/detail-page/patterns/resource-detail.md +10 -10
  34. package/src/teamix-evo-design-opentrek/pages/form-page/SKILL.md +26 -27
  35. package/src/teamix-evo-design-opentrek/pages/list-page/SKILL.md +35 -36
  36. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/item-card-spec.md +41 -32
  37. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list-opentrek.md +10 -10
  38. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/card-list.md +23 -23
  39. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list-opentrek.md +8 -8
  40. package/src/teamix-evo-design-opentrek/pages/list-page/patterns/standard-list.md +8 -8
  41. package/src/teamix-evo-design-opentrek/patterns/color-mapping.md +2 -2
  42. package/src/teamix-evo-design-opentrek/patterns/dashboard.md +1 -1
  43. package/src/teamix-evo-design-opentrek/patterns/detail-page.md +9 -9
  44. package/src/teamix-evo-design-opentrek/patterns/form-page.md +6 -6
  45. package/src/teamix-evo-design-opentrek/patterns/list-page.md +9 -9
  46. package/src/teamix-evo-design-opentrek/patterns/page-types.md +3 -3
  47. package/src/teamix-evo-design-opentrek/principles.md +541 -0
  48. package/src/teamix-evo-design-opentrek/rules/common-components.json +206 -76
  49. package/src/teamix-evo-design-opentrek/rules/component-specs.json +2 -2
  50. package/src/teamix-evo-design-opentrek/rules/design-tokens.css +223 -218
  51. package/src/teamix-evo-design-opentrek/rules/design-tokens.json +10 -32
  52. package/src/teamix-evo-design-opentrek/rules/page-frame.json +197 -193
  53. package/src/teamix-evo-design-opentrek/{generation-flow.md → workflow.md} +141 -22
  54. package/src/teamix-evo-design-uni-manager/SKILL.md +30 -6
  55. package/src/teamix-evo-design-uni-manager/boundaries.md +2 -2
  56. package/src/teamix-evo-design-uni-manager/brand.md +1 -1
  57. package/src/teamix-evo-design-uni-manager/checklist.md +2 -2
  58. package/src/teamix-evo-design-uni-manager/components.md +11 -11
  59. package/src/teamix-evo-design-uni-manager/foundations.md +7 -7
  60. package/src/teamix-evo-design-uni-manager/generation-flow.md +3 -3
  61. package/src/teamix-evo-manage/SKILL.md +111 -709
  62. package/src/teamix-evo-manage/init.md +98 -0
  63. package/src/teamix-evo-manage/migrate.md +100 -0
  64. package/src/teamix-evo-manage/rearchitect-capture-guide.md +174 -0
  65. package/src/teamix-evo-manage/rearchitect.md +373 -0
  66. package/src/teamix-evo-manage/update-component-staging.md +188 -0
  67. package/src/teamix-evo-manage/update-token-rename.md +126 -0
  68. package/src/teamix-evo-manage/update-token-treatment.md +116 -0
  69. package/src/teamix-evo-manage/update.md +213 -0
  70. package/src/teamix-evo-design-opentrek/brand.md +0 -154
  71. package/src/teamix-evo-design-opentrek/pages/list-page/_shared/search-combo-spec.md +0 -194
  72. package/src/teamix-evo-design-opentrek/philosophy.md +0 -98
  73. package/src/teamix-evo-design-opentrek/rules/README.md +0 -39
  74. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AGENT RUNTIME.svg +0 -1
  75. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI GATEWAY.svg +0 -1
  76. package/src/teamix-evo-design-opentrek/rules/_assets/OP_AI STUDIO.svg +0 -1
  77. package/src/teamix-evo-design-opentrek/rules/_assets/OP_DEV-2.svg +0 -1
  78. package/src/teamix-evo-design-opentrek/rules/_assets/OP_LOGO.svg +0 -1
  79. package/src/teamix-evo-design-opentrek/rules/_assets/OP_OPS.svg +0 -1
  80. package/src/teamix-evo-design-opentrek/rules/layout-rules.json +0 -218
  81. package/src/teamix-evo-design-opentrek/rules/page-header-spec.md +0 -123
  82. package/src/teamix-evo-design-opentrek/rules/sidebar-spec.md +0 -217
  83. package/src/teamix-evo-upgrade/SKILL.md +0 -431
  84. /package/src/teamix-evo-design-opentrek/{rules/boundaries.rules.json → boundaries.json} +0 -0
@@ -1,6 +1,8 @@
1
- # 生成 / 翻新 / 验证流程
1
+ # AI 页面任务工作流
2
2
 
3
- > ⚠️ **本文件是页面级任务的唯一执行路径。每一步都有 GATE 门禁和 MUST READ 文件清单。** > **跳步 = 产出不合规。AI 不得凭"已有知识"省略任何文件读取。**
3
+ > ⚠️ **本文件是页面级任务的唯一执行路径。每一步都有 GATE 门禁和 MUST READ 文件清单。**
4
+ >
5
+ > **跳步 = 产出不合规。AI 不得凭"已有知识"省略任何文件读取。**
4
6
 
5
7
  ---
6
8
 
@@ -16,7 +18,7 @@ Step 7 自检 ← Step 6 视觉填充 ← Step 5 可用性校验 ← Step 4
16
18
 
17
19
  ### Step 1 · 最小 quorum + 默认值
18
20
 
19
- 📖 **MUST READ**: [philosophy.md](./philosophy.md)(理解"为什么这么做" 四大原则优先级)+ [brand.md](./brand.md)(视觉调性 + 文案语气基调)
21
+ 📖 **MUST READ**: [principles.md](./principles.md)(Part B 六条设计原则 + Part A 视觉调性/文案语气)
20
22
 
21
23
  **只有两个信息缺一不可**(最小 quorum,缺则反问):
22
24
 
@@ -64,12 +66,12 @@ Step 7 自检 ← Step 6 视觉填充 ← Step 5 可用性校验 ← Step 4
64
66
  🚧 **GATE**: Step 2 必须已产出"页面类型 ID"
65
67
 
66
68
  📖 **MUST READ**(按顺序读取):
69
+
67
70
  1. `./pages/{type}-page/SKILL.md` — 子技能入口(子类型列表 + 属性模型)
68
71
  2. `./pages/{type}-page/patterns/{subtype}.md` — 对应子类型的**完整布局结构**(骨架、DOM 顺序、CSS 约束、间距硬值)
69
- 3. `./pages/{type}-page/_shared/search-combo-spec.md` SearchCombo 硬约束(20px 间距、容器式 border、禁止嵌套规则)
72
+ 3. `./rules/common-components.json` SearchCombo 硬约束(20px 间距、容器式 border、禁止嵌套规则)
70
73
  4. `./pages/{type}-page/_shared/action-column-spec.md` — 操作列规范(≤3 直显、Dropdown 收纳)
71
- 5. `./rules/page-frame.json` — L0/L1/L2 框架级别
72
- 6. `./rules/layout-rules.json` — 布局模式
74
+ 5. `./rules/page-frame.json` — L0/L1/L2 框架级别 + 布局模式
73
75
 
74
76
  ⚠️ **禁止**:不要仅读 `patterns/{type}-page.md` 就开始生成。该文件是高阶索引,不包含布局细节。
75
77
 
@@ -87,48 +89,98 @@ Step 7 自检 ← Step 6 视觉填充 ← Step 5 可用性校验 ← Step 4
87
89
 
88
90
  🚧 **GATE**: Step 3 必须已产出"子类型 ID + 区域骨架"
89
91
 
90
- 📖 **MUST READ**: [components.md](./components.md) §0 兗底铁律 + §1 双层架构 + §3 决策树 + §5 拼装配方
92
+ 📖 **MUST READ**: [components.md](./components.md) §0 兜底铁律 + §1 双层架构 + §3 决策树 + §5 拼装配方 + [rules/common-components.json](./rules/common-components.json) + [rules/component-specs.json](./rules/component-specs.json)
91
93
 
92
94
  读 [components.md](./components.md) §选型决策树确定组件集:
93
95
 
94
96
  1. 优先使用 `@teamix-evo/ui` 注册表中的稳定组件
95
- 2. 通过 MCP `list_components(status: "stable")` 查可用列表
96
- 3. 通过 MCP `get_component_meta(id)` 查具体 Props/Examples
97
+ 2. `.teamix-evo/meta/ui/manifest.json` 查可用列表
98
+ 3. `.teamix-evo/meta/ui/<id>.md` 查具体 Props/Examples
97
99
  - **Props**:确定必传 / 可选 / 默认值,明确接口契约
98
100
  - **Examples**:作为实现参考(含组合用法、常见模式、边界处理),优先复用示例中的写法而非自由发挥
99
101
  4. 复合场景按 [components.md](./components.md) §组合规则装配
100
102
 
101
- **输出**:组件清单 + 每个组件的关键 Props + 参考的 Example 片段(若有启发性写法)。
103
+ #### 4.1 组件使用优先级(强制)
104
+
105
+ 选型时**必须**按以下优先级逐级降级:
106
+
107
+ ```text
108
+ P0 主题业务组件(最高优先)
109
+ │ OpSidebar / OpPageContainer / PageHeader / ItemCard /
110
+ │ CardGrid / CardActionBar / ActionToolbar / FilterRow / ...
111
+ │ → 直接使用,不得自建替代
112
+
113
+ P1 基础 UI 组件(@teamix-evo/ui 封装的 shadcn 原子组件)
114
+ │ Button / Input / Select / Card / Badge / Tag / Dialog / ...
115
+ │ → 通过 `@teamix-evo/ui` 包引入,严禁从 shadcn 裸包引入
116
+
117
+ P2 原子件拼装(兜底)
118
+ → 仅当 P0/P1 均无合适组件时允许
119
+ → 拼装必须遵循 boundaries.md C1-C12 复合结构规则
120
+ → 代码中必须加注释:// {Concept} 暂未实物化 → ui 原子件拼装
121
+ ```
122
+
123
+ > ⛔ **禁止**:跳过 P0/P1 直接用原生 HTML 标签实现已有组件的功能。
124
+ > ⛔ **禁止**:直接 `import { Button } from "shadcn/ui"` —— 必须走 `@teamix-evo/ui`。
125
+
126
+ #### 4.2 复合组件缺失处理
127
+
128
+ 当区域骨架中需要的复合组件在注册表中不存在时:
129
+
130
+ 1. 使用 P1 基础组件拼装组合
131
+ 2. 拼装必须遵循 [rules/common-components.json](./rules/common-components.json) 中的组件定义和 props 规范
132
+ 3. 遵守 [boundaries.md](./boundaries.md) 中的 C1-C12 复合结构规则
133
+ 4. 遵循 [rules/component-specs.json](./rules/component-specs.json) 中的具体组件规格(尺寸/圆角/间距等)
134
+ 5. **每个拼装处必须标注注释**:
102
135
 
103
- ### Step 5 · 组件可用性校验(新增 gate)
136
+ ```tsx
137
+ {/* SearchCombo 暂未实物化 → ui 原子件拼装 */}
138
+ <div className="flex h-8 items-center rounded-md border border-border ...">
139
+ <Input ... />
140
+ <Button variant="ghost" size="icon-sm" ... />
141
+ </div>
142
+ ```
143
+
144
+ **输出**:组件清单 + 每个组件的关键 Props + 参考的 Example 片段(若有启发性写法)+ 拼装组件标注列表。
145
+
146
+ ### Step 5 · 组件可用性校验
104
147
 
105
148
  🚧 **GATE**: Step 4 必须已产出"组件清单 + 每个组件的关键 Props"
106
149
 
107
150
  > ❗ **此步是 Step 4 → Step 6 的强制闸门**。跳过会导致生成代码引用未安装组件而报错。
108
151
 
152
+ 📖 **MUST READ**: [boundaries.md](./boundaries.md) C1-C12 + [rules/component-specs.json](./rules/component-specs.json)
153
+
109
154
  对 Step 4 选定的每个组件,执行以下校验:
110
155
 
111
156
  ```text
112
- MCP find_components(id) 查询注册表
157
+ grep <id> .teamix-evo/meta/ui/manifest.json 查询注册表
113
158
  ├─ 命中 entries(活跃) → ②
114
159
  ├─ 命中 deprecatedEntries 且有 replacedBy → 自动替换为 replacedBy 组件,回到 ①
115
- ├─ 命中 deprecatedEntries 且无 replacedBy → 走 components.md §0 兔底铁律
116
- └─ 未命中 → 走 components.md §0 兔底铁律(原子件拼装)
160
+ ├─ 命中 deprecatedEntries 且无 replacedBy → 走 components.md §0 兜底铁律
161
+ └─ 未命中 → 走 components.md §0 兜底铁律(原子件拼装)
117
162
 
118
163
  ② 检查目标项目是否已装机
119
- ├─ 已装(grep src/components/ui/<id> 或查 manifest.lock.json)→ ✅ 继续
164
+ ├─ 已装(grep src/components/ui/<id> 或查 manifest.lock.json)→
120
165
  └─ 未装 → 输出安装指令:
121
166
  「teamix-evo ui add <id>」
122
- 等待装机完成后再进入 Step 6
167
+ 等待装机完成后再进入
168
+
169
+ ③ 组件规格合规检查(对照 component-specs.json)
170
+ ├─ 尺寸:高度、宽度是否使用规范定义的 size token
171
+ ├─ 圆角:是否匹配 component-specs.json 中定义的 radius 值
172
+ │ (Button → rounded-md / Card → rounded-lg / 容器 → rounded-2xl)
173
+ ├─ 间距:padding/gap 是否遵循 4px 网格
174
+ └─ Props:必传属性是否齐备
123
175
  ```
124
176
 
125
- **输出**:校验后的最终组件清单(含替换记录)+ 待安装组件列表(若有)。
177
+ **输出**:校验后的最终组件清单(含替换记录)+ 待安装组件列表(若有)+ 规格检查通过确认。
126
178
 
127
179
  ### Step 6 · 视觉填充(Token 绑定)
128
180
 
129
181
  🚧 **GATE**: Step 5 必须已产出"校验后的最终组件清单"
130
182
 
131
- 📖 **MUST READ**: [foundations.md](./foundations.md) 全文 + [brand.md](./brand.md) §1 视觉五维(圆角/配色/密度/阴影/焦点风格对齐)+ [patterns/color-mapping.md](./patterns/color-mapping.md)(语义色映射表)
183
+ 📖 **MUST READ**: [foundations.md](./foundations.md) 全文 + [principles.md](./principles.md) §A1 视觉五维(圆角/配色/密度/阴影/焦点风格对齐)+ [patterns/color-mapping.md](./patterns/color-mapping.md)(语义色映射表)+ [rules/design-tokens.json](./rules/design-tokens.json)
132
184
 
133
185
  读 [foundations.md](./foundations.md),所有色彩、间距、字号、圆角、阴影、动效**必须**使用 Token:
134
186
 
@@ -141,6 +193,27 @@ Step 7 自检 ← Step 6 视觉填充 ← Step 5 可用性校验 ← Step 4
141
193
  | 阴影 | `shadow-sm` / `shadow-md` / `shadow-lg` |
142
194
  | 动效 | `duration-150` / `duration-300` / `transition-colors` |
143
195
 
196
+ #### 6.1 颜色使用规范(强制校验)
197
+
198
+ **唯一合法色值来源**:design-tokens.json 中定义的语义 token,在 Tailwind 中以 utility class 形式使用。
199
+
200
+ ```text
201
+ ✅ 合法示例:
202
+ text-foreground / text-muted-foreground / text-primary
203
+ bg-card / bg-primary / bg-muted / bg-destructive
204
+ border-border / border-input / border-primary
205
+ bg-success/10 / text-warning(带透明度的语义色允许)
206
+
207
+ ⛔ 非法示例(全部禁止):
208
+ #333333 / #fff / rgb(0,0,0) / rgba(...) ← 硬编码 hex/rgb
209
+ text-blue-500 / bg-gray-100 / border-slate-200 ← Tailwind 原始色板
210
+ text-emerald-600 / bg-indigo-50 ← Tailwind 原始色板
211
+ style={{ color: '#xxx' }} ← 内联样式硬编码
212
+ hsl(220, 15%, 30%) ← 裸 hsl 值
213
+ ```
214
+
215
+ > 📌 **唯一例外**:`hsl(var(--xxx))` 引用 CSS 变量形式允许(如 `bg-[hsl(var(--sidebar))]`),因其本质是间接引用 token。
216
+
144
217
  **禁止**:硬编码 hex 色值、`#xxx` rgb()、内联 `style={{ ... }}`、`text-emerald-600` 等原始色。
145
218
 
146
219
  **输出**:含 Token 引用的可执行代码 / HTML。
@@ -149,11 +222,57 @@ Step 7 自检 ← Step 6 视觉填充 ← Step 5 可用性校验 ← Step 4
149
222
 
150
223
  🚧 **GATE**: Step 6 必须已产出"含 Token 引用的可执行代码"
151
224
 
152
- 📖 **MUST READ**: [boundaries.md](./boundaries.md) 全文(38 条硬规则)+ [checklist.md](./checklist.md) 全文
225
+ 📖 **MUST READ**: [boundaries.md](./boundaries.md) 全文(38 条硬规则)+ [checklist.md](./checklist.md) 全文 + [rules/component-specs.json](./rules/component-specs.json)
226
+
227
+ 对照 [checklist.md](./checklist.md) 10 项逐项验证,**额外**执行以下组件合规自检:
228
+
229
+ #### 7.1 组件来源合规检查
153
230
 
154
- 对照 [checklist.md](./checklist.md) 10 项逐项验证:
231
+ ```text
232
+ □ 页面中是否存在原生 HTML 标签替代已有组件的情况?
233
+ - <button> 替代 Button → ⛔ 违规
234
+ - <input> 替代 Input → ⛔ 违规
235
+ - <select> 替代 Select → ⛔ 违规
236
+ - <div role="dialog"> 替代 Dialog → ⛔ 违规
237
+
238
+ □ 是否所有组件均通过 @teamix-evo/ui 引入?
239
+ - 存在 from "shadcn/ui" → ⛔ 违规
240
+ - 存在 from "@radix-ui/" 直接引入 → ⛔ 违规(应走封装层)
241
+
242
+ □ P0 业务组件是否被正确使用(未被自建 div 替代)?
243
+ - 有 OpSidebar 但手写了 <aside> → ⛔ 违规
244
+ - 有 PageHeader 但手写了 <h1> 容器 → ⛔ 违规
245
+ - 有 ItemCard 但手写了 <article> 卡片 → ⛔ 违规
246
+ ```
247
+
248
+ #### 7.2 组件规格合规检查
249
+
250
+ ```text
251
+ □ Button 圆角是否为 rounded-md(8px)?
252
+ □ Card/ItemCard 圆角是否为 rounded-lg(12px)?
253
+ □ 白卡容器圆角是否为 rounded-2xl?
254
+ □ Input/Select 高度是否为 h-8(32px)?
255
+ □ Input/Select 圆角是否为 rounded-md(8px)?
256
+ □ 组件间距是否遵循 4px 网格?
257
+ ```
258
+
259
+ #### 7.3 颜色合规检查
260
+
261
+ ```text
262
+ □ 是否存在硬编码色值(#xxx / rgb / rgba)?
263
+ □ 是否存在 Tailwind 原始色板(blue-500 / gray-100 等)?
264
+ □ 是否存在内联 style 设置颜色?
265
+ □ 所有颜色是否均为语义 token(foreground / primary / muted 等)?
266
+ ```
267
+
268
+ #### 7.4 拼装标注检查
269
+
270
+ ```text
271
+ □ 所有非注册组件的拼装处是否标注了 // {Concept} 暂未实物化 → ui 原子件拼装?
272
+ □ 拼装是否遵循 C1-C12 结构规则?
273
+ ```
155
274
 
156
- - 通过 → 输出最终代码
275
+ - 全部通过 → 输出最终代码
157
276
  - 不通过 → 回到对应失败项的步骤修正后重新自检
158
277
 
159
278
  **输出**:合规代码 + 自检报告。
@@ -252,4 +371,4 @@ Step 7 自检 ← Step 6 视觉填充 ← Step 5 可用性校验 ← Step 4
252
371
  | API / services 层 | code([api-layering.md](../teamix-evo-code-opentrek/api-layering.md)) |
253
372
  | 表单实现细节 | code([forms-and-validation.md](../teamix-evo-code-opentrek/forms-and-validation.md)) |
254
373
 
255
- 冲突时按 ADR 0018 AI 上下文路由约定:design 决定"做什么",code 决定"怎么做"。
374
+ 冲突时按上下文路由约定:design 决定"做什么",code 决定"怎么做"。
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: teamix-evo-design-uni-manager
3
3
  description: |
4
- Apply Uni-Manager design system rules (philosophy, patterns, page-types, brand tone/voice, visual foundations) when AI generates or reviews a full UI screen / page in a Uni-Manager-variant project (专有云 / 混合云 / 云管平台 / hybrid cloud console).
5
- TRIGGER when: user asks to "新建 / 优化 / 重构 一个页面"、"做一个列表页 / 详情页 / 表单页 / 仪表盘 / 控制台首页"、"create / review / refactor a page、screen、dashboardconsole、admin template"; intent involves layout structure, page-level information density, or multi-component composition for hybrid-cloud / multi-tenant / multi-region scenarios; file write under `src/pages/**` or `src/templates/**`.
6
- SKIP: single-component edits like "加个按钮"、"改 input 的 label"; pure tokens/theme overrides; pure code refactor with no visual change; teamix-evo lifecycle commands (defer to teamix-evo-manage).
4
+ Apply Uni-Manager design system rules when AI generates or reviews a UI screen / page (专有云/混合云/云管).
5
+ TRIGGER when: user asks to 新建/优化/重构 页面/控制台/仪表盘, create/review/refactor a page/dashboard/console; intent involves layout or multi-component composition; file write under `src/pages/**`.
6
+ SKIP: single-component edits; pure tokens/theme overrides; pure code refactor with no visual change; lifecycle commands ( teamix-evo-manage).
7
7
  Coordinates with: teamix-evo-code-uni-manager (run alongside when the screen also creates new files).
8
8
  ---
9
9
 
@@ -13,7 +13,7 @@ description: |
13
13
  > 高信息密度、强一致性、可枚举可审计;视觉以 hybridcloud 蓝(B50 #0064C8)+ 锐利圆角(2px / 4px)为锚。
14
14
  >
15
15
  > 本技能是 **完整自包含** 的 Uni-Manager 设计规则(非 overlay over OpenTrek)。
16
- > Token 具体值请参照 `@teamix-evo/tokens/variants/uni-manager/theme.css` 中的 CSS 变量,组件详细 API 通过 MCP `get_component_meta` 按需查询。
16
+ > Token 具体值请参照 `@teamix-evo/tokens/variants/uni-manager/theme.css` 中的 CSS 变量,组件详细 API 通过读 `.teamix-evo/meta/ui/<id>.md` 按需查询。
17
17
 
18
18
  <!-- teamix-evo:managed:start id="core" -->
19
19
 
@@ -28,7 +28,7 @@ description: |
28
28
  | **生成** | "生成" / "创建" / "新建" / "设计一个" / "做一个" / "起一个控制台" | **必须完整执行** [generation-flow.md](./generation-flow.md) §1 六步门控 |
29
29
  | **翻新** | "改造" / "升级" / "翻新" / "对齐规范" / "重新生成" | **必须完整执行** [generation-flow.md](./generation-flow.md) §2 翻新路径 |
30
30
  | **验证** | "检查" / "验证" / "评估" / "是否符合规范" | **必须完整执行** [generation-flow.md](./generation-flow.md) §3 验证路径 |
31
- | **查询** | "token" / "色值" / "间距" / "组件尺寸" / "圆角" | → [foundations.md](./foundations.md)(MCP `tokens_*` 工具规划中) |
31
+ | **查询** | "token" / "色值" / "间距" / "组件尺寸" / "圆角" | → [foundations.md](./foundations.md)(读 `.teamix-evo/meta/` 本地文件) |
32
32
 
33
33
  ### 不可跳过的前置读取
34
34
 
@@ -66,6 +66,30 @@ description: |
66
66
  - **默认规则**:无特殊说明时,所有组件一律使用 `default` 尺寸(不主动传 `size='sm'`)
67
67
  - **允许 sm 的场景**:仅当 `boundaries.md` 或子技能 patterns 文档中**显式指定**了 `size='sm'` 时才使用
68
68
  - **判定优先级**:boundaries.md 规则 > 页面子技能(patterns) > 默认(default)
69
- - **典型误用**:AI 不得因“看起来小一点”而自行决定用 `sm`;截图中的视觉尺寸通过 Token 与组件默认值对齐,不走 size prop 降级
69
+ - **典型误用**:AI 不得因"看起来小一点"而自行决定用 `sm`;截图中的视觉尺寸通过 Token 与组件默认值对齐,不走 size prop 降级
70
+
71
+ ## Token 合规确认协议(最高优先级)
72
+
73
+ 当用户提供的设计数值(颜色、间距、圆角、阴影、字号等)不在当前 `@teamix-evo/tokens` 已注册的 token 中时,AI **禁止**直接使用该字面量或试图绕过 lint 规则。
74
+
75
+ **正确流程**:
76
+
77
+ 1. **识别** — 发现用户给出的值不在 token 体系中
78
+ 2. **告知** — 明确告知用户"该值不在当前 token 中定义"
79
+ 3. **建议** — 列出最接近的已有 token 名称、值和用途
80
+ 4. **确认** — 让用户选择:
81
+ - A. 使用最接近的已有 token(告知具体 Tailwind class,如 `text-muted-foreground`)
82
+ - B. 在 `@teamix-evo/tokens` 中注册该新值(需确认语义命名和适用场景)
83
+ 5. **执行** — 按用户确认的方案执行
84
+
85
+ **绝对禁止**:
86
+
87
+ - ❌ 直接使用 hex/rgb 字面量(无论 className、style prop、color prop 还是 CSS 变量形式)
88
+ - ❌ 用 `style={{ color: '#xxx' }}` 绕过 lint 检查
89
+ - ❌ 添加 eslint-disable 注释绕过颜色/arbitrary-value 规则
90
+ - ❌ 以"demo 文件"为借口跳过 token 合规
91
+ - ❌ 不问用户就自行决定"接受 lint 警告"
92
+
93
+ > 此规则适用于所有数值类型。只要不在 token 体系中注册的值,一律走确认流程。
70
94
 
71
95
  <!-- teamix-evo:managed:end -->
@@ -10,7 +10,7 @@
10
10
  > - **S1-S8**:样式规则(className 写法)
11
11
  > - **C1-C12**:组件结构规则(shadcn/ui 复合组件用法)
12
12
  > - **I1-I4**:图标规则
13
- > - **UM1-UM3**:Uni-Manager 专有云一致性硬约束(v0.1+,见 ADR 0030)
13
+ > - **UM1-UM3**:Uni-Manager 专有云一致性硬约束
14
14
  >
15
15
  > 严重等级:`ERROR` 必须修复,`WARN` 建议修复。
16
16
  >
@@ -462,7 +462,7 @@ CSS 变量已在 dark 模式下自动切换(uni-manager `theme.css` 内置)
462
462
 
463
463
  ## UM1-UM4 · Uni-Manager 专有云一致性硬约束
464
464
 
465
- > 来自 ADR 0030 / Teamix-UI 规范 doc 15-16-20。这三条是 uni-manager 区别于 opentrek 的核心硬约束,与"一致性是云管平台生命线"的哲学主张呼应(philosophy.md §1)。
465
+ > 来自 Teamix-UI 规范 doc 15-16-20。这三条是 uni-manager 区别于 opentrek 的核心硬约束,与"一致性是云管平台生命线"的哲学主张呼应(philosophy.md §1)。
466
466
 
467
467
  ### [ERROR] UM1 · 全局 topbar 必须使用 um-topbar 实物 · scope: uni-manager
468
468
 
@@ -50,7 +50,7 @@
50
50
  2. **PageHeader 一致**:标题字号 `text-2xl`、面包屑紧贴标题左侧、操作按钮组统一靠右
51
51
  3. **状态语义统一**:所有"运行中 / 已停止 / 异常 / 待处理"对应 success / muted / destructive / warning,不允许业务页自创状态色
52
52
 
53
- 详见 ADR 0030 / boundaries.md UM1-UM3。
53
+ 详见 boundaries.md UM1-UM3。
54
54
 
55
55
  ### 3.3 跨云资源可枚举
56
56
 
@@ -20,8 +20,8 @@
20
20
  | 8 | 不手动 z-index / dark: 覆盖 / focus:ring-\* | `className="z-50"` / `focus:ring-2 ring-primary` | 让 scoped CSS 接管,不重复声明 | [S5][S7] |
21
21
  | 9 | 条件类名用 cn() | `` `${active ? 'a' : 'b'}` `` | `cn('base', active ? 'a' : 'b')` | [S6] |
22
22
  | 10 | 危险操作二次确认(含输入资源名称) | `<Button onClick={delete}>删除</Button>` | `<AlertDialog>` + 陈述句标题 + 影响列表(含云/区域)+ 输入名称 | P4 [philosophy] |
23
- | 11 | 可交互元素显式带手型 | `<button onClick={...}>` 不带 `cursor-pointer` | `cursor-pointer` + `disabled:cursor-not-allowed` | ADR 0023 |
24
- | 12 | hover/focus 视觉反馈用 `enabled:` 前缀 | `hover:border-primary`(disabled 仍响应) | `enabled:hover:border-primary` | ADR 0024 |
23
+ | 11 | 可交互元素显式带手型 | `<button onClick={...}>` 不带 `cursor-pointer` | `cursor-pointer` + `disabled:cursor-not-allowed` | cursor 可达性 |
24
+ | 12 | hover/focus 视觉反馈用 `enabled:` 前缀 | `hover:border-primary`(disabled 仍响应) | `enabled:hover:border-primary` | enabled 前缀 |
25
25
 
26
26
  [F1]: ./boundaries.md
27
27
  [S1]: ./boundaries.md
@@ -4,7 +4,7 @@
4
4
  > 若未完成前置步骤,请先返回 [generation-flow.md](./generation-flow.md) 从 Step 1 开始。
5
5
 
6
6
  > **本文档只回答"用什么组件、怎么搭配",不写具体 Props / Examples / import 路径。**
7
- > 组件 API、Props、示例代码通过 MCP `get_component_meta` 实时查询;可用列表通过 `list_components` / `find_components` 查询。
7
+ > 组件 API、Props、示例代码通过读 `.teamix-evo/meta/ui/<id>.md` 查询;可用列表通过读 `.teamix-evo/meta/ui/manifest.json` 查询。
8
8
 
9
9
  ---
10
10
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  ### 0.1 触发场景
16
16
 
17
- 调用 `list_components` / `find_components` 命中失败、或本文件提到的组件名(例如 `SearchCombo` / `ContextSwitcher` / `ItemCard` / `CardGrid` / `CardActionBar` / `CloudBadge`)在 `@teamix-evo/biz-ui/uni-manager` 中无实物时。
17
+ `.teamix-evo/meta/ui/manifest.json` 中搜索命中失败、或本文件提到的组件名(例如 `SearchCombo` / `ContextSwitcher` / `ItemCard` / `CardGrid` / `CardActionBar` / `CloudBadge`)在 `@teamix-evo/biz-ui/uni-manager` 中无实物时。
18
18
 
19
19
  ### 0.2 三步处置法
20
20
 
@@ -40,7 +40,7 @@ ui 原子组件最小拼装 (兜底)
40
40
 
41
41
  - 在 `src/components/` 下新增与 biz-ui 同名的"私有版本"
42
42
  - 用 antd / arco / chakra 等其它库填补缺口
43
- - 在 skill 响应中写"假设 biz-ui 有 X"而不实查 MCP
43
+ - 在 skill 响应中写"假设 biz-ui 有 X"而不实查本地 meta
44
44
 
45
45
  ---
46
46
 
@@ -60,7 +60,7 @@ ui 原子组件最小拼装 (兜底)
60
60
 
61
61
  ### 1.2 实时校验
62
62
 
63
- 任何组件名引用前必须用 `find_components(name)` 验证存在性,**不要相信本文档中"组件名"的存在性默认**(biz-ui 处于持续物化中)。
63
+ 任何组件名引用前必须在 `.teamix-evo/meta/ui/manifest.json` 中验证存在性,**不要相信本文档中"组件名"的存在性默认**(biz-ui 处于持续物化中)。
64
64
 
65
65
  ---
66
66
 
@@ -227,21 +227,21 @@ ui 原子组件最小拼装 (兜底)
227
227
 
228
228
  ---
229
229
 
230
- ## 7. MCP 工具的协作
230
+ ## 7. 与本地 meta 文件的协作
231
231
 
232
232
  ```text
233
233
  当 AI 决定使用某组件后:
234
- ├── 通过 list_components({ status: "stable" }) 确认组件可用
235
- ├── 通过 get_component_meta("dialog") 获取:
234
+ ├── .teamix-evo/meta/ui/manifest.json 确认组件可用
235
+ ├── .teamix-evo/meta/ui/<id>.md(如 dialog.md)获取:
236
236
  │ - Props 完整签名(required / optional / default)
237
237
  │ - 子组件层级(DialogHeader/Footer/Title/...)
238
238
  │ - 标准用法 Example
239
239
  │ - 常见错误(compositionPitfalls)
240
- ├── 通过 find_components("filter") 模糊搜索(不确定名称时)
241
- └── 通过 tokens_get() 获取最新 token 别名(颜色/间距/圆角)
240
+ ├── grep <关键词> .teamix-evo/meta/ui/manifest.json 模糊搜索(不确定名称时)
241
+ └── .teamix-evo/tokens/ 下的 token 文件获取最新 token 别名(颜色/间距/圆角)
242
242
  ```
243
243
 
244
- **约束**:在 skill 中**不写**具体 import 路径与 Props 示例 —— 这些由 MCP runtime 提供。
244
+ **约束**:在 skill 中**不写**具体 import 路径与 Props 示例 —— 这些由本地 meta 文件提供,`teamix-evo init/upgrade` 自动同步。
245
245
 
246
246
  ---
247
247
 
@@ -249,7 +249,7 @@ ui 原子组件最小拼装 (兜底)
249
249
 
250
250
  通用结构性规则 → 见 [checklist.md](./checklist.md)(C1-C12 / I1-I4 / UM1-UM3)。本文件特有的"选型决策"自检:
251
251
 
252
- - [ ] 已先用 `find_components` 验证组件存在性(不靠默认)
252
+ - [ ] 已先在 `.teamix-evo/meta/ui/manifest.json` 中验证组件存在性(不靠默认)
253
253
  - [ ] biz-ui/uni-manager 命中失败 → 改用 ui 原子件,按 §5.2 配方拼装并加注释
254
254
  - [ ] 反馈 / 确认场景按容量选 Dialog / Sheet / Popover
255
255
  - [ ] 容器层级 ≤ 3,弹窗最多 2 级,超过则跳转全页面
@@ -11,13 +11,13 @@
11
11
 
12
12
  ## 0. AI 实操路径(先做这步)
13
13
 
14
- 写任何视觉之前先调 MCP `tokens_list`(group=uni-manager)拿当前真值,**不要凭记忆**:
14
+ 写任何视觉之前先读 `.teamix-evo/tokens/` 下的本地 token 文件拿当前真值,**不要凭记忆**:
15
15
 
16
- | 拿到结果 → 该做什么 | 工具 |
17
- | ------------------------------------ | --------------------------------------------------------- |
18
- | 列出可用语义槽 + 真值 | `tokens_list({ group: "uni-manager" })` |
19
- | 查某个槽位(如 `--shadow-md`)的值 | `tokens_list({ group: "uni-manager", filter: "shadow" })` |
20
- | 校验生成代码是否使用了未声明的 token | `validate_tokens(code)`(规划中) |
16
+ | 拿到结果 → 该做什么 | 工具 |
17
+ | --- | --- |
18
+ | 列出可用语义槽 + 真值 | `.teamix-evo/tokens/` 目录下的 token 文件 |
19
+ | 查某个槽位(如 `--shadow-md`)的值 | `grep shadow .teamix-evo/tokens/base.tokens.json` |
20
+ | 校验生成代码是否使用了未声明的 token | `validate_tokens(code)`(规划中) |
21
21
 
22
22
  > 圆角、阴影、字号是 uni-manager 与 opentrek 差异最大的三类 token。**禁止**直接套 opentrek 经验值。
23
23
 
@@ -174,7 +174,7 @@ hardcoded 数值 ← 仅限 token 真空地带,
174
174
  | P4-P5 | 一般 / 中优 | warning |
175
175
  | P6-P7 | 低优 / 提示性 | info |
176
176
 
177
- > P 级映射到具体 token ADR 0030 中定稿;当前阶段 AI 生成可暂用 destructive / warning / info 三档替代。
177
+ > P 级映射到具体 token 尚在定稿中;当前阶段 AI 生成可暂用 destructive / warning / info 三档替代。
178
178
 
179
179
  ---
180
180
 
@@ -87,8 +87,8 @@ Step 6 自检 ← Step 5 视觉填充 ← Step 4 组件挑选
87
87
  读 [components.md](./components.md) §选型决策树:
88
88
 
89
89
  1. 优先使用 `@teamix-evo/ui` 注册表中的稳定组件
90
- 2. 通过 MCP `list_components(status: "stable")` 查可用列表
91
- 3. 通过 MCP `get_component_meta(id)` 查具体 Props/Examples
90
+ 2. `.teamix-evo/meta/ui/manifest.json` 查可用列表
91
+ 3. `.teamix-evo/meta/ui/<id>.md` 查具体 Props/Examples
92
92
  - **Props**:确定必传 / 可选 / 默认值,明确接口契约
93
93
  - **Examples**:作为实现参考(含组合用法、常见模式、边界处理),优先复用示例中的写法而非自由发挥
94
94
  4. 复合场景按 [components.md](./components.md) §5.2 拼装配方装配(SearchCombo / ContextSwitcher / CardGrid 等概念占位)
@@ -229,4 +229,4 @@ Step 6 自检 ← Step 5 视觉填充 ← Step 4 组件挑选
229
229
  | API / services 层 | code([api-layering.md](../teamix-evo-code-uni-manager/api-layering.md)) |
230
230
  | 表单实现细节 | code([forms-and-validation.md](../teamix-evo-code-uni-manager/forms-and-validation.md)) |
231
231
 
232
- 冲突时按 ADR 0018 AI 上下文路由约定:design 决定"做什么",code 决定"怎么做"。
232
+ 冲突时按上下文路由约定:design 决定"做什么",code 决定"怎么做"。