This file is designed for AI coding assistants. If you are a human, see README.md for the human-friendly guide.
git clone https://github.com/GreyforgeLabs/memory-quality-gate.git && cd memory-quality-gate && ./scripts/setup.shmemory-quality-gate filters memory candidates before they are persisted. It applies a deterministic five-dimension scoring model, supports novelty checks against an existing corpus, and exposes both a Python API and a CLI with no model calls or runtime dependencies.
memory-quality-gate/
src/memory_quality_gate/ # package code and CLI entry point
tests/ # unit and CLI tests
docs/scoring-model.md # scoring dimensions and thresholds
scripts/setup.sh # idempotent local bootstrap
pyproject.toml # packaging and tool config
README.md # human-facing docs
STARTHERE.md # this file
- Python 3.11 or 3.12
python3 -m venv- Internet access for the initial
pip install -e .[dev]
- Clone:
git clone https://github.com/GreyforgeLabs/memory-quality-gate.git - Enter directory:
cd memory-quality-gate - Run setup:
./scripts/setup.sh - Activate the environment:
. .venv/bin/activate
. .venv/bin/activate
memory-quality-gate check --text "Always run ./scripts/deploy.sh --dry-run before shipping v2.4.1 because it prevents partial deploys."Expected behavior:
- exit code
0 - output starts with
PASS
src/memory_quality_gate/core.py- scoring engine and public dataclassessrc/memory_quality_gate/cli.py- CLI entry pointsrc/memory_quality_gate/__main__.py-python -m memory_quality_gate
--scopechooses the quality bar:global,project, orsession--entry-typeaffects outcome-linkage scoring--existing-fileprovides the comparison corpus for novelty scoring- No environment variables are required
. .venv/bin/activate
python -m ruff check .
python -m pytest
memory-quality-gate score --file candidate.txt --existing-file existing_memory.md --format json
python -m build
python -m twine check dist/*