tribunal-kit 2.4.6 โ†’ 3.1.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 (250) hide show
  1. package/.agent/ARCHITECTURE.md +99 -99
  2. package/.agent/GEMINI.md +52 -52
  3. package/.agent/agents/accessibility-reviewer.md +139 -86
  4. package/.agent/agents/ai-code-reviewer.md +160 -90
  5. package/.agent/agents/backend-specialist.md +164 -127
  6. package/.agent/agents/code-archaeologist.md +115 -73
  7. package/.agent/agents/database-architect.md +130 -110
  8. package/.agent/agents/debugger.md +137 -97
  9. package/.agent/agents/dependency-reviewer.md +78 -30
  10. package/.agent/agents/devops-engineer.md +161 -118
  11. package/.agent/agents/documentation-writer.md +151 -87
  12. package/.agent/agents/explorer-agent.md +117 -99
  13. package/.agent/agents/frontend-reviewer.md +127 -47
  14. package/.agent/agents/frontend-specialist.md +169 -109
  15. package/.agent/agents/game-developer.md +28 -164
  16. package/.agent/agents/logic-reviewer.md +87 -49
  17. package/.agent/agents/mobile-developer.md +151 -103
  18. package/.agent/agents/mobile-reviewer.md +133 -50
  19. package/.agent/agents/orchestrator.md +121 -110
  20. package/.agent/agents/penetration-tester.md +103 -77
  21. package/.agent/agents/performance-optimizer.md +136 -92
  22. package/.agent/agents/performance-reviewer.md +139 -69
  23. package/.agent/agents/product-manager.md +104 -70
  24. package/.agent/agents/product-owner.md +6 -25
  25. package/.agent/agents/project-planner.md +95 -95
  26. package/.agent/agents/qa-automation-engineer.md +174 -87
  27. package/.agent/agents/security-auditor.md +133 -129
  28. package/.agent/agents/seo-specialist.md +160 -99
  29. package/.agent/agents/sql-reviewer.md +132 -44
  30. package/.agent/agents/supervisor-agent.md +137 -109
  31. package/.agent/agents/swarm-worker-contracts.md +17 -17
  32. package/.agent/agents/swarm-worker-registry.md +46 -46
  33. package/.agent/agents/test-coverage-reviewer.md +132 -53
  34. package/.agent/agents/test-engineer.md +0 -21
  35. package/.agent/agents/type-safety-reviewer.md +143 -33
  36. package/.agent/patterns/generator.md +9 -9
  37. package/.agent/patterns/inversion.md +12 -12
  38. package/.agent/patterns/pipeline.md +9 -9
  39. package/.agent/patterns/reviewer.md +13 -13
  40. package/.agent/patterns/tool-wrapper.md +9 -9
  41. package/.agent/rules/GEMINI.md +63 -63
  42. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  43. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  44. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  45. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  46. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  47. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  48. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  49. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  50. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  51. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  52. package/.agent/scripts/compress_skills.py +167 -0
  53. package/.agent/scripts/consolidate_skills.py +173 -0
  54. package/.agent/scripts/deep_compress.py +202 -0
  55. package/.agent/scripts/minify_context.py +80 -0
  56. package/.agent/scripts/security_scan.py +1 -1
  57. package/.agent/scripts/strip_tribunal.py +41 -0
  58. package/.agent/skills/agent-organizer/SKILL.md +60 -100
  59. package/.agent/skills/agentic-patterns/SKILL.md +0 -70
  60. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +108 -53
  61. package/.agent/skills/api-patterns/SKILL.md +197 -257
  62. package/.agent/skills/api-security-auditor/SKILL.md +125 -57
  63. package/.agent/skills/app-builder/SKILL.md +326 -50
  64. package/.agent/skills/app-builder/templates/SKILL.md +13 -15
  65. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
  66. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
  67. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
  68. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
  69. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
  70. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
  71. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
  72. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
  73. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
  74. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
  75. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
  76. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
  77. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
  78. package/.agent/skills/appflow-wireframe/SKILL.md +71 -98
  79. package/.agent/skills/architecture/SKILL.md +161 -200
  80. package/.agent/skills/authentication-best-practices/SKILL.md +121 -54
  81. package/.agent/skills/bash-linux/SKILL.md +71 -166
  82. package/.agent/skills/behavioral-modes/SKILL.md +8 -69
  83. package/.agent/skills/brainstorming/SKILL.md +345 -127
  84. package/.agent/skills/building-native-ui/SKILL.md +125 -57
  85. package/.agent/skills/clean-code/SKILL.md +266 -149
  86. package/.agent/skills/code-review-checklist/SKILL.md +0 -62
  87. package/.agent/skills/config-validator/SKILL.md +73 -131
  88. package/.agent/skills/csharp-developer/SKILL.md +434 -73
  89. package/.agent/skills/database-design/SKILL.md +190 -275
  90. package/.agent/skills/deployment-procedures/SKILL.md +81 -158
  91. package/.agent/skills/devops-engineer/SKILL.md +255 -94
  92. package/.agent/skills/devops-incident-responder/SKILL.md +50 -69
  93. package/.agent/skills/doc.md +5 -5
  94. package/.agent/skills/documentation-templates/SKILL.md +19 -63
  95. package/.agent/skills/edge-computing/SKILL.md +75 -165
  96. package/.agent/skills/extract-design-system/SKILL.md +84 -58
  97. package/.agent/skills/framer-motion-expert/SKILL.md +195 -0
  98. package/.agent/skills/frontend-design/SKILL.md +151 -499
  99. package/.agent/skills/game-design-expert/SKILL.md +71 -0
  100. package/.agent/skills/game-engineering-expert/SKILL.md +88 -0
  101. package/.agent/skills/geo-fundamentals/SKILL.md +52 -178
  102. package/.agent/skills/github-operations/SKILL.md +197 -272
  103. package/.agent/skills/gsap-expert/SKILL.md +194 -0
  104. package/.agent/skills/i18n-localization/SKILL.md +60 -172
  105. package/.agent/skills/intelligent-routing/SKILL.md +123 -103
  106. package/.agent/skills/lint-and-validate/SKILL.md +8 -52
  107. package/.agent/skills/llm-engineering/SKILL.md +281 -195
  108. package/.agent/skills/local-first/SKILL.md +76 -159
  109. package/.agent/skills/mcp-builder/SKILL.md +48 -188
  110. package/.agent/skills/mobile-design/SKILL.md +213 -219
  111. package/.agent/skills/motion-engineering/SKILL.md +184 -0
  112. package/.agent/skills/nextjs-react-expert/SKILL.md +184 -203
  113. package/.agent/skills/nodejs-best-practices/SKILL.md +403 -185
  114. package/.agent/skills/observability/SKILL.md +211 -203
  115. package/.agent/skills/parallel-agents/SKILL.md +53 -146
  116. package/.agent/skills/performance-profiling/SKILL.md +171 -151
  117. package/.agent/skills/plan-writing/SKILL.md +49 -153
  118. package/.agent/skills/platform-engineer/SKILL.md +57 -103
  119. package/.agent/skills/playwright-best-practices/SKILL.md +110 -63
  120. package/.agent/skills/powershell-windows/SKILL.md +61 -179
  121. package/.agent/skills/python-patterns/SKILL.md +7 -35
  122. package/.agent/skills/python-pro/SKILL.md +273 -114
  123. package/.agent/skills/react-specialist/SKILL.md +227 -108
  124. package/.agent/skills/readme-builder/SKILL.md +15 -85
  125. package/.agent/skills/realtime-patterns/SKILL.md +216 -243
  126. package/.agent/skills/red-team-tactics/SKILL.md +10 -51
  127. package/.agent/skills/rust-pro/SKILL.md +525 -142
  128. package/.agent/skills/seo-fundamentals/SKILL.md +92 -153
  129. package/.agent/skills/server-management/SKILL.md +110 -166
  130. package/.agent/skills/shadcn-ui-expert/SKILL.md +154 -55
  131. package/.agent/skills/skill-creator/SKILL.md +18 -58
  132. package/.agent/skills/sql-pro/SKILL.md +543 -68
  133. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +28 -68
  134. package/.agent/skills/swiftui-expert/SKILL.md +124 -57
  135. package/.agent/skills/systematic-debugging/SKILL.md +49 -151
  136. package/.agent/skills/tailwind-patterns/SKILL.md +433 -149
  137. package/.agent/skills/tdd-workflow/SKILL.md +63 -169
  138. package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
  139. package/.agent/skills/testing-patterns/SKILL.md +437 -130
  140. package/.agent/skills/trend-researcher/SKILL.md +30 -71
  141. package/.agent/skills/ui-ux-pro-max/SKILL.md +0 -41
  142. package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
  143. package/.agent/skills/vue-expert/SKILL.md +225 -119
  144. package/.agent/skills/vulnerability-scanner/SKILL.md +264 -226
  145. package/.agent/skills/web-accessibility-auditor/SKILL.md +141 -58
  146. package/.agent/skills/web-design-guidelines/SKILL.md +17 -61
  147. package/.agent/skills/webapp-testing/SKILL.md +71 -196
  148. package/.agent/skills/whimsy-injector/SKILL.md +58 -132
  149. package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
  150. package/.agent/workflows/api-tester.md +96 -224
  151. package/.agent/workflows/audit.md +81 -122
  152. package/.agent/workflows/brainstorm.md +69 -105
  153. package/.agent/workflows/changelog.md +65 -97
  154. package/.agent/workflows/create.md +73 -88
  155. package/.agent/workflows/debug.md +80 -111
  156. package/.agent/workflows/deploy.md +119 -92
  157. package/.agent/workflows/enhance.md +80 -91
  158. package/.agent/workflows/fix.md +68 -97
  159. package/.agent/workflows/generate.md +165 -164
  160. package/.agent/workflows/migrate.md +106 -109
  161. package/.agent/workflows/orchestrate.md +103 -86
  162. package/.agent/workflows/performance-benchmarker.md +77 -268
  163. package/.agent/workflows/plan.md +120 -98
  164. package/.agent/workflows/preview.md +39 -96
  165. package/.agent/workflows/refactor.md +105 -97
  166. package/.agent/workflows/review-ai.md +63 -102
  167. package/.agent/workflows/review.md +71 -110
  168. package/.agent/workflows/session.md +53 -113
  169. package/.agent/workflows/status.md +42 -88
  170. package/.agent/workflows/strengthen-skills.md +90 -51
  171. package/.agent/workflows/swarm.md +114 -129
  172. package/.agent/workflows/test.md +125 -102
  173. package/.agent/workflows/tribunal-backend.md +60 -78
  174. package/.agent/workflows/tribunal-database.md +62 -100
  175. package/.agent/workflows/tribunal-frontend.md +62 -82
  176. package/.agent/workflows/tribunal-full.md +56 -100
  177. package/.agent/workflows/tribunal-mobile.md +65 -94
  178. package/.agent/workflows/tribunal-performance.md +62 -105
  179. package/.agent/workflows/ui-ux-pro-max.md +72 -121
  180. package/README.md +11 -15
  181. package/package.json +1 -1
  182. package/.agent/skills/api-patterns/api-style.md +0 -42
  183. package/.agent/skills/api-patterns/auth.md +0 -24
  184. package/.agent/skills/api-patterns/documentation.md +0 -26
  185. package/.agent/skills/api-patterns/graphql.md +0 -41
  186. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  187. package/.agent/skills/api-patterns/response.md +0 -37
  188. package/.agent/skills/api-patterns/rest.md +0 -40
  189. package/.agent/skills/api-patterns/security-testing.md +0 -122
  190. package/.agent/skills/api-patterns/trpc.md +0 -41
  191. package/.agent/skills/api-patterns/versioning.md +0 -22
  192. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  193. package/.agent/skills/app-builder/feature-building.md +0 -53
  194. package/.agent/skills/app-builder/project-detection.md +0 -34
  195. package/.agent/skills/app-builder/scaffolding.md +0 -118
  196. package/.agent/skills/app-builder/tech-stack.md +0 -40
  197. package/.agent/skills/architecture/context-discovery.md +0 -43
  198. package/.agent/skills/architecture/examples.md +0 -94
  199. package/.agent/skills/architecture/pattern-selection.md +0 -68
  200. package/.agent/skills/architecture/patterns-reference.md +0 -50
  201. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  202. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
  203. package/.agent/skills/database-design/database-selection.md +0 -43
  204. package/.agent/skills/database-design/indexing.md +0 -39
  205. package/.agent/skills/database-design/migrations.md +0 -48
  206. package/.agent/skills/database-design/optimization.md +0 -36
  207. package/.agent/skills/database-design/orm-selection.md +0 -30
  208. package/.agent/skills/database-design/schema-design.md +0 -56
  209. package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
  210. package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
  211. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  212. package/.agent/skills/frontend-design/color-system.md +0 -329
  213. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  214. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  215. package/.agent/skills/frontend-design/typography-system.md +0 -363
  216. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  217. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  218. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  219. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  220. package/.agent/skills/game-development/SKILL.md +0 -236
  221. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  222. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  223. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  224. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  225. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  226. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  227. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  228. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  229. package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
  230. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  231. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  232. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  233. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  234. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  235. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  236. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  237. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  238. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  239. package/.agent/skills/mobile-design/platform-android.md +0 -666
  240. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  241. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  242. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  243. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  244. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  245. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  246. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  247. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  248. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  249. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  250. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
