project-tiny-context-harness 0.6.2 → 0.7.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.
Files changed (57) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +342 -333
  3. package/assets/README.md +497 -487
  4. package/assets/README.zh-CN.md +266 -256
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +56 -56
  7. package/assets/context_templates/architecture.md +33 -33
  8. package/assets/context_templates/area.md +39 -39
  9. package/assets/context_templates/context.toml +30 -30
  10. package/assets/context_templates/deployment.md +35 -35
  11. package/assets/context_templates/global.md +55 -55
  12. package/assets/context_templates/product-surface-contract.md +63 -63
  13. package/assets/context_templates/verification.md +32 -32
  14. package/assets/github/.gitkeep +1 -1
  15. package/assets/github/harness.yml +41 -41
  16. package/assets/make/.gitkeep +1 -1
  17. package/assets/make/ty-context.mk +48 -48
  18. package/assets/skills/context_development_engineer/SKILL.md +90 -90
  19. package/assets/skills/context_full_project_export/SKILL.md +70 -70
  20. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  21. package/assets/skills/context_product_plan/SKILL.md +77 -77
  22. package/assets/skills/context_surface_contract/SKILL.md +171 -171
  23. package/assets/skills/context_uiux_design/SKILL.md +99 -99
  24. package/assets/skills/long-task-workflow/SKILL.md +75 -71
  25. package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
  26. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +53 -41
  27. package/assets/skills/long-task-workflow/references/contract-authoring.md +57 -43
  28. package/assets/skills/long-task-workflow/references/evidence-design.md +40 -32
  29. package/assets/skills/normal-long-task/SKILL.md +12 -12
  30. package/assets/skills/source-plan-authoring/SKILL.md +295 -295
  31. package/dist/commands/check-modularity.js +10 -10
  32. package/dist/commands/long-task-authoring.js +65 -65
  33. package/dist/commands/long-task-command-args.d.ts +3 -0
  34. package/dist/commands/long-task-command-args.js +20 -0
  35. package/dist/commands/long-task-revision.d.ts +1 -0
  36. package/dist/commands/long-task-revision.js +137 -0
  37. package/dist/commands/long-task.js +20 -120
  38. package/dist/lib/long-task-authority-revision-details.d.ts +2 -0
  39. package/dist/lib/long-task-authority-revision-details.js +10 -0
  40. package/dist/lib/long-task-authority-revision-diagnosis.d.ts +24 -0
  41. package/dist/lib/long-task-authority-revision-diagnosis.js +141 -0
  42. package/dist/lib/long-task-authority-revision-enforcement.d.ts +3 -1
  43. package/dist/lib/long-task-authority-revision-enforcement.js +17 -9
  44. package/dist/lib/long-task-authority-revision-summary.d.ts +11 -0
  45. package/dist/lib/long-task-authority-revision-summary.js +99 -0
  46. package/dist/lib/long-task-authority-revision-types.d.ts +44 -1
  47. package/dist/lib/long-task-authority-revision.js +9 -1
  48. package/dist/lib/long-task-delivery-compiler.d.ts +3 -0
  49. package/dist/lib/long-task-delivery-compiler.js +5 -2
  50. package/dist/lib/long-task-state.d.ts +3 -15
  51. package/dist/lib/long-task-status-v2.d.ts +2 -0
  52. package/dist/lib/long-task-status-v2.js +12 -2
  53. package/dist/lib/long-task-verifier-v2.d.ts +4 -0
  54. package/dist/lib/long-task-verifier-v2.js +1 -1
  55. package/migrations/README.md +8 -8
  56. package/package.json +5 -1
  57. package/source-mappings.yaml +25 -25
