@captain_z/zsk-skills 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +45 -21
  2. package/bundles.yaml +10 -1
  3. package/design-handoff/design-system/SKILL.md +124 -0
  4. package/design-handoff/figma-generate-hifi/SKILL.md +131 -0
  5. package/design-handoff/figma-to-code/SKILL.md +1 -0
  6. package/design-handoff/ue-mcp/SKILL.md +1 -0
  7. package/design-handoff/ux-wireframe/SKILL.md +129 -0
  8. package/frontend/a11y-web/SKILL.md +1 -0
  9. package/frontend/api-contract-ts/SKILL.md +1 -0
  10. package/frontend/design-frontend/SKILL.md +6 -0
  11. package/frontend/dor-dod-frontend/SKILL.md +1 -0
  12. package/frontend/feature-tasks-frontend/SKILL.md +2 -1
  13. package/frontend/i18n/SKILL.md +1 -0
  14. package/frontend/nfr-web/SKILL.md +1 -0
  15. package/frontend/performance-web/SKILL.md +1 -0
  16. package/frontend/react-components/SKILL.md +1 -0
  17. package/frontend/react-naming/SKILL.md +1 -0
  18. package/frontend/review-frontend/SKILL.md +1 -0
  19. package/frontend/security-web/SKILL.md +1 -0
  20. package/frontend/spec-frontend/SKILL.md +1 -0
  21. package/frontend/styling-system/SKILL.md +1 -0
  22. package/frontend/testing-web/SKILL.md +1 -0
  23. package/frontend/typescript/SKILL.md +1 -0
  24. package/meta/philosophy/SKILL.md +2 -1
  25. package/package.json +1 -1
  26. package/quality/a11y-principles/SKILL.md +1 -0
  27. package/quality/code-hygiene/SKILL.md +1 -0
  28. package/quality/release/SKILL.md +1 -0
  29. package/quality/security-owasp/SKILL.md +1 -0
  30. package/quality/testing-pyramid/SKILL.md +1 -0
  31. package/sdlc/archive/SKILL.md +1 -0
  32. package/sdlc/bugfix/SKILL.md +2 -0
  33. package/sdlc/bugfix-tasks/SKILL.md +1 -0
  34. package/sdlc/coding/SKILL.md +49 -18
  35. package/sdlc/design/SKILL.md +1 -0
  36. package/sdlc/dor-dod/SKILL.md +1 -0
  37. package/sdlc/feature/SKILL.md +21 -0
  38. package/sdlc/proposal/SKILL.md +1 -0
  39. package/sdlc/refactor/SKILL.md +2 -0
  40. package/sdlc/refactor-tasks/SKILL.md +1 -0
  41. package/sdlc/reviewing/SKILL.md +2 -1
  42. package/sdlc/spec/SKILL.md +1 -0
  43. package/sdlc/standard-dev-flow/SKILL.md +33 -32
  44. package/sdlc/task/SKILL.md +3 -2
  45. package/sdlc/task-evidence/SKILL.md +23 -0
  46. package/sdlc/task-structure/SKILL.md +1 -0
  47. package/sdlc/task-tracking/SKILL.md +37 -15
  48. package/sdlc/verify/SKILL.md +2 -0
  49. package/system/adr/SKILL.md +1 -0
  50. package/system/agent-orchestration/SKILL.md +115 -0
  51. package/system/architecture/SKILL.md +1 -0
  52. package/system/glossary/SKILL.md +1 -0
  53. package/system/nfr-baseline/SKILL.md +1 -0
  54. package/system/project-constraints-template/SKILL.md +1 -0
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
1
  # @captain_z/zsk-skills
2
2
 
3
- ZNorth Standard Kit 的内容包:**47 颗原子 skill**,按领域分簇组织,通过 `npx @captain_z/zsk add` 可安装到 Claude / Codex / Gemini 等多 harness。
3
+ ZNorth Standard Kit 的内容包:**51 颗原子 skill**,按领域分簇组织,通过 `npx @captain_z/zsk add` 可安装到 Claude / Codex / Gemini 等多 harness。
4
4
 
5
5
  ## 合规审查(ARCHITECTURE §4.4 硬指标)
6
6
 
7
7
  | 检查项 | 结果 | 说明 |
8
8
  | ---------------------------------------------------------------------------------------- | ------- | ----------------------------------------------------- |
