tribunal-kit 1.0.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/.agent/.shared/ui-ux-pro-max/README.md +3 -3
  2. package/.agent/ARCHITECTURE.md +205 -10
  3. package/.agent/GEMINI.md +37 -7
  4. package/.agent/agents/accessibility-reviewer.md +134 -0
  5. package/.agent/agents/ai-code-reviewer.md +129 -0
  6. package/.agent/agents/frontend-specialist.md +3 -0
  7. package/.agent/agents/game-developer.md +21 -21
  8. package/.agent/agents/logic-reviewer.md +12 -0
  9. package/.agent/agents/mobile-reviewer.md +79 -0
  10. package/.agent/agents/orchestrator.md +56 -26
  11. package/.agent/agents/performance-reviewer.md +36 -0
  12. package/.agent/agents/supervisor-agent.md +156 -0
  13. package/.agent/agents/swarm-worker-contracts.md +166 -0
  14. package/.agent/agents/swarm-worker-registry.md +92 -0
  15. package/.agent/rules/GEMINI.md +134 -5
  16. package/.agent/scripts/bundle_analyzer.py +259 -0
  17. package/.agent/scripts/dependency_analyzer.py +247 -0
  18. package/.agent/scripts/lint_runner.py +188 -0
  19. package/.agent/scripts/patch_skills_meta.py +177 -0
  20. package/.agent/scripts/patch_skills_output.py +285 -0
  21. package/.agent/scripts/schema_validator.py +279 -0
  22. package/.agent/scripts/security_scan.py +224 -0
  23. package/.agent/scripts/session_manager.py +144 -3
  24. package/.agent/scripts/skill_integrator.py +234 -0
  25. package/.agent/scripts/strengthen_skills.py +220 -0
  26. package/.agent/scripts/swarm_dispatcher.py +317 -0
  27. package/.agent/scripts/test_runner.py +192 -0
  28. package/.agent/scripts/test_swarm_dispatcher.py +163 -0
  29. package/.agent/skills/agent-organizer/SKILL.md +132 -0
  30. package/.agent/skills/agentic-patterns/SKILL.md +335 -0
  31. package/.agent/skills/api-patterns/SKILL.md +226 -50
  32. package/.agent/skills/app-builder/SKILL.md +215 -52
  33. package/.agent/skills/architecture/SKILL.md +176 -31
  34. package/.agent/skills/bash-linux/SKILL.md +150 -134
  35. package/.agent/skills/behavioral-modes/SKILL.md +152 -160
  36. package/.agent/skills/brainstorming/SKILL.md +148 -101
  37. package/.agent/skills/brainstorming/dynamic-questioning.md +10 -0
  38. package/.agent/skills/clean-code/SKILL.md +139 -134
  39. package/.agent/skills/code-review-checklist/SKILL.md +177 -80
  40. package/.agent/skills/config-validator/SKILL.md +165 -0
  41. package/.agent/skills/csharp-developer/SKILL.md +107 -0
  42. package/.agent/skills/database-design/SKILL.md +252 -29
  43. package/.agent/skills/deployment-procedures/SKILL.md +122 -175
  44. package/.agent/skills/devops-engineer/SKILL.md +134 -0
  45. package/.agent/skills/devops-incident-responder/SKILL.md +98 -0
  46. package/.agent/skills/documentation-templates/SKILL.md +175 -121
  47. package/.agent/skills/dotnet-core-expert/SKILL.md +103 -0
  48. package/.agent/skills/edge-computing/SKILL.md +213 -0
  49. package/.agent/skills/frontend-design/SKILL.md +76 -0
  50. package/.agent/skills/frontend-design/color-system.md +18 -0
  51. package/.agent/skills/frontend-design/typography-system.md +18 -0
  52. package/.agent/skills/game-development/SKILL.md +69 -0
  53. package/.agent/skills/geo-fundamentals/SKILL.md +158 -99
  54. package/.agent/skills/github-operations/SKILL.md +354 -0
  55. package/.agent/skills/i18n-localization/SKILL.md +158 -96
  56. package/.agent/skills/intelligent-routing/SKILL.md +89 -285
  57. package/.agent/skills/intelligent-routing/router-manifest.md +65 -0
  58. package/.agent/skills/lint-and-validate/SKILL.md +229 -27
  59. package/.agent/skills/llm-engineering/SKILL.md +258 -0
  60. package/.agent/skills/local-first/SKILL.md +203 -0
  61. package/.agent/skills/mcp-builder/SKILL.md +159 -111
  62. package/.agent/skills/mobile-design/SKILL.md +102 -282
  63. package/.agent/skills/nextjs-react-expert/SKILL.md +143 -227
  64. package/.agent/skills/nodejs-best-practices/SKILL.md +201 -254
  65. package/.agent/skills/observability/SKILL.md +285 -0
  66. package/.agent/skills/parallel-agents/SKILL.md +124 -118
  67. package/.agent/skills/performance-profiling/SKILL.md +143 -89
  68. package/.agent/skills/plan-writing/SKILL.md +133 -97
  69. package/.agent/skills/platform-engineer/SKILL.md +135 -0
  70. package/.agent/skills/powershell-windows/SKILL.md +167 -104
  71. package/.agent/skills/python-patterns/SKILL.md +149 -361
  72. package/.agent/skills/python-pro/SKILL.md +114 -0
  73. package/.agent/skills/react-specialist/SKILL.md +107 -0
  74. package/.agent/skills/readme-builder/SKILL.md +270 -0
  75. package/.agent/skills/realtime-patterns/SKILL.md +296 -0
  76. package/.agent/skills/red-team-tactics/SKILL.md +136 -134
  77. package/.agent/skills/rust-pro/SKILL.md +237 -173
  78. package/.agent/skills/seo-fundamentals/SKILL.md +134 -82
  79. package/.agent/skills/server-management/SKILL.md +155 -104
  80. package/.agent/skills/sql-pro/SKILL.md +104 -0
  81. package/.agent/skills/systematic-debugging/SKILL.md +156 -79
  82. package/.agent/skills/tailwind-patterns/SKILL.md +163 -205
  83. package/.agent/skills/tdd-workflow/SKILL.md +148 -88
  84. package/.agent/skills/test-result-analyzer/SKILL.md +299 -0
  85. package/.agent/skills/testing-patterns/SKILL.md +141 -114
  86. package/.agent/skills/trend-researcher/SKILL.md +228 -0
  87. package/.agent/skills/ui-ux-pro-max/SKILL.md +107 -0
  88. package/.agent/skills/ui-ux-researcher/SKILL.md +234 -0
  89. package/.agent/skills/vue-expert/SKILL.md +118 -0
  90. package/.agent/skills/vulnerability-scanner/SKILL.md +228 -188
  91. package/.agent/skills/web-design-guidelines/SKILL.md +148 -33
  92. package/.agent/skills/webapp-testing/SKILL.md +171 -122
  93. package/.agent/skills/whimsy-injector/SKILL.md +349 -0
  94. package/.agent/skills/workflow-optimizer/SKILL.md +219 -0
  95. package/.agent/workflows/api-tester.md +279 -0
  96. package/.agent/workflows/audit.md +168 -0
  97. package/.agent/workflows/brainstorm.md +65 -19
  98. package/.agent/workflows/changelog.md +144 -0
  99. package/.agent/workflows/create.md +67 -14
  100. package/.agent/workflows/debug.md +122 -30
  101. package/.agent/workflows/deploy.md +82 -31
  102. package/.agent/workflows/enhance.md +59 -27
  103. package/.agent/workflows/fix.md +143 -0
  104. package/.agent/workflows/generate.md +84 -20
  105. package/.agent/workflows/migrate.md +163 -0
  106. package/.agent/workflows/orchestrate.md +66 -17
  107. package/.agent/workflows/performance-benchmarker.md +305 -0
  108. package/.agent/workflows/plan.md +76 -33
  109. package/.agent/workflows/preview.md +73 -17
  110. package/.agent/workflows/refactor.md +153 -0
  111. package/.agent/workflows/review-ai.md +140 -0
  112. package/.agent/workflows/review.md +83 -16
  113. package/.agent/workflows/session.md +154 -0
  114. package/.agent/workflows/status.md +74 -18
  115. package/.agent/workflows/strengthen-skills.md +99 -0
  116. package/.agent/workflows/swarm.md +194 -0
  117. package/.agent/workflows/test.md +80 -31
  118. package/.agent/workflows/tribunal-backend.md +55 -13
  119. package/.agent/workflows/tribunal-database.md +62 -18
  120. package/.agent/workflows/tribunal-frontend.md +58 -12
  121. package/.agent/workflows/tribunal-full.md +70 -11
  122. package/.agent/workflows/tribunal-mobile.md +123 -0
  123. package/.agent/workflows/tribunal-performance.md +152 -0
  124. package/.agent/workflows/ui-ux-pro-max.md +100 -82
  125. package/README.md +117 -62
  126. package/bin/tribunal-kit.js +542 -288
  127. package/package.json +10 -6