@@ -1,232 +1,516 @@
1
1
  ---
2
2
  name: tailwind-patterns
3
- description: Tailwind CSS v4+ principles for extreme frontend engineering. CSS-first configuration, scroll-driven animations, logical properties, advanced container style queries, and `@property` Houdini patterns.
3
+ description: Tailwind CSS v4+ mastery. CSS-first configuration, @theme directive, container queries, scroll-driven animations, logical properties, clamp(), fluid typography, responsive design, dark mode, custom variants, component extraction, and performance optimization. Use when styling with Tailwind, building design systems, or optimizing CSS output.
4
4
  allowed-tools: Read, Write, Edit, Glob, Grep
5
- version: 1.0.0
6
- last-updated: 2026-03-12
5
+ version: 2.0.0
6
+ last-updated: 2026-04-01
7
7
  applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
8
  ---
9
9
 
10
- # Tailwind CSS v4+ Pro-Max Patterns
11
-
12
- > Tailwind is not inline styles. It is a highly-tuned, statically extracted token constraint system.
13
- > The moment you write arbitrary values everywhere (`w-[317px]`), you've lost the benefit. The moment you ignore CSS-first `@theme`, you are writing legacy code.
10
+ # Tailwind CSS v4+ โ€” CSS-First Mastery
14
11
 
