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
@@ -1,13 +1,16 @@
1
1
  ---
2
2
  name: mobile-design
3
- description: Mobile-first design thinking and decision-making for iOS and Android apps. Touch interaction, performance patterns, platform conventions. Teaches principles, not fixed values. Use when building React Native, Flutter, or native mobile apps.
3
+ description: Mobile-first and Spatial computing design thinking for iOS, Android, Foldables, and WebXR. Touch interaction, advanced haptics, on-device AI patterns, performance extremis. Teaches principles, not fixed values.
4
4
  allowed-tools: Read, Glob, Grep, Bash
5
+ version: 1.0.0
6
+ last-updated: 2026-03-12
7
+ applies-to-model: gemini-2.5-pro, claude-3-7-sonnet
5
8
  ---
6
9
 
7
- # Mobile Design System
10
+ # Mobile & Spatial Design System (Pro-Max Level)
8
11
 
9
- > **Philosophy:** Touch-first. Battery-conscious. Platform-respectful. Offline-capable.
10
- > **Core Principle:** Mobile is NOT a small desktop. THINK mobile constraints, ASK platform choice.
12
+ > **Philosophy:** Touch-first. Battery-conscious. Platform-respectful. Contextually aware.
13
+ > **Core Principle:** Mobile is NOT a small desktop. It is a sensor-rich, context-aware extension of the user. THINK constraints, EXPECT hardware diversity.
11
14
 
12
15
  ---
13
16
 
@@ -30,30 +33,15 @@ allowed-tools: Read, Glob, Grep, Bash
30
33
  | File | Content | Status |
31
34
  |------|---------|--------|
32
35
  | **[mobile-design-thinking.md](mobile-design-thinking.md)** | **โš ๏ธ ANTI-MEMORIZATION: Forces thinking, prevents AI defaults** | **โฌœ CRITICAL FIRST** |
33
- | **[touch-psychology.md](touch-psychology.md)** | **Fitts' Law, gestures, haptics, thumb zone** | **โฌœ CRITICAL** |
34
- | **[mobile-performance.md](mobile-performance.md)** | **RN/Flutter performance, 60fps, memory** | **โฌœ CRITICAL** |
35
- | **[mobile-backend.md](mobile-backend.md)** | **Push notifications, offline sync, mobile API** | **โฌœ CRITICAL** |
36
- | **[mobile-testing.md](mobile-testing.md)** | **Testing pyramid, E2E, platform-specific** | **โฌœ CRITICAL** |
37
- | **[mobile-debugging.md](mobile-debugging.md)** | **Native vs JS debugging, Flipper, Logcat** | **โฌœ CRITICAL** |
38
- | [mobile-navigation.md](mobile-navigation.md) | Tab/Stack/Drawer, deep linking | โฌœ Read |
39
- | [mobile-typography.md](mobile-typography.md) | System fonts, Dynamic Type, a11y | โฌœ Read |
40
- | [mobile-color-system.md](mobile-color-system.md) | OLED, dark mode, battery-aware | โฌœ Read |
36
+ | **[spatial-and-foldables.md](spatial-and-foldables.md)** | **Foldable screens, WebXR, dynamic viewports** | **โฌœ CRITICAL** |
37
+ | **[on-device-ai.md](on-device-ai.md)** | **Streaming UI, local models, zero-wait states** | **โฌœ CRITICAL** |
38
+ | **[touch-psychology.md](touch-psychology.md)** | **Advanced haptics, Fitts' Law, magnetic touch targets** | **โฌœ CRITICAL** |
39
+ | **[mobile-performance.md](mobile-performance.md)** | **React Native/Flutter rendering at 120Hz** | **โฌœ CRITICAL** |
40
+ | [mobile-navigation.md](mobile-navigation.md) | Tab/Stack/Drawer, deep linking, spatial z-axis nav | โฌœ Read |
41
41
  | [decision-trees.md](decision-trees.md) | Framework/state/storage selection | โฌœ Read |
42
42
 
43
43
  > ๐Ÿง  **mobile-design-thinking.md is PRIORITY!** This file ensures AI thinks instead of using memorized patterns.
