Quick Start
Fork the repository
Fork basicmachines-co/basic-memory on GitHub
Development Environment
Prerequisites
Python 3.12+
Required for type parameter syntax
just
Modern command runner
Docker (optional)
For PostgreSQL tests
uv (recommended)
Fast Python package manager
Setup
Development Workflow
1. Code Changes
Make your changes following these guidelines:Code Style
Code Style
- Line length: 100 characters
- Use type annotations for all functions
- Follow existing patterns
- Add docstrings to public APIs
Testing
Testing
- Write tests for new features
- Maintain 100% coverage where practical
- Add integration tests for workflows
- Use markers:
@pytest.mark.benchmark,@pytest.mark.slow
Documentation
Documentation
- Update relevant docs in
docs/ - Add docstrings to public functions
- Update CHANGELOG.md for user-facing changes
2. Quality Checks
Run quality checks before committing:3. Commit Guidelines
All commits must be signed off with the
-s flag to certify you agree to the Developer Certificate of Origin.feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style changes (formatting)refactor: Code refactoringtest: Adding or updating testschore: Build/tooling changes
Pull Request Process
Creating a Pull Request
PR Template
Code Review
A maintainer will review your PR. Address feedback by pushing new commits to your branch.
- ✅ Code follows style guidelines
- ✅ Tests cover new functionality
- ✅ Documentation is updated
- ✅ No breaking changes (or clearly documented)
- ✅ CI checks pass
Developer Certificate of Origin
By contributing, you agree to the Developer Certificate of Origin (DCO). What this means:- You certify you have the right to submit your contributions
- You’re not knowingly submitting code with patent/copyright issues
- Your contributions are provided under the project’s license (AGPL-3.0)
Signed-off-by line to your commit:
Testing Guidelines
Running Tests
- All Tests
- Unit Tests
- Integration Tests
- Selective
Writing Tests
Choose test type
- Unit test (
tests/) - Test individual functions with mocks - Integration test (
test-int/) - Test complete workflows
Coverage Requirements
LLM-Assisted Development
Basic Memory is designed for collaborative development between humans and LLMs.Using Claude/GPT for Contributions
CLAUDE.md Reference
CLAUDE.md Reference
The
CLAUDE.md file contains:- Project architecture overview
- Development commands
- Code style guidelines
- Common patterns
AI-Human Workflow
AI-Human Workflow
- AI generates code based on specifications
- Human reviews and runs tests
- AI adjusts based on test results
- Human commits with sign-off
Knowledge Persistence
Knowledge Persistence
Save important context in markdown files:
- Decision records
- Architecture notes
- Common patterns
Creating Issues
Before starting work, create an issue to discuss the approach. Good issue template:Areas for Contribution
Bug Fixes
Check GitHub issues labeled
bugFeatures
Check issues labeled
enhancementDocumentation
Improve guides, examples, docstrings
Testing
Increase test coverage, add benchmarks
Performance
Optimize sync, search, indexing
Integrations
New import sources, MCP tools
Good First Issues
Look for issues labeledgood first issue:
- Documentation improvements
- Small bug fixes
- Additional test coverage
- Error message improvements
Code of Conduct
Summary:- Be respectful and inclusive
- Welcome newcomers
- Focus on technical merit
- Assume good faith
- Disagree constructively
Getting Help
Discord Community
Ask questions and discuss development
GitHub Discussions
Feature requests and longer discussions
GitHub Issues
Report bugs and request features
Development Guide
Detailed development setup