All changes require human review.
Breaking changes to public API require a major version bump — always warn if binary compatibility is affected.
Also consult .AGENTS.md / ~/.AGENTS.md if present for local agent settings.
See .agents/skills/project-guide for module structure and dependency graph.
Each module has its own AGENTS.md.
- Read before modifying. Understand existing code and patterns first.
- Minimal changes only. No drive-by refactoring or unrelated changes.
- Preserve existing comments. Only remove if provably incorrect.
- No rewrites without explicit permission.
- When stuck or uncertain: stop, explain, propose alternatives, ask.
Gradle with Kotlin DSL. Build JDK: 17+. Source baseline: Java 8. Versions in gradle/libs.versions.toml.
./gradlew check # Full validation (format + static checks + tests)
./gradlew :driver-core:test # Single module tests
./gradlew integrationTest -Dorg.mongodb.test.uri="mongodb://localhost:27017"check runs spotlessApply automatically — formatting is enforced.
Do not reformat outside your changes.
See .agents/skills/style-reference for full rules.
- No
System.out.println/System.err.println— use SLF4J - No
e.printStackTrace()— use proper error handling - Copyright header required:
Copyright 2008-present MongoDB, Inc. - Every public package must have a
package-info.java
- Every code change must include tests. Do not reduce coverage.
- See
.agents/skills/testing-guidefor framework details and running specific tests. - See
.agents/skills/spec-testsfor MongoDB specification test conventions.
All com.mongodb.internal.* / org.bson.internal.* is private API — never expose in public APIs.
See .agents/skills/api-design for stability annotations and design principles.
- Wire protocol / authentication handshakes (
com.mongodb.internal.connection) - Connection pool core code (
com.mongodb.internal.connection.pool) - Security-critical encryption code / JNA bindings (
mongodb-crypt) - Public API contracts (breaking changes need major version bump)
- BSON specification compliance
- Spec test data submodule (
testing/resources/specifications/) - Release/versioning scripts,
.evergreen/config, credentials/secrets
See .agents/skills/evergreen for CI validation and patch builds.
./gradlew spotlessApply doc check scalaCheck # formatting + Docs + static checks + all tests