Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 3.11 KB

AGENTS.md

File metadata and controls

49 lines (35 loc) · 3.11 KB

React Native

React Native for macOS: read first

This is Microsoft's macOS fork of React Native. Keep changes merge-friendly, and open other files only when a table below sends you there. Where other guidance in this file conflicts with this section, this section wins.

Fork rules

  • I1 Keep upstream merges clean: make the smallest change that works, and tag every macOS change in a shared file (fork.diff-tags).
  • I2 Respect path ownership. Never put fork content in upstream-owned files, such as __docs__ folders or the shared lint configs (fork.ownership).
  • I3 Extend the iOS implementation with TARGET_OS_OSX guards and RCTUIKit types instead of copying files.
  • I4 main runs only the New Architecture, but the legacy (Paper) sources still compile. Keep them compiling, and make Paper behavior fixes on *-stable branches.
  • I5 Write PR titles as Conventional Commits. Add a Changeset only to PRs into *-stable (process.pull-requests).
  • I6 Keep one home per fact and link to it instead of copying it. Change agent instructions and knowledge only through the rnmacos-organize-knowledge skill.
  • I7 Report each validation command you ran with its exact result, and list the checks you didn't run.

Where macOS code lives

Path Contents
packages/react-native The react-native-macos package, with macOS code inline in shared iOS files
packages/react-native/ReactApple/Libraries/RCTUIKit UIKit and AppKit compatibility layer
packages/rn-tester RNTester, including the RNTester-macOS scheme
docsite/ Fork docs: diff tags, versioning, backporting, releases
.github/workflows/microsoft-*.yml and .ado/ Fork CI

Essentials

  • Use Yarn 4 with the pnpm linker. Run yarn install and all other commands from the repository root.
  • Check JavaScript changes with yarn jest <path>, yarn flow-check, yarn lint, and yarn format-check.

Load on demand

When you are Read
Changing a file that upstream also has fork.diff-tags, fork.ownership
Running builds, tests, linters, or formatters tooling.commands, tooling.format-lint
Building or running RNTester-macOS testing.rntester-macos
Changing macOS accessibility, focus, or Tab order a11y.appkit, then the matching a11y topic in the index
Writing a PR, Changeset, or backport process.pull-requests
Doing anything else Knowledge index

Skills