---
name: mmw-memory
description: Use the MMW long-term memory (MCP tools search, remember, forget, validate_memory). Search it at the start of every task and whenever the user asks what was decided, how something is done here, or why; before proposing an architecture or a deploy method. Save to it when a decision is made, a root cause is found, the user states a rule or preference, or a document yields an important fact.
---

# MMW memory

You have a long-term memory shared across sessions, devices and AI clients: the MMW MCP server.
Its tools may appear under a prefix, for example `mcp__mmw__search`. If no MMW tools are available,
say so once and point the user to the MMW quickstart (https://docs.mmwhub.tech/start/quickstart/);
do not pretend to remember.

Answer in the user's language. The memory stores whatever language the facts were written in.

## When to search

- At the start of a task: search by the topic of the task to learn past decisions and agreements.
- Before proposing an architecture, a library, a deploy method or a workflow.
- When the user asks "how do we…", "what did we decide…", "why…", "do you remember…".
- Before saving: if the same fact is already there and has not changed, do not save it again.

Use the words a person would search for, not pronouns. Try two or three phrasings if the first finds nothing.
Never say "there is nothing in memory" without having searched.

## How to read results

- `status=conflict`: the memory holds contradicting versions. Do not pick one yourself; show both to the user and ask.
- `status=stale`: the source document changed after the fact was saved. Re-read the source before acting on it.
- `status=unverified`: a normal record. Weigh `source_id` and `confidence`.
- A record that is `superseded` has a newer version; the newer one is in force.

## When to save (remember)

- A decision was made: save it with the reason.
- A bug's root cause was found and fixed.
- The user stated a rule, an agreement or a preference.
- A document was read and an important fact follows from it: save it with `source_id`
  (path or URL), `source_hash` (sha256 of the content) and `source_revision` (commit or version).

## How to save

- One fact per record, understandable without the conversation, with the words people will search for.
- Say why: "we use X because Y" is worth more than "we use X".
- `fact_key` names the question the record answers: `area.subject.property`, lowercase,
  for example `deploy.staging.method`. No dates and no answer inside the key. Reuse the same key
  when a fact changes, so the old version is marked superseded instead of silently duplicated.
- Confidence: 0.9 to 1.0 when read in a document or confirmed by the user; 0.5 for your own conclusion;
  below 0.5 for a hypothesis.
- A summary of many records passes their IDs in `derived_from`, so their conflicts stay visible.

## Never save

- Keys, tokens, passwords, connection strings, even partially.
- Raw dumps of conversations or logs: save the conclusion instead.
- Temporary state ("the test is running now", "branch x is not merged yet").
- Other people's personal data without need and consent.

## When to forget

Only when the user confirmed a fact is wrong, when resolving a conflict (delete the wrong version by its id),
when the user asks, or when a source document was rewritten (forget by `source_id` before saving the new facts).
Age alone is not a reason to forget.

## Before you finish a task

If the task produced a decision, a fix with its cause, or a new rule, save it before your final answer.
