agent-memory-discipline

Defines rules for when agents recall from and save to long-term memory backends.

3.4k|487|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/davepoon/buildwithclaude --skill agent-memory-discipline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-memory-discipline
Source: https://github.com/davepoon/buildwithclaude/tree/main/plugins/all-skills/skills/agent-memory-discipline
Command: npx skills add https://github.com/davepoon/buildwithclaude --skill agent-memory-discipline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Connecting a memory tool or MCP memory server does not make an agent actually use it. Without standing rules, agents forget user preferences, project conventions, and past decisions between sessions, forcing users to repeat themselves and re-explain context.

Core Features & Use Cases

  • Recall-before-acting rules: Defines exactly when to search memory (returning to a project, choosing libraries, writing commits) and when not to (one-off factual questions), avoiding wasted tool calls.
  • Save-after-deciding rules: Specifies what deserves a memory entry (decisions, corrections, failures, environment facts) and what must never be saved (secrets, transient state, re-readable file contents).
  • Durable memory hygiene: Enforces one-fact-per-entry, closing superseded entries instead of deleting them, and surfacing contradictions rather than silently resolving them.
  • Use Case: A user says "stop using npm here, we're on pnpm." The skill directs the agent to save that correction with its reason and date, then recall it before running any package command in future sessions.

Quick Start

Ask the agent to set up persistent memory discipline for this project so it recalls past decisions before acting and saves corrections and conventions after each session.

Frequently Asked Questions about agent-memory-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make an AI agent remember preferences between sessions?

Connect a memory backend such as a Markdown folder, local MCP memory server, or hosted service, then apply recall-before-acting and save-after-deciding rules. The agent searches memory before project work and writes decisions, corrections, and failures afterward.

When should an agent save something to long-term memory?

Save when a decision is made, the user corrects the agent, an approach fails, a lasting preference is stated, or an environment fact is discovered. Never save secrets, transient state, or file contents that can be re-read.

Does this memory approach work with any MCP memory server?

Yes, the rules are backend-agnostic. They work identically with a folder of Markdown files, a local MCP memory server, or a hosted memory service, since they govern agent behavior rather than storage implementation.

What should an agent do when memory entries contradict each other?

Surface both conflicting entries with their dates and ask or flag the user instead of silently picking one. A recent failure contradicting an old convention is exactly the case the user needs to know about.

Should old memories be deleted when a decision changes?

No. Mark the old entry as superseded with its validity window and write the new one alongside it. Deleting closed entries destroys the explanation for code written while the old decision was in effect.