Skip to content

Commit d379451

Browse files
committed
chore: add AGENTS.md
1 parent f6981ca commit d379451

File tree

4 files changed

+52
-7
lines changed

4 files changed

+52
-7
lines changed

AGENTS.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Repository guidelines
2+
3+
## Project structure & module organization
4+
5+
- Monorepo via `pnpm` + `Nx`.
6+
- Packages: `packages/core` (CLI + `@rslib/core`), `packages/plugin-dts` (DTS plugin), `packages/create-rslib` (scaffolder).
7+
- Tests: `packages/*/tests` (unit) and `tests/` (`integration`, `e2e`, `benchmark`); examples in `examples/`.
8+
- Key config: `nx.json`, `biome.json`, `.prettierrc.json`, `rslint.jsonc`, `pnpm-workspace.yaml`.
9+
10+
## Build, test, and development commands
11+
12+
- Install: `pnpm install` (Node >= 18.12, pnpm >= 10.15).
13+
- Build: `pnpm build` (all) and `pnpm build:examples`.
14+
- Watch dev: `pnpm -C packages/core dev` (or other package).
15+
- Lint/format: `pnpm lint`; auto-fix: `pnpm format`.
16+
- Type-check: `pnpm type-check`.
17+
- Tests: `pnpm test`; targeted: `test:unit|:integration|:e2e|:benchmark`; update snapshots: `pnpm testu`.
18+
19+
## Coding style & naming conventions
20+
21+
- TypeScript + ESM; spaces; single quotes.
22+
- Biome is canonical linter/formatter; Prettier formats MD/CSS/JSON and `package.json`.
23+
- Filenames: `camelCase` or `PascalCase` (Biome enforced).
24+
25+
## Testing guidelines
26+
27+
- Unit/integration: `@rstest/core`; E2E: `@playwright/test`.
28+
- Naming: `*.test.ts`/`*.test.tsx`; snapshots in `__snapshots__/`.
29+
- Placement: unit under `packages/*/tests`; integration under `tests/integration`; e2e under `tests/e2e`.
30+
31+
## Commit & pull request guidelines
32+
33+
- Conventional Commits (e.g., `fix(dts): ...`); keep commits focused; run lint + tests.
34+
- User-facing changes need a Changeset (`pnpm changeset`); PRs should include description, linked issues, and doc/example updates when needed.
35+
36+
## Architecture overview
37+
38+
- `packages/core` (`@rslib/core`): CLI `rslib build` (add `--watch`), config via `rslib.config.ts` using `defineConfig`; programmatic `import { build, defineConfig, loadConfig } from '@rslib/core'`.
39+
- `packages/plugin-dts` (`rsbuild-plugin-dts`): detail implementation of `dts` in `rslib.config.ts` (e.g., `{ dts: { bundle: true } }`);
40+
- `packages/create-rslib` (`create-rslib`): scaffold new projects/templates with `pnpm dlx create-rslib` (or `npx create-rslib`).
41+
42+
## Security & configuration tips
43+
44+
- Do not commit build artifacts (`dist/`, `compiled/`).
45+
- Nx caching is enabled; scripts use `NX_DAEMON=false` for reproducible CI.

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"assist": {
44
"actions": {
55
"source": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"pnpm-lock.yaml": "pnpm dedupe --check"
4242
},
4343
"devDependencies": {
44-
"@biomejs/biome": "^2.2.3",
44+
"@biomejs/biome": "^2.2.4",
4545
"@changesets/cli": "^2.29.7",
4646
"@rslint/core": "^0.1.13",
4747
"@rstest/core": "^0.3.3",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)