15
12
  ---
16
13
 
17
- ## v4+ Key Paradigm: CSS-First & Generative
14
+ ## v4 Configuration (CSS-First)
18
15
 
19
- Tailwind CSS v4+ completely removes the need for `tailwind.config.js`. Everything is a native CSS variable controlled via `@theme`.
16
+ ### The @theme Directive
20
17
 
21
18
  ```css
22
- /* v4+: configure via CSS @theme */
19
+ /* app.css โ€” THE configuration file in Tailwind v4 */
23
20
  @import "tailwindcss";
24
21
 
25
22
  @theme {
26
- /* Generative Color Base via OKLCH */
27
- --hue-brand: 250;
28
-
29
- --color-brand-base: oklch(65% 0.25 var(--hue-brand));
30
- --color-brand-surface: oklch(15% 0.02 var(--hue-brand));
31
-
32
- /* Fluid Typography Native Setup */
33
- --font-sans: "Inter Variable", sans-serif;
34
- --text-fluid-body: clamp(1rem, 0.8rem + 1vw, 1.25rem);
35
-
36
- /* Logical Padding variables (RTL/LTR native) */
37
- --spacing-fluid-inline: clamp(1rem, 5vw, 3rem);
23
+ /* Colors */
24
+ --color-primary-50: oklch(0.97 0.02 250);
25
+ --color-primary-100: oklch(0.93 0.04 250);
26
+ --color-primary-500: oklch(0.55 0.18 250);
27
+ --color-primary-600: oklch(0.48 0.18 250);
28
+ --color-primary-700: oklch(0.40 0.16 250);
29
+ --color-primary-900: oklch(0.25 0.10 250);
30
+
31
+ --color-surface: oklch(0.99 0.00 0);
32
+ --color-surface-alt: oklch(0.96 0.00 0);
33
+ --color-text: oklch(0.15 0.00 0);
34
+ --color-text-muted: oklch(0.45 0.00 0);
35
+
36
+ /* Typography */
37
+ --font-sans: "Inter", "system-ui", sans-serif;
38
+ --font-mono: "JetBrains Mono", monospace;
39
+
40
+ /* Spacing (extends the default scale) */
41
+ --spacing-18: 4.5rem;
42
+ --spacing-88: 22rem;
43
+
44
+ /* Border radius */
45
+ --radius-pill: 9999px;
46
+ --radius-card: 1rem;
47
+
48
+ /* Shadows */
49
+ --shadow-card: 0 1px 3px oklch(0 0 0 / 0.08), 0 1px 2px oklch(0 0 0 / 0.06);
50
+ --shadow-elevated: 0 10px 25px oklch(0 0 0 / 0.1), 0 4px 10px oklch(0 0 0 / 0.05);
51
+
52
+ /* Animations */
53
+ --animate-fade-in: fade-in 0.3s ease-out;
54
+ --animate-slide-up: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
55
+ }
56
+
57
+ @keyframes fade-in {
58
+ from { opacity: 0; }
59
+ to { opacity: 1; }
60
+ }
61
+
62
+ @keyframes slide-up {
63
+ from { opacity: 0; transform: translateY(12px); }
64
+ to { opacity: 1; transform: translateY(0); }
38
65
  }
66
+
67
+ /* โŒ HALLUCINATION TRAP: Tailwind v4 does NOT use tailwind.config.js
68
+ โŒ module.exports = { theme: { extend: { ... } } } โ† REMOVED in v4
69
+ โœ… Use @theme { } directive in your CSS file
70
+ โœ… @import "tailwindcss" replaces the three @tailwind directives */
39
71
  ```
