AI-Powered Development
RNCopilot ships with 6+ AI configuration files that give AI coding assistants deep understanding of the project’s architecture, patterns, and conventions from the very first prompt. This is not a gimmick — it is a core design decision that makes every AI tool significantly more productive in this codebase.
The Problem
When you open a React Native project with an AI assistant, the assistant has to guess at:
- Which
StyleSheetto import (React Native’s or Unistyles?) - How auth state is managed (Context? Zustand? Redux?)
- Where files should go (flat? feature folders?)
- What patterns to follow (inline styles? theme tokens?)
Every wrong guess creates code that needs to be manually fixed. Multiply this across dozens of interactions per day and the productivity gains of AI disappear.
The Solution
RNCopilot includes instruction files for every major AI coding tool. Each file contains the same core information — project architecture, code patterns, theme tokens, do’s and don’ts — formatted for the specific tool’s conventions.
| File | AI Tool | Format |
|---|---|---|
CLAUDE.md | Claude Code (Anthropic CLI) | Markdown with commands, structure, rules |
.cursorrules | Cursor | Project rules format |
.windsurfrules | Windsurf (Codeium) | Project rules format |
.clinerules | Cline | Project rules format |
copilot-instructions.md | GitHub Copilot | Markdown instructions |
AGENTS.md | OpenAI Codex / multi-agent systems | Universal agent format |
docs/AI-GUIDE.md | Any AI tool (copy-paste reference) | Detailed cookbook with 10+ recipes |
llms.txt | LLM-friendly project summary | Structured plain text |
You do not need to configure anything. These files are already in the repository. When you open the project with any supported AI tool, it automatically reads the relevant file and understands the codebase.
What the AI Learns
Every configuration file teaches the AI the same critical information:
Architecture and File Locations
- Feature modules live in
src/features/<name>/with a standard subdirectory structure - Shared components live in
src/common/components/with the 4-file pattern - Screens live in
app/and must useexport default - Path aliases:
@/*maps tosrc/*,~/*maps toapp/*
Code Patterns
StyleSheet.create((theme) => ({...}))fromreact-native-unistyles, not fromreact-nativeTextfrom@/common/components/Text, not fromreact-nativeimport { z } from 'zod/v4', not fromzod- Auth via
useAuthStorewith selectors, not React Context - All user-facing strings through
useTranslation()with keys in bothen.jsonandar.json
Theme Tokens
The complete semantic token reference so the AI uses theme.colors.brand.primary instead of '#6366F1', and theme.metrics.spacing.p16 instead of 16.
Anti-Patterns
12 specific mistakes that AI agents commonly make in this codebase, with wrong/correct examples for each. These include:
- Importing
StyleSheetfromreact-nativeinstead ofreact-native-unistyles - Writing
StyleSheet.create({...})without the theme callback - Importing
Textfromreact-nativeinstead of the project’sTextcomponent - Using
useAuthStore()without a selector function - Forgetting to update both locale files
- Creating screens without
export default - Importing from
zodinstead ofzod/v4 - Putting business logic directly in components
- Using numeric spacing literals instead of theme tokens
- Skipping accessibility props on interactive elements
- Using
console.login production code - Calling
useAuthStore.getState()inside React components
The Recipes
The docs/AI-GUIDE.md file provides 10+ complete recipes that AI agents can follow step by step. Each recipe is a self-contained pattern with all the code needed:
| Recipe | What It Covers |
|---|---|
| Feature with API data | Types, service, React Query hooks, screen with FlatList |
| Form with validation | Zod schema, react-hook-form, FormField, mutation |
| Zustand store | Client state with typed actions and selectors |
| Protected route | Auth check with redirect |
| MMKV storage | Persistent key-value storage with typed hooks |
| Custom hook | Query + local state composition |
| Dialog confirmation | Delete confirmation with Dialog component |
| Loading and empty states | Skeleton, Loading, EmptyState, ErrorBoundary |
| Snackbar notifications | Success/error feedback after mutations |
| Adding a new tab | Screen file + layout registration + i18n |
These recipes are not documentation — they are executable templates. An AI agent can read Recipe 1, follow the steps, and produce a working feature module that passes npm run validate on the first try.
File Templates
Beyond recipes, the AI-GUIDE includes complete file templates for:
- New shared component (types, styles, implementation, barrel export)
- New screen (tab, stack, or auth)
- New custom hook
- New Zustand store
- New API service
- New Zod schema
Each template follows every convention in the project — correct imports, theme tokens, i18n, accessibility, and type safety.
How It Works in Practice
Claude Code
Claude Code automatically reads CLAUDE.md when you open the project. It also picks up AGENTS.md and docs/AI-GUIDE.md when relevant.
# Claude Code reads CLAUDE.md on startup
claude
# Then you can immediately ask:
> "Create a notifications feature with list screen and mark-as-read"Claude Code will generate files in the correct locations with the correct patterns because CLAUDE.md told it exactly how.
Keeping Files in Sync
All AI configuration files share the same source of truth. If you change a pattern (for example, adding a new path alias or changing the auth approach), update these files:
CLAUDE.md— primary referencedocs/AI-GUIDE.md— detailed recipes and templates.cursorrules,.windsurfrules,.clinerules— tool-specific rulescopilot-instructions.md— Copilot instructionsAGENTS.md— universal agent instructions
If you modify a project convention and do not update the AI configuration files, AI assistants will generate code using the old patterns. Treat these files as part of your codebase, not as optional documentation.
Customizing for Your Project
When you migrate the template for your app, the AI configuration files should be updated to reflect your changes:
- App name and purpose — Replace references to “RNCopilot” with your app name
- Feature list — Update the feature module descriptions to match your features
- API endpoints — If you have specific API patterns, document them
- Additional conventions — Add any project-specific rules your team follows
The existing structure of each file makes this straightforward — find the relevant section and update it.