Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginAn toànReview & chất lượng codeNâng cao

mneme

MnemeHQ · MnemeHQ/mneme

Biến các quyết định kiến trúc và ADR thành guardrail có tính xác định, giúp coding agent và CI không đi lệch khỏi kiến trúc của bạn.

Ngăn chặn sự lệch hướng kiến trúc cho quy trình phát triển phần mềm (SDLC) AI agentic.

24 sao4Giấy phép: MITCập nhật 13 ngày trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Ghi lại các quyết định kiến trúc và đưa cho agent làm ngữ cảnh
  • Chặn các thay đổi do AI tạo ra vi phạm quy tắc đã thống nhất
  • Chạy kiểm toán kiến trúc để xem quyết định nào đang được thực thi

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

Mneme HQ

Mneme is an open decision and control layer for agentic software development.

It turns durable engineering decisions into agent context, deterministic enforcement, and inspectable enforcement results across AI coding agents, repositories, and CI workflows. Architecture is the first supported decision domain: Mneme prevents architectural drift by turning architectural decisions and ADRs into deterministic guardrails across coding agents, repository mutations, generated rules, and CI gates.

Where is your architecture actually enforced? Run the Architecture Audit to see which decisions are protected, which can become deterministic guardrails, and which still depend on someone remembering the rules. Try it →

Mneme is the decision layer behind that drift-prevention mechanism. It keeps recorded engineering decisions active as AI coding systems propose and modify code, instead of leaving ADRs as passive documentation.

Solid surfaces ship today; dashed surfaces are planned. Support levels per integration: integrations matrix.

Current phase: Layer 1 validation. Retrieval, enforcement, and benchmark semantics are governed by the accepted architecture and freeze record. See Current Phase before changing core behavior.

What Mneme does

Mneme separates architectural guidance from deterministic enforcement:

  • Records architectural decisions in a structured, auditable decision corpus.
  • Retrieves relevant decisions when an agent or model needs architectural guidance.
  • Enforces governed rules deterministically under explicit applicability semantics.
  • Integrates at the earliest reliable boundary exposed by each coding workflow.
  • Audits bypassable mutation paths where pre-change blocking is not technically available.
  • Runs in CI as a final deterministic gate before incompatible changes are accepted.

The same input and governed decision state produce the same enforcement result. Mneme does not depend on an LLM judge for its core allow/warn/fail decisions.

Mneme is not a general-purpose vector store, conversational memory system, autonomous coding agent, or deployment observability platform.

Install

Requires Python 3.11+.

pip install mneme-hq

Verify the CLI:

mneme --help

For repository development:

git clone https://github.com/MnemeHQ/mneme.git
cd mneme
pip install -e ".[dev]"

Decision MCP

Mneme exposes the Decision Index over a local MCP server so MCP-capable clients can propose candidate architectural decisions and query decision state without gaining authority to change that state.

Install the optional MCP dependency:

pip install "mneme-hq[mcp]"

Start the local stdio server. Canonical reads come from the persisted Decision Index in .mneme/project_memory.json by default; the proposal store remains separate.

mneme decision-mcp

Use --memory to select another project memory file. The file must contain a valid authoritative decision_index section; MCP fails closed rather than reconstructing authority from the compatibility decisions[] snapshot.

mneme decision-mcp --memory path/to/project_memory.json

--adr-dir is now optional validation input only. Mneme still validates and precedence-resolves that corpus before startup, but ADRs do not become a second MCP authority source.

mneme decision-mcp --memory path/to/project_memory.json --adr-dir path/to/adrs

The MCP surface is intentionally frozen to six tools:

  • decision.propose
  • decision.propose_batch
  • decision.get
  • decision.search
  • decision.applicable_to
  • decision.trace

Proposal tools create non-authoritative proposals only. Read tools query proposal and canonical decision state. MCP deliberately exposes no accept, reject, activate, supersede, exception, bypass, or trusted-evidence authority.

Human authority remains explicit through mneme decision proposals | show | accept | reject. Accepting a proposal materializes a canonical decision; it does not activate protection or run the Architecture Audit.

See ADR-027 and the v0.9.0 release notes for the authority boundary and release contract.

Architecture Audit

See where your architecture is actually protected — and where it still depends on people remembering the rules.

Mneme audits your repository and shows which architectural decisions are:

  • Protected — already enforced mechanically
  • Mneme-ready — can be turned into a deterministic guardrail
  • Requires modelling — important, but not yet safe to automate
  • Guidance — useful context, but not something that should be enforced

Run an audit:

mneme audit --memory .mneme/project_memory.json --repo-root .

For a Mneme-ready decision, validate the proposed protection before enabling it:

mneme protect validate <decision-id> --memory .mneme/project_memory.json

Then explicitly activate it:

mneme protect activate <decision-id> --memory .mneme/project_memory.json

Mneme only reports a decision as Protected after it can verify that real enforcement is in place. The full activation contract is documented in Protection Activation.

Try the Architecture Audit →

60-second enforcement example

Initialize a project-local decision corpus:

mneme init

Record one architectural decision:

mneme add_decision \
  --memory .mneme/project_memory.json \
  --id config-format \
  --decision "Use JSON for configuration files" \
  --scope config \
  --constraint "Use JSON only" \
  --anti-pattern "Do not use YAML"

Create a proposed input that violates it:

python -c "import pathlib; pathlib.Path('
Xem mã nguồn trên GitHub