@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
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://teamix-evo.dev/schema/skills-package/v1.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
4
|
"package": "skills",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.3.0",
|
|
6
6
|
"engines": {
|
|
7
7
|
"teamix-evo": ">=0.1.0"
|
|
8
8
|
},
|
|
@@ -10,69 +10,85 @@
|
|
|
10
10
|
{
|
|
11
11
|
"id": "teamix-evo-manage",
|
|
12
12
|
"name": "teamix-evo-manage",
|
|
13
|
-
"description": "
|
|
14
|
-
"version": "0.
|
|
15
|
-
"source": "
|
|
16
|
-
"ides": [
|
|
13
|
+
"description": "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`.\nTRIGGER 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`.\nSKIP: 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`.\nCoordinates 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.",
|
|
14
|
+
"version": "0.2.0",
|
|
15
|
+
"source": "src/teamix-evo-manage",
|
|
16
|
+
"ides": [
|
|
17
|
+
"qoder",
|
|
18
|
+
"claude"
|
|
19
|
+
],
|
|
17
20
|
"updateStrategy": "managed",
|
|
18
|
-
"managedRegions": [
|
|
21
|
+
"managedRegions": [
|
|
22
|
+
"core"
|
|
23
|
+
],
|
|
19
24
|
"template": false
|
|
20
25
|
},
|
|
21
26
|
{
|
|
22
|
-
"id": "teamix-evo-design-
|
|
23
|
-
"name": "teamix-evo-design-
|
|
24
|
-
"description": "Apply
|
|
25
|
-
"version": "0.
|
|
26
|
-
"source": "
|
|
27
|
-
"
|
|
27
|
+
"id": "teamix-evo-design-opentrek",
|
|
28
|
+
"name": "teamix-evo-design-opentrek",
|
|
29
|
+
"description": "Apply OpenTrek design system rules (philosophy, patterns, page-types, brand tone/voice, visual foundations) when AI generates or reviews a full UI screen / page in an OpenTrek-variant project.\nTRIGGER when: user asks to \"新建 / 优化 / 重构 一个页面\"、\"做一个列表页 / 详情页 / 表单页 / 仪表盘\"、\"create / review / refactor a page、screen、dashboard、template\"; intent involves layout structure, page-level information density, or multi-component composition; file write under `src/pages/**` or `src/templates/**`.\nSKIP: 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).\nCoordinates with: teamix-evo-code-opentrek (run alongside when the screen also creates new files).",
|
|
30
|
+
"version": "0.2.0",
|
|
31
|
+
"source": "src/teamix-evo-design-opentrek",
|
|
32
|
+
"variant": "opentrek",
|
|
33
|
+
"ides": [
|
|
34
|
+
"qoder",
|
|
35
|
+
"claude"
|
|
36
|
+
],
|
|
28
37
|
"updateStrategy": "managed",
|
|
29
|
-
"managedRegions": [
|
|
38
|
+
"managedRegions": [
|
|
39
|
+
"core"
|
|
40
|
+
],
|
|
30
41
|
"template": false
|
|
31
42
|
},
|
|
32
43
|
{
|
|
33
|
-
"id": "teamix-evo-
|
|
34
|
-
"name": "teamix-evo-
|
|
35
|
-
"description": "
|
|
36
|
-
"version": "0.
|
|
37
|
-
"source": "
|
|
44
|
+
"id": "teamix-evo-code-opentrek",
|
|
45
|
+
"name": "teamix-evo-code-opentrek",
|
|
46
|
+
"description": "Enforce teamix-evo coding conventions in OpenTrek-variant consumer apps — reuse-first against `@teamix-evo/ui` registry, API code under `src/services/`, `src/` layering and import boundaries.\nTRIGGER when: user asks to \"新增 / 重构 / 写一个\" 组件 / 页面 / 接口 / 钩子 / 工具 / hook; phrases like \"create a CRUD page\"、\"add an API call\"、\"extract a hook\"、\"refactor this fetch\"、\"调一下接口\"、\"加个组件\"、\"加个按钮\"; file write under `src/pages/**`、`src/components/**`、`src/services/**`、`src/hooks/**`; AI is about to write any new `.tsx` / `.ts` file in a teamix-evo-installed project.\nSKIP: pure visual / layout design questions about an already-existing screen with no code change (defer to teamix-evo-design-opentrek); teamix-evo lifecycle (init / update / uninstall) — those go to teamix-evo-manage; changes only to design tokens / styles / theme — those go to ESLint and `tokens.overrides.css`.\nCoordinates with: teamix-evo-design-opentrek (run alongside when the change also creates a UI screen — design handles the visual side, this skill handles file placement and reuse).",
|
|
47
|
+
"version": "0.2.0",
|
|
48
|
+
"source": "src/teamix-evo-code-opentrek",
|
|
38
49
|
"variant": "opentrek",
|
|
39
|
-
"ides": [
|
|
50
|
+
"ides": [
|
|
51
|
+
"qoder",
|
|
52
|
+
"claude"
|
|
53
|
+
],
|
|
40
54
|
"updateStrategy": "managed",
|
|
41
|
-
"managedRegions": [
|
|
55
|
+
"managedRegions": [
|
|
56
|
+
"core"
|
|
57
|
+
],
|
|
42
58
|
"template": false
|
|
43
59
|
},
|
|
44
60
|
{
|
|
45
|
-
"id": "teamix-evo-design-
|
|
46
|
-
"name": "teamix-evo-design-
|
|
47
|
-
"description": "Apply
|
|
48
|
-
"version": "0.
|
|
49
|
-
"source": "
|
|
61
|
+
"id": "teamix-evo-design-uni-manager",
|
|
62
|
+
"name": "teamix-evo-design-uni-manager",
|
|
63
|
+
"description": "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).\nTRIGGER when: user asks to \"新建 / 优化 / 重构 一个页面\"、\"做一个列表页 / 详情页 / 表单页 / 仪表盘 / 控制台首页\"、\"create / review / refactor a page、screen、dashboard、console、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/**`.\nSKIP: 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).\nCoordinates with: teamix-evo-code-uni-manager (run alongside when the screen also creates new files).",
|
|
64
|
+
"version": "0.2.0",
|
|
65
|
+
"source": "src/teamix-evo-design-uni-manager",
|
|
50
66
|
"variant": "uni-manager",
|
|
51
|
-
"ides": [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"id": "teamix-evo-ui-upgrade",
|
|
58
|
-
"name": "teamix-evo-ui-upgrade",
|
|
59
|
-
"description": "Replace `_placeholder/` UI components with real `@teamix-evo/ui` registry entries in projects scaffolded by `npm create teamix-evo -- --preset console`.\nTRIGGER 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.\nSKIP: 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).\nCoordinates 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).",
|
|
60
|
-
"version": "0.1.0",
|
|
61
|
-
"source": "skills/teamix-evo-ui-upgrade",
|
|
62
|
-
"ides": ["qoder", "claude"],
|
|
67
|
+
"ides": [
|
|
68
|
+
"qoder",
|
|
69
|
+
"claude"
|
|
70
|
+
],
|
|
63
71
|
"updateStrategy": "managed",
|
|
64
|
-
"managedRegions": [
|
|
72
|
+
"managedRegions": [
|
|
73
|
+
"core"
|
|
74
|
+
],
|
|
65
75
|
"template": false
|
|
66
76
|
},
|
|
67
77
|
{
|
|
68
|
-
"id": "teamix-evo-
|
|
69
|
-
"name": "teamix-evo-
|
|
70
|
-
"description": "Enforce teamix-evo coding conventions in consumer
|
|
71
|
-
"version": "0.
|
|
72
|
-
"source": "
|
|
73
|
-
"
|
|
78
|
+
"id": "teamix-evo-code-uni-manager",
|
|
79
|
+
"name": "teamix-evo-code-uni-manager",
|
|
80
|
+
"description": "Enforce teamix-evo coding conventions in uni-manager (hybrid-cloud / multi-tenant console) consumer apps — reuse-first against `@teamix-evo/ui` registry + `biz-ui/uni-manager` (um-topbar / CloudBadge), API code under `src/services/` with tenant / region context propagation, `src/` layering and import boundaries.\nTRIGGER when: user asks to \"新增 / 重构 / 写一个\" 组件 / 页面 / 接口 / 钩子 / 工具 / hook in a hybrid-cloud / 专有云 / 多租户 / 多区域 console; phrases like \"create a CRUD page\"、\"add an API call\"、\"extract a hook\"、\"refactor this fetch\"、\"调一下接口\"、\"加个组件\"、\"加个按钮\"; file write under `src/pages/**`、`src/components/**`、`src/services/**`、`src/hooks/**`; AI is about to write any new `.tsx` / `.ts` file in a teamix-evo-installed uni-manager-variant project.\nSKIP: pure visual / layout design questions about an already-existing screen with no code change (defer to teamix-evo-design-uni-manager); teamix-evo lifecycle (init / update / uninstall) — those go to teamix-evo-manage; changes only to design tokens / styles / theme — those go to ESLint and `tokens.overrides.css`.\nCoordinates with: teamix-evo-design-uni-manager (run alongside when the change also creates a UI screen — design handles the visual side, this skill handles file placement and reuse).",
|
|
81
|
+
"version": "0.2.0",
|
|
82
|
+
"source": "src/teamix-evo-code-uni-manager",
|
|
83
|
+
"variant": "uni-manager",
|
|
84
|
+
"ides": [
|
|
85
|
+
"qoder",
|
|
86
|
+
"claude"
|
|
87
|
+
],
|
|
74
88
|
"updateStrategy": "managed",
|
|
75
|
-
"managedRegions": [
|
|
89
|
+
"managedRegions": [
|
|
90
|
+
"core"
|
|
91
|
+
],
|
|
76
92
|
"template": false
|
|
77
93
|
}
|
|
78
94
|
]
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamix-evo/skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Skills (AI IDE capabilities) for Teamix Evo",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"manifest.json",
|
|
8
8
|
"_data.json",
|
|
9
|
-
"
|
|
9
|
+
"src",
|
|
10
10
|
"_template"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: teamix-evo-
|
|
2
|
+
name: teamix-evo-code-opentrek
|
|
3
3
|
description: |
|
|
4
|
-
Enforce teamix-evo coding conventions in consumer
|
|
4
|
+
Enforce teamix-evo coding conventions in OpenTrek-variant consumer apps — reuse-first against `@teamix-evo/ui` registry, API code under `src/services/`, `src/` layering and import boundaries.
|
|
5
5
|
TRIGGER when: user asks to "新增 / 重构 / 写一个" 组件 / 页面 / 接口 / 钩子 / 工具 / hook; phrases like "create a CRUD page"、"add an API call"、"extract a hook"、"refactor this fetch"、"调一下接口"、"加个组件"、"加个按钮"; file write under `src/pages/**`、`src/components/**`、`src/services/**`、`src/hooks/**`; AI is about to write any new `.tsx` / `.ts` file in a teamix-evo-installed project.
|
|
6
|
-
SKIP: pure visual / layout design questions about an already-existing screen with no code change (defer to teamix-evo-design-
|
|
7
|
-
Coordinates with: teamix-evo-design-
|
|
6
|
+
SKIP: pure visual / layout design questions about an already-existing screen with no code change (defer to teamix-evo-design-opentrek); teamix-evo lifecycle (init / update / uninstall) — those go to teamix-evo-manage; changes only to design tokens / styles / theme — those go to ESLint and `tokens.overrides.css`.
|
|
7
|
+
Coordinates with: teamix-evo-design-opentrek (run alongside when the change also creates a UI screen — design handles the visual side, this skill handles file placement and reuse).
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# teamix-evo-
|
|
10
|
+
# teamix-evo-code-opentrek
|
|
11
11
|
|
|
12
|
-
This skill bundles the **AI-readable engineering conventions** for consumer business apps that consume `@teamix-evo/*` packages. It complements [`teamix-evo-design-
|
|
12
|
+
This skill bundles the **AI-readable engineering conventions** for OpenTrek-variant consumer business apps that consume `@teamix-evo/*` packages. It complements [`teamix-evo-design-opentrek`](../teamix-evo-design-opentrek/SKILL.md) — design tells AI _what a screen should look like_; this skill tells AI _where the code should live and what to reuse before writing new code_.
|
|
13
13
|
|
|
14
14
|
<!-- teamix-evo:managed:start id="core" -->
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ Activate this skill whenever AI is about to **write or refactor code** inside a
|
|
|
25
25
|
- "add an API call to fetch users"
|
|
26
26
|
- Any time AI is about to create a new file under `src/pages/`、`src/components/`、`src/services/`、`src/hooks/`
|
|
27
27
|
|
|
28
|
-
If the task is purely about
|
|
28
|
+
If the task is purely about _visual design_ of a screen (layout / colors / spacing), use [`teamix-evo-design`](../teamix-evo-design/SKILL.md) instead — or run both in tandem.
|
|
29
29
|
|
|
30
30
|
## What this skill does
|
|
31
31
|
|
|
@@ -67,20 +67,20 @@ Before AI writes or commits code, it performs an **8-step gated flow**. Steps 1-
|
|
|
67
67
|
|
|
68
68
|
## Files in this skill
|
|
69
69
|
|
|
70
|
-
| File
|
|
71
|
-
|
|
|
72
|
-
| [`reuse-first.md`](reuse-first.md)
|
|
73
|
-
| [`file-structure.md`](file-structure.md)
|
|
74
|
-
| [`api-layering.md`](api-layering.md)
|
|
75
|
-
| [`forms-and-validation.md`](forms-and-validation.md)
|
|
76
|
-
| [`error-and-loading.md`](error-and-loading.md)
|
|
77
|
-
| [`routing-and-codesplit.md`](routing-and-codesplit.md) | `React.lazy` per page、guards、404/403/500 fallback、search-params state、Suspense placement
|
|
78
|
-
| [`testing.md`](testing.md)
|
|
79
|
-
| [`checklist.md`](checklist.md)
|
|
70
|
+
| File | Purpose |
|
|
71
|
+
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
72
|
+
| [`reuse-first.md`](reuse-first.md) | Decision flow for reusing existing components / utilities before writing new ones |
|
|
73
|
+
| [`file-structure.md`](file-structure.md) | Top-level `src/` folder layout、ownership、import boundaries、naming、global-state tier (useState → Context → store) |
|
|
74
|
+
| [`api-layering.md`](api-layering.md) | Where API code lives (`src/services/`)、how data flows from service → hook → component |
|
|
75
|
+
| [`forms-and-validation.md`](forms-and-validation.md) | `react-hook-form` + `zod` patterns、schema location、submit/error wiring |
|
|
76
|
+
| [`error-and-loading.md`](error-and-loading.md) | Global / page ErrorBoundary、react-query three-state、Suspense、toast、reportError |
|
|
77
|
+
| [`routing-and-codesplit.md`](routing-and-codesplit.md) | `React.lazy` per page、guards、404/403/500 fallback、search-params state、Suspense placement |
|
|
78
|
+
| [`testing.md`](testing.md) | `vitest` + RTL + msw、co-located tests、what is mandatory vs recommended |
|
|
79
|
+
| [`checklist.md`](checklist.md) | Multi-section self-review before declaring done |
|
|
80
80
|
|
|
81
81
|
## Relationship to other skills
|
|
82
82
|
|
|
83
|
-
- [`teamix-evo-design-
|
|
83
|
+
- [`teamix-evo-design-opentrek`](../teamix-evo-design-opentrek/SKILL.md) — visual / interaction rules for screen generation. Run **alongside** this skill when the task includes UI; this skill never overrides design on visual concerns.
|
|
84
84
|
- [`teamix-evo-manage`](../teamix-evo-manage/SKILL.md) — lifecycle (`init` / `update` / `uninstall` / `skills add`). Out of scope here.
|
|
85
85
|
|
|
86
86
|
## Why these conventions
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
|
|
125
125
|
(若改动包含 UI)
|
|
126
126
|
|
|
127
|
-
- [ ] 视觉部分按 [`teamix-evo-design-
|
|
127
|
+
- [ ] 视觉部分按 [`teamix-evo-design-opentrek`](../teamix-evo-design-opentrek/SKILL.md) 自检过 token / 间距 / 圆角 / 动效
|
|
128
128
|
- [ ] 没有硬编码颜色 / 间距 / 字号(交给 ui 包 + design token)
|
|
129
129
|
|
|
130
130
|
---
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
- 数据层: ✅ services/order.ts 纯函数;✅ hooks/useOrderList.ts 包 react-query;✅ 组件未 fetch
|
|
160
160
|
- 目录: ✅ 页面在 pages/orders/;✅ 跨页面组件在 components/
|
|
161
161
|
- 命名: ✅ kebab 目录 / Pascal 组件 / camel hook
|
|
162
|
-
- 边界: ✅ 全部走
|
|
162
|
+
- 边界: ✅ 全部走 @/\*;✅ 无反向依赖
|
|
163
163
|
- 类型: ✅ types/order.ts 集中声明
|
|
164
164
|
- 表单(若涉及): ✅ useForm + zodResolver;✅ schema 在 services/order.schema.ts
|
|
165
165
|
- 错误/加载(若涉及): ✅ 三态全处理;✅ ErrorBoundary 已在 App 根;✅ mutation toast
|
package/{skills/teamix-evo-coding-conventions → src/teamix-evo-code-opentrek}/reuse-first.md
RENAMED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
│ ├── 是 → 走 §1(查 @teamix-evo/ui 注册表)
|
|
14
14
|
│ └── 否 → 跳 Step 2
|
|
15
15
|
│
|
|
16
|
-
├── Step 2: 这是业务组件 /
|
|
17
|
-
│ ├── 是 → 走 §2(查 @teamix-evo/biz-ui
|
|
16
|
+
├── Step 2: 这是业务组件 / 页面骨架吗?
|
|
17
|
+
│ ├── 是 → 走 §2(查 @teamix-evo/biz-ui;页面骨架走 design skill 的 patterns/)
|
|
18
18
|
│ └── 否 → 跳 Step 3
|
|
19
19
|
│
|
|
20
20
|
├── Step 3: 这是工具函数 / Hook 吗?
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
|
|
40
40
|
### 命中后的处理
|
|
41
41
|
|
|
42
|
-
| 情况
|
|
43
|
-
|
|
|
44
|
-
| 注册表里有,本项目已装
|
|
45
|
-
| 注册表里有,本项目未装
|
|
42
|
+
| 情况 | 处理 |
|
|
43
|
+
| ------------------------------- | ---------------------------------------------- |
|
|
44
|
+
| 注册表里有,本项目已装 | 直接 `import` 复用,**不要复制源码** |
|
|
45
|
+
| 注册表里有,本项目未装 | 提示用户跑 `teamix-evo ui add <id>`,装机后再用 |
|
|
46
46
|
| 注册表里有近义但 props 不完全够 | **优先组合**(包一层 wrapper),不要 fork ui 源码 |
|
|
47
|
-
| 注册表里完全没有
|
|
47
|
+
| 注册表里完全没有 | 进 §4 |
|
|
48
48
|
|
|
49
49
|
### 反模式(禁止)
|
|
50
50
|
|
|
@@ -54,20 +54,28 @@
|
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
-
## §2 ·
|
|
57
|
+
## §2 · 业务组件:查 `biz-ui`(页面骨架走 design skill 的 patterns/)
|
|
58
58
|
|
|
59
|
-
| 包
|
|
60
|
-
|
|
|
59
|
+
| 包 | 用途 | 查询入口 |
|
|
60
|
+
| -------------------- | -------------------------------------- | ------------------------------------------------------ |
|
|
61
61
|
| `@teamix-evo/biz-ui` | 业务化的复合组件(变体感知 + slot 边界) | 本项目 `node_modules/@teamix-evo/biz-ui/manifest.json` |
|
|
62
|
-
|
|
62
|
+
|
|
63
|
+
### 页面骨架来源(列表 / 详情 / 表单 / 仪表盘)
|
|
64
|
+
|
|
65
|
+
> ⚠️ **AI 默认不调用 `@teamix-evo/templates` 包**(见 [ADR 0031](../../../docs/adr/0031-skill-templates-decoupling.md))。页面骨架按下列优先级生成:
|
|
66
|
+
|
|
67
|
+
1. **首选** —— 读 `teamix-evo-design-opentrek` skill 的 [`patterns/{list|detail|form|dashboard}-page.md`](../teamix-evo-design-opentrek/patterns/),按 Zone Map 与决策树用 ui 原子件 + biz-ui 业务件**直接拼装**到 `src/pages/<id>/`
|
|
68
|
+
2. **patterns/ 未覆盖时** —— 按业界流行的中后台页面架构(antd Pro / shadcn Examples 等)与用户描述自由实现,**不要回退到 templates 包**
|
|
69
|
+
3. **`@teamix-evo/templates` 包与 CLI 命令仍保留**,但仅在用户**显式**要求(如"用 templates 包的 frozen 骨架")时才走 `teamix-evo templates add`
|
|
63
70
|
|
|
64
71
|
### 决策表
|
|
65
72
|
|
|
66
|
-
| 场景
|
|
67
|
-
|
|
|
68
|
-
| 列表页 / 详情页 /
|
|
69
|
-
| "带筛选的用户表格"、"带审批流的卡片"
|
|
70
|
-
| 一次性的、强领域绑定的组合
|
|
73
|
+
| 场景 | 选择 |
|
|
74
|
+
| ------------------------------------- | --------------------------------------------------------- |
|
|
75
|
+
| 列表页 / 详情页 / 表单页 / 仪表盘骨架 | 读 design skill `patterns/*.md` → ui + biz-ui 拼装 |
|
|
76
|
+
| "带筛选的用户表格"、"带审批流的卡片" | 优先 `biz-ui` |
|
|
77
|
+
| 一次性的、强领域绑定的组合 | 写在 `src/components/<domain>/` 里,**不要污染 biz-ui** |
|
|
78
|
+
| patterns/ 未覆盖的特殊页面 | 按业界流行架构 + 用户描述自由实现,**不调用 templates 包** |
|
|
71
79
|
|
|
72
80
|
---
|
|
73
81
|
|
|
@@ -102,7 +110,7 @@
|
|
|
102
110
|
1. **命名要能让下次复用查得到** —— 起 `OrderStatusBadge` 而不是 `MyBadge`;`useOrderList` 而不是 `useList`。
|
|
103
111
|
2. **抽象层级别低于一次性页面** —— 跨页面会用的才放 `src/components/`,只在一个页面用的写在 `src/pages/<id>/_components/`。
|
|
104
112
|
3. **暴露面尽量窄** —— 默认只 `export` 这次需要的 API,别一次性 `export *`。
|
|
105
|
-
4. **写完登记** —— 在 PR 描述里明确"新增 `<path>`,因为 ui / biz-ui /
|
|
113
|
+
4. **写完登记** —— 在 PR 描述里明确"新增 `<path>`,因为 ui / biz-ui / patterns / 本项目均未提供 X 能力"(注:不再以 `templates` 包作为兜底依据,见 [ADR 0031](../../../docs/adr/0031-skill-templates-decoupling.md))。
|
|
106
114
|
|
|
107
115
|
---
|
|
108
116
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teamix-evo-code-uni-manager
|
|
3
|
+
description: |
|
|
4
|
+
Enforce teamix-evo coding conventions in uni-manager (hybrid-cloud / multi-tenant console) consumer apps — reuse-first against `@teamix-evo/ui` registry + `biz-ui/uni-manager` (um-topbar / CloudBadge), API code under `src/services/` with tenant / region context propagation, `src/` layering and import boundaries.
|
|
5
|
+
TRIGGER when: user asks to "新增 / 重构 / 写一个" 组件 / 页面 / 接口 / 钩子 / 工具 / hook in a hybrid-cloud / 专有云 / 多租户 / 多区域 console; phrases like "create a CRUD page"、"add an API call"、"extract a hook"、"refactor this fetch"、"调一下接口"、"加个组件"、"加个按钮"; file write under `src/pages/**`、`src/components/**`、`src/services/**`、`src/hooks/**`; AI is about to write any new `.tsx` / `.ts` file in a teamix-evo-installed uni-manager-variant project.
|
|
6
|
+
SKIP: pure visual / layout design questions about an already-existing screen with no code change (defer to teamix-evo-design-uni-manager); teamix-evo lifecycle (init / update / uninstall) — those go to teamix-evo-manage; changes only to design tokens / styles / theme — those go to ESLint and `tokens.overrides.css`.
|
|
7
|
+
Coordinates with: teamix-evo-design-uni-manager (run alongside when the change also creates a UI screen — design handles the visual side, this skill handles file placement and reuse).
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# teamix-evo-code-uni-manager
|
|
11
|
+
|
|
12
|
+
This skill bundles the **AI-readable engineering conventions** for **uni-manager-variant** consumer business apps — products that target hybrid-cloud / 专有云 / 多租户 / 多区域 management consoles. It complements [`teamix-evo-design-uni-manager`](../teamix-evo-design-uni-manager/SKILL.md) — design tells AI _what a screen should look like_; this skill tells AI _where the code should live, what to reuse before writing new code, and how to thread tenant / region / cloud-provider context through the layers_.
|
|
13
|
+
|
|
14
|
+
<!-- teamix-evo:managed:start id="core" -->
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
Activate this skill whenever AI is about to **write or refactor code** inside a uni-manager-variant consumer app. Common signals:
|
|
19
|
+
|
|
20
|
+
- "新增一个 xxx 页面 / 列表页 / 详情页(控制台 / 工作台 / 多云资源)"
|
|
21
|
+
- "加一个 xxx 接口 / 调用 xxx API(多租户 / 跨云 / 跨账号)"
|
|
22
|
+
- "写一个 xxx 组件"
|
|
23
|
+
- "把这段重构一下"
|
|
24
|
+
- "create a CRUD page for 多云实例"
|
|
25
|
+
- "add an API call to list instances across regions"
|
|
26
|
+
- Any time AI is about to create a new file under `src/pages/`、`src/components/`、`src/services/`、`src/hooks/` in a hybrid-cloud console
|
|
27
|
+
|
|
28
|
+
If the task is purely about _visual design_ of a screen, use [`teamix-evo-design-uni-manager`](../teamix-evo-design-uni-manager/SKILL.md) instead — or run both in tandem.
|
|
29
|
+
|
|
30
|
+
## What this skill does
|
|
31
|
+
|
|
32
|
+
Before AI writes or commits code, it performs an **8-step gated flow**. Steps 1-4 are baseline (always run); steps 5-7 are topic gates (run when the task touches that topic); step 8 is the final self-review.
|
|
33
|
+
|
|
34
|
+
1. **Reuse-first check** — read [`reuse-first.md`](reuse-first.md). Before creating any new component, query the `@teamix-evo/ui` registry (via MCP `list_components` / `find_components`), the **biz-ui/uni-manager** layer (um-topbar / CloudBadge / ContextSwitcher placeholders), and grep the local project. Only write new code when no reuse path exists. **组件兜底铁律**:找不到时优先 ui 原子件组合,**禁止**自撸基础件。
|
|
35
|
+
2. **Layering check** — read [`api-layering.md`](api-layering.md). Any code that talks to a backend goes under `src/services/<domain>.ts`; multi-tenant / multi-region / multi-cloud context (tenantId / regionId / cloudProvider) is **propagated through `lib/http.ts` interceptors**, not as ad-hoc params per call. Components never call `fetch` / `axios` directly. Data hooks live in `src/hooks/` and consume services.
|
|
36
|
+
3. **Directory check** — read [`file-structure.md`](file-structure.md). Place the new file under the right top-level folder; uni-manager-specific shells (TenantContext / RegionContext / CloudBadge) have conventional locations.
|
|
37
|
+
4. **Forms gate** — if the task involves a form, read [`forms-and-validation.md`](forms-and-validation.md). `react-hook-form` + `zod`; schema lives at `src/services/<domain>.schema.ts`. Dangerous operations (delete / release / destroy) **must** route through `useDangerConfirm` (input resource name).
|
|
38
|
+
5. **Error/loading gate** — if the task adds a page or data hook, read [`error-and-loading.md`](error-and-loading.md). Ensure global ErrorBoundary, page-level fallback, and three-state handling (`isPending` / `isError` / data) are in place; mutations report success/error via `toast`. Cross-cloud resource-not-found has a dedicated fallback.
|
|
39
|
+
6. **Routing gate** — if the task adds a route or page-entry, read [`routing-and-codesplit.md`](routing-and-codesplit.md). Pages use `React.lazy`; auth/role guards live in `src/routes/guards.tsx`; **list-page filters MUST sync `tenantId` / `regionId` / `cloudProvider` into URL search params**; um-topbar context switch rewrites the current URL.
|
|
40
|
+
7. **Testing gate** — read [`testing.md`](testing.md). Pure functions and zod schemas are **mandatory** to test; tenant-context-aware http handlers must be covered by msw.
|
|
41
|
+
8. **Self-review** — run [`checklist.md`](checklist.md). Every item must pass before declaring the change done.
|
|
42
|
+
|
|
43
|
+
## Inputs the user provides
|
|
44
|
+
|
|
45
|
+
- Intent: "add a page", "add a service call", "refactor X", "extract a hook", etc.
|
|
46
|
+
- Optional: domain entity (`instance`、`database`、`tenant`、`workorder`、`audit-log`)
|
|
47
|
+
- Optional: existing file the change should land near
|
|
48
|
+
- Optional: cloud-provider scope(only-aliyun / multi-cloud / private-only)
|
|
49
|
+
|
|
50
|
+
## Outputs
|
|
51
|
+
|
|
52
|
+
- Code placed under the conventional path
|
|
53
|
+
- Reuse decisions explicitly logged ("reused `Button` from `@teamix-evo/ui`" / "reused `um-topbar` from `biz-ui/uni-manager`" / "no match found, wrote a new `OrderCard`")
|
|
54
|
+
- Tenant / region / cloud context propagation logged
|
|
55
|
+
- Pass / fail status against [`checklist.md`](checklist.md)
|
|
56
|
+
|
|
57
|
+
## How to invoke (typical flow)
|
|
58
|
+
|
|
59
|
+
1. Parse user intent → identify which artifact is being created (page / component / service / hook / util / form / route)
|
|
60
|
+
2. Read [`reuse-first.md`](reuse-first.md) and run the reuse query (MCP first, then biz-ui/uni-manager, then local grep)
|
|
61
|
+
3. Read [`file-structure.md`](file-structure.md) to pick the destination directory
|
|
62
|
+
4. If the change touches network / backend, read [`api-layering.md`](api-layering.md) — confirm tenant / region / cloud headers are injected via interceptor
|
|
63
|
+
5. If the change involves a form, read [`forms-and-validation.md`](forms-and-validation.md) — for dangerous operations, plug `useDangerConfirm`
|
|
64
|
+
6. If the change adds a page / data hook, read [`error-and-loading.md`](error-and-loading.md) for fallback / Skeleton / toast wiring
|
|
65
|
+
7. If the change adds a route or page entry, read [`routing-and-codesplit.md`](routing-and-codesplit.md) — confirm tenant / region URL sync
|
|
66
|
+
8. Decide test coverage per [`testing.md`](testing.md); write `*.test.ts(x)` next to source
|
|
67
|
+
9. Write the code; cite each reuse / new-write decision in the response
|
|
68
|
+
10. Run through [`checklist.md`](checklist.md); list pass / fail explicitly
|
|
69
|
+
|
|
70
|
+
## Files in this skill
|
|
71
|
+
|
|
72
|
+
| File | Purpose |
|
|
73
|
+
| ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
|
|
74
|
+
| [`reuse-first.md`](reuse-first.md) | 复用决策流(ui 原子件 + biz-ui/uni-manager + 本项目);组件兜底铁律 |
|
|
75
|
+
| [`file-structure.md`](file-structure.md) | 顶层 `src/` 目录骨架、归属、import 边界、命名、全局态分级(含 TenantContext / RegionContext) |
|
|
76
|
+
| [`api-layering.md`](api-layering.md) | API 三层结构 + 多租户 / 多区域 / 跨云上下文注入 |
|
|
77
|
+
| [`forms-and-validation.md`](forms-and-validation.md) | `react-hook-form` + `zod`;危险操作走 `useDangerConfirm`(输入资源名称确认) |
|
|
78
|
+
| [`error-and-loading.md`](error-and-loading.md) | 全局 / 页面 ErrorBoundary、三态、Suspense、toast、跨云资源专属 fallback |
|
|
79
|
+
| [`routing-and-codesplit.md`](routing-and-codesplit.md) | `React.lazy`、guards、404/403/500、tenant/region/cloud 进 URL search params、um-topbar 切换 URL 改写 |
|
|
80
|
+
| [`testing.md`](testing.md) | `vitest` + RTL + msw、就近 test、tenant-context handler 覆盖 |
|
|
81
|
+
| [`checklist.md`](checklist.md) | 多段自检,含 uni-manager 红线(自建 topbar / 不带租户上下文 / 危险操作未输入名称) |
|
|
82
|
+
|
|
83
|
+
## Relationship to other skills
|
|
84
|
+
|
|
85
|
+
- [`teamix-evo-design-uni-manager`](../teamix-evo-design-uni-manager/SKILL.md) — visual / interaction rules for uni-manager screen generation. Run **alongside** this skill when the task includes UI; this skill never overrides design on visual concerns.
|
|
86
|
+
- [`teamix-evo-code-opentrek`](../teamix-evo-code-opentrek/SKILL.md) — sister code skill for OpenTrek variant. The two skills share 80% of conventions (file structure / layering / forms / testing); uni-manager-specific deltas are in this skill's SKILL/reuse-first/api-layering/routing/checklist.
|
|
87
|
+
- [`teamix-evo-manage`](../teamix-evo-manage/SKILL.md) — lifecycle (`init` / `update` / `uninstall` / `skills add`). Out of scope here.
|
|
88
|
+
|
|
89
|
+
## Why these conventions(uni-manager 视角)
|
|
90
|
+
|
|
91
|
+
- **Single source for UI** — `@teamix-evo/ui` 89 原子件 + `biz-ui/uni-manager`(当前 1 实物 um-topbar,其余如 CloudBadge / ContextSwitcher 是概念占位)。Re-implementing 顶部 topbar / 基础件会破坏一致性三件套(UM1/UM2/UM3)。
|
|
92
|
+
- **Stable seams for change** — tenant / region / cloud 上下文集中在 `lib/http.ts` interceptor 与 `contexts/TenantContext.tsx`,新增云厂商或区域不需要改 89 处 service 调用。
|
|
93
|
+
- **Predictable file location** — 所有 uni-manager 项目目录形状一致;新接手的人 5 分钟内能找到「租户切换在哪管」「跨云列表怎么写」「危险操作怎么二次确认」。
|
|
94
|
+
|
|
95
|
+
<!-- teamix-evo:managed:end -->
|