@@ -0,0 +1,123 @@
1
+ ---
2
+ description: Mobile-specific Tribunal. Runs Logic + Security + Mobile reviewers. Use for React Native, Flutter, and responsive web code.
3
+ ---
4
+
5
+ # /tribunal-mobile — Mobile Code Tribunal
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command activates the **Mobile Tribunal** — a focused panel of reviewers covering the specific failure modes of mobile and responsive application code.
12
+
13
+ Use this instead of `/tribunal-full` when your code is specifically mobile-domain. It gives faster, more precise feedback than running all 11 reviewers.
14
+
15
+ ---
16
+
17
+ ## When to Use This vs Other Tribunals
18
+
19
+ | Code type | Right tribunal |
20
+ |---|---|
21
+ | React Native, Flutter, mobile UI | `/tribunal-mobile` ← you are here |
22
+ | Pure React (web) components | `/tribunal-frontend` |
23
+ | API routes, auth, middleware | `/tribunal-backend` |
24
+ | Cross-domain or pre-merge audit | `/tribunal-full` |
25
+
26
+ ---
27
+
28
+ ## Active Reviewers
29
+
30
+ | Reviewer | What It Catches |
31
+ |---|---|
32
+ | `logic-reviewer` | Hallucinated RN/Flutter APIs, impossible logic, undefined refs |
33
+ | `security-auditor` | Hardcoded secrets, insecure storage, OWASP Mobile Top 10 |
34
+ | `mobile-reviewer` | Touch targets, safe areas, keyboard avoidance, gesture handling, image optimization |
35
+
36
+ ---
37
+
38
+ ## What Gets Flagged — Real Examples
39
+
40
+ | Reviewer | Example Finding | Severity |
41
+ |---|---|---|
42
+ | logic | Calling a non-existent `Animated.stagger()` method | ❌ HIGH |
43
+ | security | `AsyncStorage.setItem('token', jwt)` — use `expo-secure-store` instead | ⚠️ MEDIUM |
44
+ | security | Deeplink handler with no validation of `url` param | ❌ HIGH |
45
+ | security | Missing certificate pinning on sensitive API endpoints | ⚠️ MEDIUM |
46
+ | mobile | Button `height: 20` — minimum touch target is 44pt (iOS) / 48dp (Android) | ❌ HIGH |
47
+ | mobile | Missing `<SafeAreaView>` on root screen component | ❌ HIGH |
48
+ | mobile | No `KeyboardAvoidingView` on screen with text inputs | ❌ HIGH |
49
+ | mobile | `<Image source={uri}>` with no width/height bounds — memory risk | ⚠️ MEDIUM |
50
+ | mobile | No `Platform.OS` guard on platform-specific code | ⚠️ MEDIUM |
51
+
52
+ ---
53
+
54
+ ## Mobile-Specific Anti-Hallucination Rules
55
+
56
+ ```
57
+ ❌ Never reference RN APIs not listed in the installed react-native version
58
+ ❌ Never assume iOS and Android behave identically — always check Platform.OS when needed
59
+ ❌ Never use AsyncStorage for sensitive data (tokens, passwords, biometrics)
60
+ ❌ Never skip keyboard avoidance on screens with text inputs
61
+ ❌ Never use hardcoded pixel values — use pt (iOS) or dp (Android) logical units
62
+ ❌ Never claim an animation approach is "performant" without mentioning native driver usage
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Output Format
68
+
69
+ ```
70
+ ━━━ Tribunal: Mobile ━━━━━━━━━━━━━━━━━━━━━
71
+
72
+ Active reviewers: logic · security · mobile
73
+
74
+ [Your code under review]
75
+
76
+ ━━━ Verdicts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+
78
+ logic-reviewer: ✅ APPROVED
79
+ security-auditor: ⚠️ WARNING
80
+ mobile-reviewer: ❌ REJECTED
81
+
82
+ ━━━ Issues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
+
84
+ security-auditor:
85
+ ⚠️ MEDIUM — Line 8
86
+ AsyncStorage used for auth token storage
87
+ Fix: Use expo-secure-store or react-native-keychain for sensitive data
88
+
89
+ mobile-reviewer:
90
+ ❌ HIGH — Line 12
91
+ Touch target: Button height is 20pt. Minimum is 44pt (iOS) / 48dp (Android)
92
+ Fix: style={{ minHeight: 44 }}
93
+
94
+ ❌ HIGH — Line 34
95
+ Missing SafeAreaView wrapping the root view
96
+ Fix: Wrap with <SafeAreaView style={{ flex: 1 }}>
97
+
98
+ ━━━ Verdict: REJECTED ━━━━━━━━━━━━━━━━━━━━
99
+
100
+ Address rejections? Y = fix and re-review | N = accept risk | R = revise manually
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Cross-Workflow Navigation
106
+
107
+ | Finding type | Next step |
108
+ |---|---|
109
+ | Insecure storage CRITICAL | Replace storage library via `/enhance` |
110
+ | All touch target issues | `/enhance` to normalize touch targets in shared components |
111
+ | Cross-platform behavior gap | `/refactor` to extract Platform.OS guards into a utility |
112
+ | All approved | Human Gate to write to disk |
113
+
114
+ ---
115
+
116
+ ## Usage
117
+
118
+ ```
119
+ /tribunal-mobile my React Native login screen component
120
+ /tribunal-mobile the Flutter payment form widget
121
+ /tribunal-mobile the responsive mobile nav component with touch gestures
122
+ /tribunal-mobile the biometric authentication flow
123
+ ```
@@ -0,0 +1,152 @@
1
+ ---
2
+ description: Performance-specific Tribunal. Runs Logic + Performance reviewers. Use for optimization, profiling, and bottleneck analysis.
3
+ ---
4
+
5
+ # /tribunal-performance — Performance Code Tribunal
6
+
7
+ $ARGUMENTS
8
+
9
+ ---
10
+
11
+ This command activates the **Performance Tribunal** — a focused panel targeting algorithmic complexity, memory bloat, blocking I/O, and throughput bottlenecks before they hit production.
12
+
13
+ Use this instead of `/tribunal-full` when you specifically need a performance lens. It avoids noise from unrelated reviewers.
14
+
15
+ ---
16
+
17
+ ## When to Use This vs Other Tribunals
18
+
19
+ | Code type | Right tribunal |
20
+ |---|---|
21
+ | Performance-critical loops, async patterns | `/tribunal-performance` ← you are here |
22
+ | Security vulnerabilities | `/tribunal-backend` or `/tribunal-full` |
23
+ | Mobile-specific performance | `/tribunal-mobile` (includes mobile perf issues) |
24
+ | SQL N+1 or unbounded queries | `/tribunal-database` |
25
+ | Cross-domain or pre-merge | `/tribunal-full` |
26
+
27
+ ---
28
+
29
+ ## Active Reviewers
30
+
31
+ | Reviewer | What It Catches |
32
+ |---|---|
33
+ | `logic-reviewer` | Hallucinated methods, impossible logic, undefined refs |
34
+ | `performance-reviewer` | O(n²) complexity, blocking I/O, memory floods, missing pagination, no streaming |
35
+
36
+ ---
37
+
38
+ ## What Gets Flagged — Real Examples
39
+
40
+ | Pattern | Example | Severity |
41
+ |---|---|---|
42
+ | O(n²) complexity | `Array.includes()` inside a `for` loop | ❌ REJECTED |
43
+ | Blocking I/O in async context | `fs.readFileSync()` inside an `async` handler | ❌ REJECTED |
44
+ | Uncontrolled concurrency | `Promise.all(items.map(item => fetchItem(item)))` where `items.length` is unbounded | ❌ REJECTED |
45
+ | Memory flood | Loading entire table into memory: `const all = await db.findMany()` | ❌ REJECTED |
46
+ | Expensive re-renders | Derived value recomputed on every render without `useMemo` | ⚠️ WARNING |
47
+ | No streaming on large responses | Returning full LLM response, not streaming | ⚠️ WARNING |
48
+ | Sort on every render | `items.sort(fn)` inside JSX (mutates original array) | ❌ REJECTED |
49
+ | Regex in hot path | Complex regex compiled on every call (not pre-compiled) | ⚠️ WARNING |
50
+
51
+ ---
52
+
53
+ ## Pipeline
54
+
55
+ ```
56
+ Your code
57
+
58
+
59
+ logic-reviewer → Hallucinated methods, undefined refs
60
+
61
+
62
+ performance-reviewer → O(n²) complexity, Array.includes() in loops,
63
+ blocking fs.readFileSync() in async contexts,
64
+ unbounded SELECT *, uncontrolled Promise.all floods,
65
+ missing useMemo() on expensive derivations,
66
+ no streaming on LLM responses,
67
+ missing pagination on large datasets
68
+
69
+
70
+ Verdict Summary
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Output Format
76
+
77
+ ```
78
+ ━━━ Tribunal: Performance ━━━━━━━━━━━━━━━━━
79
+
80
+ Active reviewers: logic · performance
81
+
82
+ [Your code under review]
83
+
84
+ ━━━ Verdicts ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
+
86
+ logic-reviewer: ✅ APPROVED
87
+ performance-reviewer: ❌ REJECTED
88
+
89
+ ━━━ Issues ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
90
+
91
+ performance-reviewer:
92
+ ❌ HIGH — Line 18
93
+ O(n²): Array.includes() inside for loop — O(n) lookup inside O(n) loop
94
+ Fix: Convert `otherList` to a Set before the loop for O(1) lookup
95
+
96
+ ❌ HIGH — Line 34
97
+ Blocking I/O: fs.readFileSync() inside async handler blocks the event loop
98
+ Fix: await fs.promises.readFile(path, 'utf-8')
99
+
100
+ ⚠️ MEDIUM — Line 52
101
+ No streaming: LLM response buffered before returning to client
102
+ Fix: Pipe the stream directly: res.pipe(openaiStream)
103
+
104
+ ━━━ Verdict: REJECTED ━━━━━━━━━━━━━━━━━━━━
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Severity Levels
110
+
111
+ | Level | Meaning |
112
+ |---|---|
113
+ | `❌ REJECTED (HIGH)` | Will cause visible performance degradation under load — fix before merge |
114
+ | `❌ REJECTED (MEDIUM)` | Will become a bottleneck at scale — address before deploy |
115
+ | `⚠️ WARNING` | Acceptable now, will degrade at 10x scale — flag for upcoming sprint |
116
+ | `✅ APPROVED` | No performance concerns detected at this code level |
117
+
118
+ ---
119
+
120
+ ## Performance-Specific Anti-Hallucination Rules
121
+
122
+ ```
123
+ ❌ Never claim a fix is "faster" without citing the algorithmic reason (O-notation or benchmark)
124
+ ❌ Never recommend Promise.all for unbounded arrays — always suggest chunking with p-limit or similar
125
+ ❌ Never mark O(n²) as acceptable without explicit justification tied to data size constraints
126
+ ❌ Never suggest caching without identifying the invalidation strategy
127
+ ❌ Never recommend premature micro-optimizations over algorithmic improvements
128
+ ❌ No invented profiling tools — only documented options for the target runtime
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Cross-Workflow Navigation
134
+
135
+ | Finding type | Next step |
136
+ |---|---|
137
+ | O(n²) pattern found | `/refactor` to extract and fix the algorithm |
138
+ | Memory bloat in data loading | `/enhance` to add pagination or streaming |
139
+ | Promise.all flood | `/enhance` to add concurrency control with `p-limit` |
140
+ | Regex in hot path | `/enhance` to pre-compile and cache |
141
+ | All approved | Human Gate to write to disk |
142
+
143
+ ---
144
+
145
+ ## Usage
146
+
147
+ ```
148
+ /tribunal-performance the data processing loop in userService.ts
149
+ /tribunal-performance the search filter function that runs on every keystroke
150
+ /tribunal-performance the batch API handler that fetches user data
151
+ /tribunal-performance the LLM response handler
152
+ ```
@@ -1,153 +1,171 @@
1
1
  ---
2
- description: Plan and implement UI
2
+ description: Plan and implement cutting-edge advanced UI/UX
3
3
  ---
4
4
 
5
- # /ui-ux-pro-max — Advanced UI/UX Design Mode
5
+ # /ui-ux-pro-max — Advanced Cutting-Edge UI/UX Design Mode
6
6
 
7
7
  $ARGUMENTS
8
8
 
9
9
  ---
10
10
 
11
- This command activates the highest-fidelity UI/UX workflow. It combines deep design thinking, component architecture, and real-time feedback not just "generate a pretty layout."
11
+ This command activates the absolute highest-fidelity UI/UX workflow, meant for 2026+ web and mobile standards. It combines deep neuro-inclusive design thinking, spatial UI concepts, advanced component architecture, and generative styling. This is not just "generate a pretty layout" — it is the creation of a responsive, living, and hyper-optimized interface.
12
12
 
13
- > This is not a shortcut. It's a full design session.
13
+ > This is a full state-of-the-art design session. We are pushing pixels, physics, and perceptual psychology.
14
+
15
+ ---
16
+
17
+ ## When to Use This vs Other Commands
18
+
19
+ | Use `/ui-ux-pro-max` when... | Use something else when... |
20
+ |---|---|
21
+ | You need pixel-perfect, award-worthy UI craft | Standard UI is acceptable → `/create` |
22
+ | Design system, color system, typography all need definition | Just one component → `/generate` |
23
+ | You want accessibility, motion, and spatial design all considered | Quick functional prototype → `/create` |
24
+ | Neuro-inclusive + APCA contrast standards are required | Speed matters over design quality → `/create` |
14
25
 
15
26
  ---
16
27
 
17
28
  ## What Makes This Different From `/create`
18
29
 
19
- `/create` builds features. `/ui-ux-pro-max` obsesses over the craft:
30
+ `/create` builds standard features. `/ui-ux-pro-max` obsesses over extreme craft and futuristic patterns:
20
31
 
21
- - Color decisions backed by contrast ratios and optical principles not "looks nice"
22
- - Typography choices based on reading distance, weight hierarchy, and scale
23
- - Layout that solves the actual user flow, not the common template
24
- - Interaction states for every element (hover, focus, active, loading, error, empty)
25
- - Accessibility by default not retrofitted
32
+ - **Generative & Algorithmic Color**: Using OKLCH/LCH for perceptual uniformity, not just picking hex codes that "look nice."
33
+ - **Fluid & Variable Typography**: Designing with `clamp()`, `ch` units, and Variable Fonts for infinite scaling, not fixed breakpoints.
34
+ - **Adaptive Psychology & Neuro-Inclusivity**: Respecting `prefers-reduced-motion`, varying cognitive load based on context, and utilizing OLED battery-saving true black themes.
35
+ - **Advanced Micro-Interactions**: Spring-physics based animations and scroll-driven interactions instead of static, linear CSS transitions.
36
+ - **Spatial & Contextual UI**: Considering z-axis depth (glass, blurs, multi-layered shadows) and contextual adaptation (UI conforming to user behavior).
26
37
 
27
38
  ---
28
39
 
29
- ## Design Rules (Always Active in This Mode)
40
+ ## Extreme Design Rules (Always Active in This Mode)
30
41
 
31
- ### Color
32
- - No purple/violet as primary color — most overused AI design choice
33
- - All text must pass WCAG AA contrast (4.5:1 minimum)
34
- - Color palette derived from a single base hue with rotational logic not random picks
35
- - No pure black backgrounds (`#000`) use `#090909` to `#121212` for perceived depth
42
+ ### Generative Color & Light
43
+ - **No purple/violet as primary color**the most overused "AI design" cliché is banned.
44
+ - Color palettes must be derived using algorithmic relationships (e.g., OKLCH lightness/chroma stepping).
45
+ - **True Black & OLED Optimization**: Use `#000000` or `#010101` for deep backgrounds on mobile/PWA to save battery, utilizing high-contrast borders for separation instead of gray backgrounds.
46
+ - Contrast must pass **WCAG 3.0 APCA** (Advanced Perceptual Contrast Algorithm) standards for readability, not just older WCAG 2.1 math.
36
47
 
