@teamix-evo/skills 0.4.0 → 0.5.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.
- package/README.md +7 -3
- package/manifest.json +3 -2
- package/package.json +2 -2
- package/src/teamix-evo-code-opentrek/SKILL.md +12 -10
- package/src/teamix-evo-code-opentrek/api-layering.md +8 -5
- package/src/teamix-evo-code-opentrek/checklist.md +2 -0
- package/src/teamix-evo-code-opentrek/error-and-loading.md +38 -25
- package/src/teamix-evo-code-opentrek/file-structure.md +63 -54
- package/src/teamix-evo-code-opentrek/forms-and-validation.md +14 -12
- package/src/teamix-evo-code-opentrek/reuse-first.md +2 -0
- package/src/teamix-evo-code-opentrek/routing-and-codesplit.md +23 -21
- package/src/teamix-evo-code-opentrek/testing.md +32 -28
- package/src/teamix-evo-code-uni-manager/SKILL.md +12 -10
- package/src/teamix-evo-code-uni-manager/api-layering.md +2 -0
- package/src/teamix-evo-code-uni-manager/checklist.md +2 -0
- package/src/teamix-evo-code-uni-manager/error-and-loading.md +3 -1
- package/src/teamix-evo-code-uni-manager/file-structure.md +2 -0
- package/src/teamix-evo-code-uni-manager/forms-and-validation.md +2 -0
- package/src/teamix-evo-code-uni-manager/reuse-first.md +3 -1
- package/src/teamix-evo-code-uni-manager/routing-and-codesplit.md +3 -1
- package/src/teamix-evo-code-uni-manager/testing.md +2 -0
- package/src/teamix-evo-design-opentrek/SKILL.md +34 -41
- package/src/teamix-evo-design-opentrek/boundaries.md +22 -2
- package/src/teamix-evo-design-opentrek/brand.md +7 -7
- package/src/teamix-evo-design-opentrek/checklist.md +15 -13
- package/src/teamix-evo-design-opentrek/components.md +60 -11
- package/src/teamix-evo-design-opentrek/foundations.md +3 -0
- package/src/teamix-evo-design-opentrek/generation-flow.md +70 -12
- package/src/teamix-evo-design-opentrek/patterns/color-mapping.md +96 -0
- package/src/teamix-evo-design-opentrek/patterns/dashboard.md +2 -0
- package/src/teamix-evo-design-opentrek/patterns/detail-page.md +10 -9
- package/src/teamix-evo-design-opentrek/patterns/form-page.md +35 -32
- package/src/teamix-evo-design-opentrek/patterns/list-page.md +80 -47
- package/src/teamix-evo-design-opentrek/patterns/page-types.md +17 -12
- package/src/teamix-evo-design-opentrek/patterns/sidebar.md +122 -0
- package/src/teamix-evo-design-opentrek/philosophy.md +7 -5
- package/src/teamix-evo-design-uni-manager/SKILL.md +17 -26
- package/src/teamix-evo-design-uni-manager/boundaries.md +4 -1
- package/src/teamix-evo-design-uni-manager/components.md +3 -0
- package/src/teamix-evo-design-uni-manager/foundations.md +3 -0
- package/src/teamix-evo-design-uni-manager/generation-flow.md +43 -7
- package/src/teamix-evo-design-uni-manager/patterns/dashboard.md +3 -1
- package/src/teamix-evo-design-uni-manager/patterns/detail-page.md +41 -12
- package/src/teamix-evo-design-uni-manager/patterns/form-page.md +49 -12
- package/src/teamix-evo-design-uni-manager/patterns/list-page.md +44 -11
- package/src/teamix-evo-design-uni-manager/patterns/page-types.md +3 -1
- package/src/teamix-evo-design-uni-manager/philosophy.md +3 -1
- package/src/teamix-evo-manage/SKILL.md +74 -66
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Form Page — 表单页模式(uni-manager)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ⚠️ **Prerequisites**: 你必须已在 [generation-flow.md](../generation-flow.md) Step 2 确认页面类型为 **FormPage**,并由 Step 3 引导到这里。
|
|
4
|
+
|
|
5
|
+
> **触发**:用户描述含“新建/创建/编辑/修改/复制/填写”。
|
|
4
6
|
> **核心特征**:用户输入数据 + 字段校验 + 提交。
|
|
5
7
|
> **页面级别**:L2(面包屑模式 PageHeader,自动继承 um-topbar + Sidebar)。弹窗表单 = L0。
|
|
6
8
|
|
|
@@ -27,7 +29,42 @@
|
|
|
27
29
|
|
|
28
30
|
---
|
|
29
31
|
|
|
30
|
-
## 2.
|
|
32
|
+
## 2. Template 组件拼装
|
|
33
|
+
|
|
34
|
+
> 源自 `packages/create/variants/uni-manager/src/templates/form-page.tsx`
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
<PageShell header={<UmTopbar />} sidebar={<Sidebar />}>
|
|
38
|
+
<UmPageContainer header={<PageHeader breadcrumb={...} title="新建 XX" />}>
|
|
39
|
+
<div className="flex-1 min-h-0 overflow-auto">
|
|
40
|
+
{children} {/* FieldGroup 们 / 分区 Card */}
|
|
41
|
+
</div>
|
|
42
|
+
{submitBar && (
|
|
43
|
+
<div className="sticky bottom-0 border-t bg-background">
|
|
44
|
+
{submitBar} {/* [取消] [提交] */}
|
|
45
|
+
</div>
|
|
46
|
+
)}
|
|
47
|
+
</UmPageContainer>
|
|
48
|
+
</PageShell>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
| Slot | 注入内容 | 说明 |
|
|
52
|
+
| ------------ | ----------------------------------------- | ---------- |
|
|
53
|
+
| `topbar` | UmTopbar | 框架级吃顶 |
|
|
54
|
+
| `sidebar` | Sidebar + 业务菜单 | 左导 |
|
|
55
|
+
| `pageHeader` | PageHeader(面包屑模式 — L2 页面) | 含返回路径 |
|
|
56
|
+
| `children` | FieldGroup 们(可用分区 Card 切若干小节) | 滚动区 |
|
|
57
|
+
| `submitBar` | 取消 + 提交按钮(`justify-end`) | 粘底悬浮 |
|
|
58
|
+
|
|
59
|
+
**壳层特征**:
|
|
60
|
+
|
|
61
|
+
- 表单主区 `flex-1 overflow-auto` — 内容超出视口时内滚
|
|
62
|
+
- SubmitBar 从滚动区移出,`sticky bottom-0` 粘底悬浮
|
|
63
|
+
- SubmitBar 上方 `border-t` 分割线 + `bg-background` 防透
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 3. 布局模式(三选一)
|
|
31
68
|
|
|
32
69
|
### 2.1 SINGLE_COL(默认)
|
|
33
70
|
|
|
@@ -96,7 +133,7 @@ SubmitBar [取消] [创建]
|
|
|
96
133
|
|
|
97
134
|
---
|
|
98
135
|
|
|
99
|
-
##
|
|
136
|
+
## 4. 必需组件
|
|
100
137
|
|
|
101
138
|
| 组件 | 位置 | 说明 |
|
|
102
139
|
| --------------------- | ------ | ------------------------------------- |
|
|
@@ -108,7 +145,7 @@ SubmitBar [取消] [创建]
|
|
|
108
145
|
|
|
109
146
|
---
|
|
110
147
|
|
|
111
|
-
##
|
|
148
|
+
## 5. SubmitBar / Footer 规则
|
|
112
149
|
|
|
113
150
|
### 4.1 智能定位
|
|
114
151
|
|
|
@@ -132,7 +169,7 @@ SubmitBar [取消] [创建]
|
|
|
132
169
|
|
|
133
170
|
---
|
|
134
171
|
|
|
135
|
-
##
|
|
172
|
+
## 6. 字段控件选型
|
|
136
173
|
|
|
137
174
|
> **枚举数量阈值规则(≤7 RadioGroup / 8-30 Select / >30 Combobox)见 [components.md §3.5 输入控件](../components.md#35-输入控件--input-vs-select-vs-combobox)**。本节只列表单页专属补充字段。
|
|
138
175
|
|
|
@@ -151,7 +188,7 @@ SubmitBar [取消] [创建]
|
|
|
151
188
|
|
|
152
189
|
---
|
|
153
190
|
|
|
154
|
-
##
|
|
191
|
+
## 7. 字段校验规则
|
|
155
192
|
|
|
156
193
|
### 6.1 触发时机
|
|
157
194
|
|
|
@@ -178,7 +215,7 @@ SubmitBar [取消] [创建]
|
|
|
178
215
|
|
|
179
216
|
---
|
|
180
217
|
|
|
181
|
-
##
|
|
218
|
+
## 8. 提交交互
|
|
182
219
|
|
|
183
220
|
### 7.1 操作流
|
|
184
221
|
|
|
@@ -216,7 +253,7 @@ SubmitBar [取消] [创建]
|
|
|
216
253
|
|
|
217
254
|
---
|
|
218
255
|
|
|
219
|
-
##
|
|
256
|
+
## 9. shadcn 表单组合契约
|
|
220
257
|
|
|
221
258
|
> 表单**组合层面**的本地约定。视觉/全局规则参见 [boundaries.md FF1-FF4](../boundaries.md#ff1-ff4--表单专属硬约束)(色块、必填、Card 嵌套、错误文案)+ [boundaries.md S2](../boundaries.md#error-s2--不用-space-x---space-y--改用-flex--gap-)(gap 替代 space-y)+ [boundaries.md F8](../boundaries.md#error-f8--禁止在-dialogtitle-中加图标--scope-dialog)(DialogTitle 无图标)+ [boundaries.md F9](../boundaries.md#error-f9--弹窗确定按钮禁止加-disabled-禁用态--scope-dialog)(提交按钮无 disabled)。
|
|
222
259
|
|
|
@@ -230,7 +267,7 @@ SubmitBar [取消] [创建]
|
|
|
230
267
|
|
|
231
268
|
---
|
|
232
269
|
|
|
233
|
-
##
|
|
270
|
+
## 10. 嵌套约束
|
|
234
271
|
|
|
235
272
|
| 父子关系 | 状态 |
|
|
236
273
|
| --------------------------------------------------------------------------------------------- | --------------------------- |
|
|
@@ -248,7 +285,7 @@ SubmitBar [取消] [创建]
|
|
|
248
285
|
|
|
249
286
|
---
|
|
250
287
|
|
|
251
|
-
##
|
|
288
|
+
## 11. 禁止项
|
|
252
289
|
|
|
253
290
|
| 禁项 | 原因 |
|
|
254
291
|
| --------------------------- | -------------------------------- |
|
|
@@ -262,7 +299,7 @@ SubmitBar [取消] [创建]
|
|
|
262
299
|
|
|
263
300
|
---
|
|
264
301
|
|
|
265
|
-
##
|
|
302
|
+
## 12. 表单页特有自检
|
|
266
303
|
|
|
267
304
|
- [ ] PageHeader 用面包屑模式(L2 页面)
|
|
268
305
|
- [ ] um-topbar 在框架层就位(UM1)
|
|
@@ -280,7 +317,7 @@ SubmitBar [取消] [创建]
|
|
|
280
317
|
|
|
281
318
|
---
|
|
282
319
|
|
|
283
|
-
##
|
|
320
|
+
## 13. 《Teamix UI 表单设计规范》对齐 Checklist
|
|
284
321
|
|
|
285
322
|
> 详细说明见 [`packages/ui/AGENTS.md` 第六节](../../../../ui/AGENTS.md#六表单族硬规则formfieldfilter-barlabelinput)。本节只列 AI 写表单时的 yes/no 自检项。
|
|
286
323
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# List Page — 列表页模式(uni-manager)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ⚠️ **Prerequisites**: 你必须已在 [generation-flow.md](../generation-flow.md) Step 2 确认页面类型为 **ListPage**,并由 Step 3 引导到这里。
|
|
4
|
+
|
|
5
|
+
> **触发**:用户描述含“列表/表格/查询/检索/卡片管理”。
|
|
4
6
|
> **核心特征**:多条结构化数据 + 搜索/筛选 + 分页。
|
|
5
7
|
> **页面级别**:L1(标题模式 PageHeader,自动继承 um-topbar + Sidebar)。
|
|
6
8
|
> **uni-manager 增强**:高密度行(36-40px)+ 跨云 CloudBadge 列 + 多租户 / 多区域筛选维度 + 批量操作高频。
|
|
@@ -35,7 +37,38 @@
|
|
|
35
37
|
|
|
36
38
|
---
|
|
37
39
|
|
|
38
|
-
## 2.
|
|
40
|
+
## 2. Template 组件拼装
|
|
41
|
+
|
|
42
|
+
> 源自 `packages/create/variants/uni-manager/src/templates/list-page.tsx`
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
<PageShell header={<UmTopbar />} sidebar={<Sidebar />}>
|
|
46
|
+
<UmPageContainer header={<PageHeader title="..." actions={...} />}>
|
|
47
|
+
{toolbar} {/* ActionToolbar / SearchCombo / 筛选按钮 */}
|
|
48
|
+
{children} {/* DataTable / CardGrid 主内容区 */}
|
|
49
|
+
{footer} {/* Pagination / BulkActionBar */}
|
|
50
|
+
</UmPageContainer>
|
|
51
|
+
</PageShell>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
| Slot | 注入内容 | 说明 |
|
|
55
|
+
| ------------ | ------------------------------------------- | --------------------------- |
|
|
56
|
+
| `topbar` | UmTopbar | 框架级吃顶(租户/区域切换) |
|
|
57
|
+
| `sidebar` | Sidebar + 业务菜单 | 左导 |
|
|
58
|
+
| `pageHeader` | PageHeader(title + description + actions) | 标题模式 L1 |
|
|
59
|
+
| `toolbar` | ActionToolbar / SearchCombo / 筛选行 | PageHeader 下方、主区上方 |
|
|
60
|
+
| `children` | DataTable / CardGrid | 主内容区(撑高) |
|
|
61
|
+
| `footer` | Pagination + BulkActionBar | 紧贴表格底部 |
|
|
62
|
+
|
|
63
|
+
**壳层特征**:
|
|
64
|
+
|
|
65
|
+
- UmPageContainer **无白卡** — 业务组件直接坐在白底主区上
|
|
66
|
+
- 与 OpenTrek 的“内嵌大白卡”对仗:um 主区无额外包裹层
|
|
67
|
+
- footer 紧贴表格底部,页面整体溢出由父级 SidebarInset overflow 接管
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 3. 标准结构(设计线框)
|
|
39
72
|
|
|
40
73
|
```
|
|
41
74
|
┌────────────────────────────────────────────┐
|
|
@@ -57,7 +90,7 @@
|
|
|
57
90
|
|
|
58
91
|
---
|
|
59
92
|
|
|
60
|
-
##
|
|
93
|
+
## 4. 必需组件
|
|
61
94
|
|
|
62
95
|
| 组件 | 位置 | 说明 |
|
|
63
96
|
| ----------------------------- | ------- | ----------------------------------------------------------- |
|
|
@@ -70,7 +103,7 @@
|
|
|
70
103
|
|
|
71
104
|
---
|
|
72
105
|
|
|
73
|
-
##
|
|
106
|
+
## 5. SearchCombo 规范
|
|
74
107
|
|
|
75
108
|
> ListPage 顶部搜索 + 筛选的标准复合组件。**禁止**用 Input + Select 散件拼装。
|
|
76
109
|
|
|
@@ -131,7 +164,7 @@
|
|
|
131
164
|
|
|
132
165
|
---
|
|
133
166
|
|
|
134
|
-
##
|
|
167
|
+
## 6. DataTable 规则(核心)
|
|
135
168
|
|
|
136
169
|
### 5.1 列元规则(每列必备)
|
|
137
170
|
|
|
@@ -205,7 +238,7 @@
|
|
|
205
238
|
|
|
206
239
|
---
|
|
207
240
|
|
|
208
|
-
##
|
|
241
|
+
## 7. 操作列规范(硬约束)
|
|
209
242
|
|
|
210
243
|
### 6.1 结构
|
|
211
244
|
|
|
@@ -237,7 +270,7 @@
|
|
|
237
270
|
|
|
238
271
|
---
|
|
239
272
|
|
|
240
|
-
##
|
|
273
|
+
## 8. Card 内对齐规则(硬约束)
|
|
241
274
|
|
|
242
275
|
水平 padding 分层模型:
|
|
243
276
|
|
|
@@ -270,7 +303,7 @@
|
|
|
270
303
|
|
|
271
304
|
---
|
|
272
305
|
|
|
273
|
-
##
|
|
306
|
+
## 9. 状态-操作模式
|
|
274
307
|
|
|
275
308
|
### 8.1 元规则
|
|
276
309
|
|
|
@@ -306,7 +339,7 @@
|
|
|
306
339
|
|
|
307
340
|
---
|
|
308
341
|
|
|
309
|
-
##
|
|
342
|
+
## 10. 嵌套约束
|
|
310
343
|
|
|
311
344
|
| 父子关系 | 状态 |
|
|
312
345
|
| ----------------------------------------------------------------------------------------------------------- | ---------------------------- |
|
|
@@ -321,7 +354,7 @@
|
|
|
321
354
|
|
|
322
355
|
---
|
|
323
356
|
|
|
324
|
-
##
|
|
357
|
+
## 11. 禁止项
|
|
325
358
|
|
|
326
359
|
| 禁项 | 原因 |
|
|
327
360
|
| ----------------------- | ----------------------------------- |
|
|
@@ -337,7 +370,7 @@
|
|
|
337
370
|
|
|
338
371
|
---
|
|
339
372
|
|
|
340
|
-
##
|
|
373
|
+
## 12. 列表页特有自检
|
|
341
374
|
|
|
342
375
|
- [ ] PageHeader / ActionToolbar / DataTable / Pagination 嵌套结构正确
|
|
343
376
|
- [ ] um-topbar 在框架层就位(UM1)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Page Types — 5 种标准页面类型(uni-manager)
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Prerequisites**: 你必须由 [generation-flow.md](../generation-flow.md) Step 2 引导到这里。若未完成 Step 1(需求确认),请先返回。
|
|
4
|
+
|
|
3
5
|
> AI 生成页面前**必须先识别页面类型**,再选择对应模式。本文档是 generation-flow.md Step 2 的核心输入。
|
|
4
6
|
>
|
|
5
|
-
> uni-manager 与 OpenTrek 五型同构,差异在于:**Dashboard
|
|
7
|
+
> uni-manager 与 OpenTrek 五型同构,差异在于:**Dashboard 默认承担“Console Home”**、所有 L1/L2 页面**必须挂在 `um-topbar` 之下**。
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# 设计哲学 · Uni-Manager
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ⚠️ **何时读本文件**: [generation-flow.md](./generation-flow.md) Step 1 强制要求读取。本文件建立“为什么这么做”的认知基础,是后续所有决策的裁判依据。
|
|
4
|
+
|
|
5
|
+
> 回答**“为什么这么做”**。具体规则见 [boundaries.md](./boundaries.md) / [foundations.md](./foundations.md)。
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: teamix-evo-manage
|
|
3
3
|
description: |
|
|
4
4
|
Single entry point for the teamix-evo lifecycle: scaffold a new project, install the AI coding system into an existing repo, run / update / inspect / remove any teamix-evo package, and drive the placeholder→real UI migration loop after `npm create teamix-evo`.
|
|
5
|
-
TRIGGER when: (CLI) user runs or asks about `teamix-evo tokens ...` / `teamix-evo skills ...` / `teamix-evo ui ...` / `teamix-evo biz-ui ...` / `teamix-evo templates ...` / `teamix-evo logs ...`, or `npm create teamix-evo` / `pnpm create teamix-evo`; (模糊初始化) "初始化一个项目"、"初始化一个工程"、"初始化一个 teamix-evo 工程"、"初始化一个 Teamix Evo 项目"、"create a teamix-evo project"、"set up teamix-evo from scratch"、"new teamix-evo app"; (具名变体初始化) "初始化一个 opentrek 工程 / op 工程 / OpenTrek 项目 / 探索者项目"、"初始化一个云管 / 云管控制台 / 云管项目 / uni-manager 工程 / 云管工程"、"new opentrek/uni-manager project"; (AI coding 接入) "给现有仓库装 teamix-evo"、"现有项目装一下 skills + ui"、"接入 AI coding 体系"、"装 teamix-evo 进这个项目"、"add teamix-evo to existing repo"、"install AI coding system"、"接入 opentrek 研发体系"、"接入 op 研发体系"、"接入 OpenTrek 研发体系"、"接入 opentrek 研发系统"、"接入 op 研发系统"、"接入云管研发体系"、"接入云管研发系统"、"接入 uni-manager 研发体系"、"接入 uni-manager 研发系统"、"接入统一管理研发体系"; (更新检测) "升级 teamix-evo"、"看看哪些要升级"、"update teamix-evo"、"check what needs updating"、"refresh installed teamix-evo packages"; (卸载 / 清单) "卸载 teamix-evo"、"看看装了哪些 teamix-evo 资源"、"remove the design system"、"list installed"; (placeholder→real 升级) "升级 UI"、"接入真组件"、"替换 placeholder"、"upgrade UI"、"replace placeholders"、"swap in real components"、"make the UI real", or user opens / edits `src/components/_placeholder/**`, project contains `.teamix-evo/create/pending-ui.json`, literal `@teamix-evo:placeholder` tag in code; (状态文件) user touches `.teamix-evo/config.json`、`.teamix-evo/manifest.json`、`.teamix-evo/create/pending-ui.json`.
|
|
5
|
+
TRIGGER when: (CLI) user runs or asks about `teamix-evo tokens ...` / `teamix-evo skills ...` / `teamix-evo ui ...` / `teamix-evo biz-ui ...` / `teamix-evo templates ...` / `teamix-evo lint ...` / `teamix-evo logs ...`, or `npm create teamix-evo` / `pnpm create teamix-evo`; (模糊初始化) "初始化一个项目"、"初始化一个工程"、"初始化一个 teamix-evo 工程"、"初始化一个 Teamix Evo 项目"、"create a teamix-evo project"、"set up teamix-evo from scratch"、"new teamix-evo app"; (具名变体初始化) "初始化一个 opentrek 工程 / op 工程 / OpenTrek 项目 / 探索者项目"、"初始化一个云管 / 云管控制台 / 云管项目 / uni-manager 工程 / 云管工程"、"new opentrek/uni-manager project"; (AI coding 接入) "给现有仓库装 teamix-evo"、"现有项目装一下 skills + ui"、"接入 AI coding 体系"、"装 teamix-evo 进这个项目"、"add teamix-evo to existing repo"、"install AI coding system"、"接入 opentrek 研发体系"、"接入 op 研发体系"、"接入 OpenTrek 研发体系"、"接入 opentrek 研发系统"、"接入 op 研发系统"、"接入云管研发体系"、"接入云管研发系统"、"接入 uni-manager 研发体系"、"接入 uni-manager 研发系统"、"接入统一管理研发体系"; (更新检测) "升级 teamix-evo"、"看看哪些要升级"、"update teamix-evo"、"check what needs updating"、"refresh installed teamix-evo packages"; (卸载 / 清单) "卸载 teamix-evo"、"看看装了哪些 teamix-evo 资源"、"remove the design system"、"list installed"; (placeholder→real 升级) "升级 UI"、"接入真组件"、"替换 placeholder"、"upgrade UI"、"replace placeholders"、"swap in real components"、"make the UI real", or user opens / edits `src/components/_placeholder/**`, project contains `.teamix-evo/create/pending-ui.json`, literal `@teamix-evo:placeholder` tag in code; (状态文件) user touches `.teamix-evo/config.json`、`.teamix-evo/manifest.json`、`.teamix-evo/create/pending-ui.json`.
|
|
6
6
|
SKIP: any content task — generating components, pages, services, or reviewing screens; changes to `src/` files outside the migration loop, design tokens, or business logic. Those go to teamix-evo-code-opentrek or teamix-evo-design-opentrek. SKIP if the user is mid-flow inside an already-initialized project asking to "新增页面 / 加按钮 / 调接口" — that's coding work, not lifecycle. SKIP pure styling / token tweaks — those go to ESLint + `tokens.overrides.css`.
|
|
7
7
|
Coordinates with: teamix-evo-design-opentrek (visual side after a screen is generated)、teamix-evo-code-opentrek (file placement / reuse rules) — manage is the entry point and precedes content skills, never co-triggers.
|
|
8
8
|
---
|
|
@@ -18,6 +18,34 @@ Single entry skill for the **teamix-evo** toolkit lifecycle. Covers six scenario
|
|
|
18
18
|
5. Uninstall.
|
|
19
19
|
6. Placeholder → real UI migration loop (post-`npm create teamix-evo`).
|
|
20
20
|
|
|
21
|
+
## 安装方式
|
|
22
|
+
|
|
23
|
+
本 skill 是 **entry skill**(lifecycle orchestrator),manifest 里声明 `scope: "global"`。**推荐全局安装一次**:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx teamix-evo skills add teamix-evo-manage --scope global
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`skills add`(默认 project scope)与 `npm create teamix-evo` **不会**自动装本 skill —— bulk 模式按 scope 自动跳过(ADR 0033)。如果用户在项目级显式 `skills add teamix-evo-manage --scope project`,CLI 给出"推荐 global"warning 但仍装入(用户自负责),代价是后续 IDE 会同时识别全局与项目两份副本。
|
|
30
|
+
|
|
31
|
+
## 自助升级
|
|
32
|
+
|
|
33
|
+
升级到最新版本(任何目录可跑 — 自动找全局 meta root):
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx teamix-evo@latest skills update # 全部已装
|
|
37
|
+
npx teamix-evo@latest skills update teamix-evo-manage # 只升 manage 一个
|
|
38
|
+
npx teamix-evo@latest skills update --dry-run # 预览,不写盘
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`@latest` 让 npx 拉最新 CLI + 最新 `@teamix-evo/skills` 包。命令头部会打印 CLI 版本与 skills 包版本,方便排查 npx cache 与包不同步的问题。
|
|
42
|
+
|
|
43
|
+
升级范围(ADR 0035 双闸):
|
|
44
|
+
|
|
45
|
+
- 只更新 lock 里**已装**的 skill — 新 skill 用 `skills add <id>` 显式加入,不会被 update 自动装上
|
|
46
|
+
- 只更新 scope 与当前 install scope 一致的 skill — 项目级 update 不会动全局 manage,反之亦然
|
|
47
|
+
- 版本完全一致时短路,不重写源(managed 区域用户改动不被来回备份)
|
|
48
|
+
|
|
21
49
|
<!-- teamix-evo:managed:start id="core" -->
|
|
22
50
|
|
|
23
51
|
## 决策树(动手前必看)
|
|
@@ -25,7 +53,7 @@ Single entry skill for the **teamix-evo** toolkit lifecycle. Covers six scenario
|
|
|
25
53
|
```text
|
|
26
54
|
用户的指令命中本 skill
|
|
27
55
|
├── 目录里有 `.teamix-evo/`?
|
|
28
|
-
│ 是 ──▶ 4 (更新) / 5 (卸载)
|
|
56
|
+
│ 是 ──▶ 4 (更新) / 5 (卸载)
|
|
29
57
|
│ 否 ──▶ 继续
|
|
30
58
|
├── 用户说出业务名 / variant?
|
|
31
59
|
│ 是 ──▶ 2 (具名变体初始化) — 用「业务名→variant 映射表」推断
|
|
@@ -67,21 +95,23 @@ CLI 二进制名 `teamix-evo`,所有命令都从这里发起。命令名以 `tok
|
|
|
67
95
|
|
|
68
96
|
### Skills(`@teamix-evo/skills`)
|
|
69
97
|
|
|
70
|
-
| 目标 | 命令
|
|
71
|
-
| -------- |
|
|
72
|
-
|
|
|
73
|
-
| 增量装 | `npx teamix-evo skills add <name...>`
|
|
74
|
-
| 列出全部 | `npx teamix-evo skills list`(alias `ls`)
|
|
75
|
-
| 列出已装 | `npx teamix-evo skills list --installed`
|
|
76
|
-
| 升级 | `npx teamix-evo skills update`
|
|
77
|
-
| 卸载 | `npx teamix-evo skills uninstall [-y]`
|
|
78
|
-
| 漂移检测 | `npx teamix-evo skills doctor`
|
|
79
|
-
| 重新镜像 | `npx teamix-evo skills sync [name...]`
|
|
98
|
+
| 目标 | 命令 |
|
|
99
|
+
| -------- | ---------------------------------------------------- |
|
|
100
|
+
| 自举 | `npx teamix-evo skills init` |
|
|
101
|
+
| 增量装 | `npx teamix-evo skills add <name...>` |
|
|
102
|
+
| 列出全部 | `npx teamix-evo skills list`(alias `ls`) |
|
|
103
|
+
| 列出已装 | `npx teamix-evo skills list --installed` |
|
|
104
|
+
| 升级 | `npx teamix-evo skills update [name...] [--dry-run]` |
|
|
105
|
+
| 卸载 | `npx teamix-evo skills uninstall [-y]` |
|
|
106
|
+
| 漂移检测 | `npx teamix-evo skills doctor` |
|
|
107
|
+
| 重新镜像 | `npx teamix-evo skills sync [name...]` |
|
|
108
|
+
|
|
109
|
+
> 升级语义见 ADR 0035 双闸:仅升级 lock 已装且 scope 匹配的 skill;version 完全一致时短路;新 skill 用 `skills add <id>` 显式加入。
|
|
80
110
|
|
|
81
|
-
|
|
111
|
+
verb 分工(ADR 0034):
|
|
82
112
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
113
|
+
- **`skills init`**(无 ids):自举 — 按当前 tokens variant + install scope 装 manifest 里全部符合条件的 skill。已装的工程再跑会返回 `already-initialized`。
|
|
114
|
+
- **`skills add <name...>`**(必填 ids):增量 — 只装列出的 skill;已装的跳过(用 `update` 刷新)。不传 id 会被 commander 拒绝并输出 help。
|
|
85
115
|
|
|
86
116
|
首次交互式(无既有配置且无 flag 时):
|
|
87
117
|
|
|
@@ -100,7 +130,7 @@ CLI 二进制名 `teamix-evo`,所有命令都从这里发起。命令名以 `tok
|
|
|
100
130
|
|
|
101
131
|
- `ui init` 写 `.teamix-evo/config.json` 的 `packages.ui`(aliases / iconLibrary / tsx / rsc)。可交互元素的 `cursor: pointer` 由组件源码内显式声明,不再有全局 `preferences.css` —— 见 [ADR 0023](docs/adr/0023-cursor-pointer-explicit-in-component-source.md)
|
|
102
132
|
- `ui add` 自动解析 `registryDependencies`,组件源码写入 `src/components/ui/<id>.tsx`(frozen),并报告还需 `pnpm add` 的 npm 包。
|
|
103
|
-
- 没有 `ui upgrade` 子命令 —
|
|
133
|
+
- 没有 `ui upgrade` 子命令 — 组件升级走 `ui add` 覆盖即可。
|
|
104
134
|
|
|
105
135
|
### 业务组件(`@teamix-evo/biz-ui`)
|
|
106
136
|
|
|
@@ -129,7 +159,7 @@ CLI 二进制名 `teamix-evo`,所有命令都从这里发起。命令名以 `tok
|
|
|
129
159
|
| ---------- | ----------------------------------- |
|
|
130
160
|
| 分析调用链 | `npx teamix-evo logs analyze [...]` |
|
|
131
161
|
|
|
132
|
-
- 读 vibe-logger 输出 `.
|
|
162
|
+
- 读 vibe-logger 输出 `.teamix-evo/logs/ai/**/*.jsonl`,做 AI 调用链可视化。诊断 `runTokensInit` / `runUiAdd` 等编排流程时用。
|
|
133
163
|
|
|
134
164
|
## 场景 1 · 模糊初始化
|
|
135
165
|
|
|
@@ -156,14 +186,16 @@ npm create teamix-evo@latest <dir> --variant <name>
|
|
|
156
186
|
|
|
157
187
|
`create-teamix-evo` 的 `console` preset(默认且当前唯一)会自动一站式落地:
|
|
158
188
|
|
|
159
|
-
| 阶段 | 产物
|
|
160
|
-
| ---- |
|
|
161
|
-
| 1 | Vite + React + TS scaffold(`src/`、`vite.config.ts` 等)
|
|
162
|
-
| 2 | `tokens init <variant>` → 根 `tokens/` 目录(`tokens.theme.css` / `tokens.overrides.css`)
|
|
163
|
-
| 3 | `skills add
|
|
164
|
-
| 4 | `ui init` → `.teamix-evo/config.json`
|
|
165
|
-
| 5 | `ui add
|
|
166
|
-
| 6 |
|
|
189
|
+
| 阶段 | 产物 |
|
|
190
|
+
| ---- | ---------------------------------------------------------------------------------------------------------- |
|
|
191
|
+
| 1 | Vite + React + TS scaffold(`src/`、`vite.config.ts` 等) |
|
|
192
|
+
| 2 | `tokens init <variant>` → 根 `tokens/` 目录(`tokens.theme.css` / `tokens.overrides.css`) |
|
|
193
|
+
| 3 | `skills add design-<variant> code-<variant>` → 项目级装 2 个 variant 内容 skill(manage 不在内,见 ADR 0033) |
|
|
194
|
+
| 4 | `ui init` → `.teamix-evo/config.json` |
|
|
195
|
+
| 5 | `ui add` → 真组件源码(button / card / input / form / table 等) |
|
|
196
|
+
| 6 | `lint init` → ESLint + Stylelint 配置 |
|
|
197
|
+
|
|
198
|
+
> 提示:`teamix-evo-manage` 是 entry skill,推荐**全局**装一次(`npx teamix-evo skills add teamix-evo-manage --scope global`)。create CLI 不会装它到 project,scaffold 完成后的 next-steps 会提示用户。
|
|
167
199
|
|
|
168
200
|
**完成后告知用户**:
|
|
169
201
|
|
|
@@ -173,8 +205,6 @@ pnpm dev # 立刻可跑
|
|
|
173
205
|
pnpm typecheck # 验证零类型错误
|
|
174
206
|
```
|
|
175
207
|
|
|
176
|
-
并提示:「placeholder 占位组件想换真组件?对我说"升级 UI"/"替换 placeholder",我会进入场景 6 逐个迁移。」
|
|
177
|
-
|
|
178
208
|
## 场景 3 · AI coding 接入(现有仓库)
|
|
179
209
|
|
|
180
210
|
**触发**:用户已有 React/TS/Vite 仓库(已 `npm install` / 有 `package.json`),只想装 AI coding 体系。
|
|
@@ -191,8 +221,8 @@ pnpm typecheck # 验证零类型错误
|
|
|
191
221
|
npx teamix-evo tokens list-variants
|
|
192
222
|
npx teamix-evo tokens init <variant> # 装 tokens(写 tokens/ 与 .teamix-evo/tokens-lock.json)
|
|
193
223
|
|
|
194
|
-
# 2.
|
|
195
|
-
npx teamix-evo skills
|
|
224
|
+
# 2. 自举 skills(同源 Qoder + Claude;manage 是 global-only,自举自动跳过 — ADR 0033 + 0034)
|
|
225
|
+
npx teamix-evo skills init # 项目级装 design-<variant> + code-<variant>,默认两个 IDE 镜像
|
|
196
226
|
|
|
197
227
|
# 3. 装 ui 配置
|
|
198
228
|
npx teamix-evo ui init -y
|
|
@@ -203,6 +233,7 @@ npx teamix-evo ui add button # 可选:先装一个真组件验
|
|
|
203
233
|
|
|
204
234
|
- 已装的 skill 列表(从 `skills list --installed`)、tokens variant、ui aliases。
|
|
205
235
|
- 接下来怎么用:写新页面就触发 `teamix-evo-design-opentrek` / `teamix-evo-code-opentrek`。
|
|
236
|
+
- 若全局尚未安装 entry skill,补一句:`npx teamix-evo skills add teamix-evo-manage --scope global`(ADR 0033)。
|
|
206
237
|
|
|
207
238
|
## 场景 4 · 更新检测
|
|
208
239
|
|
|
@@ -214,9 +245,8 @@ npx teamix-evo ui add button # 可选:先装一个真组件验
|
|
|
214
245
|
2. 对每个已装包,跑对应 `list --installed`(若有该子命令)与上游 manifest 比对版本。
|
|
215
246
|
3. 仅对**已装**的包做 update:
|
|
216
247
|
- `npx teamix-evo tokens update`(stub — 仍提示用户清 + 重装)
|
|
217
|
-
- `npx teamix-evo skills update`
|
|
218
|
-
- 没有 `ui update`(
|
|
219
|
-
4. 检测 `.teamix-evo/create/pending-ui.json` 是否存在;存在则提示「还有 placeholder 未迁移,要现在进入场景 6 吗?」
|
|
248
|
+
- `npx teamix-evo skills update [name...] [--dry-run]` — 双闸 + version 短路 + 可选限定 id(ADR 0035)。先 `--dry-run` 给用户看清单,确认后再无 flag 跑一遍真升级
|
|
249
|
+
- 没有 `ui update`(组件升级走 `ui add` 覆盖即可)
|
|
220
250
|
|
|
221
251
|
**不要**给未安装的包做 install — 那是场景 2/3 的事。
|
|
222
252
|
|
|
@@ -232,47 +262,25 @@ npx teamix-evo ui add button # 可选:先装一个真组件验
|
|
|
232
262
|
|
|
233
263
|
`tokens uninstall` 默认保留 `managed` 文件以保护用户编辑;`--keep-files` 完全保留物理文件,只清 manifest。
|
|
234
264
|
|
|
235
|
-
## 场景 6 · placeholder → real UI 升级循环
|
|
236
|
-
|
|
237
|
-
**触发**:`pending-ui.json` 存在 / 用户说"升级 UI / 替换 placeholder / upgrade UI / replace placeholders" / 用户编辑 `src/components/_placeholder/**` / grep `@teamix-evo:placeholder` 命中。
|
|
238
|
-
|
|
239
|
-
**5 步循环**(对 `pendingComponents` 每个条目重复):
|
|
240
|
-
|
|
241
|
-
1. **读** `.teamix-evo/create/pending-ui.json` 拿 `pendingComponents` 列表(每条含 `id` 如 `card` / `input` / `form` / `table` 与当前 placeholder 路径)。
|
|
242
|
-
2. **装真组件**:`npx teamix-evo ui add <id>` → `src/components/ui/<id>.tsx`。**[ADR 0006](docs/adr/0006-ui-upgrade-no-baseline.md)**:无 baseline diff,真组件直接覆盖。
|
|
243
|
-
3. **迁移引用点**:把 `@/components/_placeholder/<Name>` 替换为 `@/components/ui/<id>`。**真组件的 prop API 可能与 placeholder 不同**(prop 名 / 必填项 / slot 形态),逐个 call site 改对。**不要**靠 `as any` 压住类型错误 — prop 差异是有意的。
|
|
244
|
-
4. **删 placeholder 文件** — 全部 import 迁完后删源文件;再 grep 一次旧路径,确认零命中。
|
|
245
|
-
5. **更新** `pending-ui.json`:移除已迁移的条目;`pendingComponents` 空了就删整文件。
|
|
246
|
-
|
|
247
|
-
循环完后:再 grep `@teamix-evo:placeholder` 字面 tag,任何残留都是漏网的占位,要再迁移或删除。
|
|
248
|
-
|
|
249
|
-
**告警**:
|
|
250
|
-
|
|
251
|
-
- placeholder 顶部的 `@teamix-evo:placeholder` 是字面 canary,不能留进生产代码。
|
|
252
|
-
- Form / Table / DataTable 真组件可能需要 Provider(`FormProvider`、`useReactTable` 等)— 在消费侧补 wiring,**不要**把 wiring 包回 `_placeholder/`。
|
|
253
|
-
- 每迁完一个组件,跑一次 `pnpm typecheck`,有错先修干净再迁下一个。
|
|
254
|
-
|
|
255
265
|
## 配置文件(信息性)
|
|
256
266
|
|
|
257
|
-
| 路径
|
|
258
|
-
|
|
|
259
|
-
| `.teamix-evo/config.json`
|
|
260
|
-
| `.teamix-evo/manifest.json`
|
|
261
|
-
|
|
|
262
|
-
| `tokens/tokens.overrides.css` | 用户 | 业务自定义 token 覆盖(`frozen`) |
|
|
267
|
+
| 路径 | 所有者 | 说明 |
|
|
268
|
+
| ----------------------------- | ------ | --------------------------------------- |
|
|
269
|
+
| `.teamix-evo/config.json` | CLI | 已装包清单、版本、IDE / scope |
|
|
270
|
+
| `.teamix-evo/manifest.json` | CLI | 已装资源 ledger;diff / uninstall 的依据 |
|
|
271
|
+
| `tokens/tokens.overrides.css` | 用户 | 业务自定义 token 覆盖(`frozen`) |
|
|
263
272
|
|
|
264
273
|
**不要**手编 `config.json` / `manifest.json`,用对应 CLI 子命令。
|
|
265
274
|
|
|
266
275
|
## 常见错误与恢复路径(P8 — failures must be observable)
|
|
267
276
|
|
|
268
|
-
| 症状 | 原因 | 恢复路径
|
|
269
|
-
| -------------------------------------------------- | ------------------------------------------- |
|
|
270
|
-
| `Unknown tokens variant "..."` | 拼写错误或上游未发布该 variant | `npx teamix-evo tokens list-variants` 列出当前可用
|
|
271
|
-
| `Target directory already contains a .teamix-evo/` | 误用 `npm create teamix-evo` 进已装目录 | 改走场景 4(更新)或场景 3(增量装)
|
|
272
|
-
| `UI not initialized`(跑 `ui add` 时) | 未先跑 `ui init` | `npx teamix-evo ui init -y` 然后再 `ui add`
|
|
273
|
-
| Vite/Tailwind 跑起来没样式 | `src/index.css` 缺少 tokens / Tailwind 导入 | 检查 `src/index.css` 的 `@import` 顺序
|
|
274
|
-
|
|
|
275
|
-
| Skills 在 IDE 不触发 | `.qoder/skills/` 或 `.claude/skills/` 漂移 | `npx teamix-evo skills doctor` 然后 `skills sync` |
|
|
277
|
+
| 症状 | 原因 | 恢复路径 |
|
|
278
|
+
| -------------------------------------------------- | ------------------------------------------- | -------------------------------------------------- |
|
|
279
|
+
| `Unknown tokens variant "..."` | 拼写错误或上游未发布该 variant | `npx teamix-evo tokens list-variants` 列出当前可用 |
|
|
280
|
+
| `Target directory already contains a .teamix-evo/` | 误用 `npm create teamix-evo` 进已装目录 | 改走场景 4(更新)或场景 3(增量装) |
|
|
281
|
+
| `UI not initialized`(跑 `ui add` 时) | 未先跑 `ui init` | `npx teamix-evo ui init -y` 然后再 `ui add` |
|
|
282
|
+
| Vite/Tailwind 跑起来没样式 | `src/index.css` 缺少 tokens / Tailwind 导入 | 检查 `src/index.css` 的 `@import` 顺序 |
|
|
283
|
+
| Skills 在 IDE 不触发 | `.qoder/skills/` 或 `.claude/skills/` 漂移 | `npx teamix-evo skills doctor` 然后 `skills sync` |
|
|
276
284
|
|
|
277
285
|
<!-- teamix-evo:managed:end id="core" -->
|
|
278
286
|
|