@thebassclef/lite 0.1.0 → 0.1.3
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/dist/cli.cjs +40 -6
- package/dist/cli.js +40 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/substrate/.bassclef/lite-manifest.json +999 -92
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
- package/substrate/.claude/hooks/pre-commit-gate.sh +1 -2
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +30 -1
- package/substrate/.claude/luminaries/glenford-myers.md +230 -0
- package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
- package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
- package/substrate/.claude/luminaries/michael-feathers.md +2 -2
- package/substrate/.claude/luminaries/tony-hoare.md +170 -0
- package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
- package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
- package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
- package/substrate/.claude/rules/adr-discipline.md +120 -0
- package/substrate/.claude/rules/api-conventions.md +125 -0
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/defensive-bash.md +68 -0
- package/substrate/.claude/rules/deferred-actions.md +233 -0
- package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
- package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +3 -3
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
- package/substrate/.claude/rules/loop-discipline.md +81 -0
- package/substrate/.claude/rules/manual-prod-approval.md +100 -0
- package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
- package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/substrate/.claude/rules/new-dependency-check.md +51 -0
- package/substrate/.claude/rules/option-label-discipline.md +108 -0
- package/substrate/.claude/rules/pattern-annotation.md +100 -0
- package/substrate/.claude/rules/plain-english-discipline.md +11 -9
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
- package/substrate/.claude/rules/pr-title-shape.md +161 -0
- package/substrate/.claude/rules/prototype-workflow.md +65 -0
- package/substrate/.claude/rules/reserved-skill-names.md +123 -0
- package/substrate/.claude/rules/schema-management.md +49 -0
- package/substrate/.claude/rules/security.md +37 -0
- package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
- package/substrate/.claude/rules/skill-description-clarity.md +247 -0
- package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
- package/substrate/.claude/rules/substrate-config-schema.md +98 -0
- package/substrate/.claude/rules/test-list-discipline.md +175 -0
- package/substrate/.claude/rules/test-sufficiency.md +210 -0
- package/substrate/.claude/rules/testing-tier-config.md +145 -0
- package/substrate/.claude/rules/testing.md +38 -0
- package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
- package/substrate/.claude/rules/visual-hierarchy.md +437 -0
- package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
- package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
- package/substrate/.claude/skills/build/SKILL.md +1 -1
- package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/substrate/.claude/skills/decompose/SKILL.md +1 -1
- package/substrate/.claude/skills/diagnose/SKILL.md +1 -1
- package/substrate/.claude/skills/feynman/SKILL.md +90 -0
- package/substrate/.claude/skills/howdoi/SKILL.md +1 -1
- package/substrate/.claude/skills/ia-model/SKILL.md +1 -1
- package/substrate/.claude/skills/interaction-design/SKILL.md +1 -1
- package/substrate/.claude/skills/interpret-input/SKILL.md +8 -8
- package/substrate/.claude/skills/journal/SKILL.md +209 -0
- package/substrate/.claude/skills/kiss/SKILL.md +1 -1
- package/substrate/.claude/skills/launch/SKILL.md +14 -23
- package/substrate/.claude/skills/lean-canvas/SKILL.md +1 -1
- package/substrate/.claude/skills/longrun/SKILL.md +45 -8
- package/substrate/.claude/skills/luminary/SKILL.md +1 -1
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +1 -1
- package/substrate/.claude/skills/onboard-repo/SKILL.md +143 -709
- package/substrate/.claude/skills/pattern-review/SKILL.md +1 -1
- package/substrate/.claude/skills/personas/SKILL.md +5 -5
- package/substrate/.claude/skills/promote/SKILL.md +1 -1
- package/substrate/.claude/skills/requirement/SKILL.md +1 -1
- package/substrate/.claude/skills/retro/SKILL.md +1 -1
- package/substrate/.claude/skills/riff/SKILL.md +1 -1
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +1 -1
- package/substrate/.claude/skills/session-end/SKILL.md +1 -1
- package/substrate/.claude/skills/session-log/SKILL.md +3 -3
- package/substrate/.claude/skills/skills/SKILL.md +1 -1
- package/substrate/.claude/skills/spec/SKILL.md +1 -1
- package/substrate/.claude/skills/sprint/SKILL.md +1 -1
- package/substrate/.claude/skills/stage/SKILL.md +1 -1
- package/substrate/.claude/skills/state-a-problem/SKILL.md +1 -1
- package/substrate/.claude/skills/temperance/SKILL.md +1 -1
- package/substrate/.claude/skills/use-case/SKILL.md +1 -1
- package/substrate/.claude/skills/user-stories/SKILL.md +1 -1
- package/substrate/.claude/skills/value-prop/SKILL.md +1 -1
- package/substrate/.claude/skills/verify/SKILL.md +1 -1
- package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/substrate/.claude/skills/whereami/SKILL.md +2 -2
- package/substrate/CONTRIBUTING.md +1 -1
- package/substrate/README.md +5 -5
- package/substrate/lib/prose-scan-boundary.sh +171 -0
- package/substrate/lib/tier-check.sh +50 -1
- package/substrate/lib/tier-dependency-audit.sh +159 -4
- package/substrate/presence/install/bassclef-sync.template.sh +1 -1
- package/substrate/scripts/generate-lite-manifest.sh +21 -5
- package/substrate/standards/adr-template.md +86 -0
- package/substrate/standards/api-conventions/nextjs.md +84 -0
- package/substrate/standards/artifact-composition.md +209 -0
- package/substrate/standards/bash-hook-safety.md +246 -0
- package/substrate/standards/branch-stacking.md +408 -0
- package/substrate/standards/code-safety-principles.md +176 -0
- package/substrate/standards/composer-prerequisites.md +155 -0
- package/substrate/standards/dependency-discipline/cargo.md +39 -0
- package/substrate/standards/dependency-discipline/gem.md +43 -0
- package/substrate/standards/dependency-discipline/go-mod.md +41 -0
- package/substrate/standards/dependency-discipline/npm.md +42 -0
- package/substrate/standards/dependency-discipline/pip.md +42 -0
- package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/substrate/standards/deployment-topology.md +69 -0
- package/substrate/standards/docs-sync-allowlist.md +4 -4
- package/substrate/standards/domain-and-dns.md +145 -0
- package/substrate/standards/frontend-stack.md +67 -0
- package/substrate/standards/frontmatter-schema.md +154 -0
- package/substrate/standards/hook-injection-discipline.md +202 -0
- package/substrate/standards/hook-install-class.md +215 -0
- package/substrate/standards/input-handler-interface.md +152 -0
- package/substrate/standards/lite-manifest-schema-changes.md +60 -0
- package/substrate/standards/luminary-matching.md +105 -0
- package/substrate/standards/migration-discipline/active-record.md +50 -0
- package/substrate/standards/migration-discipline/alembic.md +43 -0
- package/substrate/standards/migration-discipline/gorm.md +50 -0
- package/substrate/standards/migration-discipline/prisma.md +53 -0
- package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
- package/substrate/standards/mobile-ephemeral-session.md +167 -0
- package/substrate/standards/model-routing-discipline.md +160 -0
- package/substrate/standards/persona-schema.md +229 -0
- package/substrate/standards/pluggable-luminaries.md +323 -0
- package/substrate/standards/pr-body-discipline.md +115 -0
- package/substrate/standards/preview-state-schema.md +189 -0
- package/substrate/standards/reserved-skill-names.md +120 -0
- package/substrate/standards/scannable-multi-option-output.md +261 -0
- package/substrate/standards/sdlc-gates/typescript.md +57 -0
- package/substrate/standards/session-board.md +256 -0
- package/substrate/standards/state-spine-contract.md +255 -0
- package/substrate/standards/steering-hints/kiss-words.md +11 -0
- package/substrate/standards/substrate-config-schema.md +267 -0
- package/substrate/standards/tier-dependency-analysis.md +1 -1
- package/substrate/standards/tier-tag-schema.md +1 -1
- package/substrate/standards/two-layer-config.md +99 -0
- package/substrate/standards/use-case-format.md +292 -0
- package/substrate/standards/user-story-invest.md +268 -0
- package/substrate/standards/velocity-and-appetite.md +229 -0
- package/substrate/standards/voice-input-pattern.md +119 -0
- package/substrate/standards/worktree-management.md +211 -0
- package/substrate/templates/chronicle-template.md +75 -0
- package/substrate/templates/memory-proposal-template.md +77 -0
- package/substrate/templates/persona-template.md +200 -0
- package/substrate/templates/pr-faq.md +45 -0
- package/substrate/templates/secret-rotation-template.md +162 -0
- package/substrate/templates/spec-template.md +131 -0
- package/substrate/templates/use-case-template.md +194 -0
- package/substrate/templates/user-story-template.md +107 -0
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
name: visual-review
|
|
4
|
+
description: "Visual UX review \u2014 screenshot a rendered page and evaluate against design tokens, usability standard, and Creative Director / Designer luminaries. Requires Playwright MCP."
|
|
5
|
+
problem: "Rendered pages ship with visual regressions. Design tokens drift from usability standards."
|
|
6
|
+
value: "Visual UX review \u2014 screenshot a rendered page and evaluate against design tokens plus usability."
|
|
7
|
+
inputs: [Page URL and viewport]
|
|
8
|
+
outputs: [Screenshot at each viewport, Findings per usability rule, Token alignment report]
|
|
9
|
+
user_invocable: true
|
|
10
|
+
disable_model_invocation: false
|
|
11
|
+
composes_baseline: anthropic-frontend-design
|
|
12
|
+
requires:
|
|
13
|
+
cli: [npx]
|
|
14
|
+
mcp: [playwright]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Visual Review
|
|
18
|
+
|
|
19
|
+
Screenshot a rendered page and evaluate it against the project's design
|
|
20
|
+
system, usability standard, and luminary principles. This gives the
|
|
21
|
+
Designer and Creative Director "eyes" on what was actually built.
|
|
22
|
+
|
|
23
|
+
> **Baseline composition:** Bassclef's review composes on top of Anthropic's `frontend-design` skill defaults. Adopters firing plain Claude produce output evaluated against the baseline's typography + color + motion + spatial-composition guidance; this skill extends the evaluation with luminary-specific lenses (Tufte for data density, Ive for hierarchy, Rams for restraint, Cooper + Norman for affordances) plus bassclef's design-token + usability-standard discipline.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
### Infrastructure check (run before first use)
|
|
28
|
+
|
|
29
|
+
Check if Playwright MCP is available by looking for the
|
|
30
|
+
`mcp__playwright__browser_navigate` tool. If it's NOT available:
|
|
31
|
+
|
|
32
|
+
1. **Tell the user** — don't silently degrade:
|
|
33
|
+
> Visual review requires Playwright MCP but it's not available in this session.
|
|
34
|
+
> To install it, add the Playwright MCP server to your Claude Code config:
|
|
35
|
+
>
|
|
36
|
+
> ```json
|
|
37
|
+
> // In .claude/settings.json or ~/.claude/settings.json
|
|
38
|
+
> {
|
|
39
|
+
> "mcpServers": {
|
|
40
|
+
> "playwright": {
|
|
41
|
+
> "command": "npx",
|
|
42
|
+
> "args": ["@anthropic-ai/mcp-server-playwright"]
|
|
43
|
+
> }
|
|
44
|
+
> }
|
|
45
|
+
> }
|
|
46
|
+
> ```
|
|
47
|
+
>
|
|
48
|
+
> Then restart the session. Want me to add this to your settings now?
|
|
49
|
+
|
|
50
|
+
2. **If the user says yes**, use the `/update-config` skill to add the
|
|
51
|
+
Playwright MCP server configuration, then tell them to restart.
|
|
52
|
+
|
|
53
|
+
3. **If the user declines or this is an unattended session**, fall back
|
|
54
|
+
to manual verification mode: inspect code for tap targets, font sizes,
|
|
55
|
+
contrast values. Note "manual — no Playwright" in the report. This is
|
|
56
|
+
degraded mode, not a skip — a report is still required.
|
|
57
|
+
|
|
58
|
+
### Stale browser recovery
|
|
59
|
+
|
|
60
|
+
If Playwright MCP errors with "Target page, context or browser has been
|
|
61
|
+
closed" or "Browser is already in use", a stale chrome process from a
|
|
62
|
+
previous session is holding the lock. Fix:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pkill -f "mcp-chrome" 2>/dev/null; sleep 1
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then retry the navigation. This is common after long sessions, crashed
|
|
69
|
+
agents, or overnight runs where the browser outlived the session.
|
|
70
|
+
|
|
71
|
+
### Other prerequisites
|
|
72
|
+
|
|
73
|
+
- A page must be running (local dev server, staging URL, etc.)
|
|
74
|
+
- If the page requires auth, sign in first via Playwright before running this skill
|
|
75
|
+
|
|
76
|
+
## Procedure
|
|
77
|
+
|
|
78
|
+
### Step 1: Navigate and Screenshot (desktop + mobile)
|
|
79
|
+
|
|
80
|
+
Screenshot at **both** viewports. A desktop-only review misses broken
|
|
81
|
+
mobile layouts (sidebar eating half the screen, tables overflowing,
|
|
82
|
+
tap targets too close together).
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Desktop (1280px):
|
|
86
|
+
1. Resize to 1280x800 via mcp__playwright__browser_resize
|
|
87
|
+
2. Navigate to the target URL via mcp__playwright__browser_navigate
|
|
88
|
+
3. Wait for the page to load
|
|
89
|
+
4. Take a full-page screenshot via mcp__playwright__browser_take_screenshot
|
|
90
|
+
5. Capture the accessibility snapshot via mcp__playwright__browser_snapshot
|
|
91
|
+
|
|
92
|
+
Mobile (375px):
|
|
93
|
+
6. Resize to 375x812 via mcp__playwright__browser_resize
|
|
94
|
+
7. Take a full-page screenshot
|
|
95
|
+
8. Capture the accessibility snapshot
|
|
96
|
+
9. Check: does the sidebar collapse? Do tables reflow? Are tap targets ≥44px?
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If the mobile viewport shows a broken layout (sidebar visible at full width,
|
|
100
|
+
content pushed off-screen, horizontal scroll required), flag it as a
|
|
101
|
+
**FAIL** — not a minor issue. Mobile is not optional.
|
|
102
|
+
|
|
103
|
+
If the user didn't provide a URL, ask for one. Do not guess.
|
|
104
|
+
|
|
105
|
+
### Step 2: Structural Analysis (from accessibility snapshot)
|
|
106
|
+
|
|
107
|
+
Using the accessibility snapshot, evaluate:
|
|
108
|
+
|
|
109
|
+
- **Heading hierarchy**: Are headings properly nested (h1 > h2 > h3)?
|
|
110
|
+
- **Landmark regions**: Are banner, main, nav, contentinfo present?
|
|
111
|
+
- **Interactive elements**: Do all buttons/links have accessible labels?
|
|
112
|
+
- **Form structure**: Are form fields labeled? Are required fields marked?
|
|
113
|
+
|
|
114
|
+
### Step 3: Usability Standard Check (from screenshot + snapshot)
|
|
115
|
+
|
|
116
|
+
Evaluate against the 8-point usability standard (`.claude/rules/usability.md`):
|
|
117
|
+
|
|
118
|
+
| Check | Method | Pass/Fail |
|
|
119
|
+
|---|---|---|
|
|
120
|
+
| 1. Role check | Is operator jargon visible? Database enums exposed? | |
|
|
121
|
+
| 2. Scanning distance | Label-to-value gaps > 150px? | |
|
|
122
|
+
| 3. Typography hierarchy | Key numbers 14px+ bold? Labels smaller + muted? Text < 11px? | |
|
|
123
|
+
| 4. Jargon & copy | Raw enum values? Non-externalized labels? | |
|
|
124
|
+
| 5. Attribution | Actions attributed to people, not just counts? | |
|
|
125
|
+
| 6. Accessibility | Tap targets 44px+? Contrast 4.5:1+? Translucent text BGs? | |
|
|
126
|
+
| 7. Consistency | Same badge/status treatment everywhere? | |
|
|
127
|
+
| 8. Visual verification | Does what you SEE match what the code says? | |
|
|
128
|
+
|
|
129
|
+
For checks that need measurement, use `mcp__playwright__browser_evaluate` to
|
|
130
|
+
inspect computed styles:
|
|
131
|
+
|
|
132
|
+
```js
|
|
133
|
+
// Example: check tap target sizes
|
|
134
|
+
document.querySelectorAll('button, a, [role="button"]').forEach(el => {
|
|
135
|
+
const rect = el.getBoundingClientRect();
|
|
136
|
+
if (rect.width < 44 || rect.height < 44) {
|
|
137
|
+
console.log(`Small target: ${el.textContent?.trim()} (${rect.width}x${rect.height})`);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
// Example: check text sizes
|
|
144
|
+
document.querySelectorAll('*').forEach(el => {
|
|
145
|
+
const size = parseFloat(getComputedStyle(el).fontSize);
|
|
146
|
+
if (el.textContent?.trim() && size < 11) {
|
|
147
|
+
console.log(`Small text: "${el.textContent.trim().slice(0,30)}" at ${size}px`);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Step 4: Designer Evaluation (luminary lens)
|
|
153
|
+
|
|
154
|
+
Evaluate what you SEE through these lenses:
|
|
155
|
+
|
|
156
|
+
**Norman (usability)**:
|
|
157
|
+
- Is the right action obvious? Can you tell what to do without thinking?
|
|
158
|
+
- Are affordances clear? Do clickable things look clickable?
|
|
159
|
+
- Is error prevention in place? Can the user make mistakes easily?
|
|
160
|
+
|
|
161
|
+
**Cooper (goal-directed)**:
|
|
162
|
+
- Does the page serve the user's primary goal directly?
|
|
163
|
+
- Is there unnecessary friction between the user and their goal?
|
|
164
|
+
|
|
165
|
+
**Krug (don't make me think)**:
|
|
166
|
+
- Can you navigate without reading instructions?
|
|
167
|
+
- Are choices obvious and unambiguous?
|
|
168
|
+
|
|
169
|
+
### Step 5: Creative Director Evaluation (luminary lens)
|
|
170
|
+
|
|
171
|
+
Evaluate the visual design through these lenses:
|
|
172
|
+
|
|
173
|
+
**Lupton (typography)**:
|
|
174
|
+
- Is there a clear typographic hierarchy (headline > subhead > body > caption)?
|
|
175
|
+
- Is type used to tell a visual story, or is it all the same weight/size?
|
|
176
|
+
- Do font choices support the brand's personality?
|
|
177
|
+
|
|
178
|
+
**Albers (color)**:
|
|
179
|
+
- Are colors working in context (not just in isolation)?
|
|
180
|
+
- Is there a clear color hierarchy (primary action, secondary, muted)?
|
|
181
|
+
- Are color relationships intentional or accidental?
|
|
182
|
+
|
|
183
|
+
**Rams (good design)**:
|
|
184
|
+
- Is the design honest? Does it promise only what it delivers?
|
|
185
|
+
- Is it as little design as possible — less but better?
|
|
186
|
+
- Could anything be removed without losing function?
|
|
187
|
+
|
|
188
|
+
**Ive (craft)**:
|
|
189
|
+
- Is there obsessive attention to detail (radii, shadows, weight, spacing)?
|
|
190
|
+
- Does the digital surface feel considered, or thrown together?
|
|
191
|
+
- Is there material honesty — do elements feel like what they are?
|
|
192
|
+
|
|
193
|
+
**Kuznetsov (motion)** — if transitions/animations are present:
|
|
194
|
+
- Do animations guide attention or just decorate?
|
|
195
|
+
- Do state transitions convey meaning (loading, success, error)?
|
|
196
|
+
- Is motion hierarchy clear (primary action animates, background stays still)?
|
|
197
|
+
|
|
198
|
+
**Apple HIG (restraint)**:
|
|
199
|
+
- Is there progressive disclosure, or is everything shown at once?
|
|
200
|
+
- Is there visual clutter that could be removed?
|
|
201
|
+
- Does the design show restraint and clarity?
|
|
202
|
+
|
|
203
|
+
**Tufte (data display)** — if data is present:
|
|
204
|
+
- Is the data-ink ratio high (minimal chartjunk)?
|
|
205
|
+
- Are numbers formatted for scanning (aligned, consistent decimals)?
|
|
206
|
+
- Is the most important data the most visually prominent?
|
|
207
|
+
|
|
208
|
+
### Step 5.5: Prototype Drift Check (production UI only)
|
|
209
|
+
|
|
210
|
+
When reviewing a production UI surface (not a prototype itself), diff
|
|
211
|
+
the rendered production against the approved prototype referenced by
|
|
212
|
+
the iteration goal or canvas. See
|
|
213
|
+
`.claude/rules/prototype-production-coupling.md` §4.
|
|
214
|
+
|
|
215
|
+
1. Locate the approved prototype for this surface — check the active
|
|
216
|
+
iteration goal's References block, or canvas under `docs/canvases/`,
|
|
217
|
+
for a `docs/prototypes/` path.
|
|
218
|
+
2. If no prototype exists and the surface is user-visible: flag as a
|
|
219
|
+
finding ("prototype-production coupling rule §2 violation — no
|
|
220
|
+
prototype on file for this surface").
|
|
221
|
+
3. If a prototype exists, render both and compare structurally:
|
|
222
|
+
- Layout: same regions, same hierarchy
|
|
223
|
+
- Affordances: same interaction targets, same visual weights
|
|
224
|
+
- Token fidelity: same color/spacing/type vocabulary
|
|
225
|
+
4. Acceptable variances (call out with rationale):
|
|
226
|
+
- Responsive adaptation for viewport
|
|
227
|
+
- Real-data density shifts (more rows, truncation)
|
|
228
|
+
- Performance-driven simplifications (removed animations)
|
|
229
|
+
5. Unacceptable (block merge as finding):
|
|
230
|
+
- Layout restructure
|
|
231
|
+
- Affordance changes (button → link, etc.)
|
|
232
|
+
- Hierarchy inversions
|
|
233
|
+
- Token substitutions not documented in an ADR
|
|
234
|
+
|
|
235
|
+
Output: "Prototype drift: [none | minor (listed) | blocking (listed)]"
|
|
236
|
+
|
|
237
|
+
### Step 6: Output Findings
|
|
238
|
+
|
|
239
|
+
Write a structured report:
|
|
240
|
+
|
|
241
|
+
```markdown
|
|
242
|
+
## Visual Review: [page name / URL]
|
|
243
|
+
|
|
244
|
+
**Screenshot**: [reference to saved file]
|
|
245
|
+
**Date**: [today]
|
|
246
|
+
**Reviewer**: Designer + Creative Director (automated)
|
|
247
|
+
|
|
248
|
+
### Structural (accessibility snapshot)
|
|
249
|
+
- [findings]
|
|
250
|
+
|
|
251
|
+
### Usability Standard (8-point check)
|
|
252
|
+
| Check | Result | Notes |
|
|
253
|
+
|---|---|---|
|
|
254
|
+
| 1. Role check | PASS/FAIL | |
|
|
255
|
+
| ... | | |
|
|
256
|
+
|
|
257
|
+
### Designer Findings
|
|
258
|
+
- **Norman**: [findings]
|
|
259
|
+
- **Cooper**: [findings]
|
|
260
|
+
- **Krug**: [findings]
|
|
261
|
+
|
|
262
|
+
### Creative Director Findings
|
|
263
|
+
- **Lupton**: [findings]
|
|
264
|
+
- **Albers**: [findings]
|
|
265
|
+
- **Apple HIG**: [findings]
|
|
266
|
+
- **Tufte**: [findings, if applicable]
|
|
267
|
+
|
|
268
|
+
### Summary
|
|
269
|
+
- **Critical** (must fix before merge): [list]
|
|
270
|
+
- **Important** (should fix this iteration): [list]
|
|
271
|
+
- **Minor** (log for future): [list]
|
|
272
|
+
- **Positive** (what's working well): [list]
|
|
273
|
+
|
|
274
|
+
### Verdict: PASS / PASS WITH NOTES / FAIL
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## Luminary Separation — Creator vs. Evaluator
|
|
278
|
+
|
|
279
|
+
When an iteration goal names a primary luminary, that luminary guided
|
|
280
|
+
construction. Visual review must use **complementary luminaries** as
|
|
281
|
+
evaluators — never grade your own homework.
|
|
282
|
+
|
|
283
|
+
### Complement pairs
|
|
284
|
+
|
|
285
|
+
| Primary (guided construction) | Evaluator (validates in visual review) | Tension |
|
|
286
|
+
|---|---|---|
|
|
287
|
+
| Norman (affordance) | Krug (simplicity) + Apple HIG (restraint) | "Is it obvious?" vs. "Is it too much?" |
|
|
288
|
+
| Cooper (goals) | Norman (affordance) + Weinschenk (cognition) | "Right goal?" vs. "Right controls?" |
|
|
289
|
+
| Krug (simplicity) | Cooper (goals) + Norman (affordance) | "Simple enough?" vs. "Complete enough?" |
|
|
290
|
+
| Lupton (typography) | Tufte (data clarity) + Rams (honesty) | "Does it narrate?" vs. "Is it true?" |
|
|
291
|
+
| Albers (color) | Heller (appropriateness) + Ive (craft) | "Does it work?" vs. "Does it feel right?" |
|
|
292
|
+
| Tufte (data) | Lupton (hierarchy) + Rams (less but better) | "Shows the data?" vs. "Tells the story?" |
|
|
293
|
+
| Prater (entity-derived) | Norman (affordance) + Morville (findability) | "Matches the model?" vs. "Users find it?" |
|
|
294
|
+
| Morville (findability) | Prater (entity-derived) + Krug (simplicity) | "Can they find it?" vs. "Do they understand it?" |
|
|
295
|
+
| Apple HIG (restraint) | Lupton (expression) + Walter (delight) | "Restrained enough?" vs. "Too sterile?" |
|
|
296
|
+
| Rams (honesty) | Ive (craft) + Apple HIG (restraint) | "Honest?" vs. "Refined?" |
|
|
297
|
+
| Material (systematic) | Apple HIG (restraint) + Tufte (data clarity) | "Systematic?" vs. "Necessary?" |
|
|
298
|
+
| Tidwell (patterns) | Norman (affordance) + Cooper (goals) | "Proven pattern?" vs. "Right pattern for this goal?" |
|
|
299
|
+
|
|
300
|
+
### How to apply
|
|
301
|
+
|
|
302
|
+
1. Read the iteration goal's `primary_luminary:` field
|
|
303
|
+
2. Look up the complement pair above
|
|
304
|
+
3. In Step 4 (Designer Evaluation), weight the evaluator luminaries
|
|
305
|
+
4. In Step 5 (Creative Director Evaluation), use the CD complement
|
|
306
|
+
5. If no primary luminary is set, use all luminaries equally (default)
|
|
307
|
+
|
|
308
|
+
The complement creates productive tension: the evaluator asks the questions
|
|
309
|
+
the primary luminary wouldn't ask about their own approach.
|
|
310
|
+
|
|
311
|
+
## Prototype Variant Evaluation
|
|
312
|
+
|
|
313
|
+
When called during `/riff-prototypes`, visual review evaluates each
|
|
314
|
+
variant and produces a **structured comparison** to inform the operator's
|
|
315
|
+
selection. This replaces pure preference with evidence.
|
|
316
|
+
|
|
317
|
+
### Procedure for prototype evaluation
|
|
318
|
+
|
|
319
|
+
For each variant (2-3):
|
|
320
|
+
1. Run the full visual review (Steps 1-5)
|
|
321
|
+
2. Score each usability check (0-2: fail / partial / pass)
|
|
322
|
+
3. Note which luminary principles are strongest and weakest
|
|
323
|
+
4. Capture the variant's distinctive quality in one sentence
|
|
324
|
+
|
|
325
|
+
Then produce a comparison:
|
|
326
|
+
|
|
327
|
+
```markdown
|
|
328
|
+
## Prototype Comparison
|
|
329
|
+
|
|
330
|
+
| Criterion | Variant A (Norman) | Variant B (Lupton) | Variant C (Prater) |
|
|
331
|
+
|---|---|---|---|
|
|
332
|
+
| Usability score | 14/16 | 11/16 | 13/16 |
|
|
333
|
+
| Strongest principle | Affordance clarity | Visual narrative | Domain coherence |
|
|
334
|
+
| Weakest area | Visual storytelling | Tap target sizes | Discoverability |
|
|
335
|
+
| Distinctive quality | "Every action is obvious" | "The page tells a story" | "Navigation mirrors the domain" |
|
|
336
|
+
|
|
337
|
+
### Recommendation
|
|
338
|
+
Based on the iteration goal's risk and value signals:
|
|
339
|
+
- If retiring UX risk → [variant] scores highest on usability
|
|
340
|
+
- If proving lovability → [variant] has strongest emotional quality
|
|
341
|
+
- If proving viability → [variant] best serves the primary user goal
|
|
342
|
+
|
|
343
|
+
**Recommended winner**: [variant] — [one sentence why]
|
|
344
|
+
**Elements to carry from others**: [specific things worth keeping]
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
The operator makes the final call. The recommendation is evidence, not a decision.
|
|
348
|
+
|
|
349
|
+
### What happens after selection
|
|
350
|
+
|
|
351
|
+
1. Selected variant's luminary becomes `primary_luminary:` in iteration goal
|
|
352
|
+
2. Complement pair is set for all subsequent visual reviews in this iteration
|
|
353
|
+
3. `/ux-migration` runs next — gap analysis from prototype to production
|
|
354
|
+
4. Construction builds the real thing, guided by the selected luminary
|
|
355
|
+
5. Every UI commit during Construction triggers visual review with the complement evaluators
|
|
356
|
+
|
|
357
|
+
## When to run this skill (MUST gate for UI changes)
|
|
358
|
+
|
|
359
|
+
This skill is a **MUST gate** — not a suggestion — for these triggers:
|
|
360
|
+
|
|
361
|
+
| Trigger | Gate level | Who invokes |
|
|
362
|
+
|---|---|---|
|
|
363
|
+
| Builder completes a UI change | **MUST** — blocks commit | Builder via /verify |
|
|
364
|
+
| Prototype sprint variant evaluation | **MUST** — blocks selection | Designer |
|
|
365
|
+
| Transition spot-check | **SHOULD** — logged if skipped | Creative Director |
|
|
366
|
+
| Human requests it | **MUST** — explicit invocation | Anyone |
|
|
367
|
+
|
|
368
|
+
**Evidence requirement**: Visual review produces a report file at
|
|
369
|
+
`docs/visual-reviews/YYYY-MM-DD-{page-name}.md`. The pre-commit hook
|
|
370
|
+
checks for this when UI files are staged. No report = warning.
|
|
371
|
+
|
|
372
|
+
If Playwright MCP is unavailable, the agent MUST:
|
|
373
|
+
1. State that Playwright MCP is not available
|
|
374
|
+
2. Perform manual verification (tap targets, contrast, typography from code)
|
|
375
|
+
3. Note "manual — no screenshot" in the report
|
|
376
|
+
4. This is degraded mode, not a skip
|
|
377
|
+
|
|
378
|
+
## Headless / CI Mode
|
|
379
|
+
|
|
380
|
+
Visual review can run in headless environments (Docker, CI, staging) for
|
|
381
|
+
automated pipeline verification. This extends the local-only default.
|
|
382
|
+
|
|
383
|
+
### Environment detection
|
|
384
|
+
|
|
385
|
+
At skill start, detect the environment:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# CI environment
|
|
389
|
+
[ -n "$CI" ] || [ -n "$GITHUB_ACTIONS" ] || [ -n "$GITLAB_CI" ]
|
|
390
|
+
|
|
391
|
+
# Docker / headless
|
|
392
|
+
[ ! -d /tmp/.X11-unix ] && [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Headless Playwright configuration
|
|
396
|
+
|
|
397
|
+
Playwright MCP runs headless by default — no display server needed. The
|
|
398
|
+
screenshots are identical to headed mode. No special configuration required
|
|
399
|
+
for headless operation.
|
|
400
|
+
|
|
401
|
+
If running in Docker, ensure the container has:
|
|
402
|
+
```dockerfile
|
|
403
|
+
# Playwright dependencies
|
|
404
|
+
RUN npx playwright install --with-deps chromium
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Targeting staging URLs
|
|
408
|
+
|
|
409
|
+
Visual review can target any URL, not just localhost:
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
/visual-review https://staging.example.com/deals
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
When targeting staging:
|
|
416
|
+
- Auth may differ — use staging credentials or service account
|
|
417
|
+
- Data may differ — note in report: "Reviewed against staging data"
|
|
418
|
+
- Network latency affects load times — increase wait timeouts
|
|
419
|
+
- Never target production for automated reviews (read-only risk is low,
|
|
420
|
+
but the principle matters)
|
|
421
|
+
|
|
422
|
+
### CI integration (GitHub Actions)
|
|
423
|
+
|
|
424
|
+
Run visual review as a non-blocking PR check:
|
|
425
|
+
|
|
426
|
+
```yaml
|
|
427
|
+
# .github/workflows/visual-review.yml
|
|
428
|
+
name: Visual Review
|
|
429
|
+
on: [pull_request]
|
|
430
|
+
|
|
431
|
+
jobs:
|
|
432
|
+
visual-review:
|
|
433
|
+
runs-on: ubuntu-latest
|
|
434
|
+
if: contains(github.event.pull_request.labels.*.name, 'ui-change')
|
|
435
|
+
steps:
|
|
436
|
+
- uses: actions/checkout@v4
|
|
437
|
+
|
|
438
|
+
- name: Install dependencies
|
|
439
|
+
run: npm ci && npx playwright install --with-deps chromium
|
|
440
|
+
|
|
441
|
+
- name: Start dev server
|
|
442
|
+
run: npm run dev &
|
|
443
|
+
env:
|
|
444
|
+
PORT: 3000
|
|
445
|
+
|
|
446
|
+
- name: Wait for server
|
|
447
|
+
run: npx wait-on http://localhost:3000 --timeout 30000
|
|
448
|
+
|
|
449
|
+
- name: Run visual review
|
|
450
|
+
run: npx claude -p "/visual-review http://localhost:3000"
|
|
451
|
+
continue-on-error: true # non-blocking initially
|
|
452
|
+
|
|
453
|
+
- name: Upload screenshots
|
|
454
|
+
uses: actions/upload-artifact@v4
|
|
455
|
+
with:
|
|
456
|
+
name: visual-review-screenshots
|
|
457
|
+
path: docs/visual-reviews/
|
|
458
|
+
if-no-files-found: warn
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### PR artifact screenshots
|
|
462
|
+
|
|
463
|
+
Screenshots are saved as PR artifacts for human review. The report
|
|
464
|
+
references them:
|
|
465
|
+
|
|
466
|
+
```markdown
|
|
467
|
+
### Screenshots
|
|
468
|
+
- Desktop (1280px): [artifact: visual-review-screenshots/desktop.png]
|
|
469
|
+
- Mobile (375px): [artifact: visual-review-screenshots/mobile.png]
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
In CI, these are downloadable from the Actions run. In local review,
|
|
473
|
+
they're at `docs/visual-reviews/`.
|
|
474
|
+
|
|
475
|
+
### Blocking vs. non-blocking
|
|
476
|
+
|
|
477
|
+
| Phase | Gate level | Recommended |
|
|
478
|
+
|-------|-----------|------------|
|
|
479
|
+
| Initial adoption | Non-blocking (continue-on-error) | Learn what it catches without blocking PRs |
|
|
480
|
+
| After 2 weeks | Blocking for FAIL verdicts | FAIL = broken layout, not style nits |
|
|
481
|
+
| Mature | Blocking for FAIL + PASS WITH NOTES | Full gate enforcement |
|
|
482
|
+
|
|
483
|
+
Start non-blocking. Promote to blocking after the team trusts the verdicts.
|
|
484
|
+
|
|
485
|
+
### Environment requirements summary
|
|
486
|
+
|
|
487
|
+
| Environment | Display | Server | Auth | Notes |
|
|
488
|
+
|-------------|---------|--------|------|-------|
|
|
489
|
+
| Local dev | Headed or headless | localhost:3000 | Dev credentials | Default mode |
|
|
490
|
+
| Docker | Headless | localhost:PORT | Dev credentials | Install playwright deps |
|
|
491
|
+
| CI (GitHub Actions) | Headless | localhost:PORT | Dev credentials | Upload artifacts |
|
|
492
|
+
| Staging | Headless | staging URL | Staging credentials | Note in report |
|
|
493
|
+
| Production | Not recommended | — | — | Use staging instead |
|
|
494
|
+
|
|
495
|
+
## What this skill does NOT do
|
|
496
|
+
|
|
497
|
+
- Interactive flow testing (clicking through multi-step flows) — see /visual-qa
|
|
498
|
+
- Design token generation — that's the Creative Director's job
|
|
499
|
+
- Implementation fixes — flag issues, don't fix them
|
|
500
|
+
|
|
501
|
+
## Output discipline
|
|
502
|
+
|
|
503
|
+
Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
|