tribunal-kit 2.4.6 → 3.0.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 (142) hide show
  1. package/.agent/agents/accessibility-reviewer.md +220 -134
  2. package/.agent/agents/ai-code-reviewer.md +233 -129
  3. package/.agent/agents/backend-specialist.md +238 -178
  4. package/.agent/agents/code-archaeologist.md +181 -119
  5. package/.agent/agents/database-architect.md +207 -164
  6. package/.agent/agents/debugger.md +218 -151
  7. package/.agent/agents/dependency-reviewer.md +136 -55
  8. package/.agent/agents/devops-engineer.md +238 -175
  9. package/.agent/agents/documentation-writer.md +221 -137
  10. package/.agent/agents/explorer-agent.md +180 -142
  11. package/.agent/agents/frontend-reviewer.md +194 -80
  12. package/.agent/agents/frontend-specialist.md +237 -188
  13. package/.agent/agents/game-developer.md +52 -184
  14. package/.agent/agents/logic-reviewer.md +149 -78
  15. package/.agent/agents/mobile-developer.md +223 -152
  16. package/.agent/agents/mobile-reviewer.md +195 -79
  17. package/.agent/agents/orchestrator.md +211 -170
  18. package/.agent/agents/penetration-tester.md +174 -131
  19. package/.agent/agents/performance-optimizer.md +203 -139
  20. package/.agent/agents/performance-reviewer.md +211 -108
  21. package/.agent/agents/product-manager.md +162 -108
  22. package/.agent/agents/project-planner.md +162 -142
  23. package/.agent/agents/qa-automation-engineer.md +242 -138
  24. package/.agent/agents/security-auditor.md +194 -170
  25. package/.agent/agents/seo-specialist.md +213 -132
  26. package/.agent/agents/sql-reviewer.md +194 -73
  27. package/.agent/agents/supervisor-agent.md +203 -156
  28. package/.agent/agents/test-coverage-reviewer.md +193 -81
  29. package/.agent/agents/type-safety-reviewer.md +208 -65
  30. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  31. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  32. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  33. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  34. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  35. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  36. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  37. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  38. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  39. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  40. package/.agent/skills/agent-organizer/SKILL.md +126 -132
  41. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +155 -66
  42. package/.agent/skills/api-patterns/SKILL.md +289 -257
  43. package/.agent/skills/api-security-auditor/SKILL.md +172 -70
  44. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
  45. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
  46. package/.agent/skills/appflow-wireframe/SKILL.md +107 -100
  47. package/.agent/skills/architecture/SKILL.md +331 -200
  48. package/.agent/skills/authentication-best-practices/SKILL.md +168 -67
  49. package/.agent/skills/bash-linux/SKILL.md +154 -215
  50. package/.agent/skills/brainstorming/SKILL.md +104 -210
  51. package/.agent/skills/building-native-ui/SKILL.md +169 -70
  52. package/.agent/skills/clean-code/SKILL.md +360 -206
  53. package/.agent/skills/config-validator/SKILL.md +141 -165
  54. package/.agent/skills/csharp-developer/SKILL.md +528 -107
  55. package/.agent/skills/database-design/SKILL.md +455 -275
  56. package/.agent/skills/deployment-procedures/SKILL.md +145 -188
  57. package/.agent/skills/devops-engineer/SKILL.md +332 -134
  58. package/.agent/skills/devops-incident-responder/SKILL.md +113 -98
  59. package/.agent/skills/edge-computing/SKILL.md +157 -213
  60. package/.agent/skills/extract-design-system/SKILL.md +129 -69
  61. package/.agent/skills/framer-motion-expert/SKILL.md +939 -0
  62. package/.agent/skills/game-design-expert/SKILL.md +105 -0
  63. package/.agent/skills/game-engineering-expert/SKILL.md +122 -0
  64. package/.agent/skills/geo-fundamentals/SKILL.md +124 -215
  65. package/.agent/skills/github-operations/SKILL.md +314 -354
  66. package/.agent/skills/gsap-expert/SKILL.md +901 -0
  67. package/.agent/skills/i18n-localization/SKILL.md +138 -216
  68. package/.agent/skills/intelligent-routing/SKILL.md +127 -139
  69. package/.agent/skills/llm-engineering/SKILL.md +357 -258
  70. package/.agent/skills/local-first/SKILL.md +154 -203
  71. package/.agent/skills/mcp-builder/SKILL.md +118 -224
  72. package/.agent/skills/nextjs-react-expert/SKILL.md +783 -203
  73. package/.agent/skills/nodejs-best-practices/SKILL.md +559 -280
  74. package/.agent/skills/observability/SKILL.md +330 -285
  75. package/.agent/skills/parallel-agents/SKILL.md +122 -181
  76. package/.agent/skills/performance-profiling/SKILL.md +254 -197
  77. package/.agent/skills/plan-writing/SKILL.md +118 -188
  78. package/.agent/skills/platform-engineer/SKILL.md +123 -135
  79. package/.agent/skills/playwright-best-practices/SKILL.md +157 -76
  80. package/.agent/skills/powershell-windows/SKILL.md +146 -230
  81. package/.agent/skills/python-pro/SKILL.md +879 -114
  82. package/.agent/skills/react-specialist/SKILL.md +931 -108
  83. package/.agent/skills/realtime-patterns/SKILL.md +304 -296
  84. package/.agent/skills/rust-pro/SKILL.md +701 -240
  85. package/.agent/skills/seo-fundamentals/SKILL.md +154 -181
  86. package/.agent/skills/server-management/SKILL.md +190 -212
  87. package/.agent/skills/shadcn-ui-expert/SKILL.md +201 -68
  88. package/.agent/skills/sql-pro/SKILL.md +633 -104
  89. package/.agent/skills/swiftui-expert/SKILL.md +171 -70
  90. package/.agent/skills/systematic-debugging/SKILL.md +118 -186
  91. package/.agent/skills/tailwind-patterns/SKILL.md +576 -232
  92. package/.agent/skills/tdd-workflow/SKILL.md +137 -209
  93. package/.agent/skills/testing-patterns/SKILL.md +573 -205
  94. package/.agent/skills/vue-expert/SKILL.md +964 -119
  95. package/.agent/skills/vulnerability-scanner/SKILL.md +269 -316
  96. package/.agent/skills/web-accessibility-auditor/SKILL.md +188 -71
  97. package/.agent/skills/webapp-testing/SKILL.md +145 -236
  98. package/.agent/workflows/api-tester.md +151 -279
  99. package/.agent/workflows/audit.md +138 -168
  100. package/.agent/workflows/brainstorm.md +110 -146
  101. package/.agent/workflows/changelog.md +112 -144
  102. package/.agent/workflows/create.md +124 -139
  103. package/.agent/workflows/debug.md +189 -196
  104. package/.agent/workflows/deploy.md +189 -153
  105. package/.agent/workflows/enhance.md +151 -139
  106. package/.agent/workflows/fix.md +135 -143
  107. package/.agent/workflows/generate.md +157 -164
  108. package/.agent/workflows/migrate.md +160 -163
  109. package/.agent/workflows/orchestrate.md +168 -151
  110. package/.agent/workflows/performance-benchmarker.md +123 -305
  111. package/.agent/workflows/plan.md +173 -151
  112. package/.agent/workflows/preview.md +80 -137
  113. package/.agent/workflows/refactor.md +183 -153
  114. package/.agent/workflows/review-ai.md +129 -140
  115. package/.agent/workflows/review.md +116 -155
  116. package/.agent/workflows/session.md +94 -154
  117. package/.agent/workflows/status.md +79 -125
  118. package/.agent/workflows/strengthen-skills.md +139 -99
  119. package/.agent/workflows/swarm.md +179 -194
  120. package/.agent/workflows/test.md +211 -166
  121. package/.agent/workflows/tribunal-backend.md +113 -111
  122. package/.agent/workflows/tribunal-database.md +115 -132
  123. package/.agent/workflows/tribunal-frontend.md +118 -115
  124. package/.agent/workflows/tribunal-full.md +133 -136
  125. package/.agent/workflows/tribunal-mobile.md +119 -123
  126. package/.agent/workflows/tribunal-performance.md +133 -152
  127. package/.agent/workflows/ui-ux-pro-max.md +143 -171
  128. package/README.md +11 -15
  129. package/package.json +1 -1
  130. package/.agent/skills/dotnet-core-expert/SKILL.md +0 -103
  131. package/.agent/skills/framer-motion-animations/SKILL.md +0 -74
  132. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  133. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  134. package/.agent/skills/game-development/SKILL.md +0 -236
  135. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  136. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  137. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  138. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  139. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  140. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  141. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  142. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
