@cliangdev/flux-plugin 0.2.0-dev.e34d43b → 0.2.0-dev.f718bcf
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/agents/coder.md +150 -25
- package/commands/breakdown.md +44 -7
- package/commands/implement.md +165 -15
- package/commands/prd.md +176 -1
- package/manifest.json +2 -1
- package/package.json +4 -2
- package/skills/prd-writer/SKILL.md +184 -0
- package/skills/ux-ui-design/SKILL.md +346 -0
- package/skills/ux-ui-design/references/design-tokens.md +359 -0
- package/src/dashboard/__tests__/api.test.ts +211 -0
- package/src/dashboard/browser.ts +35 -0
- package/src/dashboard/public/app.js +869 -0
- package/src/dashboard/public/index.html +90 -0
- package/src/dashboard/public/styles.css +807 -0
- package/src/dashboard/public/vendor/highlight.css +10 -0
- package/src/dashboard/public/vendor/highlight.min.js +8422 -0
- package/src/dashboard/public/vendor/marked.min.js +2210 -0
- package/src/dashboard/server.ts +296 -0
- package/src/dashboard/watchers.ts +83 -0
- package/src/server/adapters/__tests__/dependency-ops.test.ts +52 -18
- package/src/server/adapters/linear/adapter.ts +19 -14
- package/src/server/adapters/local-adapter.ts +48 -7
- package/src/server/db/__tests__/queries.test.ts +2 -1
- package/src/server/db/schema.ts +9 -0
- package/src/server/tools/__tests__/crud.test.ts +111 -1
- package/src/server/tools/__tests__/mcp-interface.test.ts +2 -1
- package/src/server/tools/__tests__/query.test.ts +73 -2
- package/src/server/tools/__tests__/z-configure-linear.test.ts +1 -1
- package/src/server/tools/__tests__/z-get-linear-url.test.ts +1 -1
- package/src/server/tools/create-epic.ts +11 -2
- package/src/server/tools/create-prd.ts +11 -2
- package/src/server/tools/create-task.ts +11 -2
- package/src/server/tools/dependencies.ts +2 -2
- package/src/server/tools/get-entity.ts +12 -10
- package/src/server/tools/render-status.ts +38 -20
- package/src/status-line/__tests__/status-line.test.ts +1 -1
- package/src/utils/status-renderer.ts +32 -6
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cliangdev/flux-plugin",
|
|
3
|
-
"version": "0.2.0-dev.
|
|
3
|
+
"version": "0.2.0-dev.f718bcf",
|
|
4
4
|
"description": "Claude Code plugin for AI-first workflow orchestration with MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/server/index.js",
|
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
19
|
"dev": "bun run src/server/index.ts",
|
|
20
|
-
"build": "bun build --compile --outfile bin/flux-server src/server/index.ts && bun build --compile --outfile bin/flux-status src/status-line/index.ts",
|
|
20
|
+
"build": "bun build --compile --outfile bin/flux-server src/server/index.ts && bun build --compile --outfile bin/flux-status src/status-line/index.ts && bun build --compile --outfile bin/flux-dashboard src/dashboard/server.ts",
|
|
21
21
|
"build:server": "bun build --compile --outfile bin/flux-server src/server/index.ts",
|
|
22
22
|
"build:status": "bun build --compile --outfile bin/flux-status src/status-line/index.ts",
|
|
23
|
+
"build:dashboard": "bun build --compile --outfile bin/flux-dashboard src/dashboard/server.ts",
|
|
24
|
+
"dev:dashboard": "bun run src/dashboard/server.ts",
|
|
23
25
|
"validate": "node scripts/validate-structure.cjs",
|
|
24
26
|
"test:integration": "bun test scripts/__tests__/integration.test.ts --timeout 120000",
|
|
25
27
|
"prepublishOnly": "bun run validate && bun run test:integration",
|
|
@@ -497,6 +497,190 @@ After PRD approval, ask based on project type:
|
|
|
497
497
|
|
|
498
498
|
**Goal**: Gather technical context to inform the PRD.
|
|
499
499
|
|
|
500
|
+
#### Step 2.0: Greenfield Detection & Setup
|
|
501
|
+
|
|
502
|
+
**Before exploring the codebase, check if this is a greenfield project.**
|
|
503
|
+
|
|
504
|
+
##### Detection
|
|
505
|
+
|
|
506
|
+
Check for project indicators:
|
|
507
|
+
```
|
|
508
|
+
- .git directory exists?
|
|
509
|
+
- package.json / go.mod / pyproject.toml / Cargo.toml / etc.?
|
|
510
|
+
- src/ or lib/ directories with code files?
|
|
511
|
+
- Any meaningful source files?
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
**If ALL indicators are missing → Greenfield project → Trigger setup flow**
|
|
515
|
+
|
|
516
|
+
##### Essential Setup Flow
|
|
517
|
+
|
|
518
|
+
When greenfield is detected, present:
|
|
519
|
+
|
|
520
|
+
```
|
|
521
|
+
This looks like a new project without existing setup.
|
|
522
|
+
|
|
523
|
+
Before we create the PRD, let's establish the foundation:
|
|
524
|
+
|
|
525
|
+
**Git Setup**
|
|
526
|
+
- Initialize repository with .gitignore
|
|
527
|
+
- Create branching structure: main + develop (git flow ready)
|
|
528
|
+
- Initial commit with project structure
|
|
529
|
+
|
|
530
|
+
**Project Structure** (based on {detected project type from Phase 1})
|
|
531
|
+
{Show recommended minimal structure for the project type}
|
|
532
|
+
|
|
533
|
+
**Package Setup**
|
|
534
|
+
- Initialize {package.json / pyproject.toml / go.mod / etc.}
|
|
535
|
+
- Add essential dev dependencies
|
|
536
|
+
|
|
537
|
+
Proceed with this setup?
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Use AskUserQuestion:
|
|
541
|
+
- "Yes, set up essentials" (Recommended)
|
|
542
|
+
- "Customize setup first"
|
|
543
|
+
- "Skip - I'll set up manually"
|
|
544
|
+
|
|
545
|
+
##### Essential Setup by Project Type
|
|
546
|
+
|
|
547
|
+
| Project Type | Git | Structure | Package Init |
|
|
548
|
+
|--------------|-----|-----------|--------------|
|
|
549
|
+
| **Web App (Node)** | .gitignore (node) | `src/`, `tests/`, `public/` | package.json with scripts |
|
|
550
|
+
| **Web App (Python)** | .gitignore (python) | `src/`, `tests/` | pyproject.toml |
|
|
551
|
+
| **CLI Tool (Node)** | .gitignore (node) | `src/`, `bin/`, `tests/` | package.json with bin |
|
|
552
|
+
| **CLI Tool (Go)** | .gitignore (go) | `cmd/`, `internal/`, `pkg/` | go.mod |
|
|
553
|
+
| **API/Backend** | .gitignore (lang) | `src/`, `tests/`, `config/` | Language-specific |
|
|
554
|
+
| **Library** | .gitignore (lang) | `src/`, `tests/`, `examples/` | Language-specific |
|
|
555
|
+
|
|
556
|
+
##### Executing Essential Setup
|
|
557
|
+
|
|
558
|
+
When user confirms, execute these commands:
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
# Git initialization
|
|
562
|
+
git init
|
|
563
|
+
git checkout -b main
|
|
564
|
+
git checkout -b develop
|
|
565
|
+
|
|
566
|
+
# Create .gitignore (language-appropriate)
|
|
567
|
+
# Create initial directory structure
|
|
568
|
+
# Initialize package manager
|
|
569
|
+
|
|
570
|
+
# Initial commit
|
|
571
|
+
git add .
|
|
572
|
+
git commit -m "Initial project setup
|
|
573
|
+
|
|
574
|
+
- Initialize git with main/develop branches
|
|
575
|
+
- Add .gitignore for {language}
|
|
576
|
+
- Create project structure
|
|
577
|
+
- Initialize {package manager}
|
|
578
|
+
|
|
579
|
+
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
|
|
580
|
+
|
|
581
|
+
# Return to develop for feature work
|
|
582
|
+
git checkout develop
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
##### Foundation PRD Offer
|
|
586
|
+
|
|
587
|
+
After essential setup completes (or if user skipped), offer comprehensive setup as a tracked PRD:
|
|
588
|
+
|
|
589
|
+
```
|
|
590
|
+
Foundation is ready. Would you like to track additional setup as a PRD?
|
|
591
|
+
|
|
592
|
+
A Foundation PRD would include:
|
|
593
|
+
- CI/CD pipeline (GitHub Actions / GitLab CI)
|
|
594
|
+
- Linting & formatting (ESLint+Prettier / Ruff / etc.)
|
|
595
|
+
- Testing framework setup
|
|
596
|
+
- Environment configuration (.env patterns)
|
|
597
|
+
- Pre-commit hooks
|
|
598
|
+
- Documentation structure
|
|
599
|
+
|
|
600
|
+
This gets tracked in Flux so you can implement it systematically.
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Use AskUserQuestion:
|
|
604
|
+
- "Create Foundation PRD" - Creates PRD with [tag: foundation], then continues to feature PRD
|
|
605
|
+
- "Skip - continue to feature PRD" (Recommended for simple projects)
|
|
606
|
+
|
|
607
|
+
##### Foundation PRD Template
|
|
608
|
+
|
|
609
|
+
If user wants a Foundation PRD, create it with this structure:
|
|
610
|
+
|
|
611
|
+
```markdown
|
|
612
|
+
# Project Foundation
|
|
613
|
+
|
|
614
|
+
> **Tag**: foundation
|
|
615
|
+
> **Depends on**: None
|
|
616
|
+
> **Blocks**: All feature PRDs
|
|
617
|
+
|
|
618
|
+
## Problem
|
|
619
|
+
|
|
620
|
+
New projects without proper tooling lead to inconsistent code quality,
|
|
621
|
+
manual testing overhead, and deployment friction.
|
|
622
|
+
|
|
623
|
+
## Users
|
|
624
|
+
|
|
625
|
+
Developers working on this codebase.
|
|
626
|
+
|
|
627
|
+
## Solution
|
|
628
|
+
|
|
629
|
+
Establish development infrastructure: CI/CD, code quality tools, testing
|
|
630
|
+
framework, and environment management.
|
|
631
|
+
|
|
632
|
+
## Features
|
|
633
|
+
|
|
634
|
+
### P0: Must Have
|
|
635
|
+
|
|
636
|
+
- **CI Pipeline**: Automated testing on push/PR
|
|
637
|
+
- **What**: GitHub Actions (or GitLab CI) workflow for test/lint/build
|
|
638
|
+
- **Not**: Deployment pipelines (separate PRD), complex matrix builds
|
|
639
|
+
- **Acceptance Criteria**:
|
|
640
|
+
- [ ] Push to any branch triggers CI
|
|
641
|
+
- [ ] PR cannot merge if CI fails
|
|
642
|
+
- [ ] CI runs tests, linting, and type checking
|
|
643
|
+
|
|
644
|
+
- **Code Quality**: Linting and formatting
|
|
645
|
+
- **What**: {ESLint+Prettier / Biome / Ruff / etc.} with pre-commit hooks
|
|
646
|
+
- **Not**: Custom rules beyond standard configs
|
|
647
|
+
- **Acceptance Criteria**:
|
|
648
|
+
- [ ] `{lint command}` runs without errors on codebase
|
|
649
|
+
- [ ] Pre-commit hook prevents committing unlinted code
|
|
650
|
+
- [ ] Editor integration documented in README
|
|
651
|
+
|
|
652
|
+
- **Testing Framework**: Test infrastructure
|
|
653
|
+
- **What**: {Jest/Vitest / Pytest / Go test} configured with coverage
|
|
654
|
+
- **Not**: E2E tests, integration test infrastructure
|
|
655
|
+
- **Acceptance Criteria**:
|
|
656
|
+
- [ ] `{test command}` runs and reports coverage
|
|
657
|
+
- [ ] Example test file demonstrates testing patterns
|
|
658
|
+
- [ ] Coverage threshold configured (suggest 70%)
|
|
659
|
+
|
|
660
|
+
### P1: Should Have
|
|
661
|
+
|
|
662
|
+
- **Environment Config**: .env management
|
|
663
|
+
- .env.example with all required variables documented
|
|
664
|
+
- Validation on startup for required env vars
|
|
665
|
+
|
|
666
|
+
- **Documentation**: README and contributing guide
|
|
667
|
+
- Setup instructions
|
|
668
|
+
- Development workflow
|
|
669
|
+
- How to run tests
|
|
670
|
+
|
|
671
|
+
### Out of Scope
|
|
672
|
+
- Deployment pipelines (separate DevOps PRD)
|
|
673
|
+
- Production infrastructure
|
|
674
|
+
- Monitoring and observability
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
After creating Foundation PRD, continue to the user's feature PRD with proper dependency:
|
|
678
|
+
- Set feature PRD's `Depends on: {Foundation PRD ref}`
|
|
679
|
+
|
|
680
|
+
---
|
|
681
|
+
|
|
682
|
+
#### Step 2.1: Codebase Exploration
|
|
683
|
+
|
|
500
684
|
Spawn a research agent to:
|
|
501
685
|
1. **Explore the codebase** (if exists):
|
|
502
686
|
- Project structure and patterns
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flux:ux-ui-design
|
|
3
|
+
description: Expert UX/UI design guidance for creating simple, user-focused experiences with clean, cohesive interfaces. Use when designing or reviewing UI components, layouts, navigation, forms, or any user-facing interface. Applies human-centered design principles and explicitly avoids AI slop patterns (generic, over-designed, feature-bloated interfaces). Triggers on UI implementation, design decisions, component creation, or layout work.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# UX/UI Design Skill
|
|
8
|
+
|
|
9
|
+
Design guidance for creating interfaces that are simple for users and visually clean—not generic AI slop.
|
|
10
|
+
|
|
11
|
+
## Core Philosophy
|
|
12
|
+
|
|
13
|
+
**UX**: Remove friction. Every interaction should feel effortless.
|
|
14
|
+
**UI**: Less is more. Every element earns its place.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## UX Principles
|
|
19
|
+
|
|
20
|
+
### 1. Reduce Cognitive Load
|
|
21
|
+
|
|
22
|
+
Users form opinions in 50ms. Simplify ruthlessly.
|
|
23
|
+
|
|
24
|
+
- **One primary action per screen** — Secondary actions stay subtle
|
|
25
|
+
- **Progressive disclosure** — Show basics upfront, reveal complexity on demand
|
|
26
|
+
- **Predictable patterns** — Consistency reduces learning curve
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
❌ Dashboard with 12 cards, 5 CTAs, sidebar, and floating action button
|
|
30
|
+
✅ Dashboard with 3 key metrics, one primary action, minimal navigation
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Design for Intent, Not Features
|
|
34
|
+
|
|
35
|
+
Start with user goals, not feature lists.
|
|
36
|
+
|
|
37
|
+
| User Intent | Good Design | Bad Design |
|
|
38
|
+
|-------------|-------------|------------|
|
|
39
|
+
| "Find a product" | Search bar prominent, filters accessible | Feature tour modal on load |
|
|
40
|
+
| "Complete checkout" | Linear flow, minimal fields | Upsells interrupting every step |
|
|
41
|
+
| "Check status" | Status visible immediately | Requires 3 clicks to find |
|
|
42
|
+
|
|
43
|
+
### 3. Respect User Time
|
|
44
|
+
|
|
45
|
+
- **Minimize steps** — Combine related actions
|
|
46
|
+
- **Smart defaults** — Pre-fill what you can infer
|
|
47
|
+
- **Instant feedback** — Show loading states, confirm actions immediately
|
|
48
|
+
- **Remember state** — Don't make users repeat themselves
|
|
49
|
+
|
|
50
|
+
### 4. Error Prevention Over Error Messages
|
|
51
|
+
|
|
52
|
+
Design to prevent errors, not just handle them.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
❌ "Invalid email format" after submit
|
|
56
|
+
✅ Real-time validation as user types
|
|
57
|
+
|
|
58
|
+
❌ Delete button with no confirmation
|
|
59
|
+
✅ Undo within 5 seconds, or confirmation for destructive actions
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## UI Principles
|
|
65
|
+
|
|
66
|
+
### 1. Visual Hierarchy
|
|
67
|
+
|
|
68
|
+
Guide attention through deliberate contrast.
|
|
69
|
+
|
|
70
|
+
**Size**: Larger = more important
|
|
71
|
+
**Color**: Accent colors for actions, muted for secondary
|
|
72
|
+
**Space**: Whitespace groups related elements, separates sections
|
|
73
|
+
**Position**: Top-left starts the reading flow (LTR languages)
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
Primary action: Bold, accent color, prominent size
|
|
77
|
+
Secondary action: Outlined or text-only, subdued
|
|
78
|
+
Tertiary action: Text link, smallest
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 2. Limited Color Palette
|
|
82
|
+
|
|
83
|
+
95% of minimalist interfaces use a restricted palette.
|
|
84
|
+
|
|
85
|
+
**Core palette structure:**
|
|
86
|
+
- 1 neutral background (white, off-white, or dark mode equivalent)
|
|
87
|
+
- 1-2 accent colors (one primary, one optional secondary)
|
|
88
|
+
- Semantic colors: success (green), warning (amber), error (red), info (blue)
|
|
89
|
+
- Text: 2-3 shades (primary, secondary, disabled)
|
|
90
|
+
|
|
91
|
+
```css
|
|
92
|
+
/* Example minimal palette */
|
|
93
|
+
--bg-primary: #FFFFFF;
|
|
94
|
+
--bg-secondary: #F8F9FA;
|
|
95
|
+
--text-primary: #1A1A1A;
|
|
96
|
+
--text-secondary: #6B7280;
|
|
97
|
+
--accent: #2563EB;
|
|
98
|
+
--accent-hover: #1D4ED8;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 3. Typography
|
|
102
|
+
|
|
103
|
+
One typeface, multiple weights. Never more than two font families.
|
|
104
|
+
|
|
105
|
+
**Hierarchy through weight and size, not different fonts:**
|
|
106
|
+
- Headings: Semibold or bold, larger size
|
|
107
|
+
- Body: Regular weight, comfortable reading size (16px minimum)
|
|
108
|
+
- Captions: Regular or medium, smaller size, secondary color
|
|
109
|
+
|
|
110
|
+
**Line height**: 1.4-1.6 for body text, 1.2-1.3 for headings
|
|
111
|
+
|
|
112
|
+
### 4. Spacing System
|
|
113
|
+
|
|
114
|
+
Use consistent spacing tokens—never arbitrary values.
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
4px (xs) — Tight spacing within components
|
|
118
|
+
8px (sm) — Related elements
|
|
119
|
+
16px (md) — Standard spacing
|
|
120
|
+
24px (lg) — Section separation
|
|
121
|
+
32px (xl) — Major sections
|
|
122
|
+
48px (2xl) — Page-level spacing
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Rule**: Space between elements = relationship strength. Closer = more related.
|
|
126
|
+
|
|
127
|
+
### 5. Whitespace as Design Element
|
|
128
|
+
|
|
129
|
+
Empty space is not wasted space. It:
|
|
130
|
+
- Reduces cognitive load
|
|
131
|
+
- Creates visual breathing room
|
|
132
|
+
- Emphasizes important elements
|
|
133
|
+
- Communicates hierarchy
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
❌ Cramped form with no padding
|
|
137
|
+
✅ Generous padding, grouped fields with clear sections
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Avoiding AI Slop
|
|
143
|
+
|
|
144
|
+
AI slop = generic, over-engineered, feature-bloated design that looks "designed" but lacks soul.
|
|
145
|
+
|
|
146
|
+
### Red Flags (Don't Do This)
|
|
147
|
+
|
|
148
|
+
| Pattern | Problem | Fix |
|
|
149
|
+
|---------|---------|-----|
|
|
150
|
+
| Gradient everything | Looks like a template | Flat colors, subtle shadows only |
|
|
151
|
+
| Rounded corners on everything | Generic "modern" look | Consistent radius, not excessive |
|
|
152
|
+
| Unnecessary animations | Distracting, slow | Purposeful micro-interactions only |
|
|
153
|
+
| Stock illustrations everywhere | Feels corporate/hollow | Use sparingly or not at all |
|
|
154
|
+
| Feature overload | "Look how much it does!" | Ship less, ship focused |
|
|
155
|
+
| Symmetric grids always | Predictable, boring | Intentional asymmetry when appropriate |
|
|
156
|
+
| Drop shadows on everything | Cluttered, dated | Minimal elevation, purposeful depth |
|
|
157
|
+
| Glassmorphism/neumorphism by default | Trendy but often inaccessible | Use sparingly, ensure contrast |
|
|
158
|
+
|
|
159
|
+
### AI Slop Content Patterns to Avoid
|
|
160
|
+
|
|
161
|
+
- Generic hero sections with vague taglines ("Empower your workflow")
|
|
162
|
+
- Cookie-cutter landing page layouts
|
|
163
|
+
- Feature grids with icons that could apply to anything
|
|
164
|
+
- Excessive use of buzzwords in UI copy
|
|
165
|
+
- Decorative elements that add no meaning
|
|
166
|
+
|
|
167
|
+
### What Makes Design Feel Human
|
|
168
|
+
|
|
169
|
+
- **Personality in copywriting** — Real voice, not corporate speak
|
|
170
|
+
- **Intentional imperfection** — Hand-drawn elements, custom illustrations
|
|
171
|
+
- **Constraint** — Knowing what NOT to include
|
|
172
|
+
- **Context-awareness** — Design serves the specific use case, not generic patterns
|
|
173
|
+
- **Consistency over novelty** — Boring is often better
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Component Guidelines
|
|
178
|
+
|
|
179
|
+
### Buttons
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
Primary: Solid background, high contrast text, clear CTA
|
|
183
|
+
Secondary: Outlined or ghost, lower visual weight
|
|
184
|
+
Tertiary: Text-only, for less important actions
|
|
185
|
+
Disabled: 50% opacity, no pointer events
|
|
186
|
+
|
|
187
|
+
Sizing:
|
|
188
|
+
- Small: 32px height, compact UI
|
|
189
|
+
- Medium: 40px height, default
|
|
190
|
+
- Large: 48px height, touch targets, primary CTAs
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Forms
|
|
194
|
+
|
|
195
|
+
- Labels above inputs (not placeholder-as-label)
|
|
196
|
+
- Clear focus states (visible ring, color change)
|
|
197
|
+
- Inline validation, not just on submit
|
|
198
|
+
- Logical tab order
|
|
199
|
+
- Required field indicators (asterisk or text)
|
|
200
|
+
- Helpful hint text for complex fields
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
❌ Placeholder text as the only label
|
|
204
|
+
❌ Error messages appearing somewhere else on screen
|
|
205
|
+
❌ Submit button disabled with no explanation why
|
|
206
|
+
|
|
207
|
+
✅ Clear labels, visible focus, inline errors, enabled submit with validation
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Cards
|
|
211
|
+
|
|
212
|
+
- Consistent padding (16-24px)
|
|
213
|
+
- Clear content hierarchy
|
|
214
|
+
- Single primary action if any
|
|
215
|
+
- Subtle shadow or border, not both
|
|
216
|
+
- Avoid nesting cards within cards
|
|
217
|
+
|
|
218
|
+
### Navigation
|
|
219
|
+
|
|
220
|
+
- Primary nav: 5-7 items maximum
|
|
221
|
+
- Mobile: Hamburger menu or bottom nav (not both)
|
|
222
|
+
- Current state clearly indicated
|
|
223
|
+
- Breadcrumbs for deep hierarchies
|
|
224
|
+
- Search accessible on complex sites
|
|
225
|
+
|
|
226
|
+
### Tables
|
|
227
|
+
|
|
228
|
+
- Left-align text, right-align numbers
|
|
229
|
+
- Zebra striping OR grid lines, not both
|
|
230
|
+
- Sticky headers for long tables
|
|
231
|
+
- Sort indicators when sortable
|
|
232
|
+
- Row actions: hover reveal or action column
|
|
233
|
+
- Pagination or infinite scroll, clear indication of more data
|
|
234
|
+
|
|
235
|
+
### Modals/Dialogs
|
|
236
|
+
|
|
237
|
+
- Clear title describing the action
|
|
238
|
+
- Single primary action, cancel always available
|
|
239
|
+
- Focus trapped within modal
|
|
240
|
+
- Escape key closes (unless destructive action)
|
|
241
|
+
- Background overlay with click-to-close
|
|
242
|
+
- Don't nest modals
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Responsive Design
|
|
247
|
+
|
|
248
|
+
### Breakpoints (Standard)
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
sm: 640px — Small tablets, large phones landscape
|
|
252
|
+
md: 768px — Tablets portrait
|
|
253
|
+
lg: 1024px — Tablets landscape, small laptops
|
|
254
|
+
xl: 1280px — Desktops
|
|
255
|
+
2xl: 1536px — Large desktops
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Mobile-First Patterns
|
|
259
|
+
|
|
260
|
+
- Stack columns on mobile, expand on desktop
|
|
261
|
+
- Touch targets: minimum 44x44px
|
|
262
|
+
- Thumb-friendly zones for critical actions
|
|
263
|
+
- Simplify navigation for mobile
|
|
264
|
+
- Reduce content density, not just shrink
|
|
265
|
+
|
|
266
|
+
### What Changes on Mobile
|
|
267
|
+
|
|
268
|
+
| Desktop | Mobile |
|
|
269
|
+
|---------|--------|
|
|
270
|
+
| Horizontal nav | Hamburger or bottom nav |
|
|
271
|
+
| Multi-column grid | Single column or 2-col max |
|
|
272
|
+
| Hover states | Tap states (no hover on touch) |
|
|
273
|
+
| Side panels | Full-screen overlays |
|
|
274
|
+
| Data tables | Cards or simplified tables |
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Accessibility Checklist
|
|
279
|
+
|
|
280
|
+
Not optional. Design for everyone.
|
|
281
|
+
|
|
282
|
+
- [ ] Color contrast: 4.5:1 minimum for text
|
|
283
|
+
- [ ] Don't rely on color alone (add icons, text, patterns)
|
|
284
|
+
- [ ] Focus states visible and clear
|
|
285
|
+
- [ ] Keyboard navigation works
|
|
286
|
+
- [ ] Alt text on meaningful images
|
|
287
|
+
- [ ] Form labels associated with inputs
|
|
288
|
+
- [ ] Error messages clear and specific
|
|
289
|
+
- [ ] Touch targets 44x44px minimum
|
|
290
|
+
- [ ] Motion can be reduced (respects prefers-reduced-motion)
|
|
291
|
+
- [ ] Text resizable without breaking layout
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Implementation Checklist
|
|
296
|
+
|
|
297
|
+
Before shipping any interface:
|
|
298
|
+
|
|
299
|
+
### UX Verification
|
|
300
|
+
- [ ] Primary action is immediately obvious
|
|
301
|
+
- [ ] User can accomplish goal in minimum steps
|
|
302
|
+
- [ ] Error states are helpful, not just red
|
|
303
|
+
- [ ] Loading states exist for async operations
|
|
304
|
+
- [ ] Empty states guide users to next action
|
|
305
|
+
|
|
306
|
+
### UI Verification
|
|
307
|
+
- [ ] Spacing follows consistent scale
|
|
308
|
+
- [ ] Typography hierarchy is clear
|
|
309
|
+
- [ ] Color palette is limited and intentional
|
|
310
|
+
- [ ] Components are consistent throughout
|
|
311
|
+
- [ ] No orphan elements (everything aligned to grid)
|
|
312
|
+
|
|
313
|
+
### Anti-Slop Check
|
|
314
|
+
- [ ] Could remove any element without losing function?
|
|
315
|
+
- [ ] Does every gradient/shadow/animation serve a purpose?
|
|
316
|
+
- [ ] Would a non-designer find it cluttered?
|
|
317
|
+
- [ ] Is the copywriting specific to this product?
|
|
318
|
+
- [ ] Does it look distinct from a template?
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## Quick Reference
|
|
323
|
+
|
|
324
|
+
### When Designing
|
|
325
|
+
|
|
326
|
+
1. **Start with user intent** — What are they trying to do?
|
|
327
|
+
2. **Minimize choices** — Each decision = cognitive load
|
|
328
|
+
3. **Establish hierarchy** — What's most important?
|
|
329
|
+
4. **Apply constraints** — Limited colors, spacing scale, one typeface
|
|
330
|
+
5. **Remove until it breaks** — Then add back only what's needed
|
|
331
|
+
|
|
332
|
+
### When Reviewing
|
|
333
|
+
|
|
334
|
+
Ask these questions:
|
|
335
|
+
- Can I remove anything?
|
|
336
|
+
- Is the primary action obvious?
|
|
337
|
+
- Does the spacing feel consistent?
|
|
338
|
+
- Is there unnecessary decoration?
|
|
339
|
+
- Would this work on mobile?
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## References
|
|
344
|
+
|
|
345
|
+
For detailed design token specifications and component patterns, see:
|
|
346
|
+
- `references/design-tokens.md` — Spacing, color, typography scales
|