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.
- package/.agent/.shared/ui-ux-pro-max/README.md +3 -3
- package/.agent/ARCHITECTURE.md +205 -10
- package/.agent/GEMINI.md +37 -7
- package/.agent/agents/accessibility-reviewer.md +134 -0
- package/.agent/agents/ai-code-reviewer.md +129 -0
- package/.agent/agents/frontend-specialist.md +3 -0
- package/.agent/agents/game-developer.md +21 -21
- package/.agent/agents/logic-reviewer.md +12 -0
- package/.agent/agents/mobile-reviewer.md +79 -0
- package/.agent/agents/orchestrator.md +56 -26
- package/.agent/agents/performance-reviewer.md +36 -0
- package/.agent/agents/supervisor-agent.md +156 -0
- package/.agent/agents/swarm-worker-contracts.md +166 -0
- package/.agent/agents/swarm-worker-registry.md +92 -0
- package/.agent/rules/GEMINI.md +134 -5
- package/.agent/scripts/bundle_analyzer.py +259 -0
- package/.agent/scripts/dependency_analyzer.py +247 -0
- package/.agent/scripts/lint_runner.py +188 -0
- package/.agent/scripts/patch_skills_meta.py +177 -0
- package/.agent/scripts/patch_skills_output.py +285 -0
- package/.agent/scripts/schema_validator.py +279 -0
- package/.agent/scripts/security_scan.py +224 -0
- package/.agent/scripts/session_manager.py +144 -3
- package/.agent/scripts/skill_integrator.py +234 -0
- package/.agent/scripts/strengthen_skills.py +220 -0
- package/.agent/scripts/swarm_dispatcher.py +317 -0
- package/.agent/scripts/test_runner.py +192 -0
- package/.agent/scripts/test_swarm_dispatcher.py +163 -0
- package/.agent/skills/agent-organizer/SKILL.md +132 -0
- package/.agent/skills/agentic-patterns/SKILL.md +335 -0
- package/.agent/skills/api-patterns/SKILL.md +226 -50
- package/.agent/skills/app-builder/SKILL.md +215 -52
- package/.agent/skills/architecture/SKILL.md +176 -31
- package/.agent/skills/bash-linux/SKILL.md +150 -134
- package/.agent/skills/behavioral-modes/SKILL.md +152 -160
- package/.agent/skills/brainstorming/SKILL.md +148 -101
- package/.agent/skills/brainstorming/dynamic-questioning.md +10 -0
- package/.agent/skills/clean-code/SKILL.md +139 -134
- package/.agent/skills/code-review-checklist/SKILL.md +177 -80
- package/.agent/skills/config-validator/SKILL.md +165 -0
- package/.agent/skills/csharp-developer/SKILL.md +107 -0
- package/.agent/skills/database-design/SKILL.md +252 -29
- package/.agent/skills/deployment-procedures/SKILL.md +122 -175
- package/.agent/skills/devops-engineer/SKILL.md +134 -0
- package/.agent/skills/devops-incident-responder/SKILL.md +98 -0
- package/.agent/skills/documentation-templates/SKILL.md +175 -121
- package/.agent/skills/dotnet-core-expert/SKILL.md +103 -0
- package/.agent/skills/edge-computing/SKILL.md +213 -0
- package/.agent/skills/frontend-design/SKILL.md +76 -0
- package/.agent/skills/frontend-design/color-system.md +18 -0
- package/.agent/skills/frontend-design/typography-system.md +18 -0
- package/.agent/skills/game-development/SKILL.md +69 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +158 -99
- package/.agent/skills/github-operations/SKILL.md +354 -0
- package/.agent/skills/i18n-localization/SKILL.md +158 -96
- package/.agent/skills/intelligent-routing/SKILL.md +89 -285
- package/.agent/skills/intelligent-routing/router-manifest.md +65 -0
- package/.agent/skills/lint-and-validate/SKILL.md +229 -27
- package/.agent/skills/llm-engineering/SKILL.md +258 -0
- package/.agent/skills/local-first/SKILL.md +203 -0
- package/.agent/skills/mcp-builder/SKILL.md +159 -111
- package/.agent/skills/mobile-design/SKILL.md +102 -282
- package/.agent/skills/nextjs-react-expert/SKILL.md +143 -227
- package/.agent/skills/nodejs-best-practices/SKILL.md +201 -254
- package/.agent/skills/observability/SKILL.md +285 -0
- package/.agent/skills/parallel-agents/SKILL.md +124 -118
- package/.agent/skills/performance-profiling/SKILL.md +143 -89
- package/.agent/skills/plan-writing/SKILL.md +133 -97
- package/.agent/skills/platform-engineer/SKILL.md +135 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -104
- package/.agent/skills/python-patterns/SKILL.md +149 -361
- package/.agent/skills/python-pro/SKILL.md +114 -0
- package/.agent/skills/react-specialist/SKILL.md +107 -0
- package/.agent/skills/readme-builder/SKILL.md +270 -0
- package/.agent/skills/realtime-patterns/SKILL.md +296 -0
- package/.agent/skills/red-team-tactics/SKILL.md +136 -134
- package/.agent/skills/rust-pro/SKILL.md +237 -173
- package/.agent/skills/seo-fundamentals/SKILL.md +134 -82
- package/.agent/skills/server-management/SKILL.md +155 -104
- package/.agent/skills/sql-pro/SKILL.md +104 -0
- package/.agent/skills/systematic-debugging/SKILL.md +156 -79
- package/.agent/skills/tailwind-patterns/SKILL.md +163 -205
- package/.agent/skills/tdd-workflow/SKILL.md +148 -88
- package/.agent/skills/test-result-analyzer/SKILL.md +299 -0
- package/.agent/skills/testing-patterns/SKILL.md +141 -114
- package/.agent/skills/trend-researcher/SKILL.md +228 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +107 -0
- package/.agent/skills/ui-ux-researcher/SKILL.md +234 -0
- package/.agent/skills/vue-expert/SKILL.md +118 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +228 -188
- package/.agent/skills/web-design-guidelines/SKILL.md +148 -33
- package/.agent/skills/webapp-testing/SKILL.md +171 -122
- package/.agent/skills/whimsy-injector/SKILL.md +349 -0
- package/.agent/skills/workflow-optimizer/SKILL.md +219 -0
- package/.agent/workflows/api-tester.md +279 -0
- package/.agent/workflows/audit.md +168 -0
- package/.agent/workflows/brainstorm.md +65 -19
- package/.agent/workflows/changelog.md +144 -0
- package/.agent/workflows/create.md +67 -14
- package/.agent/workflows/debug.md +122 -30
- package/.agent/workflows/deploy.md +82 -31
- package/.agent/workflows/enhance.md +59 -27
- package/.agent/workflows/fix.md +143 -0
- package/.agent/workflows/generate.md +84 -20
- package/.agent/workflows/migrate.md +163 -0
- package/.agent/workflows/orchestrate.md +66 -17
- package/.agent/workflows/performance-benchmarker.md +305 -0
- package/.agent/workflows/plan.md +76 -33
- package/.agent/workflows/preview.md +73 -17
- package/.agent/workflows/refactor.md +153 -0
- package/.agent/workflows/review-ai.md +140 -0
- package/.agent/workflows/review.md +83 -16
- package/.agent/workflows/session.md +154 -0
- package/.agent/workflows/status.md +74 -18
- package/.agent/workflows/strengthen-skills.md +99 -0
- package/.agent/workflows/swarm.md +194 -0
- package/.agent/workflows/test.md +80 -31
- package/.agent/workflows/tribunal-backend.md +55 -13
- package/.agent/workflows/tribunal-database.md +62 -18
- package/.agent/workflows/tribunal-frontend.md +58 -12
- package/.agent/workflows/tribunal-full.md +70 -11
- package/.agent/workflows/tribunal-mobile.md +123 -0
- package/.agent/workflows/tribunal-performance.md +152 -0
- package/.agent/workflows/ui-ux-pro-max.md +100 -82
- package/README.md +117 -62
- package/bin/tribunal-kit.js +542 -288
- package/package.json +10 -6
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mobile-design
|
|
3
|
-
description: Mobile-first design thinking
|
|
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.
|
|
10
|
-
> **Core Principle:** Mobile is NOT a small desktop. THINK
|
|
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
|
-
| **[
|
|
34
|
-
| **[
|
|
35
|
-
| **[
|
|
36
|
-
| **[mobile-
|
|
37
|
-
|
|
|
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
|
-
| **
|
|
68
|
-
| **
|
|
69
|
-
| **
|
|
70
|
-
| **
|
|
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
|
-
| **
|
|
83
|
-
| **
|
|
84
|
-
| **
|
|
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 <
|
|
96
|
-
| **
|
|
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
|
-
## ๐ฑ
|
|
82
|
+
## ๐ฑ Hardware & Context Adaptation
|
|
124
83
|
|
|
125
|
-
###
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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
|
|
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
|
-
|
|
163
|
-
|
|
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
|
|
116
|
+
## โก Performance Extremis (Quick Reference)
|
|
201
117
|
|
|
202
|
-
###
|
|
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:
|
|
206
|
-
|
|
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
|
-
|
|
222
|
-
|
|
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 /
|
|
281
|
-
|
|
282
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
158
|
+
## Output Format
|
|
159
|
+
|
|
160
|
+
When this skill produces a recommendation or design decision, structure your output as:
|
|
318
161
|
|
|
319
162
|
```
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
-
|
|
175
|
+
---
|
|
344
176
|
|
|
345
|
-
|
|
177
|
+
## ๐ค LLM-Specific Traps
|
|
346
178
|
|
|
347
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
189
|
+
## ๐๏ธ Tribunal Integration (Anti-Hallucination)
|
|
365
190
|
|
|
366
|
-
|
|
367
|
-
|
|
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
|
-
|
|
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
|
-
|
|
200
|
+
### โ
Pre-Flight Self-Audit
|
|
379
201
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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
|
-
|
|
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.
|