AGENTS.md · web-infra-dev/rsdoctor
AGENTS.md from web-infra-dev/rsdoctor: 90 lines covering Stack, Commands, Project structure, Code style and more.
Template by web-infra-dev
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/web-infra-dev/rsdoctor/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 90 lines
- File
AGENTS.md
Sections
- Stack
- Commands
- Project structure
- Code style
- Testing
- CI
- Pull request conventions
- Conventions for AI agents
First lines (shown under the repo's MIT license)
# AGENTS.md ## Stack - Node.js `22.18+`, package manager **pnpm `12.6.0+`** (enable via `corepack enable`) - `pnpm` workspace monorepo (topological build ordering) - TypeScript strict mode - Lint/format: **Rstack CLI** (`rs lint` backed by Rslint, `rs fmt` based on Prettier) - Test runner: **Rstack CLI / Rstest** (`pnpm test`), E2E: **Playwright** (`pnpm e2e`) ## Commands ```bash # ── bootstrap ──────────────────────────────────────────────── pnpm install # install all deps + build all packages (prepare hook) # ── quality checks ─────────────────────────────────────────── pnpm lint # rs lint (error-level only) pnpm format # rs fmt pnpm test # package tests via rs test (single worker, NODE_OPTIONS=--max-old-space-size=8192) pnpm e2e # playwright e2e (requires chromium: cd e2e && npx playwright install chromium) # ── build ──────────────────────────────────────────────────── pnpm run build # build all package targets in topological order pnpm --filter '@rsdoctor/core...' run build # build one package and its workspace dependencies # ── focused dev ────────────────────────────────────────────── pnpm --filter @rsdoctor/core run build # build one package pnpm --filter @rsdoctor/core run test # test one package pnpm -C packages/client build # alternative: use directory path ``` ## Project structure ```text packages/ shared/ # shared types, utilities, and module / chunk / package graphs core/ # Rspack plugin, analysis engine, rules, and server SDK cli/ # `rsdoctor` CLI binary agent-cli/ # `rsdoctor-agent` CLI for agent-facing report queries client/ # web client (Rsbuild SPA, serves analysis report and report UI) document/ # documentation site (Rspress) scripts/ config/ # shared Rslib, Rstest, and TypeScript configuration test-helper/ # test utilities shared across packages e2e/ # Rstest + Playwright E2E tests examples/ # runnable Rspack / Rsbuild / Rspress projects ``` ## Code style - **Quotes**: single quotes everywhere; Prettier enforces formatting. - **Naming**: `camelCase` for functions, variables, and file names; `PascalCase` for types, classes, interfaces, and enums. - **Imports**: Rslint auto-organizes imports; use `import type` for type-only imports. - **No default exports** in library packages unless re-exporting a config. - Keep files focused; split large modules into sub-directories. ## Testing - Unit tests live in `<package>/tests/` (file pattern: `*.test.ts`). - Each tested package registers the shared `@scripts/config/test` options through `define.test()` in its Rstack config. Tests run with `maxWorkers: 1` (build-heavy tests are flaky in parallel). - Snapshot serializer normalizes workspace paths (see `scripts/config/rstest.setup.ts`). - E2E tests use Playwright; cases are organized per bundler under `e2e/cases/`. ## CI - **Test (Ubuntu)**: Node 22.x on ubuntu-22.04, runs `pnpm run test:all` (unit + e2e). - **Test (Windows)**: same matrix on windows. - **Lint**: separate workflow runs `rs lint`. - PRs targeting `main`, `release_*`, `release-*` trigger CI. - Paths `packages/document/**` and `*.md` are excluded from test CI triggers. ## Pull request conventions - Branch off `main`; never commit directly to `main`. - PR title must follow **Conventional Commits**: `type(scope): description`. - Common scopes: `core`, `rspack-plugin`, `shared`, `sdk`, `cli`, `agent-cli`, `ai`, `graph`, `utils`, `components`, `client`, `deps`. - Read `.github/PULL_REQUEST_TEMPLATE.md` and follow its current headings and guidance. ## Conventions for AI agents - Always run `pnpm install` first if `node_modules/` is missing. - Before editing, build the target package to ensure the baseline is green. - After making changes, run `pnpm --filter <pkg> run test` to validate. - When fixing a bug, add or update a test case in `<package>/tests/`. - Do not modify generated files under `dist/`, `compiled/`, or `node_modules/`. - Do not modify `pnpm-lock.yaml` manually — run `pnpm install` to regenerate. - Respect existing file structure; do not flatten sub-directories without reason. - When creating new exports, update the `exports` field in `package.json` and ensure both CJS and ESM entries exist.
Signals
- Stars
- 1,149
- Forks
- 107
- Open issues
- 10
- Contributors
- 58
- Last commit (this folder)
- Oct 8, 2026 (21 days ago)
- Last release
- Oct 15, 2026 (14 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/web-infra-dev/rsdoctor
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from web-infra-dev
Cite this page
AGENTS.md · web-infra-dev/rsdoctor. Agent Mart. https://agentmart.dev/templates/web-infra-dev-rsdoctor-agents-md (last updated 2026-10-24)