coding-agents
Mneme: Governance for Agent Projects
Learn how the Mneme skill gives Claude Code project memory to enforce architectural decisions and prevent AI-driven regressions.
Where this fits
You're running Claude Code on a codebase that has accumulated unwritten rules: "we always use the repository pattern", "never call the payment API from the frontend", "keep the worker queue single-threaded". The agent doesn't know these, so it happily suggests a refactor that violates them. You catch it only after the diff is generated, losing time and trust. Mneme records those decisions as machine-readable JSON and makes the agent check them before non-trivial edits. Now the agent surfaces the constraint before proposing code, and you approve changes knowing they align with the architecture.
Why agents benefit
- Context-aware gating: The agent runs
/mneme-contextwith a descriptive task phrase (e.g. "auth middleware refactor") and retrieves only decisions whose scope overlaps that domain — no need to read every memory. - Draft validation:
/mneme-checkcompares proposed content against recorded constraints, returning violations with referenced decision IDs, not just a generic warning. - Persistent project memory: Decisions live in
.mneme/project_memory.json— versioned, diffable, and reviewable just like code. - Idiomatic language: Queries use domain terms, not file names, so the agent doesn't miss a governance rule because the filename changed.
- Proactive enforcement: The skill activates automatically if a
.mneme/directory exists, so you don't have to remember to invoke it each time.
Practical scenarios
Refactoring the storage layer
The agent is asked to switch from raw SQL to an ORM. Running /mneme-context storage layer returns a decision: "Use the repository pattern for all DB access" with rationale. The agent adjusts its approach and proposes an ORM wrapper around repositories, satisfying the constraint.
Adding a new API endpoint
A developer asks for a public endpoint that returns user PII. The skill checks auth middleware decisions: "All endpoints must pass through validate_token" and "Do not expose email fields". The agent flags the risk before any code is written, saving a security review cycle.
Introducing a third-party library
When the agent wants to add an image-processing library, /mneme-context external dependencies surfaces a decision: "No GPL v3 packages". The agent immediately proposes a MIT-licensed alternative, avoiding a licensing headache.
Add it to your agent workflow
Install via OpenAgentSkill:
npx skills add MnemeHQ/mneme --skill mneme
Then, before any non-trivial edit, run:
/mneme-context storage layer changes
After drafting a change, gate it:
/mneme-check --query "storage layer changes" < proposed.diff
If no existing decisions apply, you can record a new one with /mneme-record.
Compare before adopting
- Quality signals: Check the GitHub repo for recent commits, open issues, and README clarity.
- Maintenance freshness: Look for whether the skill tracks Claude Code's latest SDK changes (e.g. slash-command syntax).
- Alternatives: Compare with plain ADR tools (like adr-tools) or hand-rolled prompts. Mneme's edge is agent-native retrieval and gating.
- Workflow fit: Does
.mneme/fit your repo's conventions? Ensure the JSON structure is understandable to your whole team, not just the agent.
Why it is worth tracking
Mneme tackles a growing pain point: AI agents that mutate codebases without architectural memory. With 17 stars and an active author, it's early but focused. Track it because it addresses a real integration gap between lightweight ADRs and agent contexts. Re-evaluate when you find yourself repeating "no, we decided against that" in code reviews or when your team adopts more agent-driven development. More details: https://www.openagentskill.com/skills/mnemehq-mneme
Featured Skill
mneme
Skill by MnemeHQ