9
- | frontmatter 完整(`name` / `description` / `category` / `domain` / `tier` / `triggers`) | ✓ 47/47 | 结构化 lint 通过 |
10
- | `name` 以 `zsk:` 前缀,扁平 slug | ✓ 47/47 | 命名空间统一 |
11
- | `description` 使用直接陈述风格,触发词放入 `triggers` | ✓ 47/47 | 触发语义由 description + triggers 共同承担 |
12
- | `category` / `domain` / `tier` 枚举值合法 | ✓ 47/47 | stage/workflow/standard/resource/meta · core/optional |
13
- | `triggers` 数组非空 | ✓ 47/47 | 每颗至少 4 个关键词 |
9
+ | frontmatter 完整(`name` / `description` / `category` / `domain` / `tier` / `triggers`) | ✓ 51/51 | 结构化 lint 通过 |
10
+ | `name` 以 `zsk:` 前缀,扁平 slug | ✓ 51/51 | 命名空间统一 |
11
+ | `description` 使用直接陈述风格,触发词放入 `triggers` | ✓ 51/51 | 触发语义由 description + triggers 共同承担 |
12
+ | `category` / `domain` / `tier` 枚举值合法 | ✓ 51/51 | stage/workflow/standard/resource/meta · core/optional |
13
+ | `triggers` 数组非空 | ✓ 51/51 | 每颗至少 4 个关键词 |
14
14
  | 无硬编码项目名 / 技术栈(统一 `{{config.*}}` 占位符) | ✓ | harness-neutral |
15
15
  | `related:` 相对路径合法(build 已重写) | ✓ | 无孤儿引用 |
16
- | 单文件 ≤ 300 行 | ✓ 47/47 | `lint-frontmatter` 作为 error 强制 |
16
+ | 单文件 ≤ 300 行 | ✓ 51/51 | `lint-frontmatter` 作为 error 强制 |
17
17
 
18
18
  当前 `max-lines` 已由 `tools/lint-frontmatter.ts` 作为 error 强制;新增或修改 skill 不应超过 300 行。
19
19
 
@@ -32,6 +32,14 @@ zsk skill 是 LLM **按需自动触发**的资产:
32
32
  - `~/.codex/skills/<domain>/<slug>/SKILL.md` — Codex
33
33
  - `@captain_z/zsk-skills/<domain>/<slug>/SKILL.md` — 通过 npm 读
34
34
 
35
+ ## 和项目知识工作区的关系
36
+
37
+ `zsk init` 生成的 `SYSTEM-SPEC.md`、`zsk.config.yaml`、`.raws/`、`docs/` 和 `.issues/` 是这些 skills 的默认项目上下文。CLI 负责创建模板、维护 schema、刷新 `.raws/manifest.json`,并通过 `zsk config check` / `zsk check` 做确定性校验。
38
+
39
+ Skills 负责更需要判断的部分:理解 SRS、API 契约、Figma/MCP 快照和测试资产,发现模块边界,做跨事实源冲突分析,使用 Computer Use / Browser Use 验证运行时行为,并把问题写入 `.issues/{module}/`。原始测试用例放在 `.raws/testing/`,模块用 `docs/{module}/module.yaml` 映射 raw cases、derived cases、automated tests 和 TDD 要求。
40
+
41
+ 每个阶段都要把确认过的决策、约束、例外和验证结果写回持久文件。缺少 Documentation Feedback 时,`zsk check` 可以把它作为阶段未收口的证据。
42
+
35
43
  ## 领域总览
36
44
 
37
45
  | 领域 | skill 数 | 职责 |
@@ -39,21 +47,21 @@ zsk skill 是 LLM **按需自动触发**的资产:
39
47
  | `sdlc/` | 18 | 7 阶段 SDLC + 3 变更工作流 + task 执行框架 |
40
48
  | `frontend/` | 16 | React + Web 层实现规范 |
41
49
  | `quality/` | 5 | 跨栈质量原则 |
42
- | `design-handoff/` | 2 | 设计交付方法论 |
43
- | `system/` | 5 | 工程宪法级资源 |
50
+ | `design-handoff/` | 5 | 设计交付方法论 |
51
+ | `system/` | 6 | 工程宪法级资源 |
44
52
  | `meta/` | 1 | 元信息 |
45
- | **总计** | **47** | |
53
+ | **总计** | **51** | |
46
54
 
47
55
  ## 安装套件(bundles.yaml)
48
56
 
49
57
  | name | skills | 场景 |
50
58
  | ------------------------------ | ------ | --------------------------------------------- |
51
- | `sdlc-only` | 10 | 纯流程骨架(7 阶段 + 3 工作流),不涉及技术栈 |
52
- | `frontend-project`(推荐) | 29 | SDLC 10 + Frontend 16 + Quality 3 |
53
- | `frontend-with-design-handoff` | 31 | frontend-project + Figma 交付 2 |
59
+ | `sdlc-only` | 11 | 纯流程骨架(7 阶段 + 3 工作流 + Agent 编排),不涉及技术栈 |
60
+ | `frontend-project`(推荐) | 30 | SDLC 10 + Agent 编排 + Frontend 16 + Quality 3 |
61
+ | `frontend-with-design-handoff` | 35 | frontend-project + 设计交付 5 |
54
62
  | `custom` | 交互 | 通过 `zsk add` 任意多选 |
55
63
 
