Page typeInfrastructure RunnabilityRunnable locally OutcomeWARN

Your ADRs become constraints the rest of the system can enforce.

You already have ADRs. Mneme reads the enforceable parts, turns them into rules, and uses those rules to check a proposed change. This walkthrough uses Mneme's own ADR-005—no model or external service required.

ADR compiler

The ADR stops being a document and starts doing work.

One ADR becomes one check. This example shows the warning that check produces.

Source decision

ADR-005 · Brand versus package namespace. The Python namespace is mneme. MnemeHQ is a forbidden dependency token on code-bearing surfaces.

adr import + mneme check · compiled constraint trace
  1. 01 Decision

    A Markdown ADR carries accepted status, foundational priority, code scope, and constraint directives.

    docs/adr/ADR-005.md · FORBID_DEPENDENCY: MnemeHQ
  2. 02 Compile

    The compiler emits the active constraint into project memory.

    ADR Markdown → .mneme/project_memory.jsonCurrent Mneme
  3. 03 Check

    The input uses the brand token as if it were the Python package namespace.

    from MnemeHQ.memory_store import MemoryStore
  4. 04 Result

    The compiled rule fires through the normal checker and names its source ADR.

    WARN [ADR-005] · trigger: mnemehq
    WARN
Runnable locally · compiler output is deterministic

Run it yourself

Compile Mneme's own ADRs

The repository walkthrough previews the import, writes a fresh memory file, and checks a namespace violation.

git clone https://github.com/MnemeHQ/mneme
cd mneme
pip install -e .
python examples/demo-adr-import.py

Unknown directives and unresolved equal-precedence conflicts fail closed instead of being silently omitted.

What happened

Your ADR stays readable.

Markdown remains the source; Mneme extracts only the parts it needs to enforce.

Conflicts are resolved before a check runs.

Mneme works out which ADR wins before an agent or CI job relies on it.

The result is a usable rule.

The compiled decision can guide agents and block violations in the same way as the architectural-drift proof.

Common questions

Does the compiler replace Markdown ADRs?

No. ADR files remain the source. The compiler emits a structured downstream artifact for enforcement.

What happens when two ADRs conflict?

If precedence cannot be resolved deterministically, compilation stops. A human must supersede one decision, change priority, narrow scope, or otherwise remove the ambiguity.

Why does this example end in WARN?

This page proves that the compiler emits a working rule and that the rule can flag a bad input. The full deny-and-pass sequence is shown in the governed Python agent demo.

Compile the decisions you already maintain.

Keep the ADRs human-readable and make their active constraints executable.

pipx install "mneme-hq>=0.9.0"
Python 3.11+ · MIT licensed