# Keep agent notes true

The memory skill ties notes to the code they describe, and finds the ones that went stale.

> Web page: https://enola.tech/docs/skill-memory
> All pages: https://enola.tech/llms.txt

## Notes go stale when code moves

An agent's note about code is written once and read for months. Nothing compares it with the code it describes, so a note about a deleted function looks the same as one from this morning.

`enola-memory` ties each note to the symbol it is about. Later sessions can find notes by the code a task touches, and check whether that code has changed. Enola stores no notes and uses no model for the check. Your notes stay in whatever holds them: Claude Code's memory, a notes directory, or a memory service.

## Stamp the notes you have

Run the skill once with no task:

Ask your agent:

```
/enola-memory
```

For each function or type a note names, the agent asks Enola where it is now. Names that resolve get a **stamp**. Names that do not are listed, which usually means the code was renamed, moved or deleted. Read that list first. Adding stamps changes no note's content.

To keep new notes stamped, add this line to your agent's standing instructions:

CLAUDE.md or AGENTS.md:

```
Stamp notes about code with enola-memory.
```

## What is stored with a note

A stamp in a note's frontmatter, shortened:

```yaml
anchors:
  - at: internal/engine/engine.go:659
    name: engine.Engine.linkCrossRepo
    symbol_kind: method
    id: 88f3bf6869631b1c...
    body_hash: 6bb4fada8c03e53e
```

`id` says which symbol it is, whatever line it is on. `body_hash` says which version of its code the note was written about. Where a store has no metadata, the stamps go at the end of the note or in a file beside it. Notes about preferences, people or procedures get none.

## Ask what is known before a change

Ask your agent:

```
What do we know about Signal.Contribute before I change it?
```

The skill starts at that symbol, walks one or two steps through the graph, and picks the notes stamped on what it finds. Wording does not matter. Name the function you are about to edit: the closer the start, the better the notes.

## Find the notes that went stale

Ask your agent:

```
Which of our notes still hold?
```

| Status | What happens to the note |
| --- | --- |
| current | The code is the same. Use the note. |
| rewritten | The code changed. The agent rereads the note against it. |
| moved | Same code, new place. The stamp is updated. |
| present | The symbol is there, but its version cannot be compared. Treat the note as unverified. |
| gone | The symbol was not found. You are asked before the note is touched. |
| ambiguous | More than one symbol fits. The candidates are shown and none is picked. |

On one real memory, 91 stamps were checked after 30 commits: 88 were current and three needed a second look. One of those three notes contradicted itself.

## When it runs

A skill runs only when the agent loads it, so nothing checks your notes in the background. Ask after a large merge or refactoring. To check at every session start, keep the stamps as JSONL and run this from a session-start hook of your own:

One call for every stamp:

```shell
enola locate --stamps notes.jsonl
```

[Locate and stamps](https://enola.tech/docs/locate.md) documents that command for tools that keep their own records.

## What a check does not prove

- **`current` does not mean right.** It says the code has not changed since the stamp.
- **A change elsewhere can break a note** whose own function stayed the same.
- **Content is yours.** The skill asks before it changes or removes a note.

Worked examples: [what it found in 79 Claude Code notes](https://enola.tech/blog/stale-coding-agent-memory), and [how fast line references go stale](https://enola.tech/blog/agent-memory-needs-a-code-reference).