@@ -1,176 +1,176 @@
1
- ---
2
- name: context_surface_contract
3
- description: Use when the user asks for Product Surface Contract, Surface Contract, Screen Contract, product surface responsibility, surface responsibility audit, information architecture governance, main/drilldown ownership, UI product boundary, product surface compiler, 产品界面职责治理, 产品接触面, 用户接触面, 页面职责契约, 界面责任契约, 主层/下钻归属, or asks to turn broad UI/product principles into project Context in a Minimal Context Harness project. Do not trigger for ordinary CSS tweaks, one-off UI bug fixes, copy edits, or implementation-only tasks unless the user explicitly asks to define or repair durable product-surface responsibility or information architecture contracts.
4
- ---
5
-
6
- # Context Surface Contract
7
-
8
- ## Package-Managed Boundary
9
-
10
- This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_surface_contract` Skill directly.
11
-
12
- Project-specific Product Surface responsibilities belong in `project_context/**` and optional project-local Skills such as `<harnessRoot>/skills/product_plan/SKILL.md`, `<harnessRoot>/skills/uiux_design/SKILL.md`, `<harnessRoot>/skills/development_engineer/SKILL.md` or `<harnessRoot>/skills/surface_contract/SKILL.md`. The package-managed Skill teaches the compiler workflow only; it must not contain business-specific page duties, provider facts, project names, raw payload schemas or product examples.
13
-
14
- ## Purpose
15
-
16
- Help agents turn broad product/UI principles into concrete, project-owned Product Surface Contracts while keeping Minimal Context small.
17
-
18
- A Product Surface is any user-facing interface where users make judgments, take actions and receive feedback. Covered platforms include Web apps, dashboards, admin or operations UI, mobile screens, desktop windows, game UI/HUD/menu scenes, CLI/TUI output, browser extension or plugin UI, and embedded, kiosk or device UI.
19
-
20
- ## Context Roles
21
-
22
- Do not add a new `context_role`.
23
-
24
- Use existing roles:
25
-
26
- - `contract` for cross-surface, cross-area or project-level Product Surface Contracts.
27
- - `area` or `subdomain` for owning product-domain Screen Contracts.
28
- - `verification` for repeatable UI, CLI, app or product-surface validation paths.
29
- - `decision-rationale` for stable product-surface tradeoff reasons.
30
- - `implementation-index` for code navigation only.
31
-
32
- Forbidden roles include `surface-contract`, `product-surface`, `web-contract`, `app-contract` and `game-surface`.
33
-
34
- Use `DESIGN.md` only for visual identity, visual tokens and visual rationale. Do not put surface responsibility, main/drilldown ownership or diagnostic placement into `DESIGN.md`.
35
-
36
- ## Mode Selection
37
-
38
- Use the narrowest mode that matches the request:
39
-
40
- - Audit Mode: inspect whether existing surfaces have clear responsibility.
41
- - Compile Mode: turn audit findings or user decisions into Context candidates.
42
- - Apply Mode: write durable Context only when the user explicitly allows durable writes.
43
- - Conformance Mode: check implementation against an existing Product Surface Contract.
44
-
45
- Do not run implementation, long validation, browser smoke, app smoke or CLI smoke unless the user explicitly asks for execution.
46
-
47
- ## Audit Mode
48
-
49
- Use when the user asks to inspect, review or audit surface responsibility.
50
-
51
- Output only:
52
-
53
- - Surface list.
54
- - Surface platform.
55
- - Code, screenshot, CLI or app evidence inspected.
56
- - Existing Context expectation.
57
- - Drift, missing contract or backend complexity exposure.
58
- - Candidate `Context Delta`.
59
- - Suggested durable placement.
60
- - Optional temporary audit path under `tmp/**` when useful.
61
-
62
- Do not edit durable Context by default. Code, screenshots and CLI output are evidence of current implementation, not authority for product responsibility.
63
-
64
- ## Compile Mode
65
-
66
- Use when turning audit findings or user decisions into Context candidates.
67
-
68
- Output:
69
-
70
- - Project-level Product Surface Contract candidate when responsibilities cross surfaces or areas.
71
- - Area-level Screen Contract candidate when ownership belongs inside one domain.
72
- - `context.toml` candidate registration with `role = "contract"` when durable registration is needed.
73
- - `global.md#Context Index` candidate entry when a new Context file is added.
74
- - Verification candidate for repeatable surface checks.
1
+ ---
2
+ name: context_surface_contract
3
+ description: Use when the user asks for Product Surface Contract, Surface Contract, Screen Contract, product surface responsibility, surface responsibility audit, information architecture governance, main/drilldown ownership, UI product boundary, product surface compiler, 产品界面职责治理, 产品接触面, 用户接触面, 页面职责契约, 界面责任契约, 主层/下钻归属, or asks to turn broad UI/product principles into project Context in a Minimal Context Harness project. Do not trigger for ordinary CSS tweaks, one-off UI bug fixes, copy edits, or implementation-only tasks unless the user explicitly asks to define or repair durable product-surface responsibility or information architecture contracts.
4
+ ---
5
+
6
+ # Context Surface Contract
7
+
8
+ ## Package-Managed Boundary
9
+
10
+ This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_surface_contract` Skill directly.
11
+
12
+ Project-specific Product Surface responsibilities belong in `project_context/**` and optional project-local Skills such as `<harnessRoot>/skills/product_plan/SKILL.md`, `<harnessRoot>/skills/uiux_design/SKILL.md`, `<harnessRoot>/skills/development_engineer/SKILL.md` or `<harnessRoot>/skills/surface_contract/SKILL.md`. The package-managed Skill teaches the compiler workflow only; it must not contain business-specific page duties, provider facts, project names, raw payload schemas or product examples.
13
+
14
+ ## Purpose
15
+
16
+ Help agents turn broad product/UI principles into concrete, project-owned Product Surface Contracts while keeping Minimal Context small.
17
+
18
+ A Product Surface is any user-facing interface where users make judgments, take actions and receive feedback. Covered platforms include Web apps, dashboards, admin or operations UI, mobile screens, desktop windows, game UI/HUD/menu scenes, CLI/TUI output, browser extension or plugin UI, and embedded, kiosk or device UI.
19
+
20
+ ## Context Roles
21
+
22
+ Do not add a new `context_role`.
23
+
24
+ Use existing roles:
25
+
26
+ - `contract` for cross-surface, cross-area or project-level Product Surface Contracts.
27
+ - `area` or `subdomain` for owning product-domain Screen Contracts.
28
+ - `verification` for repeatable UI, CLI, app or product-surface validation paths.
29
+ - `decision-rationale` for stable product-surface tradeoff reasons.
30
+ - `implementation-index` for code navigation only.
31
+
32
+ Forbidden roles include `surface-contract`, `product-surface`, `web-contract`, `app-contract` and `game-surface`.
33
+
34
+ Use `DESIGN.md` only for visual identity, visual tokens and visual rationale. Do not put surface responsibility, main/drilldown ownership or diagnostic placement into `DESIGN.md`.
35
+
36
+ ## Mode Selection
37
+
38
+ Use the narrowest mode that matches the request:
39
+
40
+ - Audit Mode: inspect whether existing surfaces have clear responsibility.
41
+ - Compile Mode: turn audit findings or user decisions into Context candidates.
42
+ - Apply Mode: write durable Context only when the user explicitly allows durable writes.
43
+ - Conformance Mode: check implementation against an existing Product Surface Contract.
44
+
45
+ Do not run implementation, long validation, browser smoke, app smoke or CLI smoke unless the user explicitly asks for execution.
46
+
47
+ ## Audit Mode
48
+
49
+ Use when the user asks to inspect, review or audit surface responsibility.
50
+
51
+ Output only:
52
+
53
+ - Surface list.
54
+ - Surface platform.
55
+ - Code, screenshot, CLI or app evidence inspected.
56
+ - Existing Context expectation.
57
+ - Drift, missing contract or backend complexity exposure.
58
+ - Candidate `Context Delta`.
59
+ - Suggested durable placement.
60
+ - Optional temporary audit path under `tmp/**` when useful.
61
+
62
+ Do not edit durable Context by default. Code, screenshots and CLI output are evidence of current implementation, not authority for product responsibility.
63
+
64
+ ## Compile Mode
65
+
66
+ Use when turning audit findings or user decisions into Context candidates.
67
+
68
+ Output:
69
+
70
+ - Project-level Product Surface Contract candidate when responsibilities cross surfaces or areas.
71
+ - Area-level Screen Contract candidate when ownership belongs inside one domain.
72
+ - `context.toml` candidate registration with `role = "contract"` when durable registration is needed.
73
+ - `global.md#Context Index` candidate entry when a new Context file is added.
74
+ - Verification candidate for repeatable surface checks.
75
75
  - Internal source classification when an external product, architecture, technical or acceptance source changes durable surface responsibility; do not create a Markdown coverage table.
76
- - Repo-local Skill task-block candidate when the user wants project-specific enforcement.
77
-
78
- Do not assume business responsibilities from current code shape alone. Ask for confirmation if the candidate would silently choose between competing product or information-architecture meanings.
79
-
80
- ## Apply Mode
81
-
82
- Use only when the user explicitly allows durable writes.
83
-
84
- Allowed writes:
85
-
86
- - `project_context/**`.
87
- - `project_context/context.toml`.
88
- - `project_context/global.md#Context Index`.
89
- - Optional `verification` role Context.
90
- - Optional separate project-local Skill files when the user explicitly wants project-local enforcement.
91
-
92
- Forbidden writes:
93
-
94
- - Package-managed generated Skills in a consumer project.
95
- - `<harnessRoot>/ty-context-managed/**` in a consumer project.
96
- - Business code unless the user also requested implementation.
97
- - Generated files.
98
- - `DESIGN.md`, except visual tokens or visual rationale that do not belong in a Product Surface Contract.
99
-
100
- If `Surface Contract Hit` is `none` and the task creates durable surface responsibility, set `Context Delta: required` and update project Context before implementation alignment.
101
-
102
- ## Conformance Mode
103
-
104
- Use after implementation or during review.
105
-
106
- Output:
107
-
108
- - Surface Contract Conformance.
76
+ - Repo-local Skill task-block candidate when the user wants project-specific enforcement.
77
+
78
+ Do not assume business responsibilities from current code shape alone. Ask for confirmation if the candidate would silently choose between competing product or information-architecture meanings.
79
+
80
+ ## Apply Mode
81
+
82
+ Use only when the user explicitly allows durable writes.
83
+
84
+ Allowed writes:
85
+
86
+ - `project_context/**`.
87
+ - `project_context/context.toml`.
88
+ - `project_context/global.md#Context Index`.
89
+ - Optional `verification` role Context.
90
+ - Optional separate project-local Skill files when the user explicitly wants project-local enforcement.
91
+
92
+ Forbidden writes:
93
+
94
+ - Package-managed generated Skills in a consumer project.
95
+ - `<harnessRoot>/ty-context-managed/**` in a consumer project.
96
+ - Business code unless the user also requested implementation.
97
+ - Generated files.
98
+ - `DESIGN.md`, except visual tokens or visual rationale that do not belong in a Product Surface Contract.
99
+
100
+ If `Surface Contract Hit` is `none` and the task creates durable surface responsibility, set `Context Delta: required` and update project Context before implementation alignment.
101
+
102
+ ## Conformance Mode
103
+
104
+ Use after implementation or during review.
105
+
106
+ Output:
107
+
108
+ - Surface Contract Conformance.
109
109
  - External-source constraint classification and implementation alignment status.
110
- - Remaining Drift.
111
- - Missing Context.
112
- - Implementation Drift.
113
- - Verification run / not_run / failed.
114
-
115
- Do not store one-off evidence, screenshots, logs, raw outputs or implementation summaries in Context.
116
-
117
- ## Compiler Questions
118
-
119
- For each touched surface, answer only what is relevant:
120
-
121
- - What surface is being touched?
122
- - What platform shape does it have?
123
- - What primary user question does it answer?
124
- - What belongs on the main surface?
125
- - What must move to drilldown, diagnostics, operations, evidence or technical detail?
126
- - Which long-running or mutating actions require task id, progress, retry, import, recovery or history?
127
- - Which empty, loading, stale, unavailable, fixture or fallback states matter?
128
- - What validation path can prove conformance?
129
- - If this came from an external plan/source, which source constraints are covered by existing Context, require new Context, are task-local only, are explicitly out of scope, need user decision or remain under-scoped?
130
-
131
- ## Repo-Local Task Block Candidate
132
-
133
- When the user wants project-local enforcement, propose a separate project-local Skill block like this and tailor only the project-specific answers:
134
-
135
- ```markdown
136
- ## Surface Contract Task Block
137
-
138
- For any task touching user-facing surfaces, information placement, forms, filters, search, long-running UI actions, diagnostics, evidence, CLI/TUI output or main/drilldown ownership, answer before implementation:
139
-
140
- - Surface Contract Hit: `<context file / none>`
141
- - Surface: `<route / screen / window / panel / command / HUD / menu>`
142
- - Surface Platform: `<web | mobile | desktop | game | cli-tui | extension | embedded | mixed>`
143
- - Owning Product Domain: `<area / subdomain>`
144
- - Primary User Question: `<one concrete user judgment>`
145
- - Main Surface Allows: `<durable visible information and actions>`
146
- - Main Surface Forbids: `<backend fields, raw payloads, diagnostics, debug ids, fake states, etc.>`
147
- - Drilldown Ownership: `<details / evidence / operations / diagnostics / technical details>`
148
- - Long Task State Requirement: `<run id, progress, retry, recovery, import, history, or none>`
149
- - Context Delta: `<none | required>`
150
- - Verification: `<view-model test / component test / browser smoke / CLI smoke / manual check>`
110
+ - Remaining Drift.
111
+ - Missing Context.
112
+ - Implementation Drift.
113
+ - Verification run / not_run / failed.
114
+
115
+ Do not store one-off evidence, screenshots, logs, raw outputs or implementation summaries in Context.
116
+
117
+ ## Compiler Questions
118
+
119
+ For each touched surface, answer only what is relevant:
120
+
121
+ - What surface is being touched?
122
+ - What platform shape does it have?
123
+ - What primary user question does it answer?
124
+ - What belongs on the main surface?
125
+ - What must move to drilldown, diagnostics, operations, evidence or technical detail?
126
+ - Which long-running or mutating actions require task id, progress, retry, import, recovery or history?
127
+ - Which empty, loading, stale, unavailable, fixture or fallback states matter?
128
+ - What validation path can prove conformance?
129
+ - If this came from an external plan/source, which source constraints are covered by existing Context, require new Context, are task-local only, are explicitly out of scope, need user decision or remain under-scoped?
130
+
131
+ ## Repo-Local Task Block Candidate
132
+
133
+ When the user wants project-local enforcement, propose a separate project-local Skill block like this and tailor only the project-specific answers:
134
+
135
+ ```markdown
136
+ ## Surface Contract Task Block
137
+
138
+ For any task touching user-facing surfaces, information placement, forms, filters, search, long-running UI actions, diagnostics, evidence, CLI/TUI output or main/drilldown ownership, answer before implementation:
139
+
140
+ - Surface Contract Hit: `<context file / none>`
141
+ - Surface: `<route / screen / window / panel / command / HUD / menu>`
142
+ - Surface Platform: `<web | mobile | desktop | game | cli-tui | extension | embedded | mixed>`
143
+ - Owning Product Domain: `<area / subdomain>`
144
+ - Primary User Question: `<one concrete user judgment>`
145
+ - Main Surface Allows: `<durable visible information and actions>`
146
+ - Main Surface Forbids: `<backend fields, raw payloads, diagnostics, debug ids, fake states, etc.>`
147
+ - Drilldown Ownership: `<details / evidence / operations / diagnostics / technical details>`
148
+ - Long Task State Requirement: `<run id, progress, retry, recovery, import, history, or none>`
149
+ - Context Delta: `<none | required>`
150
+ - Verification: `<view-model test / component test / browser smoke / CLI smoke / manual check>`
151
151
  ```
152
-
153
- Do not add this task block to package-managed default Skills as a universal gate. Projects opt in through separate project-local Skills.
154
-
155
- ## Implementation Alignment
156
-
157
- When implementation is also requested, align code with the Product Surface Contract:
158
-
159
- - View-models or presenters should expose user-facing states instead of raw backend payloads when that contract exists.
160
- - Components or commands should render main-surface facts and move technical details to the owning drilldown.
161
- - Long-running actions should persist or recover the required operation state.
162
- - Tests should assert user-facing state semantics, not only backend field plumbing.
163
- - Browser, app, CLI or game smoke checks should validate actual surface behavior when feasible.
164
-
165
- Final handoff should include concise `Surface Contract Conformance`: contract source, implementation alignment, remaining drift and verification status.
166
-
152
+
153
+ Do not add this task block to package-managed default Skills as a universal gate. Projects opt in through separate project-local Skills.
154
+
155
+ ## Implementation Alignment
156
+
157
+ When implementation is also requested, align code with the Product Surface Contract:
158
+
159
+ - View-models or presenters should expose user-facing states instead of raw backend payloads when that contract exists.
160
+ - Components or commands should render main-surface facts and move technical details to the owning drilldown.
161
+ - Long-running actions should persist or recover the required operation state.
162
+ - Tests should assert user-facing state semantics, not only backend field plumbing.
163
+ - Browser, app, CLI or game smoke checks should validate actual surface behavior when feasible.
164
+
165
+ Final handoff should include concise `Surface Contract Conformance`: contract source, implementation alignment, remaining drift and verification status.
166
+
167
167
  Conformance must internally confirm that every important external-source constraint is covered by Context, updated into Context, task-local, explicitly out of scope or awaiting a genuine user decision, and that controlling surface facts reached the correct implementation. Unresolved constraints or non-aligned surface implementation mean the work cannot be described as fully aligned; component, modal, viewmodel or unit evidence alone cannot prove main-surface ownership. Do not create a fixed `plan.md`, Task Contract file or Markdown mapping tables for this check.
168
-
169
- ## Output Boundaries
170
-
171
- - Do not create PRDs, UI/UX handoff docs, ADRs, stage artifacts, lifecycle state or phase gates.
172
- - Do not update Context for ordinary CSS tweaks, copy edits or one-off UI bug fixes unless durable surface responsibility changes.
173
- - Do not treat current backend fields, enums, JSON, screenshots or terminal output as product intent.
174
- - Do not invent rationale; rejected alternatives or tradeoffs belong in Context only when they are stable enough to affect future surface decisions.
168
+
169
+ ## Output Boundaries
170
+
171
+ - Do not create PRDs, UI/UX handoff docs, ADRs, stage artifacts, lifecycle state or phase gates.
172
+ - Do not update Context for ordinary CSS tweaks, copy edits or one-off UI bug fixes unless durable surface responsibility changes.
173
+ - Do not treat current backend fields, enums, JSON, screenshots or terminal output as product intent.
174
+ - Do not invent rationale; rejected alternatives or tradeoffs belong in Context only when they are stable enough to affect future surface decisions.
175
175
  - Do not add a surface-specific validator, edit-order gate, plan-contract validator or package-level mandatory Surface Contract gate.
176
- - Do not include business-domain examples in this package-managed Skill.
176
+ - Do not include business-domain examples in this package-managed Skill.
@@ -1,45 +1,45 @@
1
- ---
2
- name: context_uiux_design
3
- description: Use when the user explicitly asks for 设计稿, 重做设计, UI/UX 设计方案, UI 设计师, UX 设计师, 视觉设计方案, 视觉专家, 交互设计方案, 界面设计方案, 页面设计方案, 原型设计, 线框图方案, 视觉规范, 设计系统方案, DESIGN.md, Impeccable review, UX designer, UI designer, frontend redesign, visual polish, or design system spec in a Minimal Context Harness project. Do not trigger for ordinary UI implementation, CSS tweaks, bug fixes, or generic mentions of 设计, design, or user experience.
4
- ---
5
-
6
- # Context UIUX Design
7
-
8
- ## Package-Managed Boundary
9
-
10
- This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_uiux_design` Skill directly.
11
-
12
- Project-specific UI/UX and visual design rules belong in a separate project-local Skill under `<harnessRoot>/skills/uiux_design/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**` and `DESIGN.md`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and Tiny Context guidance do not drift apart.
13
-
14
- ## 目标
15
-
16
- 帮助 agent 把界面、交互和视觉设计结论沉淀成可恢复的 Minimal Context 和 `DESIGN.md`。
17
-
18
- ## 工作方式
19
-
20
- 1. 先读取 `project_context/global.md` 和 `project_context/context.toml`,按 default area、triggers、read_when 选择相关 context。
21
- 2. 如果项目存在 `DESIGN.md`,先读取它;如果用户要求视觉体系、设计稿或界面风格,按 Google `@google/design.md` 的 DESIGN.md 格式创建或更新根目录 `DESIGN.md`。
22
- 3. 整理或生成:用户流程、页面/组件清单、关键状态、交互反馈、响应式边界、a11y 要求、视觉约束和设计 token。
23
- 4. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、前端布局、UI/UX、产品模块边界或信息放置时,把产品/页面定位检查作为前置动作:用户在这个 surface 要完成的判断、产品必须提供的信息/动作/反馈、不应常驻的信息、主层/下钻/运维/诊断/详情归属、布局和信息密度是否匹配任务。多 surface、多平台或多模块归属不清时,先读取相关 Context、搜索入口并结合已有 UI 代码/截图做信息架构 sweep,必要时使用 `context_surface_contract` 做 Surface Contract Check,再收窄到具体视觉或交互实现。该检查是下一步变更分类的输入;只有形成长期 surface 职责、信息架构、交互契约或模块边界结论时才更新 Context 或 `DESIGN.md`。
24
- - 若存在 Product Surface Contract,读取并对齐 primary user question、main allows/forbids、drilldown ownership、long-task state 和 verification。
25
- - 若缺失且本任务改变 durable surface responsibility,输出 `Surface Contract Delta: required`,把界面职责写入 `project_context/**`;视觉 token、颜色、字体、间距、圆角和视觉 rationale 仍写入 `DESIGN.md`。
26
- 5. 涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或加载/空态/错误态等 UI 控件时,用“控件交互框架”检查控件语义、反馈状态、校验、错误预防、可供性和信息密度;这只是通用判断框架,不是固定控件处方。
27
- 6. 界面职责、流程归属和长期交互契约以 `project_context/**` 为准;`DESIGN.md` 负责视觉 token 和视觉 rationale;代码、截图和搜索结果只说明当前实现状态。Context 决定“应该是什么”,代码和截图揭示“现在是什么”,代码不能静默重定义 Context。
1
+ ---
2
+ name: context_uiux_design
3
+ description: Use when the user explicitly asks for 设计稿, 重做设计, UI/UX 设计方案, UI 设计师, UX 设计师, 视觉设计方案, 视觉专家, 交互设计方案, 界面设计方案, 页面设计方案, 原型设计, 线框图方案, 视觉规范, 设计系统方案, DESIGN.md, Impeccable review, UX designer, UI designer, frontend redesign, visual polish, or design system spec in a Minimal Context Harness project. Do not trigger for ordinary UI implementation, CSS tweaks, bug fixes, or generic mentions of 设计, design, or user experience.
4
+ ---
5
+
6
+ # Context UIUX Design
7
+
8
+ ## Package-Managed Boundary
9
+
10
+ This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_uiux_design` Skill directly.
11
+
12
+ Project-specific UI/UX and visual design rules belong in a separate project-local Skill under `<harnessRoot>/skills/uiux_design/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**` and `DESIGN.md`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and Tiny Context guidance do not drift apart.
13
+
14
+ ## 目标
15
+
16
+ 帮助 agent 把界面、交互和视觉设计结论沉淀成可恢复的 Minimal Context 和 `DESIGN.md`。
17
+
18
+ ## 工作方式
19
+
20
+ 1. 先读取 `project_context/global.md` 和 `project_context/context.toml`,按 default area、triggers、read_when 选择相关 context。
21
+ 2. 如果项目存在 `DESIGN.md`,先读取它;如果用户要求视觉体系、设计稿或界面风格,按 Google `@google/design.md` 的 DESIGN.md 格式创建或更新根目录 `DESIGN.md`。
22
+ 3. 整理或生成:用户流程、页面/组件清单、关键状态、交互反馈、响应式边界、a11y 要求、视觉约束和设计 token。
23
+ 4. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、前端布局、UI/UX、产品模块边界或信息放置时,把产品/页面定位检查作为前置动作:用户在这个 surface 要完成的判断、产品必须提供的信息/动作/反馈、不应常驻的信息、主层/下钻/运维/诊断/详情归属、布局和信息密度是否匹配任务。多 surface、多平台或多模块归属不清时,先读取相关 Context、搜索入口并结合已有 UI 代码/截图做信息架构 sweep,必要时使用 `context_surface_contract` 做 Surface Contract Check,再收窄到具体视觉或交互实现。该检查是下一步变更分类的输入;只有形成长期 surface 职责、信息架构、交互契约或模块边界结论时才更新 Context 或 `DESIGN.md`。
24
+ - 若存在 Product Surface Contract,读取并对齐 primary user question、main allows/forbids、drilldown ownership、long-task state 和 verification。
25
+ - 若缺失且本任务改变 durable surface responsibility,输出 `Surface Contract Delta: required`,把界面职责写入 `project_context/**`;视觉 token、颜色、字体、间距、圆角和视觉 rationale 仍写入 `DESIGN.md`。
26
+ 5. 涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或加载/空态/错误态等 UI 控件时,用“控件交互框架”检查控件语义、反馈状态、校验、错误预防、可供性和信息密度;这只是通用判断框架,不是固定控件处方。
27
+ 6. 界面职责、流程归属和长期交互契约以 `project_context/**` 为准;`DESIGN.md` 负责视觉 token 和视觉 rationale;代码、截图和搜索结果只说明当前实现状态。Context 决定“应该是什么”,代码和截图揭示“现在是什么”,代码不能静默重定义 Context。
28
28
  7. 设计判断或第一处实现编辑前,先给出唯一长期事实判断 `Context Delta: none|required`。若输入包含产品、架构、技术、界面或验收来源,在 agent 内部逐项判断 durable surface / IA / interaction / verification constraint 已被 Context / `DESIGN.md` 覆盖、需要先更新、仅属 task-local、显式 out-of-scope 或需要真实用户决策;不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。
29
- 8. 普通 UI bug、局部样式或 CSS 修复、测试修复或探索性 spike 不更新 Context,可先改代码;一旦形成长期交互或视觉结论,继续对齐或交付前必须回写 Context 或 `DESIGN.md`。不要把 Context 机械补成代码改动摘要。
30
- 9. 如果二者冲突,显式标记为实现漂移、缺失工作或 Context 过期。
31
- 10. 如果涉及已有 UI,优先结合代码入口、运行截图或用户提供的参考图来描述差异。
32
- 11. 当任务涉及设计稿、重做设计、视觉方案、设计系统、visual polish、frontend redesign 或 frontend styling,且存在可扫描的 UI 代码、页面文件、构建产物目录或本地/远程 URL 时,默认运行 `npx impeccable detect <target>`;实现前可用于识别既有视觉问题,实现后或交付前用于审查结果。没有可扫描目标、命令不可用或扫描失败时,说明原因并继续。
33
- 12. 需要长期沉淀时:
34
- - 项目级体验原则和屏幕清单写入 `global.md`。
35
- - 模块级 screen contract、state、interaction 和视觉约束写入对应 area / subdomain Context。
36
- - 颜色、字体、间距、圆角、组件视觉 token 和视觉 rationale 写入 `DESIGN.md`。
37
- - 新 UI context unit 可新增 `project_context/areas/<unit>.md`,并更新 `global.md#Context Index`;复杂项目同时更新 `project_context/context.toml`。
38
- - 如果 `upgrade` 自动把深层 `.md` 注册成 area,但语义上更像 foundation / contract / archive,后续应显式调整 manifest role;不要依赖自动迁移判断语义。
39
- 13. Context 只能声明设计验收入口或 smoke 入口,不能伪造“已验证通过”。
40
- 14. Verification / Deployment Role Context 只记录长期可复用的设计验证、smoke、部署或运行初始化路径事实:特殊准备、最短命令或路径、预期阶段 / 信号、可接受 warning、已排除的重复探索点。不要记录一次性测试日志、完整输出、临时 JSON、CI artifact、测试报告、release ledger、secret、token、cookie、device id、raw payload 或完整截图报告。
41
- 15. 收尾时做 `Contract Conformance` 和 Context drift check,只报告轻量状态:`Context: 已更新 ...` 或 `Context: 本次无长期事实变化`。Conformance 说明本次契约满足情况、未满足或延期项和截图 / 手动检查入口;一次性证据、截图结果、测试日志、任务契约和实现摘要不写入 Context。
42
-
29
+ 8. 普通 UI bug、局部样式或 CSS 修复、测试修复或探索性 spike 不更新 Context,可先改代码;一旦形成长期交互或视觉结论,继续对齐或交付前必须回写 Context 或 `DESIGN.md`。不要把 Context 机械补成代码改动摘要。
30
+ 9. 如果二者冲突,显式标记为实现漂移、缺失工作或 Context 过期。
31
+ 10. 如果涉及已有 UI,优先结合代码入口、运行截图或用户提供的参考图来描述差异。
32
+ 11. 当任务涉及设计稿、重做设计、视觉方案、设计系统、visual polish、frontend redesign 或 frontend styling,且存在可扫描的 UI 代码、页面文件、构建产物目录或本地/远程 URL 时,默认运行 `npx impeccable detect <target>`;实现前可用于识别既有视觉问题,实现后或交付前用于审查结果。没有可扫描目标、命令不可用或扫描失败时,说明原因并继续。
33
+ 12. 需要长期沉淀时:
34
+ - 项目级体验原则和屏幕清单写入 `global.md`。
35
+ - 模块级 screen contract、state、interaction 和视觉约束写入对应 area / subdomain Context。
36
+ - 颜色、字体、间距、圆角、组件视觉 token 和视觉 rationale 写入 `DESIGN.md`。
37
+ - 新 UI context unit 可新增 `project_context/areas/<unit>.md`,并更新 `global.md#Context Index`;复杂项目同时更新 `project_context/context.toml`。
38
+ - 如果 `upgrade` 自动把深层 `.md` 注册成 area,但语义上更像 foundation / contract / archive,后续应显式调整 manifest role;不要依赖自动迁移判断语义。
39
+ 13. Context 只能声明设计验收入口或 smoke 入口,不能伪造“已验证通过”。
40
+ 14. Verification / Deployment Role Context 只记录长期可复用的设计验证、smoke、部署或运行初始化路径事实:特殊准备、最短命令或路径、预期阶段 / 信号、可接受 warning、已排除的重复探索点。不要记录一次性测试日志、完整输出、临时 JSON、CI artifact、测试报告、release ledger、secret、token、cookie、device id、raw payload 或完整截图报告。
41
+ 15. 收尾时做 `Contract Conformance` 和 Context drift check,只报告轻量状态:`Context: 已更新 ...` 或 `Context: 本次无长期事实变化`。Conformance 说明本次契约满足情况、未满足或延期项和截图 / 手动检查入口;一次性证据、截图结果、测试日志、任务契约和实现摘要不写入 Context。
42
+
43
43
  ## 内部执行约束与 Conformance
44
44
 
45
45
  - `Context Delta` 只能是 `none` 或 `required`。`required` 先更新 owning Context 或 `DESIGN.md`;`none` 按现有事实工作,不制造 Context 噪音。
@@ -49,37 +49,37 @@ Project-specific UI/UX and visual design rules belong in a separate project-loca
49
49
  - 默认流程不要求或验证固定 `plan.md`、Task Contract 文件、Source-to-Context 表、Context-to-Implementation 表、matrix、verdict 或 evidence ledger;可选 scratch 没有固定名称或权威。
50
50
  - `Contract Conformance` 直接检查 controlling Context / `DESIGN.md` 是否到达正确 surface、状态、交互与验证路径并避开 forbidden shortcut。实现偏差修实现;缺少长期事实则返回 `Context Delta: required`,先更新长期事实再对齐。
51
51
  - small code task、普通 UI bug、局部 CSS 修复、小重构、测试修复或探索性 spike 不创建额外流程 artifact。
52
-
53
- ## 信息呈现校准
54
-
55
- - 页面设计先回答:产品/页面定位是什么、要解决什么问题、用户需要什么、页面需要提供什么内容/能力/反馈;再决定元素放什么、放哪里、为什么。这是页面变更前置判断,不是实现后的视觉润色。常驻元素应证明它比位置、图标、状态、数据或交互提示更能省注意力。
56
- - 追求有效信息密度,而不是塞满页面。判断标准是更少无效 chrome、更少解释、更靠近真实内容和可执行动作;警惕用大标题、大容器、空卡片、假摘要或装饰区块制造仪式感。
57
- - 对返回、刷新、同步、关闭、搜索、展开/收起等熟悉动作,比较 icon-only、紧凑控件、文字按钮和图标+文字哪种最省注意力;如果使用 icon-only,必须保留 `aria-label`、`title`、tooltip 或 hover/focus 说明。动作不熟悉、风险高或需要区分多个相近命令时,文字通常更合适。
58
- - 常驻文字要克制。用户已经知道且不帮助行动的页面标题、面包屑、说明句或分区名,先判断是否可以删除,而不是先润色;必要解释可进入 tooltip、hover/focus 展开层、空态、详情页、帮助或 Context。
59
- - 空间应由内容价值支撑。内容少时布局可以收缩到内容附近;警惕保留一整行只有几个字的 header、空指标槽、空列表容器或没有真实数据支撑的摘要。
60
- - 信息架构按归属放置:真正跨页面的动作可放系统级 chrome,模块动作放模块内部,运维/连接/缓存/后台任务状态只在影响用户判断或行动时进入主工作面,低频系统解释放详情、日志、调试视图或文档。
61
- - 空态、加载态和错误态必须真实。不要用 fixture、看似真实的 fallback 行或“这里不展示示例数据”这类元说明遮住没有数据;筛选无结果、系统无数据和连接失败要视觉上可区分。
62
- - 页面稳定性是 UX 合同。滚动条出现、列表加载、tab 切换、虚拟列表高度变化、面板展开收起都不应导致布局跳动;需要时预留 `scrollbar-gutter`、稳定容器尺寸、固定关键控件尺寸和可预测的 loading skeleton。
63
- - 文案服务任务,不解释设计。主界面避免内部黑话、实现边界说明、生产/示例数据规则和后端来源说明;必要技术细节放到详情、日志、调试视图或运维区域。
64
-
65
- ## 控件交互框架
66
-
67
- - 当界面涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或状态反馈时,先判断控件承载的交互语义,而不是直接沿用后端字段形态。
68
- - 判断输入数据是自由文本、枚举、实体选择、时间/区间、数量/预算还是规则配置;不同语义需要不同的可供性、约束、校验和错误恢复。
69
- - 明确用户完成动作前后需要的反馈状态:loading、empty、no results、error、disabled、saving、success 和 validation feedback 应该支持用户判断下一步。
70
- - 检查控件是否给足单位、范围、默认值、示例、推荐值、风险/成本/影响提示;解释应靠近决策点,低频细节可以进 tooltip、详情或帮助。
71
- - 检查可见标签、helper text、错误文案和状态文案是否是用户语言,而不是内部字段、接口名或枚举名。
72
- - 自由输入不是禁用项,但要和错误成本匹配:当格式固定、错误代价高或反馈复杂时,应考虑更明确的约束、选择机制或校验反馈。
73
- - 不把本框架读成固定控件清单:搜索是否自动触发、时间是否用 picker、预算是否用 stepper,都应由数据规模、API 成本、用户任务、错误成本和项目组件体系决定。
74
-
52
+
53
+ ## 信息呈现校准
54
+
55
+ - 页面设计先回答:产品/页面定位是什么、要解决什么问题、用户需要什么、页面需要提供什么内容/能力/反馈;再决定元素放什么、放哪里、为什么。这是页面变更前置判断,不是实现后的视觉润色。常驻元素应证明它比位置、图标、状态、数据或交互提示更能省注意力。
56
+ - 追求有效信息密度,而不是塞满页面。判断标准是更少无效 chrome、更少解释、更靠近真实内容和可执行动作;警惕用大标题、大容器、空卡片、假摘要或装饰区块制造仪式感。
57
+ - 对返回、刷新、同步、关闭、搜索、展开/收起等熟悉动作,比较 icon-only、紧凑控件、文字按钮和图标+文字哪种最省注意力;如果使用 icon-only,必须保留 `aria-label`、`title`、tooltip 或 hover/focus 说明。动作不熟悉、风险高或需要区分多个相近命令时,文字通常更合适。
58
+ - 常驻文字要克制。用户已经知道且不帮助行动的页面标题、面包屑、说明句或分区名,先判断是否可以删除,而不是先润色;必要解释可进入 tooltip、hover/focus 展开层、空态、详情页、帮助或 Context。
59
+ - 空间应由内容价值支撑。内容少时布局可以收缩到内容附近;警惕保留一整行只有几个字的 header、空指标槽、空列表容器或没有真实数据支撑的摘要。
60
+ - 信息架构按归属放置:真正跨页面的动作可放系统级 chrome,模块动作放模块内部,运维/连接/缓存/后台任务状态只在影响用户判断或行动时进入主工作面,低频系统解释放详情、日志、调试视图或文档。
61
+ - 空态、加载态和错误态必须真实。不要用 fixture、看似真实的 fallback 行或“这里不展示示例数据”这类元说明遮住没有数据;筛选无结果、系统无数据和连接失败要视觉上可区分。
62
+ - 页面稳定性是 UX 合同。滚动条出现、列表加载、tab 切换、虚拟列表高度变化、面板展开收起都不应导致布局跳动;需要时预留 `scrollbar-gutter`、稳定容器尺寸、固定关键控件尺寸和可预测的 loading skeleton。
63
+ - 文案服务任务,不解释设计。主界面避免内部黑话、实现边界说明、生产/示例数据规则和后端来源说明;必要技术细节放到详情、日志、调试视图或运维区域。
64
+
65
+ ## 控件交互框架
66
+
67
+ - 当界面涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或状态反馈时,先判断控件承载的交互语义,而不是直接沿用后端字段形态。
68
+ - 判断输入数据是自由文本、枚举、实体选择、时间/区间、数量/预算还是规则配置;不同语义需要不同的可供性、约束、校验和错误恢复。
69
+ - 明确用户完成动作前后需要的反馈状态:loading、empty、no results、error、disabled、saving、success 和 validation feedback 应该支持用户判断下一步。
70
+ - 检查控件是否给足单位、范围、默认值、示例、推荐值、风险/成本/影响提示;解释应靠近决策点,低频细节可以进 tooltip、详情或帮助。
71
+ - 检查可见标签、helper text、错误文案和状态文案是否是用户语言,而不是内部字段、接口名或枚举名。
72
+ - 自由输入不是禁用项,但要和错误成本匹配:当格式固定、错误代价高或反馈复杂时,应考虑更明确的约束、选择机制或校验反馈。
73
+ - 不把本框架读成固定控件清单:搜索是否自动触发、时间是否用 picker、预算是否用 stepper,都应由数据规模、API 成本、用户任务、错误成本和项目组件体系决定。
74
+
75
75
  ## 视觉质量校准
76
-
77
- - 先判断界面 register:品牌页、营销页、作品集等让设计承载表达;产品工具、后台、dashboard、表单等让设计服务任务。品牌界面可以更强烈地使用图像、色彩和编排;产品界面优先可扫读、稳定组件、熟悉交互和任务效率。
78
- - 已有 UI 优先保持身份连续性:先找现有 token、组件库、全局 CSS、Tailwind config、截图或代表性页面;除非用户明确要求重设计,不要推翻已建立的字体、颜色、组件语言。
79
- - 绿色地设计视觉体系时,先说明场景和色彩策略,再选 token:谁在什么环境下使用、界面应该 restrained / committed / full palette / drenched 到什么程度。不要按品类套默认审美。
80
- - 做设计方案或视觉规范时,显式检查:文字对比度、65-75ch 正文行长、清晰字号层级、响应式边界、44px 触控目标、焦点态、hover/active/disabled/loading/error/success 状态、空态/错误态/长文本、reduced motion 和文本不溢出。
81
- - 避免常见 AI 视觉反模式:嵌套卡片、无意义玻璃拟态、紫蓝渐变或渐变文字、灰字压在彩色背景上、默认米色/奶油色大背景、过度圆角、边框加大模糊阴影的幽灵卡片、每段一个圆角 icon tile、每节重复小号全大写 eyebrow 或 `01 / 02 / 03` 标记、bounce/elastic easing、空泛营销 buzzword。
82
- - 视觉审查时先分清问题类型:a11y / responsive / theming / interaction / copy / performance / anti-pattern。把真正影响用户理解、操作或品牌信任的问题列为高优先级;少量纯审美偏好不要淹没关键问题。
76
+
77
+ - 先判断界面 register:品牌页、营销页、作品集等让设计承载表达;产品工具、后台、dashboard、表单等让设计服务任务。品牌界面可以更强烈地使用图像、色彩和编排;产品界面优先可扫读、稳定组件、熟悉交互和任务效率。
78
+ - 已有 UI 优先保持身份连续性:先找现有 token、组件库、全局 CSS、Tailwind config、截图或代表性页面;除非用户明确要求重设计,不要推翻已建立的字体、颜色、组件语言。
79
+ - 绿色地设计视觉体系时,先说明场景和色彩策略,再选 token:谁在什么环境下使用、界面应该 restrained / committed / full palette / drenched 到什么程度。不要按品类套默认审美。
80
+ - 做设计方案或视觉规范时,显式检查:文字对比度、65-75ch 正文行长、清晰字号层级、响应式边界、44px 触控目标、焦点态、hover/active/disabled/loading/error/success 状态、空态/错误态/长文本、reduced motion 和文本不溢出。
81
+ - 避免常见 AI 视觉反模式:嵌套卡片、无意义玻璃拟态、紫蓝渐变或渐变文字、灰字压在彩色背景上、默认米色/奶油色大背景、过度圆角、边框加大模糊阴影的幽灵卡片、每段一个圆角 icon tile、每节重复小号全大写 eyebrow 或 `01 / 02 / 03` 标记、bounce/elastic easing、空泛营销 buzzword。
82
+ - 视觉审查时先分清问题类型:a11y / responsive / theming / interaction / copy / performance / anti-pattern。把真正影响用户理解、操作或品牌信任的问题列为高优先级;少量纯审美偏好不要淹没关键问题。
83
83
  - Harness 默认携带 Impeccable CLI 能力;做设计稿、重做设计、视觉设计方案、设计系统方案、frontend redesign、visual polish 或既有 UI 视觉审查时,默认尝试运行 `npx impeccable detect <target>` 作为辅助证据,不必等待用户点名。其输出只能作为设计缺陷线索,不是 Harness gate,也不能替代人工截图检查、项目测试或 `validate-context`。
84
84
 
85
85
  ## Visual Delivery Coverage / 视觉交付覆盖
@@ -93,31 +93,31 @@ For material design-system, redesign, high-fidelity implementation or visual-pol
93
93
  - Render and inspect the declared coverage with project-owned browser/component tests plus screenshots or manual review as appropriate. Report the combinations actually checked and any omitted or external review explicitly. A screenshot baseline may be updated only through deliberate review; replacing it merely to erase a diff is not verification.
94
94
 
95
95
  ## 输出边界
96
-
97
- - 不默认创建 `.work_products/**`、UI/UX 独立文档、handoff matrix、review/test/release 文档。
98
- - 不要求 lifecycle phase、plan task、phase gate 或阶段 Skill。
99
- - 如果用户明确要求独立设计稿、mock 或页面说明,可以临时生成;长期事实仍要提炼回 `project_context/**` 和 `DESIGN.md`。
100
- - `DESIGN.md` 是视觉设计系统事实源;项目流程、模块契约和下一步动作仍以 `project_context/**` 为准。
101
- - 如果用户只是要求实现页面、修复 UI bug、局部改 CSS、换颜色,或只是泛泛提到“设计 / design / user experience”,不需要触发本 Skill;只有明确角色名或强相关产物名指向设计方向、界面方案、视觉体系、交互规则或长期设计事实沉淀时才使用。
102
-
103
- ## DESIGN.md 使用规则
104
-
105
- - 使用 Google `@google/design.md` 格式:YAML front matter 存 tokens,Markdown body 存设计理由。
106
- - 优先包含 `name`、`colors`、`typography`、`spacing`、`rounded` 和必要 `components` token。
107
- - Markdown section 顺序优先为:`Overview`、`Colors`、`Typography`、`Layout`、`Elevation & Depth`、`Shapes`、`Components`、`Do's and Don'ts`。
108
- - 写入或修改后,如本地可用,运行 `npx @google/design.md lint DESIGN.md` 检查结构;不要把 lint 结果写成“已通过”除非本轮真实执行。
109
- - 需要给工程消费 token 时,可用 `npx @google/design.md export --format css-tailwind DESIGN.md` 或 `json-tailwind` 生成临时输出。
110
-
111
- ## 建议沉淀位置
112
-
113
- - `global.md#UX / Screen Brief`:全局体验原则、主要屏幕、跨模块流程。
114
- - `areas/*.md#User / System Contract`:页面、组件、状态、交互和数据展示契约。
115
- - `areas/*.md#Key Constraints`:responsive、a11y、品牌/视觉边界、加载/空态/错误态约束。
116
- - role=`contract` Context:跨页面 / 跨域界面契约及其 durable rationale。
117
- - role=`decision-rationale` Context:更大或跨切面的稳定交互、信息架构或 surface ownership 取舍原因。
118
- - `areas/*/verification.md` 或 role=`verification` Context:UI smoke、截图验收、可访问性检查或项目自己的关键验证重复执行路径。
119
- - `areas/*/deployment.md` 或 role=`deployment` Context:前端部署、预览环境、运行拓扑或健康检查重复执行路径。
120
- - `project_context/context.toml`:复杂项目的产品域 area/context_unit、role、触发词、按需读取策略和可选边界规则。
121
- - `DESIGN.md`:视觉 identity、design tokens、组件视觉规则、do/don't 和视觉 rationale。
122
-
123
- 不要编造 rationale;仅由当前代码或截图形态反推的理由、实现摘要、PR notes、命令输出、测试通过声明、截图审查、debug 过程和 agent reasoning 不进入 Context 或 `DESIGN.md`。
96
+
97
+ - 不默认创建 `.work_products/**`、UI/UX 独立文档、handoff matrix、review/test/release 文档。
98
+ - 不要求 lifecycle phase、plan task、phase gate 或阶段 Skill。
99
+ - 如果用户明确要求独立设计稿、mock 或页面说明,可以临时生成;长期事实仍要提炼回 `project_context/**` 和 `DESIGN.md`。
100
+ - `DESIGN.md` 是视觉设计系统事实源;项目流程、模块契约和下一步动作仍以 `project_context/**` 为准。
101
+ - 如果用户只是要求实现页面、修复 UI bug、局部改 CSS、换颜色,或只是泛泛提到“设计 / design / user experience”,不需要触发本 Skill;只有明确角色名或强相关产物名指向设计方向、界面方案、视觉体系、交互规则或长期设计事实沉淀时才使用。
102
+
103
+ ## DESIGN.md 使用规则
104
+
105
+ - 使用 Google `@google/design.md` 格式:YAML front matter 存 tokens,Markdown body 存设计理由。
106
+ - 优先包含 `name`、`colors`、`typography`、`spacing`、`rounded` 和必要 `components` token。
107
+ - Markdown section 顺序优先为:`Overview`、`Colors`、`Typography`、`Layout`、`Elevation & Depth`、`Shapes`、`Components`、`Do's and Don'ts`。
108
+ - 写入或修改后,如本地可用,运行 `npx @google/design.md lint DESIGN.md` 检查结构;不要把 lint 结果写成“已通过”除非本轮真实执行。
109
+ - 需要给工程消费 token 时,可用 `npx @google/design.md export --format css-tailwind DESIGN.md` 或 `json-tailwind` 生成临时输出。
110
+
111
+ ## 建议沉淀位置
112
+
113
+ - `global.md#UX / Screen Brief`:全局体验原则、主要屏幕、跨模块流程。
114
+ - `areas/*.md#User / System Contract`:页面、组件、状态、交互和数据展示契约。
115
+ - `areas/*.md#Key Constraints`:responsive、a11y、品牌/视觉边界、加载/空态/错误态约束。
116
+ - role=`contract` Context:跨页面 / 跨域界面契约及其 durable rationale。
117
+ - role=`decision-rationale` Context:更大或跨切面的稳定交互、信息架构或 surface ownership 取舍原因。
118
+ - `areas/*/verification.md` 或 role=`verification` Context:UI smoke、截图验收、可访问性检查或项目自己的关键验证重复执行路径。
119
+ - `areas/*/deployment.md` 或 role=`deployment` Context:前端部署、预览环境、运行拓扑或健康检查重复执行路径。
120
+ - `project_context/context.toml`:复杂项目的产品域 area/context_unit、role、触发词、按需读取策略和可选边界规则。
121
+ - `DESIGN.md`:视觉 identity、design tokens、组件视觉规则、do/don't 和视觉 rationale。
122
+
123
+ 不要编造 rationale;仅由当前代码或截图形态反推的理由、实现摘要、PR notes、命令输出、测试通过声明、截图审查、debug 过程和 agent reasoning 不进入 Context 或 `DESIGN.md`。