37
- ### Typography
38
- - Google Fonts only if you have the `<link>` to prove it exists no invented font names
39
- - Minimum 16px body text on mobile
40
- - Line height between 1.4–1.6 for body, 1.1–1.2 for headings
41
- - No more than 3 font weights in one component
48
+ ### Fluid & Variable Typography
49
+ - Use system variable fonts or explicitly loaded modern Variable Fonts to reduce network requests.
50
+ - Body text uses **fluid typography** `clamp(1rem, 0.8rem + 1vw, 1.25rem)` to scale linearly between screen sizes.
51
+ - strict adherence to max line lengths (`max-w-[65ch]`) to prevent cognitive fatigue.
42
52
 
43
- ### Layout
44
- - No standard hero (left text / right illustration) without a compelling reason
45
- - Section max-width: 1200px for content, 720px for text-heavy content
46
- - 8px spacing grid all padding and margin values are multiples of 8
53
+ ### Spatial & Layout Architecture
54
+ - Standard hero layouts (left text / right image) are prohibited unless explicitly justified. Use asymmetric, dynamic, or scroll-locked interactive hero sections.
55
+ - The Z-axis matters: build depth using multi-layer shadows or contextual background blurs (`backdrop-filter`) carefully applied for performance.
56
+ - Use **Logical Properties** (`margin-inline`, `padding-block`) exclusively to enforce automatic RTL (Right-to-Left) and LTR compatibility.
47
57
 
