/sumi:qa [implementation and design spec to compare]from Sumi
Audits implementation code against design specs — checks token usage, spacing, typography, colors, responsive behavior, and accessibility. Accepts file paths or pasted code and optional design spec.
Ships in Sumi. Installing the plugin adds it to Claude Code.
This command needs an implementation and the design spec to compare it against.
If the user invoked it with nothing and no target is evident from the conversation or open files, ask for it in one plain-language question and stop. Do not invent a target and do not produce generic output in place of the real work — output about something imaginary reads as authoritative and is worthless.
If a target is evident from context, use it and say which one you picked.
Compare what was designed against what was built. Pixel-level design QA auditing implementation code against design tokens, visual specs, state coverage, responsive behavior, and accessibility requirements. The difference between "shipped" and "polished" lives in this command.
Accepts: Implementation code (file paths or pasted) as the primary input. Design spec (Figma, /style output, /tokens output, or screenshot) as the source of truth. If no spec is provided, audit against best practices and the token system detected in the code.
/style output, /tokens output, or screenshot of intended design. This is the source of truth/tokens (design tokens), /style (visual direction), /screen (screen specs), /component (component specs) if availableCompare every value in the implementation against the design token system.
Colors:
--color-primary, --color-surface)Typography:
--font-size-body not 14px)Spacing:
Border radius:
--radius-sm, --radius-md, --radius-lg)Shadows/Elevation:
Output: Table of every hardcoded value with the correct token reference.
For each component and screen:
Layout alignment:
Spacing consistency:
Typography fidelity:
Color fidelity:
Icons:
Images:
Check every interactive element for required states:
Buttons:
Inputs/Forms:
Cards/List items:
Modals/Dialogs:
Navigation:
Data displays:
Severity for missing states:
Check at 4 key breakpoints:
Mobile (375px):
Tablet (768px):
Desktop (1280px):
Wide (1536px+):
Flag any breakpoint where the experience degrades.
Quick accessibility audit on the implementation:
Focus management:
Tab order:
Color contrast:
ARIA and semantics:
Screen reader basics:
Note: For a full accessibility audit, use /a11y.
Flag any code patterns that may cause cross-browser issues:
Generate a prioritized punch list with four severity tiers:
Each item includes: what is wrong, where it is, expected value, actual value, and the specific fix.
## Design QA Report: [Target Name]
### Context
- **Implementation**: [files/components examined]
- **Design spec**: [source of truth used]
- **Platform**: [web/iOS/Android]
- **Prior Sumi context**: [consumed or "none"]
---
### Fidelity Summary
| Category | Issues | Critical | Major | Minor | Polish |
|----------|--------|----------|-------|-------|--------|
| Token Consumption | [N] | [N] | [N] | [N] | [N] |
| Visual Fidelity | [N] | [N] | [N] | [N] | [N] |
| State Coverage | [N] | [N] | [N] | [N] | [N] |
| Responsive | [N] | [N] | [N] | [N] | [N] |
| Accessibility | [N] | [N] | [N] | [N] | [N] |
| Cross-Browser | [N] | [N] | [N] | [N] | [N] |
| **Total** | **[N]** | **[N]** | **[N]** | **[N]** | **[N]** |
**Ship Readiness**: [Ready / Needs Critical Fixes / Needs Major Fixes / Not Ready]
---
### Token Consumption Audit
| # | Property | Component | Actual Value | Expected Token | Severity |
|---|----------|-----------|-------------|----------------|----------|
| 1 | color | .btn-primary | #2563eb | --color-primary | Minor |
| 2 | padding | .card | 13px | --spacing-3 (12px) | Minor |
[complete list]
---
### Visual Fidelity
#### [Component/Screen Name]
| # | Issue | Expected | Actual | Severity |
|---|-------|----------|--------|----------|
[per-component findings with specific values]
---
### State Coverage
| Component | Default | Hover | Focus | Active | Disabled | Loading | Error | Empty |
|-----------|---------|-------|-------|--------|----------|---------|-------|-------|
| Button | Yes | Yes | No | Yes | No | No | N/A | N/A |
| Input | Yes | N/A | Yes | N/A | No | N/A | No | N/A |
[complete matrix]
**Missing states by severity**:
- **Critical**: [list]
- **Major**: [list]
- **Minor**: [list]
---
### Responsive Fidelity
#### Mobile (375px)
[Findings with specific values]
#### Tablet (768px)
[Findings]
#### Desktop (1280px)
[Findings]
#### Wide (1536px+)
[Findings]
---
### Accessibility Fidelity
| # | Issue | Element | WCAG Criterion | Severity | Fix |
|---|-------|---------|---------------|----------|-----|
[findings with specific fixes]
---
### Cross-Browser Notes
[Flagged patterns with fallback recommendations]
---
### QA Punch List (Prioritized)
| # | Severity | Category | Component | Issue | Expected | Actual | Fix |
|---|----------|----------|-----------|-------|----------|--------|-----|
| 1 | Critical | A11y | nav-link | No focus indicator | 2px outline | none | Add focus-visible style |
| 2 | Critical | States | submit-btn | No loading state | Spinner | Static | Add loading prop |
| 3 | Major | Tokens | card | Hardcoded shadow | --shadow-md | 0 2px 8px | Replace with token |
[complete prioritized list]
---
### Next Steps
1. **Fix** critical and major issues
2. **Run** `/a11y` for full accessibility audit
3. **Run** `/grade` to score visual quality after fixes
4. **Run** `/audit` if systemic issues suggest deeper problems
The output MUST include:
The output MUST NOT include:
/a11y — keep it focused on implementation fidelityWhen performing design QA, draw knowledge from:
design-systems-architecture — Token architecture, naming conventions, consumption patternsvisual-design-mastery — Visual quality standards, alignment, hierarchy, consistencyaccessibility-inclusive-design — WCAG 2.2 compliance criteria, focus management, contrast ratiosplatform-visual-standards — Platform-specific conventions (iOS HIG, Material 3, CSS standards)component-patterns-code — Component implementation standards, state management, prop APIsperformance-states-patterns — Loading, error, empty, and skeleton state requirementsinteraction-motion-design — Transition and animation standardsAfter /qa:
/a11y — Full accessibility audit with WCAG 2.2 AA checklist/grade — Visual quality scoring after fixes/audit — Comprehensive design audit if systemic issues found/component [name] — Rebuild flagged components from scratch/tokens — Revisit token system if consumption issues are systemicWhen the user runs /qa project or /qa codebase or /qa all, scan the entire project for design consistency issues across all components and screens.
Step 1: Discover UI Files Scan the project for all UI-related files:
**/*.tsx, **/*.jsx — React components**/*.vue — Vue components**/*.svelte — Svelte components**/*.css, **/*.scss — Stylesheets**/*.swift — SwiftUI views**/tailwind.config.* — Tailwind configuration.sumi/style.json — Sumi design memoryStep 2: Extract Design Values
From every UI file, extract and catalog:
| Category | What to Extract | How to Detect |
|---|---|---|
| Colors | Every color value used | Hex (#xxx), rgb(), oklch(), Tailwind color classes (text-blue-500, bg-gray-100), CSS variables (var(--color-*)) |
| Font sizes | Every font size | text-xs through text-9xl, font-size values, clamp() values |
| Font families | Every font used | font-family declarations, Tailwind font-* classes |
| Font weights | Every weight used | font-light through font-black, font-weight values |
| Spacing | Every spacing value | p-, m-, gap-, space-, padding/margin CSS values |
| Border radius | Every radius value | rounded-*, border-radius values |
| Shadows | Every shadow value | shadow-*, box-shadow values |
| Z-index | Every z-index value | z-*, z-index values |
| Breakpoints | Every responsive breakpoint | sm:, md:, lg:, xl:, @media queries |
| Transitions | Every transition/animation | transition-, animation-, @keyframes |
Step 3: Consistency Analysis
For each category, analyze:
Color Consistency:
Typography Consistency:
Spacing Consistency:
Component Pattern Consistency:
Step 4: Drift Report
Output a structured drift report:
## Design Consistency Report — [Project Name]
### Overview
| Metric | Value | Health |
|--------|-------|--------|
| Total UI files scanned | [N] | — |
| Unique colors | [N] | 🟢 Good (<20) / 🟡 Warning (20-40) / 🔴 Critical (40+) |
| Unique font sizes | [N] | 🟢 Good (<10) / 🟡 Warning (10-15) / 🔴 Critical (15+) |
| Unique spacing values | [N] | 🟢 Good (<12) / 🟡 Warning (12-20) / 🔴 Critical (20+) |
| Token compliance | [N]% | 🟢 Good (>80%) / 🟡 Warning (50-80%) / 🔴 Critical (<50%) |
| Design system coverage | [N]% | — |
### Color Drift
| Color Value | Occurrences | Likely Intent | Suggested Token |
|-------------|-------------|---------------|-----------------|
| #2563eb | 23 | Primary action | var(--color-primary) |
| #2461e8 | 3 | Primary action (drift!) | var(--color-primary) — merge with #2563eb |
| #ef4444 | 12 | Error/destructive | var(--color-error) |
| #ff0000 | 1 | Error (orphan!) | var(--color-error) — merge with #ef4444 |
### Typography Drift
| Size | Occurrences | Likely Role | On Scale? |
|------|-------------|-------------|-----------|
| text-2xl (1.5rem) | 15 | Section heading | ✅ |
| text-[22px] | 2 | Section heading (drift!) | ❌ → use text-2xl |
### Spacing Drift
[Similar table for spacing values]
### Component Pattern Drift
| Pattern | Variants Found | Should Be | Files |
|---------|---------------|-----------|-------|
| Button padding | px-4 py-2, px-3 py-1.5, px-6 py-3 | 3 sizes (sm/md/lg) | [list] |
| Card radius | rounded-lg (12), rounded-xl (3), rounded-2xl (1) | Pick one: rounded-lg | [list] |
| Input border | border-gray-300 (8), border-gray-200 (3), border-slate-300 (2) | Standardize to one | [list] |
### Priority Fixes
Top 10 consistency issues ranked by frequency × severity:
1. [Most impactful fix]
2. [Second most impactful]
...
### Token Generation
If design tokens don't exist, generate a token file that standardizes all the values found:
- Map the most-used color values to semantic tokens
- Map font sizes to a type scale
- Map spacing to a grid scale
- Output as CSS custom properties and/or tailwind.config.js theme extension
/qa project can recommend running /fix on specific files with the most drift/qa project should reference .sumi/style.json if it exists and check compliance against those tokens/qa project, suggest running /tokens to generate a standardized token fileWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub phazurlabs/sumi --plugin sumi38 commands in this plugin
/a11yAccessibility audit — WCAG 2.2 AA full checklist, ARIA audit, keyboard navigation, color contrast (APCA), focus management, screen reader, cognitive a11y, with code fixes./ai-auditAudit AI-powered features against agentic, trust, safety, and interaction best practices with scoring and specific fix recommendations./animateGenerate production animations — CSS keyframes, Framer Motion, scroll-driven, micro-interactions, with reduced motion fallbacks./auditComprehensive design audit — heuristic, cognitive, flow, fortification, cognitive load analysis, and summary scoring in one command. Run all lenses or pick specific sections./before-afterBefore/after comparison — show exactly how AI-generated slop transforms into production-quality UI. Visual proof of every design improvement./benchmarkCompetitive analysis — 10-dimension scorecard, gap analysis, improvement roadmap, and differentiation strategy.Other plugins' commands for the same job