This document provides guidance for AI agents (LLM-assisted development tools) working with the Grove Platform Tooling repository.
This is a monorepo containing multiple tools used by the MongoDB Developer Docs team for documentation-related tasks.
Two Go projects that share common types and constants via the audit/common module:
- Purpose: Ingestion tool that extracts and categorizes code examples from MongoDB documentation
- Language: Go 1.24.4
- Key Dependencies:
- MongoDB Go Driver v2
- Ollama (for LLM-based code categorization using qwen2.5-coder model)
- langchaingo
- Module:
module gdcdwith local replace:replace common => ../common - Build:
go buildfromaudit/gdcd/ - Run:
go run .(requires.envfile withMONGODB_URIand Ollama running locally) - Tests: Standard Go tests (
*_test.gofiles), run withgo test ./... - Long-running: Yes (~1-2 hours depending on project count)
- Outputs: Logs to
logs/directory
- Purpose: Query tool for code example database with aggregation pipelines
- Language: Go 1.24.0
- Module:
module dodecwith local replace:replace common => ../../common - Working Directory:
audit/dodec/src/ - Build:
go buildfromaudit/dodec/src/ - Run:
go run .(requires.envfile withMONGODB_URI) - Tests: Standard Go tests
- Purpose: Common Go type definitions and constants
- Module:
module common - Used by: Both gdcd and dodec via local replace directives
- Purpose: CLI tool to scan and update dependencies across multiple package managers
- Language: Go 1.25
- Framework: Cobra CLI
- Module:
module dependency-manager - Build:
go build -o depmanfromdependency-manager/ - Supported Package Managers: npm, Maven, pip, Go modules, NuGet
- Commands:
depman check- Dry run to check for updatesdepman update- Update dependency files onlydepman install- Update and install dependencies
- Tests: Located in
testdata/directory - Documentation: See
dependency-manager/README.mdanddependency-manager/USAGE.md
- Purpose: Collects GitHub engagement metrics and writes to MongoDB Atlas
- Language: Node.js (ES modules)
- Package Manager: npm
- Main Files:
get-github-metrics.js- Fetches metrics from GitHub using Octokitwrite-to-db.js- Writes data to MongoDB
- Dependencies: octokit, mongodb, esm
- Run:
node get-github-metrics.jsornode write-to-db.js - Status: PoC (Proof of Concept)
- Purpose: Queries MongoDB Docs Feedback for code example-related feedback
- Language: Go 1.23.1
- Module:
module query-docs-feedback - Build:
go buildfromquery-docs-feedback/ - Run:
go run .(requires.envwithMONGODB_URI,DB_NAME,COLLECTION_NAME) - Output: CSV report
-
Module System: All Go projects use local module names, not GitHub paths
- Import using local module names:
import "common",import "gdcd/add-code-examples", etc. - Do NOT use full GitHub paths in imports
- The
replacedirectives ingo.modhandle local module resolution
- Import using local module names:
-
Testing:
- Tests follow Go conventions:
*_test.gofiles - Run tests with
go test ./...from project root - Test data often in
test-data/ordata/subdirectories - Many projects have helper functions for testing (e.g.,
GetCodeExampleForTesting())
- Tests follow Go conventions:
-
Environment Variables:
- Most projects require
.envfiles (not committed to repo) - Common variables:
MONGODB_URI,DB_NAME,COLLECTION_NAME - Use
github.com/joho/godotenvfor loading
- Most projects require
-
Build Commands:
- Always run from the project directory containing
go.mod - Use
go buildorgo run . - For dodec, work from
audit/dodec/src/notaudit/dodec/
- Always run from the project directory containing
-
Package Management: Use npm (package manager commands, not manual edits)
- Install:
npm install - Add dependency:
npm install <package> - Update: Use
ncu -uthennpm install
- Install:
-
Module System: Uses ES modules (
"type": "module"in package.json)
- Write tests for new functionality
- Run full test suite after implementation changes to catch regressions
- Remove debug output and debug files after diagnosing issues
- Optimize for maintainability over cleverness
- Use language-idiomatic documentation
- Capture "why" in comments, not just "what"
- Keep user-facing APIs simple (users are technical writers, not developers)
- Handle complexity internally when possible
# Go projects
cd audit/gdcd && go test ./...
cd audit/dodec/src && go test ./...
cd dependency-manager && go test ./...
# Check for compilation errors
go build# GDCD
cd audit/gdcd && go build
# DoDEC
cd audit/dodec/src && go build
# Dependency Manager
cd dependency-manager && go build -o depman# Go projects
go get -u ./...
go mod tidy
# Node.js projects
npm install- Do NOT manually edit
go.modfiles - usego getcommands - Do NOT manually edit
package.json- use npm commands - Do NOT create debug files without cleaning them up
- Do NOT add emojis or excessive success messages to output
- Always run full test suite after changes
- Always remove debug output from source code when done