@salesforce/afv-skills 1.53.0 → 1.55.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 (51) hide show
  1. package/package.json +1 -1
  2. package/skills/dx-org-analyze/README.md +310 -0
  3. package/skills/dx-org-analyze/SKILL.md +261 -0
  4. package/skills/dx-org-analyze/references/collection-details.md +88 -0
  5. package/skills/dx-org-analyze/references/report-format.md +67 -0
  6. package/skills/dx-org-analyze/scripts/collect_org_data.py +823 -0
  7. package/skills/dx-org-analyze/scripts/compute_diff.py +1103 -0
  8. package/skills/dx-org-analyze/scripts/introspect_org.py +436 -0
  9. package/skills/dx-org-analyze/tests/README.md +46 -0
  10. package/skills/dx-org-analyze/tests/fixtures/org_a.json +76 -0
  11. package/skills/dx-org-analyze/tests/fixtures/org_b.json +70 -0
  12. package/skills/dx-org-analyze/tests/test_compute_diff.sh +284 -0
  13. package/skills/dx-org-analyze/tests/test_consistency.sh +428 -0
  14. package/skills/experience-design-validate/SKILL.md +163 -0
  15. package/skills/experience-design-validate/references/ai.md +54 -0
  16. package/skills/experience-design-validate/references/components.md +61 -0
  17. package/skills/experience-design-validate/references/craft.md +158 -0
  18. package/skills/experience-design-validate/references/data.md +59 -0
  19. package/skills/experience-design-validate/references/forms-flows.md +57 -0
  20. package/skills/experience-design-validate/references/interaction.md +53 -0
  21. package/skills/experience-design-validate/references/navigation.md +51 -0
  22. package/skills/experience-design-validate/references/performance.md +56 -0
  23. package/skills/experience-design-validate/references/records.md +60 -0
  24. package/skills/experience-design-validate/references/responsive.md +48 -0
  25. package/skills/experience-design-validate/references/scoring-rubric.md +257 -0
  26. package/skills/experience-design-validate/references/state.md +53 -0
  27. package/skills/experience-design-validate/references/trust.md +47 -0
  28. package/skills/experience-design-validate/references/usability.md +35 -0
  29. package/skills/experience-design-validate/references/visual-system.md +183 -0
  30. package/skills/service-agentforce-contact-center-coordinate/SKILL.md +170 -0
  31. package/skills/service-agentforce-contact-center-coordinate/assets/escalation-flow.flow-meta.xml +72 -0
  32. package/skills/service-agentforce-contact-center-coordinate/assets/omni-flow.flow-meta.xml +85 -0
  33. package/skills/service-agentforce-contact-center-coordinate/assets/report-template.md +52 -0
  34. package/skills/service-agentforce-contact-center-coordinate/references/agentforce-prerequisite.md +31 -0
  35. package/skills/service-agentforce-contact-center-coordinate/references/messaging_channel.md +76 -0
  36. package/skills/service-agentforce-contact-center-coordinate/references/number_management_api.md +78 -0
  37. package/skills/service-agentforce-contact-center-coordinate/references/omni-flow-routing.md +74 -0
  38. package/skills/service-agentforce-contact-center-coordinate/references/setup_summary.md +36 -0
  39. package/skills/service-agentforce-contact-center-coordinate/references/verification_and_errors.md +42 -0
  40. package/skills/service-agentforce-contact-center-coordinate/scripts/check-agentforce-prereq.sh +54 -0
  41. package/skills/service-agentforce-contact-center-coordinate/scripts/create-routing-flows.sh +49 -0
  42. package/skills/service-agentforce-contact-center-coordinate/scripts/create-voice-agent.sh +73 -0
  43. package/skills/service-agentforce-contact-center-coordinate/scripts/create-voice-channel.sh +66 -0
  44. package/skills/service-agentforce-contact-center-coordinate/scripts/fetch-numbers.sh +21 -0
  45. package/skills/service-agentforce-contact-center-coordinate/scripts/lib.sh +46 -0
  46. package/skills/service-agentforce-contact-center-coordinate/scripts/prepare-agent-workdir.sh +21 -0
  47. package/skills/service-agentforce-contact-center-coordinate/scripts/procure-number.sh +24 -0
  48. package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-acc-queue.sh +27 -0
  49. package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-channel-line.sh +37 -0
  50. package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-flow-definition.sh +33 -0
  51. package/skills/service-agentforce-contact-center-coordinate/scripts/verify-number-live.sh +63 -0
