mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* chore: split AGENTS.md across the monorepo to fix size warning Root AGENTS.md was 41.7k chars, exceeding Claude Code's 40k performance threshold. Per the agents.md spec for monorepos, split into nested files that agents auto-load from each subtree: - apps/web/AGENTS.md (new): feature architecture, Storybook, web testing, web-specific pitfalls, debugging tips - apps/mobile/AGENTS.md (new): Expo + Tamagui guidance - packages/AGENTS.md (new): shared-package conventions, dual env vars - apps/web/docs/code-style.md: appended Code Complexity Guidelines - apps/mobile/docs/code-style.md: cross-reference to complexity rules - root AGENTS.md: trimmed to cross-cutting rules + Nested guidance index Root drops 41.7k -> 23.8k chars (no warning, ~16k headroom). All content preserved in the new layout; existing nested files (cypress, .storybook) unchanged. README, CLAUDE.md, PR template, and specs/** still reference the (still-existing) root file. * chore: gitignore docs/brainstorms/ like docs/plans/ Brainstorms are local working artifacts, same as plans. Remove the accidentally-committed brainstorm file and prevent future leaks.
1.9 KiB
1.9 KiB
Mobile App AI Contributor Guidelines
Mobile-specific guidance for the Expo/React Native app under apps/mobile/. For monorepo-wide rules (Turborepo, theme system, Workflow, regression checklist, Security, general principles), see the root AGENTS.md.
Mobile Development (Expo + Tamagui)
- UI Components – Use Tamagui components for styling and theming. Import from
tamaguinot React Native directly when possible. - Theme System – Follow the custom theme configuration in
src/theme/tamagui.config.ts. Use theme tokens like$background,$primary, etc. - Component Structure – Follow container/presentation pattern. See docs/code-style.md for detailed component organization.
- Font Management – Use the configured DM Sans font family. Custom icons go through
SafeFontIconcomponent. - Expo Plugins – Custom Expo config plugins are in the
expo-plugins/directory.
Mobile-specific testing
- E2E: see docs/e2e-tests-guidelines.md.
- Cross-cutting unit-test conventions (Redux state assertions, MSW, no
anyin tests, faker) live in the root AGENTS.md.
Mobile-specific common pitfalls
- Hardcoding values – Use Tamagui tokens, not hard-coded values.
- Breaking shared code – Edits to
packages/**affect both web and mobile. See packages/AGENTS.md. - Modifying generated files – Never manually edit auto-generated files in
packages/utils/src/types/contracts/orpackages/store/src/gateway/AUTO_GENERATED/. CI will fail if AUTO_GENERATED files don't match the schema.
Code complexity
The code complexity guidelines (lookup tables, early returns, switch for type discrimination, function-length limits) in ../web/docs/code-style.md apply equally to mobile. See also docs/code-style.md for mobile-specific organisation.