SuperAPI AI Directory

mneme

Architectural decision governance for coding agents: submit proposals and query canonical decisions and their lineage, while humans keep final authority.

Open website

About this tool

Mneme is an open decision and control layer for the agentic software development lifecycle, with the core goal of preventing architectural drift. It turns durable engineering decisions into context usable by AI coding agents, deterministic execution rules, and inspectable execution results, covering coding agents, code repositories, and CI workflows. Architecture is the first supported decision domain: Mneme prevents architectural drift by turning architectural decisions and ADRs into deterministic guardrails.

Key capabilities Mneme separates architectural guidance from deterministic execution, specifically including: recording architectural decisions as a structured, auditable decision corpus; retrieving relevant decisions when an agent or model needs architectural guidance; deterministically enforcing governed rules under explicit applicability semantics; integrating at the earliest reliable boundary exposed by each coding workflow; auditing bypassable change paths that cannot be blocked before the change; and running in CI as a final deterministic gate to prevent incompatible changes from being accepted. The same inputs and governed decision state produce the same execution results, and the core allow/warn/fail determinations do not depend on an LLM judge. Mneme is explicitly not a general-purpose vector store, a conversational memory system, an autonomous coding agent, or a deployment observability platform.

How to use Requires Python 3.11+. It can be verified via the CLI. Repository development has corresponding commands. Mneme exposes the Decision Index through a local MCP server, so that MCP-capable clients can propose candidate architectural decisions and query decision status, but do not gain permission to change that status. Optional MCP dependencies need to be installed, and a local stdio server started. Canonical reads by default come from the Decision Index persisted in .mneme/project_memory.json; proposal storage remains separate. --memory can be used to select another project memory file, which must contain a valid authoritative decision_index section; MCP will fail closed rather than rebuild authority from a compatibility decisions[] snapshot. Memory created by mneme init or mneme setup already has an empty decision_index section and requires no migration. For older files that do not yet have a decision_index section, MCP will stop and report an error prompting migration. The migration can be previewed first; the preview writes nothing and lists the visible effects: inactive decisions leave Layer 1, and legacy rule / anti_pattern entries are migrated in one pass. Then apply the exact same migration. The migration is either lossless, orrejection; there is no enforcement or remediation mode. Memories containing legacy decision metadata that the canonical index cannot represent (for example, decisions imported by EventCatalog) remain on the pathless route and are not migrated. --adr-dir is now only an optional validation input; Mneme still validates and resolves the precedence of that corpus before startup, but ADRs do not become a second MCP source of authority.

The MCP interface is intentionally frozen to six tools: decision.propose, decision.propose_batch, decision.search, decision.applicable_to. The proposal tools only create non-authoritative proposals; the read tools query proposals and canonical decision state. MCP deliberately does not expose accept, reject, activate, supersede, exception, bypass, or trusted-evidence authority. Human authority is explicitly retained through mneme decision proposals | show | accept | reject. Accepting a proposal materializes a canonical decision, but does not activate protection or run Architecture Audit.

Architecture Audit Mneme audits the repository and shows which architectural decisions are: Protected (mechanically enforced), Mneme-ready (can be converted into deterministic guardrails), Requires modelling (important but not yet safe to automate), Guidance (useful context but should not be enforced). For Mneme-ready decisions, the proposed protection can be validated before enabling, and then explicitly activated. Mneme reports a decision as Protected only after it can verify that real enforcement is in place.

60-second execution example Initialize the project-local decision corpus; record an architectural decision; create a proposed input that violates it; run the deterministic check. In strict mode, a prohibited YAML proposal returns a FAIL verdict and exit code 2; a compliant JSON proposal returns PASS and exit code 0. The CLI is the general execution surface, and agent integrations convert their native events into the same Mneme decision and enforcement model.

For a non-authoritative preview of which canonical decisions will apply to the caller's asserted context labels, an optional, repeatable --applicability-preview <label> can be added to mneme check. The preview prints only to stderr and is independent of the normal check result. It does not trust the supplied labels, does not exclude decisions, and does not change enforcement,Does not change stdout, JSON mneme.check/v1, hook behavior, or exit codes. Stateless memory or preview computation errors are reported on stderr as PREVIEW UNAVAILABLE; it does not migrate memory or weaken enforcement. This preview is not a security control.

Setup mode (no enforcement) mneme setup initializes Mneme in a repository without changing how the team works: it creates or detects project memory, detects supported agent environments, reports protection readiness, and does not enable any blocking enforcement throughout. Setup never turns warning/observation behavior into blocking behavior; activation of preventive enforcement is always a separate explicit decision. Optionally records an opaque Architecture Audit reference so that setup can be attributed back to a saved Audit baseline. Setup is idempotent: re-running it on an existing Mneme project will not alter valid configuration.

Governance boundaries Mneme applies governance at the earliest reliable boundary exposed by the workflow: before generation, when architectural context can be injected into a model call; before supported file changes, when the agent exposes a blocking pre-tool hook; after bypassable changes, through bounded worktree auditing, when shell/script writes cannot be safely checked before execution; before merge, through a CLI-based CI gate. These boundaries are complementary. An integration declares only the surfaces that have been implemented and verified for that harness.

Separation of retrieval and enforcement Retrieval answers: which architectural decisions are useful as guidance for this task? Enforcement answers: does the proposed change violate a governed rule applicable here? These two concerns are intentionally separated.

Supported surfaces The authoritative support matrix is located at docs/integrations/README.md. Labels are evidence levels, not interchangeable marketing terms. Each integration documents its actual blocking boundary, bypass paths, degradation behavior, and verification evidence. Start from the integration matrix, not from assumptions based on other harnesses.

ADR and project memory Mneme can compile architectural decisions into structured governance records, rather than treating ADRs as passive text. The repository governance source of truth is .mneme/project_memory.json. The ADR import path preserves explicit source provenance when available, so that typed rules can be consistently checked and enforced.

Current architectural phase and guarantees The current phase is Layer 1 verification. Retrieval, enforcement, and benchmark semantics are governed by accepted architecture and frozen records. Three principles: determinism over cleverness, enforcement behavior must be reproducible; auditabilityover autonomy, judgments should be traceable to the decision, rule, applicability state, and evidence that produced them; prevention before review, use it when a reliable pre-change boundary exists, and when it does not, expose the limitation and audit after the fact rather than pretending the path was blocked. The current Layer 1 scope, frozen surfaces, accepted revisions, experimental work, and deferred Layer 2 work are maintained in docs/architecture/current-phase.md. When a linked ADR or architecture document is more specific, do not infer architecture from the README.

Benchmarks and verification Mneme's benchmarks are regression and integrity tools for retrieval and enforcement behavior, not general model quality benchmarks. Benchmarks separate retrieval and enforcement scoring so that a change cannot quietly improve one surface while regressing another.

Security and licensing Core behavior changes may require the repository's charter amendment process. Documentation, tools, integrations, and examples do not automatically authorize changes to frozen behavior. The MIT license is adopted, as detailed in LICENSE.