44
44
 
45
- ### Platform-Specific (Read Based on Target)
46
-
47
- | Platform | File | Content | When to Read |
48
- |----------|------|---------|--------------|
49
- | **iOS** | [platform-ios.md](platform-ios.md) | Human Interface Guidelines, SF Pro, SwiftUI patterns | Building for iPhone/iPad |
50
- | **Android** | [platform-android.md](platform-android.md) | Material Design 3, Roboto, Compose patterns | Building for Android |
51
- | **Cross-Platform** | Both above | Platform divergence points | React Native / Flutter |
52
-
53
- > ๐Ÿ”ด **If building for iOS โ†’ Read platform-ios.md FIRST!**
54
- > ๐Ÿ”ด **If building for Android โ†’ Read platform-android.md FIRST!**
55
- > ๐Ÿ”ด **If cross-platform โ†’ Read BOTH and apply conditional platform logic!**
56
-
57
45
  ---
58
46
 
59
47
  ## โš ๏ธ CRITICAL: ASK BEFORE ASSUMING (MANDATORY)
@@ -64,210 +52,86 @@ allowed-tools: Read, Glob, Grep, Bash
64
52
 
65
53
  | Aspect | Ask | Why |
66
54
  |--------|-----|-----|
67
- | **Platform** | "iOS, Android, or both?" | Affects EVERY design decision |
68
- | **Framework** | "React Native, Flutter, or native?" | Determines patterns and tools |
69
- | **Navigation** | "Tab bar, drawer, or stack-based?" | Core UX decision |
70
- | **State** | "What state management? (Zustand/Redux/Riverpod/BLoC?)" | Architecture foundation |
71
- | **Offline** | "Does this need to work offline?" | Affects data strategy |
72
- | **Target devices** | "Phone only, or tablet support?" | Layout complexity |
55
+ | **Form Factor** | "Standard mobile only, or support for Foldables/Tablets?" | Affects fluid layout geometry |
56
+ | **Performance** | "Is this targeting 60Hz or 120Hz ProMotion displays?" | Determines animation physics |
57
+ | **AI Integration**| "Are we streaming LLM responses to the UI?" | Defines loading vs streaming patterns |
58
+ | **Platform** | "iOS, Android, Spatial (VisionOS/WebXR), or cross-platform?" | Affects EVERY design decision |
73
59
 
74
60
  ### โ›” AI MOBILE ANTI-PATTERNS (YASAK LฤฐSTESฤฐ)
75
61
 
76
62
  > ๐Ÿšซ **These are AI default tendencies that MUST be avoided!**
77
63
 
78
- #### Performance Sins
79
-
64
+ #### Performance & Display Sins
80
65
  | โŒ NEVER DO | Why It's Wrong | โœ… ALWAYS DO |
81
66
  |-------------|----------------|--------------|
82
- | **ScrollView for long lists** | Renders ALL items, memory explodes | Use `FlatList` / `FlashList` / `ListView.builder` |
83
- | **Inline renderItem function** | New function every render, all items re-render | `useCallback` + `React.memo` |
84
- | **Missing keyExtractor** | Index-based keys cause bugs on reorder | Unique, stable ID from data |
85
- | **Skip getItemLayout** | Async layout = janky scroll | Provide when items have fixed height |
86
- | **setState() everywhere** | Unnecessary widget rebuilds | Targeted state, `const` constructors |
87
- | **Native driver: false** | Animations blocked by JS thread | `useNativeDriver: true` always |
67
+ | **Pure White Backgrounds** | Blinds users at night, drains battery | OLED True Black (`#000`) or off-white (`#FAFAFA`) |
68
+ | **Linear Animations** | Feels robotic and cheap | Spring physics (`stiffness`, `damping`) |
69
+ | **ScrollView for long lists** | Renders ALL items, memory explodes | Use `FlashList` / `ListView.builder` / Virtualization |
88
70
  | **console.log in production** | Blocks JS thread severely | Remove before release build |
89
- | **Skip React.memo/const** | Every item re-renders on any change | Memoize list items ALWAYS |
90
-
91
- #### Touch/UX Sins
92
71
 
