@cubis/foundry 0.3.71 → 0.3.72

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 (270) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cli/core.js +4 -18
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +4 -18
  6. package/workflows/powers/accessibility/POWER.md +83 -94
  7. package/workflows/powers/accessibility/SKILL.md +82 -94
  8. package/workflows/powers/agent-design/POWER.md +201 -0
  9. package/workflows/powers/agent-design/SKILL.md +198 -0
  10. package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
  11. package/workflows/powers/agent-design/references/skill-testing.md +164 -0
  12. package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
  13. package/workflows/powers/agentic-eval/POWER.md +62 -0
  14. package/workflows/powers/agentic-eval/SKILL.md +59 -0
  15. package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
  16. package/workflows/powers/api-designer/POWER.md +43 -71
  17. package/workflows/powers/api-designer/SKILL.md +43 -71
  18. package/workflows/powers/api-patterns/POWER.md +42 -56
  19. package/workflows/powers/api-patterns/SKILL.md +42 -57
  20. package/workflows/powers/architecture-designer/POWER.md +43 -60
  21. package/workflows/powers/architecture-designer/SKILL.md +43 -60
  22. package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
  23. package/workflows/powers/auth-architect/POWER.md +69 -0
  24. package/workflows/powers/auth-architect/SKILL.md +66 -0
  25. package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
  26. package/workflows/powers/behavioral-modes/POWER.md +100 -9
  27. package/workflows/powers/c-pro/POWER.md +105 -0
  28. package/workflows/powers/c-pro/SKILL.md +102 -0
  29. package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
  30. package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
  31. package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
  32. package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
  33. package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
  34. package/workflows/powers/changelog-generator/POWER.md +127 -63
  35. package/workflows/powers/changelog-generator/SKILL.md +126 -63
  36. package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
  37. package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
  38. package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
  39. package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
  40. package/workflows/powers/cli-developer/POWER.md +152 -95
  41. package/workflows/powers/cli-developer/SKILL.md +152 -95
  42. package/workflows/powers/cpp-pro/POWER.md +111 -0
  43. package/workflows/powers/cpp-pro/SKILL.md +108 -0
  44. package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
  45. package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
  46. package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
  47. package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
  48. package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
  49. package/workflows/powers/csharp-pro/POWER.md +47 -22
  50. package/workflows/powers/csharp-pro/SKILL.md +47 -22
  51. package/workflows/powers/dart-pro/POWER.md +68 -0
  52. package/workflows/powers/dart-pro/SKILL.md +65 -0
  53. package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
  54. package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
  55. package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
  56. package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
  57. package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
  58. package/workflows/powers/database-design/POWER.md +47 -33
  59. package/workflows/powers/database-design/SKILL.md +47 -33
  60. package/workflows/powers/database-optimizer/POWER.md +43 -64
  61. package/workflows/powers/database-optimizer/SKILL.md +43 -64
  62. package/workflows/powers/database-skills/POWER.md +59 -93
  63. package/workflows/powers/database-skills/SKILL.md +59 -93
  64. package/workflows/powers/debugging-strategies/POWER.md +69 -0
  65. package/workflows/powers/debugging-strategies/SKILL.md +66 -0
  66. package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
  67. package/workflows/powers/deep-research/POWER.md +67 -0
  68. package/workflows/powers/deep-research/SKILL.md +64 -0
  69. package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
  70. package/workflows/powers/design-system-builder/POWER.md +130 -116
  71. package/workflows/powers/design-system-builder/SKILL.md +130 -116
  72. package/workflows/powers/devops-engineer/POWER.md +120 -57
  73. package/workflows/powers/devops-engineer/SKILL.md +120 -57
  74. package/workflows/powers/docker-kubernetes/POWER.md +94 -0
  75. package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
  76. package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
  77. package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
  78. package/workflows/powers/documentation-templates/POWER.md +158 -127
  79. package/workflows/powers/documentation-templates/SKILL.md +158 -127
  80. package/workflows/powers/drizzle-expert/POWER.md +66 -0
  81. package/workflows/powers/drizzle-expert/SKILL.md +63 -0
  82. package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
  83. package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
  84. package/workflows/powers/error-ux-observability/POWER.md +144 -131
  85. package/workflows/powers/error-ux-observability/SKILL.md +143 -131
  86. package/workflows/powers/fastapi-expert/POWER.md +46 -60
  87. package/workflows/powers/fastapi-expert/SKILL.md +46 -60
  88. package/workflows/powers/firebase/POWER.md +65 -0
  89. package/workflows/powers/firebase/SKILL.md +62 -0
  90. package/workflows/powers/firebase/references/platform-routing.md +16 -0
  91. package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
  92. package/workflows/powers/flutter-design-system/POWER.md +63 -0
  93. package/workflows/powers/flutter-design-system/SKILL.md +60 -0
  94. package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
  95. package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
  96. package/workflows/powers/flutter-drift/POWER.md +65 -0
  97. package/workflows/powers/flutter-drift/SKILL.md +62 -0
  98. package/workflows/powers/flutter-drift/references/migrations.md +22 -0
  99. package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
  100. package/workflows/powers/flutter-feature/POWER.md +65 -0
  101. package/workflows/powers/flutter-feature/SKILL.md +62 -0
  102. package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
  103. package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
  104. package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
  105. package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
  106. package/workflows/powers/flutter-go-router/POWER.md +64 -0
  107. package/workflows/powers/flutter-go-router/SKILL.md +61 -0
  108. package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
  109. package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
  110. package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
  111. package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
  112. package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
  113. package/workflows/powers/flutter-repository/POWER.md +64 -0
  114. package/workflows/powers/flutter-repository/SKILL.md +61 -0
  115. package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
  116. package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
  117. package/workflows/powers/flutter-riverpod/POWER.md +70 -0
  118. package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
  119. package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
  120. package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
  121. package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
  122. package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
  123. package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
  124. package/workflows/powers/flutter-state-machine/POWER.md +62 -0
  125. package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
  126. package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
  127. package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
  128. package/workflows/powers/flutter-testing/POWER.md +64 -0
  129. package/workflows/powers/flutter-testing/SKILL.md +61 -0
  130. package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
  131. package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
  132. package/workflows/powers/frontend-code-review/POWER.md +137 -0
  133. package/workflows/powers/frontend-code-review/SKILL.md +134 -0
  134. package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
  135. package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
  136. package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
  137. package/workflows/powers/frontend-design/POWER.md +163 -362
  138. package/workflows/powers/frontend-design/SKILL.md +163 -362
  139. package/workflows/powers/game-development/POWER.md +57 -140
  140. package/workflows/powers/game-development/SKILL.md +57 -140
  141. package/workflows/powers/geo-fundamentals/POWER.md +64 -126
  142. package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
  143. package/workflows/powers/git-workflow/POWER.md +135 -0
  144. package/workflows/powers/git-workflow/SKILL.md +132 -0
  145. package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
  146. package/workflows/powers/golang-pro/POWER.md +46 -35
  147. package/workflows/powers/golang-pro/SKILL.md +46 -35
  148. package/workflows/powers/graphql-architect/POWER.md +44 -62
  149. package/workflows/powers/graphql-architect/SKILL.md +44 -62
  150. package/workflows/powers/i18n-localization/POWER.md +118 -103
  151. package/workflows/powers/i18n-localization/SKILL.md +118 -103
  152. package/workflows/powers/java-pro/POWER.md +47 -22
  153. package/workflows/powers/java-pro/SKILL.md +47 -22
  154. package/workflows/powers/javascript-pro/POWER.md +47 -34
  155. package/workflows/powers/javascript-pro/SKILL.md +47 -34
  156. package/workflows/powers/kotlin-pro/POWER.md +46 -23
  157. package/workflows/powers/kotlin-pro/SKILL.md +46 -23
  158. package/workflows/powers/legacy-modernizer/POWER.md +43 -60
  159. package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
  160. package/workflows/powers/mcp-builder/POWER.md +65 -0
  161. package/workflows/powers/mcp-builder/SKILL.md +62 -0
  162. package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
  163. package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
  164. package/workflows/powers/microservices-architect/POWER.md +43 -70
  165. package/workflows/powers/microservices-architect/SKILL.md +43 -70
  166. package/workflows/powers/mobile-design/POWER.md +110 -345
  167. package/workflows/powers/mobile-design/SKILL.md +110 -345
  168. package/workflows/powers/mongodb/POWER.md +67 -0
  169. package/workflows/powers/mongodb/SKILL.md +64 -0
  170. package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
  171. package/workflows/powers/mysql/POWER.md +67 -0
  172. package/workflows/powers/mysql/SKILL.md +64 -0
  173. package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
  174. package/workflows/powers/neki/POWER.md +67 -0
  175. package/workflows/powers/neki/SKILL.md +64 -0
  176. package/workflows/powers/neki/references/neki-checklist.md +18 -0
  177. package/workflows/powers/nestjs-expert/POWER.md +45 -91
  178. package/workflows/powers/nestjs-expert/SKILL.md +45 -91
  179. package/workflows/powers/nextjs-developer/POWER.md +51 -44
  180. package/workflows/powers/nextjs-developer/SKILL.md +51 -44
  181. package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
  182. package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
  183. package/workflows/powers/observability/POWER.md +109 -0
  184. package/workflows/powers/observability/SKILL.md +106 -0
  185. package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
  186. package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
  187. package/workflows/powers/openai-docs/POWER.md +61 -0
  188. package/workflows/powers/openai-docs/SKILL.md +58 -0
  189. package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
  190. package/workflows/powers/performance-profiling/POWER.md +61 -114
  191. package/workflows/powers/performance-profiling/SKILL.md +61 -114
  192. package/workflows/powers/php-pro/POWER.md +116 -0
  193. package/workflows/powers/php-pro/SKILL.md +113 -0
  194. package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
  195. package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
  196. package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
  197. package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
  198. package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
  199. package/workflows/powers/playwright-e2e/POWER.md +85 -0
  200. package/workflows/powers/playwright-e2e/SKILL.md +82 -0
  201. package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
  202. package/workflows/powers/postgres/POWER.md +67 -0
  203. package/workflows/powers/postgres/SKILL.md +64 -0
  204. package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
  205. package/workflows/powers/prompt-engineer/POWER.md +47 -30
  206. package/workflows/powers/prompt-engineer/SKILL.md +47 -30
  207. package/workflows/powers/python-pro/POWER.md +47 -36
  208. package/workflows/powers/python-pro/SKILL.md +47 -36
  209. package/workflows/powers/react-best-practices/POWER.md +56 -33
  210. package/workflows/powers/react-best-practices/SKILL.md +56 -33
  211. package/workflows/powers/react-expert/POWER.md +47 -37
  212. package/workflows/powers/react-expert/SKILL.md +47 -37
  213. package/workflows/powers/redis/POWER.md +67 -0
  214. package/workflows/powers/redis/SKILL.md +64 -0
  215. package/workflows/powers/redis/references/redis-checklist.md +19 -0
  216. package/workflows/powers/ruby-pro/POWER.md +118 -0
  217. package/workflows/powers/ruby-pro/SKILL.md +115 -0
  218. package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
  219. package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
  220. package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
  221. package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
  222. package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
  223. package/workflows/powers/rust-pro/POWER.md +45 -31
  224. package/workflows/powers/rust-pro/SKILL.md +45 -31
  225. package/workflows/powers/security-engineer/POWER.md +129 -0
  226. package/workflows/powers/security-engineer/SKILL.md +126 -0
  227. package/workflows/powers/seo-fundamentals/POWER.md +59 -102
  228. package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
  229. package/workflows/powers/serverless-patterns/POWER.md +171 -0
  230. package/workflows/powers/serverless-patterns/SKILL.md +168 -0
  231. package/workflows/powers/skill-creator/POWER.md +90 -0
  232. package/workflows/powers/skill-creator/SKILL.md +87 -0
  233. package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
  234. package/workflows/powers/skill-creator/references/schemas.md +430 -0
  235. package/workflows/powers/spec-miner/POWER.md +49 -57
  236. package/workflows/powers/spec-miner/SKILL.md +49 -57
  237. package/workflows/powers/sqlite/POWER.md +67 -0
  238. package/workflows/powers/sqlite/SKILL.md +64 -0
  239. package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
  240. package/workflows/powers/sre-engineer/POWER.md +123 -64
  241. package/workflows/powers/sre-engineer/SKILL.md +123 -64
  242. package/workflows/powers/static-analysis/POWER.md +121 -77
  243. package/workflows/powers/static-analysis/SKILL.md +121 -77
  244. package/workflows/powers/stripe-best-practices/POWER.md +140 -17
  245. package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
  246. package/workflows/powers/supabase/POWER.md +67 -0
  247. package/workflows/powers/supabase/SKILL.md +64 -0
  248. package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
  249. package/workflows/powers/swift-pro/POWER.md +118 -0
  250. package/workflows/powers/swift-pro/SKILL.md +115 -0
  251. package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
  252. package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
  253. package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
  254. package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
  255. package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
  256. package/workflows/powers/tailwind-patterns/POWER.md +71 -240
  257. package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
  258. package/workflows/powers/testing-patterns/POWER.md +155 -10
  259. package/workflows/powers/testing-patterns/SKILL.md +155 -10
  260. package/workflows/powers/typescript-pro/POWER.md +47 -38
  261. package/workflows/powers/typescript-pro/SKILL.md +47 -38
  262. package/workflows/powers/vitess/POWER.md +67 -0
  263. package/workflows/powers/vitess/SKILL.md +64 -0
  264. package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
  265. package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
  266. package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
  267. package/workflows/powers/web-perf/POWER.md +43 -170
  268. package/workflows/powers/web-perf/SKILL.md +43 -170
  269. package/workflows/powers/webapp-testing/POWER.md +43 -164
  270. package/workflows/powers/webapp-testing/SKILL.md +43 -164
