Thanks for your interest in contributing! Mnemonic is a local-first semantic memory system built in Go, and we welcome contributions of all kinds.
- Go 1.23+
- A C compiler (CGO is required for SQLite)
golangci-lintfor linting
git clone https://github.com/appsprout-dev/mnemonic.git
cd mnemonic
make setup-hooks # Configure pre-commit hooks
make build # Compile binary to bin/mnemonic
make test # Run full test suiteThe Makefile handles all build configuration automatically. No special flags needed.
- Fork the repo and clone your fork
- Create a feature branch from
main:git checkout -b feat/your-feature - Make your changes
- Run checks:
make check # go fmt + go vet make lint # golangci-lint make test # full test suite
- Commit using Conventional Commits:
feat: add memory source tracking(new feature)fix: prevent nil pointer in retrieval(bug fix)docs: update README(documentation)refactor: simplify consolidation loop(no behavior change)test: add encoding agent coverage(tests only)chore: update dependencies(maintenance)
- Push your branch and open a PR against
main
- Error handling: Wrap errors with context —
fmt.Errorf("encoding memory %s: %w", id, err) - errcheck: Every error return must be handled. Use
_ = exprfor intentionally ignored errors (best-effort cleanup, fire-and-forget events) - Platform code: Use build tags (
//go:build darwin,//go:build linux), not runtime checks. Every platform-specific file needs a counterpart for other platforms - Architecture: Agents communicate via the event bus (
internal/events/), never direct calls. All data access goes through thestore.Storeinterface - Tests: Place test files next to the code they test. Use table-driven tests where applicable
See CLAUDE.md for the full project layout. Key directories:
cmd/mnemonic/— CLI entry pointinternal/agent/— Cognitive agents (perception, encoding, retrieval, etc.)internal/store/— Store interface + SQLite implementationinternal/api/— REST API serverinternal/mcp/— MCP server (13 tools for Claude Code)
Check GitHub Issues for open bugs and feature requests. Issues labeled good first issue are a great starting point.
Open an issue with:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Output of
mnemonic diagnose(if applicable) - Your platform (macOS/Linux) and Go version
By contributing, you agree that your contributions will be licensed under the AGPL-3.0 License.