72
+ #### Touch & UX Sins
93
73
  | โŒ NEVER DO | Why It's Wrong | โœ… ALWAYS DO |
94
74
  |-------------|----------------|--------------|
95
- | **Touch target < 44px** | Impossible to tap accurately, frustrating | Minimum 44pt (iOS) / 48dp (Android) |
96
- | **Spacing < 8px between targets** | Accidental taps on neighbors | Minimum 8-12px gap |
75
+ | **Touch target < 48px** | Frustrating, violates modern Fitts' Law | Min 48px (iOS/Android), mathematically enforced |
76
+ | **Silent Interactions** | Breaks the illusion of tactility | Bind visual state changes to Advanced Haptic Feedback |
77
+ | **Blocking Spinners for AI** | "Thinking..." spinners cause abandonment | Stream skeleton โ†’ partial text โ†’ layout |
97
78
  | **Gesture-only interactions** | Motor impaired users excluded | Always provide button alternative |
98
- | **No loading state** | User thinks app crashed | ALWAYS show loading feedback |
99
- | **No error state** | User stuck, no recovery path | Show error with retry option |
100
- | **No offline handling** | Crash/block when network lost | Graceful degradation, cached data |
101
- | **Ignore platform conventions** | Users confused, muscle memory broken | iOS feels iOS, Android feels Android |
102
-
103
- #### Security Sins
104
-
105
- | โŒ NEVER DO | Why It's Wrong | โœ… ALWAYS DO |
106
- |-------------|----------------|--------------|
107
- | **Token in AsyncStorage** | Easily accessible, stolen on rooted device | `SecureStore` / `Keychain` / `EncryptedSharedPreferences` |
108
- | **Hardcode API keys** | Reverse engineered from APK/IPA | Environment variables, secure storage |
109
- | **Skip SSL pinning** | MITM attacks possible | Pin certificates in production |
110
- | **Log sensitive data** | Logs can be extracted | Never log tokens, passwords, PII |
111
-
112
- #### Architecture Sins
113
-
114
- | โŒ NEVER DO | Why It's Wrong | โœ… ALWAYS DO |
115
- |-------------|----------------|--------------|
116
- | **Business logic in UI** | Untestable, unmaintainable | Service layer separation |
117
- | **Global state for everything** | Unnecessary re-renders, complexity | Local state default, lift when needed |
118
- | **Deep linking as afterthought** | Notifications, shares broken | Plan deep links from day one |
119
- | **Skip dispose/cleanup** | Memory leaks, zombie listeners | Clean up subscriptions, timers |
120
79
 
121
80
  ---
122
81
 
123
- ## ๐Ÿ“ฑ Platform Decision Matrix
82
+ ## ๐Ÿ“ฑ Hardware & Context Adaptation
124
83
 
125
- ### When to Unify vs Diverge
84
+ ### 1. The Foldable & Dynamic Screen Era
85
+ Phones fold. Tablets resize. UIs must be perfectly fluid, not reliant on fixed breakpoints.
86
+ - **TwoPane Layouts:** List-Detail views that dynamically collapse into single stacks.
87
+ - **Hinge Awareness:** Do not place critical interactive elements across the physical hinge of a foldable device.
126
88
 
127
- ```
128
- UNIFY (same on both) DIVERGE (platform-specific)
129
- โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
130
- Business Logic โœ… Always -
131
- Data Layer โœ… Always -
132
- Core Features โœ… Always -
133
-
134
- Navigation - โœ… iOS: edge swipe, Android: back button
135
- Gestures - โœ… Platform-native feel
136
- Icons - โœ… SF Symbols vs Material Icons
137
- Date Pickers - โœ… Native pickers feel right
138
- Modals/Sheets - โœ… iOS: bottom sheet vs Android: dialog
139
- Typography - โœ… SF Pro vs Roboto (or custom)
140
- Error Dialogs - โœ… Platform conventions for alerts
141
- ```
142
-
143
- ### Quick Reference: Platform Defaults
89
+ ### 2. Advanced Haptics (Tactile UI)
90
+ Visuals are only half the UI. Mobile relies on touch.
91
+ - Bind `Haptics.impactAsync('light')` to micro-interactions (e.g., toggling a switch).
92
+ - Bind `Haptics.notificationAsync('success')` to state completions.
93
+ - *Never* overuse haptics. They must mean something.
144
94
 
