@brunosps00/dev-workflow 0.10.0 → 0.13.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 (120) hide show
  1. package/README.md +78 -6
  2. package/lib/constants.js +20 -20
  3. package/lib/init.js +44 -4
  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 +51 -4
  8. package/package.json +1 -1
  9. package/scaffold/en/agent-instructions.md +68 -0
  10. package/scaffold/en/commands/dw-analyze-project.md +61 -0
  11. package/scaffold/en/commands/dw-autopilot.md +1 -1
  12. package/scaffold/en/commands/dw-brainstorm.md +1 -1
  13. package/scaffold/en/commands/dw-bugfix.md +3 -3
  14. package/scaffold/en/commands/dw-code-review.md +28 -0
  15. package/scaffold/en/commands/dw-create-prd.md +16 -0
  16. package/scaffold/en/commands/dw-create-tasks.md +42 -0
  17. package/scaffold/en/commands/dw-create-techspec.md +18 -1
  18. package/scaffold/en/commands/dw-deps-audit.md +1 -1
  19. package/scaffold/en/commands/dw-fix-qa.md +1 -1
  20. package/scaffold/en/commands/dw-functional-doc.md +2 -2
  21. package/scaffold/en/commands/dw-help.md +1 -1
  22. package/scaffold/en/commands/dw-redesign-ui.md +7 -7
  23. package/scaffold/en/commands/dw-run-qa.md +4 -4
  24. package/scaffold/en/commands/dw-run-task.md +2 -2
  25. package/scaffold/en/templates/constitution-template.md +111 -0
  26. package/scaffold/pt-br/agent-instructions.md +68 -0
  27. package/scaffold/pt-br/commands/dw-analyze-project.md +61 -0
  28. package/scaffold/pt-br/commands/dw-autopilot.md +1 -1
  29. package/scaffold/pt-br/commands/dw-brainstorm.md +1 -1
  30. package/scaffold/pt-br/commands/dw-bugfix.md +3 -3
  31. package/scaffold/pt-br/commands/dw-code-review.md +28 -0
  32. package/scaffold/pt-br/commands/dw-create-prd.md +16 -0
  33. package/scaffold/pt-br/commands/dw-create-tasks.md +42 -0
  34. package/scaffold/pt-br/commands/dw-create-techspec.md +18 -1
  35. package/scaffold/pt-br/commands/dw-deps-audit.md +1 -1
  36. package/scaffold/pt-br/commands/dw-fix-qa.md +1 -1
  37. package/scaffold/pt-br/commands/dw-functional-doc.md +2 -2
  38. package/scaffold/pt-br/commands/dw-help.md +1 -1
  39. package/scaffold/pt-br/commands/dw-redesign-ui.md +7 -7
  40. package/scaffold/pt-br/commands/dw-run-qa.md +4 -4
  41. package/scaffold/pt-br/commands/dw-run-task.md +2 -2
  42. package/scaffold/pt-br/templates/constitution-template.md +111 -0
  43. package/scaffold/skills/dw-council/SKILL.md +1 -1
  44. package/scaffold/skills/dw-testing-discipline/SKILL.md +148 -0
  45. package/scaffold/skills/dw-testing-discipline/references/ai-agent-gates.md +170 -0
  46. package/scaffold/skills/dw-testing-discipline/references/anti-patterns.md +336 -0
  47. package/scaffold/skills/dw-testing-discipline/references/flaky-discipline.md +163 -0
  48. package/scaffold/skills/dw-testing-discipline/references/iron-laws.md +128 -0
  49. package/scaffold/skills/dw-testing-discipline/references/playwright-recipes.md +282 -0
  50. package/scaffold/skills/dw-testing-discipline/references/positive-patterns.md +241 -0
  51. package/scaffold/skills/{webapp-testing → dw-testing-discipline}/references/security-boundary.md +1 -1
  52. package/scaffold/skills/dw-ui-discipline/SKILL.md +128 -0
  53. package/scaffold/skills/dw-ui-discipline/references/accessibility-floor.md +225 -0
  54. package/scaffold/skills/dw-ui-discipline/references/anti-slop.md +162 -0
  55. package/scaffold/skills/dw-ui-discipline/references/curated-defaults.md +195 -0
  56. package/scaffold/skills/dw-ui-discipline/references/hard-gate.md +142 -0
  57. package/scaffold/skills/dw-ui-discipline/references/state-matrix.md +101 -0
  58. package/scaffold/templates-overrides-readme.md +75 -0
  59. package/scaffold/skills/ui-ux-pro-max/LICENSE +0 -21
  60. package/scaffold/skills/ui-ux-pro-max/SKILL.md +0 -659
  61. package/scaffold/skills/ui-ux-pro-max/data/_sync_all.py +0 -414
  62. package/scaffold/skills/ui-ux-pro-max/data/app-interface.csv +0 -31
  63. package/scaffold/skills/ui-ux-pro-max/data/charts.csv +0 -26
  64. package/scaffold/skills/ui-ux-pro-max/data/colors.csv +0 -162
  65. package/scaffold/skills/ui-ux-pro-max/data/design.csv +0 -1776
  66. package/scaffold/skills/ui-ux-pro-max/data/draft.csv +0 -1779
  67. package/scaffold/skills/ui-ux-pro-max/data/google-fonts.csv +0 -1924
  68. package/scaffold/skills/ui-ux-pro-max/data/icons.csv +0 -106
  69. package/scaffold/skills/ui-ux-pro-max/data/landing.csv +0 -35
  70. package/scaffold/skills/ui-ux-pro-max/data/products.csv +0 -162
  71. package/scaffold/skills/ui-ux-pro-max/data/react-performance.csv +0 -45
  72. package/scaffold/skills/ui-ux-pro-max/data/stacks/angular.csv +0 -51
  73. package/scaffold/skills/ui-ux-pro-max/data/stacks/astro.csv +0 -54
  74. package/scaffold/skills/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  75. package/scaffold/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  76. package/scaffold/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  77. package/scaffold/skills/ui-ux-pro-max/data/stacks/laravel.csv +0 -51
  78. package/scaffold/skills/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  79. package/scaffold/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  80. package/scaffold/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  81. package/scaffold/skills/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  82. package/scaffold/skills/ui-ux-pro-max/data/stacks/react.csv +0 -54
  83. package/scaffold/skills/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  84. package/scaffold/skills/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  85. package/scaffold/skills/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  86. package/scaffold/skills/ui-ux-pro-max/data/stacks/threejs.csv +0 -54
  87. package/scaffold/skills/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  88. package/scaffold/skills/ui-ux-pro-max/data/styles.csv +0 -85
  89. package/scaffold/skills/ui-ux-pro-max/data/typography.csv +0 -74
  90. package/scaffold/skills/ui-ux-pro-max/data/ui-reasoning.csv +0 -162
  91. package/scaffold/skills/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  92. package/scaffold/skills/ui-ux-pro-max/scripts/core.py +0 -262
  93. package/scaffold/skills/ui-ux-pro-max/scripts/design_system.py +0 -1148
  94. package/scaffold/skills/ui-ux-pro-max/scripts/search.py +0 -114
  95. package/scaffold/skills/ui-ux-pro-max/skills/brand/SKILL.md +0 -97
  96. package/scaffold/skills/ui-ux-pro-max/skills/design/SKILL.md +0 -302
  97. package/scaffold/skills/ui-ux-pro-max/skills/design-system/SKILL.md +0 -244
  98. package/scaffold/skills/ui-ux-pro-max/templates/base/quick-reference.md +0 -297
  99. package/scaffold/skills/ui-ux-pro-max/templates/base/skill-content.md +0 -358
  100. package/scaffold/skills/ui-ux-pro-max/templates/platforms/agent.json +0 -21
  101. package/scaffold/skills/ui-ux-pro-max/templates/platforms/augment.json +0 -18
  102. package/scaffold/skills/ui-ux-pro-max/templates/platforms/claude.json +0 -21
  103. package/scaffold/skills/ui-ux-pro-max/templates/platforms/codebuddy.json +0 -21
  104. package/scaffold/skills/ui-ux-pro-max/templates/platforms/codex.json +0 -21
  105. package/scaffold/skills/ui-ux-pro-max/templates/platforms/continue.json +0 -21
  106. package/scaffold/skills/ui-ux-pro-max/templates/platforms/copilot.json +0 -21
  107. package/scaffold/skills/ui-ux-pro-max/templates/platforms/cursor.json +0 -21
  108. package/scaffold/skills/ui-ux-pro-max/templates/platforms/droid.json +0 -21
  109. package/scaffold/skills/ui-ux-pro-max/templates/platforms/gemini.json +0 -21
  110. package/scaffold/skills/ui-ux-pro-max/templates/platforms/kilocode.json +0 -21
  111. package/scaffold/skills/ui-ux-pro-max/templates/platforms/kiro.json +0 -21
  112. package/scaffold/skills/ui-ux-pro-max/templates/platforms/opencode.json +0 -21
  113. package/scaffold/skills/ui-ux-pro-max/templates/platforms/qoder.json +0 -21
  114. package/scaffold/skills/ui-ux-pro-max/templates/platforms/roocode.json +0 -21
  115. package/scaffold/skills/ui-ux-pro-max/templates/platforms/trae.json +0 -21
  116. package/scaffold/skills/ui-ux-pro-max/templates/platforms/warp.json +0 -18
  117. package/scaffold/skills/ui-ux-pro-max/templates/platforms/windsurf.json +0 -21
  118. package/scaffold/skills/webapp-testing/SKILL.md +0 -138
  119. package/scaffold/skills/webapp-testing/assets/test-helper.js +0 -56
  120. /package/scaffold/skills/{webapp-testing → dw-testing-discipline}/references/three-workflow-patterns.md +0 -0