56
- <!-- Auto-generated by tools/catalog.ts — do not edit manually. Total: 47 skills -->
64
+ <!-- Auto-generated by tools/catalog.ts — do not edit manually. Total: 51 skills -->
57
65
 
58
66
  ## Skill 清单(按领域)
59
67
 
@@ -74,8 +82,8 @@ zsk skill 是 LLM **按需自动触发**的资产:
74
82
  触发:`technical design` · `solution design` · `architecture decision` · `current state scan`
75
83
 
76
84
  - **`zsk:coding`** *[stage 4 · stage · core]*
77
- Implementation execution after design freeze — smallest viable change, task-by-task delivery, test-first where risk is high, continuous evidence capture, and local quality gates before review. Stage 4 of the 7-stage SDLC.
78
- 触发:`implementing design` · `task by task delivery` · `local quality gates` · `smallest viable change`
85
+ Implementation execution after design freeze — smallest viable change, auditable delivery batches, explicit TDD rules by change type, continuous evidence capture, and local quality gates before review. Stage 4 of the 7-stage SDLC.
86
+ 触发:`implementing design` · `auditable delivery batches` · `local quality gates` · `smallest viable change`
79
87
 
80
88
  - **`zsk:reviewing`** *[stage 5 · stage · core]*
81
89
  PR 代码审查与 AI 多维审查核心规范。包含 Scope 偏移检测、多视角 Sub-Agent 审查、测试执行流分析、代码整洁/重构纪律、置信度校准以及按严重性排序的判定协议。
@@ -114,7 +122,7 @@ zsk skill 是 LLM **按需自动触发**的资产:
114
122
  触发:`task granularity` · `task estimation` · `T-shirt sizing` · `story points`
115
123
 
116
124
  - **`zsk:task-tracking`** *[core]*
117
- Task execution tracking — dependencies (Mermaid graph), blockers (dated log with severity H/M/L and escalation rules), milestones (stage exits with committed dates), and task state transitions (TODO → DOING → DONE, with BLOCKED requiring log entry).
125
+ Task execution tracking — dependencies (Mermaid graph), blockers (dated log with severity H/M/L and escalation rules), milestones, auditable LLM execution batches, and task state transitions (TODO → DOING → DONE, with BLOCKED requiring log entry).
118
126
  触发:`task dependency graph` · `blocker log` · `milestones` · `task state flow`
119
127
 
120
128
  - **`zsk:bugfix`** *[workflow · core]*
@@ -130,8 +138,8 @@ zsk skill 是 LLM **按需自动触发**的资产:
130
138
  触发:`refactor workflow` · `Fowler refactoring` · `characterization test` · `Parallel Change`
131
139
 
132
140
  - **`zsk:standard-dev-flow`** *[workflow · core]*
133
- 交互式标准开发工作流,包含 9 个核心节点(Prepare, Proposal, Spec, Design, Task, Coding, Review, Verify, Commit)。通过强门禁和 Sub-Agent 审查机制,保障高质量的开发落地。
134
- 触发:`standard dev flow` · `start a new feature workflow` · `execute enterprise workflow` · `9 node development`
141
+ 交互式标准开发工作流,包含 Prepare 预检 + 7 阶段 SDLC(Proposal, Spec, Design, Coding, Reviewing, Verify, Archive)。通过强门禁、可审计批次和多视角审查,保障高质量开发落地。
142
+ 触发:`standard dev flow` · `start a new feature workflow` · `execute enterprise workflow` · `7 stage development`
135
143
 
136
144
  ### `frontend/` — Frontend · React + Web 层实现规范 (16)
137
145
 
@@ -221,7 +229,7 @@ zsk skill 是 LLM **按需自动触发**的资产:
221
229
  Cross-language test strategy & discipline — test pyramid ratio (unit 70 / integration 20 / e2e 10), AAA/GWT structure, coverage targets, and the three hard principles (evidence before assertion, Red-Green-Refactor, bug confidence questioning). Stack-specific tooling (Jest/RTL/MSW/Playwright) is in frontend/testing-web.md.
222
230
  触发:`test pyramid` · `TDD discipline` · `test coverage target` · `AAA GWT structure`
223
231
 
224
- ### `design-handoff/` — Design Handoff · 设计交付方法论 (2)
232
+ ### `design-handoff/` — Design Handoff · 设计交付方法论 (5)
225
233
 
226
234
  - **`zsk:figma-to-code`** *[optional]*
227
235
  Figma design node → production code via MCP — 7-step workflow (locate → extract structure → extract annotations → naming conversion → layout decoding → states → tokens), plus the 4-dimension "100% fidelity" verification (visual / interaction / semantic / responsive). Styling specifics live in zsk:styling-system.
@@ -231,12 +239,28 @@ zsk skill 是 LLM **按需自动触发**的资产:
231
239
  Design Source capture & MCP readout for modules with Figma/design input — Design Source (URL/node-id), MCP readout status, module-specific UE deviations from system baselines, and implementation mapping. Produces docs/{module}/ue-mcp.md + structured description.md snapshot in design-assets. Only records deviations, not duplicated baseline rules.