145
- | Element | iOS | Android |
146
- |---------|-----|---------|
147
- | **Primary Font** | SF Pro / SF Compact | Roboto |
148
- | **Min Touch Target** | 44pt ร— 44pt | 48dp ร— 48dp |
149
- | **Back Navigation** | Edge swipe left | System back button/gesture |
150
- | **Bottom Tab Icons** | SF Symbols | Material Symbols |
151
- | **Action Sheet** | UIActionSheet from bottom | Bottom Sheet / Dialog |
152
- | **Progress** | Spinner | Linear progress (Material) |
153
- | **Pull to Refresh** | Native UIRefreshControl | SwipeRefreshLayout |
95
+ ### 3. Spatial Z-Axis & Depth
96
+ Modern OSs (iOS 18+, Android 15+) heavily utilize depth and blur.
97
+ - Utilize native `BlurView` or `VisualEffectView` materials for absolutely positioned overlays (tab bars, headers).
98
+ - Shadows must have multi-layered dispersion, not harsh CSS `box-shadow` single drops.
154
99
 
155
100
  ---
156
101
 
157
- ## ๐Ÿง  Mobile UX Psychology (Quick Reference)
102
+ ## ๐Ÿง  Mobile Extreme UX Psychology
158
103
 
159
- ### Fitts' Law for Touch
104
+ ### Fitts' Law for Touch & Magnetic Targets
105
+ Touch screens are wildly imprecise.
106
+ - Touch targets MUST be >48px minimum.
107
+ - Important actions map to the THUMB ZONE (bottom arc).
108
+ - **Magnetic Padding:** Visual size can be small (24px icon), but the *hitbox* padding must expand to 48px.
160
109
 
161
- ```
162
- Desktop: Cursor is precise (1px)
163
- Mobile: Finger is imprecise (~7mm contact area)
164
-
165
- โ†’ Touch targets MUST be 44-48px minimum
166
- โ†’ Important actions in THUMB ZONE (bottom of screen)
167
- โ†’ Destructive actions AWAY from easy reach
168
- ```
169
-
170
- ### Thumb Zone (One-Handed Usage)
171
-
172
- ```
173
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
174
- โ”‚ HARD TO REACH โ”‚ โ† Navigation, menu, back
175
- โ”‚ (stretch) โ”‚
176
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
177
- โ”‚ OK TO REACH โ”‚ โ† Secondary actions
178
- โ”‚ (natural) โ”‚
179
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
180
- โ”‚ EASY TO REACH โ”‚ โ† PRIMARY CTAs, tab bar
181
- โ”‚ (thumb's natural arc) โ”‚ โ† Main content interaction
182
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
183
- [ HOME ]
184
- ```
185
-
186
- ### Mobile-Specific Cognitive Load
187
-
188
- | Desktop | Mobile Difference |
189
- |---------|-------------------|
190
- | Multiple windows | ONE task at a time |
191
- | Keyboard shortcuts | Touch gestures |
192
- | Hover states | NO hover (tap or nothing) |
193
- | Large viewport | Limited space, scroll vertical |
194
- | Stable attention | Interrupted constantly |
195
-
196
- For deep dive: [touch-psychology.md](touch-psychology.md)
110
+ ### On-Device AI UX Patterns
111
+ - **Zero-Wait Illusion:** When a model is running, immediately populate the UI with contextual guesses or streaming tokens.
112
+ - **Progressive Disclosure of Confidence:** If AI confidence is low, the UI should reflect uncertainty visually (softer colors, explicit confirmation required).
197
113
 
198
114
  ---
199
115
 
200
- ## โšก Performance Principles (Quick Reference)
116
+ ## โšก Performance Extremis (Quick Reference)
201
117
 