48
- ### Interaction
49
- - Every interactive element has: default, hover, focus, active, and disabled states
50
- - Focus rings must be visible never `outline: none` without a styled alternative
51
- - Loading states for anything async no silent spinners
52
- - Error states with actionable copy — not just "Error occurred"
58
+ ### Advanced Interaction & Physics
59
+ - Linear easing (`ease`, `linear`) is banned for layout shifts. You must use **spring physics** or custom `cubic-bezier` curves for natural, organic motion.
60
+ - **Scroll-Driven Animations**: UI elements should react to scroll position natively using modern CSS `@scroll-timeline` or performant JS Observers.
61
+ - **Zero-Wait UI**: Streaming UI components (like React Server Components or Optimistic UI updates) must be designed so the user never sees a raw loading spinner for action responses.
53
62
 
54
63
  ---
55
64
 
56
- ## The Design Session Protocol
65
+ ## The Pro-Max Design Protocol
57
66
 
58
- ### Step 1 — Problem Before Pixels
67
+ ### Step 1 — Perceptual & Contextual Mapping
59
68
 
60
- Answer these before designing anything:
69
+ Before painting a pixel, determine:
61
70
 
62
71
  ```
63
- Who is the user? (not "general users" — a specific persona)
64
- What is the one thing this UI must make easy?
65
- What is the emotional tone? (serious, playful, professional, urgent)
66
- What does the user do after this screen?
72
+ Who is the specific user persona?
73
+ What is the cognitive load capacity here? (e.g., dashboard = high data density, landing page = low friction)
74
+ What is the desired emotional & visceral impact?
75
+ How will the UI adapt to user input?
67
76
  ```