232
240
  触发:`UE MCP context` · `figma snapshot` · `design source reference` · `module UE deviation`
233
241
 
234
- ### `system/` — System · 工程宪法级资源 (5)
242
+ - **`zsk:ux-wireframe`** *[optional]*
243
+ UX wireframe workflow before high-fidelity design — turns spec scenarios into task flows, information architecture, low-fidelity layouts, and state coverage. Supports Pencil, Excalidraw, Mermaid, or text wireframes when Figma is not ready.
244
+ 触发:`wireframe` · `low fidelity design` · `Pencil design` · `UX flow`
245
+
246
+ - **`zsk:design-system`** *[standard · optional]*
247
+ Design system governance for Figma and frontend alignment — records tokens, component states, naming, responsive rules, accessibility baselines, and anti-generic visual constraints before high-fidelity generation or implementation.
248
+ 触发:`design system` · `design tokens` · `Figma variables` · `component variants`
249
+
250
+ - **`zsk:figma-generate-hifi`** *[workflow · optional]*
251
+ Figma high-fidelity generation workflow from spec, UX wireframes, and design-system rules — creates or updates production-oriented Figma pages with state matrices, responsive variants, annotations, and anti-generic visual checks.
252
+ 触发:`generate Figma` · `high fidelity design` · `figma generate design` · `hifi UI`
253
+
254
+ ### `system/` — System · 工程宪法级资源 (6)
235
255
 
236
256
  - **`zsk:adr`** *[optional]*
237
257
  Cross-module long-lived architectural decision record — context, decision, rationale, alternatives considered, and consequences. Produces docs/system/adrs/ADR-NNNN-{slug}.md. Not for single-module implementation choices.
238
258
  触发:`architecture decision record` · `ADR template` · `MADR` · `cross-module decision`
239
259
 
260
+ - **`zsk:agent-orchestration`** *[core]*
261
+ Agent orchestration protocol for all zsk skills — assigns independent work to specialized Sub-Agents, defines main-agent ownership, role boundaries, review integration, and fallback behavior when delegation is unavailable.
262
+ 触发:`sub agent orchestration` · `parallel agents` · `multi agent workflow` · `agent responsibilities`
263
+
240
264
  - **`zsk:architecture`** *[optional]*
241
265
  Project system architecture documentation — C4 context diagram, tech stack baseline, module boundaries, routing, auth flow, data flow (request/state/contract), deployment topology, related ADRs. Frontend micro-frontend topology is an optional add-on section.
242
266
  触发:`system architecture` · `C4 model` · `tech stack baseline` · `module boundaries`
package/bundles.yaml CHANGED
@@ -20,6 +20,8 @@ bundles:
20
20
  - zsk:feature
21
21
  - zsk:bugfix
22
22
  - zsk:refactor
23
+ # System orchestration
24
+ - zsk:agent-orchestration
23
25
 
24
26
  frontend-project:
25
27
  label: 前端项目(推荐)
@@ -36,6 +38,8 @@ bundles:
36
38
  - zsk:feature
37
39
  - zsk:bugfix
38
40
  - zsk:refactor
41
+ # System orchestration
42
+ - zsk:agent-orchestration
39
43
  # Frontend 16 (5 SDLC overlays + 11 standards)
40
44
  - zsk:spec-frontend
41
45
  - zsk:design-frontend
@@ -73,6 +77,8 @@ bundles:
73
77
  - zsk:feature
74
78
  - zsk:bugfix
75
79
  - zsk:refactor
80
+ # System orchestration
81
+ - zsk:agent-orchestration
76
82
  # Frontend 16
77
83
  - zsk:spec-frontend
78
84
  - zsk:design-frontend
@@ -94,7 +100,10 @@ bundles:
94
100
  - zsk:testing-pyramid
95
101
  - zsk:security-owasp
96
102
  - zsk:a11y-principles
97
- # Design-handoff 2
103
+ # Design-handoff 5
104
+ - zsk:ux-wireframe
105
+ - zsk:design-system
106
+ - zsk:figma-generate-hifi
98
107
  - zsk:figma-to-code
99
108
  - zsk:ue-mcp