202
- ### React Native Critical Rules
118
+ ### 120Hz Animation Mandate
119
+ If your animation drops below 120fps on modern hardware, it's failed.
120
+ - GPU-accelerated ONLY: `transform` (translate, scale, rotate) and `opacity`.
121
+ - CPU-bound AVOID: `width`, `height`, `margin`, `top/left/bottom/right`.
122
+ - React Native: MUST use Reanimated 3+ worklets for all motion; `Animated` API is legacy.
203
123
 
124
+ ### React Native Critical Rules
204
125
  ```typescript
205
- // โœ… CORRECT: Memoized renderItem + React.memo wrapper
206
- const ListItem = React.memo(({ item }: { item: Item }) => (
207
- <View style={styles.item}>
208
- <Text>{item.title}</Text>
209
- </View>
210
- ));
211
-
212
- const renderItem = useCallback(
213
- ({ item }: { item: Item }) => <ListItem item={item} />,
214
- []
215
- );
216
-
217
- // โœ… CORRECT: FlatList with all optimizations
218
- <FlatList
126
+ // โœ… CORRECT: FlashList for extreme performance
127
+ <FlashList
219
128
  data={items}
220
129
  renderItem={renderItem}
221
- keyExtractor={(item) => item.id} // Stable ID, NOT index
222
- getItemLayout={(data, index) => ({
223
- length: ITEM_HEIGHT,
224
- offset: ITEM_HEIGHT * index,
225
- index,
226
- })}
227
- removeClippedSubviews={true}
228
- maxToRenderPerBatch={10}
229
- windowSize={5}
130
+ estimatedItemSize={100} // CRITICAL for FlashList
131
+ keyExtractor={(item) => item.id}
230
132
  />
231
133
  ```
232
134
 
233
- ### Flutter Critical Rules
234
-
235
- ```dart
236
- // โœ… CORRECT: const constructors prevent rebuilds
237
- class MyWidget extends StatelessWidget {
238
- const MyWidget({super.key}); // CONST!
239
-
240
- @override
241
- Widget build(BuildContext context) {
242
- return const Column( // CONST!
243
- children: [
244
- Text('Static content'),
245
- MyConstantWidget(),
246
- ],
247
- );
248
- }
249
- }
250
-
251
- // โœ… CORRECT: Targeted state with ValueListenableBuilder
252
- ValueListenableBuilder<int>(
253
- valueListenable: counter,
254
- builder: (context, value, child) => Text('$value'),
255
- child: const ExpensiveWidget(), // Won't rebuild!
256
- )
257
- ```
258
-
259
- ### Animation Performance
260
-
261
- ```
262
- GPU-accelerated (FAST): CPU-bound (SLOW):
263
- โ”œโ”€โ”€ transform โ”œโ”€โ”€ width, height
264
- โ”œโ”€โ”€ opacity โ”œโ”€โ”€ top, left, right, bottom
265
- โ””โ”€โ”€ (use these ONLY) โ”œโ”€โ”€ margin, padding
266
- โ””โ”€โ”€ (AVOID animating these)
267
- ```
268
-
269
- For complete guide: [mobile-performance.md](mobile-performance.md)
270
-
271
135
  ---
272
136
 
273
137
  ## ๐Ÿ“ CHECKPOINT (MANDATORY Before Any Mobile Work)
