keep-agent-memory-accurate
Skill2 starsChanged 3 months agoApache-2.0View on GitHub
Use when recording or updating a persistent agent-memory fact -- a user preference, a project fact, feedback, or a reference note the harness should remember across sessions. Triggers on requests like "remember that I prefer X", "note this project fact", "update this memory", or "this preference changed". Do not use for curated knowledge with evidence and freshness tracking; that belongs to document-with-evidence.
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- block-dangerous-git-commandsSkill
- break-work-into-ticketsSkill
- build-a-domain-modelSkill
- build-a-throwaway-prototypeSkill
- check-if-data-is-safe-to-deleteSkill
- check-the-licence-before-you-copySkill
- choose-the-right-code-reviewSkill
- debug-a-silent-failureSkill
- deploy-to-production-safelySkill
- design-deep-modulesSkill
- detect-stale-documentationSkill
- diagnose-a-hard-bugSkill
- document-with-evidenceSkill
- edit-a-live-config-safelySkill
- find-architecture-improvementsSkill
- generate-a-setup-wizardSkill
- get-a-second-model-opinionSkill
- implement-from-a-specSkill
- investigate-an-unfamiliar-systemSkill
- keep-secrets-out-of-the-repositorySkill
- know-what-a-change-costsSkill
- look-at-the-rendered-pageSkill
- make-the-next-failure-loudSkill
- map-an-undocumented-systemSkill
- map-the-attack-surfaceSkill
- pick-the-right-skillSkill
- plan-work-too-big-for-one-sessionSkill
- research-with-primary-sourcesSkill
- resolve-merge-conflictsSkill
- review-a-plan-before-you-buildSkill
- review-changes-against-spec-and-standardsSkill
- review-code-you-did-not-writeSkill
- root-cause-analysis-firstSkill
- route-work-to-the-right-modelSkill
- set-up-pre-commit-hooksSkill
- set-up-the-issue-trackerSkill
- set-up-verified-documentationSkill
- stress-test-a-decisionSkill
- stress-test-a-plan-with-docsSkill
- supersede-outdated-docsSkill
- survive-someone-elses-breaking-changeSkill
- tddSkill
- teach-a-conceptSkill
- triage-issues-and-prsSkill
- turn-a-decision-into-a-questionnaireSkill
- validate-your-validatorSkill
- verify-before-saying-doneSkill
- write-a-handover-that-worksSkill
- write-a-spec-from-a-conversationSkill
- write-docs-for-agentsSkill
- write-docs-people-can-findSkill
- write-the-rollback-plan-firstSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Add a matching bullet to memory/MEMORY.md:
- Very specific: line 42
Only bullets shaped - Title count as index entries.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Keep agent memory accurate
Agent memory is one Markdown file per fact under memory/, plus a
one-line-per-entry index at memory/MEMORY.md. Write and edit the files
directly; lint only checks what is there.
Write a memory file
---
name: short-kebab-slug # required; unique; must match the filename
description: one-line summary # required
metadata:
type: user # required; user | project | feedback | reference
---
Body, in prose. May reference another memory with a [[wikilink]].Name the file first, then copy that name into name. The filename
without .md is the memory's canonical identity, so the file
memory/short-kebab-slug.md carries name: short-kebab-slug. Choose a slug, not a title: name is an
identifier that wikilinks resolve against, not a label -- the human-readable
title belongs in the index entry. lint warns when the two disagree, and the
repair is always to rewrite name, never to rename the file.
Since the filename is the identity, no two memories may carry the same one --
including across subdirectories. There the repair is renaming: what may
never be renamed is a file being made to match its own name.
Add a matching bullet to memory/MEMORY.md:
- [Title](short-kebab-slug.md) — one-line summaryOnly bullets shaped - [Title](file.md) count as index entries; the index
and the files must agree in both directions.
Supersede a memory
To correct or retire a memory, do not delete the file. Rewrite its
description to start with the literal prefix superseded by followed by
a wikilink to the memory that replaces it:
description: superseded by [[coffee-preference-v2]]The wikilink must resolve to a different memory that exists; pointing at
itself -- by name or by this memory's own filename -- or at a name that
does not exist, is malformed.
Unlike an ordinary wikilink, a successor cannot be left pending: this is an
ERROR and it gates. If lint says the target does not resolve by name but
names a file that exists, repair that file's name rather than re-point the
supersession.
Wikilinks
[[name]] in a description or a file's body names another memory by its
name. A wikilink to a memory not written yet is a WARNING, not an ERROR --
it marks something pending.
Since name matches the filename, writing [[short-kebab-slug]] for the
memory in short-kebab-slug.md is correct by construction. If lint says a
wikilink has no matching memory but names a file that declares a different
name, the link is fine and that file's name is what needs repairing.
Verify
python3 -m validated_memory lintEnforces, over the whole memory set: the index and the files agree in both
directions, every file's frontmatter is complete, every wikilink either
resolves or is flagged pending, and the supersession marker (if any) is well
formed. It also warns -- without gating -- when a name does not match
its filename; that one is a WARNING only as a migration concession, and
becomes an ERROR in 2.0.0. See the README's "Agent
memory" section for the exact rules. Run it after any edit to memory files
or the index.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

