Skip to content

Commit 9e9480d

Browse files
kkafarCopilot
andauthored
chore(AI): upstream Claude.md (#3930)
Checking into VCS, so that we have a common base to develop. --------- Co-authored-by: Copilot <[email protected]>
1 parent b43a021 commit 9e9480d

3 files changed

Lines changed: 56 additions & 2 deletions

File tree

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ android/.settings
6868
*Example/artifacts
6969

7070
# AI assistant configuration (local only)
71-
/CLAUDE.md
72-
/AGENTS.md
71+
/CLAUDE.local.md
7372
/.claude/
7473

74+
# General rule for files explicitly marked as local
75+
*.local.*
76+

AGENTS.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# react-native-screens
2+
3+
This project is a react-native library, focused on exposing native
4+
navigation containers and implementing common navigation paradigms
5+
such as stack, tabs, split.
6+
7+
## Repository layout tips
8+
9+
- `./src/` - JS side of the library
10+
11+
- `./src/components/gamma/` - each directory inside contains JS code for new
12+
components, planned for next major release,
13+
- `./src/components/safe-area/` - code related to `SafeAreaView` component,
14+
- `./src/components/tabs/` - code related to `TabsHost` & `TabsScreen` components,
15+
16+
- `./src/fabric/` - _codegen_ specs for the components used by the
17+
native code generation tool
18+
19+
- `./android/` - Android part of the library implementation,
20+
- `./ios/` - iOS part of the library implementation,
21+
- `./cpp/` and `./common/` - C++ layer, shared between Android and iOS parts,
22+
- `./FabricExample/` - contains an example application, we use it to showcase the library
23+
capabilities and test the library. It is not published as part of the package.
24+
25+
- `./apps/` - extracted JS (react-native) code of the `FabricExample` application;
26+
this is done to share the code with other example applications in the repository.
27+
28+
- `./react-navigation/` - this is a git submodule for a downstream library providing
29+
a complete navigation solution. It is not part of the library.
30+
31+
## Code conventions
32+
33+
- TypeScript-first. Always prefer TypeScript over JavaScript unless explicitly working in a JS-only context.
34+
- PascalCase for component names, camelCase for hooks (e.g., `useTabsNavigationContext`).
35+
- Use context hooks when a context exists — do not pass context values as props.
36+
37+
## Imports
38+
39+
- Use relative imports within library packages (`./src/`).
40+
- Use path aliases (`@apps/*`, `@assets/*`) only in example apps (`./apps/`, `./FabricExample/`).
41+
- Never use absolute paths from project root as import paths.
42+
43+
## Git & refactoring
44+
45+
- When renaming or deleting across the codebase, always grep for ALL references
46+
before committing. Verify zero stale references remain after the change.
47+
48+
## Code review guidelines
49+
50+
Be extremely frank and focused on thoroughness.

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- Single source of truth lives in AGENTS.md (shared across AI tools) -->
2+
@AGENTS.md

0 commit comments

Comments
 (0)