tribunal-kit 3.0.0 β†’ 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/.agent/ARCHITECTURE.md +99 -99
  2. package/.agent/GEMINI.md +52 -52
  3. package/.agent/agents/accessibility-reviewer.md +187 -220
  4. package/.agent/agents/ai-code-reviewer.md +199 -233
  5. package/.agent/agents/backend-specialist.md +215 -238
  6. package/.agent/agents/code-archaeologist.md +161 -181
  7. package/.agent/agents/database-architect.md +184 -207
  8. package/.agent/agents/debugger.md +191 -218
  9. package/.agent/agents/dependency-reviewer.md +103 -136
  10. package/.agent/agents/devops-engineer.md +218 -238
  11. package/.agent/agents/documentation-writer.md +201 -221
  12. package/.agent/agents/explorer-agent.md +160 -180
  13. package/.agent/agents/frontend-reviewer.md +160 -194
  14. package/.agent/agents/frontend-specialist.md +248 -237
  15. package/.agent/agents/game-developer.md +48 -52
  16. package/.agent/agents/logic-reviewer.md +116 -149
  17. package/.agent/agents/mobile-developer.md +200 -223
  18. package/.agent/agents/mobile-reviewer.md +162 -195
  19. package/.agent/agents/orchestrator.md +181 -211
  20. package/.agent/agents/penetration-tester.md +157 -174
  21. package/.agent/agents/performance-optimizer.md +183 -203
  22. package/.agent/agents/performance-reviewer.md +178 -211
  23. package/.agent/agents/precedence-reviewer.md +213 -0
  24. package/.agent/agents/product-manager.md +142 -162
  25. package/.agent/agents/product-owner.md +6 -25
  26. package/.agent/agents/project-planner.md +142 -162
  27. package/.agent/agents/qa-automation-engineer.md +225 -242
  28. package/.agent/agents/security-auditor.md +174 -194
  29. package/.agent/agents/seo-specialist.md +193 -213
  30. package/.agent/agents/sql-reviewer.md +161 -194
  31. package/.agent/agents/supervisor-agent.md +184 -203
  32. package/.agent/agents/swarm-worker-contracts.md +17 -17
  33. package/.agent/agents/swarm-worker-registry.md +46 -46
  34. package/.agent/agents/test-coverage-reviewer.md +160 -193
  35. package/.agent/agents/test-engineer.md +0 -21
  36. package/.agent/agents/type-safety-reviewer.md +175 -208
  37. package/.agent/patterns/generator.md +9 -9
  38. package/.agent/patterns/inversion.md +12 -12
  39. package/.agent/patterns/pipeline.md +9 -9
  40. package/.agent/patterns/reviewer.md +13 -13
  41. package/.agent/patterns/tool-wrapper.md +9 -9
  42. package/.agent/rules/GEMINI.md +63 -63
  43. package/.agent/scripts/append_flow.js +72 -0
  44. package/.agent/scripts/case_law_manager.py +525 -0
  45. package/.agent/scripts/compress_skills.py +167 -0
  46. package/.agent/scripts/consolidate_skills.py +173 -0
  47. package/.agent/scripts/deep_compress.py +202 -0
  48. package/.agent/scripts/minify_context.py +80 -0
  49. package/.agent/scripts/security_scan.py +1 -1
  50. package/.agent/scripts/skill_evolution.py +563 -0
  51. package/.agent/scripts/strip_tribunal.py +41 -0
  52. package/.agent/skills/agent-organizer/SKILL.md +100 -126
  53. package/.agent/skills/agentic-patterns/SKILL.md +0 -70
  54. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +134 -160
  55. package/.agent/skills/api-patterns/SKILL.md +123 -215
  56. package/.agent/skills/api-security-auditor/SKILL.md +143 -177
  57. package/.agent/skills/app-builder/SKILL.md +334 -50
  58. package/.agent/skills/app-builder/templates/SKILL.md +13 -15
  59. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +16 -16
  60. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +22 -22
  61. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +18 -18
  62. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +20 -20
  63. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +17 -17
  64. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +18 -18
  65. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +21 -21
  66. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +19 -19
  67. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +26 -26
  68. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +26 -26
  69. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +19 -19
  70. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +18 -18
  71. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +20 -20
  72. package/.agent/skills/appflow-wireframe/SKILL.md +95 -121
  73. package/.agent/skills/architecture/SKILL.md +169 -331
  74. package/.agent/skills/authentication-best-practices/SKILL.md +139 -173
  75. package/.agent/skills/bash-linux/SKILL.md +129 -154
  76. package/.agent/skills/behavioral-modes/SKILL.md +8 -69
  77. package/.agent/skills/brainstorming/SKILL.md +436 -104
  78. package/.agent/skills/building-native-ui/SKILL.md +152 -174
  79. package/.agent/skills/clean-code/SKILL.md +331 -360
  80. package/.agent/skills/code-review-checklist/SKILL.md +0 -62
  81. package/.agent/skills/config-validator/SKILL.md +115 -141
  82. package/.agent/skills/csharp-developer/SKILL.md +468 -528
  83. package/.agent/skills/database-design/SKILL.md +104 -369
  84. package/.agent/skills/deployment-procedures/SKILL.md +119 -145
  85. package/.agent/skills/devops-engineer/SKILL.md +295 -332
  86. package/.agent/skills/devops-incident-responder/SKILL.md +87 -113
  87. package/.agent/skills/doc.md +5 -5
  88. package/.agent/skills/documentation-templates/SKILL.md +27 -63
  89. package/.agent/skills/edge-computing/SKILL.md +131 -157
  90. package/.agent/skills/extract-design-system/SKILL.md +108 -134
  91. package/.agent/skills/framer-motion-expert/SKILL.md +111 -855
  92. package/.agent/skills/frontend-design/SKILL.md +151 -499
  93. package/.agent/skills/game-design-expert/SKILL.md +79 -105
  94. package/.agent/skills/game-engineering-expert/SKILL.md +96 -122
  95. package/.agent/skills/geo-fundamentals/SKILL.md +97 -124
  96. package/.agent/skills/github-operations/SKILL.md +279 -314
  97. package/.agent/skills/gsap-expert/SKILL.md +119 -826
  98. package/.agent/skills/i18n-localization/SKILL.md +113 -138
  99. package/.agent/skills/intelligent-routing/SKILL.md +167 -127
  100. package/.agent/skills/lint-and-validate/SKILL.md +16 -52
  101. package/.agent/skills/llm-engineering/SKILL.md +344 -357
  102. package/.agent/skills/local-first/SKILL.md +128 -154
  103. package/.agent/skills/mcp-builder/SKILL.md +92 -118
  104. package/.agent/skills/mobile-design/SKILL.md +213 -219
  105. package/.agent/skills/motion-engineering/SKILL.md +184 -0
  106. package/.agent/skills/nextjs-react-expert/SKILL.md +99 -698
  107. package/.agent/skills/nodejs-best-practices/SKILL.md +498 -559
  108. package/.agent/skills/observability/SKILL.md +293 -330
  109. package/.agent/skills/parallel-agents/SKILL.md +96 -122
  110. package/.agent/skills/performance-profiling/SKILL.md +217 -254
  111. package/.agent/skills/plan-writing/SKILL.md +92 -118
  112. package/.agent/skills/platform-engineer/SKILL.md +97 -123
  113. package/.agent/skills/playwright-best-practices/SKILL.md +137 -162
  114. package/.agent/skills/powershell-windows/SKILL.md +112 -146
  115. package/.agent/skills/project-idioms/SKILL.md +87 -0
  116. package/.agent/skills/python-patterns/SKILL.md +15 -35
  117. package/.agent/skills/python-pro/SKILL.md +148 -754
  118. package/.agent/skills/react-specialist/SKILL.md +123 -827
  119. package/.agent/skills/readme-builder/SKILL.md +23 -85
  120. package/.agent/skills/realtime-patterns/SKILL.md +269 -304
  121. package/.agent/skills/red-team-tactics/SKILL.md +18 -51
  122. package/.agent/skills/rust-pro/SKILL.md +623 -701
  123. package/.agent/skills/seo-fundamentals/SKILL.md +129 -154
  124. package/.agent/skills/server-management/SKILL.md +164 -190
  125. package/.agent/skills/shadcn-ui-expert/SKILL.md +181 -206
  126. package/.agent/skills/skill-creator/SKILL.md +24 -56
  127. package/.agent/skills/sql-pro/SKILL.md +579 -633
  128. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +35 -66
  129. package/.agent/skills/swiftui-expert/SKILL.md +151 -176
  130. package/.agent/skills/systematic-debugging/SKILL.md +92 -118
  131. package/.agent/skills/tailwind-patterns/SKILL.md +516 -576
  132. package/.agent/skills/tdd-workflow/SKILL.md +111 -137
  133. package/.agent/skills/test-result-analyzer/SKILL.md +33 -73
  134. package/.agent/skills/testing-patterns/SKILL.md +512 -573
  135. package/.agent/skills/trend-researcher/SKILL.md +30 -71
  136. package/.agent/skills/ui-ux-pro-max/SKILL.md +8 -41
  137. package/.agent/skills/ui-ux-researcher/SKILL.md +51 -91
  138. package/.agent/skills/vue-expert/SKILL.md +127 -866
  139. package/.agent/skills/vulnerability-scanner/SKILL.md +354 -269
  140. package/.agent/skills/web-accessibility-auditor/SKILL.md +168 -193
  141. package/.agent/skills/web-design-guidelines/SKILL.md +25 -61
  142. package/.agent/skills/webapp-testing/SKILL.md +119 -145
  143. package/.agent/skills/whimsy-injector/SKILL.md +58 -132
  144. package/.agent/skills/workflow-optimizer/SKILL.md +28 -68
  145. package/.agent/workflows/api-tester.md +151 -151
  146. package/.agent/workflows/audit.md +127 -138
  147. package/.agent/workflows/brainstorm.md +110 -110
  148. package/.agent/workflows/changelog.md +112 -112
  149. package/.agent/workflows/create.md +124 -124
  150. package/.agent/workflows/debug.md +165 -189
  151. package/.agent/workflows/deploy.md +180 -189
  152. package/.agent/workflows/enhance.md +128 -151
  153. package/.agent/workflows/fix.md +114 -135
  154. package/.agent/workflows/generate.md +13 -4
  155. package/.agent/workflows/migrate.md +160 -160
  156. package/.agent/workflows/orchestrate.md +168 -168
  157. package/.agent/workflows/performance-benchmarker.md +114 -123
  158. package/.agent/workflows/plan.md +173 -173
  159. package/.agent/workflows/preview.md +80 -80
  160. package/.agent/workflows/refactor.md +161 -183
  161. package/.agent/workflows/review-ai.md +101 -129
  162. package/.agent/workflows/review.md +116 -116
  163. package/.agent/workflows/session.md +94 -94
  164. package/.agent/workflows/status.md +79 -79
  165. package/.agent/workflows/strengthen-skills.md +138 -139
  166. package/.agent/workflows/swarm.md +179 -179
  167. package/.agent/workflows/test.md +189 -211
  168. package/.agent/workflows/tribunal-backend.md +94 -113
  169. package/.agent/workflows/tribunal-database.md +95 -115
  170. package/.agent/workflows/tribunal-frontend.md +96 -118
  171. package/.agent/workflows/tribunal-full.md +93 -133
  172. package/.agent/workflows/tribunal-mobile.md +95 -119
  173. package/.agent/workflows/tribunal-performance.md +110 -133
  174. package/.agent/workflows/ui-ux-pro-max.md +122 -143
  175. package/README.md +30 -1
  176. package/bin/tribunal-kit.js +175 -12
  177. package/package.json +25 -4
  178. package/.agent/skills/api-patterns/api-style.md +0 -42
  179. package/.agent/skills/api-patterns/auth.md +0 -24
  180. package/.agent/skills/api-patterns/documentation.md +0 -26
  181. package/.agent/skills/api-patterns/graphql.md +0 -41
  182. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  183. package/.agent/skills/api-patterns/response.md +0 -37
  184. package/.agent/skills/api-patterns/rest.md +0 -40
  185. package/.agent/skills/api-patterns/security-testing.md +0 -122
  186. package/.agent/skills/api-patterns/trpc.md +0 -41
  187. package/.agent/skills/api-patterns/versioning.md +0 -22
  188. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  189. package/.agent/skills/app-builder/feature-building.md +0 -53
  190. package/.agent/skills/app-builder/project-detection.md +0 -34
  191. package/.agent/skills/app-builder/scaffolding.md +0 -118
  192. package/.agent/skills/app-builder/tech-stack.md +0 -40
  193. package/.agent/skills/architecture/context-discovery.md +0 -43
  194. package/.agent/skills/architecture/examples.md +0 -94
  195. package/.agent/skills/architecture/pattern-selection.md +0 -68
  196. package/.agent/skills/architecture/patterns-reference.md +0 -50
  197. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  198. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -360
  199. package/.agent/skills/database-design/database-selection.md +0 -43
  200. package/.agent/skills/database-design/indexing.md +0 -39
  201. package/.agent/skills/database-design/migrations.md +0 -48
  202. package/.agent/skills/database-design/optimization.md +0 -36
  203. package/.agent/skills/database-design/orm-selection.md +0 -30
  204. package/.agent/skills/database-design/schema-design.md +0 -56
  205. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  206. package/.agent/skills/frontend-design/color-system.md +0 -329
  207. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  208. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  209. package/.agent/skills/frontend-design/typography-system.md +0 -363
  210. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  211. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  212. package/.agent/skills/intelligent-routing/router-manifest.md +0 -65
  213. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  214. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  215. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  216. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  217. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  218. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  219. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  220. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  221. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  222. package/.agent/skills/mobile-design/platform-android.md +0 -666
  223. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  224. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  225. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  226. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  227. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  228. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  229. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  230. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  231. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  232. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  233. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
