ui-director-skill 0.1.0 → 2.1.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/CHANGELOG.md +16 -0
- package/INSTALL.md +42 -91
- package/README.md +48 -284
- package/SKILL.md +25 -109
- package/assets/bundle-profiles.json +178 -0
- package/assets/capabilities.json +260 -0
- package/assets/install-manifest.json +27 -0
- package/assets/project-profile.example.json +23 -0
- package/assets/quality-rubric.json +29 -0
- package/assets/routing-rules.json +68 -0
- package/assets/upstreams.json +100 -0
- package/bin/ui.mjs +148 -26
- package/config/optional-skills.json +16 -0
- package/config/quality-rubric.json +13 -0
- package/examples/usage.md +25 -27
- package/install.py +303 -0
- package/lib/core.mjs +60 -9
- package/lib/workflows.mjs +168 -0
- package/package.json +8 -3
- package/references/delivery-contract.md +4 -0
- package/references/design-intelligence.md +2 -0
- package/references/integrations/security-policy.md +2 -0
- package/references/integrations/skill-manager.md +2 -0
- package/references/integrations/upstream-adapters.md +4 -0
- package/references/integrations.md +2 -0
- package/references/motion-interaction.md +2 -0
- package/references/orchestration/context-management.md +4 -0
- package/references/orchestration/iteration-loop.md +8 -0
- package/references/orchestration/routing.md +8 -0
- package/references/platforms/desktop.md +3 -0
- package/references/platforms/mobile.md +3 -0
- package/references/platforms/web.md +3 -0
- package/references/quality-assurance.md +2 -0
- package/references/routing.md +2 -58
- package/references/stages/design-research.md +2 -0
- package/references/stages/design-system.md +4 -0
- package/references/stages/deslop.md +2 -0
- package/references/stages/motion-interaction.md +31 -0
- package/references/stages/prototyping.md +2 -0
- package/references/stages/visual-direction.md +2 -0
- package/references/stages/visual-validation.md +6 -0
- package/references/visual-direction.md +2 -0
- package/skill_manager.py +655 -0
- package/templates/DECISIONS.md +3 -0
- package/templates/DESIGN.md +26 -0
- package/templates/PRODUCT.md +9 -0
- package/templates/REVIEW.md +19 -0
- package/references/project-inspection.md +0 -25
- package/references/quality-gates.md +0 -59
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
- Preserve project CLI entry points, custom files, and backups through host upgrades. Resume interrupted upgrades by rerunning the same command.
|
|
6
|
+
- Apply reviewed companion plans using exact Git commits. Check file contents and execute permissions, protect local edits, and recover interrupted updates across supported state formats.
|
|
7
|
+
- Keep audits, design documents, and Figma prototypes within their requested scope. Preserve implementation stages when reusing a design system, include motion checks in motion audits, and capture baselines before editing existing interfaces.
|
|
8
|
+
- Check the actual installation and its required files in `doctor`.
|
|
9
|
+
|
|
10
|
+
## 2.1.0
|
|
11
|
+
|
|
12
|
+
- Added optional companion Skill profiles and explicit install, status, update, and rollback commands.
|
|
13
|
+
- Added Git commit pins, SHA256 verification, pre-update backups, transaction recovery, and protection for external or locally modified Skills.
|
|
14
|
+
- Added Codex, Claude Code, OpenCode, and Hermes installation targets.
|
|
15
|
+
- Updated UI Director guidance and design references for the 2.1 workflow.
|
|
16
|
+
- Removed platform-specific adapters outside the supported web, mobile, and desktop workflows.
|
package/INSTALL.md
CHANGED
|
@@ -1,138 +1,89 @@
|
|
|
1
1
|
# 安装与维护
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 安装 CLI 和 Skill
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- Git
|
|
7
|
-
- 可访问 GitHub(仅 `ui init` / `ui update` 需要)
|
|
8
|
-
|
|
9
|
-
## 安装 CLI
|
|
10
|
-
|
|
11
|
-
解压后进入目录:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -g .
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
开发/调试时可用:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm link
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
验证:
|
|
5
|
+
需要 Node.js 18 或更高版本。通过 npm 安装或升级 CLI:
|
|
24
6
|
|
|
25
7
|
```bash
|
|
8
|
+
npm install --global ui-director-skill@latest
|
|
26
9
|
ui --version
|
|
27
|
-
ui --help
|
|
28
10
|
```
|
|
29
11
|
|
|
30
|
-
|
|
12
|
+
宿主安装命令另需 Python 3.9 或更高版本。Codex 全局安装:
|
|
31
13
|
|
|
32
14
|
```bash
|
|
33
|
-
|
|
34
|
-
ui
|
|
15
|
+
ui skill install --agent codex --scope global
|
|
16
|
+
ui skill doctor --agent codex --scope global
|
|
35
17
|
```
|
|
36
18
|
|
|
37
|
-
|
|
19
|
+
项目级 Codex 安装:
|
|
38
20
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
.claude/skills/ui-director/
|
|
43
|
-
.agents/skills/ui-director/
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
第三方 Provider 始终只维护一份:
|
|
47
|
-
|
|
48
|
-
```text
|
|
49
|
-
.ui-director/providers/
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
安装的两个 skill 入口会同时带上 CLI runtime、registry、adapter 和 references,因此即使全局 `ui` 不在 PATH,也可以从入口目录内执行 fallback 命令。安装会更新受管文件,但会保留同目录下的其他自定义文件。
|
|
53
|
-
|
|
54
|
-
## `.gitignore` 建议
|
|
55
|
-
|
|
56
|
-
如果希望团队用 lockfile 复现,但不提交 provider 本体:
|
|
57
|
-
|
|
58
|
-
```gitignore
|
|
59
|
-
.ui-director/providers/
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
建议提交:
|
|
63
|
-
|
|
64
|
-
```text
|
|
65
|
-
.ui-director/skills.lock.json
|
|
21
|
+
```bash
|
|
22
|
+
ui skill install --agent codex --scope project --path .
|
|
66
23
|
```
|
|
67
24
|
|
|
68
|
-
|
|
25
|
+
`--agent` 支持 `codex`、`claude`、`opencode`、`hermes` 和 `all`。`--scope` 支持 `global` 与 `project`。升级时使用 `ui skill upgrade`,旧 Skill 会备份到宿主配置目录下的 `ui-director-backups/`。若升级中断,重跑同一命令即可从备份接续。
|
|
69
26
|
|
|
70
|
-
|
|
27
|
+
## 配套 Skill
|
|
71
28
|
|
|
72
|
-
|
|
29
|
+
管理器另需 Git。先生成预览,核对各配套 Skill 的仓库、commit 和文件变更,再用同一目标应用计划:
|
|
73
30
|
|
|
74
31
|
```bash
|
|
75
|
-
ui
|
|
32
|
+
ui bundle --profile professional --agent codex --scope global --dry-run > bundle-plan.json
|
|
33
|
+
ui bundle --agent codex --scope global --plan bundle-plan.json
|
|
76
34
|
```
|
|
77
35
|
|
|
78
|
-
|
|
36
|
+
可选组合为 `minimal`、`professional` 和 `full`。生成计划时可重复传入 `--provider` 选择单独的上游。只查看本地状态时使用 `--dry-run --offline`。
|
|
79
37
|
|
|
80
38
|
```bash
|
|
81
|
-
ui
|
|
82
|
-
ui update jakub-skills
|
|
39
|
+
ui bundle --provider hallmark --agent codex --scope global --dry-run > hallmark-plan.json
|
|
83
40
|
```
|
|
84
41
|
|
|
85
|
-
|
|
42
|
+
常用维护命令:
|
|
86
43
|
|
|
87
44
|
```bash
|
|
88
|
-
ui
|
|
89
|
-
ui
|
|
45
|
+
ui companions status --agent codex --scope global
|
|
46
|
+
ui companions check-updates --agent codex --scope global
|
|
47
|
+
ui companions update --agent codex --scope global --dry-run > update-plan.json
|
|
48
|
+
ui companions update --agent codex --scope global --plan update-plan.json
|
|
49
|
+
ui companions rollback --agent codex --scope global
|
|
50
|
+
ui companions recover --agent codex --scope global
|
|
90
51
|
```
|
|
91
52
|
|
|
92
|
-
|
|
53
|
+
`--dry-run` 通过 GitHub 获取版本并检查文件差异;`--plan` 只获取计划中的 commit。若本地版本、目标或内容与预览不一致,重新生成计划。管理器通过目录清单选取 Skill,保留手动安装和本地修改的内容。
|
|
93
54
|
|
|
94
|
-
|
|
95
|
-
ui rollback impeccable
|
|
96
|
-
```
|
|
55
|
+
恢复按安装目录执行。若多个目标只完成了一部分,对已提交的目标可单独回滚,对中断的目标先执行恢复。新版接管后,请用新版 CLI 管理该目录。旧版会看到 `busy` 锁。
|
|
97
56
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
ui rollback
|
|
102
|
-
```
|
|
57
|
+
旧版进程中断后,先确认它已经退出。若留下旧锁,为 `recover` 加上 `--legacy-stale-lock`。若报告旧事务存在未完成的文件,检查路径后可加 `--quarantine-legacy-partial`,将残留文件保留在该事务的 `cancelled/` 并恢复备份。若回滚提示旧记录可能已经撤销,检查历史后用 `ui companions rollback --transaction ID` 选择目标。
|
|
103
58
|
|
|
104
|
-
##
|
|
59
|
+
## 设计文档与既有 provider
|
|
105
60
|
|
|
106
61
|
```bash
|
|
107
|
-
ui
|
|
62
|
+
ui design-init --platform web
|
|
63
|
+
ui migrate --dry-run
|
|
64
|
+
ui validate-design
|
|
65
|
+
ui check-upstreams
|
|
108
66
|
```
|
|
109
67
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
仓库中的 `.github/workflows/publish-npm.yml` 会在发布稳定 GitHub Release 时自动发布 npm。首次发布需要临时配置 `NPM_TOKEN` Secret,值为具备 `ui-director-skill` 发布权限的短期 granular token;首次发布完成后,应在 npm 包设置中配置 GitHub Trusted Publisher(用户 `matrixhawk`、仓库 `ui-director-skill`、workflow `publish-npm.yml`),再删除该 Secret。后续发布使用 OIDC,不需要长期 token。
|
|
68
|
+
`ui design-init` 创建缺少的项目配置、PRODUCT.md、DESIGN.md 和决策记录。`ui migrate` 会保留旧 `design-system/MASTER.md` 和已有配置,并生成待审阅的 DESIGN.md 草稿。`ui validate-design` 只检查结构和占位内容。
|
|
113
69
|
|
|
114
|
-
|
|
70
|
+
原有 Git provider 命令仍可使用:
|
|
115
71
|
|
|
116
72
|
```bash
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
73
|
+
ui init
|
|
74
|
+
ui status
|
|
75
|
+
ui diff impeccable
|
|
76
|
+
ui update impeccable
|
|
77
|
+
ui rollback impeccable
|
|
78
|
+
ui resolve layout
|
|
120
79
|
```
|
|
121
80
|
|
|
122
|
-
|
|
81
|
+
Git provider 位于 `.ui-director/providers/`,锁文件位于 `.ui-director/skills.lock.json`。团队可提交锁文件,并将 provider 工作副本加入 `.gitignore`。
|
|
123
82
|
|
|
124
83
|
## 卸载
|
|
125
84
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
rm -rf .ui-director
|
|
130
|
-
rm -rf .agents/skills/ui-director
|
|
131
|
-
rm -rf .claude/skills/ui-director
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
全局卸载 CLI:
|
|
85
|
+
从项目或对应宿主技能目录中移除 `ui-director` Skill。按需保留设计文档、锁文件和备份。卸载全局 CLI:
|
|
135
86
|
|
|
136
87
|
```bash
|
|
137
|
-
npm uninstall
|
|
88
|
+
npm uninstall --global ui-director-skill
|
|
138
89
|
```
|
package/README.md
CHANGED
|
@@ -1,315 +1,79 @@
|
|
|
1
1
|
# UI Director Skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/ui-director-skill)
|
|
4
|
+
[](LICENSE)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
UI Director 为 Codex、Claude Code、OpenCode 和 Hermes 提供 UI/UX 工作流,覆盖界面设计、改版、设计系统、参考匹配、动效和视觉审查。v2.1 增加可选配套 Skill 管理,支持安装组合、版本锁、备份、更新和回滚。
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
- **Jakub Krehel Skills**:Layout / Typography / Color / Accessibility / UX Writing / Interface polish
|
|
9
|
-
- **Frontend Design System Skill**:已有项目组件、Token、Theme、Design System 约束
|
|
10
|
-
- **Impeccable**:Audit / Critique / Distill / Polish
|
|
8
|
+
## 安装
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
直接把四个 Skill 全部安装成宽触发 Skill,容易出现:
|
|
15
|
-
|
|
16
|
-
1. 多个 Skill 同时抢同一个 UI 请求。
|
|
17
|
-
2. 已有项目被外部“漂亮模板”覆盖掉原有设计语言。
|
|
18
|
-
3. Skill 上游更新后目录或命令变化,Orchestrator 失效。
|
|
19
|
-
4. 四个上游版本无法复现或回滚。
|
|
20
|
-
|
|
21
|
-
UI Director 使用 **单入口 + Capability Registry + Adapter + 外部 Provider** 架构。
|
|
22
|
-
|
|
23
|
-
```text
|
|
24
|
-
UI Director
|
|
25
|
-
│
|
|
26
|
-
Capability Router
|
|
27
|
-
│
|
|
28
|
-
┌────────────────┼────────────────┐
|
|
29
|
-
│ │ │
|
|
30
|
-
Research Design Eng. Quality
|
|
31
|
-
│ │ │
|
|
32
|
-
UI UX Pro Max Jakub Skills Impeccable
|
|
33
|
-
│
|
|
34
|
-
Project System
|
|
35
|
-
│
|
|
36
|
-
Frontend Design System
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
UI Director 本身只认 `layout`、`typography`、`audit` 这类逻辑能力,不依赖第三方目录结构。第三方结构变化由 `adapters/*.json` 消化。
|
|
40
|
-
|
|
41
|
-
## 最简单的使用方式
|
|
42
|
-
|
|
43
|
-
### 1. 解压
|
|
44
|
-
|
|
45
|
-
将压缩包解压到任意目录。
|
|
46
|
-
|
|
47
|
-
### 2. 安装 `ui` 命令
|
|
48
|
-
|
|
49
|
-
在解压目录执行:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npm install -g .
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
也可以开发模式:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm link
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
安装后验证:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
ui --help
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### 3. 初始化项目
|
|
68
|
-
|
|
69
|
-
进入你的项目:
|
|
10
|
+
需要 Node.js 18 或更高版本。通过 npm 安装 CLI:
|
|
70
11
|
|
|
71
12
|
```bash
|
|
72
|
-
|
|
73
|
-
ui
|
|
13
|
+
npm install --global ui-director-skill@latest
|
|
14
|
+
ui --version
|
|
74
15
|
```
|
|
75
16
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- 在 `.ui-director/providers/` 拉取四个官方上游仓库
|
|
79
|
-
- 如果项目已有 `.ui-director/skills.lock.json`,优先复现其中锁定的 commit
|
|
80
|
-
- 首次初始化时写入 `.ui-director/skills.lock.json`(包含 provider commit 与 Git tree hash)
|
|
81
|
-
- 校验 adapters/capabilities
|
|
82
|
-
- 将 `ui-director` Skill 安装到:
|
|
83
|
-
- `.agents/skills/ui-director/`(Codex / 通用 Agent Skills)
|
|
84
|
-
- `.claude/skills/ui-director/`(Claude Code)
|
|
85
|
-
|
|
86
|
-
第三方 Skill 不会复制进 UI Director 包,所以不会因为这个压缩包变旧而锁死版本。
|
|
87
|
-
|
|
88
|
-
## 发布 npm
|
|
89
|
-
|
|
90
|
-
npm 发布由 `.github/workflows/publish-npm.yml` 执行。发布一个 GitHub Release 时,workflow 会:
|
|
91
|
-
|
|
92
|
-
1. 检查 Release 使用的稳定标签是否为 `vX.Y.Z`,并且与 `package.json` 的版本完全一致。
|
|
93
|
-
2. 运行 `npm test` 和 `npm pack --dry-run`。
|
|
94
|
-
3. 优先使用 npm Trusted Publishing 的 GitHub OIDC 发布 `ui-director-skill`;如果配置了 `NPM_TOKEN`,则仅用于首次 bootstrap 发布。
|
|
95
|
-
|
|
96
|
-
首次发布前,npm 包尚不存在,必须先在仓库的 **Settings → Secrets and variables → Actions** 新建 `NPM_TOKEN`,值为具备该包发布权限的短期 granular token。只为 `v0.1.0` bootstrap 使用,完成后应删除 Secret。
|
|
97
|
-
|
|
98
|
-
首次发布成功后,在 npm 包设置中添加 Trusted Publisher:GitHub Actions、用户 `matrixhawk`、仓库 `ui-director-skill`、workflow 文件名 `publish-npm.yml`,允许 `npm publish`。然后删除 `NPM_TOKEN` Secret,后续发布就使用 OIDC,不再依赖 90 天 token。Trusted Publisher 必须在包首次存在后配置;当前 GitHub 仓库为私有仓库,因此 npm 不会生成 provenance。若需要 provenance,需要将仓库改为公开。
|
|
99
|
-
|
|
100
|
-
当前版本发布示例:
|
|
17
|
+
使用 Python 3.9 或更高版本将 Skill 安装到 Codex 全局目录:
|
|
101
18
|
|
|
102
19
|
```bash
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
--title v0.1.0 \
|
|
106
|
-
--generate-notes
|
|
20
|
+
ui skill install --agent codex --scope global
|
|
21
|
+
ui skill doctor --agent codex --scope global
|
|
107
22
|
```
|
|
108
23
|
|
|
109
|
-
|
|
24
|
+
也可以将 Skill 安装到当前项目:
|
|
110
25
|
|
|
111
26
|
```bash
|
|
112
|
-
|
|
113
|
-
git push origin main --follow-tags
|
|
114
|
-
gh release create "v$(node -p "require('./package.json').version")" \
|
|
115
|
-
--repo matrixhawk/ui-director-skill \
|
|
116
|
-
--generate-notes
|
|
27
|
+
ui skill install --agent codex --scope project --path .
|
|
117
28
|
```
|
|
118
29
|
|
|
119
|
-
|
|
30
|
+
安装后按宿主要求重新加载或重启 Agent。Skill 自带完整的内置工作流;配套 Skill 是可选项。
|
|
120
31
|
|
|
121
|
-
##
|
|
32
|
+
## 使用
|
|
122
33
|
|
|
123
|
-
|
|
34
|
+
在 Agent 中调用 `ui-director`,例如:
|
|
124
35
|
|
|
125
36
|
```text
|
|
126
|
-
$ui-director
|
|
37
|
+
$ui-director 用 CRAFT 模式改进现有后台的列表和筛选流程。复用已有组件和设计 Token,实际渲染后检查小屏布局、键盘操作和错误状态。
|
|
127
38
|
```
|
|
128
39
|
|
|
129
|
-
|
|
40
|
+
分别判断任务意图、平台、交付物和执行模式。审查任务保持只读;实现任务通过基线、渲染、评审、修复和回归形成验证闭环。FAST、STANDARD、CRAFT、REFERENCE 的默认修复上限为 1、3、5、8 轮,达到目标或遇到阻塞时提前结束。
|
|
130
41
|
|
|
131
|
-
|
|
42
|
+
## 配套 Skill 管理
|
|
132
43
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
日常只需要记两个:
|
|
44
|
+
配套 Skill 还需要 Git。先生成计划,查看来源、版本和文件变更,再应用这份计划:
|
|
136
45
|
|
|
137
46
|
```bash
|
|
138
|
-
ui
|
|
139
|
-
ui
|
|
47
|
+
ui bundle --profile professional --agent codex --scope global --dry-run > bundle-plan.json
|
|
48
|
+
ui bundle --agent codex --scope global --plan bundle-plan.json
|
|
140
49
|
```
|
|
141
50
|
|
|
142
|
-
|
|
51
|
+
更新使用同样的预览流程。日常管理示例:
|
|
143
52
|
|
|
144
53
|
```bash
|
|
145
|
-
ui
|
|
146
|
-
ui
|
|
147
|
-
ui update
|
|
148
|
-
ui update
|
|
149
|
-
ui
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
ui
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
.ui-director/skills.lock.json
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
更新流程:
|
|
175
|
-
|
|
176
|
-
```text
|
|
177
|
-
ui update
|
|
178
|
-
↓
|
|
179
|
-
git fetch origin
|
|
180
|
-
↓
|
|
181
|
-
保存 previous ref
|
|
182
|
-
↓
|
|
183
|
-
切换到新版本
|
|
184
|
-
↓
|
|
185
|
-
Adapter validation
|
|
186
|
-
↓
|
|
187
|
-
Capability validation
|
|
188
|
-
↓
|
|
189
|
-
FAIL ──→ 自动恢复旧版本
|
|
190
|
-
│
|
|
191
|
-
PASS
|
|
192
|
-
↓
|
|
193
|
-
更新 lockfile
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
所以 `ui update` 不会直接把已工作的 Skill 覆盖坏。
|
|
197
|
-
|
|
198
|
-
Provider 内容会作为 Agent 的 specialist 指令读取。请把它们视为外部不可信输入;`ui doctor` 会检查配置来源、锁定 commit 和 tree hash,发现不一致时应先停止并人工确认。
|
|
199
|
-
|
|
200
|
-
## 上游变化如何兼容
|
|
201
|
-
|
|
202
|
-
例如 Jakub 将:
|
|
203
|
-
|
|
204
|
-
```text
|
|
205
|
-
skills/better-layout/SKILL.md
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
改成:
|
|
209
|
-
|
|
210
|
-
```text
|
|
211
|
-
skills/interface-layout/SKILL.md
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
只需修改:
|
|
215
|
-
|
|
216
|
-
```text
|
|
217
|
-
adapters/jakub-skills.json
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
而不是修改 UI Director 的路由方法论。
|
|
221
|
-
|
|
222
|
-
## 路由原则
|
|
223
|
-
|
|
224
|
-
### 新项目、没有视觉方向
|
|
225
|
-
|
|
226
|
-
```text
|
|
227
|
-
Research
|
|
228
|
-
→ Interface/Layout/Typography/Color
|
|
229
|
-
→ Implementation
|
|
230
|
-
→ Accessibility
|
|
231
|
-
→ Audit
|
|
232
|
-
→ Distill
|
|
233
|
-
→ Polish
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### 已有项目新增页面
|
|
237
|
-
|
|
238
|
-
```text
|
|
239
|
-
Design System
|
|
240
|
-
→ Relevant Design Engineering
|
|
241
|
-
→ Implementation
|
|
242
|
-
→ Audit
|
|
243
|
-
→ Polish
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
默认不会调用 UI UX Pro Max,以免破坏已有视觉语言。
|
|
247
|
-
|
|
248
|
-
### 小问题
|
|
249
|
-
|
|
250
|
-
只选择最窄能力,例如:
|
|
251
|
-
|
|
252
|
-
```text
|
|
253
|
-
字体层级问题 → typography
|
|
254
|
-
间距/层级问题 → layout
|
|
255
|
-
键盘/焦点问题 → accessibility
|
|
256
|
-
文案问题 → writing
|
|
257
|
-
视觉细节 → interface
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Audit
|
|
261
|
-
|
|
262
|
-
```text
|
|
263
|
-
Audit
|
|
264
|
-
→ Identify defects
|
|
265
|
-
→ Targeted remediation
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
不会先把页面重做一遍。
|
|
269
|
-
|
|
270
|
-
## 目录说明
|
|
271
|
-
|
|
272
|
-
```text
|
|
273
|
-
ui-director-skill/
|
|
274
|
-
├── SKILL.md # Agent Orchestrator 核心
|
|
275
|
-
├── README.md # 本说明
|
|
276
|
-
├── INSTALL.md # 安装/升级/卸载说明
|
|
277
|
-
├── package.json # 提供 ui / ui-director 命令
|
|
278
|
-
├── bin/
|
|
279
|
-
│ └── ui.mjs # CLI
|
|
280
|
-
├── lib/
|
|
281
|
-
│ └── core.mjs # Provider 管理、校验、回滚
|
|
282
|
-
├── config/
|
|
283
|
-
│ ├── providers.json # 四个官方上游
|
|
284
|
-
│ └── capabilities.json # 逻辑能力注册表
|
|
285
|
-
├── adapters/
|
|
286
|
-
│ ├── ui-ux-pro-max.json
|
|
287
|
-
│ ├── jakub-skills.json
|
|
288
|
-
│ ├── design-system.json
|
|
289
|
-
│ └── impeccable.json
|
|
290
|
-
├── references/
|
|
291
|
-
│ ├── routing.md
|
|
292
|
-
│ ├── project-inspection.md
|
|
293
|
-
│ └── quality-gates.md
|
|
294
|
-
└── examples/
|
|
295
|
-
└── usage.md
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## 官方上游
|
|
299
|
-
|
|
300
|
-
本包 **不包含第三方 Skill 内容**,初始化时从官方仓库获取:
|
|
301
|
-
|
|
302
|
-
- https://github.com/nextlevelbuilder/ui-ux-pro-max-skill
|
|
303
|
-
- https://github.com/jakubkrehel/skills
|
|
304
|
-
- https://github.com/chrometaphore/design-system-skill
|
|
305
|
-
- https://github.com/pbakaus/impeccable
|
|
306
|
-
|
|
307
|
-
各第三方项目继续遵循它们自己的许可证和使用条款。
|
|
308
|
-
|
|
309
|
-
## 设计目标
|
|
310
|
-
|
|
311
|
-
UI Director 的目标不是让 Agent “多调用 Skill”,而是:
|
|
312
|
-
|
|
313
|
-
> 在正确的时间,只加载最少且最合适的 UI/UX 专业知识。
|
|
314
|
-
|
|
315
|
-
最终效果应该是:外部使用极简,内部可更新、可验证、可回滚、可替换。
|
|
54
|
+
ui companions status --agent codex --scope global
|
|
55
|
+
ui companions check-updates --agent codex --scope global
|
|
56
|
+
ui companions update --agent codex --scope global --dry-run > update-plan.json
|
|
57
|
+
ui companions update --agent codex --scope global --plan update-plan.json
|
|
58
|
+
ui companions rollback --agent codex --scope global
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
管理器按计划中的 commit 安装,并记录文件 SHA256。它会保留手动安装和本地修改的 Skill,更新前备份。操作中断后,可用 `ui companions recover` 恢复。
|
|
62
|
+
|
|
63
|
+
## 常用命令
|
|
64
|
+
|
|
65
|
+
| 命令 | 用途 |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `ui skill install` / `ui skill upgrade` | 安装 Skill;升级前备份旧版本 |
|
|
68
|
+
| `ui skill doctor` | 检查 Skill 文件和本地候选 |
|
|
69
|
+
| `ui bundle` | 预览或安装配套 Skill 组合 |
|
|
70
|
+
| `ui companions status` | 查看托管状态 |
|
|
71
|
+
| `ui companions check-updates` | 检查已托管上游的 commit |
|
|
72
|
+
| `ui companions update` / `rollback` | 更新或回滚配套 Skill |
|
|
73
|
+
| `ui companions recover` | 恢复中断的配套 Skill 操作 |
|
|
74
|
+
| `ui route "只审查移动端,不修改代码"` | 预览任务路由 |
|
|
75
|
+
| `ui design-init --platform web` | 创建缺少的设计文档和项目配置 |
|
|
76
|
+
| `ui migrate --dry-run` | 预览旧 `design-system/MASTER.md` 的迁移 |
|
|
77
|
+
| `ui validate-design` | 检查 DESIGN.md 的基本结构 |
|
|
78
|
+
|
|
79
|
+
完整安装说明见 [INSTALL.md](INSTALL.md),使用示例见 [examples/usage.md](examples/usage.md)。可选第三方 Skill 遵循各自许可证;本项目采用 [MIT License](LICENSE)。
|