@eltonssouza/development-utility-kit 0.10.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 (131) hide show
  1. package/.claude/agents/README.md +24 -0
  2. package/.claude/agents/analyst.md +198 -0
  3. package/.claude/agents/backend-developer.md +126 -0
  4. package/.claude/agents/brain-keeper.md +229 -0
  5. package/.claude/agents/code-reviewer.md +181 -0
  6. package/.claude/agents/database-engineer.md +94 -0
  7. package/.claude/agents/devops-engineer.md +141 -0
  8. package/.claude/agents/frontend-developer.md +97 -0
  9. package/.claude/agents/gate-keeper.md +118 -0
  10. package/.claude/agents/migrator.md +291 -0
  11. package/.claude/agents/mobile-developer.md +80 -0
  12. package/.claude/agents/n8n-specialist.md +94 -0
  13. package/.claude/agents/product-owner.md +115 -0
  14. package/.claude/agents/qa-engineer.md +232 -0
  15. package/.claude/agents/release-engineer.md +204 -0
  16. package/.claude/agents/scaffold.md +87 -0
  17. package/.claude/agents/security-engineer.md +199 -0
  18. package/.claude/agents/sprint-runner.md +46 -0
  19. package/.claude/agents/stack-resolver.md +104 -0
  20. package/.claude/agents/tech-lead.md +182 -0
  21. package/.claude/agents/update-template.md +54 -0
  22. package/.claude/agents/ux-designer.md +118 -0
  23. package/.claude/hooks/flow-guard.js +261 -0
  24. package/.claude/hooks/flow-state.js +197 -0
  25. package/.claude/local/CLAUDE.md +71 -0
  26. package/.claude/settings.json +55 -0
  27. package/.claude/skills/README.md +331 -0
  28. package/.claude/skills/active-project/SKILL.md +131 -0
  29. package/.claude/skills/api-integration-test/SKILL.md +84 -0
  30. package/.claude/skills/auto-test-guard/SKILL.md +239 -0
  31. package/.claude/skills/auto-test-guard/resources/backend-tests.md +20 -0
  32. package/.claude/skills/auto-test-guard/resources/e2e-tests.md +24 -0
  33. package/.claude/skills/auto-test-guard/resources/execution-report.md +49 -0
  34. package/.claude/skills/auto-test-guard/resources/frontend-tests.md +18 -0
  35. package/.claude/skills/auto-test-guard/resources/initial-setup.md +108 -0
  36. package/.claude/skills/auto-test-guard/resources/run-suite.md +48 -0
  37. package/.claude/skills/auto-test-guard/resources/senior-gate.md +19 -0
  38. package/.claude/skills/brain-keeper/SKILL.md +62 -0
  39. package/.claude/skills/brain-keeper/obsidian/app.json +9 -0
  40. package/.claude/skills/brain-keeper/obsidian/appearance.json +4 -0
  41. package/.claude/skills/brain-keeper/obsidian/core-plugins.json +20 -0
  42. package/.claude/skills/brain-keeper/obsidian/daily-notes.json +5 -0
  43. package/.claude/skills/brain-keeper/obsidian/graph.json +32 -0
  44. package/.claude/skills/brain-keeper/obsidian/snippets/folder-colors.css +90 -0
  45. package/.claude/skills/brain-keeper/obsidian/templates.json +5 -0
  46. package/.claude/skills/brain-keeper/templates/README.md +51 -0
  47. package/.claude/skills/brain-keeper/templates/adr.md +40 -0
  48. package/.claude/skills/brain-keeper/templates/bug.md +35 -0
  49. package/.claude/skills/brain-keeper/templates/daily.md +38 -0
  50. package/.claude/skills/brain-keeper/templates/feature.md +62 -0
  51. package/.claude/skills/brain-keeper/templates/meeting.md +34 -0
  52. package/.claude/skills/brain-keeper/templates/tech-debt.md +21 -0
  53. package/.claude/skills/caveman/SKILL.md +189 -0
  54. package/.claude/skills/create-stack-pack/SKILL.md +281 -0
  55. package/.claude/skills/grill-me/SKILL.md +80 -0
  56. package/.claude/skills/pair-debug/SKILL.md +288 -0
  57. package/.claude/skills/prd-ready-check/SKILL.md +86 -0
  58. package/.claude/skills/project-manager/SKILL.md +334 -0
  59. package/.claude/skills/quality-standards/SKILL.md +203 -0
  60. package/.claude/skills/quick-feature/SKILL.md +266 -0
  61. package/.claude/skills/run-sprint/SKILL.md +41 -0
  62. package/.claude/skills/scaffold/SKILL.md +60 -0
  63. package/.claude/skills/stack-discovery/SKILL.md +161 -0
  64. package/.claude/skills/test-coverage-auditor/SKILL.md +87 -0
  65. package/.claude/skills/to-issues/SKILL.md +163 -0
  66. package/.claude/skills/to-prd/SKILL.md +130 -0
  67. package/.claude/skills/update-template/SKILL.md +256 -0
  68. package/.claude/stacks/CODEOWNERS +30 -0
  69. package/.claude/stacks/README.md +97 -0
  70. package/.claude/stacks/_template.md +116 -0
  71. package/.claude/stacks/dotnet/aspire-9.md +528 -0
  72. package/.claude/stacks/go/gin-1.10.md +570 -0
  73. package/.claude/stacks/java/spring-boot-3.md +376 -0
  74. package/.claude/stacks/java/spring-boot-4.md +438 -0
  75. package/.claude/stacks/node/express-5.md +538 -0
  76. package/.claude/stacks/python/django-5.md +483 -0
  77. package/.claude/stacks/python/fastapi-0.115.md +522 -0
  78. package/.claude/stacks/typescript/angular-18.md +420 -0
  79. package/.claude/stacks/typescript/angular-19.md +397 -0
  80. package/.claude/stacks/typescript/angular-21.md +494 -0
  81. package/CLAUDE.md +472 -0
  82. package/README.md +412 -0
  83. package/bin/cli.js +848 -0
  84. package/bin/lib/adr.js +146 -0
  85. package/bin/lib/backup.js +62 -0
  86. package/bin/lib/detect-stack.js +476 -0
  87. package/bin/lib/doctor.js +527 -0
  88. package/bin/lib/help.js +328 -0
  89. package/bin/lib/identity.js +108 -0
  90. package/bin/lib/lint-allowlist.json +15 -0
  91. package/bin/lib/lint.js +798 -0
  92. package/bin/lib/local-dir.js +68 -0
  93. package/bin/lib/manifest.js +236 -0
  94. package/bin/lib/sync-all.js +394 -0
  95. package/bin/lib/version-check.js +398 -0
  96. package/dashboard/db.js +321 -0
  97. package/dashboard/package.json +22 -0
  98. package/dashboard/public/app.js +853 -0
  99. package/dashboard/public/content/docs/agents-reference.en.md +911 -0
  100. package/dashboard/public/content/docs/architecture-overview.en.md +252 -0
  101. package/dashboard/public/content/docs/autonomy-matrix.en.md +186 -0
  102. package/dashboard/public/content/docs/cli-reference.en.md +538 -0
  103. package/dashboard/public/content/docs/git-flow.en.md +525 -0
  104. package/dashboard/public/content/docs/honcho-memory.en.md +394 -0
  105. package/dashboard/public/content/docs/hooks-reference.en.md +404 -0
  106. package/dashboard/public/content/docs/pipeline.en.md +414 -0
  107. package/dashboard/public/content/docs/plugins.en.md +289 -0
  108. package/dashboard/public/content/docs/quality-gate.en.md +315 -0
  109. package/dashboard/public/content/docs/skills-reference.en.md +484 -0
  110. package/dashboard/public/content/docs/stack-rules.en.md +362 -0
  111. package/dashboard/public/content/docs/troubleshooting.en.md +565 -0
  112. package/dashboard/public/content/manifest.json +114 -0
  113. package/dashboard/public/content/manual/backend.en.md +1053 -0
  114. package/dashboard/public/content/manual/existing-project.en.md +848 -0
  115. package/dashboard/public/content/manual/frontend.en.md +1008 -0
  116. package/dashboard/public/content/manual/fullstack.en.md +1459 -0
  117. package/dashboard/public/content/manual/mobile.en.md +837 -0
  118. package/dashboard/public/content/manual/quickstart.en.md +169 -0
  119. package/dashboard/public/index.html +217 -0
  120. package/dashboard/public/style.css +857 -0
  121. package/dashboard/public/vendor/marked.min.js +69 -0
  122. package/dashboard/rtk.js +143 -0
  123. package/dashboard/server-app.js +421 -0
  124. package/dashboard/server.js +104 -0
  125. package/dashboard/test/sprint1.test.js +406 -0
  126. package/dashboard/test/sprint2.test.js +571 -0
  127. package/dashboard/test/sprint3.test.js +560 -0
  128. package/package.json +33 -0
  129. package/scripts/hooks/subagent-telemetry.sh +14 -0
  130. package/scripts/hooks/telemetry-writer.js +250 -0
  131. package/scripts/latest-versions.json +56 -0
