Skip to content

Commit 759ddf3

Browse files
committed
simplify
1 parent 4daf6a5 commit 759ddf3

5 files changed

Lines changed: 48 additions & 3 deletions

File tree

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
These markdown files are bundled with the npm package for coding agents. They describe the installed package version.
44

5-
Start with [LLM Guidelines](./guides/llm-guidelines.md) for quick rules, or use the included page list below to load specific references.
5+
Start with [LLM Guidelines](./guides/llm-guidelines.md) for the agent setup snippet and quick rules, or use the included page list below to load specific references.
66

77
## Included pages
88

docs/guides/llm-guidelines.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
Actionable guidelines for writing tests with React Native Testing Library (RNTL) v14.
44

5+
## Agent docs in the package
6+
7+
RNTL ships package-specific documentation for coding agents in `node_modules/@testing-library/react-native/docs/`.
8+
Add this snippet to your project's `AGENTS.md` or `CLAUDE.md` file so agents use the docs for the installed package version:
9+
10+
```md
11+
<!-- BEGIN:react-native-testing-library-agent-rules -->
12+
13+
# React Native Testing Library in this project
14+
15+
This project uses `@testing-library/react-native`. Its APIs and testing conventions can differ from your training data.
16+
Before writing or changing RNTL tests, read the relevant guide in
17+
`node_modules/@testing-library/react-native/docs/`, starting with
18+
`node_modules/@testing-library/react-native/docs/guides/llm-guidelines.md`.
19+
Prefer those package docs over stale assumptions, and follow deprecation notices.
20+
21+
<!-- END:react-native-testing-library-agent-rules -->
22+
```
23+
524
## Core APIs
625

726
### render

scripts/generate-package-docs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ function buildReadme(pages) {
285285
286286
These markdown files are bundled with the npm package for coding agents. They describe the installed package version.
287287
288-
Start with [LLM Guidelines](./guides/llm-guidelines.md) for quick rules, or use the included page list below to load specific references.
288+
Start with [LLM Guidelines](./guides/llm-guidelines.md) for the agent setup snippet and quick rules, or use the included page list below to load specific references.
289289
290290
## Included pages
291291
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
["how-to-query", "common-mistakes", "troubleshooting", "faq", "community-resources"]
1+
[
2+
"llm-guidelines",
3+
"how-to-query",
4+
"common-mistakes",
5+
"troubleshooting",
6+
"faq",
7+
"community-resources"
8+
]

website/docs/14.x/docs/guides/llm-guidelines.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
Actionable guidelines for writing tests with React Native Testing Library (RNTL) v14.
44

5+
## Agent docs in the package
6+
7+
RNTL ships package-specific documentation for coding agents in `node_modules/@testing-library/react-native/docs/`.
8+
Add this snippet to your project's `AGENTS.md` or `CLAUDE.md` file so agents use the docs for the installed package version:
9+
10+
```md
11+
<!-- BEGIN:react-native-testing-library-agent-rules -->
12+
13+
# React Native Testing Library in this project
14+
15+
This project uses `@testing-library/react-native`. Its APIs and testing conventions can differ from your training data.
16+
Before writing or changing RNTL tests, read the relevant guide in
17+
`node_modules/@testing-library/react-native/docs/`, starting with
18+
`node_modules/@testing-library/react-native/docs/guides/llm-guidelines.md`.
19+
Prefer those package docs over stale assumptions, and follow deprecation notices.
20+
21+
<!-- END:react-native-testing-library-agent-rules -->
22+
```
23+
524
## Core APIs
625

726
### render

0 commit comments

Comments
 (0)