@brunosps00/dev-workflow 0.11.0 โ†’ 0.15.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 (127) hide show
  1. package/README.md +54 -5
  2. package/lib/constants.js +20 -20
  3. package/lib/init.js +24 -1
  4. package/lib/migrate-skills.js +129 -0
  5. package/lib/removed-bundled-skills.js +16 -0
  6. package/lib/uninstall.js +6 -2
  7. package/lib/utils.js +43 -1
  8. package/package.json +1 -1
  9. package/scaffold/en/agent-instructions.md +68 -0
  10. package/scaffold/en/commands/dw-autopilot.md +1 -1
  11. package/scaffold/en/commands/dw-brainstorm.md +1 -1
  12. package/scaffold/en/commands/dw-bugfix.md +4 -3
  13. package/scaffold/en/commands/dw-code-review.md +1 -0
  14. package/scaffold/en/commands/dw-create-tasks.md +6 -0
  15. package/scaffold/en/commands/dw-create-techspec.md +1 -1
  16. package/scaffold/en/commands/dw-deps-audit.md +1 -1
  17. package/scaffold/en/commands/dw-fix-qa.md +1 -1
  18. package/scaffold/en/commands/dw-functional-doc.md +2 -2
  19. package/scaffold/en/commands/dw-help.md +2 -2
  20. package/scaffold/en/commands/dw-redesign-ui.md +7 -7
  21. package/scaffold/en/commands/dw-run-qa.md +5 -4
  22. package/scaffold/en/commands/dw-run-task.md +2 -2
  23. package/scaffold/en/templates/constitution-template.md +1 -1
  24. package/scaffold/pt-br/agent-instructions.md +68 -0
  25. package/scaffold/pt-br/commands/dw-autopilot.md +1 -1
  26. package/scaffold/pt-br/commands/dw-brainstorm.md +1 -1
  27. package/scaffold/pt-br/commands/dw-bugfix.md +4 -3
  28. package/scaffold/pt-br/commands/dw-code-review.md +1 -0
  29. package/scaffold/pt-br/commands/dw-create-tasks.md +6 -0
  30. package/scaffold/pt-br/commands/dw-create-techspec.md +1 -1
  31. package/scaffold/pt-br/commands/dw-deps-audit.md +1 -1
  32. package/scaffold/pt-br/commands/dw-fix-qa.md +1 -1
  33. package/scaffold/pt-br/commands/dw-functional-doc.md +2 -2
  34. package/scaffold/pt-br/commands/dw-help.md +2 -2
  35. package/scaffold/pt-br/commands/dw-redesign-ui.md +7 -7
  36. package/scaffold/pt-br/commands/dw-run-qa.md +5 -4
  37. package/scaffold/pt-br/commands/dw-run-task.md +2 -2
  38. package/scaffold/pt-br/templates/constitution-template.md +1 -1
  39. package/scaffold/skills/dw-council/SKILL.md +1 -1
  40. package/scaffold/skills/dw-incident-response/SKILL.md +164 -0
  41. package/scaffold/skills/dw-incident-response/references/blameless-discipline.md +126 -0
  42. package/scaffold/skills/dw-incident-response/references/communication-templates.md +107 -0
  43. package/scaffold/skills/dw-incident-response/references/postmortem-template.md +133 -0
  44. package/scaffold/skills/dw-incident-response/references/runbook-templates.md +169 -0
  45. package/scaffold/skills/dw-incident-response/references/severity-and-triage.md +186 -0
  46. package/scaffold/skills/dw-llm-eval/SKILL.md +148 -0
  47. package/scaffold/skills/dw-llm-eval/references/agent-eval.md +252 -0
  48. package/scaffold/skills/dw-llm-eval/references/judge-calibration.md +169 -0
  49. package/scaffold/skills/dw-llm-eval/references/oracle-ladder.md +171 -0
  50. package/scaffold/skills/dw-llm-eval/references/rag-metrics.md +186 -0
  51. package/scaffold/skills/dw-llm-eval/references/reference-dataset.md +190 -0
  52. package/scaffold/skills/dw-testing-discipline/SKILL.md +171 -0
  53. package/scaffold/skills/dw-testing-discipline/references/agent-guardrails.md +170 -0
  54. package/scaffold/skills/dw-testing-discipline/references/anti-patterns.md +336 -0
  55. package/scaffold/skills/dw-testing-discipline/references/core-rules.md +128 -0
  56. package/scaffold/skills/dw-testing-discipline/references/flaky-discipline.md +163 -0
  57. package/scaffold/skills/dw-testing-discipline/references/patterns.md +241 -0
  58. package/scaffold/skills/dw-testing-discipline/references/playwright-recipes.md +282 -0
  59. package/scaffold/skills/{webapp-testing โ†’ dw-testing-discipline}/references/security-boundary.md +1 -1
  60. package/scaffold/skills/dw-ui-discipline/SKILL.md +150 -0
  61. package/scaffold/skills/dw-ui-discipline/references/accessibility-floor.md +225 -0
  62. package/scaffold/skills/dw-ui-discipline/references/curated-defaults.md +195 -0
  63. package/scaffold/skills/dw-ui-discipline/references/hard-gate.md +162 -0
  64. package/scaffold/skills/dw-ui-discipline/references/state-matrix.md +101 -0
  65. package/scaffold/skills/dw-ui-discipline/references/visual-slop.md +152 -0
  66. package/scaffold/skills/ui-ux-pro-max/LICENSE +0 -21
  67. package/scaffold/skills/ui-ux-pro-max/SKILL.md +0 -659
  68. package/scaffold/skills/ui-ux-pro-max/data/_sync_all.py +0 -414
  69. package/scaffold/skills/ui-ux-pro-max/data/app-interface.csv +0 -31
  70. package/scaffold/skills/ui-ux-pro-max/data/charts.csv +0 -26
  71. package/scaffold/skills/ui-ux-pro-max/data/colors.csv +0 -162
  72. package/scaffold/skills/ui-ux-pro-max/data/design.csv +0 -1776
  73. package/scaffold/skills/ui-ux-pro-max/data/draft.csv +0 -1779
  74. package/scaffold/skills/ui-ux-pro-max/data/google-fonts.csv +0 -1924
  75. package/scaffold/skills/ui-ux-pro-max/data/icons.csv +0 -106
  76. package/scaffold/skills/ui-ux-pro-max/data/landing.csv +0 -35
  77. package/scaffold/skills/ui-ux-pro-max/data/products.csv +0 -162
  78. package/scaffold/skills/ui-ux-pro-max/data/react-performance.csv +0 -45
  79. package/scaffold/skills/ui-ux-pro-max/data/stacks/angular.csv +0 -51
  80. package/scaffold/skills/ui-ux-pro-max/data/stacks/astro.csv +0 -54
  81. package/scaffold/skills/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  82. package/scaffold/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  83. package/scaffold/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  84. package/scaffold/skills/ui-ux-pro-max/data/stacks/laravel.csv +0 -51
  85. package/scaffold/skills/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  86. package/scaffold/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  87. package/scaffold/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  88. package/scaffold/skills/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  89. package/scaffold/skills/ui-ux-pro-max/data/stacks/react.csv +0 -54
  90. package/scaffold/skills/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  91. package/scaffold/skills/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  92. package/scaffold/skills/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  93. package/scaffold/skills/ui-ux-pro-max/data/stacks/threejs.csv +0 -54
  94. package/scaffold/skills/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  95. package/scaffold/skills/ui-ux-pro-max/data/styles.csv +0 -85
  96. package/scaffold/skills/ui-ux-pro-max/data/typography.csv +0 -74
  97. package/scaffold/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -162
  98. package/scaffold/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  99. package/scaffold/skills/ui-ux-pro-max/scripts/core.py +0 -262
  100. package/scaffold/skills/ui-ux-pro-max/scripts/design_system.py +0 -1148
  101. package/scaffold/skills/ui-ux-pro-max/scripts/search.py +0 -114
  102. package/scaffold/skills/ui-ux-pro-max/skills/brand/SKILL.md +0 -97
  103. package/scaffold/skills/ui-ux-pro-max/skills/design/SKILL.md +0 -302
  104. package/scaffold/skills/ui-ux-pro-max/skills/design-system/SKILL.md +0 -244
  105. package/scaffold/skills/ui-ux-pro-max/templates/base/quick-reference.md +0 -297
  106. package/scaffold/skills/ui-ux-pro-max/templates/base/skill-content.md +0 -358
  107. package/scaffold/skills/ui-ux-pro-max/templates/platforms/agent.json +0 -21
  108. package/scaffold/skills/ui-ux-pro-max/templates/platforms/augment.json +0 -18
  109. package/scaffold/skills/ui-ux-pro-max/templates/platforms/claude.json +0 -21
  110. package/scaffold/skills/ui-ux-pro-max/templates/platforms/codebuddy.json +0 -21
  111. package/scaffold/skills/ui-ux-pro-max/templates/platforms/codex.json +0 -21
  112. package/scaffold/skills/ui-ux-pro-max/templates/platforms/continue.json +0 -21
  113. package/scaffold/skills/ui-ux-pro-max/templates/platforms/copilot.json +0 -21
  114. package/scaffold/skills/ui-ux-pro-max/templates/platforms/cursor.json +0 -21
  115. package/scaffold/skills/ui-ux-pro-max/templates/platforms/droid.json +0 -21
  116. package/scaffold/skills/ui-ux-pro-max/templates/platforms/gemini.json +0 -21
  117. package/scaffold/skills/ui-ux-pro-max/templates/platforms/kilocode.json +0 -21
  118. package/scaffold/skills/ui-ux-pro-max/templates/platforms/kiro.json +0 -21
  119. package/scaffold/skills/ui-ux-pro-max/templates/platforms/opencode.json +0 -21
  120. package/scaffold/skills/ui-ux-pro-max/templates/platforms/qoder.json +0 -21
  121. package/scaffold/skills/ui-ux-pro-max/templates/platforms/roocode.json +0 -21
  122. package/scaffold/skills/ui-ux-pro-max/templates/platforms/trae.json +0 -21
  123. package/scaffold/skills/ui-ux-pro-max/templates/platforms/warp.json +0 -18
  124. package/scaffold/skills/ui-ux-pro-max/templates/platforms/windsurf.json +0 -21
  125. package/scaffold/skills/webapp-testing/SKILL.md +0 -138
  126. package/scaffold/skills/webapp-testing/assets/test-helper.js +0 -56
  127. /package/scaffold/skills/{webapp-testing โ†’ dw-testing-discipline}/references/three-workflow-patterns.md +0 -0