100
109
 
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: zsk:design-system
3
+ description: Design system governance for Figma and frontend alignment — records
4
+ tokens, component states, naming, responsive rules, accessibility baselines,
5
+ and anti-generic visual constraints before high-fidelity generation or
6
+ implementation.
7
+ category: standard
8
+ domain: design-handoff
9
+ tier: optional
10
+ related:
11
+ - ../../system/agent-orchestration/SKILL.md
12
+ - ../figma-generate-hifi/SKILL.md
13
+ - ../figma-to-code/SKILL.md
14
+ - ../../frontend/styling-system/SKILL.md
15
+ - ../../frontend/a11y-web/SKILL.md
16
+ - ../../system/nfr-baseline/SKILL.md
17
+ triggers:
18
+ - design system
19
+ - design tokens
20
+ - Figma variables
21
+ - component variants
22
+ - visual language
23
+ - anti generic UI
24
+ ---
25
+
26
+ # Design System · 设计系统治理
27
+
28
+ > **定位**:Figma 与前端之间的共同语言。它定义 token、组件状态、命名、响应式和视觉约束,避免高保真与实现各说各话。
29
+ > **不做**:不绑定特定 UI 库;具体库名来自 `project-config.md`。
30
+
31
+ ## 最低基线
32
+
33
+ 没有完整设计系统时,也必须建立最低可用基线:
34
+
35
+ 1. Color tokens:brand / semantic / surface / text / border / state
36
+ 2. Typography:font family、scale、line-height、用途
37
+ 3. Spacing:4/8 系或项目既有节奏
38
+ 4. Radius / shadow:使用场景,不按审美随意加
39
+ 5. Components:button、input、select、table/list、modal、toast、empty/error
40
+ 6. Responsive:项目断点和布局规则
41
+ 7. A11y:contrast、focus-visible、keyboard、reduced motion
42
+
43
+ ## Token 记录模板
44
+
45
+ ```md
46
+ # Design System Baseline
47
+
48
+ ## 来源
49
+ - Figma variables:
50
+ - 代码 token:
51
+ - UI library:
52
+
53
+ ## Color
54
+ | Token | 用途 | Figma | Code |
55
+ | --- | --- | --- | --- |
56
+
57
+ ## Typography
58
+ | Token | 用途 | Figma | Code |
59
+ | --- | --- | --- | --- |
60
+
61
+ ## Spacing / Radius / Shadow
62
+
63
+ ## Components
64
+ | Component | Variants | States | Figma | Code |
65
+ | --- | --- | --- | --- | --- |
66
+ ```
67
+
68
+ ## 命名规则
69
+
70
+ - Figma 节点名表达语义,不表达视觉:`UserTable/Header` 优于 `Blue Box`
71
+ - Component variant 用稳定维度:`size`, `variant`, `state`, `density`
72
+ - Code class / token 与 Figma 变量保持可搜索映射
73
+ - 旧命名保留 alias 期,避免设计稿改名导致实现断链
74
+
75
+ ## 组件状态基线
76
+
77
+ 每个组件至少说明:
78
+
79
+ - default
80
+ - hover
81
+ - focus-visible
82
+ - active / selected
83
+ - disabled
84
+ - loading
85
+ - error
86
+ - readonly(表单类)
87
+
88
+ 缺状态时不得声称“高保真完整”。
89
+
90
+ ## 视觉差异化约束
91
+
92
+ 设计系统必须写明本产品**不应该长什么样**:
93
+
94
+ ```md
95
+ ## Visual Red Lines
96
+ - 禁止:
97
+ - 谨慎使用:
98
+ - 本产品优先:
99
+ ```
100
+
101
+ 判断标准:
102
+
103
+ - 是否服务真实用户任务,而不是装饰
104
+ - 是否承载真实数据密度
105
+ - 是否能容纳长文本、多语言、权限差异
106
+ - 是否与同类产品有可解释差异
107
+ - 是否能被现有代码 token 实现
108
+
109
+ ## 与前端实现的关系
110
+
111
+ - Figma token → `zsk:styling-system` 的代码 token
112
+ - Component variant → React / Vue / Web 组件 props 或状态
113
+ - Focus / contrast → `zsk:a11y-web`
114
+ - 响应式断点 → `zsk:nfr-web`
115
+ - 特殊偏离 → ADR 或模块 `design.md`
116
+
117
+ ## 质量门禁
118
+
119
+ - [ ] 最低 token 基线齐全
120
+ - [ ] 核心组件状态矩阵齐全
121
+ - [ ] Figma 与代码命名可互查
122
+ - [ ] 视觉红线写明,避免 AI 化同质方案
123
+ - [ ] a11y / responsive / i18n expansion 有明确规则
124
+ - [ ] 高保真生成和实现都引用同一基线
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: zsk:figma-generate-hifi
3
+ description: Figma high-fidelity generation workflow from spec, UX wireframes,
4
+ and design-system rules — creates or updates production-oriented Figma pages
5
+ with state matrices, responsive variants, annotations, and anti-generic visual
6
+ checks.
7
+ category: workflow
8
+ domain: design-handoff
9
+ tier: optional
10
+ related:
11
+ - ../../system/agent-orchestration/SKILL.md
12
+ - ../ux-wireframe/SKILL.md
13
+ - ../design-system/SKILL.md
14
+ - ../ue-mcp/SKILL.md
15
+ - ../figma-to-code/SKILL.md
16
+ - ../../frontend/spec-frontend/SKILL.md
17
+ triggers:
18
+ - generate Figma
19
+ - high fidelity design
20
+ - figma generate design
21
+ - hifi UI
22
+ - AI design not generic
23
+ - design from spec
24
+ ---
25
+
26
+ # Figma Generate Hifi · 从规格生成高保真
27
+
28
+ > **定位**:把 `proposal/spec/ux-wireframe/design-system` 转成可交付、可实现、可验收的 Figma 高保真。
29
+ > **核心原则**:高保真不是漂亮截图。必须带状态、响应式、批注、token 依据和可实现约束。
30
+
31
+ ## 输入顺序
32
+
33
+ 1. `proposal.md`:目标、非范围、品牌/业务语气
34
+ 2. `spec.md`:US / FR / AC / Scenario / NFR
35
+ 3. `ux-wireframe.md`:任务流、信息架构、低保真布局(如有)
36
+ 4. `design-system.md`:token、组件、状态、禁用模式
37
+ 5. 现有产品截图或 Figma 基线(如有)
38
+
39
+ 缺少 Spec 时禁止直接生成高保真;缺设计系统时先走 `zsk:design-system` 建立最低基线。
40
+
41
+ ## 生成协议
42
+
43
+ ### 1. 先定设计方向,不先画页面
44
+
45
+ ```md
46
+ ## 设计方向
47
+ - 用户场景:
48
+ - 信息密度:低 / 中 / 高
49
+ - 品牌语气:克制 / 专业 / 消费级 / 数据密集 / 创作型 / 其他
50
+ - 交互节奏:快速录入 / 扫描比较 / 深度编辑 / 决策审批
51
+ - 视觉差异化原则:
52
+ ```
53
+
54
+ ### 2. 反 AI 化检查
55
+
56
+ 禁止把下列模式作为默认方案:
57
+
58
+ - 大面积紫蓝渐变、发光边框、玻璃拟态
59
+ - 无业务信息的卡片堆叠
60
+ - 过大的 marketing hero 套进业务系统
61
+ - 与产品无关的装饰插画
62
+ - 所有页面同一种圆角、阴影、间距节奏
63
+ - 假数据密度过低,真实文案一上来就溢出
64
+
65
+ 必须至少选择 3 个来自产品本身的差异化来源:
66
+
67
+ | 来源 | 例子 |
68
+ | --- | --- |
69
+ | 领域对象 | 表格、树、时间线、地图、编辑器、审批流 |
70
+ | 用户节奏 | 高频录入、扫描比较、批量处理、异常处理 |
71
+ | 真实内容 | 长标题、多语言、权限状态、异常数值 |
72
+ | 品牌约束 | 色彩、字体、语气、图标风格 |
73
+ | 设备环境 | 桌面密集、移动单手、触屏、投屏 |
74
+
75
+ ### 3. Figma 页面结构
76
+
77
+ 每个模块至少建立:
78
+
79
+ - Cover / index(模块名、事实源、版本)
80
+ - Main flow(主路径)
81
+ - States(状态矩阵)
82
+ - Responsive(关键断点)
83
+ - Components / variants(仅模块新增或覆写)
84
+ - Notes(交互、a11y、实现注意)
85
+
86
+ ### 4. 状态与响应式
87
+
88
+ 高保真必须覆盖:
89
+
90
+ - default / loading / empty / error
91
+ - hover / focus-visible / disabled / selected
92
+ - permission denied(如适用)
93
+ - long text / overflow / i18n expansion
94
+ - desktop / tablet / mobile 或项目配置断点
95
+
96
+ ### 5. 批注规则
97
+
98
+ Figma 批注必须写清:
99
+
100
+ - 触发条件
101
+ - 动效 / 延迟 / 防抖
102
+ - 键盘行为
103
+ - a11y 语义
104
+ - 失败反馈
105
+ - 与现有组件或 token 的映射
106
+
107
+ ## 输出
108
+
109
+ ```md
110
+ ## High-fidelity Design Handoff
111
+ - Figma URL:
112
+ - Page:
113
+ - Node IDs:
114
+ - Design system baseline:
115
+ - Generated from:
116
+ - proposal:
117
+ - spec:
118
+ - ux-wireframe:
119
+ - Open questions:
120
+ ```
121
+
122
+ 生成后必须更新 `docs/{module}/ue-mcp.md`,让后续 `zsk:figma-to-code` 有稳定事实源。
123
+
124
+ ## 质量门禁
125
+
126
+ - [ ] 设计方向来自产品场景,不是通用 AI 模板
127
+ - [ ] 至少 3 个差异化来源已写明
128
+ - [ ] 状态矩阵和响应式断点齐全
129
+ - [ ] 组件 / token 映射到 `zsk:design-system`
130
+ - [ ] 批注覆盖交互、a11y、失败反馈
131
+ - [ ] Figma URL / node-id 已登记到 `ue-mcp.md`
@@ -9,6 +9,7 @@ category: resource
9
9
  domain: design-handoff
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../ue-mcp/SKILL.md
13
14
  - ../../frontend/styling-system/SKILL.md
