@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.
- package/CHANGELOG.md +15 -0
- package/dist/cli/core.js +4 -18
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +4 -18
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- 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:
|
|
6
|
-
|
|
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
|
|
13
|
+
# Mobile Design
|
|
10
14
|
|
|
11
|
-
|
|
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
|
-
|
|
19
|
+
## When to Use
|
|
31
20
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
28
|
+
## Instructions
|
|
46
29
|
|
|
47
|
-
###
|
|
30
|
+
### Step 1 — Design for Touch
|
|
48
31
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
|
53
|
-
|
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
+
### Step 2 — Follow Platform Conventions
|
|
79
53
|
|
|
80
|
-
|
|
54
|
+
**iOS (Human Interface Guidelines)**:
|
|
81
55
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
62
|
+
**Android (Material Design)**:
|
|
94
63
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
70
|
+
**Cross-platform (React Native, Flutter)**:
|
|
106
71
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
76
|
+
### Step 3 — Optimize Mobile Layouts
|
|
126
77
|
|
|
127
|
-
|
|
78
|
+
**Mobile-first hierarchy**:
|
|
128
79
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
103
|
+
### Step 4 — Handle Mobile-Specific Challenges
|
|
160
104
|
|
|
161
|
-
|
|
105
|
+
**Keyboards**:
|
|
162
106
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
168
|
-
→ Important actions in THUMB ZONE (bottom of screen)
|
|
169
|
-
→ Destructive actions AWAY from easy reach
|
|
170
|
-
```
|
|
112
|
+
**Offline & connectivity**:
|
|
171
113
|
|
|
172
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
278
|
-
|
|
279
|
-
```
|
|
280
|
-
🧠 CHECKPOINT:
|
|
153
|
+
## Examples
|
|
281
154
|
|
|
282
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
````
|