Memory integrity

Can the system trust and use what it remembers?

Design and evaluate how AI products collect, retain, retrieve and use information. Establish standards for provenance, consent, relevance and factual accuracy.

Ends with
  • Use
  • Confirm
  • Withhold
npx skills add richardsimms/skills --skill memory-integrity

View skill on GitHub(opens in a new tab)

Use it when

  • Building personalisation or memory systems.
  • Designing context-aware agents.
  • Reviewing retrieval quality.
  • Handling stale or conflicting information.

See the difference

Illustrative example, not a measured evaluation result. The prompt is the contradiction case from the evaluation set (opens in a new tab).

Prompt

An older inferred preference says remote work; today’s explicit user instruction says office-based. What should memory do?

Without the skill

Search plan

  • Use the saved remote preference.
  • Add office roles as a fallback.
  • Keep both preferences in the profile.

Trusts retrieved information over what the person just said.

With the skill

Call
Use today’s instruction
  • Today’s instruction is explicit and current: search office-based roles.
  • The saved preference was inferred, not stated, and is now contradicted.
  • Mark it for correction. Never merge the two into one silent answer.
  • Show the person what changed, so they can correct it.

Checks provenance, consent and freshness.

What changed

The agent asked where each memory came from and how current it was, and let the person’s own words outrank a guess the system had stored.

Try it yourself

/memory-integrity review our agent’s long-term memory and retrieval
/memory-integrity a deleted note still shows up in search. What should happen?
/memory-integrity should the assistant use this saved preference?

In Claude Code a skill runs as a slash command. Installed as the plugin, it’s /product-builder:memory-integrity. In other agents, ask the question in plain words.

How it decides

One call per remembered item. The first rule that matches decides the call.

  1. 01It belongs to someone else, or permission is missing: Withhold
  2. 02It isn’t relevant to the current goal: Withhold
  3. 03The person’s current input contradicts it: Use the current input
  4. 04It can’t be traced to a source and the stakes are high: Withhold
  5. 05It’s stale or contradicted, with nothing to settle it: Confirm
  6. 06Traceable and in date: Use

Unknown stakes count as high. Withholding costs one sentence; a confident wrong date can cost a missed appointment.

Principle

Confidence is not a substitute for provenance.

Produces A memory policy, integrity assessment and evaluation criteria covering recall, provenance, freshness and user control.

Evaluation

Cases written · Not yet run

7 evaluation cases are written, each run with and without the skill. None has been run yet, so there are no results to report. Its rules were also checked against a product management knowledge base. That checks the rules, not how the skill performs.

View evaluation evidence(opens in a new tab)