-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(NODE-7481): add AGENTS.md for cross-tool agent guidance #4929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,113 @@ | ||||||||
| # AGENTS.md | ||||||||
|
|
||||||||
| This file provides guidance to AI coding agents (Claude Code, Codex, Copilot, Cursor, Aider, etc.) when working with code in this repository. | ||||||||
|
|
||||||||
| ## Project Overview | ||||||||
|
|
||||||||
| This is the official MongoDB Node.js driver (`mongodb` npm package). It provides a TypeScript/JavaScript interface for applications to interact with MongoDB deployments. The driver implements the cross-driver MongoDB specifications. | ||||||||
|
|
||||||||
| ## Common Commands | ||||||||
|
|
||||||||
| ### Building | ||||||||
|
|
||||||||
| ```bash | ||||||||
| npm run build:ts # Compile TypeScript to lib/ | ||||||||
| npm run check:ts # Type-check without emitting | ||||||||
| ``` | ||||||||
|
|
||||||||
| ### Linting | ||||||||
|
|
||||||||
| ```bash | ||||||||
| npm run check:eslint # Run ESLint | ||||||||
| npm run fix:eslint # Auto-fix ESLint issues | ||||||||
| ``` | ||||||||
|
|
||||||||
| ### Testing | ||||||||
|
|
||||||||
| Tests require a running MongoDB instance. To start one locally: | ||||||||
|
|
||||||||
| ```bash | ||||||||
| git submodule update --init | ||||||||
| export DRIVERS_TOOLS=$(pwd)/drivers-evergreen-tools | ||||||||
| VERSION='latest' TOPOLOGY='replica_set' bash .evergreen/run-orchestration.sh | ||||||||
| source mo-expansion.sh | ||||||||
| ``` | ||||||||
|
|
||||||||
| ```bash | ||||||||
| npm run check:unit # Unit tests (no database required) | ||||||||
| npm run check:test # Integration tests (requires database) | ||||||||
| npm test # Lint + unit + integration | ||||||||
|
||||||||
| npm test # Lint + unit + integration | |
| npm test # Full verification suite: check:lint chain + unit + integration | |
| # Equivalent explicit commands: npm run check:lint && npm run test:all |
Copilot
AI
Apr 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting bullet says "2-space tabs"; the repo config is tabWidth: 2, i.e., 2-space indentation. Consider rephrasing to avoid implying literal tab characters are required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The statement "Tests require a running MongoDB instance" is inaccurate:
npm run check:unitruns the unit test suite without needing a database (integration tests do). Consider rewording this section to say that integration tests require a running MongoDB deployment, or qualify which test commands need the orchestration steps below.