@@ -277,118 +141,74 @@ For complete guide: [mobile-performance.md](mobile-performance.md)
277
141
  ```
278
142
  ๐Ÿง  CHECKPOINT:
279
143
 
280
- Platform: [ iOS / Android / Both ]
281
- Framework: [ React Native / Flutter / SwiftUI / Kotlin ]
282
- Files Read: [ List the skill files you've read ]
144
+ Platform target: [ iOS / Android / Foldable / Spatial ]
145
+ Hardware expectation:[ 60Hz / 120Hz ]
146
+ Haptic Strategy: [ Define trigger points ]
283
147
 
284
- 3 Principles I Will Apply:
148
+ 3 Extreme Principles I Will Apply:
285
149
  1. _______________
286
150
  2. _______________
287
151
  3. _______________
288
-
289
- Anti-Patterns I Will Avoid:
290
- 1. _______________
291
- 2. _______________
292
- ```
293
-
294
- **Example:**
295
152
  ```
296
- ๐Ÿง  CHECKPOINT:
297
-
298
- Platform: iOS + Android (Cross-platform)
299
- Framework: React Native + Expo
300
- Files Read: touch-psychology.md, mobile-performance.md, platform-ios.md, platform-android.md
301
153
 
302
- 3 Principles I Will Apply:
303
- 1. FlatList with React.memo + useCallback for all lists
304
- 2. 48px touch targets, thumb zone for primary CTAs
305
- 3. Platform-specific navigation (edge swipe iOS, back button Android)
306
-
307
- Anti-Patterns I Will Avoid:
308
- 1. ScrollView for lists โ†’ FlatList
309
- 2. Inline renderItem โ†’ Memoized
310
- 3. AsyncStorage for tokens โ†’ SecureStore
311
- ```
312
-
313
- > ๐Ÿ”ด **Can't fill the checkpoint? โ†’ GO BACK AND READ THE SKILL FILES.**
154
+ > **Remember:** You are designing for a piece of glass that people stare at for 6 hours a day. Battery life, touch precision, and 120Hz fluidity are not optional features; they are the medium itself.
314
155
 
315
156
  ---
316
157
 
317
- ## ๐Ÿ”ง Framework Decision Tree
158
+ ## Output Format
159
+
160
+ When this skill produces a recommendation or design decision, structure your output as:
318
161
 
319
162
  ```
320
- WHAT ARE YOU BUILDING?
321
- โ”‚
322
- โ”œโ”€โ”€ Need OTA updates + rapid iteration + web team
323
- โ”‚ โ””โ”€โ”€ โœ… React Native + Expo
324
- โ”‚
325
- โ”œโ”€โ”€ Need pixel-perfect custom UI + performance critical
326
- โ”‚ โ””โ”€โ”€ โœ… Flutter
327
- โ”‚
328
- โ”œโ”€โ”€ Deep native features + single platform focus
329
- โ”‚ โ”œโ”€โ”€ iOS only โ†’ SwiftUI
330
- โ”‚ โ””โ”€โ”€ Android only โ†’ Kotlin + Jetpack Compose
331
- โ”‚
332
- โ”œโ”€โ”€ Existing RN codebase + new features
333
- โ”‚ โ””โ”€โ”€ โœ… React Native (bare workflow)
334
- โ”‚
335
- โ””โ”€โ”€ Enterprise + existing Flutter codebase
336
- โ””โ”€โ”€ โœ… Flutter
163
+ โ”โ”โ” Mobile Design Recommendation โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
164
+ Decision: [what was chosen / proposed]
165
+ Rationale: [why โ€” one concise line]
166
+ Trade-offs: [what is consciously accepted]
167
+ Next action: [concrete next step for the user]
168
+ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
169
+ Pre-Flight: โœ… All checks passed
170
+ or โŒ [blocking item that must be resolved first]
337
171
  ```
338
172
 
339
- For complete decision trees: [decision-trees.md](decision-trees.md)
340
173
 
341
- ---
342
174
 
343
- ## ๐Ÿ“‹ Pre-Development Checklist
175
+ ---
344
176
 
345
- ### Before Starting ANY Mobile Project
177
+ ## ๐Ÿค– LLM-Specific Traps
346
178
 
347
- - [ ] **Platform confirmed?** (iOS / Android / Both)
348
- - [ ] **Framework chosen?** (RN / Flutter / Native)
349
- - [ ] **Navigation pattern decided?** (Tabs / Stack / Drawer)
350
- - [ ] **State management selected?** (Zustand / Redux / Riverpod / BLoC)
351
- - [ ] **Offline requirements known?**
352
- - [ ] **Deep linking planned from day one?**
353
- - [ ] **Target devices defined?** (Phone / Tablet / Both)
179
+ AI coding assistants often fall into specific bad habits when dealing with this domain. These are strictly forbidden:
354
180
 
