# Agent Memory Kit

Give an agent a memory worth reading back.

**Task:** {{task}}
**Scope:** {{scope}}

## Procedure

1. **Search before you write.** Call `memory.search` on the *topic* of the task, not on its full text — a long query matches nothing. The failure this pack exists to fix is an agent re-deriving a conclusion it already reached last week.

2. **Read the hits; do not trust the snippets.** A search result is a pointer. Call `memory.get` on anything that looks relevant before acting on it — a half-remembered constraint is worse than no memory at all.

3. **Do the task.** Everything above happens first, because the point is that the work is informed by what came before rather than annotated after.

4. **Decide what is durable.** Save conclusions, constraints, corrections, and stated preferences. Do not save transcripts, intermediate reasoning, file contents, anything you could re-derive in a second, or anything whose shelf life is shorter than this session.

5. **One entry per idea, keyed as a claim.** `memory.save` with a key that states the thing: `staging-db-resets-nightly`, not `staging-db`. Search matches claims; a topic-shaped key returns everything and distinguishes nothing. Prefix the key with `{{scope}}` so one project's conclusions stay out of another's results.

6. **Supersede; never accrete.** When something you learn contradicts something stored, save the correction, name the entry it replaces, and `memory.delete` the old one. A store holding both sides of a contradiction is worse than an empty one — it will confidently hand back the wrong half.

7. **Audit occasionally.** Every several sessions, walk `memory.list` and delete what has gone stale. Nobody else is going to.

## Output

What you recalled and used, then what you saved and why — one line each.

## Notes

- The failure mode is not forgetting. It is remembering at the wrong granularity: a hundred entries about one afternoon and nothing about the decision that afternoon produced.
- If you would not want it read back to you verbatim in three months, do not save it.
- Saving nothing is a valid outcome. A session that produced no durable conclusion should leave no trace.
