Human-readable decisions,
deterministic enforcement.
Mneme lets teams author architectural decisions in plain language, then enforces them as structured rules at the moment an AI agent is about to generate code — before the output exists.
The problem with prose decisions
Architecture Decision Records and team conventions live in documents. Engineers write them carefully. But an AI coding agent working three weeks later does not reliably recall that ADR-007 forbids direct BigQuery access from frontend routes, or that the team standardized on Pub/Sub and retired Celery.
Prose is for humans. It communicates intent, rationale, and trade-offs. But prose alone cannot produce a verdict. It cannot be checked at generation time. It cannot tell an agent to stop.
Mneme solves that gap without replacing the prose. ADRs remain the human artifact. Mneme maintains a parallel structured representation that enforcement can reason against.
The enforcement flow
Every check Mneme runs follows the same path:
- 01Author decisions in human-readable form. Write ADRs, policy documents, or team conventions as you normally would. Mneme provides a structured schema alongside them — each rule gets an id, a title, constraints, and the anti-patterns that should block generation.
- 02Retrieve the relevant rules for the current task. When a developer or agent starts a task, Mneme surfaces the decisions most likely to apply. The retrieval is deterministic: same task description, same memory, same rules surface — every time.
- 03Check the prompt against the retrieved rules. Before the model generates output, Mneme evaluates the prompt against the constraints and anti-patterns in the retrieved decisions. A match produces a structured verdict: PASS, WARN, or FAIL.
- 04Record an auditable trace. Every verdict records which rule matched, which term in the prompt triggered it, and why that rule was surfaced. A human can reconstruct any verdict from the artifacts — no hidden scoring, no black box.
A concrete example
The team has decided: no second LLM provider in v1. Anthropic SDK only.
litellm; the constraint is no second LLM provider.Why deterministic enforcement matters
Enforcement that varies between runs is not governance — it is suggestion. Mneme is built around the principle that the same decision, the same task, and the same memory must produce the same verdict, every time, in every environment.
This determinism is what makes governance auditable. When a CI step fails or an agent is blocked, the verdict is reconstructible: the rule that matched is recorded, the term that triggered it is recorded, and the score that surfaced that rule is recorded. There is nothing probabilistic to investigate.
It also makes regressions visible. Any change to the enforcement layer that would alter a verdict is detectable against the frozen benchmark suite — nothing can drift silently.
For deeper detail on the retrieval mechanics, the benchmark methodology, and the Layer 1 charter, see the architecture doc in the source repository.
The architectural intent enforcement layer.
Coding agents generate. Rules files steer. Memory recalls. RAG retrieves. Mneme HQ enforces the architectural decisions that govern implementation.
The AI-assisted engineering stack
SentRux tells you when the agent violated architecture. Mneme helps prevent the violation from being proposed in the first place. The two layers are complementary.
Concrete violations, not abstract rules.
Mneme injects your team's architectural decisions into AI-assisted generation. Below is what that catches in practice — the kinds of changes an agent will otherwise ship, because nothing told it not to.
A developer asks Claude Code to add analytics to a checkout route. The agent proposes importing the BigQuery client directly into the frontend service — violating your layered architecture decision that data-platform calls belong in a backend service only.
Mneme detects the cross-boundary call before generation completes. The violation is flagged and blocked — the agent never writes the code, and nothing reaches your PR queue.
Unauthorized framework introduction
Redux pulled into a Zustand-standardized app. Banned ORM imported into a service that already chose another.
Cross-boundary architecture violations
BigQuery client instantiated inside a frontend route. Business logic dropped into a controller. Layering decisions ignored.
ADR supersession conflicts
Celery re-introduced after the team moved to Pub/Sub. Old decisions reappearing because the agent didn't see the new one.
Restricted path modifications
Codegen agent writing to db/prod/migrations/*. Billing agent touching the auth package.
Security policy violations
Raw SQL string concatenation. Mock auth shipped in production paths. Credentials handled outside the approved surface.
Non-approved dependency usage
GPL packages added to a license-restricted repo. Internal-only libraries imported into externally-shipped services.
Not all AI guardrails govern architecture.
"Governance" and "guardrails" describe several different problems. Mneme HQ solves a specific one: keeping AI-generated code aligned with your architecture.
mneme check in CI or as a pre-commit hook. Exit codes, flags, and GitHub Actions patterns.