Summary of necessary mongodb/specifications changes
1. Create AGENTS.md
Create a file called AGENTS.md in the root each of your actively maintained Git repositories. Consider:
- Keep it short–it uses up agentic context
- Collaborative with agents–ask the agent what is/is not useful
- Use your human expertise and experience to keep it short and relevant
- Iterate after a session with the agent, especially if the agent struggled
See the discussion in https://jira.mongodb.org/browse/DRIVERS-3428 for more information, or reach out to the AI champions.
Here’s a template with section headers that you can start from:
# AGENTS.md - <Project name> ## Overview Short description of what the project is for. ## Tech Stack Helps the agents understand the tech stack. Let the agent tell you what is and is not useful here–it’s often non-obvious. ## Project Structure Help the agent find different parts of the project–important for reducing token usage when the agent is finding this. ## <Custom> Include special instructions based on what the agent had issues with–see C# example below. ## Commands Helps the agents run commands to build, test, etc. Again, let the agent tell you what is and is not useful here–it’s often non-obvious. ## Testing Specific details needed to run tests. ## Commit and PR Conventions Help the agent understand team conventions
Here’s an example for the C# driver. The specifics in each section are likely to differ significantly per project.
# AGENTS.md - CSharpDriver ## Overview The C# driver for MongoDB. ## Tech Stack - .NET library projects producing NuGet packages - Multi-targeted to various .NET versions from .NET Framework 4.7.2 up - xUnit + FluentAssertions for testing ## Project Structure - `src/MongoDB.Bson/` - BSON for MongoDB - `src/MongoDB.Driver/` - C# driver for MongoDB - `src/MongoDB.Driver.Encryption/` - Client encryption (CSFLE with KMS). - `src/MongoDB.Driver.Authentication.AWS/` - AWS IAM authentication - `tests/MongoDB.Driver.Tests/` - Main C# driver tests - `tests/MongoDB.Bson.Tests/` - BSON handling tests - `tests/*/TestHelpers` - Common test utilities - `tests/*` - Specialized tests; less common - `tests/MongoDB.Driver.Tests/Specifications/` are JSON-driven tests using a common runner. ## Editing - Be careful to preserve file BOMs. ## Commands - Build: `dotnet build CSharpDriver.sln` - Run all tests: `dotnet test tests/MongoDB.Driver.Tests/MongoDB.Driver.Tests.csproj -f net10.0` - Run a single test class: `dotnet test tests/MongoDB.Driver.Tests/MongoDB.Driver.Tests.csproj -f net10.0 --filter "FullyQualifiedName~ClassName"` ## Testing - Tests cannot be run in parallel. - A MongoDB connection is always available locally, so "integration" tests can be run as well as unit tests. Some test suites also require additional environment variables — if you need to run those tests and the variables are not set, stop and tell the user which variables are needed rather than working around it. | Feature area | Required environment variables | |---|---| | Atlas Search | `ATLAS_SEARCH_TESTS_ENABLED`, `ATLAS_SEARCH_URI` | | Atlas Search index helpers | `ATLAS_SEARCH_INDEX_HELPERS_TESTS_ENABLED`, `ATLAS_SEARCH_URI` | | CSFLE / auto-encryption | `CRYPT_SHARED_LIB_PATH` | | CSFLE with KMS mock servers | `KMS_MOCK_SERVERS_ENABLED` | | CSFLE with AWS KMS | `CSFLE_AWS_TEMPORARY_CREDS_ENABLED` | | CSFLE with Azure KMS | `CSFLE_AZURE_KMS_TESTS_ENABLED` | | CSFLE with GCP KMS | `CSFLE_GCP_KMS_TESTS_ENABLED` | | AWS authentication | `AWS_TESTS_ENABLED` | | GSSAPI / Kerberos | `GSSAPI_TESTS_ENABLED`, `AUTH_HOST`, `AUTH_GSSAPI` | | OIDC authentication | `OIDC_ENV` | | X.509 authentication | `MONGO_X509_CLIENT_CERTIFICATE_PATH`, `MONGO_X509_CLIENT_CERTIFICATE_PASSWORD` | | PLAIN authentication | `PLAIN_AUTH_TESTS_ENABLED` | | SOCKS5 proxy | `SOCKS5_PROXY_SERVERS_ENABLED` | ## Commit and PR Conventions - The first commit message and the PR message start with a JIRA number: `CSHARP-1234: Description` - The branch name will usually match the JIRA number: `CSHARP-1234`
2. Create CLAUDE.md
Anthropic has instructed Claude not to read the AGENTS.md directly. Instead it always looks for CLAUDE.md. However, CLAUDE.md can include any of file, so use this to direct claude to the agents file:
@AGENTS.md
Acceptance criteria
Each actively maintained repo contains an appropriate AGENTS.md file, and a CLAUDE.md directing Claude to the agents file.
- is related to
-
CSHARP-1234 Using Dollar Projection operator works with expression trees but not with builders.
-
- Closed
-
- related to
-
DRIVERS-3428 AGENTS.md standardization for all DBX Repositories
-
- Implementing
-