@teamix-evo/skills 0.3.0 → 0.4.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/manifest.json +61 -45
- package/package.json +2 -2
- package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/SKILL.md +18 -18
- package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/checklist.md +2 -2
- package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/reuse-first.md +25 -17
- package/src/teamix-evo-code-uni-manager/SKILL.md +95 -0
- package/src/teamix-evo-code-uni-manager/api-layering.md +370 -0
- package/src/teamix-evo-code-uni-manager/checklist.md +193 -0
- package/src/teamix-evo-code-uni-manager/error-and-loading.md +389 -0
- package/src/teamix-evo-code-uni-manager/file-structure.md +339 -0
- package/src/teamix-evo-code-uni-manager/forms-and-validation.md +459 -0
- package/src/teamix-evo-code-uni-manager/reuse-first.md +188 -0
- package/src/teamix-evo-code-uni-manager/routing-and-codesplit.md +450 -0
- package/src/teamix-evo-code-uni-manager/testing.md +396 -0
- package/src/teamix-evo-design-opentrek/SKILL.md +71 -0
- package/src/teamix-evo-design-opentrek/boundaries.md +513 -0
- package/src/teamix-evo-design-opentrek/brand.md +154 -0
- package/src/teamix-evo-design-opentrek/checklist.md +83 -0
- package/src/teamix-evo-design-opentrek/components.md +245 -0
- package/src/teamix-evo-design-opentrek/flows.md +51 -0
- package/src/teamix-evo-design-opentrek/foundations.md +271 -0
- package/src/teamix-evo-design-opentrek/generation-flow.md +185 -0
- package/src/teamix-evo-design-opentrek/patterns/dashboard.md +31 -0
- package/src/teamix-evo-design-opentrek/patterns/detail-page.md +202 -0
- package/src/teamix-evo-design-opentrek/patterns/form-page.md +289 -0
- package/src/teamix-evo-design-opentrek/patterns/list-page.md +334 -0
- package/src/teamix-evo-design-opentrek/patterns/page-types.md +154 -0
- package/src/teamix-evo-design-opentrek/philosophy.md +96 -0
- package/src/teamix-evo-design-opentrek/rules/README.md +39 -0
- package/src/teamix-evo-design-opentrek/rules/boundaries.rules.json +391 -0
- package/src/teamix-evo-design-uni-manager/SKILL.md +73 -0
- package/src/teamix-evo-design-uni-manager/boundaries.md +564 -0
- package/src/teamix-evo-design-uni-manager/brand.md +202 -0
- package/src/teamix-evo-design-uni-manager/checklist.md +115 -0
- package/src/teamix-evo-design-uni-manager/components.md +254 -0
- package/src/teamix-evo-design-uni-manager/flows.md +63 -0
- package/src/teamix-evo-design-uni-manager/foundations.md +258 -0
- package/src/teamix-evo-design-uni-manager/generation-flow.md +194 -0
- package/src/teamix-evo-design-uni-manager/patterns/dashboard.md +95 -0
- package/src/teamix-evo-design-uni-manager/patterns/detail-page.md +224 -0
- package/src/teamix-evo-design-uni-manager/patterns/form-page.md +329 -0
- package/src/teamix-evo-design-uni-manager/patterns/list-page.md +356 -0
- package/src/teamix-evo-design-uni-manager/patterns/page-types.md +165 -0
- package/src/teamix-evo-design-uni-manager/philosophy.md +106 -0
- package/src/teamix-evo-design-uni-manager/rules/README.md +49 -0
- package/src/teamix-evo-design-uni-manager/rules/boundaries.rules.json +418 -0
- package/src/teamix-evo-manage/SKILL.md +281 -0
- package/skills/teamix-evo-design-rules/SKILL.md +0 -86
- package/skills/teamix-evo-design-rules/boundaries.md +0 -89
- package/skills/teamix-evo-design-rules/checklist.md +0 -108
- package/skills/teamix-evo-design-rules/generation-flow.md +0 -142
- package/skills/teamix-evo-design-rules/prompts/page-design.md +0 -148
- package/skills/teamix-evo-design-rules-opentrek/SKILL.md +0 -48
- package/skills/teamix-evo-design-rules-opentrek/brand-rules.md +0 -74
- package/skills/teamix-evo-design-rules-uni-manager/SKILL.md +0 -51
- package/skills/teamix-evo-design-rules-uni-manager/ai-scenarios.md +0 -51
- package/skills/teamix-evo-design-rules-uni-manager/command-center.md +0 -108
- package/skills/teamix-evo-design-rules-uni-manager/danger-ops.md +0 -87
- package/skills/teamix-evo-manage/SKILL.md +0 -178
- package/skills/teamix-evo-ui-upgrade/SKILL.md +0 -75
- /package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/api-layering.md +0 -0
- /package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/error-and-loading.md +0 -0
- /package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/file-structure.md +0 -0
- /package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/forms-and-validation.md +0 -0
- /package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/routing-and-codesplit.md +0 -0
- /package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/testing.md +0 -0
|
@@ -1,87 +0,0 @@
|
|
|
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,178 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: teamix-evo-manage
|
|
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.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# teamix-evo-manage
|
|
11
|
-
|
|
12
|
-
This skill helps the user manage the **teamix-evo** toolkit lifecycle inside their project.
|
|
13
|
-
|
|
14
|
-
<!-- teamix-evo:managed:start id="core" -->
|
|
15
|
-
|
|
16
|
-
## When to use
|
|
17
|
-
|
|
18
|
-
Activate when the user wants to **install / update / inspect / remove** any
|
|
19
|
-
teamix-evo package — typically the design system (`@teamix-evo/design`) or the
|
|
20
|
-
skills package (`@teamix-evo/skills`). Common signals:
|
|
21
|
-
|
|
22
|
-
- "帮我初始化 teamix-evo 设计体系" / "set up @teamix-evo/design"
|
|
23
|
-
- "升级 teamix-evo" / "update teamix-evo skills"
|
|
24
|
-
- "卸载 teamix-evo" / "remove the design system"
|
|
25
|
-
- "看看装了哪些 teamix-evo 资源"
|
|
26
|
-
|
|
27
|
-
## What you can do for the user
|
|
28
|
-
|
|
29
|
-
The CLI binary is `teamix-evo` (bin name), backed by the npm package also
|
|
30
|
-
called `teamix-evo`. All operations are split into **package families**:
|
|
31
|
-
|
|
32
|
-
### Design system (`@teamix-evo/design`)
|
|
33
|
-
|
|
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).
|
|
49
|
-
- Resources marked `frozen` / `regenerable` are physical files; `managed`
|
|
50
|
-
files use embedded regions (`<!-- teamix-evo:managed:start id="..." -->`)
|
|
51
|
-
so the user's custom edits survive updates.
|
|
52
|
-
|
|
53
|
-
### Skills (`@teamix-evo/skills`)
|
|
54
|
-
|
|
55
|
-
| Goal | Command |
|
|
56
|
-
| -------------- | ----------------------------------------- |
|
|
57
|
-
| Add (all) | `npx teamix-evo skills add` |
|
|
58
|
-
| Add (one+) | `npx teamix-evo skills add <name...>` |
|
|
59
|
-
| List (all) | `npx teamix-evo skills list` (alias `ls`) |
|
|
60
|
-
| List installed | `npx teamix-evo skills list --installed` |
|
|
61
|
-
| Update | `npx teamix-evo skills update` |
|
|
62
|
-
| Uninstall | `npx teamix-evo skills uninstall [-y]` |
|
|
63
|
-
|
|
64
|
-
`skills add` modes:
|
|
65
|
-
|
|
66
|
-
- **Bulk** (no positional args): installs every skill declared in the
|
|
67
|
-
manifest. On a project that already has a skills package installed, returns
|
|
68
|
-
`already-added`.
|
|
69
|
-
- **Incremental** (one or more skill ids): only installs the listed skills.
|
|
70
|
-
Skills already present are skipped (use `skills update` to refresh). When the
|
|
71
|
-
project already has a skills config, `--ide` / `--scope` may be omitted —
|
|
72
|
-
they default to the previously chosen values.
|
|
73
|
-
|
|
74
|
-
`skills add` is interactive (only when no prior config and no flags):
|
|
75
|
-
|
|
76
|
-
1. Multi-select target IDE(s): **Qoder** and/or **Claude Code** (default both,
|
|
77
|
-
at least one required). Non-interactive equivalent: `--ide qoder,claude`.
|
|
78
|
-
2. Scope: **project** (default; `.qoder/.claude` in cwd) or **global**
|
|
79
|
-
(`~/.qoder/~/.claude`). Non-interactive: `--scope project|global`.
|
|
80
|
-
|
|
81
|
-
Skills are installed as `SKILL.md` (Anthropic-compatible frontmatter, also
|
|
82
|
-
recognized by Qoder) under `<base>/skills/<name>/SKILL.md`. Update strategy is
|
|
83
|
-
`managed`, so the user's edits inside SKILL.md outside of the marked regions
|
|
84
|
-
are preserved on `update`.
|
|
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
|
-
|
|
134
|
-
## Workflow you should follow
|
|
135
|
-
|
|
136
|
-
1. **Detect intent.** Confirm which package family the user wants to touch
|
|
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.
|
|
141
|
-
3. **Run the smallest correct command.** Prefer the dedicated lifecycle
|
|
142
|
-
subcommand. Avoid hand-crafted file edits inside `.qoder/`, `.claude/`, or
|
|
143
|
-
`.teamix-evo/` — let the CLI write through.
|
|
144
|
-
4. **Report and verify.** After running, summarize what changed (files
|
|
145
|
-
touched, version, IDE, scope, variant) and re-run `list` if useful.
|
|
146
|
-
|
|
147
|
-
## Configuration files (informational)
|
|
148
|
-
|
|
149
|
-
- `<projectRoot>/.teamix-evo/config.json` — declares which packages are
|
|
150
|
-
installed, their versions, IDE selection and scope.
|
|
151
|
-
- `<projectRoot>/.teamix-evo/manifest.json` — installed-resource ledger;
|
|
152
|
-
CLI uses it for diffing and uninstalling.
|
|
153
|
-
|
|
154
|
-
Both are **owned by the CLI**. Don't edit by hand unless the user explicitly
|
|
155
|
-
asks; recommend the CLI subcommand instead.
|
|
156
|
-
|
|
157
|
-
## Common pitfalls
|
|
158
|
-
|
|
159
|
-
- The CLI must be run from the project root (where `.teamix-evo/` lives or
|
|
160
|
-
will be created).
|
|
161
|
-
- For `design uninstall`, `managed` files are kept by default to protect user
|
|
162
|
-
edits. Use `--keep-files` to keep everything (only updates the ledger).
|
|
163
|
-
- A skill's `description` is the AI trigger contract — keep it specific and
|
|
164
|
-
scenario-rich when editing.
|
|
165
|
-
|
|
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".
|
|
173
|
-
|
|
174
|
-
<!-- teamix-evo:managed:end id="core" -->
|
|
175
|
-
|
|
176
|
-
## Notes for the user
|
|
177
|
-
|
|
178
|
-
> 这部分内容由你自由编辑。CLI 升级时只会替换 `id="core"` 区段,不会动这里的笔记。
|
|
@@ -1,75 +0,0 @@
|
|
|
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)
|
/package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/api-layering.md
RENAMED
|
File without changes
|
/package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/error-and-loading.md
RENAMED
|
File without changes
|
/package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/file-structure.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|