Thank you for your interest in contributing to MemForge. This document explains how to get started, what we look for in contributions, and how the project is organized.
- Node.js >= 20
- PostgreSQL 16+ with
pgvectorandpg_trgmextensions - Redis 7+ (optional for development)
- Git
git clone https://github.com/salishforge/memforge.git
cd memforge
npm install
cp .env.example .env
# Edit .env — set DATABASE_URL at minimum
# Apply schema to your development database
psql "$DATABASE_URL" -f schema/schema.sql
# Type-check
npm run type-check
# Run in development mode (auto-reload)
npm run devSee DEVELOPMENT.md for detailed setup, architecture overview, and testing guide.
Open a GitHub issue with:
- Steps to reproduce
- Expected vs actual behavior
- Your environment (Node version, OS, PostgreSQL version)
- Relevant log output
Open a GitHub issue with:
- The problem you're trying to solve
- Your proposed solution
- Any alternatives you've considered
- Fork the repository and create a branch from
main - Write code that follows the existing patterns (see Code Style below)
- Add tests for new functionality — see DEVELOPMENT.md for testing guidance
- Run checks:
npm run type-check && npm run lintmust pass with zero errors - Write a clear PR description explaining what and why
- Keep PRs focused — one feature or fix per PR
- TypeScript strict mode — no
anytypes, no unchecked index access - Explicit error handling — catch specific errors, don't swallow them
- Parameterized SQL — never interpolate user input into queries
- Functional decomposition — each method does one thing
- No premature abstraction — concrete code over generic helpers
- Comments explain why, not what — the code should be readable without comments
Follow conventional commits:
feat(sleep-cycle): add entity deduplication to Phase 4
fix(query): handle empty FTS results with trigram fallback
docs(readme): add MCP integration section
test(feedback): add integration tests for outcome recording
chore(deps): bump express to 4.21.3
MemForge makes deliberate architectural choices. Please read ARCHITECTURE.md and SPECIFICATION.md before proposing changes to core systems.
Key decisions to be aware of:
- Pure PostgreSQL — no Neo4j, no separate graph database. All graph operations use recursive CTEs.
- No external MCP SDK — the MCP server implements the protocol directly for minimal dependencies.
- No built-in scheduler — sleep cycles are triggered externally by design.
- Pluggable providers — LLM and embedding providers are interfaces, not concrete implementations.
Issues labeled good first issue are scoped, well-documented, and don't require deep knowledge of the codebase. Start there.
- Documentation — integration guides for LangChain, AutoGen, CrewAI (#21), ADRs (#22), deployment security guide (#46)
- New embedding/LLM providers — Cohere, Mistral, Gemini, local models
- Performance — streaming consolidation (#11), BM25 search (#23)
- Features — memory namespaces (#16), cold tier querying (#14), CORS config (#18)
- Security hardening — cache validation (#41), classifier improvements (#45), rate limiting (#43)
- Bug fixes — especially edge cases in consolidation and sleep cycles
- Core data model changes — schema changes affect all downstream consumers
- New dependencies — we aim for a minimal dependency surface
- Breaking API changes — existing MCP tools and SDK consumers depend on stability
- Create a feature branch:
git checkout -b feat/my-feature - Make changes, run
npm run type-checkfrequently - Test against a real database where possible
- Push and open a PR against
main - Address review feedback
- Squash-merge once approved
By contributing to MemForge, you agree that your contributions will be licensed under the MIT License.