40
72
 
41
- ---
73
+ ### Dark Mode
42
74
 
43
- ## Bleeding-Edge Architectures
75
+ ```css
76
+ /* Tailwind v4 dark mode with @theme */
77
+ @theme {
78
+ --color-surface: oklch(0.99 0.00 0);
79
+ --color-text: oklch(0.15 0.00 0);
80
+ }
44
81
 
45
- ### 1. Logical Properties (Mandatory for i18n)
46
- Never use physical properties (`ml-4`, `pr-2`, `w-screen`) in modern web development. They break on Right-To-Left (RTL) languages or horizontal writing modes.
47
- - **Use `ms-4` (margin-start)** instead of `ml-4`.
48
- - **Use `px-4` / `pi-4` (padding-inline)** instead of explicit left/right.
49
- - **Use `dvw` / `dvh` (dynamic viewport)** instead of `vw` / `vh` to account for mobile browser UI shifts.
82
+ /* Dark variant โ€” override variables */
83
+ @variant dark {
84
+ @theme {
85
+ --color-surface: oklch(0.13 0.02 260);
86
+ --color-text: oklch(0.93 0.00 0);
87
+ }
88
+ }
50
89
 
51
- ### 2. Container Style Queries
52
- v4+ makes container queries (`@container`) first-class. A component should not care about the viewport; it only cares about where it is placed.
90
+ /* Usage in HTML: */
91
+ /* <div class="bg-surface text-text dark:bg-surface dark:text-text"> */
92
+ /* With the @variant dark override, classes "just work" in dark mode */
93
+ ```
53
94
 
54
95
  ```html
55
- <!-- Parent sets the query context -->
56
- <div class="@container">
57
- <!-- Child responds to parent size, not browser window size -->
58
- <div class="grid grid-cols-1 @md:grid-cols-2 @[800px]:grid-cols-3">
59
- ...
96
+ <!-- Dark mode toggle pattern -->
97
+ <html class="dark">
98
+ <body class="bg-surface text-text transition-colors duration-300">
99
+ <!-- Automatically uses dark @theme values -->
100
+ </body>
101
+ </html>
102
+ ```
103
+
104
+ ### Custom Variants
105
+
106
+ ```css
107
+ /* @variant โ€” custom selector-based variants */
108
+ @variant scrolled (&:where([data-scrolled]));
109
+ @variant hocus (&:hover, &:focus-visible);
110
+
111
+ /* Usage: */
112
+ /* <nav class="scrolled:shadow-elevated hocus:ring-2"> */
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Layout Patterns
118
+
119
+ ### Flexbox
120
+
121
+ ```html
122
+ <!-- Centered hero -->
123
+ <section class="flex min-h-svh flex-col items-center justify-center gap-6 px-6">
124
+ <h1 class="text-5xl font-bold tracking-tight">Hero Title</h1>
125
+ <p class="max-w-2xl text-center text-lg text-text-muted">Subtitle text</p>
126
+ <div class="flex gap-3">
127
+ <button class="rounded-pill bg-primary-600 px-6 py-3 text-white">Primary</button>
128
+ <button class="rounded-pill border border-primary-600 px-6 py-3 text-primary-600">Secondary</button>
60
129
  </div>
130
+ </section>
131
+
132
+ <!-- Sidebar layout -->
133
+ <div class="flex min-h-svh">
134
+ <aside class="w-64 shrink-0 border-r border-gray-200 p-4">Sidebar</aside>
135
+ <main class="flex-1 overflow-y-auto p-6">Content</main>
61
136
  </div>