@@ -2,396 +2,161 @@
2
2
  ---
3
3
  inclusion: manual
4
4
  name: mobile-design
5
- 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.
6
- allowed-tools: Read, Glob, Grep, Bash
5
+ description: Design mobile interfaces with touch psychology, platform-native patterns, iOS and Android guidelines, gesture handling, and responsive mobile layouts.
6
+ license: Apache-2.0
7
+ metadata:
8
+ author: cubis-foundry
9
+ version: "3.0"
10
+ compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
7
11
  ---
8
12
 
9
- # Mobile Design System
13
+ # Mobile Design
10
14
 
11
- > **Philosophy:** Touch-first. Battery-conscious. Platform-respectful. Offline-capable.
12
- > **Core Principle:** Mobile is NOT a small desktop. THINK mobile constraints, ASK platform choice.
15
+ ## Purpose
13
16
 
14
- ---
15
-
16
- ## 🔧 Runtime Scripts
17
-
18
- **Execute these for validation (don't read, just run):**
19
-
20
- | Script | Purpose | Usage |
21
- |--------|---------|-------|
22
- | `scripts/mobile_audit.py` | Mobile UX & Touch Audit | `python scripts/mobile_audit.py <project_path>` |
23
-
24
- ---
25
-
26
- ## 🔴 MANDATORY: Read Reference Files Before Working!
27
-
28
- **⛔ DO NOT start development until you read the relevant files:**
17
+ Guide mobile interface design with platform-native patterns, touch ergonomics, and mobile-specific UX principles. Covers both native (iOS/Android) and responsive web mobile experiences.
29
18
 
30
- ### Universal (Always Read)
19
+ ## When to Use
31
20
 
32
- | File | Content | Status |
33
- |------|---------|--------|
34
- | **[mobile-design-thinking.md](mobile-design-thinking.md)** | **⚠️ ANTI-MEMORIZATION: Forces thinking, prevents AI defaults** | **⬜ CRITICAL FIRST** |
35
- | **[touch-psychology.md](touch-psychology.md)** | **Fitts' Law, gestures, haptics, thumb zone** | **⬜ CRITICAL** |
36
- | **[mobile-performance.md](mobile-performance.md)** | **RN/Flutter performance, 60fps, memory** | **⬜ CRITICAL** |
37
- | **[mobile-backend.md](mobile-backend.md)** | **Push notifications, offline sync, mobile API** | **⬜ CRITICAL** |
38
- | **[mobile-testing.md](mobile-testing.md)** | **Testing pyramid, E2E, platform-specific** | **⬜ CRITICAL** |
39
- | **[mobile-debugging.md](mobile-debugging.md)** | **Native vs JS debugging, Flipper, Logcat** | **⬜ CRITICAL** |
40
- | [mobile-navigation.md](mobile-navigation.md) | Tab/Stack/Drawer, deep linking | ⬜ Read |
41
- | [mobile-typography.md](mobile-typography.md) | System fonts, Dynamic Type, a11y | ⬜ Read |
42
- | [mobile-color-system.md](mobile-color-system.md) | OLED, dark mode, battery-aware | ⬜ Read |
43
- | [decision-trees.md](decision-trees.md) | Framework/state/storage selection | ⬜ Read |
21
+ - Designing or reviewing mobile app interfaces
22
+ - Building responsive web experiences for mobile devices
23
+ - Implementing touch interactions and gestures
24
+ - Adapting desktop designs for mobile
25
+ - Choosing between native patterns and cross-platform consistency
26
+ - Optimizing mobile performance and perceived speed
44
27
 
45
- > 🧠 **mobile-design-thinking.md is PRIORITY!** This file ensures AI thinks instead of using memorized patterns.
28
+ ## Instructions
46
29
 
47
- ### Platform-Specific (Read Based on Target)
30
+ ### Step 1 Design for Touch
48
31
 
49
- | Platform | File | Content | When to Read |
50
- |----------|------|---------|--------------|
51
- | **iOS** | [platform-ios.md](platform-ios.md) | Human Interface Guidelines, SF Pro, SwiftUI patterns | Building for iPhone/iPad |
52
- | **Android** | [platform-android.md](platform-android.md) | Material Design 3, Roboto, Compose patterns | Building for Android |
53
- | **Cross-Platform** | Both above | Platform divergence points | React Native / Flutter |
32
+ **Touch target sizes**:
33
+ | Platform | Minimum | Recommended |
34
+ |----------|---------|-------------|
35
+ | iOS (HIG) | 44×44 pt | 48×48 pt |
36
+ | Android (Material) | 48×48 dp | 56×56 dp |
37
+ | Web (WCAG) | 44×44 CSS px | 48×48 CSS px |
54
38
 
55
- > 🔴 **If building for iOS Read platform-ios.md FIRST!**
56
- > 🔴 **If building for Android → Read platform-android.md FIRST!**
57
- > 🔴 **If cross-platform → Read BOTH and apply conditional platform logic!**
39
+ **Thumb zones** (for one-handed use on phones):
58
40
 
59
- ---
60
-
61
- ## ⚠️ CRITICAL: ASK BEFORE ASSUMING (MANDATORY)
62
-
63
- > **STOP! If the user's request is open-ended, DO NOT default to your favorites.**
64
-
65
- ### You MUST Ask If Not Specified:
41
+ - Easy reach: bottom center of screen
42
+ - Hard reach: top corners
43
+ - Primary actions go in the easy zone (bottom navigation, FABs)
44
+ - Destructive actions go in the hard zone (require deliberate reach)
66
45
 
67
- | Aspect | Ask | Why |
68
- |--------|-----|-----|
69
- | **Platform** | "iOS, Android, or both?" | Affects EVERY design decision |
70
- | **Framework** | "React Native, Flutter, or native?" | Determines patterns and tools |
71
- | **Navigation** | "Tab bar, drawer, or stack-based?" | Core UX decision |
72
- | **State** | "What state management? (Zustand/Redux/Riverpod/BLoC?)" | Architecture foundation |
73
- | **Offline** | "Does this need to work offline?" | Affects data strategy |
74
- | **Target devices** | "Phone only, or tablet support?" | Layout complexity |
46
+ **Touch feedback**:
75
47
 
76
- ### AI MOBILE ANTI-PATTERNS (YASAK LİSTESİ)
48
+ - Every tap should produce immediate visual feedback (< 100ms)
49
+ - Use ripple (Android), highlight (iOS), or scale transform (web)
50
+ - Long-press actions need a visual indication of the hold
77
51
 
78
- > 🚫 **These are AI default tendencies that MUST be avoided!**
52
+ ### Step 2 Follow Platform Conventions
79
53
 
80
- #### Performance Sins
54
+ **iOS (Human Interface Guidelines)**:
81
55
 
82
- | NEVER DO | Why It's Wrong | ALWAYS DO |
83
- |-------------|----------------|--------------|
84
- | **ScrollView for long lists** | Renders ALL items, memory explodes | Use `FlatList` / `FlashList` / `ListView.builder` |
85
- | **Inline renderItem function** | New function every render, all items re-render | `useCallback` + `React.memo` |
86
- | **Missing keyExtractor** | Index-based keys cause bugs on reorder | Unique, stable ID from data |
87
- | **Skip getItemLayout** | Async layout = janky scroll | Provide when items have fixed height |
88
- | **setState() everywhere** | Unnecessary widget rebuilds | Targeted state, `const` constructors |
89
- | **Native driver: false** | Animations blocked by JS thread | `useNativeDriver: true` always |
90
- | **console.log in production** | Blocks JS thread severely | Remove before release build |
91
- | **Skip React.memo/const** | Every item re-renders on any change | Memoize list items ALWAYS |
56
+ - Navigation: tab bar at bottom, navigation bar at top with back button
57
+ - Modals: sheet presentations, slide up from bottom
58
+ - Actions: swipe-to-delete, pull-to-refresh
59
+ - Typography: SF Pro, Dynamic Type (accessibility scaling)
60
+ - Safe areas: respect notch, home indicator, status bar
92
61
 
93
- #### Touch/UX Sins
62
+ **Android (Material Design)**:
94
63
 
95
- | NEVER DO | Why It's Wrong | ✅ ALWAYS DO |
96
- |-------------|----------------|--------------|
97
- | **Touch target < 44px** | Impossible to tap accurately, frustrating | Minimum 44pt (iOS) / 48dp (Android) |
98
- | **Spacing < 8px between targets** | Accidental taps on neighbors | Minimum 8-12px gap |
99
- | **Gesture-only interactions** | Motor impaired users excluded | Always provide button alternative |
100
- | **No loading state** | User thinks app crashed | ALWAYS show loading feedback |
101
- | **No error state** | User stuck, no recovery path | Show error with retry option |
102
- | **No offline handling** | Crash/block when network lost | Graceful degradation, cached data |
103
- | **Ignore platform conventions** | Users confused, muscle memory broken | iOS feels iOS, Android feels Android |
64
+ - Navigation: bottom navigation or navigation drawer
65
+ - Modals: bottom sheets, dialogs
66
+ - Actions: FAB for primary action, swipe gestures
67
+ - Typography: Roboto, system font scaling
68
+ - Edge-to-edge: draw behind system bars
104
69
 
105
- #### Security Sins
70
+ **Cross-platform (React Native, Flutter)**:
106
71
 
107
- | NEVER DO | Why It's Wrong | ✅ ALWAYS DO |
108
- |-------------|----------------|--------------|
109
- | **Token in AsyncStorage** | Easily accessible, stolen on rooted device | `SecureStore` / `Keychain` / `EncryptedSharedPreferences` |
110
- | **Hardcode API keys** | Reverse engineered from APK/IPA | Environment variables, secure storage |
111
- | **Skip SSL pinning** | MITM attacks possible | Pin certificates in production |
112
- | **Log sensitive data** | Logs can be extracted | Never log tokens, passwords, PII |
113
-
114
- #### Architecture Sins
115
-
116
- | ❌ NEVER DO | Why It's Wrong | ✅ ALWAYS DO |
117
- |-------------|----------------|--------------|
118
- | **Business logic in UI** | Untestable, unmaintainable | Service layer separation |
119
- | **Global state for everything** | Unnecessary re-renders, complexity | Local state default, lift when needed |
120
- | **Deep linking as afterthought** | Notifications, shares broken | Plan deep links from day one |
121
- | **Skip dispose/cleanup** | Memory leaks, zombie listeners | Clean up subscriptions, timers |
122
-
123
- ---
72
+ - Use platform-adaptive components when possible
73
+ - Match navigation patterns to the platform (not one pattern for both)
74
+ - Test on both platforms don't assume iOS behavior works on Android
124
75
 
125
- ## 📱 Platform Decision Matrix
76
+ ### Step 3 Optimize Mobile Layouts
126
77
 
127
- ### When to Unify vs Diverge
78
+ **Mobile-first hierarchy**:
128
79
 
129
- ```
130
- UNIFY (same on both) DIVERGE (platform-specific)
131
- ─────────────────── ──────────────────────────
132
- Business Logic ✅ Always -
133
- Data Layer ✅ Always -
134
- Core Features ✅ Always -
135
-
136
- Navigation - ✅ iOS: edge swipe, Android: back button
137
- Gestures - ✅ Platform-native feel
138
- Icons - ✅ SF Symbols vs Material Icons
139
- Date Pickers - ✅ Native pickers feel right
140
- Modals/Sheets - ✅ iOS: bottom sheet vs Android: dialog
141
- Typography - ✅ SF Pro vs Roboto (or custom)
142
- Error Dialogs - ✅ Platform conventions for alerts
143
- ```
80
+ 1. One primary action per screen
81
+ 2. Vertical scrolling only (avoid horizontal scroll for content)
82
+ 3. Full-width elements (no tiny desktop-sized cards)
83
+ 4. Progressive disclosure (show summary, expand for details)
144
84
 
145
- ### Quick Reference: Platform Defaults
85
+ **Common mobile patterns**:
86
+ | Pattern | When to Use |
87
+ |---------|-------------|
88
+ | Bottom sheet | Secondary actions, filters, options |
89
+ | Pull-to-refresh | List/feed content updates |
90
+ | Infinite scroll | Feeds, search results |
91
+ | Swipe actions | Quick operations on list items |
92
+ | Bottom navigation | 3-5 top-level destinations |
93
+ | FAB | Single primary action per screen |
94
+ | Skeleton screens | Content loading states |
146
95
 
147
- | Element | iOS | Android |
148
- |---------|-----|---------|
149
- | **Primary Font** | SF Pro / SF Compact | Roboto |
150
- | **Min Touch Target** | 44pt × 44pt | 48dp × 48dp |
151
- | **Back Navigation** | Edge swipe left | System back button/gesture |
152
- | **Bottom Tab Icons** | SF Symbols | Material Symbols |
153
- | **Action Sheet** | UIActionSheet from bottom | Bottom Sheet / Dialog |
154
- | **Progress** | Spinner | Linear progress (Material) |
155
- | **Pull to Refresh** | Native UIRefreshControl | SwipeRefreshLayout |
96
+ **Text on mobile**:
156
97
 
157
- ---
98
+ - Body text ≥ 16px (prevents iOS zoom on input focus)
99
+ - Line length: 35-50 characters per line
100
+ - Generous line-height (1.5+) for readability
101
+ - Left-aligned (or start-aligned for RTL) — never justified
158
102
 
159
- ## 🧠 Mobile UX Psychology (Quick Reference)
103
+ ### Step 4 Handle Mobile-Specific Challenges
160
104
 
161
- ### Fitts' Law for Touch
105
+ **Keyboards**:
162
106
 
163
- ```
164
- Desktop: Cursor is precise (1px)
165
- Mobile: Finger is imprecise (~7mm contact area)
107
+ - Use correct `inputmode` for each field (`numeric`, `email`, `tel`, `url`)
108
+ - Scroll input into view when keyboard appears
109
+ - Dismiss keyboard on background tap
110
+ - Show "Next" button to move between fields, "Done" on the last field
166
111
 
167
- Touch targets MUST be 44-48px minimum
168
- → Important actions in THUMB ZONE (bottom of screen)
169
- → Destructive actions AWAY from easy reach
170
- ```
112
+ **Offline & connectivity**:
171
113
 
172
- ### Thumb Zone (One-Handed Usage)
114
+ - Show clear offline indicator
115
+ - Queue actions for retry when connection returns
116
+ - Cache critical content for offline access
117
+ - Never silently fail — tell the user what's happening
173
118
 
174
- ```
175
- ┌─────────────────────────────┐
176
- │ HARD TO REACH │ ← Navigation, menu, back
177
- │ (stretch) │
178
- ├─────────────────────────────┤
179
- │ OK TO REACH │ ← Secondary actions
180
- │ (natural) │
181
- ├─────────────────────────────┤
182
- │ EASY TO REACH │ ← PRIMARY CTAs, tab bar
183
- │ (thumb's natural arc) │ ← Main content interaction
184
- └─────────────────────────────┘
185
- [ HOME ]
186
- ```
119
+ **Performance**:
187
120
 
188
- ### Mobile-Specific Cognitive Load
121
+ - Target < 3s first meaningful paint on 3G
122
+ - Lazy-load images below the fold
123
+ - Minimize JS bundle — mobile CPUs are 3-5x slower than desktop
124
+ - Use native scrolling (`-webkit-overflow-scrolling: touch` or `overscroll-behavior`)
125
+ - Avoid heavy animations on low-end devices
189
126
 
190
- | Desktop | Mobile Difference |
191
- |---------|-------------------|
192
- | Multiple windows | ONE task at a time |
193
- | Keyboard shortcuts | Touch gestures |
194
- | Hover states | NO hover (tap or nothing) |
195
- | Large viewport | Limited space, scroll vertical |
196
- | Stable attention | Interrupted constantly |
127
+ ### Step 5 Test on Real Devices
197
128
 
198
- For deep dive: [touch-psychology.md](touch-psychology.md)
129
+ - Test on both iOS and Android
130
+ - Test on at least one low-end device (performance)
131
+ - Test with large text / accessibility settings
132
+ - Test in landscape orientation
133
+ - Test with slow network (3G simulation)
134
+ - Test keyboard interactions on every form
135
+ - Test gesture conflicts (system gestures vs. app gestures)
199
136
 
200
- ---
137
+ ## Output Format
201
138
 
202
- ## ⚡ Performance Principles (Quick Reference)
203
-
204
- ### React Native Critical Rules
205
-
206
- ```typescript
207
- // ✅ CORRECT: Memoized renderItem + React.memo wrapper
208
- const ListItem = React.memo(({ item }: { item: Item }) => (
209
- <View style={styles.item}>
210
- <Text>{item.title}</Text>
211
- </View>
212
- ));
213
-
214
- const renderItem = useCallback(
215
- ({ item }: { item: Item }) => <ListItem item={item} />,
216
- []
217
- );
218
-
219
- // ✅ CORRECT: FlatList with all optimizations
220
- <FlatList
221
- data={items}
222
- renderItem={renderItem}
223
- keyExtractor={(item) => item.id} // Stable ID, NOT index
224
- getItemLayout={(data, index) => ({
225
- length: ITEM_HEIGHT,
226
- offset: ITEM_HEIGHT * index,
227
- index,
228
- })}
229
- removeClippedSubviews={true}
230
- maxToRenderPerBatch={10}
231
- windowSize={5}
232
- />
233
139
  ```
140
+ ## Mobile Design Review
141
+ [platform, device considerations, and approach]
234
142
 
235
- ### Flutter Critical Rules
236
-
237
- ```dart
238
- // ✅ CORRECT: const constructors prevent rebuilds
239
- class MyWidget extends StatelessWidget {
240
- const MyWidget({super.key}); // CONST!
241
-
242
- @override
243
- Widget build(BuildContext context) {
244
- return const Column( // CONST!
245
- children: [
246
- Text('Static content'),
247
- MyConstantWidget(),
248
- ],
249
- );
250
- }
251
- }
252
-
253
- // ✅ CORRECT: Targeted state with ValueListenableBuilder
254
- ValueListenableBuilder<int>(
255
- valueListenable: counter,
256
- builder: (context, value, child) => Text('$value'),
257
- child: const ExpensiveWidget(), // Won't rebuild!
258
- )
259
- ```
143
+ ## Layout
144
+ [responsive structure and component choices]
260
145
 
261
- ### Animation Performance
146
+ ## Touch & Interaction
147
+ [gesture handling, feedback, and accessibility]
262
148
 
149
+ ## Platform-Specific Notes
150
+ [iOS / Android / web differences]
263
151
  ```
264
- GPU-accelerated (FAST): CPU-bound (SLOW):
265
- ├── transform ├── width, height
266
- ├── opacity ├── top, left, right, bottom
267
- └── (use these ONLY) ├── margin, padding
268
- └── (AVOID animating these)
269
- ```
270
-
271
- For complete guide: [mobile-performance.md](mobile-performance.md)
272
-
273
- ---
274
-
275
- ## 📝 CHECKPOINT (MANDATORY Before Any Mobile Work)
276
152
 
277
- > **Before writing ANY mobile code, you MUST complete this checkpoint:**
278
-
279
- ```
280
- 🧠 CHECKPOINT:
153
+ ## Examples
281
154
 
282
- Platform: [ iOS / Android / Both ]
283
- Framework: [ React Native / Flutter / SwiftUI / Kotlin ]
284
- Files Read: [ List the skill files you've read ]
155
+ **User**: "Design a mobile checkout flow"
285
156
 
286
- 3 Principles I Will Apply:
287
- 1. _______________
288
- 2. _______________
289
- 3. _______________
157
+ **Response approach**: Single-column layout, large touch targets (48px+), numeric keyboard for card input, auto-advance between fields, Apple Pay / Google Pay as primary CTA (bottom of screen), inline validation, minimal form fields.
290
158
 
291
- Anti-Patterns I Will Avoid:
292
- 1. _______________
293
- 2. _______________
294
- ```
295
-
296
- **Example:**
297
- ```
298
- 🧠 CHECKPOINT:
299
-
300
- Platform: iOS + Android (Cross-platform)
301
- Framework: React Native + Expo
302
- Files Read: touch-psychology.md, mobile-performance.md, platform-ios.md, platform-android.md
303
-
304
- 3 Principles I Will Apply:
305
- 1. FlatList with React.memo + useCallback for all lists
306
- 2. 48px touch targets, thumb zone for primary CTAs
307
- 3. Platform-specific navigation (edge swipe iOS, back button Android)
308
-
309
- Anti-Patterns I Will Avoid:
310
- 1. ScrollView for lists → FlatList
311
- 2. Inline renderItem → Memoized
312
- 3. AsyncStorage for tokens → SecureStore
313
- ```
314
-
315
- > 🔴 **Can't fill the checkpoint? → GO BACK AND READ THE SKILL FILES.**
316
-
317
- ---
318
-
319
- ## 🔧 Framework Decision Tree
320
-
321
- ```
322
- WHAT ARE YOU BUILDING?
323
-
324
- ├── Need OTA updates + rapid iteration + web team
325
- │ └── ✅ React Native + Expo
326
-
327
- ├── Need pixel-perfect custom UI + performance critical
328
- │ └── ✅ Flutter
329
-
330
- ├── Deep native features + single platform focus
331
- │ ├── iOS only → SwiftUI
332
- │ └── Android only → Kotlin + Jetpack Compose
333
-
334
- ├── Existing RN codebase + new features
335
- │ └── ✅ React Native (bare workflow)
336
-
337
- └── Enterprise + existing Flutter codebase
338
- └── ✅ Flutter
339
- ```
340
-
341
- For complete decision trees: [decision-trees.md](decision-trees.md)
342
-
343
- ---
344
-
345
- ## 📋 Pre-Development Checklist
346
-
347
- ### Before Starting ANY Mobile Project
348
-
349
- - [ ] **Platform confirmed?** (iOS / Android / Both)
350
- - [ ] **Framework chosen?** (RN / Flutter / Native)
351
- - [ ] **Navigation pattern decided?** (Tabs / Stack / Drawer)
352
- - [ ] **State management selected?** (Zustand / Redux / Riverpod / BLoC)
353
- - [ ] **Offline requirements known?**
354
- - [ ] **Deep linking planned from day one?**
355
- - [ ] **Target devices defined?** (Phone / Tablet / Both)
356
-
357
- ### Before Every Screen
358
-
359
- - [ ] **Touch targets ≥ 44-48px?**
360
- - [ ] **Primary CTA in thumb zone?**
361
- - [ ] **Loading state exists?**
362
- - [ ] **Error state with retry exists?**
363
- - [ ] **Offline handling considered?**
364
- - [ ] **Platform conventions followed?**
365
-
366
- ### Before Release
367
-
368
- - [ ] **console.log removed?**
369
- - [ ] **SecureStore for sensitive data?**
370
- - [ ] **SSL pinning enabled?**
371
- - [ ] **Lists optimized (memo, keyExtractor)?**
372
- - [ ] **Memory cleanup on unmount?**
373
- - [ ] **Tested on low-end devices?**
374
- - [ ] **Accessibility labels on all interactive elements?**
375
-
376
- ---
377
-
378
- ## 📚 Reference Files
379
-
380
- For deeper guidance on specific areas:
381
-
382
- | File | When to Use |
383
- |------|-------------|
384
- | [mobile-design-thinking.md](mobile-design-thinking.md) | **FIRST! Anti-memorization, forces context-based thinking** |
385
- | [touch-psychology.md](touch-psychology.md) | Understanding touch interaction, Fitts' Law, gesture design |
386
- | [mobile-performance.md](mobile-performance.md) | Optimizing RN/Flutter, 60fps, memory/battery |
387
- | [platform-ios.md](platform-ios.md) | iOS-specific design, HIG compliance |
388
- | [platform-android.md](platform-android.md) | Android-specific design, Material Design 3 |
389
- | [mobile-navigation.md](mobile-navigation.md) | Navigation patterns, deep linking |
390
- | [mobile-typography.md](mobile-typography.md) | Type scale, system fonts, accessibility |
391
- | [mobile-color-system.md](mobile-color-system.md) | OLED optimization, dark mode, battery |
392
- | [decision-trees.md](decision-trees.md) | Framework, state, storage decisions |
393
-
394
- ---
159
+ **User**: "Adapt our desktop dashboard for mobile"
395
160
 
396
- > **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.
161
+ **Response approach**: Prioritize key metrics (don't show everything). Replace side navigation with bottom tabs. Stack cards vertically. Make charts scrollable or simplified. Replace hover interactions with tap-to-reveal. Consider pull-to-refresh for data updates.
397
162
  ````