@srobroek/pi-design 0.0.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +168 -0
- package/LICENSE +202 -0
- package/README.md +438 -2
- package/_kit/prereqs.json +41 -0
- package/_kit/prereqs.ts +374 -0
- package/agents/a11y-auditor.md +107 -0
- package/agents/council-user.md +25 -0
- package/agents/council-ux.md +25 -0
- package/agents/design-critic.md +78 -0
- package/agents/ui-implementer.md +75 -0
- package/agents/ui-ux-specialist.md +129 -0
- package/commands/council-product.md +26 -0
- package/commands/design-review.md +17 -0
- package/extensions/design.js +438 -0
- package/formulas/design-surface.formula.toml +344 -0
- package/formulas/design-system.formula.toml +509 -0
- package/formulas/design-touch.formula.toml +188 -0
- package/formulas/mol-design-a11y.formula.toml +128 -0
- package/formulas/mol-design-component.formula.toml +122 -0
- package/formulas/mol-design-iterate.formula.toml +187 -0
- package/formulas/mol-design-motion.formula.toml +138 -0
- package/formulas/mol-design-responsive.formula.toml +135 -0
- package/formulas/mol-design-tokens.formula.toml +165 -0
- package/mcp-servers.ts +49 -0
- package/package.json +61 -4
- package/skills/accessibility-audit/SKILL.md +92 -0
- package/skills/accessibility-audit/references/upstream.md +78 -0
- package/skills/design-component-truth/SKILL.md +41 -0
- package/skills/design-evidence/SKILL.md +21 -0
- package/skills/design-guide/SKILL.md +26 -0
- package/skills/design-md/LICENSE +21 -0
- package/skills/design-md/NOTICE +31 -0
- package/skills/design-md/SKILL.md +79 -0
- package/skills/design-md/references/create-design-md.md +254 -0
- package/skills/design-md/references/upstream.md +60 -0
- package/skills/design-no-slop/SKILL.md +32 -0
- package/skills/design-prototype/SKILL.md +84 -0
- package/skills/design-prototype/references/in-app-variants.md +47 -0
- package/skills/design-prototype/references/upstream.md +43 -0
- package/skills/design-system-audit/SKILL.md +62 -0
- package/skills/design-system-audit/references/token-carriers.md +106 -0
- package/skills/design-system-audit/references/token-pipeline.md +115 -0
- package/skills/design-system-audit/references/upstream.md +52 -0
- package/skills/design-token-discipline/SKILL.md +24 -0
- package/skills/design-upstream-preflight/SKILL.md +60 -0
- package/skills/motion-design/SKILL.md +60 -0
- package/skills/ui-microcopy/LICENSE +212 -0
- package/skills/ui-microcopy/NOTICE +28 -0
- package/skills/ui-microcopy/SKILL.md +46 -0
- package/skills/ui-microcopy/references/copy-guidance.md +76 -0
- package/skills/ui-microcopy/references/upstream.md +11 -0
- package/skills/ui-review/SKILL.md +92 -0
- package/skills/ui-review/references/probes.md +446 -0
- package/skills/ui-review/references/storybook.md +217 -0
- package/skills/ui-review/references/tools.md +269 -0
- package/skills/ui-review/references/viewport-checks.md +184 -0
- package/skills/wireloom/LICENSE +21 -0
- package/skills/wireloom/NOTICE +30 -0
- package/skills/wireloom/SKILL.md +95 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: motion-design
|
|
3
|
+
description: Authors durations, easings and reduced-motion branches from the project scale; use when adding or changing animation.
|
|
4
|
+
metadata:
|
|
5
|
+
opencode/autoinvoke: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Motion Design
|
|
9
|
+
|
|
10
|
+
Phase BUILD. Take motion from the system's scale and give every animation an opt-out.
|
|
11
|
+
|
|
12
|
+
TRIGGER
|
|
13
|
+
+ adding or changing an animation, transition, transform, or keyframe
|
|
14
|
+
- verifying motion already implemented -> `ui-review`
|
|
15
|
+
- discovering whether a motion scale exists -> `design-system-audit`
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Route by what the motion actually is. -> the chosen route is named in the report header.
|
|
20
|
+
- MEASUREMENT, any rendered surface reachable by URL: MotionLint, which needs no install.
|
|
21
|
+
Run `npx --yes playwright install chromium` once, then
|
|
22
|
+
`npx --yes motionlint audit "<url>" --json audit.json --ci` with `cwd` set to a scratch
|
|
23
|
+
directory, because it writes `.motionlint/` into the caller's cwd. The exact form and
|
|
24
|
+
its caveats are in the `ui-review` skill's `references/tools.md`. With no URL, record it as
|
|
25
|
+
not run rather than reporting a score it did not produce.
|
|
26
|
+
- AUTHORING React `motion.X` JSX: upstream `ss-motion` from `styleseed@styleseed`, via
|
|
27
|
+
the `design-upstream-preflight` skill. Its own "When NOT to use" excludes CSS-only
|
|
28
|
+
transitions and GSAP, so every other motion is authored here, from the rules below.
|
|
29
|
+
2. Read the project's existing durations and easings first via
|
|
30
|
+
the `design-system-audit` skill. -> every value used is a token that already exists, or
|
|
31
|
+
the gate below fires.
|
|
32
|
+
3. Verify the result on the running surface with the `ui-review` skill, including the
|
|
33
|
+
reduced-motion branch: emulate `prefers-reduced-motion: reduce` in Chromium, for
|
|
34
|
+
example Playwright's `page.emulateMedia({ reducedMotion: "reduce" })`.
|
|
35
|
+
-> `prefers-reduced-motion` observed to change behaviour, not assumed to.
|
|
36
|
+
|
|
37
|
+
GATES
|
|
38
|
+
ASK Introducing a new duration or easing step. A new scale is a system decision.
|
|
39
|
+
|
|
40
|
+
## Rules
|
|
41
|
+
|
|
42
|
+
MUST Give every transition over 200ms, every transform animation, and every repeating
|
|
43
|
+
animation a `prefers-reduced-motion` branch. That is this package's motion policy. The
|
|
44
|
+
matching WCAG criterion, 2.3.3 Animation from Interactions, is AAA, so a missing branch
|
|
45
|
+
is a policy finding, not an AA failure, unless the project's policy makes it blocking.
|
|
46
|
+
MUST Take every duration and easing from the discovered scale.
|
|
47
|
+
MUST Verify reduced motion by driving it, because a media-query branch that was never
|
|
48
|
+
exercised is untested.
|
|
49
|
+
MUST Read MotionLint's `audit.json` findings before calling the reduced-motion MUST above
|
|
50
|
+
satisfied. Its `--ci` exit code is not that gate: exit 0 alongside a
|
|
51
|
+
`No prefers-reduced-motion path` warning in the same report is the measured behaviour.
|
|
52
|
+
DEFAULT Animate transform and opacity. They composite; layout and paint properties do not.
|
|
53
|
+
DEFAULT Avoid bounce or elastic easing, unless the project's motion tokens define one.
|
|
54
|
+
NOT Animate a property that triggers layout when a transform expresses the same change.
|
|
55
|
+
|
|
56
|
+
OUTPUT
|
|
57
|
+
L1 MOTION: applied -- route used, plus the tokens taken.
|
|
58
|
+
Reduced -- the reduced-motion branch, and how it was observed.
|
|
59
|
+
Open -- any value that needed a new scale step, left for the user.
|
|
60
|
+
CAP 100w
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
Syntax-file, code seperations,code vault integeted with css definition.
|
|
206
|
+
Pre-recordec, pre-tested, elements to capture elements into Packeted-User-Relations to capture - [
|
|
207
|
+
|
|
208
|
+
pre-requisites, statements, recorded-cams
|
|
209
|
+
, cams-data
|
|
210
|
+
, data, input()
|
|
211
|
+
|
|
212
|
+
]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
ui-microcopy
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
This skill is vendored, in modified form, from:
|
|
5
|
+
|
|
6
|
+
Project: Anthropic knowledge-work-plugins
|
|
7
|
+
Repository: https://github.com/anthropics/knowledge-work-plugins
|
|
8
|
+
Source path: upstream design copy guidance (merged into ui-microcopy)
|
|
9
|
+
Copied: 2026-08-26
|
|
10
|
+
Licence: Apache License, Version 2.0
|
|
11
|
+
|
|
12
|
+
The full licence text is in the LICENSE file beside this one, copied from the upstream
|
|
13
|
+
repository root at https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/LICENSE
|
|
14
|
+
|
|
15
|
+
Upstream declares NO copyright holder, so none is reproduced here. Its LICENSE is the
|
|
16
|
+
unfilled Apache boilerplate, with the bracketed `[yyyy] [name of copyright owner]`
|
|
17
|
+
placeholder left in place. It also ships no NOTICE file of its own, checked at
|
|
18
|
+
https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/NOTICE which
|
|
19
|
+
returns 404. Apache-2.0 section 4(d) therefore imposes no attribution notices to
|
|
20
|
+
reproduce. This file records the provenance regardless, so a later reader need not
|
|
21
|
+
re-derive it.
|
|
22
|
+
|
|
23
|
+
The vendored guidance has been modified and merged into `ui-microcopy`. Apache-2.0
|
|
24
|
+
section 4(b) requires that modified files carry prominent notice of the change. The
|
|
25
|
+
merged skill removes the connector-dependent instructions, replaces slash-command
|
|
26
|
+
usage with skill invocation, and adapts the frontmatter and workflow to this
|
|
27
|
+
repository's authoring contract. The substantive UX-copy guidance remains in
|
|
28
|
+
`references/copy-guidance.md`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-microcopy
|
|
3
|
+
description: Writes and reviews UX copy (errors, empty states, CTAs, confirmations, onboarding); triggers on write copy, fix wording.
|
|
4
|
+
metadata:
|
|
5
|
+
opencode/autoinvoke: false
|
|
6
|
+
---
|
|
7
|
+
<!--
|
|
8
|
+
This skill includes modified guidance from anthropics/knowledge-work-plugins. The
|
|
9
|
+
connector-dependent instructions were replaced with local skill references, and the
|
|
10
|
+
guidance was merged into this repository's ui-microcopy contract.
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
# UI Microcopy
|
|
14
|
+
|
|
15
|
+
Write or review interface copy with the same discipline as the pixels.
|
|
16
|
+
|
|
17
|
+
TRIGGER
|
|
18
|
+
+ "write the copy for", "fix this error message", "what should this say", or "what should this button say"
|
|
19
|
+
+ an empty state, error, confirmation, CTA, tooltip, loading state, or onboarding step needs wording
|
|
20
|
+
- judging a rendered surface or copy already shipped -> `ui-review`
|
|
21
|
+
- naming a token or component -> `design-system-audit`
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
1. Take the surface's real constraints from code and the running surface: character budget, states, existing terminology, and user context.
|
|
26
|
+
2. Load `references/copy-guidance.md` for the copy checklist, patterns, voice guidance, and output template.
|
|
27
|
+
3. Write the recommended string per location and alternatives only where a choice is open.
|
|
28
|
+
4. Verify the copy in place with the `ui-review` skill, at the narrowest supported width -> no truncation, broken wrapping, or accessible-name mismatch.
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
|
|
32
|
+
MUST Name the field and the problem in an error. An error shown by colour alone fails WCAG 3.3.1 Error Identification and 1.4.1 Use of Color, and "something went wrong" names neither.
|
|
33
|
+
MUST Give every field a persistent label, never a placeholder standing in for one.
|
|
34
|
+
MUST Say what to do next in an empty state.
|
|
35
|
+
MUST Reuse the product's existing term for a concept.
|
|
36
|
+
DEFAULT Lead with the outcome, not the mechanism.
|
|
37
|
+
NOT Apologise in an error the user caused, or blame the user for one the product caused.
|
|
38
|
+
NOT Route to `impeccable clarify`: it lacks this skill's onboarding surface, structured tone-tagged alternatives, and tone map.
|
|
39
|
+
|
|
40
|
+
Provenance and the Apache-2.0 obligations this vendored guidance carries: `references/upstream.md`.
|
|
41
|
+
|
|
42
|
+
OUTPUT
|
|
43
|
+
L1 COPY: the recommended string per location.
|
|
44
|
+
Alternatives -- tone-tagged options where a choice is open.
|
|
45
|
+
Constraints -- character budgets and truncation observed in place.
|
|
46
|
+
CAP 120w
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# UX Copy Guidance
|
|
2
|
+
|
|
3
|
+
Design-source connectors are out of scope. Take context from code and the running surface instead: the `design-system-audit` skill for the system, and the `ui-review` skill to read character budgets and truncation in place.
|
|
4
|
+
|
|
5
|
+
## Principles
|
|
6
|
+
|
|
7
|
+
1. **Clear**: Say exactly what you mean. No jargon, no ambiguity.
|
|
8
|
+
2. **Concise**: Use the fewest words that convey the full meaning.
|
|
9
|
+
3. **Consistent**: Same terms for the same things everywhere.
|
|
10
|
+
4. **Useful**: Every word should help the user accomplish their goal.
|
|
11
|
+
5. **Human**: Write like a helpful person, not a robot.
|
|
12
|
+
|
|
13
|
+
## Copy Patterns
|
|
14
|
+
|
|
15
|
+
### CTAs
|
|
16
|
+
- Start with a verb: "Start free trial", "Save changes", "Download report"
|
|
17
|
+
- Be specific: "Create account" not "Submit"
|
|
18
|
+
- Match the outcome to the label
|
|
19
|
+
|
|
20
|
+
### Error Messages
|
|
21
|
+
Structure: What happened + Why + How to fix
|
|
22
|
+
- "Payment declined. Your card was declined by your bank. Try a different card or contact your bank."
|
|
23
|
+
|
|
24
|
+
### Empty States
|
|
25
|
+
Structure: What this is + Why it's empty + How to start
|
|
26
|
+
- "No projects yet. Create your first project to start collaborating with your team."
|
|
27
|
+
|
|
28
|
+
### Confirmation Dialogs
|
|
29
|
+
- Make the action clear: "Delete 3 files?" not "Are you sure?"
|
|
30
|
+
- Describe consequences: "This can't be undone"
|
|
31
|
+
- Label buttons with the action: "Delete files" / "Keep files" not "OK" / "Cancel"
|
|
32
|
+
|
|
33
|
+
### Tooltips
|
|
34
|
+
- Concise, helpful, never obvious
|
|
35
|
+
|
|
36
|
+
### Loading States
|
|
37
|
+
- Set expectations, reduce anxiety
|
|
38
|
+
|
|
39
|
+
### Onboarding
|
|
40
|
+
- Progressive disclosure, one concept at a time
|
|
41
|
+
|
|
42
|
+
## Voice and Tone
|
|
43
|
+
|
|
44
|
+
Adapt tone to context:
|
|
45
|
+
- **Success**: Celebratory but not over the top
|
|
46
|
+
- **Error**: Empathetic and helpful
|
|
47
|
+
- **Warning**: Clear and actionable
|
|
48
|
+
- **Neutral**: Informative and concise
|
|
49
|
+
|
|
50
|
+
## Output Template
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## UX Copy: [Context]
|
|
54
|
+
|
|
55
|
+
### Recommended Copy
|
|
56
|
+
**[Element]**: [Copy]
|
|
57
|
+
|
|
58
|
+
### Alternatives
|
|
59
|
+
| Option | Copy | Tone | Best For |
|
|
60
|
+
|--------|------|------|----------|
|
|
61
|
+
| A | [Copy] | [Tone] | [When to use] |
|
|
62
|
+
| B | [Copy] | [Tone] | [When to use] |
|
|
63
|
+
| C | [Copy] | [Tone] | [When to use] |
|
|
64
|
+
|
|
65
|
+
### Rationale
|
|
66
|
+
[Why this copy works, covering user context, clarity, action-orientation]
|
|
67
|
+
|
|
68
|
+
### Localization Notes
|
|
69
|
+
[Anything translators should know, such as idioms to avoid, character expansion, cultural context]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Tips
|
|
73
|
+
|
|
74
|
+
1. Be specific about context: "Error message when payment fails" is better than "error message."
|
|
75
|
+
2. Share the brand voice: "We're professional but warm" helps match the tone.
|
|
76
|
+
3. Consider the user's emotional state: error messages need empathy; success messages can celebrate.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Upstream guidance for ui-microcopy
|
|
2
|
+
|
|
3
|
+
The merged skill incorporates UX writing guidance vendored from `anthropics/knowledge-work-plugins`, Apache-2.0. The upstream material is retained in `copy-guidance.md` and adapted to this repository's skill contract.
|
|
4
|
+
|
|
5
|
+
## Attribution obligations we carry
|
|
6
|
+
|
|
7
|
+
Apache-2.0 sections 4(a) through 4(d) apply because the vendored guidance is modified. The package therefore ships `LICENSE` and `NOTICE` beside the merged skill and records the modification in `SKILL.md`.
|
|
8
|
+
|
|
9
|
+
The modification is necessary because upstream guidance referred to a design-source connector that does not exist here. The merged reference instead directs agents to the `design-system-audit` skill and the `ui-review` skill. The upstream's requester-input block was also dropped, because the skill takes its constraints from code and the running surface rather than asking for them.
|
|
10
|
+
|
|
11
|
+
Other upstream UX-writing packages are displaced by the merged skill. Why `impeccable clarify` is not routed to is stated once, in `SKILL.md`.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-review
|
|
3
|
+
description: Verifies a rendered surface with ARIA snapshots, computed styles and keyboard walks; triggers on review this UI.
|
|
4
|
+
metadata:
|
|
5
|
+
opencode/autoinvoke: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# UI Review
|
|
9
|
+
|
|
10
|
+
Phase VERIFY. Drive the real surface and measure what a picture can only suggest.
|
|
11
|
+
|
|
12
|
+
TRIGGER
|
|
13
|
+
+ "review this UI", "check how this looks", "does this look right"
|
|
14
|
+
- "is this accessible", a WCAG conformance question -> `accessibility-audit`
|
|
15
|
+
- Token and primitive discovery before building -> `design-system-audit`
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Report Storybook MCP status before routing. When connected and the project has a Storybook,
|
|
20
|
+
LOAD `references/storybook.md` and drive individual stories first. When
|
|
21
|
+
unavailable, use the native source/ArgTypes/browser route and mark Storybook-dependent
|
|
22
|
+
coverage UNTESTED; do not ask the user to reconnect mid-run. -> each component passes in
|
|
23
|
+
isolation before any page assembled from it is judged, because a component-level failure is
|
|
24
|
+
smaller to locate than the same failure on a page.
|
|
25
|
+
2. Get the surface running and reachable: start the dev server once as a background shell
|
|
26
|
+
process, wait until its URL responds, then open the route in a browser tab. Reuse the
|
|
27
|
+
server for the whole walk and for any later fix, because the process outlives the turn. -> the route responds, the tab
|
|
28
|
+
is live, and the URL appears in the report header so the user can watch the same surface.
|
|
29
|
+
3. An accessibility (ARIA) snapshot for structure, roles, and accessible names. This is the
|
|
30
|
+
primary evidence. -> every interactive node carries a role and a non-empty
|
|
31
|
+
accessible name, and the heading and landmark order reads correctly.
|
|
32
|
+
4. Page-side JavaScript for computed styles; LOAD `references/probes.md`.
|
|
33
|
+
-> each claimed color, size, spacing, radius, and font value is a number read
|
|
34
|
+
from `getComputedStyle`, never inferred from an image.
|
|
35
|
+
5. Keyboard traversal: walk forward by pressing `Tab`, reading `document.activeElement` after each move with page-side JavaScript. Repeat until focus returns to the starting element; use `Escape` on every dismissible surface. -> focus order matches visual order, every stop paints a visible ring measured after its transition settled, nothing traps focus, and dismissal restores focus.
|
|
36
|
+
6. Widths 1440, 768, 375 by setting the viewport size; LOAD
|
|
37
|
+
`references/viewport-checks.md`. -> per width: no overflow,
|
|
38
|
+
no clipping, no overlap, and every target at least 24x24 CSS px or inside the
|
|
39
|
+
SC 2.5.8 spacing exception.
|
|
40
|
+
7. Console and network across the whole walk: start collecting console messages, page
|
|
41
|
+
errors, and requests before the first navigation, and read them at the end; the
|
|
42
|
+
counting rules are in the console section of `references/probes.md`.
|
|
43
|
+
-> zero console errors, zero page errors, and zero failed requests, or each one reported
|
|
44
|
+
with its message and URL.
|
|
45
|
+
8. A screenshot (of an element or the full page) last, only when appearance itself is
|
|
46
|
+
the question. -> the saved path sits beside the assertion it illustrates.
|
|
47
|
+
|
|
48
|
+
Each state needs a driven interaction, never an assumption: default, hover,
|
|
49
|
+
focus-visible, active, disabled, loading, empty, error, selected.
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
MUST Use a browser for web surfaces and a desktop accessibility inspector for native
|
|
54
|
+
surfaces. Which browser tool does which step is in the browser routes table of
|
|
55
|
+
`references/tools.md`.
|
|
56
|
+
DEFAULT Drive a fresh, isolated Chromium profile. Use the user's signed-in browser only
|
|
57
|
+
when a page needs their session or their own extensions (password manager, wallet,
|
|
58
|
+
and similar), never for a public page.
|
|
59
|
+
When the user wants to watch, or watching helps (debugging a flow, a visual check with
|
|
60
|
+
the user), offer a visible browser and say so explicitly.
|
|
61
|
+
MUST Report every finding with its viewport width and its measured value.
|
|
62
|
+
MUST Re-verify only the changed assertion after a fix, not the whole walk.
|
|
63
|
+
NOT A fresh full walk per story. Sweep breadth FIRST: every story and state in one batched
|
|
64
|
+
pass collecting the same numbers (the deciding overflow number, the smallest effective hit
|
|
65
|
+
area, console errors, ARIA node count), THEN steps 3-8 in depth exactly once, on the
|
|
66
|
+
assembled surface. Confirming one 375px overflow took seven steps, 16 stories at two
|
|
67
|
+
widths is 32 more navigations, and two agents lost their sessions to a runtime limit here.
|
|
68
|
+
MUST Report the served URL. The user watches the same surface you drive, and a finding
|
|
69
|
+
without its URL cannot be reproduced by hand.
|
|
70
|
+
MUST Take any external command's exact form from `references/tools.md`.
|
|
71
|
+
It is the authority when a copy elsewhere disagrees, and it carries the `npx` spec and
|
|
72
|
+
quoting rules that make a pasted line safe rather than a supply-chain guess.
|
|
73
|
+
DEFAULT Run a dev server and keep it, rather than rebuilding. It recompiles on change, it
|
|
74
|
+
outlives the turn, and the user can open it. Build a static bundle only when a server has
|
|
75
|
+
no purpose: a CI job, no free port, or a single read with no follow-up.
|
|
76
|
+
NOT Restart a dev server already running for this project: check your background
|
|
77
|
+
processes and whether its port responds before starting another.
|
|
78
|
+
DEFAULT Order evidence ARIA snapshot, then computed style, then pixels.
|
|
79
|
+
NOT Screenshot diffing as primary evidence: it is flaky and names no cause.
|
|
80
|
+
NOT Reporting a state as checked when no interaction drove it.
|
|
81
|
+
|
|
82
|
+
OUTPUT
|
|
83
|
+
L1 VERDICT: PASS|FINDINGS|BLOCKED -- surface plus route, one sentence.
|
|
84
|
+
Findings -- one line each: `<width>px <selector> <measured> vs <expected>`.
|
|
85
|
+
Widths -- ONE table, one row per width, no prose:
|
|
86
|
+
`| width | doc scroll | overlap | min target | states driven | screenshot |`
|
|
87
|
+
Evidence -- one line per claim: the assertion, the value read, the width it was read at.
|
|
88
|
+
States -- one line marking each of the nine driven, not-applicable, or not-reached.
|
|
89
|
+
CAP 400w clean · 700w with findings. Three widths, a row per width, ARIA evidence, probe
|
|
90
|
+
values, and screenshot paths do not fit in 120w: a measured single-component pass ran
|
|
91
|
+
about 1300w once written as prose. The table is what bounds the per-width evidence, so
|
|
92
|
+
cut prose to reach the cap, never evidence.
|