@teamix-evo/skills 0.9.0 → 0.10.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Teamix Evo Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/manifest.json CHANGED
@@ -10,12 +10,17 @@
10
10
  {
11
11
  "id": "teamix-evo-manage",
12
12
  "name": "teamix-evo-manage",
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 init` / `teamix-evo update` / `teamix-evo tokens ...` / `teamix-evo skills ...` / `teamix-evo ui ...` / `teamix-evo biz-ui ...` / `teamix-evo templates ...` / `teamix-evo lint ...` / `teamix-evo logs ...` / `teamix-evo restore ...` / `teamix-evo switch ...`, 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\"; (组件源码升级 — ADR 0040) \"升级 ui\"、\"升级业务组件\"、\"升级 button\"、\"生成 ui staging\"、\"生成 biz-ui staging\"、\"upgrade ui\"、\"upgrade biz-ui\"、\"upgrade ui component\"、\"stage ui upgrade\"、\"teamix-evo ui upgrade\"、\"teamix-evo biz-ui upgrade\"; (卸载 / 清单) \"卸载 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; (旧工程迁移) \"迁移旧项目\"、\"重建老工程\"、\"把旧项目搬过来\"、\"旧项目分析\"、\"旧系统翻新\"、\"legacy migration\"、\"migrate old project\"、\"rebuild from existing\"、\"refactor from old codebase\"、\"从旧项目迁移过来\"、\"用旧项目做参考重建\"、\"分析旧项目并迁移\"; (状态文件) 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.",
13
+ "description": "Single entry point for the teamix-evo lifecycle: scaffold a new project skeleton, install the AI coding system into an existing repo via `teamix-evo init`, inspect / remove any teamix-evo package, manage component-source upgrades, and drive old-project migration/rebuild.\nTRIGGER when: (CLI) user runs or asks about `teamix-evo init` / `teamix-evo tokens ...` / `teamix-evo skills ...` / `teamix-evo ui ...` / `teamix-evo biz-ui ...` / `teamix-evo blocks ...` / `teamix-evo lint ...` / `teamix-evo logs ...` / `teamix-evo restore ...` / `teamix-evo switch ...`, 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 研发系统\"、\"接入统一管理研发体系\"; (组件源码升级 — ADR 0040) \"升级 ui\"、\"升级业务组件\"、\"升级 button\"、\"生成 ui staging\"、\"生成 biz-ui staging\"、\"upgrade ui\"、\"upgrade biz-ui\"、\"upgrade ui component\"、\"stage ui upgrade\"、\"teamix-evo ui upgrade\"、\"teamix-evo biz-ui upgrade\"; (卸载 / 清单) \"卸载 teamix-evo\"、\"看看装了哪些 teamix-evo 资源\"、\"remove the design system\"、\"list installed\"; (旧工程迁移) \"迁移旧项目\"、\"重建老工程\"、\"把旧项目搬过来\"、\"旧项目分析\"、\"旧系统翻新\"、\"legacy migration\"、\"migrate old project\"、\"rebuild from existing\"、\"refactor from old codebase\"、\"从旧项目迁移过来\"、\"用旧项目做参考重建\"、\"分析旧项目并迁移\"; (状态文件) user touches `.teamix-evo/config.json`、`.teamix-evo/manifest.json`.\nSKIP: any content task — generating components, pages, services, or reviewing screens; changes to `src/` files outside the component upgrade flow, 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
14
  "version": "0.4.0",
15
15
  "source": "src/teamix-evo-manage",
16
- "ides": ["qoder", "claude"],
16
+ "ides": [
17
+ "qoder",
18
+ "claude"
19
+ ],
17
20
  "updateStrategy": "managed",
18
- "managedRegions": ["core"],
21
+ "managedRegions": [
22
+ "core"
23
+ ],
19
24
  "template": false,
20
25
  "scope": "global"
21
26
  },
@@ -26,9 +31,14 @@
26
31
  "version": "0.2.0",
27
32
  "source": "src/teamix-evo-design-opentrek",
28
33
  "variant": "opentrek",
29
- "ides": ["qoder", "claude"],
34
+ "ides": [
35
+ "qoder",
36
+ "claude"
37
+ ],
30
38
  "updateStrategy": "managed",
31
- "managedRegions": ["core"],
39
+ "managedRegions": [
40
+ "core"
41
+ ],
32
42
  "template": false
33
43
  },
34
44
  {
@@ -38,9 +48,14 @@
38
48
  "version": "0.2.0",
39
49
  "source": "src/teamix-evo-code-opentrek",
40
50
  "variant": "opentrek",
41
- "ides": ["qoder", "claude"],
51
+ "ides": [
52
+ "qoder",
53
+ "claude"
54
+ ],
42
55
  "updateStrategy": "managed",
43
- "managedRegions": ["core"],
56
+ "managedRegions": [
57
+ "core"
58
+ ],
44
59
  "template": false
45
60
  },
46
61
  {
@@ -50,9 +65,14 @@
50
65
  "version": "0.2.0",
51
66
  "source": "src/teamix-evo-design-uni-manager",
52
67
  "variant": "uni-manager",
53
- "ides": ["qoder", "claude"],
68
+ "ides": [
69
+ "qoder",
70
+ "claude"
71
+ ],
54
72
  "updateStrategy": "managed",
55
- "managedRegions": ["core"],
73
+ "managedRegions": [
74
+ "core"
75
+ ],
56
76
  "template": false
57
77
  },
58
78
  {
@@ -62,9 +82,14 @@
62
82
  "version": "0.2.0",
63
83
  "source": "src/teamix-evo-code-uni-manager",
64
84
  "variant": "uni-manager",
65
- "ides": ["qoder", "claude"],
85
+ "ides": [
86
+ "qoder",
87
+ "claude"
88
+ ],
66
89
  "updateStrategy": "managed",
67
- "managedRegions": ["core"],
90
+ "managedRegions": [
91
+ "core"
92
+ ],
68
93
  "template": false
69
94
  },
70
95
  {
@@ -73,9 +98,14 @@
73
98
  "description": "Help the user adopt token renames in `.teamix-evo/.upgrade-hints/tokens-<ts>.json` AND component source upgrades in `.teamix-evo/.upgrade-staging/{ui,biz-ui}-<ts>/` after `teamix-evo update` / `teamix-evo tokens update` / `teamix-evo switch` / `teamix-evo ui upgrade` / `teamix-evo biz-ui upgrade`. Read each hint or staging manifest, scan the project for usages or compare current vs incoming source, propose codemod / file-replace diffs, apply only after explicit user approval, then archive processed inputs.\nTRIGGER when: user references `.teamix-evo/.upgrade-hints/`、`.teamix-evo/.upgrade-staging/`、`tokens-*.json` hint files、`ui-*` or `biz-ui-*` staging directories、phrases like \"处理 token 改名\"、\"应用 codemod\"、\"扫一下 legacy token\"、\"升级 token 引用\"、\"更新 token 名\"、\"组件升级\"、\"ui-staging\"、\"biz-ui staging\"、\"apply ui staging\"、\"apply biz-ui staging\"、\"应用组件升级\"、\"apply token rename codemod\"、\"adopt token rename hints\"、\"scan for legacy tokens\"、\"token rename upgrade\"、\"component source upgrade\"、\"review ui staging diff\"、\"token 治理\"、\"tokens diagnose\"、\"tokens treat\"、\"治理计划\"、\".treatment-plan.md\"、\"baseline 锁定\"、\"token 反哺\"、\"清理 token 违规\"、\"token cleanup\"、\"lint baseline\"、\"降违规\"、\"全部治理\"; AI sees output of `teamix-evo update` / `teamix-evo tokens update` / `teamix-evo switch --apply` / `teamix-evo ui upgrade` / `teamix-evo biz-ui upgrade` mentioning `💡 token rename hint:` or `staging at .teamix-evo/.upgrade-staging/...` and the user wants to follow up; AI sees output of `teamix-evo init` showing token-discipline ESLint warnings and the user wants to clean up; user opens any `.teamix-evo/.upgrade-hints/tokens-*.json` or any file under `.teamix-evo/.upgrade-staging/{ui,biz-ui}-*/` or `.teamix-evo/.treatment-plan.md`.\nSKIP: any other lifecycle work — `init` / `update` orchestration / variant switch itself / install / uninstall / generating staging (defer to teamix-evo-manage); pure visual or design changes (defer to teamix-evo-design-<variant>); any code authoring unrelated to the rename / staging window (defer to teamix-evo-code-<variant>); refuse to auto-apply — never write source code without explicit per-file user confirmation.\nCoordinates with: teamix-evo-manage (manage drives the upgrade flow that emits hints + staging; this skill consumes the resulting files).",
74
99
  "version": "0.2.0",
75
100
  "source": "src/teamix-evo-upgrade",
76
- "ides": ["qoder", "claude"],
101
+ "ides": [
102
+ "qoder",
103
+ "claude"
104
+ ],
77
105
  "updateStrategy": "managed",
78
- "managedRegions": ["core"],
106
+ "managedRegions": [
107
+ "core"
108
+ ],
79
109
  "template": false,
80
110
  "scope": "global"
81
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamix-evo/skills",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "Skills (AI IDE capabilities) for Teamix Evo",
5
5
  "type": "module",
6
6
  "files": [
@@ -9,6 +9,15 @@
9
9
  "src",
10
10
  "_template"
11
11
  ],
12
+ "devDependencies": {
13
+ "@clack/prompts": "^0.8.0",
14
+ "tsx": "^4.0.0",
15
+ "@teamix-evo/registry": "0.12.0"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
12
21
  "scripts": {
13
22
  "validate": "tsx scripts/validate-skills.ts",
14
23
  "scaffold:skill": "tsx scripts/scaffold-skill.ts",
@@ -16,14 +25,5 @@
16
25
  "typecheck": "echo 'no ts source'",
17
26
  "lint": "echo 'no ts source'",
18
27
  "build": "echo 'pure resource package, no build needed'"
19
- },
20
- "devDependencies": {
21
- "@teamix-evo/registry": "workspace:*",
22
- "@clack/prompts": "^0.8.0",
23
- "tsx": "^4.0.0"
24
- },
25
- "publishConfig": {
26
- "access": "public",
27
- "registry": "https://registry.npmjs.org/"
28
28
  }
29
- }
29
+ }
@@ -99,6 +99,7 @@ CLI 二进制名 `teamix-evo`(+ 脚手架独立二进制 `create-teamix-evo`
99
99
  | | `treat` | 一键流水线:按 diagnose 顺序执行 codemod → 前后基线对比 → 降幅报告(ADR 0042) |
100
100
  | | `reflect` | Token 反哺:检测频次 ≥ 3 的业务色值 → 提议命名 → 写入 overrides(ADR 0042) |
101
101
  | | `codemod <name>` | 单独跑指定 codemod(hsl-to-v4 / hex-to-token / tw-scale-to-semantic / space-to-gap / arbitrary-to-token) |
102
+ | | `baseline-check` | 对比当前 lint 违规与锁定基线,CI 友好 |
102
103
  | **skills** | `init` | 自举:按 variant + scope 装全部匹配 skill(ADR 0034 verb 分工) |
103
104
  | | `add <name...>` | 增量装指定 skill |
104
105
  | | `list` (alias `ls`) | 列出全部 skill(`--installed` 仅已装) |
@@ -171,22 +172,27 @@ npx create-teamix-evo --help # 脚手架帮助
171
172
  ### 第一步:生成骨架
172
173
 
173
174
  ```bash
174
- npm create teamix-evo@latest <dir> --variant <name> -y
175
- # 或 pnpm create teamix-evo <dir> --variant <name> -y
175
+ # 在父目录创建新项目子目录(常规方式)
176
+ npm create teamix-evo@latest <dir> --variant <name>
177
+ # 在当前空目录原地初始化(用户已 cd 进空目标目录 / IDE 已打开空目录)
178
+ npm create teamix-evo@latest . --variant <name>
176
179
  ```
177
180
 
178
- > `-y` 跳过包管理器 / git init 等交互,全部走推荐默认值(pm=auto、git=true)。
181
+ > **选择 `<dir>` 还是 `.`**:若用户说"为当前目录初始化"且当前目录为空(或仅含 .git / README),用 `.`;若用户给出项目名或要新建目录,用项目名。
182
+ > **⚠️ 当前目录已有代码文件**:不要用 `create-teamix-evo`(`--force` 会清空目录),直接走**场景 3**(`teamix-evo init`)在现有工程上装套件。
183
+ > 传 `--variant` 后 CLI 自动跳过所有交互(无需额外 `-y`;`-y` 经 npx 时会被 npx 自身消费,不会传给 create-teamix-evo)。
179
184
 
180
- `create-teamix-evo` `console` preset(默认且当前唯一)只做骨架生成:
185
+ `create-teamix-evo` 有两个 preset(`opentrek` / `uni-manager`),由 `--variant` 自动推断。骨架生成流程:
181
186
 
182
187
  | 阶段 | 产物 |
183
188
  | ---- | ------------------------------------------------ |
184
- | 1 | Vite + React + TS scaffold(base template 复制) |
185
- | 2 | variant overlay(变体专属配置覆盖) |
186
- | 3 | package.json merge(合并依赖) |
187
- | 4 | `.mcp.json` 写入 |
188
- | 5 | 依赖安装(`pnpm install` / `npm install`) |
189
- | 6 | git init |
189
+ | 1 | 目标目录校验 / 创建 |
190
+ | 2 | Vite + React + TS scaffold(base template 复制) |
191
+ | 3 | variant overlay(变体专属配置覆盖) |
192
+ | 4 | package.json merge(合并依赖) |
193
+ | 5 | `.mcp.json` 写入 |
194
+ | 6 | 依赖安装(`pnpm install` / `npm install`) |
195
+ | 7 | git init |
190
196
 
191
197
  > **注意**:`create` 不再调用 `teamix-evo/core` 的任何函数(ADR 0043),它只生成纯静态骨架。
192
198
 
@@ -203,7 +209,16 @@ npx teamix-evo init --variant <name> -y
203
209
 
204
210
  > 提示:`teamix-evo-manage` 是 entry skill,推荐**全局**装一次(`npx teamix-evo skills add teamix-evo-manage --scope global`)。create CLI 不会装它到 project,scaffold 完成后的 next-steps 会提示用户。
205
211
 
206
- **全部完成后告知用户**:
212
+ ### 第三步:提交 init 产出(必做)
213
+
214
+ `teamix-evo init` 会生成大量文件(tokens / skills / ui 组件 / lint 配置等),**必须立刻 commit**,否则 IDE 会显示满屏 untracked 文件,后续协作极易冲突:
215
+
216
+ ```bash
217
+ git add .
218
+ git commit -m "chore: init teamix-evo (<variant>)"
219
+ ```
220
+
221
+ ### 第四步:验证
207
222
 
208
223
  ```bash
209
224
  pnpm dev # 立刻可跑
@@ -251,7 +266,7 @@ init 前自动 `detectConflicts(cwd)` 扫描,产出结构化报告;发现冲
251
266
  | ------------------ | --------------------------------------- |
252
267
  | `tokens` | `tokens/` 目录已存在 |
253
268
  | `agents-md` | 根 `AGENTS.md` 已存在 |
254
- | `components-json` | `.teamix-evo/config.json` 已存在 |
269
+ | `components-json` | 根目录 `components.json` 已存在 |
255
270
  | `shadcn-source` | `src/components/ui/` 下已有组件文件 |
256
271
  | `tailwind-config` | `tailwind.config.*` 已存在 |
257
272
  | `index-css` | `src/index.css` 含现有 token import |
@@ -277,8 +292,13 @@ CLI 在 partial 状态会打印“恢复指引”面板:失败步骤名、错
277
292
  ### 结束时告诉用户
278
293
 
279
294
  - 已落地的 step 列表 + variant / IDE / scope。
280
- - `pendingConflictWork`(如有):批次 4 上线后用 `teamix-evo conflict resolve` 收尾。
281
295
  - 全局 entry skill:若 `~/.qoder/skills/teamix-evo-manage` 不存在,补一句 `npx teamix-evo skills add teamix-evo-manage --scope global -y`(ADR 0033)。
296
+ - **必须 commit init 产出**:init 会生成 tokens / skills / agents-md / ui / lint 等大量文件,不提交会导致 IDE 满屏 untracked 文件。AI 必须在 init 成功后立即执行:
297
+
298
+ ```bash
299
+ git add .
300
+ git commit -m "chore: init teamix-evo (<variant>)"
301
+ ```
282
302
 
283
303
  ## 场景 4 · 升级
284
304
 
@@ -470,13 +490,13 @@ npx teamix-evo ui promote-to-biz --staging-dir <path> # 指定 staging 目录
470
490
 
471
491
  **触发**:用户说"卸载 teamix-evo / remove the design system"。
472
492
 
473
- | 范围 | 命令 |
474
- | --------------------------------------------- | ----------------------------------------------------- |
475
- | Tokens | `npx teamix-evo tokens uninstall [-y] [--keep-files]` |
476
- | Skills | `npx teamix-evo skills uninstall [-y]` |
477
- | (UI 不提供卸载,组件源码用户拥有 → 用户手动删) | |
493
+ | 范围 | 命令 |
494
+ | --------------------------------------------- | ------------------------------------------------------------------- |
495
+ | Tokens | `npx teamix-evo tokens uninstall [-y] [--keep-files] [--purge]` |
496
+ | Skills | `npx teamix-evo skills uninstall [-y]` |
497
+ | (UI 不提供卸载,组件源码用户拥有 → 用户手动删) | |
478
498
 
479
- `tokens uninstall` 默认保留 `managed` 文件以保护用户编辑;`--keep-files` 完全保留物理文件,只清 manifest
499
+ `tokens uninstall` 默认保留 `frozen` + `managed` 文件以保护用户编辑;`--keep-files` 完全保留物理文件只清 manifest;`--purge` 连 `frozen` 文件也删除。
480
500
 
481
501
  ## 场景 6 · 旧工程迁移重建(Old-Project Migration)
482
502