137
+
138
+ <!-- โŒ HALLUCINATION TRAP: Use min-h-svh (small viewport height), NOT min-h-screen
139
+ min-h-screen = 100vh (broken on mobile โ€” includes browser chrome)
140
+ min-h-svh = 100svh (accounts for mobile browser chrome)
141
+ min-h-dvh = 100dvh (dynamic โ€” updates as chrome shows/hides) -->
62
142
  ```
63
143
 
64
- **Advanced Querying:** Container queries can now query *styles*, not just sizes.
65
- *(Always use `// VERIFY: CSS Style Queries browser support` if heavily relying on them).*
144
+ ### CSS Grid
66
145
 
67
- ### 3. Native Scroll-Driven Animations
68
- CSS `@scroll-timeline` natively hooks into scroll position without JS listeners. Integrate this directly into Tailwind workflows.
146
+ ```html
147
+ <!-- Auto-fit responsive grid (no breakpoints needed) -->
148
+ <div class="grid grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-6">
149
+ <div class="rounded-card bg-surface p-6 shadow-card">Card 1</div>
150
+ <div class="rounded-card bg-surface p-6 shadow-card">Card 2</div>
151
+ <div class="rounded-card bg-surface p-6 shadow-card">Card 3</div>
152
+ </div>
69
153
 
70
- ```css
71
- @layer utilities {
72
- .animate-on-scroll {
73
- animation: fade-in-up linear both;
74
- animation-timeline: view();
75
- animation-range: entry 10% cover 30%;
76
- }
77
- }
154
+ <!-- Dashboard grid with named areas -->
155
+ <div class="grid grid-cols-[240px_1fr] grid-rows-[64px_1fr] min-h-svh">
156
+ <header class="col-span-2 border-b">Header</header>
157
+ <aside class="border-r p-4">Sidebar</aside>
158
+ <main class="overflow-y-auto p-6">Content</main>
159
+ </div>
160
+
161
+ <!-- Bento grid -->
162
+ <div class="grid auto-rows-[180px] grid-cols-3 gap-4">
163
+ <div class="col-span-2 row-span-2 rounded-2xl bg-primary-100">Large</div>
164
+ <div class="rounded-2xl bg-surface-alt">Small 1</div>
165
+ <div class="rounded-2xl bg-surface-alt">Small 2</div>
166
+ <div class="col-span-3 rounded-2xl bg-primary-50">Full width</div>
167
+ </div>
168
+ ```
169
+
170
+ ### Container Queries
171
+
172
+ ```html
173
+ <!-- Container queries โ€” component-level responsiveness -->
174
+ <div class="@container">
175
+ <div class="flex flex-col gap-3 @sm:flex-row @sm:items-center @lg:gap-6">
176
+ <img class="size-16 rounded-full @sm:size-20" src="avatar.jpg" alt="">
177
+ <div>
178
+ <h3 class="text-lg font-semibold @lg:text-xl">User Name</h3>
179
+ <p class="text-sm text-text-muted @lg:text-base">Description</p>
180
+ </div>
181
+ </div>
182
+ </div>
183
+
184
+ <!-- Named container -->
185
+ <div class="@container/card">
186
+ <div class="@md/card:grid @md/card:grid-cols-2">
187
+ <!-- Responds to the card container's width, not viewport -->
188
+ </div>
189
+ </div>
190
+
191
+ <!-- โŒ HALLUCINATION TRAP: Container queries use @sm, @md, @lg (with @ prefix)
192
+ NOT sm:, md:, lg: โ€” those are VIEWPORT breakpoints
193
+ @sm = container >= 320px (component-level)
194
+ sm: = viewport >= 640px (page-level) -->
78
195
  ```
79
196
 
80
197
  ---
81
198
 
82
- ## Houdini `@property` Patterns
199
+ ## Typography
200
+
201
+ ### Fluid Typography with clamp()
202
+
203
+ ```html
204
+ <!-- Fluid heading โ€” scales smoothly from 2rem to 4rem -->
205
+ <h1 class="text-[clamp(2rem,5vw,4rem)] font-bold leading-tight tracking-tight">
206
+ Responsive Heading
207
+ </h1>
208
+
209
+ <!-- Fluid body text -->
210
+ <p class="text-[clamp(1rem,1.2vw,1.25rem)] leading-relaxed text-text-muted">
211
+ Body text that scales with viewport
212
+ </p>
213
+
214
+ <!-- Prose (for long-form content) -->
215
+ <article class="prose prose-lg mx-auto max-w-3xl dark:prose-invert">
216
+ <!-- @tailwindcss/typography plugin handles all typography -->
217
+ <h1>Article Title</h1>
218
+ <p>Paragraph with <a href="#">links</a> and <code>code</code>.</p>
219
+ </article>
220
+ ```
83
221
 
84
- To animate gradients or specific variable values, you must declare them explicitly in your main CSS to allow the browser to interplate them.
222
+ ### Font Loading
85
223
 
86
224
  ```css