@@ -0,0 +1,162 @@
1
+ # Anti-slop catalog — 14 patterns + 17 anti-defaults
2
+
3
+ Every pattern below is a category of slop that LLMs produce when ungrounded. Detection happens in `/dw-code-review` (UI diffs) and design proposals from `/dw-redesign-ui`.
4
+
5
+ ## The 14 patterns
6
+
7
+ ### 1. Visual sameness
8
+
9
+ **What it looks like:** Every section of the page uses the same card style, same padding, same text size, same emphasis weight. The eye finds no anchor.
10
+
11
+ **Why it happens:** LLM defaults to "consistent = good," missing that hierarchy needs deliberate variation.
12
+
13
+ **Fix:** Establish one primary section per scroll-height. Use size, weight, color saturation, or whitespace differential to anchor the eye. Everything else recedes.
14
+
15
+ **Example violation:** Dashboard with 6 identical-looking metric cards. **Fix:** One hero metric (largest, brightest, top), 3 supporting metrics, 2 minor metrics in a different visual treatment.
16
+
17
+ ### 2. Weak hierarchy
18
+
19
+ **What it looks like:** Headings barely larger than body. Important CTAs same color as secondary. The user can't tell what to look at first.
20
+
21
+ **Why it happens:** Defaults to "elegant restraint" without ensuring guidance still works.
22
+
23
+ **Fix:** Verify hierarchy by squinting at the design (literally) — what jumps out? If nothing jumps out, hierarchy is failing. Increase contrast in size, weight, or color for the primary element by at least 30%.
24
+
25
+ ### 3. Fake interactivity
26
+
27
+ **What it looks like:** Hover states that change opacity but the click does nothing meaningful. Buttons that look interactive but don't have a job. Cards with subtle hover but no on-click handler.
28
+
29
+ **Why it happens:** LLM applies hover styles to anything that looks card-shaped.
30
+
31
+ **Fix:** Hover state ONLY on elements that have an on-click. If it can't be clicked, don't suggest it can. Use cursor: default explicitly on non-interactive shapes.
32
+
33
+ ### 4. Emoji spam
34
+
35
+ **What it looks like:** 🎯 Goals · 🚀 Launch · ✨ Features · 📊 Analytics · 🔥 Trending — emojis as decoration in headers, CTAs, and section labels where they add no information.
36
+
37
+ **Why it happens:** LLM training data has tons of "emoji in headers = engaging" patterns.
38
+
39
+ **Fix:** Use icons (lucide, heroicons, tabler) for semantic meaning; reserve emojis for genuinely emotive contexts (celebrations, errors that need empathy). If you can remove the emoji and the meaning survives, remove it.
40
+
41
+ ### 5. Gradient crutch
42
+
43
+ **What it looks like:** Hero with diagonal purple-to-pink gradient. Buttons with subtle gradient. Card backgrounds with mesh gradients. Every empty space gets a gradient.
44
+
45
+ **Why it happens:** Stable Diffusion / midjourney aesthetics leaked into UI; gradients hide weak composition.
46
+
47
+ **Fix:** A gradient must earn its place — usually for hero zones with poetic copy, never for utility surfaces. Solid colors + good hierarchy beat gradients 9 times out of 10.
48
+
49
+ ### 6. Glass everything
50
+
51
+ **What it looks like:** Frosted-glass effect on modals, cards, dropdowns, side panels — anywhere a surface can be layered.
52
+
53
+ **Why it happens:** Apple's macOS aesthetic. Looks "premium" without effort.
54
+
55
+ **Fix:** Glass only when there's meaningful content visible behind the surface (a hero image, a busy dashboard). Glass on top of plain backgrounds adds blur for no reason.
56
+
57
+ ### 7. Centered all the things
58
+
59
+ **What it looks like:** Body paragraphs center-aligned. Headlines centered. Forms with labels centered above inputs. Every text block reads center.
60
+
61
+ **Why it happens:** Marketing-page training data biases toward center-aligned.
62
+
63
+ **Fix:** Center-align for hero headlines and small CTA labels only. Body text and forms read better left-aligned (in LTR scripts). Tabular data reads in columns, not centered.
64
+
65
+ ### 8. AI gray washing
66
+
67
+ **What it looks like:** Neutral gray palette everywhere. `slate-50`, `gray-100`, `zinc-200` for backgrounds, borders, text, accents. Nothing has color personality.
68
+
69
+ **Why it happens:** "Neutral = safe" default, plus shadcn/ui's neutral start.
70
+
71
+ **Fix:** Establish ONE accent color from the curated defaults or brand. Use it intentionally — primary CTAs, active states, the one place the user looks first. Gray is the canvas, not the painting.
72
+
73
+ ### 9. Generic CTAs
74
+
75
+ **What it looks like:** "Get Started" · "Learn More" · "Click Here" · "Submit" · "OK" buttons.
76
+
77
+ **Why it happens:** Default LLM verb library.
78
+
79
+ **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". Generic verbs are tells.
80
+
81
+ ### 10. Stock illustration
82
+
83
+ **What it looks like:** Figure-with-laptop hero art. Diverse-team-around-table illustration. Abstract floating shapes.
84
+
85
+ **Why it happens:** "Illustration = friendly" default. Cheap to produce, generic to consume.
86
+
87
+ **Fix:** Either use product screenshots (real screens, real data — sanitized) or skip illustration entirely. A clean hero with strong typography beats a generic illustration every time.
88
+
89
+ ### 11. Drop shadow soup
90
+
91
+ **What it looks like:** Cards with shadow. Buttons with shadow. Inputs with shadow. Tooltips with shadow on shadows. Borders AND shadows AND gradients on one element.
92
+
93
+ **Why it happens:** Material Design leftover; depth as decoration.
94
+
95
+ **Fix:** Pick ONE depth mechanism per layer. If cards have shadow, buttons inside should not. If you're using elevation systematically (Material 3), enforce the elevation hierarchy.
96
+
97
+ ### 12. Loading spinner default
98
+
99
+ **What it looks like:** Spinner overlay for every async operation, regardless of duration or context.
100
+
101
+ **Why it happens:** Default fallback in every UI library.
102
+
103
+ **Fix:**
104
+ - <300ms: don't show anything. Spinner appearing then disappearing instantly is flicker.
105
+ - 300ms-2s: skeleton loader (shape of incoming content).
106
+ - 2s-10s: spinner + status text ("Loading orders...").
107
+ - 10s+: progress bar or step indicator + cancel button.
108
+
109
+ ### 13. Empty state void
110
+
111
+ **What it looks like:** "No items found." Centered. Nothing else. User has no idea what to do.
112
+
113
+ **Why it happens:** Empty state treated as edge case, not a real screen.
114
+
115
+ **Fix:** Every empty state must answer: WHY is it empty (no data yet vs filter excluded everything vs error). WHAT should the user do next (CTA: "Create your first invoice"). Show example/illustration if it helps onboard.
116
+
117
+ ### 14. Notification-soup tray
118
+
119
+ **What it looks like:** Every UI event becomes a toast. Save successful → toast. Validation error → toast. Network slow → toast. Now there are 5 stacked toasts and the user can't read any.
120
+
121
+ **Why it happens:** Toast is the default feedback mechanism in component libraries.
122
+
123
+ **Fix:** Reserve toasts for actions that need confirmation AWAY from the originating surface (background save completed, deletion can be undone). Inline feedback for form validation. Modal/banner for blocking errors. NEVER stack >2 toasts at once.
124
+
125
+ ## The 17 anti-defaults
126
+
127
+ Specific values that signal "no thought was put in." Avoid unless you can articulate WHY you picked exactly this:
128
+
129
+ | Anti-default | Why it's a tell |
130
+ |--------------|-----------------|
131
+ | `#3B82F6` (Tailwind blue-500) | The internet's default blue |
132
+ | `rounded-lg` everywhere | Universal default; no surface character |
133
+ | `shadow-md` on every card | Universal default; no depth hierarchy |
134
+ | `bg-gradient-to-br from-purple-500 to-pink-500` | The "AI startup landing page" gradient |
135
+ | Inter font as the only choice | Default font of 60% of new SaaS |
136
+ | `font-bold` for everything emphasized | Bold is a tool, not the only tool |
137
+ | Lucide icons exclusively | One icon family is fine; signature is none |
138
+ | Stock "happy team" hero illustration | Generic placeholder energy |
139
+ | "Get Started" / "Learn More" CTA copy | Verb-less; says nothing |
140
+ | 4px / 8px / 12px / 16px spacing exclusively | The default 4-step scale; no rhythm |
141
+ | `border-gray-200` for every divider | Visual whisper; no intentionality |
142
+ | Sans-serif headlines + sans-serif body | No typographic contrast |
143
+ | Center-aligned everything | See pattern #7 |
144
+ | Animated CSS confetti on success | Cheesy; never matches the brand |
145
+ | `bg-white dark:bg-gray-900` only | No real dark-mode design pass |
146
+ | Single-column form on a wide screen | Vertical scroll where horizontal fits |
147
+ | Modal-for-everything | Most modals should be inline editing |
148
+
149
+ ## How to use this catalog
150
+
151
+ In `/dw-redesign-ui` step 4 (propose) — before presenting design directions, self-check against this list. Flag any pattern you're consciously using AND say why (sometimes it's the right call; "gradient crutch" can be intentional for a marketing hero).
152
+
153
+ In `/dw-code-review` UI section — grep the diff for the anti-defaults table values and the patterns. Each hit becomes a finding with `dw-review-rigor` severity:
154
+ - Pattern violations on a NEW surface → `medium` severity.
155
+ - Pattern violations spreading EXISTING surface's slop further → `low` severity (consistency wins).
156
+ - Pattern violations on a redesign that was supposed to fix slop → `high` severity (regression).
157
+
158
+ ## When the rules bend
159
+
160
+ - **Marketing pages** can use gradients and emojis with more freedom — different surface job.
161
+ - **Brand-mandated** anti-defaults override this list (if the brand IS `#3B82F6`, use it).
162
+ - **Component libraries** like shadcn ship with neutral defaults — the discipline is to ADD character on top, not remove their neutrality.
@@ -0,0 +1,195 @@
1
+ # Curated defaults — 10 palettes + 10 font pairings + spacing scale
2
+
3
+ Use this reference when the project has **no design authority** (no `.dw/rules/` design section, no `DESIGN.md`, no Tailwind theme tokens, no component library config).
4
+
5
+ The values below cover ~90% of cases that need a starting point. Not opinionated branding — neutral, accessible, professional defaults.
6
+
7
+ ## How to use
8
+
9
+ 1. Pick ONE palette + ONE font pairing + the spacing scale.
10
+ 2. Commit the choice to the project (`.dw/rules/<frontend>.md` design section OR a new `DESIGN.md`).
11
+ 3. From there, the project HAS a design authority; downstream `dw-ui-discipline` invocations defer to that authority.
12
+
13
+ This is bootstrap, not destination. The goal is to escape "no authority" mode within the first feature.
14
+
15
+ ## The 10 palettes
16
+
17
+ Each palette below: neutral scale (gray, slate, etc.) + 1 accent + semantic colors. All WCAG 2.2 AA compliant for body text.
18
+
19
+ ### 1. Cool Stone
20
+ - Neutrals: Tailwind `slate` (50-950)
21
+ - Accent: `#3B82F6` (blue-500) — wait, no, see Anti-Slop. Use `#0066CC` instead.
22
+ - Semantic: success `#16A34A`, warning `#D97706`, danger `#DC2626`
23
+ - **Tone:** Calm, corporate, trustworthy. Default for SaaS dashboards.
24
+
25
+ ### 2. Warm Sand
26
+ - Neutrals: Tailwind `stone` (50-950)
27
+ - Accent: `#CA8A04` (warm amber)
28
+ - Semantic: success `#16A34A`, warning `#EA580C`, danger `#DC2626`
29
+ - **Tone:** Approachable, hospitality-adjacent, organic.
30
+
31
+ ### 3. Forest Pine
32
+ - Neutrals: Tailwind `gray` (50-950)
33
+ - Accent: `#15803D` (deep green)
34
+ - Semantic: success `#16A34A`, warning `#D97706`, danger `#B91C1C`
35
+ - **Tone:** Steady, financial, sustainable.
36
+
37
+ ### 4. Plum Velvet
38
+ - Neutrals: Tailwind `zinc` (50-950)
39
+ - Accent: `#7C3AED` (violet-600)
40
+ - Semantic: success `#22C55E`, warning `#EAB308`, danger `#E11D48`
41
+ - **Tone:** Creative, premium, design-tool.
42
+
43
+ ### 5. Coral Reef
44
+ - Neutrals: Tailwind `neutral` (50-950)
45
+ - Accent: `#E11D48` (rose-600)
46
+ - Semantic: success `#16A34A`, warning `#F59E0B`, danger `#B91C1C`
47
+ - **Tone:** Energetic, consumer, retail.
48
+
49
+ ### 6. Steel Blue
50
+ - Neutrals: Tailwind `slate` (50-950)
51
+ - Accent: `#0F766E` (teal-700)
52
+ - Semantic: success `#16A34A`, warning `#D97706`, danger `#DC2626`
53
+ - **Tone:** Technical, infrastructure, devops.
54
+
55
+ ### 7. Burnt Sienna
56
+ - Neutrals: Tailwind `stone` (50-950)
57
+ - Accent: `#C2410C` (orange-700)
58
+ - Semantic: success `#15803D`, warning `#A16207`, danger `#B91C1C`
59
+ - **Tone:** Bold, news, sports.
60
+
61
+ ### 8. Ink and Paper
62
+ - Neutrals: Pure `#000` and `#FFF` with `#E5E5E5` divider
63
+ - Accent: `#000` (no accent — minimal)
64
+ - Semantic: success `#16A34A`, warning `#D97706`, danger `#DC2626`
65
+ - **Tone:** Editorial, brutalist, magazine. Pair with serif body.
66
+
67
+ ### 9. Midnight Indigo
68
+ - Neutrals: Tailwind `slate` dark-mode-first (900-50)
69
+ - Accent: `#6366F1` (indigo-500)
70
+ - Semantic: success `#22C55E`, warning `#FACC15`, danger `#EF4444`
71
+ - **Tone:** Tech-forward, dark-mode-default, on-call tooling.
72
+
73
+ ### 10. Sea Salt
74
+ - Neutrals: Tailwind `gray` cool (50-950)
75
+ - Accent: `#0891B2` (cyan-600)
76
+ - Semantic: success `#10B981`, warning `#F59E0B`, danger `#F43F5E`
77
+ - **Tone:** Fresh, healthcare, education.
78
+
79
+ ## The 10 font pairings
80
+
81
+ Each pairing: heading font / body font. All available on Google Fonts. Variable fonts where possible.
82
+
83
+ | # | Headings | Body | Tone |
84
+ |---|----------|------|------|
85
+ | 1 | Inter | Inter | Modern SaaS default. Workhorse pairing. |
86
+ | 2 | Geist Sans | Geist Sans | Vercel-aesthetic; clean, geometric. |
87
+ | 3 | Söhne (or Manrope) | Söhne (or Manrope) | Editorial-modern; replaces Inter when Inter feels overused. |
88
+ | 4 | DM Serif Display | Inter | Editorial-meets-product. Strong headlines, neutral body. |
89
+ | 5 | Fraunces | Inter | Variable serif headlines, sans body. Premium feel. |
90
+ | 6 | Source Serif 4 | Source Sans 3 | Adobe pairing; balanced editorial. |
91
+ | 7 | Space Grotesk | Inter | Slightly quirky headlines, neutral body. Tech with personality. |
92
+ | 8 | IBM Plex Serif | IBM Plex Sans | Industrial, opinionated. Good for enterprise tooling. |
93
+ | 9 | Playfair Display | Manrope | High contrast pairing; hospitality, lifestyle. |
94
+ | 10 | JetBrains Mono | Inter | Code-first products; mono for headlines and accents. |
95
+
96
+ **Anti-default reminder:** Inter / Inter is fine. Inter / Inter as the ONLY pairing you ever pick is a tell.
97
+
98
+ ## Spacing scale
99
+
100
+ Use a 4px-base scale with intentional jumps:
101
+
102
+ ```
103
+ 0: 0px
104
+ 1: 4px (tight controls, icon padding)
105
+ 2: 8px (compact spacing)
106
+ 3: 12px (default gap in form fields)
107
+ 4: 16px (default gap between blocks)
108
+ 6: 24px (section padding)
109
+ 8: 32px (large section spacing)
110
+ 12: 48px (page header / hero padding)
111
+ 16: 64px (between major sections)
112
+ 24: 96px (hero / landing block separators)
113
+ 32: 128px (rare; signature spacing)
114
+ ```
115
+
116
+ **Skip these by default:** 5, 7, 9, 10, 11, 13, 14, 15. Picking exactly 4-6-8-12-16 reads more intentional than 1-2-3-4-5-6-...
117
+
118
+ ## Border radius scale
119
+
120
+ Pick a "personality" once and use it consistently:
121
+
122
+ | Radius | Tone |
123
+ |--------|------|
124
+ | 0 (square) | Brutalist, editorial |
125
+ | 2px | Subtle modernist |
126
+ | 4px (Tailwind `rounded`) | Standard |
127
+ | 6px | Slightly friendly |
128
+ | 8px (Tailwind `rounded-lg`) | Default SaaS; **anti-default if used universally** |
129
+ | 12px | Softer, consumer |
130
+ | 16px+ | Rounded everything; friendly/youth-oriented |
131
+ | Full / 9999px | Pills, buttons, avatars only |
132
+
133
+ Don't mix more than 2 radii in one surface (e.g., 4px for inputs, 8px for cards). Three+ radii = visual noise.
134
+
135
+ ## Type scale
136
+
137
+ For body=16px baseline:
138
+
139
+ ```
140
+ xs: 12px (captions, helper text — minimum 11px)
141
+ sm: 14px (secondary, labels)
142
+ base: 16px (body)
143
+ lg: 18px (lead paragraphs)
144
+ xl: 20px (small headings)
145
+ 2xl: 24px (subheadings)
146
+ 3xl: 30px (section headings)
147
+ 4xl: 36px (page titles)
148
+ 5xl: 48px (hero, marketing)
149
+ 6xl+: 60-96px (display, marketing only)
150
+ ```
151
+
152
+ Line-height pairs:
153
+ - Body text: 1.5 to 1.6
154
+ - Headings: 1.1 to 1.25
155
+ - Buttons: 1 (tight)
156
+
157
+ ## How to commit a choice
158
+
159
+ After picking a palette + pairing + spacing, write `.dw/rules/<frontend>.md` (or `DESIGN.md`) with:
160
+
161
+ ```markdown
162
+ ## Design System (bootstrap)
163
+
164
+ **Source:** Curated default — `dw-ui-discipline/references/curated-defaults.md`, picked Cool Stone + Inter/Inter + 4px-base scale on 2026-05-12.
165
+
166
+ ### Colors
167
+ - Neutrals: Tailwind slate (50-950)
168
+ - Accent: #0066CC (links, primary buttons, focus rings)
169
+ - Success: #16A34A · Warning: #D97706 · Danger: #DC2626
170
+
171
+ ### Typography
172
+ - Headings: Inter, weight 600-700
173
+ - Body: Inter, weight 400-500
174
+ - Mono: JetBrains Mono (code blocks only)
175
+
176
+ ### Spacing
177
+ 4px base scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96.
178
+
179
+ ### Border radius
180
+ 4px on inputs, 8px on cards, full on pills/avatars.
181
+
182
+ ### Updates
183
+ This file is the canonical design source. To change a value, propose a PR
184
+ that updates this file FIRST, then propagates through code.
185
+ ```
186
+
187
+ Once written, `dw-ui-discipline` reads this file instead of `curated-defaults.md`. The bootstrap step is done.
188
+
189
+ ## What this catalog is NOT
190
+
191
+ - Not 161 palettes. Not 57 fonts. By design.
192
+ - Not a substitute for brand work — for a serious product, hire a designer.
193
+ - Not opinionated about industry-specific aesthetics (med-tech, gaming, kids' content). Those need real design pass.
194
+
195
+ The point is: have ONE intentional starting point so the agent isn't reaching for `#3B82F6` and `rounded-lg`. Project-specific design follows.
@@ -0,0 +1,142 @@
1
+ # The hard-gate protocol — full version
2
+
3
+ Four checkpoints before any UI work touches code. Each has a concrete output. Don't proceed without finishing the current one.
4
+
5
+ ## Why a gate at all
6
+
7
+ Training-data defaults are the enemy. An LLM proposing UI without grounding will:
8
+ - Reach for `#3B82F6` blue and `rounded-lg` because they appeared 10M times in training data.
9
+ - Default to glass morphism, gradient backgrounds, and center-aligned everything because those screenshots dominate the web.
10
+ - Skip empty/error states because happy-path screenshots are the most common training signal.
11
+
12
+ The gate forces grounding in this project's reality before training-data autopilot fires.
13
+
14
+ ## Checkpoint 1: Brand authorities OR curated defaults
15
+
16
+ **Goal:** know where visual decisions come from. Documented authority, or curated default — never invented.
17
+
18
+ **How:**
19
+
20
+ 1. Search the project for design source-of-truth:
21
+ - `.dw/rules/*.md` — look for "Design", "Patterns to Follow", "Naming Conventions" sections.
22
+ - `DESIGN.md`, `BRAND.md`, `BRANDING.md`, `STYLE_GUIDE.md` at root.
23
+ - Tailwind `tailwind.config.{ts,js}` — theme tokens.
24
+ - CSS variables in `globals.css`, `theme.css`, `tokens.css`.
25
+ - Component library config (shadcn `components.json`, MUI theme, Chakra theme).
26
+ - Storybook stories — implicit canonical components.
27
+
28
+ 2. If **at least one** authority exists: it wins. Decisions defer to it. If a needed token doesn't exist (e.g., a danger-secondary color), propose adding it to the authority FIRST, not inline.
29
+
30
+ 3. If **none exists**: pick a curated default. Read `curated-defaults.md` in this references folder. Pick one of the 10 palettes + one of the 10 font pairings. Mark the choice in the techspec/PR description:
31
+
32
+ > **Design source:** No project authority found. Using curated default "Cool Stone" (neutral grays + electric blue accent) + "Inter / Source Serif" pairing. Recommend establishing `DESIGN.md` to formalize.
33
+
34
+ **Anti-patterns at this checkpoint:**
35
+
36
+ - Inventing color hex values inline (`bg-[#FF6B35]`).
37
+ - "I'll use Tailwind defaults" — Tailwind defaults are training-data defaults, not project authority.
38
+ - Copying values from "a site I like" without understanding what it solved.
39
+
40
+ **Output:** A one-sentence note in the techspec/PR describing the authority consulted.
41
+
42
+ ## Checkpoint 2: Surface job sentence
43
+
44
+ **Goal:** the user's intent at this surface, stated in one specific sentence.
45
+
46
+ **Format:** "This surface helps the user **<verb-phrase>** so that **<outcome>**."
47
+
48
+ **Examples — good:**
49
+
50
+ - "This surface helps the user filter overdue invoices so they can chase late payers in under 30 seconds."
51
+ - "This surface helps the on-call engineer diagnose which deploy caused the spike so they can roll back without paging the team."
52
+ - "This surface helps the manager approve or reject expense reports without leaving Slack."
53
+
54
+ **Examples — bad:**
55
+
56
+ - "This surface displays invoice data." (no user, no outcome)
57
+ - "Settings page for managing the account." (vague, no specificity)
58
+ - "Dashboard." (one word)
59
+
60
+ **How to push back when the brief is vague:**
61
+
62
+ If the requester can't articulate the job, the requirements aren't ready. Reply with: "Before I design this surface, I need the job sentence: <example>. Can you fill in the verb-phrase and outcome?"
63
+
64
+ Designing without this sentence produces generic surfaces — the "just another dashboard" outcome.
65
+
66
+ **Output:** The one-sentence job, committed to the techspec/PR description.
67
+
68
+ ## Checkpoint 3: Complete state matrix
69
+
70
+ **Goal:** enumerate every state the surface can be in, BEFORE designing for the happy path.
71
+
72
+ **Minimum states (always enumerate):**
73
+
74
+ | State | Trigger | What user sees |
75
+ |-------|---------|---------------|
76
+ | `default` | First load, no interaction | Initial render |
77
+ | `hover` | Cursor over interactive element | Visual feedback |
78
+ | `active` | Click in progress | Pressed/depressed visual |
79
+ | `focus-visible` | Keyboard tab arrived | Distinct outline, not the same as hover |
80
+ | `disabled` | Interaction unavailable | Reduced opacity + cursor change, NO action |
81
+ | `loading` | Async operation in flight | Skeleton, spinner, or progress — context-appropriate |
82
+ | `empty` | No data to show | Guidance on what to do next |
83
+ | `error` | Operation failed | What broke + how to recover |
84
+ | `success` | Operation succeeded | Confirmation that doesn't require ack |
85
+
86
+ **Add domain-specific states as needed:**
87
+
88
+ - Read/unread (notifications, messages)
89
+ - Online/offline (chat, collaborative tools)
90
+ - Stale/fresh (dashboards with cached data)
91
+ - Pending/approved/rejected (workflow states)
92
+ - New/saved/dirty (forms)
93
+
94
+ **Tripwire:** if the design has only `default`, you missed 8 states. If it has `default` + `loading`, you missed 6. The full matrix is non-negotiable.
95
+
96
+ **Output:** A state matrix table in the techspec or design doc.
97
+
98
+ ## Checkpoint 4: Scene sentence
99
+
100
+ **Goal:** the physical context the surface lives in.
101
+
102
+ **Format:** "**<Who>** uses this **<where>** in **<what light>** while **<what mood>**."
103
+
104
+ **Examples — good:**
105
+
106
+ - "An on-call engineer uses this on a dark-room laptop at 3am while troubleshooting a fire."
107
+ - "A field nurse uses this on a phone in bright outdoor light while juggling clipboards."
108
+ - "A receptionist uses this on a 24" monitor at a busy front desk while talking to a visitor."
109
+
110
+ **Why this matters:**
111
+
112
+ Decisions cascade from the scene:
113
+ - 3am dark room → dark mode, high contrast, no flashing animations.
114
+ - Bright outdoor → minimum 7:1 contrast, larger touch targets, no thin fonts.
115
+ - Busy front desk → glanceable info, no nested menus, big numbers.
116
+
117
+ Without the scene, defaults take over: light mode, default contrasts, animations, regular touch targets. Production users hate it; you can't articulate why.
118
+
119
+ **Output:** Scene sentence in the techspec.
120
+
121
+ ## What "passing the gate" looks like
122
+
123
+ A PR description / techspec UI section that includes:
124
+
125
+ ```markdown
126
+ ## UI Discipline Gate
127
+
128
+ **Authority:** `.dw/rules/frontend.md` design tokens (Tailwind theme + custom CSS vars).
129
+ **Surface job:** Helps on-call engineers diagnose which deploy caused the latency spike so they can roll back without paging the team.
130
+ **State matrix:**
131
+ - default, hover, active, focus-visible, disabled, loading, empty (no spikes detected), error (metrics API down), success (rollback completed)
132
+ - Plus: stale (>5min old data) — show timestamp + refresh CTA.
133
+ **Scene:** On-call engineer uses this on a dark-room laptop at 3am while troubleshooting a production fire.
134
+ ```
135
+
136
+ This is the minimum disclosure. Anything less and the gate didn't pass.
137
+
138
+ ## When this gate has been run
139
+
140
+ The downstream skills (`anti-slop.md`, `state-matrix.md`, `accessibility-floor.md`) assume gate passed. They won't re-verify; if you skipped, you get bad output.
141
+
142
+ `/dw-code-review` failing verdict on a UI PR 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,75 @@
1
+ # Template Overrides
2
+
3
+ Files in this directory override the corresponding templates in `.dw/templates/`. Use this when your team needs a customized PRD/TechSpec/Task/etc. shape **without** losing the ability to receive `dev-workflow` updates.
4
+
5
+ ## How it works
6
+
7
+ - During `dev-workflow init` or `dev-workflow update`, the CLI copies templates from the package into `.dw/templates/`.
8
+ - Before writing each file, the CLI checks `.dw/templates/overrides/` for a same-named file.
9
+ - If found, **the override is preserved and the core template is skipped**. Your customization wins.
10
+ - If not found, the core template is installed/updated normally.
11
+
12
+ ## How to override a template
13
+
14
+ ```bash
15
+ # 1. Copy the template you want to customize from .dw/templates/ to .dw/templates/overrides/
16
+ cp .dw/templates/prd-template.md .dw/templates/overrides/prd-template.md
17
+
18
+ # 2. Edit the override to fit your team's process
19
+ $EDITOR .dw/templates/overrides/prd-template.md
20
+
21
+ # 3. Commit it. Future updates won't touch this file.
22
+ git add .dw/templates/overrides/prd-template.md
23
+ git commit -m "chore(templates): customize PRD template for our team"
24
+ ```
25
+
26
+ The override takes effect immediately. Commands that consume the template (`/dw-create-prd`, etc.) will read from `.dw/templates/<name>.md`, which is preserved as your edited copy.
27
+
28
+ ## How to revert an override
29
+
30
+ ```bash
31
+ # 1. Delete the override
32
+ rm .dw/templates/overrides/prd-template.md
33
+
34
+ # 2. Re-run dev-workflow update to restore the core template
35
+ npx @brunosps00/dev-workflow update
36
+ ```
37
+
38
+ ## When an override is appropriate
39
+
40
+ - Adding required sections specific to your industry (compliance, finance, healthcare).
41
+ - Removing sections that don't apply.
42
+ - Renaming sections to match your team's vocabulary.
43
+ - Embedding links to internal tools, dashboards, runbooks.
44
+
45
+ ## When an override is **not** appropriate
46
+
47
+ - Removing critical-path sections like FR numbering or test plans — downstream commands rely on these.
48
+ - Adding fields that conflict with the YAML frontmatter schema.
49
+ - Anything that breaks `/dw-create-techspec` or `/dw-create-tasks` cross-references.
50
+
51
+ If in doubt, run the workflow end-to-end after editing — the consistency check at the end of `/dw-create-tasks` will surface most structural breakages.
52
+
53
+ ## Versioning your overrides
54
+
55
+ When `dev-workflow` releases a new minor version, the core templates may change shape (new sections, renamed fields). Your override will continue to work, but it might lack the new sections.
56
+
57
+ Recommended cadence: when you upgrade `dev-workflow`, `diff` your override against the new core template:
58
+
59
+ ```bash
60
+ diff .dw/templates/overrides/prd-template.md .dw/templates/prd-template.md
61
+ ```
62
+
63
+ Merge in anything you want from upstream. The override stays canonical; the core template is just a reference.
64
+
65
+ ## Subdirectories
66
+
67
+ Overrides can mirror the directory structure of `.dw/templates/`. For example, to override a file inside `functional-doc/`:
68
+
69
+ ```
70
+ .dw/templates/overrides/
71
+ └── functional-doc/
72
+ └── e2e-runbook.md
73
+ ```
74
+
75
+ The resolver descends recursively — each leaf file is checked independently against its corresponding path under `overrides/`.