Files
Daniel DimitrovandGitHub d9accc56a1 chore: split AGENTS.md across the monorepo to fix size warning (#7785)
* 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.
2026-04-30 14:35:12 +02:00

1.9 KiB
Raw Permalink Blame History

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 tamagui not 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 SafeFontIcon component.
  • Expo Plugins – Custom Expo config plugins are in the expo-plugins/ directory.

Mobile-specific testing

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/ or packages/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.