- Conventional Commits format
type(scope): description - Types:
feat,fix,refactor,chore,docs - Scope optional, use package name when relevant (e.g.,
expo-example,llama) - Lowercase, no period, imperative mood
- Example:
feat(expo-example): add maxSteps setting for tool iterations
- Format:
type/kebab-case-description - Types:
feat/,fix/,refactor/,chore/,docs/,ci/ - Example:
feat/tool-calling,fix/streaming-first-char-missing
- Create feature branch from
main - Atomic commits that can be reviewed independently
- Reference related PRs in commit messages when building on unmerged work
- One logical change per commit
- Package manager:
bun(not npm/yarn) - No semicolons
- Single quotes
- Imports auto-sorted (ESLint enforced)
- Run
bun lintbefore committing
- Monorepo with
packages/(libraries) andapps/(example apps) - Packages:
@react-native-ai/apple,@react-native-ai/llama,@react-native-ai/mlc - Example app: Expo SDK 54 in
apps/expo-example/
- React 19.1 with React Compiler (no manual
useMemo/useCallbackneeded) - React Native 0.81
- Expo SDK 54 with native modules
- Vercel AI SDK v6 (
aipackage) for model abstraction - TypeScript strict mode
@expo/uifor SwiftUI-bridged components (Button, Slider, ContextMenu)expo-symbolsfor SF Symbols iconsexpo-blurandexpo-glass-effectfor glass morphismPlatformColorfor iOS semantic colors (no hardcoded colors)StyleSheet.createfor styles (no inline objects)react-native-reanimatedfor animations
jotaifor global state with atomsatomWithStorage+ AsyncStorage for persistence- Custom hooks (e.g.,
useChatStore) to expose store API
- Adapter pattern for AI providers (
SetupAdapter<TModel>interface) - Prefer composition over configuration
- Keep components focused, extract hooks for logic
- Use
zodfor runtime validation