@@ -0,0 +1,837 @@
1
+ # Mobile — React Native 0.84+ + Expo SDK 54+
2
+
3
+ Onboarding guide for mobile development with React Native, Expo, and development-utility-kit.
4
+
5
+ ## Who this manual is for
6
+
7
+ Mobile developer working on a React Native app (Expo managed or bare) that will use the development-utility-kit harness as an orchestration layer for skills + agents. The guide covers everything from an empty folder to EAS Build in production, including discovery, sprints, tests, and debugging.
8
+
9
+ Prerequisites:
10
+
11
+ - Node.js 22+ and npm 10+ on PATH
12
+ - Expo CLI (`npm install --global expo-cli` optional; prefer `npx`)
13
+ - Android Studio (with SDK 35+) for local Android builds
14
+ - Xcode 16+ + CocoaPods for local iOS builds (macOS only)
15
+ - EAS account (`npx eas-cli login`)
16
+ - Git, Git Bash, or WSL on Windows
17
+
18
+ Cowork or Claude Code open in the project folder. The harness lives at `C:\development\tools\development-utility-kit` (Windows) or `~/development/tools/development-utility-kit` (macOS/Linux).
19
+
20
+ ## Real CLI (duk)
21
+
22
+ The `duk` binary covers 3 verbs:
23
+
24
+ ```bash
25
+ duk install # install/update harness in current folder
26
+ duk install --sub mobile # install in ./mobile subfolder
27
+ duk install --dry-run # show what it would do, no writes
28
+ duk dashboard # open local dashboard
29
+ duk update # alias for `duk install`
30
+ ```
31
+
32
+ **Important**: there is NO `duk <skill>`. Skills trigger by keyword match in chat with Claude. Do not type `duk bootstrap-mobile`, `duk run-sprint`, `duk grill-me`. Everything is conversation.
33
+
34
+ ## 5-min onboarding
35
+
36
+ Mobile has no `bootstrap-mobile` skill. Scaffolding is the responsibility of the `mobile-developer` agent via `project-manager` (catch-all skill). Step by step:
37
+
38
+ ```bash
39
+ # 1. Create Expo project (manual, outside the harness)
40
+ npx create-expo-app@latest MyApp --template blank-typescript
41
+ cd MyApp
42
+
43
+ # 2. Install harness in the app folder
44
+ duk install
45
+ # Expected output:
46
+ # ✓ .claude/ provisioned (skills + agents + hooks)
47
+ # ✓ CLAUDE.md created (fill in Project Identity)
48
+ # ✓ docs/brain/ provisioned (Obsidian vault)
49
+ # ✓ scripts/hooks/ installed
50
+ ```
51
+
52
+ Edit `CLAUDE.md` under the `Project Identity` section:
53
+
54
+ ```markdown
55
+ ## Project Identity
56
+
57
+ - **Project name**: `my-mobile-app`
58
+ - **Project type**: `mobile`
59
+ - **Primary stack**: `React Native 0.84+ / Expo SDK 54+`
60
+ - **Database**: `MMKV (local) + remote REST API`
61
+ - **Domain**: `e-commerce`
62
+ - **Team size**: `2 mobile`
63
+ - **Additional rules**:
64
+ ```
65
+
66
+ Optional dashboard to inspect harness state:
67
+
68
+ ```bash
69
+ duk dashboard
70
+ # Opens http://localhost:4300
71
+ ```
72
+
73
+ Open the folder in Cowork or Claude Code. First chat configures the app:
74
+
75
+ ```
76
+ you:
77
+ configure mobile project with Expo Router, TypeScript strict, New Architecture
78
+
79
+ Claude (project-manager -> mobile-developer):
80
+ > Applied:
81
+ > - app.json: newArchEnabled: true, scheme "myapp"
82
+ > - tsconfig.json: strict: true, noUncheckedIndexedAccess: true
83
+ > - expo-router installed, app/_layout.tsx + app/(tabs)/_layout.tsx
84
+ > - app/(tabs)/index.tsx Home
85
+ > - app/(tabs)/profile.tsx Profile
86
+ > - .eslintrc with @typescript-eslint strict
87
+ > - jest.config.ts + jest-expo preset
88
+ > Run `npx expo start` to validate.
89
+ ```
90
+
91
+ ## Mandatory stack
92
+
93
+ | Technology | Version | Notes |
94
+ |---|---|---|
95
+ | React Native | 0.84+ | New Architecture mandatory (Fabric + TurboModules) |
96
+ | React | 19+ | Server Components awareness, but RN stays client-only |
97
+ | TypeScript | strict | `tsconfig.json` with `strict: true`, `noUncheckedIndexedAccess: true` |
98
+ | Expo | SDK 54+ | Prefer managed; bare workflow only with justification |
99
+ | Navigation | React Navigation 7+ or Expo Router | Expo Router default in new apps |
100
+ | State | Zustand / TanStack Query / Jotai | Zustand for local state; TanStack for server state |
101
+ | Styling | NativeWind 4+ or StyleSheet | NativeWind if the team comes from Tailwind |
102
+ | Animation | Reanimated 4 + Gesture Handler | Always animate on the UI thread |
103
+ | Lists | FlashList 2+ | FlatList only for lists < 20 items |
104
+ | Storage | MMKV (sync) or AsyncStorage | MMKV default; AsyncStorage only on legacy |
105
+ | Secure storage | expo-secure-store | Token, refresh token, biometric secret |
106
+ | Forms | react-hook-form + zod | Validation with zod, single schema client+API |
107
+ | Unit testing | Jest + React Native Testing Library | jest-expo preset |
108
+ | E2E testing | Detox or Maestro | Detox for native iOS+Android; Maestro for simple flows |
109
+ | Build | EAS Build | Cloud build default |
110
+ | Submit | EAS Submit | Automated store submission |
111
+ | OTA | expo-updates + EAS Update | Hotfix without store review |
112
+
113
+ ## CLAUDE.md Project Identity (mobile)
114
+
115
+ ```markdown
116
+ ## Project Identity
117
+
118
+ - **Project name**: `my-mobile-app`
119
+ - **Project type**: `mobile`
120
+ - **Primary stack**: `React Native 0.84+ / Expo SDK 54+`
121
+ - **State**: `Zustand + TanStack Query`
122
+ - **Navigation**: `Expo Router`
123
+ - **Storage**: `MMKV + expo-secure-store`
124
+ - **Domain**: `e-commerce`
125
+ - **Team size**: `2 mobile`
126
+ ```
127
+
128
+ ## Skills applicable to mobile
129
+
130
+ Mobile uses the harness's general skill catalog. There is no mobile-specific skill. `project-manager` does the catch-all routing to `mobile-developer`.
131
+
132
+ | Skill | EN trigger | Output |
133
+ |---|---|---|
134
+ | `project-manager` | "create mobile app", "react native", "convert Angular to mobile" | Delegates to `mobile-developer` via Task |
135
+ | `grill-me` | "grill me about X", "interview me about X" | `DISCOVERY_*.md` |
136
+ | `to-prd` | "generate PRD" | `PRD_*.md` |
137
+ | `to-issues` | "split into issues" | `ISSUES_*.md` |
138
+ | `run-sprint` | "run sprint N", "execute the sprint" | Sprint implemented with green tests |
139
+ | `auto-test-guard` | "run tests", "generate tests" | Suite + senior+ gate |
140
+ | `pair-debug` | "let's debug X", "investigate this bug" | Hypothesis -> probe -> confirm loop |
141
+ | `prd-ready-check` | "PRD ready?", "DoD" | GO / NO-GO |
142
+ | `brain-keeper` | "record in brain", end of PLAN | Notes in `docs/brain/` |
143
+ | `active-project` | "/active-project <path>" | Fast-lane adoption |
144
+ | `update-template` | "update template" | Sync `.claude/` + `CLAUDE.md` |
145
+ | `caveman` | always-on, "stop caveman" | Telegraphic output |
146
+
147
+ ### `project-manager` (catch-all — replaces bootstrap-mobile)
148
+
149
+ Since there is NO `bootstrap-mobile`, all scaffolding or structural changes go through `project-manager`:
150
+
151
+ ```
152
+ you:
153
+ create mobile app with Expo SDK 54 and tab navigation
154
+
155
+ Claude (project-manager):
156
+ > Intent identified: mobile scaffold.
157
+ > Delegating to mobile-developer.
158
+
159
+ Claude (mobile-developer):
160
+ > npx create-expo-app@latest --template blank-typescript .
161
+ > Configured Expo Router with (tabs).
162
+ > Installed: zustand, @tanstack/react-query, react-native-mmkv,
163
+ > expo-secure-store, react-hook-form, zod, @shopify/flash-list
164
+ > jest-expo + RNTL + Detox in devDependencies.
165
+ > CLAUDE.md updated for type=mobile.
166
+ > Done. `npx expo start` to validate.
167
+ ```
168
+
169
+ ### `grill-me` (typical mobile discovery)
170
+
171
+ Mobile discovery covers platform-specific topics:
172
+
173
+ - iOS-first vs Android-first vs parallel
174
+ - Online-first vs offline-first
175
+ - Biometric auth (Face ID, Touch ID, Android Biometric)
176
+ - Push notification (Expo Notifications vs native FCM/APNs)
177
+ - Universal deep linking vs custom scheme
178
+ - OTA strategy (which channel, which SLA)
179
+ - Accessibility (Screen reader, dynamic type, touch targets)
180
+
181
+ ```
182
+ you:
183
+ grill me about checkout screen with Apple Pay and Google Pay
184
+
185
+ Claude (grill-me):
186
+ > 1. What price range is supported?
187
+ > 2. Multi-currency?
188
+ > 3. Idempotency: does the backend have an idempotency-key already?
189
+ > 4. Fallback if Apple/Google Pay unavailable? Stripe? PIX in Brazil?
190
+ > 5. Lock orientation during payment — yes or no?
191
+ > 6. Offline behavior: can payment start without internet?
192
+ > 7. iOS-first launch or Android-first?
193
+ ```
194
+
195
+ ### `auto-test-guard` (mobile thresholds)
196
+
197
+ Senior+ gate adapts for mobile (Detox flakiness tolerated):
198
+
199
+ | Metric | Mobile threshold |
200
+ |---|---|
201
+ | Jest statements | >= 85% |
202
+ | Jest branches | >= 80% |
203
+ | RN Testing Library a11y | 0 critical |
204
+ | Detox/Maestro E2E | critical flows green, retry up to 3x |
205
+ | ESLint | 0 errors, 0 new warnings |
206
+ | TS strict | no `any` in new code |
207
+ | Bundle size delta | < 200KB per feature (warn), block > 500KB |
208
+
209
+ ### `pair-debug` (typically mobile)
210
+
211
+ Mobile has its own class of bugs that warrant the hypothesis-driven loop:
212
+
213
+ - Metro cache corrupted after `git pull`
214
+ - `pod install` failing on CocoaPods version
215
+ - Gradle daemon stuck
216
+ - New Architecture incompatible with legacy lib
217
+ - Hermes crash with no stack trace
218
+ - EAS Build failing on signing
219
+
220
+ ## Workflow 1 — Feature from scratch (15 turns)
221
+
222
+ Scenario: product list screen with pull-to-refresh, infinite scroll, and API integration.
223
+
224
+ ```
225
+ Turn 1 — you:
226
+ grill me about product list screen with pull-to-refresh and infinite scroll
227
+
228
+ Turn 1 — Claude (grill-me):
229
+ > Let's scope this.
230
+ > 1. How many products per page? I recommend 20 with cursor pagination
231
+ > (not offset — avoids drift when the list changes during scroll).
232
+ > 2. Cache: TanStack Query with 5min staleTime? Persisted to MMKV?
233
+ > 3. Offline: show last cache + "offline" banner when no network?
234
+ > 4. Skeleton during initial load or native ProgressView?
235
+ > 5. Does pull-to-refresh invalidate cache or just refetch the first page?
236
+ > 6. Error: auto-retry or manual button?
237
+ > 7. Accessibility: VoiceOver / TalkBack — announce "loading more"?
238
+ ```
239
+
240
+ ```
241
+ Turn 2 — you:
242
+ 20 per page with cursor. TanStack staleTime 5min. Offline shows cache + banner.
243
+ Initial skeleton. Pull-to-refresh invalidates everything. Auto-retry 2x then manual.
244
+ A11y mandatory.
245
+
246
+ Turn 2 — Claude (grill-me):
247
+ > Discovery complete. Saved to docs/discovery/DISCOVERY_product-list.md.
248
+ > Next: "generate PRD" to produce PRD_product-list.md.
249
+ ```
250
+
251
+ ```
252
+ Turn 3 — you:
253
+ generate PRD
254
+
255
+ Turn 3 — Claude (to-prd):
256
+ > docs/prd/PRD_product-list.md created.
257
+ > Overview, Goals, User Stories (US-1..US-4), Functional Requirements,
258
+ > Non-functional (a11y AA, p95 < 800ms first page, offline fallback),
259
+ > Out of scope (filters, sorting — backlog).
260
+ ```
261
+
262
+ ```
263
+ Turn 4 — you:
264
+ split into issues
265
+
266
+ Turn 4 — Claude (to-issues):
267
+ > docs/issues/ISSUES_product-list.md created with 6 [ISSUE-N] blocks.
268
+ > To open all on GitHub:
269
+ > gh issue create --title "..." --body-file ...
270
+ > (commands ready in the file)
271
+ ```
272
+
273
+ ```
274
+ Turn 5 — you:
275
+ analyst generate plan
276
+
277
+ Turn 5 — Claude (analyst):
278
+ > docs/plans/PLAN_product-list.md created.
279
+ > Sprint 1: hook + service + cache (3 tasks)
280
+ > Sprint 2: UI + FlashList + skeleton (4 tasks)
281
+ > Sprint 3: pull-to-refresh + error + offline banner (3 tasks)
282
+ > Sprint 4: E2E tests + a11y audit (2 tasks)
283
+ > Each task with goal-ready DoD.
284
+ ```
285
+
286
+ ```
287
+ Turn 6 — you:
288
+ prd ready?
289
+
290
+ Turn 6 — Claude (prd-ready-check):
291
+ > Evaluating PRD_product-list.md + PLAN_product-list.md.
292
+ > ✓ User Stories with measurable criteria
293
+ > ✓ Non-functional with numeric thresholds
294
+ > ✓ Out of scope explicit
295
+ > ✓ Goal-ready DoD on all tasks
296
+ > GO. Can start sprint 1.
297
+ ```
298
+
299
+ ```
300
+ Turn 7 — you:
301
+ run sprint 1 of PLAN_product-list.md
302
+
303
+ Turn 7 — Claude (run-sprint):
304
+ > Sprint 1 — initial backlog:
305
+ > [Task 1.1] qa-engineer writes failing test (Red)
306
+ > [Task 1.2] mobile-developer implements hook + service (Green)
307
+ > [Task 1.3] gate-keeper validates senior+
308
+ >
309
+ > [Task 1.1] qa-engineer:
310
+ > features/products/useProductList.test.ts created, 4 scenarios failing.
311
+ >
312
+ > [Task 1.2] mobile-developer:
313
+ > - features/products/useProductList.ts (TanStack Query infinite)
314
+ > - features/products/product.service.ts (cursor fetch)
315
+ > - features/products/product.types.ts (zod schema)
316
+ > - 4 scenarios passing ✓
317
+ >
318
+ > [Task 1.3] gate-keeper:
319
+ > Jest statements 91% ✓
320
+ > ESLint 0 warnings ✓
321
+ > TS strict 0 any ✓
322
+ > GREEN. Sprint 1 done.
323
+ ```
324
+
325
+ ```
326
+ Turn 8 — you:
327
+ run sprint 2
328
+
329
+ Turn 8 — Claude (run-sprint):
330
+ > Sprint 2 — UI with FlashList:
331
+ > [Task 2.1] qa-engineer writes RNTL test (snapshot + a11y)
332
+ > [Task 2.2] mobile-developer implements screen
333
+ > [Task 2.3] gate-keeper validates
334
+ >
335
+ > [Task 2.2] mobile-developer:
336
+ > - features/products/ProductListScreen.tsx (FlashList 2 estimatedItemSize 96)
337
+ > - features/products/ProductCard.tsx (memo, OnPress callback)
338
+ > - features/products/ProductSkeleton.tsx (Reanimated 4 pulse)
339
+ > - app/(tabs)/products/index.tsx (Expo Router route)
340
+ >
341
+ > [Task 2.3] gate-keeper:
342
+ > Jest 88% ✓
343
+ > RNTL a11y 0 critical ✓
344
+ > FlashList warnings: 0 ✓
345
+ > GREEN.
346
+ ```
347
+
348
+ ```
349
+ Turn 9 — you:
350
+ run sprint 3
351
+
352
+ Turn 9 — Claude (run-sprint):
353
+ > Sprint 3 — pull-to-refresh, error, offline:
354
+ > - RefreshControl with invalidateQueries
355
+ > - Local ErrorBoundary + retry button
356
+ > - NetInfo subscription -> "offline" banner
357
+ > - MMKV persister for TanStack cache
358
+ >
359
+ > gate-keeper GREEN.
360
+ ```
361
+
362
+ ```
363
+ Turn 10 — you:
364
+ run sprint 4
365
+
366
+ Turn 10 — Claude (run-sprint):
367
+ > Sprint 4 — E2E + a11y:
368
+ > [Task 4.1] qa-engineer writes Detox test
369
+ > [Task 4.2] qa-engineer runs axe-core/react-native scan
370
+ >
371
+ > [Task 4.1]:
372
+ > e2e/product-list.e2e.ts — scroll, pull-to-refresh, offline mode
373
+ > Dev client build + Detox run: 3 scenarios green, retry used in 1
374
+ >
375
+ > [Task 4.2]:
376
+ > 0 critical, 0 serious. 2 minor (low contrast on badge).
377
+ > Auto-fix applied.
378
+ >
379
+ > gate-keeper GREEN.
380
+ ```
381
+
382
+ ```
383
+ Turn 11 — you:
384
+ record in brain
385
+
386
+ Turn 11 — Claude (brain-keeper):
387
+ > docs/brain/features/product-list.md created.
388
+ > docs/brain/daily/2026-05-27.md updated.
389
+ > Obsidian links to PRD, PLAN, ADR (none created this sprint).
390
+ > MOC.md updated.
391
+ ```
392
+
393
+ ```
394
+ Turn 12 — you:
395
+ ready for production?
396
+
397
+ Turn 12 — Claude (gate-keeper):
398
+ > Final senior+ gate:
399
+ > ✓ Jest 87% statements
400
+ > ✓ RNTL 0 critical a11y
401
+ > ✓ Detox critical flows green
402
+ > ✓ Bundle delta +180KB (warn — ok)
403
+ > ✓ TS strict
404
+ > ✓ ESLint clean
405
+ > Cleared for production build.
406
+ ```
407
+
408
+ ## Workflow 2 — Biometric authentication
409
+
410
+ ```
411
+ you:
412
+ create auth flow with biometric using expo-local-authentication
413
+
414
+ Claude (project-manager -> mobile-developer):
415
+ > Installs expo-local-authentication, expo-secure-store.
416
+ > Creates:
417
+ > - features/auth/BiometricAuthScreen.tsx ("Sign in with Face ID" button)
418
+ > - features/auth/PasswordFallbackScreen.tsx
419
+ > - services/biometric.service.ts:
420
+ > authenticateAsync({ promptMessage, fallbackLabel: 'Use password' })
421
+ > - services/credentials.store.ts (SecureStore, namespace "auth.v1")
422
+ > - store/auth.store.ts (Zustand: { user, token, refreshAt })
423
+ > - app/(auth)/_layout.tsx (gate for authenticated routes)
424
+ >
425
+ > Unit test: services/biometric.service.test.ts (mock LocalAuth)
426
+ > E2E test: e2e/biometric.e2e.ts (skipped on CI without biometric device)
427
+ >
428
+ > Applied. Want to run "run tests"?
429
+ ```
430
+
431
+ ## Workflow 3 — EAS Build + Submit setup
432
+
433
+ ```
434
+ you:
435
+ configure EAS Build for Android and iOS
436
+
437
+ Claude (devops-engineer):
438
+ > Commands for you to run locally (needs your login):
439
+ > npm install --global eas-cli
440
+ > eas login
441
+ > eas build:configure
442
+ >
443
+ > I'll create eas.json with 3 profiles:
444
+
445
+ > {
446
+ > "build": {
447
+ > "development": {
448
+ > "developmentClient": true,
449
+ > "distribution": "internal",
450
+ > "channel": "development"
451
+ > },
452
+ > "preview": {
453
+ > "distribution": "internal",
454
+ > "channel": "preview",
455
+ > "ios": { "simulator": false },
456
+ > "android": { "buildType": "apk" }
457
+ > },
458
+ > "production": {
459
+ > "channel": "production",
460
+ > "autoIncrement": true
461
+ > }
462
+ > },
463
+ > "submit": {
464
+ > "production": {
465
+ > "android": { "track": "production" },
466
+ > "ios": { "ascAppId": "1234567890" }
467
+ > }
468
+ > }
469
+ > }
470
+ >
471
+ > Build commands:
472
+ > eas build --platform all --profile production
473
+ > eas submit -p android --latest
474
+ > eas submit -p ios --latest
475
+ ```
476
+
477
+ ```
478
+ you:
479
+ generate OTA update production with hotfix
480
+
481
+ Claude (devops-engineer):
482
+ > Pre-checks:
483
+ > ✓ expo-updates installed and configured (app.json runtimeVersion)
484
+ > ✓ "production" channel exists in eas.json
485
+ > ✓ No native code changes (verified git diff android/ ios/)
486
+ >
487
+ > Command:
488
+ > eas update --branch production --message "Hotfix: fix crash on list"
489
+ >
490
+ > After publish:
491
+ > - Prod devices get update on next cold start (or checkAutomatically: ON_LOAD)
492
+ > - Monitor: https://expo.dev/accounts/<org>/projects/<app>/updates
493
+ >
494
+ > Warning: if you changed native code, OTA will not work. You must rebuild.
495
+ ```
496
+
497
+ ## Workflow 4 — Angular -> React Native conversion
498
+
499
+ ```
500
+ you:
501
+ convert my existing Angular app to React Native preserving business logic
502
+
503
+ Claude (mobile-developer):
504
+ > Phase 1 — Catalog (read-only, no Angular changes):
505
+ > ✓ 12 features detected in src/app/features/
506
+ > ✓ 8 HttpClient services in src/app/core/services/
507
+ > ✓ 5 guards (auth, role-admin, role-user, has-tenant, feature-flag)
508
+ > ✓ 23 standalone components
509
+ > ✓ 4 pipes (currency, date-relative, mask-cpf, truncate)
510
+ >
511
+ > Phase 2 — Mapping:
512
+ > Angular service -> custom hook + Zustand
513
+ > UserService.getMe() -> useMe() (TanStack Query)
514
+ > CartService.add() -> useCart() (Zustand action)
515
+ > Angular component -> functional component + hooks
516
+ > ProductCardComponent -> ProductCard.tsx (memo)
517
+ > Guard -> Expo Router middleware
518
+ > authGuard -> app/(auth)/_layout.tsx redirect
519
+ > Pipe -> pure function
520
+ > currencyPipe -> formatCurrency(value, locale)
521
+ >
522
+ > Phase 3 — Incremental migration, feature by feature:
523
+ > Sprint A: auth + me + bootstrap
524
+ > Sprint B: signup feature
525
+ > Sprint C: listing feature
526
+ > ...
527
+ >
528
+ > Phase 4 — RN Testing Library + Detox tests per feature.
529
+ >
530
+ > Want to start with Sprint A? Type "run sprint A".
531
+ ```
532
+
533
+ ## Workflow 5 — pair-debug (Metro stuck)
534
+
535
+ ```
536
+ you:
537
+ let's debug — Metro is stuck and build won't run after git pull
538
+
539
+ Claude (pair-debug):
540
+ > Symptom: after recent git pull, npx expo start hangs at "Starting Metro Bundler".
541
+ > Hypothesis 1 (85% confidence): Metro cache invalid due to changes in
542
+ > node_modules or metro.config.js.
543
+ > Probe: run `watchman watch-del-all && rm -rf $TMPDIR/metro-* /tmp/metro-*`.
544
+ > Confirm probe? (yes/no)
545
+
546
+ you: yes
547
+
548
+ Claude:
549
+ > Executed. Caches cleared.
550
+ > Next step: `npx expo start --clear`.
551
+ > If still stuck, hypothesis 2 (60%): outdated node_modules.
552
+ > Probe: rm -rf node_modules && npm ci.
553
+
554
+ you:
555
+ didn't work. still stuck
556
+
557
+ Claude:
558
+ > Hypothesis 2 active.
559
+ > Probe: rm -rf node_modules package-lock.json .expo && npm install.
560
+ > Confirm? (yes/no)
561
+
562
+ you: yes
563
+
564
+ Claude:
565
+ > Executed. npm install complete in 47s.
566
+ > Run again: npx expo start --clear.
567
+ > If it persists, hypothesis 3 (40%): watchman conflict with WSL/Windows
568
+ > filesystem. Check `watchman --version` and `watchman watch-list`.
569
+ ```
570
+
571
+ ## Workflow 6 — Push notifications
572
+
573
+ ```
574
+ you:
575
+ create push notification with expo-notifications
576
+
577
+ Claude (project-manager -> mobile-developer):
578
+ > Installs expo-notifications + expo-device.
579
+ > Configures:
580
+ > - app.json: plugins ["expo-notifications", { icon, color }]
581
+ > - iOS: requests notifyOnUserAction permission
582
+ > - Android: creates "default" channel on boot
583
+ > Creates:
584
+ > - services/notifications.service.ts:
585
+ > registerForPushNotificationsAsync()
586
+ > getExpoPushTokenAsync({ projectId })
587
+ > - hooks/useNotificationListener.ts:
588
+ > Notifications.addNotificationReceivedListener
589
+ > Notifications.addNotificationResponseReceivedListener
590
+ > - store/notifications.store.ts (list, badge count, mark-read)
591
+ > Backend (suggested):
592
+ > POST /api/v1/devices { expoPushToken, platform, locale }
593
+ > POST /api/v1/notifications/dispatch (server -> Expo Push API)
594
+ > Test: mock Notifications.scheduleNotificationAsync in jest setup.
595
+ > Next: configure permission in the onboarding flow.
596
+ ```
597
+
598
+ ## Workflow 7 — Deep linking
599
+
600
+ ```
601
+ you:
602
+ configure universal deep linking for /products/:id
603
+
604
+ Claude (mobile-developer):
605
+ > app.json:
606
+ > "scheme": "myapp",
607
+ > "ios": { "associatedDomains": ["applinks:myapp.com"] },
608
+ > "android": { "intentFilters": [{ "action": "VIEW",
609
+ > "data": [{ "scheme": "https", "host": "myapp.com",
610
+ > "pathPrefix": "/products" }], "category": ["BROWSABLE","DEFAULT"] }] }
611
+ > Expo Router automatically maps /products/[id] to app/products/[id].tsx.
612
+ > Creates:
613
+ > - app/products/[id].tsx (loads product via useProduct(id))
614
+ > - Linking.createURL helper in utils/links.ts
615
+ > Test:
616
+ > adb shell am start -W -a android.intent.action.VIEW \
617
+ > -d "myapp://products/42" com.example.myapp
618
+ > xcrun simctl openurl booted "myapp://products/42"
619
+ > Universal link requires apple-app-site-association + assetlinks.json
620
+ > hosted at https://myapp.com/.well-known/.
621
+ ```
622
+
623
+ ## Cheat sheet — mobile triggers
624
+
625
+ | I want to... | Type in chat |
626
+ |---|---|
627
+ | Create mobile app from scratch | `create mobile app with Expo SDK 54` |
628
+ | Add a screen with discovery | `grill me about <screen>` -> `generate PRD` -> `run sprint` |
629
+ | Biometric auth | `create auth flow with biometric` |
630
+ | Push notification | `create push notification with expo-notifications` |
631
+ | Deep link | `configure deep linking for /products/:id` |
632
+ | EAS Build | `configure EAS Build` |
633
+ | EAS Submit | `submit to Google Play and App Store` |
634
+ | Production OTA update | `generate OTA update production` |
635
+ | Migrate Angular -> RN | `convert Angular app to React Native` |
636
+ | Debug stuck Metro | `let's debug — Metro stuck` |
637
+ | Debug pod install | `let's debug — pod install fail` |
638
+ | Run tests | `run tests` |
639
+ | Final pre-store gate | `ready for production?` |
640
+ | Record history | `record in brain` |
641
+ | Remember preference | `remember that <X>` |
642
+
643
+ ## Decision tree
644
+
645
+ ```
646
+ Empty app? -> create mobile app with Expo SDK 54
647
+ (project-manager -> mobile-developer)
648
+
649
+ New screen or feature? -> grill me about <X>
650
+ -> generate PRD
651
+ -> analyst generate plan
652
+ -> run sprint N
653
+
654
+ Native auth (Face/Touch ID)? -> create auth flow with biometric
655
+
656
+ Notification? -> create push notification
657
+
658
+ Deep link / universal link? -> configure deep linking
659
+
660
+ Build for store? -> configure EAS Build
661
+ -> eas build --profile production
662
+
663
+ Update without review? -> generate OTA update production
664
+ (only if no native changes)
665
+
666
+ Angular conversion? -> convert Angular app to React Native
667
+
668
+ Mysterious crash? -> let's debug
669
+ (pair-debug hypothesis-driven)
670
+
671
+ Tests missing? -> run tests
672
+ (auto-test-guard + gate-keeper)
673
+ ```
674
+
675
+ ## Sub-agents relevant to mobile
676
+
677
+ | Agent | Model | Acts on |
678
+ |---|---|---|
679
+ | `mobile-developer` | Sonnet 4.6 | React Native 0.84+, Expo SDK 54+, New Architecture, TS strict, Reanimated 4, FlashList 2 |
680
+ | `ux-designer` | Sonnet 4.6 | Mobile-specific: touch targets (>= 44pt), safe area, dynamic type, dark mode |
681
+ | `architect` | Sonnet 4.6 | State mgmt (Zustand vs TanStack vs Jotai), navigation pattern, OTA strategy |
682
+ | `qa-engineer` | Sonnet 4.6 | Jest + RN Testing Library + Detox/Maestro |
683
+ | `gate-keeper` | Sonnet 4.6 | Senior+ gate adapted for mobile (Detox flakiness tolerated) |
684
+ | `devops-engineer` | Sonnet 4.6 | EAS Build, EAS Submit, EAS Update, fastlane (if bare workflow) |
685
+ | `tech-lead` | Opus 4.7 | Mobile stack decision, OTA strategy, native breaking changes |
686
+ | `product-owner` | Opus 4.7 | Scope, MVP iOS-first vs Android-first, mobile persona |
687
+ | `security-engineer` | Opus 4.7 | SecureStore, jailbreak/root detection, certificate pinning, OWASP MASVS |
688
+ | `database-engineer` | Sonnet 4.6 | MMKV schema, AsyncStorage migration, encrypted local DB (SQLite + sqlcipher) |
689
+
690
+ ## Senior+ gate adapted for mobile
691
+
692
+ | Metric | Threshold | Tool |
693
+ |---|---|---|
694
+ | Jest statements | >= 85% | `jest --coverage` |
695
+ | Jest branches | >= 80% | `jest --coverage` |
696
+ | RNTL a11y violations | 0 critical, 0 serious | adapted `jest-axe` |
697
+ | Detox/Maestro critical flows | 100% (retry up to 3x) | Detox runner |
698
+ | ESLint | 0 errors, 0 new warnings | `eslint --max-warnings 0` |
699
+ | TypeScript strict | no `any` in new code | `tsc --noEmit` |
700
+ | Bundle size delta | warn > 200KB, block > 500KB | `expo export` + size script |
701
+ | Cold start (Android median) | < 2500ms | EAS Build profile + Detox metrics |
702
+ | Crash-free sessions | >= 99.5% | Sentry/Bugsnag |
703
+
704
+ ## Active hooks in the harness
705
+
706
+ | Event | Script | Function |
707
+ |---|---|---|
708
+ | `UserPromptSubmit` | `prompt-gate-reminder.sh` | senior+ gate reminder |
709
+ | `PreToolUse` (Bash) | `pre-push-guard.sh`, `block-test-deletion.sh` | Blocks direct push to main/develop; blocks deletion of `*.test.ts` / `*.e2e.ts` |
710
+ | `PostToolUse` (Edit/Write) | inline prettier, `post-edit-test-reminder.sh` | Formats + reminds to run suite |
711
+ | `Stop` | `stop-brain-reminder.sh` | brain-keeper records session |
712
+
713
+ See [Hooks reference](../docs/hooks-reference).
714
+
715
+ ## Antipatterns (DON'T do this)
716
+
717
+ - Class components — always functional + hooks
718
+ - `any` in TypeScript — gate-keeper blocks
719
+ - `duk <skill>` — doesn't exist, skills trigger by keyword in chat
720
+ - Inline styles without `StyleSheet.create` — slow on the shadow tree
721
+ - Skipping Detox/Maestro E2E on critical flows (auth, checkout, payment)
722
+ - AsyncStorage for token, password, PII — use `expo-secure-store`
723
+ - Libraries without New Architecture support (check before installing)
724
+ - FlatList on long lists — always FlashList 2+
725
+ - Reanimated 1/2 in new code — always 4+
726
+ - Outdated Cocoapods — sync version with Expo SDK
727
+ - Commit with `Co-Authored-By: Claude` — gate-keeper blocks
728
+ - Mentioning Claude/Anthropic/AI/LLM/assistant in commit messages
729
+ - OTA when native code changed — devices will crash
730
+ - Permission prompt for notification or camera without prior UI context
731
+
732
+ ## Mobile troubleshooting
733
+
734
+ **Metro cache corrupted after git pull:**
735
+
736
+ ```bash
737
+ watchman watch-del-all
738
+ rm -rf $TMPDIR/metro-* /tmp/metro-* node_modules/.cache
739
+ npx expo start --clear
740
+ ```
741
+
742
+ **pod install failing on Cocoapods version:**
743
+
744
+ ```bash
745
+ cd ios && pod deintegrate && pod install --repo-update
746
+ # If it persists:
747
+ sudo gem install cocoapods -v 1.15.2
748
+ ```
749
+
750
+ **Gradle daemon stuck (Android):**
751
+
752
+ ```bash
753
+ cd android && ./gradlew --stop
754
+ rm -rf ~/.gradle/caches/transforms-*
755
+ ./gradlew clean
756
+ ```
757
+
758
+ **AsyncStorage migration (legacy -> MMKV):**
759
+
760
+ Use `react-native-mmkv` with a one-shot migration helper at boot. Reads AsyncStorage, copies to MMKV, marks a migration flag.
761
+
762
+ **New Architecture incompatible with a lib:**
763
+
764
+ Check at https://github.com/reactwg/react-native-new-architecture/discussions/175. Lib without support: contact the maintainer or swap to an alternative.
765
+
766
+ **EAS Build failing on signing:**
767
+
768
+ Check:
769
+ - `eas.json` -> production profile -> credentials configured
770
+ - `eas credentials` -> verify Android keystore and iOS provisioning profile
771
+ - Active Apple developer membership
772
+ - Google Play service account with release permission
773
+
774
+ **OTA update not reaching devices:**
775
+
776
+ Checklist:
777
+ - `expo-updates` installed and configured
778
+ - `runtimeVersion` in `app.json` matches the production build
779
+ - Correct channel in `eas update --branch production`
780
+ - Devices opened the app at least once (background update)
781
+
782
+ **Push notification not firing on iOS:**
783
+
784
+ Check:
785
+ - aps-environment entitlement in provisioning profile
786
+ - "Push Notifications" capability in app.json
787
+ - APNs key configured in EAS (`eas credentials`)
788
+ - `notifyOnUserAction` permission requested and accepted
789
+
790
+ **Detox flaky:**
791
+
792
+ - Bump `waitFor(...).withTimeout(10000)`
793
+ - Use `device.disableSynchronization()` only at critical points
794
+ - Clean state between tests (`device.reloadReactNative()`)
795
+ - Retry up to 3x in CI (`--retries 3`)
796
+
797
+ ## Quick glossary
798
+
799
+ - **Skill** — entry point triggered by keyword match in the prompt. Defined in `.claude/skills/<slug>/SKILL.md`.
800
+ - **Agent** — specialist executor invoked via Task tool. Defined in `.claude/agents/<name>.md`.
801
+ - **Task tool** — harness mechanism to invoke subagents in parallel or sequence.
802
+ - **PLAN_*.md** — goal-ready technical plan in `docs/plans/`, generated by `analyst`.
803
+ - **PRD_*.md** — Product Requirements Document in `docs/prd/`.
804
+ - **DISCOVERY_*.md** — output of the `grill-me` interview in `docs/discovery/`.
805
+ - **ISSUES_*.md** — decomposed issues in `docs/issues/`.
806
+ - **ADR-NNN** — Architecture Decision Record in `docs/decisions/`.
807
+ - **EAS** — Expo Application Services. Build (cloud), Submit (auto-publish), Update (OTA).
808
+ - **OTA** — Over-The-Air update. JS update bypassing store review. JS/assets only.
809
+ - **New Architecture** — Fabric (renderer) + TurboModules + JSI. Replaces the old bridge.
810
+ - **FlashList** — Shopify's virtualized list. Replaces FlatList for performance.
811
+ - **MMKV** — native sync key-value storage (Facebook). Replaces AsyncStorage.
812
+ - **Detox** — gray-box E2E. Runs on real device or emulator.
813
+ - **Maestro** — black-box E2E via declarative YAML.
814
+ - **Expo Router** — file-based routing inspired by Next.js. Default in SDK 50+.
815
+ - **Zustand** — simple global store, no Redux boilerplate.
816
+ - **TanStack Query** — server state cache + sync (replaces SWR).
817
+ - **Reanimated** — UI-thread animations (JS worklet).
818
+ - **Senior+ gate** — non-negotiable quality gate.
819
+ - **Obsidian vault** — `docs/brain/` with daily/features/decisions.
820
+ - **Autonomy Matrix** — who-decides-what table.
821
+
822
+ ## Cross references
823
+
824
+ - [Architecture overview](../docs/architecture-overview) — 2-layer model (skill + agent)
825
+ - [Agents reference](../docs/agents-reference) — all 25 agents
826
+ - [Skills reference](../docs/skills-reference) — all 18 skills
827
+ - [Pipeline](../docs/pipeline) — end-to-end flow
828
+ - [Quality gate](../docs/quality-gate) — senior+ thresholds
829
+ - [Stack rules](../docs/stack-rules) — mandatory conventions
830
+ - [Autonomy matrix](../docs/autonomy-matrix) — who decides what
831
+ - [Hooks reference](../docs/hooks-reference) — active hooks
832
+ - [Git Flow](../docs/git-flow) — branches and commits
833
+ - [Troubleshooting](../docs/troubleshooting) — common issues
834
+ - [Backend manual](./backend) — Java 25 + Spring Boot 4
835
+ - [Frontend manual](./frontend) — Angular 21
836
+ - [Fullstack manual](./fullstack) — backend + frontend monorepo
837
+ - [Existing project manual](./existing-project) — adoption via active-project