An agent creates a second source of truth. Mneme blocks the migration.
This project keeps state in human-editable JSON. The supplied task proposes SQLAlchemy, PostgreSQL, and Alembic anyway—a storage migration with new credentials, operations, and a second place to trust. Mneme rejects that task, then checks a correction that stays inside the existing store.
One decision. One blocked change. One safe retry.
This is a product rule, not a style preference. Both task descriptions go through the same check.
mneme_storage_json · Use JSON storage only. Keep the project local-first and human-editable. No external database, ORM, or migration layer in v1.
-
01 Decision
The project records JSON as the approved storage boundary.
storage: JSON · no ORM · no migrations -
02 Agent change
The agent proposes replacing the store with a database stack.
Use SQLAlchemy + PostgreSQL + Alembic -
03 MnemeDENY
The check rejects the violating task and returns the governing decision.
DENY [mneme_storage_json] · exit 2 -
04 Safe retryPASS
The corrected task stays inside JSON and passes the same check.
Add expires_at · keep JSON · Result: PASS
Run it yourself
Run the violating and compliant tasks
Both inputs and the decision record ship with the product repository, so the deny-to-pass sequence is reproducible without a live model call.
git clone https://github.com/MnemeHQ/mneme
cd mneme
pip install -e .
mneme check --memory examples/project_memory.json \
--input examples/prompt_violation.txt --query "storage backend"
# FAIL [mneme_storage_json] · exit 2
mneme check --memory examples/project_memory.json \
--input examples/prompt_clean.txt --query "storage backend"
# Result: PASS · exit 0
What happened
JSON is the approved store; an ORM, SQLAlchemy, and migrations are outside the boundary.
The agent cannot introduce a second database, migration history, and credential path for later work to inherit.
The corrected task is not trusted automatically; it passes through the same decision and returns clean.
Common questions
Is the terminal output real?
Yes. The decision record and both input files are included in the Mneme repository. The transcript condenses the two real mneme check runs into one readable sequence.
Does Mneme rewrite the agent task?
No. Mneme blocks the violating task and identifies the decision it conflicts with. A human or the model submits the corrected task, which is evaluated through the same check.
Why block this before the agent writes code?
The proposal already contradicts an explicit architecture decision. Blocking it before execution prevents a predictable SQLAlchemy and migration diff from becoming review work.
Ready to try it?
Install Mneme and check your first decision in under five minutes.
pipx install "mneme-hq>=0.9.2"