@@ -0,0 +1,162 @@
1
+ # The grounding protocol โ€” full version
2
+
3
+ Four questions before any UI work touches code. Each has a concrete output. Don't proceed past one without finishing its output.
4
+
5
+ ## Why the grounding matters
6
+
7
+ Training-data defaults dominate ungrounded UI generation. An LLM proposing a "dashboard" without context will produce:
8
+ - `#3B82F6` blue + `rounded-lg` because those values appeared 10M+ times in training.
9
+ - Glass morphism, gradients, center-aligned blocks because those screenshots dominate web aesthetics.
10
+ - Happy-path layouts only, because most training screenshots show success states.
11
+
12
+ The four questions pull the design AWAY from the training-data center of mass and TOWARD this project, this surface, this user, this moment.
13
+
14
+ ## Question 1 โ€” Where do design decisions come from?
15
+
16
+ **Goal:** know the source of truth for visual values. Documented authority, or curated default โ€” never invented.
17
+
18
+ ### How to find it
19
+
20
+ Search the project in this order:
21
+
22
+ 1. **`.dw/rules/*.md`** โ€” look for sections titled "Design", "Patterns to Follow", "Naming Conventions". The codebase intelligence skill writes these.
23
+ 2. **Root-level docs** โ€” `DESIGN.md`, `BRAND.md`, `BRANDING.md`, `STYLE_GUIDE.md`.
24
+ 3. **Token configuration** โ€” `tailwind.config.{ts,js}` `theme` block; CSS variables in `globals.css`, `theme.css`, `tokens.css`.
25
+ 4. **Component library config** โ€” shadcn `components.json`, MUI/Chakra theme exports.
26
+ 5. **Storybook stories** โ€” implicit canonical components.
27
+
28
+ ### What to do based on what you find
29
+
30
+ **At least one authority exists**: it wins. Defer to it. If you need a token it doesn't have (e.g., a danger-secondary color), propose adding the token to the authority FIRST, then use it. Don't hardcode the new value.
31
+
32
+ **No authority exists**: read `curated-defaults.md` in this references folder. Pick one of the 10 palettes + one of the 10 font pairings. Mark the choice as a finding in the techspec/PR:
33
+
34
+ > **Design source**: No project authority found. Using curated default "Cool Stone" (neutral slate + intentional accent) + "Inter / Source Serif" pairing. Recommend establishing `DESIGN.md` to formalize.
35
+
36
+ ### Anti-patterns at this question
37
+
38
+ - Inventing color hex inline (`bg-[#FF6B35]`).
39
+ - "I'll use Tailwind defaults" โ€” Tailwind defaults are training-data defaults, not project authority.
40
+ - Copying values from "a site I like" without understanding what it solved.
41
+
42
+ ### Output
43
+
44
+ A one-sentence note in the techspec or PR describing which authority you consulted.
45
+
46
+ ## Question 2 โ€” What does this surface help the user do?
47
+
48
+ **Goal:** the user's intent at this surface, stated in one specific sentence.
49
+
50
+ **Format:** "This surface helps the user **`<verb-phrase>`** so that **`<outcome>`**."
51
+
52
+ ### Good examples
53
+
54
+ - "...helps the user filter overdue invoices so they can chase late payers in under 30 seconds."
55
+ - "...helps the on-call engineer diagnose which deploy caused the spike so they can roll back without paging the team."
56
+ - "...helps the manager approve or reject expense reports without leaving Slack."
57
+
58
+ ### Bad examples
59
+
60
+ - "This surface displays invoice data." โ†’ no user, no outcome.
61
+ - "Settings page for managing the account." โ†’ vague.
62
+ - "Dashboard." โ†’ one word; says nothing.
63
+
64
+ ### When the brief is vague
65
+
66
+ If you can't write this sentence, the requirements are unclear. Stop. Push back to the requester:
67
+
68
+ > "Before designing this surface, I need the job sentence: 'helps the user `<verb-phrase>` so that `<outcome>`.' Can you fill in the verb-phrase and outcome?"
69
+
70
+ Designing without this sentence produces generic surfaces โ€” the "just another dashboard" outcome.
71
+
72
+ ### Output
73
+
74
+ One sentence in the techspec/PR description.
75
+
76
+ ## Question 3 โ€” What states does the surface have?
77
+
78
+ **Goal:** enumerate every state the surface can be in BEFORE designing for the happy path.
79
+
80
+ ### Mandatory minimum
81
+
82
+ | State | Trigger | What user sees |
83
+ |-------|---------|---------------|
84
+ | `default` | First load, no interaction | Initial render |
85
+ | `hover` | Cursor over interactive element | Visual feedback |
86
+ | `active` | Click in progress (mouse down) | Pressed/depressed |
87
+ | `focus-visible` | Keyboard tab arrives | Distinct outline, NOT same as hover |
88
+ | `disabled` | Interaction unavailable | Reduced opacity + cursor change; NO on-click |
89
+ | `loading` | Async operation in flight | Skeleton, spinner, or progress (context-appropriate) |
90
+ | `empty` | No data to show | Guidance on what to do next |
91
+ | `error` | Operation failed | What broke + how to recover |
92
+ | `success` | Operation succeeded | Confirmation; auto-dismiss when safe |
93
+
94
+ ### Domain-specific states
95
+
96
+ Add when the surface has matching semantics:
97
+ - `read` / `unread` โ€” notifications, messages.
98
+ - `online` / `offline` / `connecting` โ€” chat, presence.
99
+ - `stale` / `fresh` โ€” dashboards with cached data.
100
+ - `pending` / `approved` / `rejected` โ€” workflow records.
101
+ - `draft` / `saved` / `dirty` โ€” forms, editors.
102
+ - `new` / `existing` โ€” composers (title and CTA wording differ).
103
+ - `partial` / `complete` โ€” multi-step flows.
104
+ - `selected` / `unselected` โ€” lists with multi-select.
105
+ - `expired` / `active` โ€” tokens, subscriptions.
106
+
107
+ ### Tripwire
108
+
109
+ If your design has only `default`, you missed 8 states. If it has `default` + `loading`, you missed 6. The full enumeration is non-negotiable. Empirically, states added "later" are added after a user reports the bug.
110
+
111
+ ### Output
112
+
113
+ A state matrix table in the techspec or design doc.
114
+
115
+ ## Question 4 โ€” Who uses this surface, where, and in what mood?
116
+
117
+ **Goal:** the physical context the surface lives in.
118
+
119
+ **Format:** "**`<Who>`** uses this on **`<where>`** in **`<what light>`** while **`<what mood>`**."
120
+
121
+ ### Good examples
122
+
123
+ - "An on-call engineer uses this on a dark-room laptop at 3am while troubleshooting a fire."
124
+ - "A field nurse uses this on a phone in bright outdoor light while juggling clipboards."
125
+ - "A receptionist uses this on a 24โ€ณ monitor at a busy front desk while talking to a visitor."
126
+
127
+ ### Why this matters
128
+
129
+ Decisions cascade from the answer:
130
+
131
+ - **3am dark room** โ†’ dark mode default, high contrast, no flashing animations, generous spacing.
132
+ - **Bright outdoor** โ†’ minimum 7:1 contrast, large touch targets, no thin fonts, no subtle hover.
133
+ - **Busy front desk** โ†’ glanceable info, no nested menus, large numbers, single-screen layout.
134
+
135
+ Without the answer, defaults take over: light mode, default contrasts, animations, regular touch targets. Production users find it terrible and you can't articulate why.
136
+
137
+ ### Output
138
+
139
+ One sentence in the techspec.
140
+
141
+ ## What "passing the grounding" looks like
142
+
143
+ A PR description or techspec UI section that includes:
144
+
145
+ ```markdown
146
+ ## UI Discipline Grounding
147
+
148
+ **Design source:** `.dw/rules/frontend.md` design tokens (Tailwind theme + custom CSS vars).
149
+ **Surface job:** Helps on-call engineers diagnose which deploy caused the latency spike so they can roll back without paging the team.
150
+ **State matrix:**
151
+ - default, hover, active, focus-visible, disabled, loading, empty (no spikes detected), error (metrics API down), success (rollback completed)
152
+ - Plus: stale (>5min old data) โ€” show timestamp + refresh CTA.
153
+ **Context:** On-call engineer uses this on a dark-room laptop at 3am while troubleshooting a production fire.
154
+ ```
155
+
156
+ This is the minimum disclosure. Anything less and the grounding didn't pass.
157
+
158
+ ## After grounding
159
+
160
+ The downstream references (`visual-slop.md`, `state-matrix.md`, `accessibility-floor.md`) assume the grounding passed. They won't re-verify; if you skipped a question, the output will reflect it.
161
+
162
+ `/dw-code-review` fails verdict on UI PRs where this disclosure is missing.
@@ -0,0 +1,101 @@
1
+ # State matrix โ€” enumerate before designing the happy path
2
+
3
+ The single biggest UI bug factory: designing for the default state, shipping it, and discovering empty/error/loading at production time. This reference enforces enumeration BEFORE design.
4
+
5
+ ## The mandatory minimum (every interactive surface)
6
+
7
+ | State | When it fires | Visual rule | Common mistake |
8
+ |-------|---------------|-------------|----------------|
9
+ | `default` | First load, no interaction | Calm baseline; nothing competes with content | Designing only this state |
10
+ | `hover` | Cursor over interactive element | Subtle change signals click affordance | Hover on non-clickable shapes (fake interactivity) |
11
+ | `active` | Click in progress (mouse down) | Distinct from hover; pressed/depressed | Skipping; click feels unresponsive |
12
+ | `focus-visible` | Keyboard tab arrives | Distinct outline, NOT same as hover | Using `outline: none` and not replacing |
13
+ | `disabled` | Interaction unavailable | Reduced opacity + cursor change; no on-click | Looks like enabled, confuses user |
14
+ | `loading` | Async operation in flight | Skeleton/spinner sized to incoming content | Generic spinner regardless of context |
15
+ | `empty` | No data to show | Why-it's-empty + what-to-do-next CTA | "No items found." centered, full stop |
16
+ | `error` | Operation failed | What broke + how to recover + retry CTA | Generic "Something went wrong." |
17
+ | `success` | Operation succeeded | Brief confirmation; auto-dismiss when safe | Toast spam |
18
+
19
+ ## Common domain states
20
+
21
+ Add these when the surface has matching semantics:
22
+
23
+ | State | Surfaces | Visual rule |
24
+ |-------|----------|-------------|
25
+ | `read` / `unread` | Notifications, messages, inbox | Weight differential; new is bolder |
26
+ | `online` / `offline` / `connecting` | Chat, presence indicators | Color dot + label; offline is visually quieter |
27
+ | `stale` / `fresh` | Dashboards with cached data | Timestamp + refresh CTA when stale > N min |
28
+ | `pending` / `approved` / `rejected` | Workflow records | Color-coded badges; never color alone (a11y) |
29
+ | `draft` / `saved` / `dirty` | Forms, editors | Indicator near save button; "unsaved changes" |
30
+ | `new` / `existing` | Composers, dialogs | Title and CTA wording differ ("Create" vs "Update") |
31
+ | `partial` / `complete` | Multi-step flows | Progress indicator; remaining steps visible |
32
+ | `selected` / `unselected` | Lists with multi-select | Border + bg change + checkbox mark |
33
+ | `expired` / `active` | Tokens, subscriptions | Visual deemphasis when expired + revocation CTA |
34
+
35
+ ## Loading state granularity (don't just pick "spinner")
36
+
37
+ | Operation duration | Right loading treatment |
38
+ |--------------------|-------------------------|
39
+ | <300ms | Show nothing. Spinner appearing then vanishing = flicker. |
40
+ | 300ms โ€“ 2s | Skeleton loader matching content shape |
41
+ | 2s โ€“ 10s | Spinner + status text ("Loading orders...") |
42
+ | 10s โ€“ 60s | Progress bar with percentage + cancel button |
43
+ | >60s | Step indicator OR async with notify-when-done |
44
+
45
+ A spinner that runs forever with no progress info is one of the worst UX patterns. If the operation can take >10s, show progress; if it can take >60s, make it background-able.
46
+
47
+ ## Error state granularity
48
+
49
+ Errors are not all equal:
50
+
51
+ | Error type | Treatment |
52
+ |------------|-----------|
53
+ | Validation (client-side, single field) | Inline below field; red text + icon |
54
+ | Validation (form-level) | Summary at top + per-field inline |
55
+ | Authorization (401/403) | Modal or banner; sign-in CTA |
56
+ | Not found (404) | Inline empty-state variant with "go back" |
57
+ | Server error (5xx) | Banner with retry button; preserve user input |
58
+ | Network timeout | Inline message + auto-retry button |
59
+ | Partial data | Show what loaded + indicator for what failed |
60
+
61
+ Generic "Something went wrong" is the lazy default. Categorize the failure; show actionable guidance.
62
+
63
+ ## Empty state granularity
64
+
65
+ Empty is not always "no data ever existed":
66
+
67
+ | Empty reason | Treatment |
68
+ |--------------|-----------|
69
+ | Genuinely first-time empty (new user) | Welcoming illustration + onboarding CTA |
70
+ | Filter excluded everything | Show filter chips + "Clear filters" CTA |
71
+ | Search returned nothing | Echo the query + spelling suggestions / refinement tips |
72
+ | All items completed / archived | Acknowledge + "View archived" CTA |
73
+ | Permissions block visibility | Explain (don't pretend it's empty) + request-access CTA |
74
+ | Loading hasn't completed | This is `loading`, not `empty` โ€” different state |
75
+
76
+ ## Verification checklist
77
+
78
+ Before declaring the design "done":
79
+
80
+ - [ ] All 9 minimum states are designed (not just default).
81
+ - [ ] All applicable domain states are designed.
82
+ - [ ] Loading granularity matches operation duration.
83
+ - [ ] Error states are categorized (not all "something went wrong").
84
+ - [ ] Empty states explain WHY and offer WHAT to do.
85
+ - [ ] `disabled` state has visual + cursor differentiation, NO on-click handler.
86
+ - [ ] `focus-visible` is distinct from `hover` (keyboard users need their own affordance).
87
+ - [ ] Color is never the SOLE differentiator (a11y); pair with shape/text/position.
88
+
89
+ ## Integration with `/dw-code-review`
90
+
91
+ Review fails verdict (REJECTED) on a UI PR when:
92
+ - A new component handles async data but renders only the default state.
93
+ - An interactive element has `:hover` but no `:focus-visible`.
94
+ - An error path falls through to a generic message with no recovery action.
95
+ - Loading state is a spinner where the operation takes >2s (should be progress).
96
+
97
+ These are not stylistic preferences โ€” they're production bugs waiting to surface.
98
+
99
+ ## Anti-pattern: "We'll add states later"
100
+
101
+ Empirically: states added later are added under duress (after a user reports). The cost of designing them now is small (15-30 minutes for a component); the cost of finding them in production is large (user trust + incident response). The matrix is non-negotiable.
@@ -0,0 +1,152 @@
1
+ # Visual slop โ€” 14 patterns + 17 default values to avoid
2
+
3
+ Two parts:
4
+ 1. **Fourteen patterns** an ungrounded UI agent produces.
5
+ 2. **Seventeen specific values** that signal "no thought went into this."
6
+
7
+ Used by `/dw-code-review` against UI diffs and by `/dw-redesign-ui` as a self-check during proposal.
8
+
9
+ ## The 14 patterns
10
+
11
+ ### 1. Uniform-section flatness
12
+
13
+ Every section uses the same card style, same padding, same text size, same emphasis weight. The eye finds no anchor.
14
+
15
+ - **Why it happens:** Default of "consistent = good" without realizing hierarchy needs deliberate variation.
16
+ - **Fix:** One primary section per scroll height. Differentiate by size, weight, color saturation, or whitespace by โ‰ฅ30%. Everything else recedes.
17
+ - **Example violation:** Dashboard with 6 identical metric cards.
18
+ - **Example fix:** One hero metric (largest, top); 3 supporting metrics; 2 minor metrics in a different visual treatment.
19
+
20
+ ### 2. Soft hierarchy
21
+
22
+ Headings barely larger than body. Primary CTA same color as secondary. The user can't tell what to look at first.
23
+
24
+ - **Why it happens:** "Elegant restraint" applied without ensuring guidance still works.
25
+ - **Fix:** Squint at the design (literally). What jumps out? If nothing jumps out, increase contrast in size, weight, or color for the primary element.
26
+
27
+ ### 3. Decorative hover
28
+
29
+ Hover effects on elements that have no click handler. Cards that fade slightly but don't link anywhere.
30
+
31
+ - **Why it happens:** Default "apply hover to anything card-shaped."
32
+ - **Fix:** Hover effect lives only on elements with an on-click. Non-interactive shapes get `cursor: default`. If it's hoverable, it must do something.
33
+
34
+ ### 4. Emoji as ornament
35
+
36
+ Emojis in headers and section labels where they add no information: ๐ŸŽฏ Goals ยท ๐Ÿš€ Launch ยท โœจ Features ยท ๐Ÿ“Š Analytics ยท ๐Ÿ”ฅ Trending.
37
+
38
+ - **Why it happens:** Training data has many "emoji-in-headers = engaging" patterns.
39
+ - **Fix:** Use icons (lucide, heroicons, tabler) for semantic meaning. Reserve emojis for genuinely emotive contexts (celebrations, errors needing empathy). If removing the emoji preserves the meaning, remove it.
40
+
41
+ ### 5. Gradient cover
42
+
43
+ Hero with diagonal purple-to-pink gradient. Buttons with subtle gradient. Card backgrounds with mesh gradients. Gradient as visual fallback for weak composition.
44
+
45
+ - **Why it happens:** AI-art aesthetics leak into UI; gradients hide compositional weakness.
46
+ - **Fix:** A gradient must earn its place โ€” usually for hero zones with poetic copy. Solid colors with strong hierarchy beat gradients in utility surfaces.
47
+
48
+ ### 6. Glass-on-everything
49
+
50
+ Frosted-glass effect on modals, cards, dropdowns, side panels โ€” anywhere a surface can be layered. Including on top of plain backgrounds where the blur effect has nothing to blur.
51
+
52
+ - **Why it happens:** macOS aesthetic. Looks premium without effort.
53
+ - **Fix:** Glass only when there's meaningful content visible behind the surface. Glass over plain backgrounds adds visual noise without semantic gain.
54
+
55
+ ### 7. Center-aligned by default
56
+
57
+ Body paragraphs center-aligned. Headlines centered. Forms with labels centered above inputs. Tabular data centered instead of column-aligned.
58
+
59
+ - **Why it happens:** Marketing-page training data biases toward center.
60
+ - **Fix:** Center for hero headlines and small CTA labels only. Body text and forms read better left-aligned in LTR scripts. Tabular data reads in columns.
61
+
62
+ ### 8. Grayscale wash
63
+
64
+ Neutral gray palette everywhere โ€” `slate-50`, `gray-100`, `zinc-200` โ€” for backgrounds, borders, text, accents. No accent color, no character.
65
+
66
+ - **Why it happens:** "Neutral = safe" plus shadcn/ui's neutral starting point.
67
+ - **Fix:** Establish ONE accent color (from brand or curated defaults). Use it intentionally on the primary CTA, the active state, the one place the user looks first. Gray is the canvas, not the painting.
68
+
69
+ ### 9. Verb-less CTAs
70
+
71
+ "Get Started" ยท "Learn More" ยท "Click Here" ยท "Submit" ยท "OK" buttons. Generic verbs that say nothing.
72
+
73
+ - **Why it happens:** Default LLM verb library.
74
+ - **Fix:** Use the verb the user is actually doing. "Approve refund" not "Submit". "Start free trial" not "Get Started". "Schedule a call" not "Contact us".
75
+
76
+ ### 10. Stock-illustration hero
77
+
78
+ Figure-with-laptop hero art. Diverse-team-around-table illustration. Abstract floating shapes. Generic figures from illustration kits.
79
+
80
+ - **Why it happens:** "Illustration = friendly" default. Cheap to produce.
81
+ - **Fix:** Use product screenshots (real screens, real data, sanitized) or skip illustration entirely. A clean hero with strong typography beats generic illustration.
82
+
83
+ ### 11. Shadow soup
84
+
85
+ Cards with shadow. Buttons with shadow. Inputs with shadow. Tooltips with shadow on shadows. Borders AND shadows AND gradients on one element.
86
+
87
+ - **Why it happens:** Material Design leftover; depth as decoration.
88
+ - **Fix:** Pick one depth mechanism per layer. If cards have shadow, buttons inside should not. If you use elevation systematically (Material 3), enforce the elevation hierarchy.
89
+
90
+ ### 12. Generic spinner
91
+
92
+ Spinner overlay for every async operation, regardless of duration or context.
93
+
94
+ - **Why it happens:** Default fallback in every UI library.
95
+ - **Fix granularity:**
96
+ - <300ms: show nothing (spinner appearing then vanishing is flicker).
97
+ - 300msโ€“2s: skeleton loader matching content shape.
98
+ - 2sโ€“10s: spinner + status text ("Loading orders...").
99
+ - 10s+: progress bar or step indicator + cancel button.
100
+
101
+ ### 13. Silent empty state
102
+
103
+ "No items found." Centered. Nothing else. User has no idea what to do.
104
+
105
+ - **Why it happens:** Empty state treated as edge case, not as a real screen.
106
+ - **Fix:** Every empty state answers two questions: WHY is it empty (no data yet vs filter excluded everything vs error)? WHAT should the user do (CTA, like "Create your first invoice")?
107
+
108
+ ### 14. Toast spam
109
+
110
+ Every UI event becomes a toast. Save successful โ†’ toast. Validation error โ†’ toast. Network slow โ†’ toast. Five stack up and the user reads none.
111
+
112
+ - **Why it happens:** Toast is the default feedback mechanism in component libraries.
113
+ - **Fix:** Toasts only for actions that need confirmation AWAY from the originating surface (background save, undo-able deletion). Inline feedback for form validation. Modal/banner for blocking errors. Cap at 2 stacked toasts.
114
+
115
+ ## The 17 anti-default values
116
+
117
+ Specific values that signal "no thought went into this." Avoid unless you can articulate WHY you picked exactly this one:
118
+
119
+ | Anti-default | Tell |
120
+ |--------------|------|
121
+ | `#3B82F6` (Tailwind blue-500) | The internet's default blue |
122
+ | `rounded-lg` everywhere | Universal default; no surface character |
123
+ | `shadow-md` on every card | Universal default; no depth hierarchy |
124
+ | `bg-gradient-to-br from-purple-500 to-pink-500` | "AI startup landing page" gradient |
125
+ | Inter as the only font choice | Default font of ~60% of new SaaS |
126
+ | `font-bold` for every emphasis | Bold is one tool, not the only tool |
127
+ | Lucide icons exclusively | One icon family is fine; signature is none |
128
+ | Generic "happy team" hero illustration | Placeholder energy |
129
+ | "Get Started" / "Learn More" CTA copy | Verb-less; says nothing |
130
+ | 4 / 8 / 12 / 16 spacing exclusively | The default 4-step scale; no rhythm |
131
+ | `border-gray-200` for every divider | Visual whisper; no intent |
132
+ | Sans-serif headlines + sans-serif body | No typographic contrast |
133
+ | Center-aligned everything | See pattern #7 |
134
+ | Animated CSS confetti on success | Cheesy; mismatches most brands |
135
+ | `bg-white dark:bg-gray-900` only | No real dark-mode design pass |
136
+ | Single-column form on a wide screen | Vertical scroll where horizontal fits |
137
+ | Modal for every interaction | Most modals should be inline editing |
138
+
139
+ ## How to apply this catalog
140
+
141
+ In `/dw-redesign-ui` step 4 (propose) โ€” before presenting design directions, self-check against this list. If you're using a pattern, say why explicitly ("gradient crutch โ€” intentional for marketing hero"). Sometimes the pattern IS the right call; the discipline is awareness, not absolutism.
142
+
143
+ In `/dw-code-review` UI section โ€” grep the diff for the anti-default values and the patterns. Each hit becomes a finding under `dw-review-rigor`:
144
+ - Pattern on a NEW surface โ†’ `medium` severity.
145
+ - Pattern propagating EXISTING slop further โ†’ `low` severity (consistency wins).
146
+ - Pattern on a redesign that was supposed to fix slop โ†’ `high` severity (regression).
147
+
148
+ ## When the patterns bend
149
+
150
+ - **Marketing pages** can use gradients and emojis with more freedom โ€” different surface job.
151
+ - **Brand-mandated** values override this list (if your brand IS `#3B82F6`, use it).
152
+ - **Component libraries** like shadcn ship neutral defaults โ€” the discipline is to ADD character on top, not remove the neutrality.
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Next Level Builder
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.