@teamix-evo/skills 0.2.0 → 0.3.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 +18 -8
- package/_template/SKILL.md.hbs +14 -1
- package/manifest.json +59 -2
- package/package.json +6 -2
- package/skills/teamix-evo-coding-conventions/SKILL.md +92 -0
- package/skills/teamix-evo-coding-conventions/api-layering.md +225 -0
- package/skills/teamix-evo-coding-conventions/checklist.md +173 -0
- package/skills/teamix-evo-coding-conventions/error-and-loading.md +269 -0
- package/skills/teamix-evo-coding-conventions/file-structure.md +273 -0
- package/skills/teamix-evo-coding-conventions/forms-and-validation.md +220 -0
- package/skills/teamix-evo-coding-conventions/reuse-first.md +122 -0
- package/skills/teamix-evo-coding-conventions/routing-and-codesplit.md +298 -0
- package/skills/teamix-evo-coding-conventions/testing.md +313 -0
- package/skills/teamix-evo-design-rules/SKILL.md +86 -0
- package/skills/teamix-evo-design-rules/boundaries.md +89 -0
- package/skills/teamix-evo-design-rules/checklist.md +108 -0
- package/skills/teamix-evo-design-rules/generation-flow.md +142 -0
- package/skills/teamix-evo-design-rules/prompts/page-design.md +148 -0
- package/skills/teamix-evo-design-rules-opentrek/SKILL.md +48 -0
- package/skills/teamix-evo-design-rules-opentrek/brand-rules.md +74 -0
- package/skills/teamix-evo-design-rules-uni-manager/SKILL.md +51 -0
- package/skills/teamix-evo-design-rules-uni-manager/ai-scenarios.md +51 -0
- package/skills/teamix-evo-design-rules-uni-manager/command-center.md +108 -0
- package/skills/teamix-evo-design-rules-uni-manager/danger-ops.md +87 -0
- package/skills/teamix-evo-manage/SKILL.md +80 -40
- package/skills/teamix-evo-ui-upgrade/SKILL.md +75 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# AI 副驾驶 7 类场景(A-G)
|
|
2
|
+
|
|
3
|
+
> 在中性基线 `generation-flow.md` 的 Step 1 关键词表之上,本文件追加 uni-manager 专属的 AI 副驾驶场景关键词映射。
|
|
4
|
+
|
|
5
|
+
## 关键词 → 场景映射
|
|
6
|
+
|
|
7
|
+
| 关键词 | 场景 | 入口 | 参考文档 |
|
|
8
|
+
|--------|------|------|---------|
|
|
9
|
+
| 对话、问答、AI 助手、chat | **场景 A · AI 对话主界面** | 侧边面板 / 悬浮气泡 | `.teamix-evo/design/scenarios/examples/conversation.md` |
|
|
10
|
+
| 命令面板、快速搜索、Cmd+K | **场景 B · 智能命令面板** | Cmd+K | `.teamix-evo/design/scenarios/examples/command-palette.md` |
|
|
11
|
+
| 告警、诊断、根因分析、MTTR | **场景 C · 告警诊断** | 告警卡片"AI 诊断" | `.teamix-evo/design/scenarios/README.md` |
|
|
12
|
+
| 操作执行、批量编排、确认卡 | **场景 D · 操作编排** | A/B/C 触发 | 同上 |
|
|
13
|
+
| 成本、用量、优化建议 | **场景 E · 成本洞察** | Dashboard 入口 | 同上 |
|
|
14
|
+
| 文档、知识库、引用问答 | **场景 F · 知识问答** | A 内嵌 / 文档侧栏 | 同上 |
|
|
15
|
+
| 拓扑、依赖、影响范围、链路 | **场景 G · 拓扑感知** | DetailPage / TopologyPage | 同上 |
|
|
16
|
+
|
|
17
|
+
## 场景间联动(生成时遵守)
|
|
18
|
+
|
|
19
|
+
- **A → D**:对话中的写操作意图必须生成 D 场景的"操作确认卡",不得直接执行
|
|
20
|
+
- **B 不放写操作**:命令面板内禁止删除 / 释放等高危动作
|
|
21
|
+
- **C → D**:告警建议的修复操作走确认卡
|
|
22
|
+
- **A → F**:对话引用文档时附引用源链接(可点击跳转)
|
|
23
|
+
- **任何场景 → CloudDetailPage**:引用资源使用 `@<resource-id>` 标准格式,可点击跳转详情页
|
|
24
|
+
|
|
25
|
+
## AI 行为约束(场景级)
|
|
26
|
+
|
|
27
|
+
| 场景 | MUST | MUST NOT |
|
|
28
|
+
|------|------|----------|
|
|
29
|
+
| A | 引用资源用 `@<id>`;写操作生成 D 卡片;引用文档附来源 | 第一人称"我";直接执行写操作;输出未引用来源的"事实" |
|
|
30
|
+
| B | 唤起 ≤ 100ms;键盘可达;AI 回答限 1 段 | 面板内执行写操作;展示 > 3 行长内容 |
|
|
31
|
+
| C | 列出根因链 + 影响范围;修复建议附预期影响 | 自动执行修复;隐藏失败原因 |
|
|
32
|
+
| D | 列出资源 ID + 影响 + 关联资源数;高危需输入资源名 | 默认勾选"确认"按钮;批次 > 100 单次执行 |
|
|
33
|
+
| E | 数字 count-up;归因可下钻 | 推送广告 / 营销文案 |
|
|
34
|
+
| F | 附引用源(可追溯);不确定时明确说"不确定" | 编造引用源 |
|
|
35
|
+
| G | 节点点击不离开画布(Sheet 打开);> 50 节点必须 minimap | 拓扑画布内执行写操作 |
|
|
36
|
+
|
|
37
|
+
## 单次对话上限
|
|
38
|
+
|
|
39
|
+
- **A 场景对话内的写操作**:影响 ≤ 10 个资源 — 超过引导走 CloudListPage 批量入口
|
|
40
|
+
- **D 场景批量操作**:单次 ≤ 100 项 — 超过提示拆分
|
|
41
|
+
- **C 场景的修复操作**:必须有"取消"路径,执行中可中止(除已落地的不可逆步骤)
|
|
42
|
+
|
|
43
|
+
## 降级(AI 服务不可用时)
|
|
44
|
+
|
|
45
|
+
| 场景 | 降级 |
|
|
46
|
+
|------|------|
|
|
47
|
+
| A | "AI 服务暂时不可用。可查看 [文档] 或 [提交工单]" |
|
|
48
|
+
| B | 隐藏 AI 分类,仅保留资源 / 页面 / 命令搜索 |
|
|
49
|
+
| C | 退化为静态告警列表 + 链接到 LogViewer |
|
|
50
|
+
| D | 不显示"AI 建议"区块;用户走标准 ListPage 操作 |
|
|
51
|
+
| E-G | 同上 — 静态视图代替 AI 增强 |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# 指挥官大屏 / 拓扑 / 告警诊断(uni-manager)
|
|
2
|
+
|
|
3
|
+
> 中性基线 `boundaries.md` 把"大屏 / 营销 / AI 卡片的特殊许可"留给变体定义。本文件给出 uni-manager 的具体规则;落地用 token 见 `.teamix-evo/design/foundations/effects-cloud-cockpit.md` 与 `motion-scenarios.md`。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 指挥官大屏(Cockpit)
|
|
8
|
+
|
|
9
|
+
### 适用场景
|
|
10
|
+
NOC / SRE 大屏、运营数据巡检、对外接待展示(**只读**)。
|
|
11
|
+
|
|
12
|
+
### 必须
|
|
13
|
+
|
|
14
|
+
- 暗色主题为默认(不要求支持 light 切换)
|
|
15
|
+
- 关键数字 `text-4xl`+;count-up 滚动 800ms(参见 `motion-scenarios.md` 场景 E)
|
|
16
|
+
- 时间范围切换持久化到 URL;自动刷新周期 ≥ 30s
|
|
17
|
+
- 所有"按钮"跳转到对应详情 / 列表页(**大屏不放写操作**)
|
|
18
|
+
- 颜色仍来自 token,禁止硬编码 hex
|
|
19
|
+
- 字体族仍是 `--font-sans` / `--font-mono`,不引入装饰字体
|
|
20
|
+
|
|
21
|
+
### 可以(变体特殊许可)
|
|
22
|
+
|
|
23
|
+
- 渐变背景(`from-background to-muted/30`)
|
|
24
|
+
- 关键数字 / 状态点 `drop-shadow-glow`(仅 `chart-*` 色)
|
|
25
|
+
- 关键数字允许 `text-7xl` ~ `text-8xl`
|
|
26
|
+
- 更深阴影 + 内发光以强化层级
|
|
27
|
+
- 不强制响应式 — 默认 1920×1080 起,小屏直接降级到普通 Dashboard
|
|
28
|
+
|
|
29
|
+
### 不得
|
|
30
|
+
|
|
31
|
+
- 写操作(启动 / 停止 / 释放 / 配置变更)
|
|
32
|
+
- emoji / 装饰图形作为信息载体
|
|
33
|
+
- 大屏视觉语言外泄到普通 Dashboard / List / Detail
|
|
34
|
+
- 24h 不变化的"装饰图表"占据高层级位置
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. 拓扑感知(TopologyPage / Sheet 内嵌)
|
|
39
|
+
|
|
40
|
+
### 必须
|
|
41
|
+
|
|
42
|
+
- 节点 hover:`scale(1.1)` 150ms + 关联线高亮(`stroke` 加粗 + `chart-1` 色)
|
|
43
|
+
- 点击节点 → **右侧 Sheet 打开详情**,不离开拓扑画布
|
|
44
|
+
- 入场动效:节点 `scale-in stagger`(中心向外,100ms / 层),连线 `path draw` 500ms
|
|
45
|
+
- 大型拓扑(节点 > 50)必须支持 **minimap + 缩放控件**
|
|
46
|
+
- 所有节点必须可键盘导航(Tab + 方向键)
|
|
47
|
+
|
|
48
|
+
### 不得
|
|
49
|
+
|
|
50
|
+
- 拓扑画布内执行写操作(详情 Sheet 内允许)
|
|
51
|
+
- 节点点击导致整页跳转(破坏画布上下文)
|
|
52
|
+
- 拓扑深度 > 4 层不带 Breadcrumb / minimap
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 3. 告警诊断(场景 C 落地布局)
|
|
57
|
+
|
|
58
|
+
### 入口
|
|
59
|
+
|
|
60
|
+
- **被动**:全局通知 NotificationBadge(红色 + 数字 + 轻震 100ms)
|
|
61
|
+
- **主动**:Dashboard StatCard(异常数) 下钻 / CloudListPage `?status=error`
|
|
62
|
+
|
|
63
|
+
### 卡片结构
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
┌──────────────────────────────────────┐
|
|
67
|
+
│ [严重] 实例 i-abc123 CPU 持续高负载 │ ← 标题:等级 + 资源 ID + 概要
|
|
68
|
+
├──────────────────────────────────────┤
|
|
69
|
+
│ 时间: 2026-05-20 14:32 ~ 持续中 │
|
|
70
|
+
│ 影响: 关联的 1 个 SLB / 23 RPS 受影响│
|
|
71
|
+
├──────────────────────────────────────┤
|
|
72
|
+
│ ▼ 根因链(AI 诊断) │ ← accordion expand 300ms
|
|
73
|
+
│ ├ 实例负载 95% (主因) │ ← 节点 stagger 100ms
|
|
74
|
+
│ ├ 流量增长 +180% vs 周环比 │
|
|
75
|
+
│ └ 业务线 X 新版本上线 │
|
|
76
|
+
├──────────────────────────────────────┤
|
|
77
|
+
│ AI 建议: │
|
|
78
|
+
│ ① 临时升配 (推荐) [生成确认卡 →] │ ← 触发场景 D
|
|
79
|
+
│ ② 限流保护 [生成确认卡 →] │
|
|
80
|
+
│ ③ 切换备实例 [生成确认卡 →] │
|
|
81
|
+
└──────────────────────────────────────┘
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 必须
|
|
85
|
+
|
|
86
|
+
- 异常数字必须是**可点击的钻取入口**
|
|
87
|
+
- LogViewer 默认定位到异常时间点 ± 5 分钟
|
|
88
|
+
- AI 修复建议 → 点击触发场景 D 确认卡(**不直接执行**)
|
|
89
|
+
- 修复操作必须显示**预期影响范围**(关联资源数 / 流量切换 / 数据回滚成本)
|
|
90
|
+
- 告警消除后用 `scale-out + fade` 200ms 收回
|
|
91
|
+
|
|
92
|
+
### 不得
|
|
93
|
+
|
|
94
|
+
- AI 自动执行修复(即使是建议中标"推荐"的)
|
|
95
|
+
- 隐藏未匹配的根因(保留"未识别"分类)
|
|
96
|
+
- 重要告警的关闭按钮放在卡片右上角(避免误触)
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 4. 与中性基线的差异点速查
|
|
101
|
+
|
|
102
|
+
| 维度 | 中性基线 | uni-manager 扩展 |
|
|
103
|
+
|------|---------|------------------|
|
|
104
|
+
| Step 1 关键词 | 6 类页面(List/Detail/Form/Wizard/Dashboard/Dialog) | + AI 场景 A-G 关键词表(见 `ai-scenarios.md`) |
|
|
105
|
+
| Step 2 壳层 | 标准 / 简化 / 嵌入 | + Cockpit / Topology |
|
|
106
|
+
| 危险操作 | AlertDialog 二次确认 | + L1/L2/L3 分级 + 资源名校验(见 `danger-ops.md`) |
|
|
107
|
+
| 装饰背景 | 普通页面禁渐变 | Cockpit / 营销 / AI 卡片有特殊许可(变体内) |
|
|
108
|
+
| 动效 | 4 档时长 | + AI 场景 A-G 动效组合(见 variant 的 `motion-scenarios.md`) |
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# 高危操作模式(uni-manager)
|
|
2
|
+
|
|
3
|
+
> 中性基线 `boundaries.md` 已规定"危险操作必须二次确认"。本文件追加云资源管理领域的高危操作分级与具体 UI 模式。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 高危操作分级
|
|
8
|
+
|
|
9
|
+
| 级别 | 类型示例 | 必备 UI |
|
|
10
|
+
|------|---------|---------|
|
|
11
|
+
| **L1 普通破坏** | 停止实例、解绑 SLB、撤销变更 | AlertDialog 默认 variant + 列出资源 ID |
|
|
12
|
+
| **L2 不可恢复** | 释放实例、删除快照、删除数据库 | AlertDialog `variant="destructive"` + 影响范围列表 + 5+ 关联资源展示 |
|
|
13
|
+
| **L3 跨域影响** | 跨区迁移、流量切换、批量释放 ≥ 10 项 | L2 全部 + **输入资源名校验** + 操作前 dry-run 预演 |
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 2. AlertDialog 模式
|
|
18
|
+
|
|
19
|
+
### 标题(陈述句,明确动作 + 资源标识)
|
|
20
|
+
|
|
21
|
+
- ✅ "永久删除实例 i-abc123"
|
|
22
|
+
- ✅ "将 SLB lb-xyz001 的流量从主可用区切换到备可用区"
|
|
23
|
+
- ❌ "确定要删除吗?"(缺资源标识)
|
|
24
|
+
- ❌ "确认操作"(含糊)
|
|
25
|
+
|
|
26
|
+
### 正文(必须列出影响)
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
该操作将:
|
|
30
|
+
- 永久释放实例 i-abc123(ecs.g7.large)
|
|
31
|
+
- 解除 1 个 SLB 关联(lb-xyz001)
|
|
32
|
+
- 删除关联的数据盘 2 个(共 200 GiB)
|
|
33
|
+
- 该操作不可恢复
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 主操作按钮(明确措辞 + 资源 ID)
|
|
37
|
+
|
|
38
|
+
- ✅ "确认释放 i-abc123"(destructive variant)
|
|
39
|
+
- ❌ "确定"(措辞含糊)
|
|
40
|
+
- ❌ "OK"(不足以警示)
|
|
41
|
+
|
|
42
|
+
### L3 必须:资源名校验输入
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
请输入资源名称 "i-abc123" 以确认:
|
|
46
|
+
[ ]
|
|
47
|
+
[取消] [我已确认,继续] ← 输入正确前置灰
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 3. 批量高危操作
|
|
53
|
+
|
|
54
|
+
| 项数 | 处理 |
|
|
55
|
+
|------|------|
|
|
56
|
+
| ≤ 5 项 | AlertDialog 全部列出 |
|
|
57
|
+
| 6 ~ 100 项 | AlertDialog 列出前 5 项 + "及其他 N 项" + 可展开查看全部 |
|
|
58
|
+
| > 100 项 | **拒绝单次执行**;引导用户拆分批次或在 ListPage 加筛选条件 |
|
|
59
|
+
|
|
60
|
+
执行过程中:
|
|
61
|
+
|
|
62
|
+
- 显示进度("正在处理 23/100")
|
|
63
|
+
- 实时更新成功 / 失败计数
|
|
64
|
+
- 用户可中止剩余批次(已完成的不回滚)
|
|
65
|
+
- 部分失败时,失败项展开"重试" / "跳过"按钮
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 4. AI 副驾驶场景的高危操作
|
|
70
|
+
|
|
71
|
+
当 AI 通过场景 A(对话)/ 场景 C(告警诊断)建议高危操作时:
|
|
72
|
+
|
|
73
|
+
- AI **不得**直接执行 — 必须生成场景 D 的"操作确认卡"
|
|
74
|
+
- 卡片样式:`slide-up` + `gradient-border` + `pulse border (红)` 2s 循环(参见 `motion-scenarios.md` 场景 D)
|
|
75
|
+
- 卡片必须列出:资源 ID / 操作类型 / 影响范围 / 关联资源 / 取消按钮
|
|
76
|
+
- 单次对话 AI 触发的高危操作影响范围 > 10 资源 → 拒绝执行,引导走 CloudListPage
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 5. 红线(绝对禁止)
|
|
81
|
+
|
|
82
|
+
- ❌ destructive 操作的默认按钮选中状态(焦点应留在"取消")
|
|
83
|
+
- ❌ 仅靠红色按钮表达"危险"(必须 + 图标 + 文字)
|
|
84
|
+
- ❌ 在 Toast / Tooltip 内执行写操作
|
|
85
|
+
- ❌ 在命令面板(场景 B)内放删除 / 释放
|
|
86
|
+
- ❌ AI 跳过 D 场景直接执行写操作
|
|
87
|
+
- ❌ AlertDialog 关闭后不留操作日志(必须留痕)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teamix-evo-manage
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
Manage the teamix-evo toolkit lifecycle inside the current project — install, initialize, update, list, or uninstall design / skills / ui / biz-ui / templates packages.
|
|
5
|
+
TRIGGER when: user runs or asks about CLI commands `teamix-evo design init|update|list|list-variants|uninstall`, `teamix-evo skills add|update|list|uninstall|sync|doctor`, `teamix-evo ui init|add|list`, `teamix-evo biz-ui add|list-variants`, `teamix-evo templates add|list-variants`; phrases like "init teamix-evo"、"set up the design system"、"装一下 teamix-evo"、"升级 teamix-evo"、"卸载 teamix-evo"、"看看装了哪些 teamix-evo 资源"、"加业务组件"、"加页面模板"; user touches `.teamix-evo/config.json` or `.teamix-evo/manifest.json`.
|
|
6
|
+
SKIP: any content task — generating components, pages, services, or reviewing screens; changes to `src/` files, design tokens, or business logic. Those go to teamix-evo-coding-conventions or teamix-evo-design-rules. SKIP if the user is mid-flow inside an already-initialized project asking to "新增页面 / 加按钮 / 调接口" — that's coding work, not lifecycle. SKIP placeholder→real UI migration ("升级 UI"、"接入真组件"、"replace placeholders") — that's owned by teamix-evo-ui-upgrade.
|
|
7
|
+
Coordinates with: teamix-evo-ui-upgrade (hand off the placeholder migration loop after `ui add` is in place); otherwise lifecycle is the entry point and precedes content skills rather than co-triggering.
|
|
4
8
|
---
|
|
5
9
|
|
|
6
10
|
# teamix-evo-manage
|
|
@@ -27,15 +31,21 @@ called `teamix-evo`. All operations are split into **package families**:
|
|
|
27
31
|
|
|
28
32
|
### Design system (`@teamix-evo/design`)
|
|
29
33
|
|
|
30
|
-
| Goal
|
|
31
|
-
|
|
|
32
|
-
| Initialize
|
|
33
|
-
|
|
|
34
|
-
| List installed
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
34
|
+
| Goal | Command |
|
|
35
|
+
| ----------------- | -------------------------------------------------------- |
|
|
36
|
+
| Initialize | `npx teamix-evo design init <variant>` |
|
|
37
|
+
| List variants | `npx teamix-evo design list-variants` |
|
|
38
|
+
| List installed | `npx teamix-evo design list` |
|
|
39
|
+
| Update resources | `npx teamix-evo design update` *(stub — see ADR 0019)* |
|
|
40
|
+
| Uninstall | `npx teamix-evo design uninstall [-y] [--keep-files]` |
|
|
41
|
+
|
|
42
|
+
- **`<variant>` is required.** No default — you MUST ask the user which
|
|
43
|
+
business variant (e.g. `opentrek`, `uni-manager`) before running init.
|
|
44
|
+
Run `npx teamix-evo design list-variants` to enumerate available variants.
|
|
45
|
+
- `design update` is currently a stub; the documented escape hatch is to
|
|
46
|
+
clean `.teamix-evo/design/` and re-run `design init <variant>` (full
|
|
47
|
+
semantic upgrade flow scheduled for v0.7 per ADR 0019).
|
|
48
|
+
- Tailwind: v4 only (v3 retired in v0.7).
|
|
39
49
|
- Resources marked `frozen` / `regenerable` are physical files; `managed`
|
|
40
50
|
files use embedded regions (`<!-- teamix-evo:managed:start id="..." -->`)
|
|
41
51
|
so the user's custom edits survive updates.
|
|
@@ -73,18 +83,66 @@ recognized by Qoder) under `<base>/skills/<name>/SKILL.md`. Update strategy is
|
|
|
73
83
|
`managed`, so the user's edits inside SKILL.md outside of the marked regions
|
|
74
84
|
are preserved on `update`.
|
|
75
85
|
|
|
86
|
+
The source-mirror model (ADR 0013) keeps a canonical copy under
|
|
87
|
+
`.teamix-evo/skills/` and writes IDE-specific mirrors to `.qoder/skills/` and
|
|
88
|
+
`.claude/skills/`. Two diagnostic commands ride on top:
|
|
89
|
+
|
|
90
|
+
- `npx teamix-evo skills doctor` — detect drift between source and mirrors.
|
|
91
|
+
- `npx teamix-evo skills sync [name...]` — re-mirror the source to all
|
|
92
|
+
configured IDEs (drift recovery, no version bump).
|
|
93
|
+
|
|
94
|
+
### UI components (`@teamix-evo/ui`)
|
|
95
|
+
|
|
96
|
+
| Goal | Command |
|
|
97
|
+
| -------------- | ---------------------------------------- |
|
|
98
|
+
| Initialize | `npx teamix-evo ui init [-y]` |
|
|
99
|
+
| Add entries | `npx teamix-evo ui add <id...>` |
|
|
100
|
+
| List entries | `npx teamix-evo ui list [--installed]` |
|
|
101
|
+
|
|
102
|
+
- `ui init` is interactive by default (aliases / iconLibrary / tsx / rsc).
|
|
103
|
+
Pass `-y` to accept defaults.
|
|
104
|
+
- `ui add` auto-resolves `registryDependencies` and writes component
|
|
105
|
+
source under `src/components/ui/<id>.tsx` (frozen). Reports the npm
|
|
106
|
+
packages that still need `pnpm add`.
|
|
107
|
+
- There is **no `ui upgrade` subcommand** — the placeholder→real component
|
|
108
|
+
migration is owned by the `teamix-evo-ui-upgrade` skill (it drives the
|
|
109
|
+
loop and calls `ui add` under the hood).
|
|
110
|
+
|
|
111
|
+
### Variant-aware business UI (`@teamix-evo/biz-ui`)
|
|
112
|
+
|
|
113
|
+
| Goal | Command |
|
|
114
|
+
| -------------- | ------------------------------------------------------------- |
|
|
115
|
+
| List variants | `npx teamix-evo biz-ui list-variants` |
|
|
116
|
+
| Add entries | `npx teamix-evo biz-ui add <id...> --variant <name>` |
|
|
117
|
+
|
|
118
|
+
- **`--variant <name>` is required** for `biz-ui add` (no auto-detect from
|
|
119
|
+
`design init` yet). Run `list-variants` first to enumerate.
|
|
120
|
+
- Per ADR 0014, `design` / `biz-ui` / `templates` **share one variant-name
|
|
121
|
+
space**: the variant you picked at `design init` time is the one to pass
|
|
122
|
+
here (e.g. `opentrek`).
|
|
123
|
+
|
|
124
|
+
### Variant-aware page templates (`@teamix-evo/templates`)
|
|
125
|
+
|
|
126
|
+
| Goal | Command |
|
|
127
|
+
| -------------- | ---------------------------------------------------------------- |
|
|
128
|
+
| List variants | `npx teamix-evo templates list-variants` |
|
|
129
|
+
| Add entries | `npx teamix-evo templates add <id...> --variant <name>` |
|
|
130
|
+
|
|
131
|
+
- Same `--variant` rule as `biz-ui` (ADR 0014 — shared variant-name space).
|
|
132
|
+
- Writes page-template source under `src/templates/<id>.tsx` (frozen).
|
|
133
|
+
|
|
76
134
|
## Workflow you should follow
|
|
77
135
|
|
|
78
136
|
1. **Detect intent.** Confirm which package family the user wants to touch
|
|
79
|
-
(design
|
|
80
|
-
2. **Check current state.** Suggest running `npx teamix-evo design list
|
|
81
|
-
`npx teamix-evo skills list` to see what's
|
|
82
|
-
changing anything.
|
|
137
|
+
(design / skills / ui / biz-ui / templates — or several).
|
|
138
|
+
2. **Check current state.** Suggest running `npx teamix-evo design list`,
|
|
139
|
+
`npx teamix-evo skills list`, and `npx teamix-evo ui list` to see what's
|
|
140
|
+
already installed before changing anything.
|
|
83
141
|
3. **Run the smallest correct command.** Prefer the dedicated lifecycle
|
|
84
142
|
subcommand. Avoid hand-crafted file edits inside `.qoder/`, `.claude/`, or
|
|
85
143
|
`.teamix-evo/` — let the CLI write through.
|
|
86
144
|
4. **Report and verify.** After running, summarize what changed (files
|
|
87
|
-
touched, version, IDE, scope) and re-run `list` if useful.
|
|
145
|
+
touched, version, IDE, scope, variant) and re-run `list` if useful.
|
|
88
146
|
|
|
89
147
|
## Configuration files (informational)
|
|
90
148
|
|
|
@@ -105,31 +163,13 @@ asks; recommend the CLI subcommand instead.
|
|
|
105
163
|
- A skill's `description` is the AI trigger contract — keep it specific and
|
|
106
164
|
scenario-rich when editing.
|
|
107
165
|
|
|
108
|
-
##
|
|
109
|
-
|
|
110
|
-
Projects scaffolded by `npm create teamix-evo
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
**When the user asks to "upgrade UI", "replace placeholders", "接入真组件"**:
|
|
117
|
-
|
|
118
|
-
1. Read `.teamix-evo/create/pending-ui.json` to know which component IDs are
|
|
119
|
-
pending and where the placeholder files live.
|
|
120
|
-
2. For each pending component, run `npx teamix-evo ui add <id>` (e.g.
|
|
121
|
-
`card`, `input`, `form`, `table`). This writes the real implementation to
|
|
122
|
-
`src/components/ui/<id>.tsx`.
|
|
123
|
-
3. Update import sites: replace `@/components/_placeholder/<Name>` with
|
|
124
|
-
`@/components/ui/<id>` and adapt the API surface as needed (the real
|
|
125
|
-
shadcn-style components may have a different signature).
|
|
126
|
-
4. Delete the placeholder file once all references are migrated.
|
|
127
|
-
5. Remove the corresponding entry from `.teamix-evo/create/pending-ui.json`
|
|
128
|
-
(or delete the file if `pendingComponents` becomes empty).
|
|
129
|
-
|
|
130
|
-
Grep for `@teamix-evo:placeholder` to discover any remaining placeholders.
|
|
131
|
-
Never leave placeholders in production builds — they are intentionally
|
|
132
|
-
minimal and unstyled.
|
|
166
|
+
## Placeholder → real UI upgrade
|
|
167
|
+
|
|
168
|
+
Projects scaffolded by `npm create teamix-evo` (the default — and currently
|
|
169
|
+
only — preset is `console`) ship with `_placeholder/` components and a
|
|
170
|
+
`.teamix-evo/create/pending-ui.json` file. The migration loop is owned by the
|
|
171
|
+
[`teamix-evo-ui-upgrade`](../teamix-evo-ui-upgrade/SKILL.md) skill — defer to
|
|
172
|
+
it when the user asks to "升级 UI"、"接入真组件"、"replace placeholders".
|
|
133
173
|
|
|
134
174
|
<!-- teamix-evo:managed:end id="core" -->
|
|
135
175
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teamix-evo-ui-upgrade
|
|
3
|
+
description: |
|
|
4
|
+
Replace `_placeholder/` UI components with real `@teamix-evo/ui` registry entries in projects scaffolded by `npm create teamix-evo -- --preset console`.
|
|
5
|
+
TRIGGER when: user asks to "升级 UI"、"接入真组件"、"替换 placeholder"、"upgrade UI"、"replace placeholders"、"swap in real components"、"make the UI real"; user opens / edits a file under `src/components/_placeholder/**`; project contains `.teamix-evo/create/pending-ui.json`; literal `@teamix-evo:placeholder` tag appears in a file the user is touching.
|
|
6
|
+
SKIP: project has no `.teamix-evo/create/pending-ui.json` (placeholders already cleared or never installed); user wants to add a NEW component that isn't on the pending list (defer to teamix-evo-coding-conventions); user is editing component internals, not migrating; user is initializing / updating teamix-evo itself (defer to teamix-evo-manage).
|
|
7
|
+
Coordinates with: teamix-evo-coding-conventions (touch only when migrating import sites — file placement and reuse rules apply); teamix-evo-manage (uses `teamix-evo ui add` under the hood — but this skill drives the migration loop).
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# teamix-evo-ui-upgrade
|
|
11
|
+
|
|
12
|
+
This skill drives the **placeholder → real component** migration for projects scaffolded by `npm create teamix-evo -- --preset console`. The console preset ships intentionally minimal `_placeholder/` components so the project compiles before any real `@teamix-evo/ui` install. This skill replaces them one by one.
|
|
13
|
+
|
|
14
|
+
<!-- teamix-evo:managed:start id="core" -->
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
Activate when the user wants to **swap in real UI components** for the placeholders shipped by the console preset. Common signals:
|
|
19
|
+
|
|
20
|
+
- "升级 UI"、"接入真组件"、"替换 placeholder"
|
|
21
|
+
- "upgrade UI" / "replace placeholders" / "swap in real components"
|
|
22
|
+
- The user opens a file under `src/components/_placeholder/` and asks to evolve it.
|
|
23
|
+
- The grep `@teamix-evo:placeholder` returns hits in code the user is editing.
|
|
24
|
+
- `.teamix-evo/create/pending-ui.json` exists with non-empty `pendingComponents`.
|
|
25
|
+
|
|
26
|
+
## What this skill does
|
|
27
|
+
|
|
28
|
+
A 5-step loop, repeated for each pending component:
|
|
29
|
+
|
|
30
|
+
1. **Read** [`.teamix-evo/create/pending-ui.json`](.teamix-evo/create/pending-ui.json) to get the `pendingComponents` list. Each entry names the component id (e.g. `card`, `input`, `form`, `table`) and its current placeholder file path.
|
|
31
|
+
2. **Install the real component** via the CLI: `npx teamix-evo ui add <id>`. This writes the canonical implementation to `src/components/ui/<id>.tsx`. Per [ADR 0006](../../../docs/adr/0006-ui-upgrade-no-baseline.md), no baseline diff is performed — the real component overrides verbatim.
|
|
32
|
+
3. **Migrate import sites.** Replace `@/components/_placeholder/<Name>` with `@/components/ui/<id>`. The real component's API surface may differ from the placeholder (different prop names, new required props, slot shape changes); adjust each call site to match. Do NOT silence type errors — the prop API is intentional, not noise.
|
|
33
|
+
4. **Delete the placeholder file** once all references migrated. Verify by grepping for the old path returns zero hits.
|
|
34
|
+
5. **Update** `.teamix-evo/create/pending-ui.json`: remove the migrated entry. If `pendingComponents` becomes empty, delete the file entirely.
|
|
35
|
+
|
|
36
|
+
Repeat until no `pending-ui.json` remains. Then grep for the literal tag `@teamix-evo:placeholder` once more — any remaining hit is a stray placeholder that should also be migrated or deleted.
|
|
37
|
+
|
|
38
|
+
## Inputs the user provides
|
|
39
|
+
|
|
40
|
+
- Optional: a specific component id to start with (`card`, `input`, ...). When unspecified, default to processing in the order `pending-ui.json` records.
|
|
41
|
+
- Optional: opt-out — if the user explicitly wants to keep a placeholder, mark it in the user-owned area below and skip on subsequent runs.
|
|
42
|
+
|
|
43
|
+
## Outputs
|
|
44
|
+
|
|
45
|
+
- Real `@teamix-evo/ui` components installed under `src/components/ui/`.
|
|
46
|
+
- Old placeholder files removed.
|
|
47
|
+
- Import sites updated (no `_placeholder/` references remain).
|
|
48
|
+
- `pending-ui.json` shrunk or deleted.
|
|
49
|
+
- Per-component migration note in your response: which API surface diverged, which call sites changed.
|
|
50
|
+
|
|
51
|
+
## Cautions
|
|
52
|
+
|
|
53
|
+
- The placeholder file ships with **`@teamix-evo:placeholder`** at the top — never leave that tag in production code, it is a literal canary.
|
|
54
|
+
- Real components may bring new dependencies; the CLI handles npm installs. Re-run typecheck after each component migration; fix the migration before moving to the next.
|
|
55
|
+
- Form / Table / DataTable components may require Provider wiring (e.g. `FormProvider`, `useReactTable`). Fix the wiring at the consumer site rather than wrapping it back into `_placeholder/`.
|
|
56
|
+
|
|
57
|
+
## Files in this skill
|
|
58
|
+
|
|
59
|
+
| File | Purpose |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| _(none — this skill is fully procedural; no sub-files)_ | |
|
|
62
|
+
|
|
63
|
+
## Relationship to other skills
|
|
64
|
+
|
|
65
|
+
- [`teamix-evo-coding-conventions`](../teamix-evo-coding-conventions/SKILL.md) — when a migration creates new files (provider, hook, type), apply file-placement and reuse-first rules from there.
|
|
66
|
+
- [`teamix-evo-manage`](../teamix-evo-manage/SKILL.md) — the CLI verbs (`ui add`, `update`) come from there; this skill is the orchestration loop.
|
|
67
|
+
- `teamix-evo-design-rules` — only relevant when the migration also reshapes the page layout (e.g. swapping a placeholder Table forces a list-page redesign).
|
|
68
|
+
|
|
69
|
+
<!-- teamix-evo:managed:end id="core" -->
|
|
70
|
+
|
|
71
|
+
## Project notes
|
|
72
|
+
|
|
73
|
+
> Free-form notes the user can add — CLI update will not overwrite below this section.
|
|
74
|
+
|
|
75
|
+
(empty)
|