Thank you for your interest in contributing! This guide outlines the process for contributing to this project.
- Python 3.11 or higher
- Redis 7
- PostgreSQL 16 with pgvector extension
- uv (recommended) or pip
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/memory.git cd memory -
Install dependencies:
uv sync --dev
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Initialize the database:
uv run python scripts/init_db.py
- Type hints: All functions must have type annotations
- Formatting: Code is formatted with ruff
- Linting: Run
uv run ruff check src/ tests/ - Type checking: Run
uv run mypy src/ --strict
All tests should pass before submitting a PR:
uv run pytest tests/ -vFollow conventional commit format:
feat: New featurefix: Bug fixdocs: Documentation onlyrefactor: Code restructuringtest: Adding testschore: Maintenance tasks
Example:
feat(short-term): Add importance scoring algorithm
fix(meta-memory): Resolve coherence check race condition
- Create a feature branch from
main - Make your changes
- Ensure all tests pass:
uv run pytest tests/ - Run linting:
uv run ruff check src/ tests/ - Run type checking:
uv run mypy src/ --strict - Update documentation if needed
- Submit PR with clear description
memory/
├── src/memory/ # Main package
│ ├── graph/ # LangGraph integration
│ └── docs/ # Internal documentation
├── tests/ # Test suite
├── examples/ # Example scripts
├── scripts/ # Utility scripts
└── docker-compose.yml # Local development services
- Use TypedDict for state definitions
- Use dataclasses for structured data
- Avoid Any type annotations
- Follow SOLID principles
- Maintain separation of concerns
- Document architectural decisions in
src/memory/docs/
- Public APIs must have docstrings
- Complex logic should have inline comments
- Update ARCHITECTURE.md for structural changes
Open an issue for discussion or reach out via GitHub discussions.