@@ -0,0 +1,428 @@
1
+ #!/usr/bin/env bash
2
+ # Consistency tests for dx-org-analyze SKILL.md and scripts.
3
+ # Verifies skill structure, script references, and report contract.
4
+ #
5
+ # Usage: bash tests/test_consistency.sh
6
+ # Exit 0 on all-pass, 1 on any failure.
7
+
8
+ set -u
9
+
10
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11
+ SKILL_FILE="$SCRIPT_DIR/../SKILL.md"
12
+ SCRIPTS_DIR="$SCRIPT_DIR/../scripts"
13
+
14
+ if [[ ! -f "$SKILL_FILE" ]]; then
15
+ echo "FAIL: SKILL.md not found at $SKILL_FILE"
16
+ exit 1
17
+ fi
18
+
19
+ PASS=0
20
+ FAIL=0
21
+
22
+ pass() { echo " PASS: $1"; PASS=$((PASS + 1)); }
23
+ fail() { echo " FAIL: $1"; FAIL=$((FAIL + 1)); }
24
+
25
+ # ============================================================
26
+ echo "=== Test 1: YAML frontmatter is well-formed ==="
27
+ # ============================================================
28
+
29
+ if head -1 "$SKILL_FILE" | grep -q "^---$"; then
30
+ CLOSE_LINE=$(awk 'NR>1 && /^---$/ {print NR; exit}' "$SKILL_FILE")
31
+ if [[ -n "$CLOSE_LINE" ]]; then
32
+ pass "YAML frontmatter opens and closes (line $CLOSE_LINE)"
33
+ else
34
+ fail "YAML frontmatter has no closing ---"
35
+ fi
36
+ else
37
+ fail "SKILL.md does not start with ---"
38
+ fi
39
+
40
+ # ============================================================
41
+ echo ""
42
+ echo "=== Test 2: Required frontmatter fields ==="
43
+ # ============================================================
44
+
45
+ CLOSE_LINE=$(awk 'NR>1 && /^---$/ {print NR; exit}' "$SKILL_FILE")
46
+ if [[ -n "$CLOSE_LINE" ]]; then
47
+ FRONTMATTER=$(sed -n "1,${CLOSE_LINE}p" "$SKILL_FILE")
48
+ for field in "name:" "description:" "metadata:"; do
49
+ if echo "$FRONTMATTER" | grep -q "$field"; then
50
+ pass "Frontmatter has '$field'"
51
+ else
52
+ fail "Frontmatter missing '$field'"
53
+ fi
54
+ done
55
+ SKILL_NAME=$(echo "$FRONTMATTER" | grep "^name:" | awk '{print $2}')
56
+ EXPECTED_NAME=$(basename "$(cd "$SCRIPT_DIR/.." && pwd)")
57
+ if [[ "$SKILL_NAME" == "$EXPECTED_NAME" ]]; then
58
+ pass "Skill name '$SKILL_NAME' matches directory name"
59
+ else
60
+ fail "Skill name '$SKILL_NAME' doesn't match directory name '$EXPECTED_NAME'"
61
+ fi
62
+ if echo "$FRONTMATTER" | grep -q "version:"; then
63
+ pass "Frontmatter has 'metadata.version'"
64
+ else
65
+ fail "Frontmatter missing 'metadata.version'"
66
+ fi
67
+ fi
68
+
69
+ # ============================================================
70
+ echo ""
71
+ echo "=== Test 3: SKILL.md references both scripts ==="
72
+ # ============================================================
73
+
74
+ if grep -qF "collect_org_data.py" "$SKILL_FILE"; then
75
+ pass "References collect_org_data.py"
76
+ else
77
+ fail "Missing reference to collect_org_data.py"
78
+ fi
79
+
80
+ if grep -qF "compute_diff.py" "$SKILL_FILE"; then
81
+ pass "References compute_diff.py"
82
+ else
83
+ fail "Missing reference to compute_diff.py"
84
+ fi
85
+
86
+ # ============================================================
87
+ echo ""
88
+ echo "=== Test 4: Scripts exist and are executable ==="
89
+ # ============================================================
90
+
91
+ for script in "collect_org_data.py" "compute_diff.py"; do
92
+ SPATH="$SCRIPTS_DIR/$script"
93
+ if [[ -f "$SPATH" ]]; then
94
+ pass "Script exists: $script"
95
+ else
96
+ fail "Script missing: $script"
97
+ fi
98
+ if [[ -x "$SPATH" ]]; then
99
+ pass "Script is executable: $script"
100
+ else
101
+ fail "Script not executable: $script"
102
+ fi
103
+ if head -1 "$SPATH" | grep -q "python3"; then
104
+ pass "Script has python3 shebang: $script"
105
+ else
106
+ fail "Script missing python3 shebang: $script"
107
+ fi
108
+ done
109
+
110
+ # ============================================================
111
+ echo ""
112
+ echo "=== Test 5: Scripts accept --help ==="
113
+ # ============================================================
114
+
115
+ for script in "collect_org_data.py" "compute_diff.py"; do
116
+ if python3 "$SCRIPTS_DIR/$script" --help >/dev/null 2>&1; then
117
+ pass "$script --help exits 0"
118
+ else
119
+ fail "$script --help failed"
120
+ fi
121
+ done
122
+
123
+ # ============================================================
124
+ echo ""
125
+ echo "=== Test 6: collect_org_data.py has required flags ==="
126
+ # ============================================================
127
+
128
+ HELP_COLLECT=$(python3 "$SCRIPTS_DIR/collect_org_data.py" --help 2>&1)
129
+ for flag in "org-alias" "output" "skip-deep-data"; do
130
+ if echo "$HELP_COLLECT" | grep -qF -- "--$flag"; then
131
+ pass "collect_org_data.py supports --$flag"
132
+ else
133
+ fail "collect_org_data.py missing flag: --$flag"
134
+ fi
135
+ done
136
+
137
+ # ============================================================
138
+ echo ""
139
+ echo "=== Test 7: compute_diff.py has required flags ==="
140
+ # ============================================================
141
+
142
+ HELP_DIFF=$(python3 "$SCRIPTS_DIR/compute_diff.py" --help 2>&1)
143
+ for flag in "org-a" "org-b" "output" "format" "org-a-label" "org-b-label"; do
144
+ if echo "$HELP_DIFF" | grep -qF -- "--$flag"; then
145
+ pass "compute_diff.py supports --$flag"
146
+ else
147
+ fail "compute_diff.py missing flag: --$flag"
148
+ fi
149
+ done
150
+
151
+ # ============================================================
152
+ echo ""
153
+ echo "=== Test 8: SF CLI authentication documented ==="
154
+ # ============================================================
155
+
156
+ if grep -qF "sf org list" "$SKILL_FILE"; then
157
+ pass "Documents 'sf org list' for listing authenticated orgs"
158
+ else
159
+ fail "Missing: sf org list"
160
+ fi
161
+
162
+ if grep -qF "sf data query" "$SKILL_FILE"; then
163
+ pass "Documents 'sf data query' for validating connectivity"
164
+ else
165
+ fail "Missing: sf data query"
166
+ fi
167
+
168
+ if grep -qF "sf org login web" "$SKILL_FILE"; then
169
+ pass "Documents 'sf org login web' for authentication"
170
+ else
171
+ fail "Missing: sf org login web"
172
+ fi
173
+
174
+ # ============================================================
175
+ echo ""
176
+ echo "=== Test 9: Drift score constants in compute_diff.py ==="
177
+ # ============================================================
178
+
179
+ DIFF_SCRIPT="$SCRIPTS_DIR/compute_diff.py"
180
+ for term in "WEIGHT_METADATA" "WEIGHT_PERMISSION" "WEIGHT_PROFILE" "DRIFT_LEVELS"; do
181
+ if grep -qF "$term" "$DIFF_SCRIPT"; then
182
+ pass "Drift constant '$term' in compute_diff.py"
183
+ else
184
+ fail "Missing drift constant: '$term'"
185
+ fi
186
+ done
187
+
188
+ if grep -qF "0.6" "$DIFF_SCRIPT" && grep -qF "0.3" "$DIFF_SCRIPT" && grep -qF "0.1" "$DIFF_SCRIPT"; then
189
+ pass "Weights are 0.6 / 0.3 / 0.1"
190
+ else
191
+ fail "Drift weights don't match expected 0.6 / 0.3 / 0.1"
192
+ fi
193
+
194
+ for level in "LOW" "MODERATE" "HIGH" "CRITICAL"; do
195
+ if grep -qF "\"$level\"" "$DIFF_SCRIPT"; then
196
+ pass "Severity level '$level' defined"
197
+ else
198
+ fail "Missing severity level: '$level'"
199
+ fi
200
+ done
201
+
202
+ # ============================================================
203
+ echo ""
204
+ echo "=== Test 10: System permissions support ==="
205
+ # ============================================================
206
+
207
+ COLLECT_SCRIPT="$SCRIPTS_DIR/collect_org_data.py"
208
+
209
+ if grep -qF "collect_system_permissions" "$COLLECT_SCRIPT"; then
210
+ pass "collect_org_data.py has collect_system_permissions function"
211
+ else
212
+ fail "collect_org_data.py missing collect_system_permissions"
213
+ fi
214
+
215
+ if grep -qF "PermissionsXxx" "$COLLECT_SCRIPT" || grep -qF "Permissions" "$COLLECT_SCRIPT" && grep -qF "PermissionSet" "$COLLECT_SCRIPT"; then
216
+ pass "collect_org_data.py queries PermissionsXxx fields on PermissionSet"
217
+ else
218
+ fail "Missing PermissionsXxx/PermissionSet query"
219
+ fi
220
+
221
+ if grep -qF "system_permissions" "$COLLECT_SCRIPT"; then
222
+ pass "collect_org_data.py outputs system_permissions in result"
223
+ else
224
+ fail "Missing system_permissions in output"
225
+ fi
226
+
227
+ DIFF_SCRIPT="$SCRIPTS_DIR/compute_diff.py"
228
+
229
+ if grep -qF "diff_system_permissions" "$DIFF_SCRIPT"; then
230
+ pass "compute_diff.py has diff_system_permissions function"
231
+ else
232
+ fail "compute_diff.py missing diff_system_permissions"
233
+ fi
234
+
235
+ if grep -qF "System Permissions" "$DIFF_SCRIPT"; then
236
+ pass "compute_diff.py renders System Permissions section in report"
237
+ else
238
+ fail "Missing System Permissions section in markdown report"
239
+ fi
240
+
241
+ # ============================================================
242
+ echo ""
243
+ echo "=== Test 11: collect_org_data.py uses SF CLI and public APIs ==="
244
+ # ============================================================
245
+
246
+ COLLECT_SCRIPT="$SCRIPTS_DIR/collect_org_data.py"
247
+
248
+ if grep -qF "sf org list metadata-types" "$COLLECT_SCRIPT" || grep -qF "metadata-types" "$COLLECT_SCRIPT"; then
249
+ pass "Uses sf CLI metadata-types for type discovery"
250
+ else
251
+ fail "Missing sf CLI metadata type discovery"
252
+ fi
253
+
254
+ if grep -qF "sf org list metadata" "$COLLECT_SCRIPT" || grep -qF "list metadata" "$COLLECT_SCRIPT"; then
255
+ pass "Uses sf CLI to list metadata components"
256
+ else
257
+ fail "Missing sf CLI metadata listing"
258
+ fi
259
+
260
+ if grep -qF "OrganizationSettingsDetail" "$COLLECT_SCRIPT"; then
261
+ pass "Uses OrganizationSettingsDetail for org settings (public API)"
262
+ else
263
+ fail "Missing OrganizationSettingsDetail — must use public API for settings"
264
+ fi
265
+
266
+ if grep -qF "/limits/" "$COLLECT_SCRIPT"; then
267
+ pass "Uses REST /limits/ endpoint for org limits"
268
+ else
269
+ fail "Missing /limits/ endpoint — must use public API for org limits"
270
+ fi
271
+
272
+ if grep -q "exit(2)\|sys.exit(2)" "$COLLECT_SCRIPT"; then
273
+ pass "Exits 2 on session expiry"
274
+ else
275
+ fail "Missing exit code 2 for session expiry"
276
+ fi
277
+
278
+ # Verify internal tools are NOT present
279
+ if grep -qF "hoseMyOrgPlease" "$COLLECT_SCRIPT"; then
280
+ fail "Still references hoseMyOrgPlease (internal-only tool, must be removed)"
281
+ else
282
+ pass "No references to hoseMyOrgPlease (internal tool removed)"
283
+ fi
284
+
285
+ # ============================================================
286
+ echo ""
287
+ echo "=== Test 12: Core rules in SKILL.md ==="
288
+ # ============================================================
289
+
290
+ RULES=("Read-only" "never deploy" "session expired")
291
+
292
+ for rule in "${RULES[@]}"; do
293
+ if grep -qiF "$rule" "$SKILL_FILE"; then
294
+ pass "Core rule/concept present: '$rule'"
295
+ else
296
+ fail "Missing: '$rule'"
297
+ fi
298
+ done
299
+
300
+ # ============================================================
301
+ echo ""
302
+ echo "=== Test 13: No hardcoded metadata type tiers ==="
303
+ # ============================================================
304
+
305
+ HARDCODED_TIERS=$(grep -cE "^\*\*Tier [0-9]" "$SKILL_FILE" || true)
306
+ if [[ "$HARDCODED_TIERS" -eq 0 ]]; then
307
+ pass "No hardcoded tier lists in SKILL.md"
308
+ else
309
+ fail "Found $HARDCODED_TIERS hardcoded tier lists — use describeMetadata instead"
310
+ fi
311
+
312
+ # ============================================================
313
+ echo ""
314
+ echo "=== Test 14: No internal-only references in SKILL.md ==="
315
+ # ============================================================
316
+
317
+ if grep -qF "hoseMyOrgPlease" "$SKILL_FILE"; then
318
+ fail "SKILL.md still references hoseMyOrgPlease (internal-only)"
319
+ else
320
+ pass "No hoseMyOrgPlease references in SKILL.md"
321
+ fi
322
+
323
+ if grep -qF "SOAP Partner API" "$SKILL_FILE" || grep -qF "SOAP Login" "$SKILL_FILE"; then
324
+ fail "SKILL.md still references SOAP login (removed for external use)"
325
+ else
326
+ pass "No SOAP login references in SKILL.md"
327
+ fi
328
+
329
+ if grep -qF "Web Login" "$SKILL_FILE" && grep -qF "sid cookie" "$SKILL_FILE"; then
330
+ fail "SKILL.md still references web login with sid cookie (removed for external use)"
331
+ else
332
+ pass "No web login/cookie references in SKILL.md"
333
+ fi
334
+
335
+ # ============================================================
336
+ echo ""
337
+ echo "=== Test 15: introspect_org.py exists and is executable ==="
338
+ # ============================================================
339
+
340
+ INTROSPECT_SCRIPT="$SCRIPTS_DIR/introspect_org.py"
341
+ if [[ -f "$INTROSPECT_SCRIPT" ]]; then
342
+ pass "Script exists: introspect_org.py"
343
+ else
344
+ fail "Script missing: introspect_org.py"
345
+ fi
346
+ if [[ -x "$INTROSPECT_SCRIPT" ]]; then
347
+ pass "Script is executable: introspect_org.py"
348
+ else
349
+ fail "Script not executable: introspect_org.py"
350
+ fi
351
+ if head -1 "$INTROSPECT_SCRIPT" | grep -q "python3"; then
352
+ pass "Script has python3 shebang: introspect_org.py"
353
+ else
354
+ fail "Script missing python3 shebang: introspect_org.py"
355
+ fi
356
+
357
+ # ============================================================
358
+ echo ""
359
+ echo "=== Test 16: introspect_org.py --help and flags ==="
360
+ # ============================================================
361
+
362
+ if python3 "$INTROSPECT_SCRIPT" --help >/dev/null 2>&1; then
363
+ pass "introspect_org.py --help exits 0"
364
+ else
365
+ fail "introspect_org.py --help failed"
366
+ fi
367
+
368
+ HELP_INTROSPECT=$(python3 "$INTROSPECT_SCRIPT" --help 2>&1)
369
+ for flag in "org" "output" "format" "label"; do
370
+ if echo "$HELP_INTROSPECT" | grep -qF -- "--$flag"; then
371
+ pass "introspect_org.py supports --$flag"
372
+ else
373
+ fail "introspect_org.py missing flag: --$flag"
374
+ fi
375
+ done
376
+
377
+ # ============================================================
378
+ echo ""
379
+ echo "=== Test 17: SKILL.md documents introspect workflow ==="
380
+ # ============================================================
381
+
382
+ if grep -qF "introspect_org.py" "$SKILL_FILE"; then
383
+ pass "SKILL.md references introspect_org.py"
384
+ else
385
+ fail "SKILL.md missing reference to introspect_org.py"
386
+ fi
387
+
388
+ if grep -qiF "Introspect Workflow" "$SKILL_FILE"; then
389
+ pass "SKILL.md has Introspect Workflow section"
390
+ else
391
+ fail "SKILL.md missing Introspect Workflow section"
392
+ fi
393
+
394
+ if grep -qiF "single-org" "$SKILL_FILE" || grep -qiF "single org" "$SKILL_FILE"; then
395
+ pass "SKILL.md mentions single-org mode"
396
+ else
397
+ fail "SKILL.md missing single-org mode documentation"
398
+ fi
399
+
400
+ if grep -qiF "introspect" "$SKILL_FILE"; then
401
+ pass "SKILL.md mentions introspect in description"
402
+ else
403
+ fail "SKILL.md description missing introspect trigger phrases"
404
+ fi
405
+
406
+ # ============================================================
407
+ echo ""
408
+ echo "=== Test 18: introspect_org.py report sections ==="
409
+ # ============================================================
410
+
411
+ for section in "Metadata Inventory" "Installed Packages" "Org Settings" "Org Limits" "Licenses" "System Permissions" "Deep Data"; do
412
+ if grep -qF "$section" "$INTROSPECT_SCRIPT"; then
413
+ pass "introspect_org.py renders '$section' section"
414
+ else
415
+ fail "introspect_org.py missing '$section' section"
416
+ fi
417
+ done
418
+
419
+ # ============================================================
420
+ echo ""
421
+ echo "================================================"
422
+ echo "Results: $PASS passed, $FAIL failed"
423
+ echo "================================================"
424
+
425
+ if [[ $FAIL -gt 0 ]]; then
426
+ exit 1
427
+ fi
428
+ exit 0
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: experience-design-validate
3
+ description: "Use this skill to run a visual-craft audit of a rendered UI and produce an evidence-grounded Craft Report across Useful, Usable, Reliable, Coherent, and Well-Crafted. Invoke it for craft audits, visual critiques, design comparisons, felt-quality reviews, or visual-craft readiness checks on screenshots (.png, .jpg, .jpeg, .webp, .gif), Figma frames, rendered prototypes, and live URLs. Do not use it for source-code review, SLDS compliance (use design-systems-slds-validate), or accessibility compliance (use experience-accessibility-validate)."
4
+ metadata:
5
+ version: "1.0"
6
+ domains: ["Experience"]
7
+ relatedSkills:
8
+ - "design-systems-slds-validate"
9
+ - "experience-accessibility-validate"
10
+ - "experience-lwc-generate"
11
+ - "experience-lwc-security-validate"
12
+ ---
13
+
14
+ # Experience Design Validate
15
+
16
+ Evaluate the visual craft of rendered software: what the eye sees and the felt quality those visible decisions create. Judge relationships, hierarchy, restraint, consistency, and care rather than CSS, tokens, or implementation technique.
17
+
18
+ This is a **visual-craft-only** audit. It does not establish WCAG conformance, keyboard or screen-reader support, behavioral usability, implementation quality, or production release readiness. Route accessibility compliance to `experience-accessibility-validate` and SLDS compliance to `design-systems-slds-validate`.
19
+
20
+ ## Use and boundaries
21
+
22
+ Use this skill to:
23
+
24
+ - Critique visual craft at a design checkpoint.
25
+ - Explain why a rendered design feels considered, cramped, calm, fragmented, or delightful.
26
+ - Compare the craft of two or more designs solving the same brief.
27
+ - Identify design moves that would lift a visible experience from good to great.
28
+
29
+ Do not use this skill for:
30
+
31
+ - Implementation or code review. For LWC generation or security review, use `experience-lwc-generate` or `experience-lwc-security-validate` as appropriate.
32
+ - Accessibility compliance, including WCAG, screen-reader, keyboard, or focus-order validation. Use `experience-accessibility-validate`.
33
+ - SLDS design-token compliance. Use `design-systems-slds-validate`.
34
+ - Claims about real-user behavior. Recommend a usability study when impact depends on behavior rather than visible evidence.
35
+
36
+ ## Visual evidence contract
37
+
38
+ Rendered pixels are mandatory. Prefer screenshots because they preserve the exact evidence reviewed.
39
+
40
+ 1. **Screenshots:** use supplied full-page or region captures directly.
41
+ 2. **Live URL:** if browser capability is available, open the URL, exercise only the relevant paths, capture screenshots, and retain the URL and viewport as evidence. Otherwise ask for screenshots.
42
+ 3. **Figma:** if Figma capability is available, fetch or export the named rendered frames. Treat a frame as static unless prototype behavior is actually exercised. Otherwise ask for frame exports or screenshots.
43
+ 4. **Screen recording or interactive prototype:** inspect observable transitions and capture representative frames when tooling supports it.
44
+ 5. **Source code, design descriptions, or inaccessible links:** do not infer the rendered result. Render with available capability; otherwise request screenshots.
45
+
46
+ If no rendered pixels are available:
47
+
48
+ - **Interactive run:** ask the user for screenshots or another rendered artifact and pause the audit.
49
+ - **Non-interactive run:** return status `INSUFFICIENT_VISUAL_EVIDENCE` with a short statement of the missing artifact. Do not score, assign a verdict, create findings, or imply readiness.
50
+
51
+ ### Evidence modes
52
+
53
+ Declare one mode before analysis:
54
+
55
+ | Mode | What it can support | What it cannot support |
56
+ |---|---|---|
57
+ | `STATIC_VISUAL` | Visible hierarchy, spacing, typography, color, density, composition, consistency, and the visible treatment of the captured moment | Interaction behavior, transitions between states, responsive adaptation beyond captured viewports, latency, runtime performance, or unseen states |
58
+ | `MULTI_VIEW_STATIC` | Static visual evidence across supplied screens, states, or viewport captures, including cross-screen coherence | The behavior connecting captures, timing, input response, runtime performance, or states not shown |
59
+ | `DYNAMIC_VISUAL` | Static qualities plus behavior directly exercised or recorded: interaction feedback, transitions, state changes, and perceived performance | Unexercised paths, unrecorded states, accessibility compliance, or measured performance beyond what was observed |
60
+
61
+ A static screenshot of a loading, error, or empty state supports critique of that state's **visible treatment only**. It does not substantiate state coverage, transition behavior, or performance. Never lower a score because an unobserved state or behavior was not supplied; mark that coverage `INSUFFICIENT_EVIDENCE` instead.
62
+
63
+ ## Five dimensions
64
+
65
+ | Dimension | Felt question |
66
+ |---|---|
67
+ | **Useful** | Does the visible content earn the space and attention it occupies? |
68
+ | **Usable** | Does the visible hierarchy and affordance make the intended path feel obvious? |
69
+ | **Reliable** | Do the observed states and feedback make the experience feel predictable? |
70
+ | **Coherent** | Does the visible experience feel made by one team with one taste? |
71
+ | **Well-Crafted** | Does the visible design feel precise, considered, and delightful? |
72
+
73
+ Use a 1-10 score only when the available evidence adequately covers a dimension. Use `INSUFFICIENT_EVIDENCE` when an applicable dimension cannot be supported. Use `N/A` only when the dimension or topic genuinely does not apply, never merely because evidence is missing.
74
+
75
+ Read `references/scoring-rubric.md` for scoring anchors, verdict rules, severity definitions, and the complete report contract.
76
+
77
+ ## Craft lens
78
+
79
+ Ask whether the rendered experience feels:
80
+
81
+ - **Breathable:** space structures the composition and gives the eye room.
82
+ - **Approachable:** the intended path is visually obvious without explanation.
83
+ - **Inviting:** visible states encourage exploration rather than present dead ends.
84
+ - **Considered:** repeated decisions form a system rather than an accumulation.
85
+ - **Quiet:** hierarchy is calm; few elements compete to be primary.
86
+ - **Delightful:** detail and personality are purposeful, not ornamental noise.
87
+ - **Confident:** the design has a point of view and avoids unnecessary hedging.
88
+
89
+ ## Audit workflow
90
+
91
+ Follow this order:
92
+
93
+ 1. Establish the evidence mode and inventory every supplied or captured artifact.
94
+ 2. If no rendered pixels exist, follow the insufficient-visual-evidence behavior and stop.
95
+ 3. Look before consulting rules. Record up to three honest first impressions for each design.
96
+ 4. Build the coverage and relevance ledger. For every dimension and reference topic, record `SCORED`, `N/A`, or `INSUFFICIENT_EVIDENCE`, the evidence mode, and a concise reason.
97
+ 5. Load `references/craft.md`, `references/scoring-rubric.md`, and `references/visual-system.md`. Load only conditional references whose topic is both relevant and observable in the evidence mode.
98
+ 6. Score only supported dimensions. Select the **highest anchor whose applicable, observable criteria are fully supported**; use an odd score only when evidence clearly exceeds that anchor without fully supporting the next.
99
+ 7. Write findings. Cap findings at five per dimension and deduplicate cross-dimensional root causes.
100
+ 8. Write the Craft Report, including the ledger and evidence limitations.
101
+
102
+ ## Progressive disclosure
103
+
104
+ Always load:
105
+
106
+ - `references/scoring-rubric.md`: scoring, coverage, severity, verdict, and report schema.
107
+ - `references/craft.md`: felt qualities of considered work.
108
+ - `references/visual-system.md`: visible layout, typography, color, and surfaces.
109
+
110
+ Load only when relevant **and observable**:
111
+
112
+ | Reference | Evidence needed |
113
+ |---|---|
114
+ | `references/components.md` | Visible buttons, inputs, modals, lists, tables, or feedback components |
115
+ | `references/navigation.md` | Visible navigation, tabs, breadcrumbs, search, or wayfinding |
116
+ | `references/responsive.md` | Captures from multiple viewports or directly exercised resizing |
117
+ | `references/forms-flows.md` | Multiple visible steps or directly exercised form behavior |
118
+ | `references/data.md` | Visible charts, dashboards, metrics, filters, results, or tables |
119
+ | `references/records.md` | Visible records, detail pages, status, metadata, or collaboration |
120
+ | `references/ai.md` | Visible AI, agent, chat, citations, or model output |
121
+ | `references/trust.md` | Visible auth, privacy, consent, permissions, or destructive settings |
122
+ | `references/usability.md` | Visible task structure; do not infer behavioral usability |
123
+ | `references/interaction.md` | `DYNAMIC_VISUAL` evidence of interaction or motion |
124
+ | `references/state.md` | `DYNAMIC_VISUAL` state transitions; static state captures support appearance only |
125
+ | `references/performance.md` | `DYNAMIC_VISUAL` evidence of timing, latency, or layout stability |
126
+
127
+ ## Finding voice
128
+
129
+ Speak at the felt level and anchor claims to visible evidence.
130
+
131
+ Good: "The toolbar feels overworked; too many controls compete for attention, so the eye cannot find the primary action."
132
+
133
+ Wrong scope: "Three button classes use inconsistent spacing tokens." That belongs in implementation or SLDS review.
134
+
135
+ Each finding must include `severity`, `primary_dimension`, optional `related_dimensions`, `location`, `problem`, `why_it_weakens_craft`, `what_better_looks_like`, and `fix`. When one problem appears in three or more places, create one finding with a count and representative location.
136
+
137
+ ## Comparative audits
138
+
139
+ Audit each design independently with the same evidence requirements and rubric. The report must include:
140
+
141
+ - Per-design evidence mode, coverage ledger, first impressions, dimension scores, evidence, and gap to the next supported level.
142
+ - A side-by-side comparison table that preserves `N/A` and `INSUFFICIENT_EVIDENCE` rather than forcing numeric comparisons.
143
+ - A result of `A_HIGHER_CRAFT`, `B_HIGHER_CRAFT`, `TIE`, or `MIXED`. Use `MIXED` when leadership varies by dimension or evidence coverage prevents an overall ranking.
144
+ - Differentiating dimensions, concrete craft moves each design makes better, and improvements each could borrow without copying.
145
+
146
+ Do not crown a winner when the evidence supports a tie or mixed outcome.
147
+
148
+ ## Output
149
+
150
+ If the user explicitly supplies an output path, write there exactly; that path overrides the naming convention. Otherwise use `YYYY-MM-DD-<target-slug>-craft-audit-<VERDICT>.md`, with uppercase `PASS`, `WARN`, `FAIL`, or `LIMITED`.
151
+
152
+ The report must make its scope explicit: verdicts and readiness implications cover **visual craft only**, not accessibility, functional correctness, measured performance, or production release approval.
153
+
154
+ Recommendations and cross-cutting patterns each contain **zero to five** items. Include only evidence-backed, useful entries; never add filler to reach a quota. End with the fix prompt defined in `references/scoring-rubric.md` only when at least one actionable recommendation exists.
155
+
156
+ ## Core principles
157
+
158
+ 1. **Pixels first.** No rendered evidence means no visual-craft audit.
159
+ 2. **Eye first, rules second.** Record first impressions before rubric analysis.
160
+ 3. **Evidence bounds claims.** Unobserved behavior is unknown, not defective.
161
+ 4. **Felt level, not implementation level.** Describe visual experience, not code.
162
+ 5. **Teach while auditing.** Explain why each finding matters and what better feels like.
163
+ 6. **Severity over volume.** A few sharp findings beat a padded checklist.
@@ -0,0 +1,54 @@
1
+ # AI & Agent UX
2
+
3
+ > **Skip this reference if the design shows no AI, LLM, agent, chat, citation, or model-output surfaces.**
4
+
5
+ Craft in AI surfaces is the difference between a model that feels considered and one that feels duct-taped. It lives in the visual rhythm of a multi-step progress timeline, the restraint of a "thinking" indicator that respects screen real estate, the elegance of an inline citation marker, and the quiet confidence of reasoning that sits subordinate to the answer. This reference judges the visual and behavioral craft of agent progress, disclosure, reasoning, confidence, citations, and review surfaces.
6
+
7
+ ## Why this matters
8
+
9
+ AI features are where craft becomes load-bearing — users decide in seconds whether to trust output, and that decision rests almost entirely on visual signals. When craft is high, the interface feels like it understands its own limits: progress is shown with precision, citations sit close to the claim they support, confidence is conveyed without drama, and reasoning collapses politely until invited. When craft is low, AI surfaces feel either showy (every token streaming, walls of "thinking", verbose tool logs) or evasive (no provenance, no progress, no way out). The visual treatment of AI is where the product proves it has thought about how the model fits into a human's workflow.
10
+
11
+ ---
12
+
13
+ ## Agent Progress
14
+
15
+ - **The work is visible as a timeline.** Each step has a status the user can read at a glance — pending, active, complete. A vague "thinking..." for thirty seconds reads as the product hiding from itself. Tool use is named, not narrated; verbose logs read as developer output left in production.
16
+ - **Stop is always available, and the input area stays alive.** The user can interrupt and clarify mid-flight. On completion, progress collapses politely — a summary remains, the scaffolding recedes. Failure preserves what was done.
17
+
18
+ ## Disclosure
19
+
20
+ - **AI is unmistakable in conversation.** A distinct avatar or label tells the user when they're talking to a model rather than a person. Ambiguity here is a small ethical breach.
21
+ - **AI-generated content carries a persistent signal until reviewed.** Handoffs between AI and human agents are clear. An escape to a human is always reachable.
22
+
23
+ ## Reasoning
24
+
25
+ - **Reasoning is subordinate to the answer.** The result leads; the explanation sits quietly below or behind a click. A wall of reasoning above the answer reads as showing off. Default is short; depth is on demand.
26
+ - **Tool invocations are collapsible.** What was called and what came back, summarized; full output one click away. Raw model internals stay out of production.
27
+
28
+ ## Confidence
29
+
30
+ - **Confidence is communicated without drama.** A simple visual register beats a percentage. Numeric confidence reads as false precision to most users. The source of uncertainty is named when possible. High-stakes outputs prompt review.
31
+
32
+ ## Citations
33
+
34
+ - **Claims and their sources sit close together.** A citation marker right after the claim, not collected at the bottom. Markers are subtle but reachable. Sources are specific — page, section, timestamp — not just a document name.
35
+ - **Quoted text and AI interpretation look different.** Source quality is visible — recency, authority, primary versus user-generated. Conflicts between sources are surfaced rather than hidden. Cited links go directly to the source.
36
+
37
+ ## Human Review
38
+
39
+ - **High-stakes AI output goes through a human gate.** Irreversible or third-party-affecting actions pause for explicit approval. The review queue presents proposed action, context, confidence, reasoning, and approve/reject/edit in one view.
40
+ - **Override is easy and unjudged.** No dark pattern friction punishes the human for disagreeing with the model. Batch approval exists but never defaults to "approve all."
41
+
42
+ ---
43
+
44
+ ## Scoring Guide
45
+
46
+ **Contributes to dimensions: Useful, Reliable, Coherent**
47
+
48
+ | Score | Criteria |
49
+ |-------|----------|
50
+ | 9-10 | The AI surface understands its own limits. Progress reads at a glance, citations sit near their claims, confidence is communicated without drama, and review gates handle the high-stakes work. |
51
+ | 7-8 | AI disclosure is present. Confidence and citations are mostly consistent. |
52
+ | 5-6 | Vague "thinking" indicators. Citations missing or batched. Confidence over-hedged or unstated. |
53
+ | 3-4 | The AI is a black box. No disclosure. Citations absent or misleading. |
54
+ | 1-2 | No disclosure. No guardrails. Outputs presented as fact without sources. |