14
15
  - ../../frontend/a11y-web/SKILL.md
@@ -9,6 +9,7 @@ category: resource
9
9
  domain: design-handoff
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../figma-to-code/SKILL.md
13
14
  - ../../frontend/a11y-web/SKILL.md
14
15
  - ../../sdlc/spec/SKILL.md
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: zsk:ux-wireframe
3
+ description: UX wireframe workflow before high-fidelity design — turns spec
4
+ scenarios into task flows, information architecture, low-fidelity layouts, and
5
+ state coverage. Supports Pencil, Excalidraw, Mermaid, or text wireframes when
6
+ Figma is not ready.
7
+ category: resource
8
+ domain: design-handoff
9
+ tier: optional
10
+ related:
11
+ - ../../system/agent-orchestration/SKILL.md
12
+ - ../../sdlc/spec/SKILL.md
13
+ - ../../sdlc/proposal/SKILL.md
14
+ - ../figma-generate-hifi/SKILL.md
15
+ - ../ue-mcp/SKILL.md
16
+ triggers:
17
+ - wireframe
18
+ - low fidelity design
19
+ - Pencil design
20
+ - UX flow
21
+ - information architecture
22
+ - prototype before Figma
23
+ ---
24
+
25
+ # UX Wireframe · 低保真体验设计
26
+
27
+ > **定位**:Spec 到高保真设计之间的体验结构层。先确认用户任务、信息层级、状态和交互路径,再进入 Figma 高保真。
28
+ > **适用**:没有 Figma、Figma 只有草图、或需要先用 Pencil / Excalidraw / Mermaid 快速对齐流程。
29
+ > **不做**:不定义最终视觉风格、不替代 design system、不输出可编码的视觉 token。
30
+
31
+ ## 工作流
32
+
33
+ ```text
34
+ Spec 场景 → 用户任务流 → 信息架构 → 低保真布局 → 状态覆盖 → 交互批注 → 高保真输入
35
+ ```
36
+
37
+ ### 1. 输入检查
38
+
39
+ 必须读取:
40
+
41
+ - `proposal.md` 的目标、非范围和风险
42
+ - `spec.md` 的 US / FR / AC / Scenario
43
+ - 现有产品页面或系统约束(如有)
44
+
45
+ 如果 Spec 缺关键路径,先回 `zsk:spec` 补 Delta,不靠线框图私自发明需求。
46
+
47
+ ### 2. 任务流
48
+
49
+ 每个 P0 用户目标至少一条主路径:
50
+
51
+ ```md
52
+ ## 用户任务流
53
+
54
+ | Flow | 角色 | 入口 | 关键步骤 | 成功结果 | 失败/退出 |
55
+ | --- | --- | --- | --- | --- | --- |
56
+ | F-1 | | | 1 → 2 → 3 | | |
57
+ ```
58
+
59
+ ### 3. 信息架构
60
+
61
+ 先决定信息优先级,再画布局:
62
+
63
+ - 用户做决策必须看到什么
64
+ - 哪些信息可折叠 / 延迟加载
65
+ - 哪些操作是主操作、次操作、危险操作
66
+ - 空 / 错 / 加载状态是否仍能解释下一步
67
+
68
+ ### 4. 低保真表达方式
69
+
70
+ 优先使用团队已有工具;没有约定时按速度选择:
71
+
72
+ | 场景 | 推荐表达 |
73
+ | --- | --- |
74
+ | 快速对齐流程 | Mermaid flowchart / sequence |
75
+ | 页面布局草图 | Pencil / Excalidraw |
76
+ | 文档内轻量表达 | ASCII wireframe |
77
+ | 需要点击原型 | Figma low-fi prototype |
78
+
79
+ Pencil 适合低保真,不承担 token、组件状态、响应式和高保真验收。
80
+
81
+ ### 5. 状态覆盖
82
+
83
+ 每个可交互区域至少检查:
84
+
85
+ - default
86
+ - loading
87
+ - empty
88
+ - error
89
+ - disabled
90
+ - hover / focus-visible
91
+ - selected / active(如适用)
92
+ - long text / overflow
93
+ - permission denied(如适用)
94
+
95
+ ### 6. 交付模板
96
+
97
+ ```md
98
+ # {模块} UX Wireframe
99
+
100
+ ## 事实源
101
+ - Spec:
102
+ - Proposal:
103
+
104
+ ## 用户任务流
105
+
106
+ ## 信息架构
107
+
108
+ ## 低保真布局
109
+ - 工具:Pencil / Excalidraw / Mermaid / ASCII / Figma low-fi
110
+ - 文件 / 链接:
111
+
112
+ ## 状态矩阵
113
+
114
+ | 区域 | 状态 | 触发条件 | 预期反馈 |
115
+ | --- | --- | --- | --- |
116
+
117
+ ## 待进入高保真的输入
118
+ - 关键路径:
119
+ - 必须保留的信息层级:
120
+ - 需要设计系统确认的组件:
121
+ ```
122
+
123
+ ## 质量门禁
124
+
125
+ - [ ] 每个 P0 Scenario 都有任务流
126
+ - [ ] 信息优先级明确,不只画布局
127
+ - [ ] 状态矩阵覆盖 loading / empty / error / disabled / focus
128
+ - [ ] 没有新增 Spec 未声明的行为
129
+ - [ ] 可作为 `zsk:figma-generate-hifi` 的输入
@@ -10,6 +10,7 @@ category: standard
10
10
  domain: frontend