87
- @property --angle {
88
- syntax: "<angle>";
89
- initial-value: 0deg;
90
- inherits: false;
225
+ /* @font-face in your CSS (Tailwind v4 approach) */
226
+ @font-face {
227
+ font-family: "Inter";
228
+ font-weight: 100 900;
229
+ font-display: swap;
230
+ src: url("/fonts/inter-variable.woff2") format("woff2");
91
231
  }
92
232
 
93
- @layer utilities {
94
- .animated-gradient-border {
95
- background: conic-gradient(from var(--angle), transparent, var(--color-brand-base));
96
- animation: rotate 3s linear infinite;
97
- }
233
+ @theme {
234
+ --font-sans: "Inter", system-ui, sans-serif;
98
235
  }
99
- @keyframes rotate { to { --angle: 360deg; } }
100
236
  ```
101
237
 
102
238
  ---
103
239
 
104
- ## Extreme Anti-Patterns
240
+ ## Component Patterns
105
241
 
106
- | Pattern | Problem | Fix |
107
- |---|---|---|
108
- | `[400px]` arbitrary values | Breaks the constraint system | Add to `@theme` and use the token |
109
- | `w-screen` / `h-screen` | Causes scrollbars / mobile jumps | Use `w-dvw` and `h-dvh` |
110
- | `!important` | Specificity arms race | Correct the layer ordering or CSS specificity |
111
- | String concatenation for classes | Tailwind purges them | Use `clsx` or `tailwind-merge` properly |
242
+ ### Button System
112
243
 
113
- ### Dynamic Class Pitfall & `tailwind-merge`
244
+ ```html
245
+ <!-- Base button with variants -->
246
+ <button class="inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
247
+ text-sm font-medium transition-all duration-150
248
+ focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500
249
+ active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50">
250
+ Button Text
251
+ </button>
252
+
253
+ <!-- Primary variant -->
254
+ <button class="... bg-primary-600 text-white shadow-sm hover:bg-primary-700">Primary</button>
255
+
256
+ <!-- Ghost variant -->
257
+ <button class="... text-text hover:bg-gray-100 dark:hover:bg-gray-800">Ghost</button>
258
+
259
+ <!-- Destructive variant -->
260
+ <button class="... bg-red-600 text-white hover:bg-red-700">Delete</button>
261
+
262
+ <!-- Icon button -->
263
+ <button class="grid size-10 place-items-center rounded-lg hover:bg-gray-100"
264
+ aria-label="Settings">
265
+ <svg class="size-5" ...></svg>
266
+ </button>
267
+ ```
114
268
 
115
- ```tsx
116
- // โŒ Tailwind cannot detect this โ€” will be purged
117
- const color = isDanger ? 'red' : 'green';
118
- <div class={`bg-${color}-500`}>
269
+ ### Input System
119
270
 
120
- // โœ… Use full class names
121
- const className = isDanger ? 'bg-red-500' : 'bg-green-500';
271
+ ```html
272
+ <!-- Text input -->
273
+ <div class="space-y-1.5">
274
+ <label for="email" class="text-sm font-medium text-text">Email</label>
275
+ <input id="email" type="email" placeholder="you@example.com"
276
+ class="w-full rounded-lg border border-gray-300 bg-surface px-3.5 py-2.5
277
+ text-sm text-text placeholder:text-text-muted
278
+ transition-colors duration-150
279
+ focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20
280
+ disabled:cursor-not-allowed disabled:bg-gray-50 disabled:opacity-60"
281
+ />
282
+ <p class="text-xs text-red-500">Error message here</p>
283
+ </div>
122
284
 
123
- // ๐Ÿš€ PRO-MAX LEVEL: Use tailwind-merge to prevent clash bugs
124
- import { twMerge } from 'tailwind-merge';
125
- export const Button = ({ className }) => (
126
- <button className={twMerge('px-4 py-2 bg-blue-500 rounded-md', className)}>
127
- Click
128
- </button>
129
- )
285
+ <!-- Checkbox -->
286
+ <label class="flex items-center gap-2.5 text-sm">
287
+ <input type="checkbox"
288
+ class="size-4 rounded border-gray-300 text-primary-600
289
+ focus:ring-2 focus:ring-primary-500/20" />
290
+ Remember me
291
+ </label>
130
292
  ```
131
293
 
132
- ---
294
+ ### Card Pattern
133
295
 
134
- ## True OLED Dark Mode via CSS
135
-
136
- Do not rely on Javascript to toggle simple dark modes if it can be avoided. Media queries prevent FOUC (Flash of Unstyled Content).
296
+ ```html
297
+ <div class="group overflow-hidden rounded-card bg-surface shadow-card
298
+ transition-shadow duration-200 hover:shadow-elevated">
299
+ <div class="aspect-video overflow-hidden bg-gray-100">
300
+ <img src="cover.jpg" alt="Cover"
301
+ class="size-full object-cover transition-transform duration-300
302
+ group-hover:scale-105" />
303
+ </div>
304
+ <div class="space-y-2 p-5">
305
+ <span class="inline-block rounded-full bg-primary-100 px-2.5 py-0.5
306
+ text-xs font-medium text-primary-700">Category</span>
307
+ <h3 class="text-lg font-semibold text-text line-clamp-2">Card Title</h3>
308
+ <p class="text-sm text-text-muted line-clamp-3">Description text...</p>
309
+ </div>
310
+ </div>
311
+ ```
137
312
 
138
- ```css
139
- /* v4 dark mode via CSS media query */
140
- @layer base {
141
- :root {
142
- --color-bg: oklch(98% 0.002 250);
143
- --color-text: oklch(15% 0.005 250);
144
- }
313
+ ### Modal / Dialog
145
314
 
146
- /* OLED optimization: True 0% lightness */
147
- @media (prefers-color-scheme: dark) {
148
- :root {
149
- --color-bg: oklch(0% 0 0);
150
- --color-text: oklch(95% 0.002 250);
151
- }
152
- }
153
- }
315
+ ```html
316
+ <!-- Backdrop -->
317
+ <div class="fixed inset-0 z-50 flex items-center justify-center bg-black/50
318
+ backdrop-blur-sm animate-fade-in">
319
+ <!-- Modal -->
320
+ <div class="w-full max-w-md rounded-2xl bg-surface p-6 shadow-elevated animate-slide-up"
321
+ role="dialog" aria-modal="true" aria-labelledby="modal-title">
322
+ <h2 id="modal-title" class="text-lg font-semibold">Dialog Title</h2>
323
+ <p class="mt-2 text-sm text-text-muted">Dialog description.</p>
324
+
325
+ <div class="mt-6 flex justify-end gap-3">
326
+ <button class="rounded-lg px-4 py-2 text-sm hover:bg-gray-100">Cancel</button>
327
+ <button class="rounded-lg bg-primary-600 px-4 py-2 text-sm text-white
328
+ hover:bg-primary-700">Confirm</button>
329
+ </div>
330
+ </div>
331
+ </div>
154
332
  ```
155
333
 
156
334
  ---
157
335
 
158
- ## UI Building Accuracy (MANDATORY)
159
- - **Mathematical Spacing:** Tailwind is a constraint system. You MUST use exact 4px grid steps (`p-4`, `gap-6`, `my-2`) to implement UI. Never guess spacing.
160
- - **Explicit Layouts:** Every container must have explicit layout boundaries (`flex items-center justify-between` or `grid cols-3 gap-4`).
161
- - **Boundaries:** Define constraints heavily (`w-full`, `max-w-screen-xl`, `overflow-hidden`).
336
+ ## Responsive Design Rules
162
337
 
163
- ## Performance Rules
164
- - **Layer Splitting:** `@layer components` and `@layer utilities` prevent specificity issues and allow Tailwind's engine to order CSS correctly.
165
- - **Do not install plugins without measuring:** Heavy plugins (like unpruned icon libraries) destroy CSS parsing times.
166
- - **Validate DOM Depth:** Tailwind encourages flat HTML. Avoid nested `<div class="flex">` chains that go 10 layers deep; rebuild with CSS Grid.
338
+ ```html
339
+ <!-- Tailwind breakpoints (mobile-first) -->
340
+ <!-- sm: 640px โ”‚ md: 768px โ”‚ lg: 1024px โ”‚ xl: 1280px โ”‚ 2xl: 1536px -->
167
341
 
168
- ---
342
+ <!-- Stack on mobile, row on tablet+ -->
343
+ <div class="flex flex-col gap-4 md:flex-row md:items-center">
344
+ <div class="md:w-1/2">Left</div>
345
+ <div class="md:w-1/2">Right</div>
346
+ </div>
169
347
 
170
- ## Output Format
348
+ <!-- Hide/show at breakpoints -->
349
+ <nav class="hidden lg:flex">Desktop nav</nav>
350
+ <button class="lg:hidden">โ˜ฐ Mobile menu</button>
171
351
 
172
- When this skill produces or reviews code, structure your output as follows:
352
+ <!-- Responsive padding -->
353
+ <section class="px-4 py-12 sm:px-6 lg:px-8 lg:py-24">
354
+ <div class="mx-auto max-w-7xl">Content</div>
355
+ </section>
173
356
 
357
+ <!-- Responsive grid -->
358
+ <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
359
+ <!-- Cards -->
360
+ </div>
174
361
  ```
175
- โ”โ”โ” Tailwind Patterns Report โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
176
- Skill: Tailwind Patterns
177
- Language: [detected language / framework]
178
- Scope: [N files ยท N functions]
179
- โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
180
- โœ… Passed: [checks that passed, or "All clean"]
181
- โš ๏ธ Warnings: [non-blocking issues, or "None"]
182
- โŒ Blocked: [blocking issues requiring fix, or "None"]
183
- โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
184
- VBC status: PENDING โ†’ VERIFIED
185
- Evidence: [test output / lint pass / compile success]
362
+
363
+ ---
364
+
365
+ ## Animations & Transitions
366
+
367
+ ### Transition Utilities
368
+
369
+ ```html
370
+ <!-- Smooth hover transitions -->
371
+ <a class="text-text-muted transition-colors duration-150 hover:text-primary-600">Link</a>
372
+
373
+ <!-- Transform transitions -->
374
+ <div class="transition-transform duration-300 hover:-translate-y-1 hover:scale-105">
375
+ Hover me
376
+ </div>
377
+
378
+ <!-- Combined transition -->
379
+ <button class="rounded-lg bg-primary-600 px-4 py-2 text-white
380
+ transition-all duration-200
381
+ hover:bg-primary-700 hover:shadow-lg
382
+ active:scale-95">
383
+ Click me
384
+ </button>
186
385
  ```
187
386
 
188
- **VBC (Verification-Before-Completion) is mandatory.**
189
- Do not mark status as VERIFIED until concrete terminal evidence is provided.
387
+ ### Custom Keyframe Animations
190
388
 
389
+ ```css
390
+ @theme {
391
+ --animate-bounce-in: bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
392
+ --animate-spin-slow: spin 3s linear infinite;
393
+ --animate-pulse-soft: pulse-soft 2s ease-in-out infinite;
394
+ }
191
395
 
396
+ @keyframes bounce-in {
397
+ 0% { opacity: 0; transform: scale(0.3); }
398
+ 50% { transform: scale(1.05); }
399
+ 70% { transform: scale(0.9); }
400
+ 100% { opacity: 1; transform: scale(1); }
401
+ }
192
402
 
193
- ---
403
+ @keyframes pulse-soft {
404
+ 0%, 100% { opacity: 1; }
405
+ 50% { opacity: 0.7; }
406
+ }
407
+ ```
194
408
 
195
- ## ๐Ÿค– LLM-Specific Traps
409
+ ### Scroll-Driven Animations (CSS Native)
196
410
 
197
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
411
+ ```css
412
+ /* Progress bar that fills as user scrolls */
413
+ .scroll-progress {
414
+ animation: grow-width linear;
415
+ animation-timeline: scroll();
416
+ }
417
+
418
+ @keyframes grow-width {
419
+ from { transform: scaleX(0); }
420
+ to { transform: scaleX(1); }
421
+ }
422
+ ```
198
423
 
199
- 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
200
- 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
201
- 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
202
- 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
203
- 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
424
+ ```html
425
+ <div class="scroll-progress fixed top-0 left-0 z-50 h-1 w-full origin-left bg-primary-600"></div>
426
+ ```
204
427
 
205
428
  ---
206
429
 
207
- ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
430
+ ## Performance
208
431
 
209
- **Slash command: `/review` or `/tribunal-full`**
210
- **Active reviewers: `logic-reviewer` ยท `security-auditor`**
432
+ ### Purging & Bundle Size
211
433
 
212
- ### โŒ Forbidden AI Tropes
434
+ ```css
435
+ /* Tailwind v4 automatically tree-shakes unused CSS at build time */
436
+ /* No manual purge configuration needed */
213
437
 
214
- 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
215
- 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
216
- 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
438
+ /* @source โ€” explicitly add content paths for scanning */
439
+ @source "../components/**/*.tsx";
440
+ @source "../pages/**/*.tsx";
217
441
 
218
- ### โœ… Pre-Flight Self-Audit
442
+ /* โŒ HALLUCINATION TRAP: Tailwind v4 does NOT use purge: [] config
443
+ โŒ purge: ['./src/**/*.{html,tsx}'] โ† REMOVED in v4
444
+ โœ… Uses automatic content detection based on your project structure
445
+ โœ… Use @source directive for custom paths */
446
+ ```
447
+
448
+ ### Avoiding Bloat
449
+
450
+ ```html
451
+ <!-- โœ… GOOD: Use component extraction for repeated patterns -->
452
+ <!-- Create a .btn class in CSS instead of repeating 15 utilities -->
219
453
 
220
- Review these questions before confirming output:
454
+ <!-- โŒ BAD: One-off arbitrary values everywhere -->
455
+ <div class="mt-[13px] mr-[7px] p-[11px] text-[15px]">
456
+ <!-- Every arbitrary value = unique CSS rule = bundle bloat -->
457
+ </div>
458
+
459
+ <!-- โœ… GOOD: Use your design scale -->
460
+ <div class="mt-3 mr-2 p-3 text-sm">
461
+ <!-- Maps to existing utilities = zero extra CSS -->
462
+ </div>
221
463
  ```
222
- โœ… Did I rely ONLY on real, verified tools and methods?
223
- โœ… Is this solution appropriately scoped to the user's constraints?
224
- โœ… Did I handle potential failure modes and edge cases?
225
- โœ… Have I avoided generic boilerplate that doesn't add value?
464
+
465
+ ### Component Extraction (When to @apply)
466
+
467
+ ```css
468
+ /* Use @apply ONLY for highly reused component patterns */
469
+ /* Do NOT @apply everything โ€” it defeats Tailwind's purpose */
470
+
471
+ .btn {
472
+ @apply inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
473
+ text-sm font-medium transition-all duration-150
474
+ focus-visible:outline-2 focus-visible:outline-offset-2
475
+ active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50;
476
+ }
477
+
478
+ .btn-primary {
479
+ @apply btn bg-primary-600 text-white shadow-sm hover:bg-primary-700
480
+ focus-visible:outline-primary-500;
481
+ }
482
+
483
+ /* โŒ HALLUCINATION TRAP: @apply is for component patterns shared across files
484
+ If a pattern appears in only 1-2 places, just use inline utilities
485
+ Over-extracting with @apply = recreating regular CSS with extra steps */
226
486
  ```
227
487
 
228
- ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
488
+ ---
229
489
 
230
- **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
231
- - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
232
- - โœ… **Required:** You are explicitly forbidden from finalizing any task without providing **concrete evidence** (terminal output, passing tests, compile success, or equivalent proof) that your output works as intended.
490
+ ## Accessibility with Tailwind
491
+
492
+ ```html
493
+ <!-- Focus visible (keyboard only, not mouse click) -->
494
+ <a class="rounded-lg focus-visible:outline-2 focus-visible:outline-primary-500
495
+ focus-visible:outline-offset-2">
496
+ Keyboard accessible link
497
+ </a>
498
+
499
+ <!-- Screen reader only text -->
500
+ <button>
501
+ <svg class="size-5" aria-hidden="true"></svg>
502
+ <span class="sr-only">Close menu</span>
503
+ </button>
504
+
505
+ <!-- Motion-safe / motion-reduce -->
506
+ <div class="motion-safe:animate-bounce-in motion-reduce:animate-none">
507
+ <!-- Only animates if user hasn't enabled "reduce motion" -->
508
+ </div>
509
+
510
+ <!-- Forced colors mode (high contrast) -->
511
+ <button class="bg-primary-600 forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]">
512
+ Accessible button
513
+ </button>
514
+ ```
515
+
516
+ ---