- Expo docs: read exact versioned docs at https://docs.expo.dev/versions/v56.0.0/ before writing Expo code.
- Testing docs: this project uses
@testing-library/react-native.- Before writing or changing RNTL tests, read local docs in
node_modules/@testing-library/react-native/docs/, starting withnode_modules/@testing-library/react-native/docs/guides/llm-guidelines.md.
- Before writing or changing RNTL tests, read local docs in
- Never add eslint-disable comments or suppress lint warnings.
- Never use
// eslint-disable-next-lineor/* eslint-disable */. - If a lint rule is triggered, fix the underlying issue instead of suppressing it.
- Refactor code to satisfy lint rules (for example by fixing dependencies, import usage, or control flow).
- Include complete dependency arrays in
useEffect,useCallback, anduseMemo. - If a dependency should not trigger a re-run, restructure the code instead of omitting dependencies.
- Prefer explicit code changes over suppressing React Hooks lint warnings.
- Keep changes scoped and avoid unrelated refactors.
- Preserve existing public APIs unless the task explicitly requires a behavior change.
- Prefer correcting root causes (types, dependencies, data flow) over local suppressions.
- Add brief comments only when they explain non-obvious intent (the why), not obvious mechanics.
After completing your code edits (especially when touching several files), run these commands once as a final validation step:
yarn eslint --fix <file>- Automatically fix linting issues:- Remove unused imports
- Apply other auto-fixable ESLint rules
yarn prettier --write <file>- Format the code consistentlyyarn tsc --noEmit- Check for TypeScript errors across the project
If all three commands pass successfully, there is no need to manually check for problems using the get_errors tool.
After each requested change:
- Decide whether behavior, setup, scripts, structure, or workflow changed.
- Update docs where needed (for example this
AGENTS.md,README.md, and relevant records underdocs/adr/). - Mention doc updates in your final summary.
- Native folders are prebuild-managed. Treat
ios/andandroid/as generated outputs from configured Expo/React Native state. - Avoid casual hand-edits in native generated surfaces.
- If native dependencies or native config change, rerun
./scripts/prebuild.shfor the affected platform.
- Keep changes minimal and aligned with existing architecture.
- For Expo/React Native dependencies, use
npx expo install <package>. - Do not add
Platform.OS === 'web'branches or behavior. - Do not add Expo Go-specific compatibility layers (for example Expo Go-safe barrel indirection).
- Do not guess backend/API property names or payload keys. If a contract is unclear, stop and ask for canonical fields.
- If implementation details are ambiguous (especially API contracts), ask for clarification before coding rather than guessing.
- Prefer
PropsWithChildrenfor props that accept children. - Prefer explicit React Native style typing (for example
Pick<TextStyle, 'fontWeight'>) over broadas conststyle assertions. - Do not add
estimatedItemSizewhen implementingFlashListin this repo. - Use
grepfor text/file searches in this environment.
src/app/- Expo Router routes and layouts.src/components/- shared UI components and tests.src/hooks/- custom hooks for data/query integration.src/theme/- theme tokens and color primitives.src/utils/- runtime helpers and test utilities.src/AppProviders.tsx- root provider composition.
- Cloud agents should run JavaScript-side tasks only.
- Supported in cloud: linting, formatting, unit tests, and TypeScript checks.
- Not supported in cloud: native/device-dependent workflows (for example
npm run ios,npm run android, and E2E runs that require a simulator/device).