Thank you for your interest in contributing! This guide will help you get started.
- Fork and clone the repository
- Install dependencies:
pnpm install - Copy
.env.exampleto.env.localand configure - Run tests:
pnpm test
- Strict mode enabled
- Explicit types for function parameters and returns
- Use interfaces over types where possible
- Avoid
any- useunknownif type is truly unknown
- ESLint configuration is enforced
- Format with Prettier before committing
- Maximum line length: 100 characters
- Use meaningful variable names
- Variables/Functions: camelCase (
getUserData) - Types/Interfaces: PascalCase (
UserData) - Constants: SCREAMING_SNAKE_CASE (
MAX_RETRIES) - Files: kebab-case (
memory-manager.ts) - MCP Tools: snake_case with namespace (
memory_engineering/read)
Follow conventional commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style changesrefactor: Code refactoringtest: Test additions/changeschore: Build process or auxiliary tool changes
Example:
feat(tools): add memory_engineering/search tool for hybrid search
Implements hybrid search combining vector and text search
using MongoDB Atlas Vector Search capabilities
- Branch Naming:
feature/descriptionorfix/description - Update Tests: Add tests for new functionality
- Update Docs: Update CLAUDE.md if adding new patterns
- Run Checks:
pnpm lint pnpm typecheck pnpm test - PR Description:
- What changes were made
- Why they were needed
- How to test them
- Test individual functions and utilities
- Mock external dependencies
- Aim for 80%+ coverage
- Test MCP tool implementations
- Test MongoDB operations
- Test embedding generation
pnpm test # Run all tests
pnpm test:unit # Run unit tests only
pnpm test:integration # Run integration tests
pnpm test:coverage # Generate coverage report- Define tool in
src/tools/ - Add input schema validation
- Implement tool handler
- Add comprehensive tests
- Update CLAUDE.md with usage examples
- Always use projectId in queries
- Create appropriate indexes
- Use transactions for multi-document updates
- Handle connection errors gracefully
- Batch operations when possible
Code will be reviewed for:
- Functionality and correctness
- Code style and conventions
- Test coverage
- Documentation updates
- Performance implications
- Security considerations
Open an issue for:
- Bug reports
- Feature requests
- Questions about contributing
Tag maintainers for urgent issues.