355
- ### Before Every Screen
181
+ 1. **Over-engineering:** Proposing complex abstractions or distributed systems when a simpler approach suffices.
182
+ 2. **Hallucinated Libraries/Methods:** Using non-existent methods or packages. Always `// VERIFY` or check `package.json` / `requirements.txt`.
183
+ 3. **Skipping Edge Cases:** Writing the "happy path" and ignoring error handling, timeouts, or data validation.
184
+ 4. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
185
+ 5. **Silent Degradation:** Catching and suppressing errors without logging or re-raising.
356
186
 
357
- - [ ] **Touch targets โ‰ฅ 44-48px?**
358
- - [ ] **Primary CTA in thumb zone?**
359
- - [ ] **Loading state exists?**
360
- - [ ] **Error state with retry exists?**
361
- - [ ] **Offline handling considered?**
362
- - [ ] **Platform conventions followed?**
187
+ ---
363
188
 
364
- ### Before Release
189
+ ## ๐Ÿ›๏ธ Tribunal Integration (Anti-Hallucination)
365
190
 
366
- - [ ] **console.log removed?**
367
- - [ ] **SecureStore for sensitive data?**
368
- - [ ] **SSL pinning enabled?**
369
- - [ ] **Lists optimized (memo, keyExtractor)?**
370
- - [ ] **Memory cleanup on unmount?**
371
- - [ ] **Tested on low-end devices?**
372
- - [ ] **Accessibility labels on all interactive elements?**
191
+ **Slash command: `/review` or `/tribunal-full`**
192
+ **Active reviewers: `logic-reviewer` ยท `security-auditor`**
373
193
 
374
- ---
194
+ ### โŒ Forbidden AI Tropes
375
195
 
376
- ## ๐Ÿ“š Reference Files
196
+ 1. **Blind Assumptions:** Never make an assumption without documenting it clearly with `// VERIFY: [reason]`.
197
+ 2. **Silent Degradation:** Catching and suppressing errors without logging or handling.
198
+ 3. **Context Amnesia:** Forgetting the user's constraints and offering generic advice instead of tailored solutions.
377
199
 
378
- For deeper guidance on specific areas:
200
+ ### โœ… Pre-Flight Self-Audit
379
201
 
380
- | File | When to Use |
381
- |------|-------------|
382
- | [mobile-design-thinking.md](mobile-design-thinking.md) | **FIRST! Anti-memorization, forces context-based thinking** |
383
- | [touch-psychology.md](touch-psychology.md) | Understanding touch interaction, Fitts' Law, gesture design |
384
- | [mobile-performance.md](mobile-performance.md) | Optimizing RN/Flutter, 60fps, memory/battery |
385
- | [platform-ios.md](platform-ios.md) | iOS-specific design, HIG compliance |
386
- | [platform-android.md](platform-android.md) | Android-specific design, Material Design 3 |
387
- | [mobile-navigation.md](mobile-navigation.md) | Navigation patterns, deep linking |
388
- | [mobile-typography.md](mobile-typography.md) | Type scale, system fonts, accessibility |
389
- | [mobile-color-system.md](mobile-color-system.md) | OLED optimization, dark mode, battery |
390
- | [decision-trees.md](decision-trees.md) | Framework, state, storage decisions |
202
+ Review these questions before confirming output:
203
+ ```
204
+ โœ… Did I rely ONLY on real, verified tools and methods?
205
+ โœ… Is this solution appropriately scoped to the user's constraints?
206
+ โœ… Did I handle potential failure modes and edge cases?
207
+ โœ… Have I avoided generic boilerplate that doesn't add value?
208
+ ```
391
209
 
392
- ---
210
+ ### ๐Ÿ›‘ Verification-Before-Completion (VBC) Protocol
393
211
 
394
- > **Remember:** Mobile users are impatient, interrupted, and using imprecise fingers on small screens. Design for the WORST conditions: bad network, one hand, bright sun, low battery. If it works there, it works everywhere.
212
+ **CRITICAL:** You must follow a strict "evidence-based closeout" state machine.
213
+ - โŒ **Forbidden:** Declaring a task complete because the output "looks correct."
214
+ - โœ… **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.