@@ -1,420 +0,0 @@
1
- # Mobile Color System Reference
2
-
3
- > OLED optimization, dark mode, battery-aware colors, and outdoor visibility.
4
- > **Color on mobile isn't just aestheticsβ€”it's battery life and usability.**
5
-
6
- ---
7
-
8
- ## 1. Mobile Color Fundamentals
9
-
10
- ### Why Mobile Color is Different
11
-
12
- ```
13
- DESKTOP: MOBILE:
14
- β”œβ”€β”€ LCD screens (backlit) β”œβ”€β”€ OLED common (self-emissive)
15
- β”œβ”€β”€ Controlled lighting β”œβ”€β”€ Outdoor, bright sun
16
- β”œβ”€β”€ Stable power β”œβ”€β”€ Battery matters
17
- β”œβ”€β”€ Personal preference β”œβ”€β”€ System-wide dark mode
18
- └── Static viewing └── Variable angles, motion
19
- ```
20
-
21
- ### Mobile Color Priorities
22
-
23
- | Priority | Why |
24
- |----------|-----|
25
- | **1. Readability** | Outdoor, variable lighting |
26
- | **2. Battery efficiency** | OLED = dark mode saves power |
27
- | **3. System integration** | Dark/light mode support |
28
- | **4. Semantics** | Error, success, warning colors |
29
- | **5. Brand** | After functional requirements |
30
-
31
- ---
32
-
33
- ## 2. OLED Considerations
34
-
35
- ### How OLED Differs
36
-
37
- ```
38
- LCD (Liquid Crystal Display):
39
- β”œβ”€β”€ Backlight always on
40
- β”œβ”€β”€ Black = backlight through dark filter
41
- β”œβ”€β”€ Energy use = constant
42
- └── Dark mode = no battery savings
43
-
44
- OLED (Organic LED):
45
- β”œβ”€β”€ Each pixel emits own light
46
- β”œβ”€β”€ Black = pixel OFF (zero power)
47
- β”œβ”€β”€ Energy use = brighter pixels use more
48
- └── Dark mode = significant battery savings
49
- ```
50
-
51
- ### Battery Savings with OLED
52
-
53
- ```
54
- Color energy consumption (relative):
55
-
56
- #000000 (True Black) β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘ 0%
57
- #1A1A1A (Near Black) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘ ~15%
58
- #333333 (Dark Gray) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘ ~30%
59
- #666666 (Medium Gray) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘ ~50%
60
- #FFFFFF (White) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
61
-
62
- Saturated colors also use significant power:
63
- β”œβ”€β”€ Blue pixels: Most efficient
64
- β”œβ”€β”€ Green pixels: Medium
65
- β”œβ”€β”€ Red pixels: Least efficient
66
- └── Desaturated colors save more
67
- ```
68
-
69
- ### True Black vs Near Black
70
-
71
- ```
72
- #000000 (True Black):
73
- β”œβ”€β”€ Maximum battery savings
74
- β”œβ”€β”€ Can cause "black smear" on scroll
75
- β”œβ”€β”€ Sharp contrast (may be harsh)
76
- └── Used by Apple in pure dark mode
77
-
78
- #121212 or #1A1A1A (Near Black):
79
- β”œβ”€β”€ Still good battery savings
80
- β”œβ”€β”€ Smoother scrolling (no smear)
81
- β”œβ”€β”€ Slightly softer on eyes
82
- └── Material Design recommendation
83
-
84
- RECOMMENDATION: #000000 for backgrounds, #0D0D0D-#1A1A1A for surfaces
85
- ```
86
-
87
- ---
88
-
89
- ## 3. Dark Mode Design
90
-
91
- ### Dark Mode Benefits
92
-
93
- ```
94
- Users enable dark mode for:
95
- β”œβ”€β”€ Battery savings (OLED)
96
- β”œβ”€β”€ Reduced eye strain (low light)
97
- β”œβ”€β”€ Personal preference
98
- β”œβ”€β”€ AMOLED aesthetic
99
- └── Accessibility (light sensitivity)
100
- ```
101
-
102
- ### Dark Mode Color Strategy
103
-
104
- ```
105
- LIGHT MODE DARK MODE
106
- ────────── ─────────
107
- Background: #FFFFFF β†’ #000000 or #121212
108
- Surface: #F5F5F5 β†’ #1E1E1E
109
- Surface 2: #EEEEEE β†’ #2C2C2C
110
-
111
- Primary: #1976D2 β†’ #90CAF9 (lighter)
112
- Text: #212121 β†’ #E0E0E0 (not pure white)
113
- Secondary: #757575 β†’ #9E9E9E
114
-
115
- Elevation in dark mode:
116
- β”œβ”€β”€ Higher = slightly lighter surface
117
- β”œβ”€β”€ 0dp β†’ 0% overlay
118
- β”œβ”€β”€ 4dp β†’ 9% overlay
119
- β”œβ”€β”€ 8dp β†’ 12% overlay
120
- └── Creates depth without shadows
121
- ```
122
-
123
- ### Text Colors in Dark Mode
124
-
125
- | Role | Light Mode | Dark Mode |
126
- |------|------------|-----------|
127
- | Primary | #000000 (Black) | #E8E8E8 (Not pure white) |
128
- | Secondary | #666666 | #B0B0B0 |
129
- | Disabled | #9E9E9E | #6E6E6E |
130
- | Links | #1976D2 | #8AB4F8 |
131
-
132
- ### Color Inversion Rules
133
-
134
- ```
135
- DON'T just invert colors:
136
- β”œβ”€β”€ Saturated colors become eye-burning
137
- β”œβ”€β”€ Semantic colors lose meaning
138
- β”œβ”€β”€ Brand colors may break
139
- └── Contrast ratios change unpredictably
140
-
141
- DO create intentional dark palette:
142
- β”œβ”€β”€ Desaturate primary colors
143
- β”œβ”€β”€ Use lighter tints for emphasis
144
- β”œβ”€β”€ Maintain semantic color meanings
145
- β”œβ”€β”€ Check contrast ratios independently
146
- ```
147
-
148
- ---
149
-
150
- ## 4. Outdoor Visibility
151
-
152
- ### The Sunlight Problem
153
-
154
- ```
155
- Screen visibility outdoors:
156
- β”œβ”€β”€ Bright sun washes out low contrast
157
- β”œβ”€β”€ Glare reduces readability
158
- β”œβ”€β”€ Polarized sunglasses affect
159
- └── Users shield screen with hand
160
-
161
- Affected elements:
162
- β”œβ”€β”€ Light gray text on white
163
- β”œβ”€β”€ Subtle color differences
164
- β”œβ”€β”€ Low opacity overlays
165
- └── Pastel colors
166
- ```
167
-
168
- ### High Contrast Strategies
169
-
170
- ```
171
- For outdoor visibility:
172
-
173
- MINIMUM CONTRAST RATIOS:
174
- β”œβ”€β”€ Normal text: 4.5:1 (WCAG AA)
175
- β”œβ”€β”€ Large text: 3:1 (WCAG AA)
176
- β”œβ”€β”€ Recommended: 7:1+ (AAA)
177
-
178
- AVOID:
179
- β”œβ”€β”€ #999 on #FFF (fails AA)
180
- β”œβ”€β”€ #BBB on #FFF (fails)
181
- β”œβ”€β”€ Pale colors on light backgrounds
182
- └── Subtle gradients for critical info
183
-
184
- DO:
185
- β”œβ”€β”€ Use system semantic colors
186
- β”œβ”€β”€ Test in bright environment
187
- β”œβ”€β”€ Provide high contrast mode
188
- └── Use solid colors for critical UI
189
- ```
190
-
191
- ---
192
-
193
- ## 5. Semantic Colors
194
-
195
- ### Consistent Meaning
196
-
197
- | Semantic | Meaning | iOS Default | Android Default |
198
- |----------|---------|-------------|-----------------|
199
- | Error | Problems, destruction | #FF3B30 | #B3261E |
200
- | Success | Completion, positive | #34C759 | #4CAF50 |
201
- | Warning | Attention, caution | #FF9500 | #FFC107 |
202
- | Info | Information | #007AFF | #2196F3 |
203
-
204
- ### Semantic Color Rules
205
-
206
- ```
207
- NEVER use semantic colors for:
208
- β”œβ”€β”€ Branding (confuses meaning)
209
- β”œβ”€β”€ Decoration (reduces impact)
210
- β”œβ”€β”€ Arbitrary styling
211
- └── Status indicators (use icons too)
212
-
213
- ALWAYS:
214
- β”œβ”€β”€ Pair with icons (colorblind users)
215
- β”œβ”€β”€ Maintain across light/dark modes
216
- β”œβ”€β”€ Keep consistent throughout app
217
- └── Follow platform conventions
218
- ```
219
-
220
- ### Error State Colors
221
-
222
- ```
223
- Error states need:
224
- β”œβ”€β”€ Red-ish color (semantic)
225
- β”œβ”€β”€ High contrast against background
226
- β”œβ”€β”€ Icon reinforcement
227
- β”œβ”€β”€ Clear text explanation
228
-
229
- iOS:
230
- β”œβ”€β”€ Light: #FF3B30
231
- β”œβ”€β”€ Dark: #FF453A
232
-
233
- Android:
234
- β”œβ”€β”€ Light: #B3261E
235
- β”œβ”€β”€ Dark: #F2B8B5 (on error container)
236
- ```
237
-
238
- ---
239
-
240
- ## 6. Dynamic Color (Android)
241
-
242
- ### Material You
243
-
244
- ```
245
- Android 12+ Dynamic Color:
246
-
247
- User's wallpaper β†’ Color extraction β†’ App theme
248
-
249
- Your app automatically gets:
250
- β”œβ”€β”€ Primary (from wallpaper dominant)
251
- β”œβ”€β”€ Secondary (complementary)
252
- β”œβ”€β”€ Tertiary (accent)
253
- β”œβ”€β”€ Surface colors (neutral, derived)
254
- β”œβ”€β”€ On-colors (text on each)
255
- ```
256
-
257
- ### Supporting Dynamic Color
258
-
259
- ```kotlin
260
- // Jetpack Compose
261
- MaterialTheme(
262
- colorScheme = dynamicColorScheme()
263
- ?: staticColorScheme() // Fallback for older Android
264
- )
265
-
266
- // React Native
267
- // Limited support - consider react-native-material-you
268
- ```
269
-
270
- ### Fallback Colors
271
-
272
- ```
273
- When dynamic color unavailable:
274
- β”œβ”€β”€ Android < 12
275
- β”œβ”€β”€ User disabled
276
- β”œβ”€β”€ Non-supporting launchers
277
-
278
- Provide static color scheme:
279
- β”œβ”€β”€ Define your brand colors
280
- β”œβ”€β”€ Test in both modes
281
- β”œβ”€β”€ Match dynamic color roles
282
- └── Support light + dark
283
- ```
284
-
285
- ---
286
-
287
- ## 7. Color Accessibility
288
-
289
- ### Colorblind Considerations
290
-
291
- ```
292
- ~8% of men, ~0.5% of women are colorblind
293
-
294
- Types:
295
- β”œβ”€β”€ Protanopia (red weakness)
296
- β”œβ”€β”€ Deuteranopia (green weakness)
297
- β”œβ”€β”€ Tritanopia (blue weakness)
298
- β”œβ”€β”€ Monochromacy (rare, no color)
299
-
300
- Design rules:
301
- β”œβ”€β”€ Never rely on color alone
302
- β”œβ”€β”€ Use patterns, icons, text
303
- β”œβ”€β”€ Test with simulation tools
304
- β”œβ”€β”€ Avoid red/green distinctions only
305
- ```
306
-
307
- ### Contrast Testing Tools
308
-
309
- ```
310
- Use these to verify:
311
- β”œβ”€β”€ Built-in accessibility inspector (Xcode)
312
- β”œβ”€β”€ Accessibility Scanner (Android)
313
- β”œβ”€β”€ Contrast ratio calculators
314
- β”œβ”€β”€ Colorblind simulation
315
- └── Test on actual devices in sunlight
316
- ```
317
-
318
- ### Sufficient Contrast
319
-
320
- ```
321
- WCAG Guidelines:
322
-
323
- AA (Minimum)
324
- β”œβ”€β”€ Normal text: 4.5:1
325
- β”œβ”€β”€ Large text (18pt+): 3:1
326
- β”œβ”€β”€ UI components: 3:1
327
-
328
- AAA (Enhanced)
329
- β”œβ”€β”€ Normal text: 7:1
330
- β”œβ”€β”€ Large text: 4.5:1
331
-
332
- Mobile recommendation: Meet AA, aim for AAA
333
- ```
334
-
335
- ---
336
-
337
- ## 8. Color Anti-Patterns
338
-
339
- ### ❌ Common Mistakes
340
-
341
- | Mistake | Problem | Fix |
342
- |---------|---------|-----|
343
- | **Light gray on white** | Invisible outdoors | Min 4.5:1 contrast |
344
- | **Pure white in dark mode** | Eye strain | Use #E0E0E0-#F0F0F0 |
345
- | **Same saturation dark mode** | Garish, glowing | Desaturate colors |
346
- | **Red/green only indicator** | Colorblind users can't see | Add icons |
347
- | **Semantic colors for brand** | Confusing meaning | Use neutral for brand |
348
- | **Ignoring system dark mode** | Jarring experience | Support both modes |
349
-
350
- ### ❌ AI Color Mistakes
351
-
352
- ```
353
- AI tends to:
354
- β”œβ”€β”€ Use same colors for light/dark
355
- β”œβ”€β”€ Ignore OLED battery implications
356
- β”œβ”€β”€ Skip contrast calculations
357
- β”œβ”€β”€ Default to purple/violet (BANNED)
358
- β”œβ”€β”€ Use low contrast "aesthetic" grays
359
- β”œβ”€β”€ Not test in outdoor conditions
360
- └── Forget colorblind users
361
-
362
- RULE: Design for the worst case.
363
- Test in bright sunlight, with colorblindness simulation.
364
- ```
365
-
366
- ---
367
-
368
- ## 9. Color System Checklist
369
-
370
- ### Before Choosing Colors
371
-
372
- - [ ] Light and dark mode variants defined?
373
- - [ ] Contrast ratios checked (4.5:1+)?
374
- - [ ] OLED battery considered (dark mode)?
375
- - [ ] Semantic colors follow conventions?
376
- - [ ] Colorblind-safe (not color-only indicators)?
377
-
378
- ### Before Release
379
-
380
- - [ ] Tested in bright sunlight?
381
- - [ ] Tested dark mode on OLED device?
382
- - [ ] System dark mode respected?
383
- - [ ] Dynamic color supported (Android)?
384
- - [ ] Error/success/warning consistent?
385
- - [ ] All text meets contrast requirements?
386
-
387
- ---
388
-
389
- ## 10. Quick Reference
390
-
391
- ### Dark Mode Backgrounds
392
-
393
- ```
394
- True black (OLED max savings): #000000
395
- Near black (Material): #121212
396
- Surface 1: #1E1E1E
397
- Surface 2: #2C2C2C
398
- Surface 3: #3C3C3C
399
- ```
400
-
401
- ### Text on Dark
402
-
403
- ```
404
- Primary: #E0E0E0 to #ECECEC
405
- Secondary: #A0A0A0 to #B0B0B0
406
- Disabled: #606060 to #707070
407
- ```
408
-
409
- ### Contrast Ratios
410
-
411
- ```
412
- Small text: 4.5:1 (minimum)
413
- Large text: 3:1 (minimum)
414
- UI elements: 3:1 (minimum)
415
- Ideal: 7:1 (AAA)
416
- ```
417
-
418
- ---
419
-
420
- > **Remember:** Color on mobile must work in the worst conditionsβ€”bright sun, tired eyes, colorblindness, low battery. Pretty colors that fail these tests are useless colors.
@@ -1,122 +0,0 @@
1
- # Mobile Debugging Guide
2
-
3
- > **Stop console.log() debugging!**
4
- > Mobile apps have complex native layers. Text logs are not enough.
5
- > **This file teaches effective mobile debugging strategies.**
6
-
7
- ---
8
-
9
- ## 🧠 MOBILE DEBUGGING MINDSET
10
-
11
- ```
12
- Web Debugging: Mobile Debugging:
13
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
14
- β”‚ Browser β”‚ β”‚ JS Bridge β”‚
15
- β”‚ DevTools β”‚ β”‚ Native UI β”‚
16
- β”‚ Network Tab β”‚ β”‚ GPU/Memory β”‚
17
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ Threads β”‚
18
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
19
- ```
20
-
21
- **Key Differences:**
22
- 1. **Native Layer:** JS code works, but app crashes? It's likely native (Java/Obj-C).
23
- 2. **Deployment:** You can't just "refresh". State gets lost or stuck.
24
- 3. **Network:** SSL Pinning, proxy settings are harder.
25
- 4. **Device Logs:** `adb logcat` and `Console.app` are your truth.
26
-
27
- ---
28
-
29
- ## 🚫 AI DEBUGGING ANTI-PATTERNS
30
-
31
- | ❌ Default | βœ… Mobile-Correct |
32
- |------------|-------------------|
33
- | "Add console.logs" | Use Flipper / Reactotron |
34
- | "Check network tab" | Use Charles Proxy / Proxyman |
35
- | "It works on simulator" | **Test on Real Device** (HW specific bugs) |
36
- | "Reinstall node_modules" | **Clean Native Build** (Gradle/Pod cache) |
37
- | Ignored native logs | Read `logcat` / Xcode logs |
38
-
39
- ---
40
-
41
- ## 1. The Toolset
42
-
43
- ### ⚑ React Native & Expo
44
-
45
- | Tool | Purpose | Best For |
46
- |------|---------|----------|
47
- | **Reactotron** | State/API/Redux | JS side debugging |
48
- | **Flipper** | Layout/Network/db | Native + JS bridge |
49
- | **Expo Tools** | Element inspector | Quick UI checks |
50
-
51
- ### πŸ› οΈ Native Layer (The Deep Dive)
52
-
53
- | Tool | Platform | Command | Why Use? |
54
- |------|----------|---------|----------|
55
- | **Logcat** | Android | `adb logcat` | Native crashes, ANRs |
56
- | **Console** | iOS | via Xcode | Native exceptions, memory |
57
- | **Layout Insp.** | Android | Android Studio | UI hierarchy bugs |
58
- | **View Insp.** | iOS | Xcode | UI hierarchy bugs |
59
-
60
- ---
61
-
62
- ## 2. Common Debugging Workflows
63
-
64
- ### πŸ•΅οΈ "The App Just Crashed" (Red Screen vs Crash to Home)
65
-
66
- **Scenario A: Red Screen (JS Error)**
67
- - **Cause:** Undefined is not an object, import error.
68
- - **Fix:** Read the stack trace on screen. It's usually clear.
69
-
70
- **Scenario B: Crash to Home Screen (Native Crash)**
71
- - **Cause:** Native module failure, memory OOM, permission usage without declaration.
72
- - **Tools:**
73
- - **Android:** `adb logcat *:E` (Filter for Errors)
74
- - **iOS:** Open Xcode β†’ Window β†’ Devices β†’ View Device Logs
75
-
76
- > **πŸ’‘ Pro Tip:** If app crashes immediately on launch, it's almost 100% a native configuration issue (Info.plist, AndroidManifest.xml).
77
-
78
- ### 🌐 "API Request Failed" (Network)
79
-
80
- **Web:** Open Chrome DevTools β†’ Network.
81
- **Mobile:** *You usually can't see this easily.*
82
-
83
- **Solution 1: Reactotron/Flipper**
84
- - View network requests in the monitoring app.
85
-
86
- **Solution 2: Proxy (Charles/Proxyman)**
87
- - **Hard but powerful.** See ALL traffic even from native SDKs.
88
- - Requires installing SSL cert on device.
89
-
90
- ### 🐒 "The UI is Laggy" (Performance)
91
-
92
- **Don't guess.** measure.
93
- - **React Native:** Performance Monitor (Shake menu).
94
- - **Android:** "Profile GPU Rendering" in Developer Options.
95
- - **Issues:**
96
- - **JS FPS drop:** Heavy calculation in JS thread.
97
- - **UI FPS drop:** Too many views, intricate hierarchy, heavy images.
98
-
99
- ---
100
-
101
- ## 3. Platform-Specific Nightmares
102
-
103
- ### Android
104
- - **Gradle Sync Fail:** Usually Java version mismatch or duplicate classes.
105
- - **Emulator Network:** Emulator `localhost` is `10.0.2.2`, NOT `127.0.0.1`.
106
- - **Cached Builds:** `./gradlew clean` is your best friend.
107
-
108
- ### iOS
109
- - **Pod Issues:** `pod deintegrate && pod install`.
110
- - **Signing Errors:** Check Team ID and Bundle Identifier.
111
- - **Cache:** Xcode β†’ Product β†’ Clean Build Folder.
112
-
113
- ---
114
-
115
- ## πŸ“ DEBUGGING CHECKLIST
116
-
117
- - [ ] **Is it a JS or Native crash?** (Red screen or home screen?)
118
- - [ ] **Did you clean build?** (Native caches are aggressive)
119
- - [ ] **Are you on a real device?** (Simulators hide concurrency bugs)
120
- - [ ] **Did you check the native logs?** (Not just terminal output)
121
-
122
- > **Remember:** If JavaScript looks perfect but the app fails, look closer at the Native side.