@@ -1,232 +1,576 @@
1
- ---
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.
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- version: 1.0.0
6
- last-updated: 2026-03-12
7
- applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
- ---
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.
14
-
15
- ---
16
-
17
- ## v4+ Key Paradigm: CSS-First & Generative
18
-
19
- Tailwind CSS v4+ completely removes the need for `tailwind.config.js`. Everything is a native CSS variable controlled via `@theme`.
20
-
21
- ```css
22
- /* v4+: configure via CSS @theme */
23
- @import "tailwindcss";
24
-
25
- @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);
38
- }
39
- ```
40
-
41
- ---
42
-
43
- ## Bleeding-Edge Architectures
44
-
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.
50
-
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.
53
-
54
- ```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
- ...
60
- </div>
61
- </div>
62
- ```
63
-
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).*
66
-
67
- ### 3. Native Scroll-Driven Animations
68
- CSS `@scroll-timeline` natively hooks into scroll position without JS listeners. Integrate this directly into Tailwind workflows.
69
-
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
- }
78
- ```
79
-
80
- ---
81
-
82
- ## Houdini `@property` Patterns
83
-
84
- To animate gradients or specific variable values, you must declare them explicitly in your main CSS to allow the browser to interplate them.
85
-
86
- ```css
87
- @property --angle {
88
- syntax: "<angle>";
89
- initial-value: 0deg;
90
- inherits: false;
91
- }
92
-
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
- }
98
- }
99
- @keyframes rotate { to { --angle: 360deg; } }
100
- ```
101
-
102
- ---
103
-
104
- ## Extreme Anti-Patterns
105
-
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 |
112
-
113
- ### Dynamic Class Pitfall & `tailwind-merge`
114
-
115
- ```tsx
116
- // ❌ Tailwind cannot detect this — will be purged
117
- const color = isDanger ? 'red' : 'green';
118
- <div class={`bg-${color}-500`}>
119
-
120
- // Use full class names
121
- const className = isDanger ? 'bg-red-500' : 'bg-green-500';
122
-
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
- )
130
- ```
131
-
132
- ---
133
-
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).
137
-
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
- }
145
-
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
- }
154
- ```
155
-
156
- ---
157
-
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`).
162
-
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.
167
-
168
- ---
169
-
170
- ## Output Format
171
-
172
- When this skill produces or reviews code, structure your output as follows:
173
-
174
- ```
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]
186
- ```
187
-
188
- **VBC (Verification-Before-Completion) is mandatory.**
189
- Do not mark status as VERIFIED until concrete terminal evidence is provided.
190
-
191
-
192
-
193
- ---
194
-
195
- ## 🤖 LLM-Specific Traps
196
-
197
- AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
198
-
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.
204
-
205
- ---
206
-
207
- ## 🏛️ Tribunal Integration (Anti-Hallucination)
208
-
209
- **Slash command: `/review` or `/tribunal-full`**
210
- **Active reviewers: `logic-reviewer` · `security-auditor`**
211
-
212
- ### Forbidden AI Tropes
213
-
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.
217
-
218
- ### Pre-Flight Self-Audit
219
-
220
- Review these questions before confirming output:
221
- ```
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?
226
- ```
227
-
228
- ### 🛑 Verification-Before-Completion (VBC) Protocol
229
-
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.
1
+ ---
2
+ name: tailwind-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
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ version: 2.0.0
6
+ last-updated: 2026-04-01
7
+ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
8
+ ---
9
+
10
+ # Tailwind CSS v4+ — CSS-First Mastery
11
+
12
+ > Tailwind v4 is a ground-up rewrite. The config file is gone. JavaScript is gone.
13
+ > Everything is CSS-first. If you're still writing `tailwind.config.js`, you're writing legacy.
14
+
15
+ ---
16
+
17
+ ## v4 Configuration (CSS-First)
18
+
19
+ ### The @theme Directive
20
+
21
+ ```css
22
+ /* app.css THE configuration file in Tailwind v4 */
23
+ @import "tailwindcss";
24
+
25
+ @theme {
26
+ /* Colors */
27
+ --color-primary-50: oklch(0.97 0.02 250);
28
+ --color-primary-100: oklch(0.93 0.04 250);
29
+ --color-primary-500: oklch(0.55 0.18 250);
30
+ --color-primary-600: oklch(0.48 0.18 250);
31
+ --color-primary-700: oklch(0.40 0.16 250);
32
+ --color-primary-900: oklch(0.25 0.10 250);
33
+
34
+ --color-surface: oklch(0.99 0.00 0);
35
+ --color-surface-alt: oklch(0.96 0.00 0);
36
+ --color-text: oklch(0.15 0.00 0);
37
+ --color-text-muted: oklch(0.45 0.00 0);
38
+
39
+ /* Typography */
40
+ --font-sans: "Inter", "system-ui", sans-serif;
41
+ --font-mono: "JetBrains Mono", monospace;
42
+
43
+ /* Spacing (extends the default scale) */
44
+ --spacing-18: 4.5rem;
45
+ --spacing-88: 22rem;
46
+
47
+ /* Border radius */
48
+ --radius-pill: 9999px;
49
+ --radius-card: 1rem;
50
+
51
+ /* Shadows */
52
+ --shadow-card: 0 1px 3px oklch(0 0 0 / 0.08), 0 1px 2px oklch(0 0 0 / 0.06);
53
+ --shadow-elevated: 0 10px 25px oklch(0 0 0 / 0.1), 0 4px 10px oklch(0 0 0 / 0.05);
54
+
55
+ /* Animations */
56
+ --animate-fade-in: fade-in 0.3s ease-out;
57
+ --animate-slide-up: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
58
+ }
59
+
60
+ @keyframes fade-in {
61
+ from { opacity: 0; }
62
+ to { opacity: 1; }
63
+ }
64
+
65
+ @keyframes slide-up {
66
+ from { opacity: 0; transform: translateY(12px); }
67
+ to { opacity: 1; transform: translateY(0); }
68
+ }
69
+
70
+ /* ❌ HALLUCINATION TRAP: Tailwind v4 does NOT use tailwind.config.js
71
+ module.exports = { theme: { extend: { ... } } } ← REMOVED in v4
72
+ Use @theme { } directive in your CSS file
73
+ @import "tailwindcss" replaces the three @tailwind directives */
74
+ ```
75
+
76
+ ### Dark Mode
77
+
78
+ ```css
79
+ /* Tailwind v4 dark mode with @theme */
80
+ @theme {
81
+ --color-surface: oklch(0.99 0.00 0);
82
+ --color-text: oklch(0.15 0.00 0);
83
+ }
84
+
85
+ /* Dark variant — override variables */
86
+ @variant dark {
87
+ @theme {
88
+ --color-surface: oklch(0.13 0.02 260);
89
+ --color-text: oklch(0.93 0.00 0);
90
+ }
91
+ }
92
+
93
+ /* Usage in HTML: */
94
+ /* <div class="bg-surface text-text dark:bg-surface dark:text-text"> */
95
+ /* With the @variant dark override, classes "just work" in dark mode */
96
+ ```
97
+
98
+ ```html
99
+ <!-- Dark mode toggle pattern -->
100
+ <html class="dark">
101
+ <body class="bg-surface text-text transition-colors duration-300">
102
+ <!-- Automatically uses dark @theme values -->
103
+ </body>
104
+ </html>
105
+ ```
106
+
107
+ ### Custom Variants
108
+
109
+ ```css
110
+ /* @variant custom selector-based variants */
111
+ @variant scrolled (&:where([data-scrolled]));
112
+ @variant hocus (&:hover, &:focus-visible);
113
+
114
+ /* Usage: */
115
+ /* <nav class="scrolled:shadow-elevated hocus:ring-2"> */
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Layout Patterns
121
+
122
+ ### Flexbox
123
+
124
+ ```html
125
+ <!-- Centered hero -->
126
+ <section class="flex min-h-svh flex-col items-center justify-center gap-6 px-6">
127
+ <h1 class="text-5xl font-bold tracking-tight">Hero Title</h1>
128
+ <p class="max-w-2xl text-center text-lg text-text-muted">Subtitle text</p>
129
+ <div class="flex gap-3">
130
+ <button class="rounded-pill bg-primary-600 px-6 py-3 text-white">Primary</button>
131
+ <button class="rounded-pill border border-primary-600 px-6 py-3 text-primary-600">Secondary</button>
132
+ </div>
133
+ </section>
134
+
135
+ <!-- Sidebar layout -->
136
+ <div class="flex min-h-svh">
137
+ <aside class="w-64 shrink-0 border-r border-gray-200 p-4">Sidebar</aside>
138
+ <main class="flex-1 overflow-y-auto p-6">Content</main>
139
+ </div>
140
+
141
+ <!-- ❌ HALLUCINATION TRAP: Use min-h-svh (small viewport height), NOT min-h-screen
142
+ min-h-screen = 100vh (broken on mobile — includes browser chrome)
143
+ min-h-svh = 100svh (accounts for mobile browser chrome)
144
+ min-h-dvh = 100dvh (dynamic — updates as chrome shows/hides) -->
145
+ ```
146
+
147
+ ### CSS Grid
148
+
149
+ ```html
150
+ <!-- Auto-fit responsive grid (no breakpoints needed) -->
151
+ <div class="grid grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-6">
152
+ <div class="rounded-card bg-surface p-6 shadow-card">Card 1</div>
153
+ <div class="rounded-card bg-surface p-6 shadow-card">Card 2</div>
154
+ <div class="rounded-card bg-surface p-6 shadow-card">Card 3</div>
155
+ </div>
156
+
157
+ <!-- Dashboard grid with named areas -->
158
+ <div class="grid grid-cols-[240px_1fr] grid-rows-[64px_1fr] min-h-svh">
159
+ <header class="col-span-2 border-b">Header</header>
160
+ <aside class="border-r p-4">Sidebar</aside>
161
+ <main class="overflow-y-auto p-6">Content</main>
162
+ </div>
163
+
164
+ <!-- Bento grid -->
165
+ <div class="grid auto-rows-[180px] grid-cols-3 gap-4">
166
+ <div class="col-span-2 row-span-2 rounded-2xl bg-primary-100">Large</div>
167
+ <div class="rounded-2xl bg-surface-alt">Small 1</div>
168
+ <div class="rounded-2xl bg-surface-alt">Small 2</div>
169
+ <div class="col-span-3 rounded-2xl bg-primary-50">Full width</div>
170
+ </div>
171
+ ```
172
+
173
+ ### Container Queries
174
+
175
+ ```html
176
+ <!-- Container queries — component-level responsiveness -->
177
+ <div class="@container">
178
+ <div class="flex flex-col gap-3 @sm:flex-row @sm:items-center @lg:gap-6">
179
+ <img class="size-16 rounded-full @sm:size-20" src="avatar.jpg" alt="">
180
+ <div>
181
+ <h3 class="text-lg font-semibold @lg:text-xl">User Name</h3>
182
+ <p class="text-sm text-text-muted @lg:text-base">Description</p>
183
+ </div>
184
+ </div>
185
+ </div>
186
+
187
+ <!-- Named container -->
188
+ <div class="@container/card">
189
+ <div class="@md/card:grid @md/card:grid-cols-2">
190
+ <!-- Responds to the card container's width, not viewport -->
191
+ </div>
192
+ </div>
193
+
194
+ <!-- ❌ HALLUCINATION TRAP: Container queries use @sm, @md, @lg (with @ prefix)
195
+ NOT sm:, md:, lg: — those are VIEWPORT breakpoints
196
+ @sm = container >= 320px (component-level)
197
+ sm: = viewport >= 640px (page-level) -->
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Typography
203
+
204
+ ### Fluid Typography with clamp()
205
+
206
+ ```html
207
+ <!-- Fluid heading scales smoothly from 2rem to 4rem -->
208
+ <h1 class="text-[clamp(2rem,5vw,4rem)] font-bold leading-tight tracking-tight">
209
+ Responsive Heading
210
+ </h1>
211
+
212
+ <!-- Fluid body text -->
213
+ <p class="text-[clamp(1rem,1.2vw,1.25rem)] leading-relaxed text-text-muted">
214
+ Body text that scales with viewport
215
+ </p>
216
+
217
+ <!-- Prose (for long-form content) -->
218
+ <article class="prose prose-lg mx-auto max-w-3xl dark:prose-invert">
219
+ <!-- @tailwindcss/typography plugin handles all typography -->
220
+ <h1>Article Title</h1>
221
+ <p>Paragraph with <a href="#">links</a> and <code>code</code>.</p>
222
+ </article>
223
+ ```
224
+
225
+ ### Font Loading
226
+
227
+ ```css
228
+ /* @font-face in your CSS (Tailwind v4 approach) */
229
+ @font-face {
230
+ font-family: "Inter";
231
+ font-weight: 100 900;
232
+ font-display: swap;
233
+ src: url("/fonts/inter-variable.woff2") format("woff2");
234
+ }
235
+
236
+ @theme {
237
+ --font-sans: "Inter", system-ui, sans-serif;
238
+ }
239
+ ```
240
+
241
+ ---
242
+
243
+ ## Component Patterns
244
+
245
+ ### Button System
246
+
247
+ ```html
248
+ <!-- Base button with variants -->
249
+ <button class="inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
250
+ text-sm font-medium transition-all duration-150
251
+ focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500
252
+ active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50">
253
+ Button Text
254
+ </button>
255
+
256
+ <!-- Primary variant -->
257
+ <button class="... bg-primary-600 text-white shadow-sm hover:bg-primary-700">Primary</button>
258
+
259
+ <!-- Ghost variant -->
260
+ <button class="... text-text hover:bg-gray-100 dark:hover:bg-gray-800">Ghost</button>
261
+
262
+ <!-- Destructive variant -->
263
+ <button class="... bg-red-600 text-white hover:bg-red-700">Delete</button>
264
+
265
+ <!-- Icon button -->
266
+ <button class="grid size-10 place-items-center rounded-lg hover:bg-gray-100"
267
+ aria-label="Settings">
268
+ <svg class="size-5" ...></svg>
269
+ </button>
270
+ ```
271
+
272
+ ### Input System
273
+
274
+ ```html
275
+ <!-- Text input -->
276
+ <div class="space-y-1.5">
277
+ <label for="email" class="text-sm font-medium text-text">Email</label>
278
+ <input id="email" type="email" placeholder="you@example.com"
279
+ class="w-full rounded-lg border border-gray-300 bg-surface px-3.5 py-2.5
280
+ text-sm text-text placeholder:text-text-muted
281
+ transition-colors duration-150
282
+ focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-500/20
283
+ disabled:cursor-not-allowed disabled:bg-gray-50 disabled:opacity-60"
284
+ />
285
+ <p class="text-xs text-red-500">Error message here</p>
286
+ </div>
287
+
288
+ <!-- Checkbox -->
289
+ <label class="flex items-center gap-2.5 text-sm">
290
+ <input type="checkbox"
291
+ class="size-4 rounded border-gray-300 text-primary-600
292
+ focus:ring-2 focus:ring-primary-500/20" />
293
+ Remember me
294
+ </label>
295
+ ```
296
+
297
+ ### Card Pattern
298
+
299
+ ```html
300
+ <div class="group overflow-hidden rounded-card bg-surface shadow-card
301
+ transition-shadow duration-200 hover:shadow-elevated">
302
+ <div class="aspect-video overflow-hidden bg-gray-100">
303
+ <img src="cover.jpg" alt="Cover"
304
+ class="size-full object-cover transition-transform duration-300
305
+ group-hover:scale-105" />
306
+ </div>
307
+ <div class="space-y-2 p-5">
308
+ <span class="inline-block rounded-full bg-primary-100 px-2.5 py-0.5
309
+ text-xs font-medium text-primary-700">Category</span>
310
+ <h3 class="text-lg font-semibold text-text line-clamp-2">Card Title</h3>
311
+ <p class="text-sm text-text-muted line-clamp-3">Description text...</p>
312
+ </div>
313
+ </div>
314
+ ```
315
+
316
+ ### Modal / Dialog
317
+
318
+ ```html
319
+ <!-- Backdrop -->
320
+ <div class="fixed inset-0 z-50 flex items-center justify-center bg-black/50
321
+ backdrop-blur-sm animate-fade-in">
322
+ <!-- Modal -->
323
+ <div class="w-full max-w-md rounded-2xl bg-surface p-6 shadow-elevated animate-slide-up"
324
+ role="dialog" aria-modal="true" aria-labelledby="modal-title">
325
+ <h2 id="modal-title" class="text-lg font-semibold">Dialog Title</h2>
326
+ <p class="mt-2 text-sm text-text-muted">Dialog description.</p>
327
+
328
+ <div class="mt-6 flex justify-end gap-3">
329
+ <button class="rounded-lg px-4 py-2 text-sm hover:bg-gray-100">Cancel</button>
330
+ <button class="rounded-lg bg-primary-600 px-4 py-2 text-sm text-white
331
+ hover:bg-primary-700">Confirm</button>
332
+ </div>
333
+ </div>
334
+ </div>
335
+ ```
336
+
337
+ ---
338
+
339
+ ## Responsive Design Rules
340
+
341
+ ```html
342
+ <!-- Tailwind breakpoints (mobile-first) -->
343
+ <!-- sm: 640px │ md: 768px │ lg: 1024px │ xl: 1280px │ 2xl: 1536px -->
344
+
345
+ <!-- Stack on mobile, row on tablet+ -->
346
+ <div class="flex flex-col gap-4 md:flex-row md:items-center">
347
+ <div class="md:w-1/2">Left</div>
348
+ <div class="md:w-1/2">Right</div>
349
+ </div>
350
+
351
+ <!-- Hide/show at breakpoints -->
352
+ <nav class="hidden lg:flex">Desktop nav</nav>
353
+ <button class="lg:hidden">☰ Mobile menu</button>
354
+
355
+ <!-- Responsive padding -->
356
+ <section class="px-4 py-12 sm:px-6 lg:px-8 lg:py-24">
357
+ <div class="mx-auto max-w-7xl">Content</div>
358
+ </section>
359
+
360
+ <!-- Responsive grid -->
361
+ <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
362
+ <!-- Cards -->
363
+ </div>
364
+ ```
365
+
366
+ ---
367
+
368
+ ## Animations & Transitions
369
+
370
+ ### Transition Utilities
371
+
372
+ ```html
373
+ <!-- Smooth hover transitions -->
374
+ <a class="text-text-muted transition-colors duration-150 hover:text-primary-600">Link</a>
375
+
376
+ <!-- Transform transitions -->
377
+ <div class="transition-transform duration-300 hover:-translate-y-1 hover:scale-105">
378
+ Hover me
379
+ </div>
380
+
381
+ <!-- Combined transition -->
382
+ <button class="rounded-lg bg-primary-600 px-4 py-2 text-white
383
+ transition-all duration-200
384
+ hover:bg-primary-700 hover:shadow-lg
385
+ active:scale-95">
386
+ Click me
387
+ </button>
388
+ ```
389
+
390
+ ### Custom Keyframe Animations
391
+
392
+ ```css
393
+ @theme {
394
+ --animate-bounce-in: bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
395
+ --animate-spin-slow: spin 3s linear infinite;
396
+ --animate-pulse-soft: pulse-soft 2s ease-in-out infinite;
397
+ }
398
+
399
+ @keyframes bounce-in {
400
+ 0% { opacity: 0; transform: scale(0.3); }
401
+ 50% { transform: scale(1.05); }
402
+ 70% { transform: scale(0.9); }
403
+ 100% { opacity: 1; transform: scale(1); }
404
+ }
405
+
406
+ @keyframes pulse-soft {
407
+ 0%, 100% { opacity: 1; }
408
+ 50% { opacity: 0.7; }
409
+ }
410
+ ```
411
+
412
+ ### Scroll-Driven Animations (CSS Native)
413
+
414
+ ```css
415
+ /* Progress bar that fills as user scrolls */
416
+ .scroll-progress {
417
+ animation: grow-width linear;
418
+ animation-timeline: scroll();
419
+ }
420
+
421
+ @keyframes grow-width {
422
+ from { transform: scaleX(0); }
423
+ to { transform: scaleX(1); }
424
+ }
425
+ ```
426
+
427
+ ```html
428
+ <div class="scroll-progress fixed top-0 left-0 z-50 h-1 w-full origin-left bg-primary-600"></div>
429
+ ```
430
+
431
+ ---
432
+
433
+ ## Performance
434
+
435
+ ### Purging & Bundle Size
436
+
437
+ ```css
438
+ /* Tailwind v4 automatically tree-shakes unused CSS at build time */
439
+ /* No manual purge configuration needed */
440
+
441
+ /* @source — explicitly add content paths for scanning */
442
+ @source "../components/**/*.tsx";
443
+ @source "../pages/**/*.tsx";
444
+
445
+ /* ❌ HALLUCINATION TRAP: Tailwind v4 does NOT use purge: [] config
446
+ ❌ purge: ['./src/**/*.{html,tsx}'] ← REMOVED in v4
447
+ ✅ Uses automatic content detection based on your project structure
448
+ ✅ Use @source directive for custom paths */
449
+ ```
450
+
451
+ ### Avoiding Bloat
452
+
453
+ ```html
454
+ <!-- ✅ GOOD: Use component extraction for repeated patterns -->
455
+ <!-- Create a .btn class in CSS instead of repeating 15 utilities -->
456
+
457
+ <!-- ❌ BAD: One-off arbitrary values everywhere -->
458
+ <div class="mt-[13px] mr-[7px] p-[11px] text-[15px]">
459
+ <!-- Every arbitrary value = unique CSS rule = bundle bloat -->
460
+ </div>
461
+
462
+ <!-- ✅ GOOD: Use your design scale -->
463
+ <div class="mt-3 mr-2 p-3 text-sm">
464
+ <!-- Maps to existing utilities = zero extra CSS -->
465
+ </div>
466
+ ```
467
+
468
+ ### Component Extraction (When to @apply)
469
+
470
+ ```css
471
+ /* Use @apply ONLY for highly reused component patterns */
472
+ /* Do NOT @apply everything — it defeats Tailwind's purpose */
473
+
474
+ .btn {
475
+ @apply inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
476
+ text-sm font-medium transition-all duration-150
477
+ focus-visible:outline-2 focus-visible:outline-offset-2
478
+ active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50;
479
+ }
480
+
481
+ .btn-primary {
482
+ @apply btn bg-primary-600 text-white shadow-sm hover:bg-primary-700
483
+ focus-visible:outline-primary-500;
484
+ }
485
+
486
+ /* ❌ HALLUCINATION TRAP: @apply is for component patterns shared across files
487
+ If a pattern appears in only 1-2 places, just use inline utilities
488
+ Over-extracting with @apply = recreating regular CSS with extra steps */
489
+ ```
490
+
491
+ ---
492
+
493
+ ## Accessibility with Tailwind
494
+
495
+ ```html
496
+ <!-- Focus visible (keyboard only, not mouse click) -->
497
+ <a class="rounded-lg focus-visible:outline-2 focus-visible:outline-primary-500
498
+ focus-visible:outline-offset-2">
499
+ Keyboard accessible link
500
+ </a>
501
+
502
+ <!-- Screen reader only text -->
503
+ <button>
504
+ <svg class="size-5" aria-hidden="true"></svg>
505
+ <span class="sr-only">Close menu</span>
506
+ </button>
507
+
508
+ <!-- Motion-safe / motion-reduce -->
509
+ <div class="motion-safe:animate-bounce-in motion-reduce:animate-none">
510
+ <!-- Only animates if user hasn't enabled "reduce motion" -->
511
+ </div>
512
+
513
+ <!-- Forced colors mode (high contrast) -->
514
+ <button class="bg-primary-600 forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]">
515
+ Accessible button
516
+ </button>
517
+ ```
518
+
519
+ ---
520
+
521
+ ## Output Format
522
+
523
+ ```
524
+ ━━━ Tailwind Expert Report ━━━━━━━━━━━━━━━━━━━━━━━
525
+ Skill: Tailwind Patterns
526
+ Tailwind: v4+
527
+ Scope: [N files · N components]
528
+ ─────────────────────────────────────────────────
529
+ ✅ Passed: [checks that passed, or "All clean"]
530
+ ⚠️ Warnings: [non-blocking issues, or "None"]
531
+ ❌ Blocked: [blocking issues requiring fix, or "None"]
532
+ ─────────────────────────────────────────────────
533
+ VBC status: PENDING → VERIFIED
534
+ Evidence: [build output / visual verification]
535
+ ```
536
+
537
+ ---
538
+
539
+ ## 🤖 LLM-Specific Traps
540
+
541
+ 1. **`tailwind.config.js` in v4:** There is NO JavaScript config file in Tailwind v4. All configuration is CSS-first with `@theme {}`.
542
+ 2. **`@tailwind base/components/utilities`:** Replaced by `@import "tailwindcss"` — a single import.
543
+ 3. **`purge:` Configuration:** Tailwind v4 auto-detects content files. No purge config exists.
544
+ 4. **`min-h-screen` on Mobile:** 100vh is broken on mobile browsers. Use `min-h-svh` (100svh) or `min-h-dvh` (100dvh).
545
+ 5. **`@sm` vs `sm:`:** `@sm` = container query (width of parent). `sm:` = viewport breakpoint. They are NOT interchangeable.
546
+ 6. **Arbitrary Value Overuse:** `mt-[13px]` generates a unique CSS rule. Use the spacing scale (`mt-3`) whenever possible.
547
+ 7. **`@apply` for Everything:** Over-extracting utilities into `@apply` classes defeats Tailwind's purpose. Only extract highly reused patterns.
548
+ 8. **Non-oklch Colors:** Tailwind v4 uses oklch for its default palette. Defining custom colors in hex/rgb limits color manipulation.
549
+ 9. **Missing `font-display: swap`:** Custom `@font-face` rules without `font-display: swap` cause FOIT (Flash of Invisible Text).
550
+ 10. **Ignoring `forced-colors`:** High-contrast mode overrides all colors. Interactive elements MUST have `forced-colors:` fallbacks.
551
+
552
+ ---
553
+
554
+ ## 🏛️ Tribunal Integration
555
+
556
+ **Slash command: `/tribunal-frontend`**
557
+
558
+ ### ✅ Pre-Flight Self-Audit
559
+
560
+ ```
561
+ ✅ Did I use @theme {} (not tailwind.config.js)?
562
+ ✅ Did I use @import "tailwindcss" (not @tailwind directives)?
563
+ ✅ Did I use min-h-svh/dvh (not min-h-screen)?
564
+ ✅ Did I use the design scale (not arbitrary values)?
565
+ ✅ Did I use oklch for custom colors?
566
+ ✅ Did I add focus-visible styles to all interactive elements?
567
+ ✅ Did I add sr-only labels to icon-only buttons?
568
+ ✅ Did I use motion-safe/motion-reduce for animations?
569
+ ✅ Did I use @container/@sm for component-level responsiveness?
570
+ ✅ Does the CSS build without warnings?
571
+ ```
572
+
573
+ ### 🛑 VBC Protocol
574
+
575
+ - ❌ **Forbidden:** Assuming Tailwind classes work without building.
576
+ - ✅ **Required:** Provide build output or visual screenshot evidence.