Skip to content

Commit 2248e87

Browse files
committed
chore: AGENTS.md
1 parent 5d5cae2 commit 2248e87

8 files changed

Lines changed: 138 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Repository Guidelines
2+
3+
This repository contains runnable examples for the Reassure performance testing library.
4+
5+
Use Yarn, not npm. The root uses `yarn@4.6.0`; individual examples currently use `yarn@4.9.2`.
6+
7+
Active code lives under `examples/`. Run installs, tests, typechecks, builds, and app commands from the specific example directory you changed because scripts and dependency versions are isolated per app.
8+
9+
Non-standard validation to remember: `yarn perf-test` runs Reassure performance tests in examples that define it.
10+
11+
See the focused guides before making task-specific changes:
12+
13+
- [Project Structure](docs/agents/project-structure.md)
14+
- [Commands](docs/agents/commands.md)
15+
- [Coding Style](docs/agents/coding-style.md)
16+
- [Testing](docs/agents/testing.md)
17+
- [Git Workflow](docs/agents/git-workflow.md)
18+
- [Instruction Audit](docs/agents/instruction-audit.md)

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
For this repository, use AGENTS.md as the canonical agent guide. Read AGENTS.md first for compatibility.

docs/agents/coding-style.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Coding Style
2+
3+
Use TypeScript and React function components for new example code.
4+
5+
Follow the root formatting configuration:
6+
7+
- two-space indentation
8+
- LF line endings
9+
- UTF-8
10+
- final newline
11+
- trimmed trailing whitespace
12+
- single quotes
13+
- ES5 trailing commas
14+
- 120-column Prettier width
15+
16+
Name component files with PascalCase when they export a component, such as `TestList.tsx`.
17+
18+
Keep example code idiomatic to its framework. Do not introduce shared abstractions across examples unless the task explicitly requires cross-example behavior.

docs/agents/commands.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Commands
2+
3+
Install dependencies from the target example directory:
4+
5+
```sh
6+
cd examples/web-vite
7+
yarn install
8+
```
9+
10+
Common scripts vary by example:
11+
12+
- `yarn test`: run Jest tests.
13+
- `yarn perf-test`: run Reassure performance tests where configured.
14+
- `yarn typecheck`: run TypeScript checks where configured.
15+
- `yarn lint`: run ESLint in examples that define it.
16+
- `yarn dev`: start Vite or Next.js development servers.
17+
- `yarn preview`: preview the Vite production build.
18+
- `yarn build`: build web examples that define a build script.
19+
- `yarn start`: start Expo, React Native Metro, or Next.js production server depending on the example.
20+
- `yarn ios`, `yarn android`, `yarn web`: run Expo or React Native examples on the selected platform.
21+
22+
Validate only the relevant example unless the change intentionally affects multiple examples.

docs/agents/git-workflow.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Git Workflow
2+
3+
Recent history uses short imperative commit subjects, often with `chore:` for maintenance, for example:
4+
5+
```text
6+
chore: upgrade web-vite example
7+
```
8+
9+
Keep commits focused on one example or one cross-example concern.
10+
11+
Pull requests should include:
12+
13+
- the example or examples changed
14+
- validation commands run
15+
- related issues when available
16+
- screenshots for visible UI changes
17+
- native setup or platform-specific follow-up for iOS or Android changes

docs/agents/instruction-audit.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Instruction Audit
2+
3+
## Contradictions
4+
5+
No contradictions were found in the previous root `AGENTS.md`.
6+
7+
## Suggested Docs Folder Structure
8+
9+
```text
10+
docs/
11+
agents/
12+
project-structure.md
13+
commands.md
14+
coding-style.md
15+
testing.md
16+
git-workflow.md
17+
instruction-audit.md
18+
```
19+
20+
## Flagged For Deletion
21+
22+
These instructions were removed from the root file because they are better discovered progressively:
23+
24+
- Full example directory descriptions: useful only when changing project structure or choosing an example.
25+
- Complete command list: useful only when running or validating an example.
26+
- Detailed formatting settings: useful only when editing code.
27+
- Test naming details: useful only when adding or reviewing tests.
28+
- Pull request checklist: useful only when preparing contribution metadata.
29+
30+
No previous instruction was deleted as contradictory, too vague, or overly obvious.

docs/agents/project-structure.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Project Structure
2+
3+
The root `package.json` defines workspace metadata only. Make application changes in the relevant example directory.
4+
5+
- `examples/native-cli`: React Native CLI app with Android and iOS native projects.
6+
- `examples/native-expo`: Expo React Native app.
7+
- `examples/web-vite`: React web app built with Vite.
8+
- `examples/web-nextjs`: React web app built with Next.js.
9+
10+
Example source files are usually in `src/`, except app entry files such as `App.tsx`, `index.js`, and Next.js `src/app/*`.
11+
12+
Static assets live in each app's `public/`, `src/assets/`, or native asset folders.

docs/agents/testing.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Testing
2+
3+
Jest is the unit test runner across examples.
4+
5+
Testing libraries differ by platform:
6+
7+
- React web examples use React Testing Library.
8+
- React Native examples use React Native Testing Library.
9+
10+
Use these naming patterns:
11+
12+
- `*.test.tsx` for unit and behavior tests.
13+
- `*.perf.tsx` for Reassure performance tests.
14+
15+
Add or update unit tests for behavior changes. Add or update performance tests when changing measured rendering paths. When touching measured components, run both:
16+
17+
```sh
18+
yarn test
19+
yarn perf-test
20+
```

0 commit comments

Comments
 (0)