<< All versions

Skill v1.0.0

currentAutomated scan100/100
lugassawan/swe-workbench/principle-product-design
──Details
PublishedSeptember 27, 2026 at 08:03 PM
Content Hashsha256:07016a69c513fe3b...
Git SHAec10c6e51f09
──Files
Files (1 file, 10.5 KB)
SKILL.md10.5 KBactive
SKILL.md · 146 lines · 10.5 KB

version: "1.0.0" name: principle-product-design description: UX and product design principles — Nielsen's 10 usability heuristics, visual hierarchy, interaction design patterns, design-system compliance, and responsive layout. Accessibility/WCAG conformance is delegated to swe-workbench:principle-accessibility. Auto-load when reviewing UX, evaluating usability, assessing visual hierarchy or information architecture, auditing design-system compliance, or planning user-facing features.


<!-- preload-canary: SWB-PRELOAD-PRINCIPLE-PRODUCT-DESIGN -->

Product Design Principles

Usability Heuristics (Nielsen's 10)

Every user-facing component must satisfy these. Violations block progress.

HeuristicRuleCommon Violation
Visibility of system statusUsers always know what's happeningNo loading indicator during async operations; silent failures with no feedback
Match between system and real worldUse language and concepts users knowDeveloper jargon in UI labels ("null", "undefined", "404"); unfamiliar abbreviations
User control and freedomProvide undo, cancel, and escape routesDestructive action with no confirmation; no way to cancel an in-progress operation
Consistency and standardsSame action, same result, everywhereButton styles that vary across views; inconsistent terminology for the same concept
Error preventionPrevent errors before they happenAllowing invalid input submission; no constraints on date ranges or numeric fields
Recognition over recallShow options, don't force memorizationHidden navigation requiring memorized paths; no search/filter on long lists
Flexibility and efficiencySupport both novice and expert usersNo keyboard shortcuts for power users; no progressive disclosure for complex forms
Aesthetic and minimalist designEvery element earns its placeCluttered layouts with competing visual weights; information overload on a single view
Error recoveryClear error messages with actionable next steps"Something went wrong" with no guidance; error messages using technical stack traces
Help and documentationContextual help where users need itNo tooltips on ambiguous icons; no onboarding for complex features

Visual Hierarchy

Users scan, they don't read. Guide their attention.

PrincipleRuleCommon Violation
Size communicates importancePrimary content largest, secondary smaller, tertiary smallestAll text same size; critical numbers not emphasized
Weight directs attentionBold for key data, regular for supporting contentEverything bold (nothing stands out) or everything light (nothing anchors)
Color creates meaningSemantic colors for states (profit/loss, success/error), muted for secondaryArbitrary color usage; profit shown in red (wrong cultural mapping)
Spacing creates groupingRelated items closer together, unrelated items further apartUniform spacing everywhere; no visual relationship between elements
Alignment creates orderConsistent alignment grid; numbers right-aligned in tablesMixed alignment; numbers left-aligned making comparison impossible
Whitespace prevents overloadGenerous padding around content blocks; breathing room between sectionsCramped layouts; every pixel filled with content

Information Architecture

Apply when features involve navigation, content structure, or multi-step flows.

PatternWhen to UseKey Rule
Clear navigationAny app with multiple viewsUser always knows where they are and how to get back
Logical groupingContent with multiple categoriesGroup by user mental model, not implementation structure
Content prioritizationViews with mixed-importance contentMost important content visible first; progressive disclosure for details
Search and filterLists with >10 itemsProvide search for text content, filters for categorical data
BreadcrumbsHierarchical navigation deeper than 2 levelsShow full path; each segment clickable

Interaction Design

Apply when building interactive components, forms, or stateful UI.

PatternRuleCommon Violation
Immediate feedbackEvery user action gets a visible response within 100msButton click with no visual change until async completes
Loading statesShow skeleton or spinner for operations >300msBlank screen during data fetch; layout shift when content loads
Empty statesMeaningful message + action when no data existsBlank area with no explanation; "No results" with no guidance
Error statesSpecific message + recovery action for every failure modeGeneric error; error shown far from the source; no retry option
Confirmation for destructive actionsRequire explicit confirmation before delete/remove/resetSingle-click delete with no undo; confirmation dialog with unclear consequences
Progressive disclosureShow simple view first, reveal complexity on demandAll options visible at once on complex forms; no way to access advanced settings
Optimistic updatesUpdate UI immediately, reconcile on server responseWait for server round-trip before showing change

Design System Compliance

When a design system exists (check CLAUDE.md or docs/design-system.md), enforce consistency.

RuleEnforcement
Use existing tokensColors, spacing, typography from the design system — never raw hex/px values for themed properties
Use existing componentsCheck component library before building new ones
Follow naming conventionsComponent names, CSS classes, token names match established patterns
Maintain visual consistencyNew components match the visual language of existing ones
Document deviationsIf a design system rule is broken, document why explicitly

Responsive and Adaptive Design

Apply when building layouts that must work across screen sizes.

PatternRule
Mobile-firstStart with smallest layout, enhance for larger screens
Fluid layoutsUse relative units (%, rem, fr) over fixed px for layout dimensions
Breakpoint strategyDefine breakpoints by content needs, not device names
Touch-friendly44px minimum touch targets; adequate spacing between tappable elements
Content reflowContent reflows gracefully — no horizontal scroll, no truncated critical info

Accessibility/WCAG conformance (keyboard navigation, color contrast, ARIA, semantic HTML, screen-reader patterns) → swe-workbench:principle-accessibility.

Rationalization Tables

Usability Violation Excuses

ExcuseReality
"Users will figure it out"They won't. They'll leave, complain, or misuse the feature. Design for clarity.
"It's obvious from context"What's obvious to the builder is rarely obvious to the user. Test with fresh eyes.
"We don't have time for empty/error states"An app without error states is an app that breaks silently. Users lose trust faster than you think.
"Loading states are polish, not essential"A blank screen with no feedback makes users click again, creating duplicate actions. Loading states prevent errors.
"The user will only do this once"First impressions determine whether users return. One-time flows need the most guidance.
"Power users don't need hand-holding"Even power users need system status visibility, error recovery, and consistent behavior. Heuristics apply universally.

Visual Design Violation Excuses

ExcuseReality
"It matches the mockup"Mockups don't cover all states, screen sizes, or data variations. Validate against principles, not just pixels.
"Consistent spacing is nitpicking"Inconsistent spacing creates subconscious unease. Users can't articulate why it feels "off" but they notice.
"The data determines the layout"You determine how data is presented. No dataset should break your visual hierarchy. Design for extremes.
"We'll polish it in a design pass"Polishing 50 components later costs more than getting 1 component right now. Visual quality is not a phase.

Red Flags — STOP and Reassess

  • Interactive element using <div> or <span> instead of semantic HTML (see swe-workbench:principle-accessibility for the correct elements)
  • Color as the only way to communicate state (red/green without icons or text)
  • No loading indicator for any async operation
  • Form with no validation feedback until submission
  • Custom component that duplicates an existing design system component
  • Layout that assumes specific data length (truncation without tooltip, overflow without scroll)
  • Interactive element smaller than 44×44 px
  • No visual feedback on hover, focus, or active states
  • Error message that says "Error" or "Something went wrong" with no specifics

If You Catch Yourself Thinking…

ThoughtWhat to Do Instead
"I'll add the loading state later"Add it now. Define the three states (loading, content, error) before writing the content state.
"The contrast looks fine to me"Check it. Use the project's semantic color tokens which should already meet WCAG AA.
"This doesn't need an empty state"Every list, table, and data view needs an empty state. What does the user see when there's nothing to show?
"I'll match the existing pattern"Check if the existing pattern meets usability heuristics first. Don't propagate violations.
"Users won't notice the inconsistent spacing"They will — subconsciously. Use the design system's spacing tokens.
"This form is simple, no need for validation UX"Every form needs inline validation, clear error messages, and prevented submission of invalid data.
"It works on my screen size"Does it work at 320px? At 1440px? With 200% font scaling? Test the extremes.

UX Complexity Threshold

ComplexityInteraction PatternStates RequiredExample
Display onlyStatic content, no interactionContent, emptyDashboard metric card, static label
Simple interactionSingle action, immediate resultContent, empty, loading, error, hover, focusToggle switch, single button action
Form interactionUser input with validationContent, empty, loading, error, validation, disabled, successSearch input, settings form
Complex flowMulti-step, stateful, conditionalAll above + progress, confirmation, undo, partial errorMulti-step wizard, bulk operations, drag-and-drop
All versions