# AGENTS.md

The React Framework

## Setup

```
pnpm install
```

## Commands

```
pnpm dev         # run locally
pnpm build       # produce a build
pnpm test        # run the test suite, must pass before any commit
pnpm lint        # lint
pnpm new-error
pnpm new-test
pnpm pr-adopt
pnpm clean
```

## Layout

- `test/`      13934 source files
- `turbopack/` 3528 source files
- `packages/`  3049 source files
- `examples/`  2187 source files
- `crates/`    1063 source files
- `bench/`     276 source files

## Conventions

- Tests live alongside the code they cover, following `.config/ast-grep/rule-tests/no-context-format-test.yml`.
- TypeScript is not in strict mode. Turning it on catches a whole class of mistakes before they run.
- CI defines what passing means. See `.github/workflows/automated_code_review.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `packages/next/src/compiled/webpack/bundle5.js` is 2522KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