11
11
  tier: optional
12
12
  related:
13
+ - ../../system/agent-orchestration/SKILL.md
13
14
  - ../react-components/SKILL.md
14
15
  - ../i18n/SKILL.md
15
16
  - ../testing-web/SKILL.md
@@ -10,6 +10,7 @@ category: standard
10
10
  domain: frontend
11
11
  tier: optional
12
12
  related:
13
+ - ../../system/agent-orchestration/SKILL.md
13
14
  - ../typescript/SKILL.md
14
15
  - ../testing-web/SKILL.md
15
16
  - ../../sdlc/spec/SKILL.md
@@ -13,11 +13,15 @@ variants:
13
13
  - bugfix
14
14
  - refactor
15
15
  related:
16
+ - ../../system/agent-orchestration/SKILL.md
16
17
  - ../../sdlc/design/SKILL.md
17
18
  - ../spec-frontend/SKILL.md
18
19
  - ../performance-web/SKILL.md
19
20
  - ../nfr-web/SKILL.md
20
21
  - ../react-components/SKILL.md
22
+ - ../../design-handoff/ux-wireframe/SKILL.md
23
+ - ../../design-handoff/design-system/SKILL.md
24
+ - ../../design-handoff/figma-generate-hifi/SKILL.md
21
25
  - ../../design-handoff/figma-to-code/SKILL.md