68
77
 
69
- ### Step 2 — Layout Skeleton (No Colors yet)
78
+ ### Step 2 — Spatial Layout Skeleton (No Colors yet)
70
79
 
71
- Define the structure:
72
- - What regions exist? (nav, hero, content, sidebar, footer)
73
- - What is the visual hierarchy? (#1 most important thing → #2 → #3)
74
- - What flows from top to bottom when the user scrolls?
80
+ Define the structural architecture with depth in mind:
81
+ - What is the structural grid? (Subgrid, Container Queries)
82
+ - What exists on the Z-axis? (What floats, what is grounded?)
83
+ - How does the layout mutate on scroll?
75
84
 
76
- ### Step 3 — Color + Typography System
85
+ ### Step 3 — Generative Color + Fluid Typography System
77
86
 
78
- Pick once, use consistently:
87
+ Define the algorithmic base:
79
88
 
80
- ```
81
- Base hue: [HSL value]
82
- Primary: [hue, full saturation]
83
- Background: [hue, 2–5% saturation, 6–12% lightness for dark]
84
- Surface: [background + 4–6% lightness]
85
- Text primary: [96–98% lightness on dark]
86
- Text secondary: [65–70% lightness on dark]
87
- Accent: [complementary hue, high saturation]
89
+ ```css
90
+ /* Example OKLCH System */
91
+ Base hue: [OKLCH Hue Value]
92
+ Surface (Dark): oklch(15% 0.02 [Hue])
93
+ Surface (OLED): oklch(0% 0 0)
94
+ Text Primary: oklch(96% 0.01 [Hue])
95
+ Accent: oklch(70% 0.25 [Complementary Hue])
88
96
  ```
89
97
 
90
98
  ### Step 4 — Component Build (Tribunal: logic + frontend)
91
99
 
92
100
  Every component built goes through `/tribunal-frontend` before being shown.
101
+ Focus on **Container Queries** (`@container`) so components contextualize themselves based on where they map, not window width.
93
102
 
94
- ### Step 5 — Interaction Layer
103
+ ### Step 5 — Physics & Interaction Layer
95
104
 
96
- Define CSS transitions for every state change:
105
+ Define organic movement:
97
106
  ```css
98
- transition: all 0.15s ease; /* for micro-interactions */
99
- transition: all 0.25s ease; /* for layout transitions */
107
+ /* Spring-like organic transition */
108
+ transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
100
109
  ```
110
+ Ensure all interactions check for `@media (prefers-reduced-motion: reduce)`.
101
111
 
102
- ### Step 6 — Accessibility Audit
112
+ ### Step 6 — Extreme Accessibility Audit
103
113
 
104
114
  ```
105
- All images have alt attributes
106
- Focus order follows visual order
107
- Color is not the only indicator of state (add icon or text)
108
- Touch targets minimum 44px × 44px on mobile
109
- ARIA roles on custom interactive elements
115
+ APCA Contrast verified.
116
+ Logical properties used for full i18n support.
117
+ Touch targets mathematically enforce Fitts' Law (>48px minimum).
118
+ Cognitive boundaries respected (No sudden layout shifts, CLS = 0).
119
+ Screen reader flows tested via semantic HTML5.
110
120
  ```
111
121
 
112
122
  ---
113
123
 
114
124
  ## 🏛️ Anti-Hallucination Rules for UI
115
125
 
116
- - **No invented Google Fonts** — verify every font name at fonts.google.com before using it
117
- - **No invented CSS properties** — `backdrop-filter` needs vendor prefix in some browsers; write `// VERIFY: check browser support`
118
- - **Contrast ratios must be real** don't claim AA compliance without checking the actual ratio
119
- - **No placeholder images** — generate real images or use a placeholder service with documented URL format
126
+ - **No invented CSS properties** — Do not guess syntax for scroll timelines or `@property` declarations; write `// VERIFY: check browser compatibility` if using bleach-edge CSS.
127
+ - **No placeholder images** — generate real structural visualizations or use SVG abstractions.
128
+ - **Do not invent React/Next.js features** that don't exist in the current stable or canary builds.
120
129
 
121
130
  ---
122
131
 
123
132
  ## Output Format
124
133
 
125
- Each step produces:
134
+ Each step produces a high-fidelity summary:
126
135
 
127
136
  ```
128
- 📐 Layout skeleton: [description or ASCII diagram]
137
+ 📐 Spatial Layout: [description of grid, container queries, and z-axis layers]
129
138
 
130
- 🎨 Color system:
131
- Background: #[hex]
132
- Surface: #[hex]
133
- Primary text: #[hex]
134
- Accent: #[hex]
135
- Contrast: [ratio]:1 → AA [pass|fail]
139
+ 🎨 Generative Color:
140
+ [OKLCH base mapped variables]
141
+ APCA Contrast Check: [Pass/Fail for Text/Bg combinations]
136
142
 
137
- 🧱 Component: [name]
138
- Tribunal: [verdict]
143
+ 🧱 Component Schema:
144
+ [Name] + [State transitions: Hover, Focus, Active, Skeleton]
145
+ Tribunal: [Verdict]
139
146
 
140
- Accessibility:
141
- [checklist result]
147
+ Neuro-Inclusive Audit:
148
+ [Compliance with cognitive safety, motion reduction, and touch targets]
142
149
  ```
143
150
 
144
151
  ---
145
152
 
153
+ ## Cross-Workflow Navigation
154
+
155
+ | After /ui-ux-pro-max produces output... | Do this |
156
+ |---|---|
157
+ | Component code is ready for merge | `/tribunal-frontend` for React/hooks audit |
158
+ | Performance-critical animations written | `/tribunal-performance` to check for jank |
159
+ | Color + contrast system defined | Document in the design system, then `/create` components |
160
+ | Accessibility audit is required | Additional review with `accessibility-reviewer` via `/review [component]` |
161
+
162
+ ---
163
+
146
164
  ## Usage
147
165
 
148
166
  ```
149
- /ui-ux-pro-max design a SaaS dashboard homepage
150
- /ui-ux-pro-max build a pricing page that converts
151
- /ui-ux-pro-max create a mobile-first landing page for a productivity app
152
- /ui-ux-pro-max redesign the login and registration flow
167
+ /ui-ux-pro-max design a generative AI prompt dashboard
168
+ /ui-ux-pro-max build an e-commerce checkout with extreme conversion optimization
169
+ /ui-ux-pro-max create a spatial WebXR-inspired landing page
170
+ /ui-ux-pro-max redesign a high-frequency trading interface for minimum cognitive load
153
171
  ```