22
26
  triggers:
23
27
  - frontend design
@@ -97,6 +101,8 @@ Spec 的每个 UE 状态必须说明**由哪个容器 / class / 分支渲染**
97
101
 
98
102
  **原则**:引用 `docs/{module}/ue-mcp.md` 的命名映射表([`zsk:figma-to-code`](../../design-handoff/figma-to-code/SKILL.md) Step 4 产物),不重复。
99
103
 
104
+ 若本模块没有现成 Figma,高保真输入必须先通过 [`zsk:ux-wireframe`](../../design-handoff/ux-wireframe/SKILL.md) + [`zsk:figma-generate-hifi`](../../design-handoff/figma-generate-hifi/SKILL.md) 生成;视觉 token 和组件状态引用 [`zsk:design-system`](../../design-handoff/design-system/SKILL.md)。禁止在 Design 阶段凭空补视觉行为。
105
+
100
106
  ### D. 性能预算(Core Web Vitals)
101
107
 
102
108
  继承 [`frontend/nfr-web`](../nfr-web/SKILL.md) 的系统基线,模块级可加严:
@@ -12,6 +12,7 @@ variants:
12
12
  - bugfix
13
13
  - refactor
14
14
  related:
15
+ - ../../system/agent-orchestration/SKILL.md
15
16
  - ../../sdlc/dor-dod/SKILL.md
16
17
  - ../spec-frontend/SKILL.md
17
18
  - ../design-frontend/SKILL.md
@@ -8,6 +8,7 @@ domain: frontend
8
8
  tier: optional
9
9
  change_type: feature
10
10
  related:
11
+ - ../../system/agent-orchestration/SKILL.md
11
12
  - ../../sdlc/task-structure/SKILL.md
12
13
  - ../../sdlc/task-evidence/SKILL.md
13
14
  - ../../sdlc/task-tracking/SKILL.md
@@ -33,7 +34,7 @@ triggers:
33
34
  - **测试驱动优先**:能 TDD 就 TDD(`superpowers:test-driven-development`)
34
35
  - **契约驱动**:Props / Event / API 类型引自 Spec,不自造
35
36
  - **强制 7 类任务**:组件类需求至少覆盖下述 7 个类别
36
- - **证据先于断言**:每任务完成必须有验证链接
37
+ - **证据先于断言**:每个任务组 / 可审计批次完成必须有验证链接
37
38
 
38
39
  ## 7 类强制任务
39
40
 
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: frontend
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../react-naming/SKILL.md
13
14
  - ../a11y-web/SKILL.md
14
15
  - ../../system/nfr-baseline/SKILL.md
@@ -10,6 +10,7 @@ category: resource
10
10
  domain: frontend
11
11
  tier: optional
12
12
  related:
13
+ - ../../system/agent-orchestration/SKILL.md
13
14
  - ../performance-web/SKILL.md
14
15
  - ../a11y-web/SKILL.md
15
16
  - ../security-web/SKILL.md