Method
agent-memory-disciplines.md

Six Agent-Memory Disciplines

Six no-training memory disciplines distilled from Stanford's AutoMem ablations: consult before write, upsert over append, and the rest of the improvement loop.

agent-memory-disciplines.md
Six Agent-Memory Disciplines (no training required)
An Ena Pragma method, distilled from Stanford's AutoMem ablations
(arxiv.org/abs/2607.01224). Each discipline is what the paper's automated
optimization converged on; each is adoptable by hand in any agent stack.

1. CONSULT BEFORE WRITE
   Search memory before adding to it. The single behavior the paper's
   training most reinforced (writes-per-search fell 54-72%), and it was
   already expressible as a prompt rule. Mechanize it: scan for near-
   duplicates before any new record lands; track your write/search ratio.

2. UPSERT OVER APPEND (for state-like facts)
   Facts with a current value (status, location, config) get updated in
   place under a stable key; append-only is for genuinely episodic records
   (events, sessions, logs). The paper's largest single structure win:
   keyed updates cut one environment's memory growth 95%. Run version
   control underneath so updating in place never destroys history.

3. AUTO-SYNC MECHANICAL STATE
   Anything derivable from the environment (inventory, status, indexes)
   is maintained by code, not by the model. Spend model judgment only on
   judgment. If a script can keep it current, a script should.

4. PRE-LOAD STANDING KNOWLEDGE
   Goals, rules, and domain facts the agent will always need go into
   memory BEFORE the run, so no capacity is wasted rediscovering them.
   (This is what a well-maintained operating doc for an agent is.)

5. REVIEW TRAJECTORIES, NOT JUST OUTCOMES
   A memory mistake at step 50 may not hurt until step 800; end-of-run
   metrics cannot tell you where memory went wrong. Periodically read
   full session records against the memory they produced, like a code
   reviewer with the execution log in hand, and revise the STRUCTURE
   (schemas, prompts, rules) based on what you find.

6. GATE STRUCTURE CHANGES ON A FIXED TEST SET
   Keep a small, fixed benchmark (same queries or tasks every time).
   Any change to schemas, retrieval, or memory rules must hold or improve
   the score, or it gets adjudicated before it merges. (The paper's rule
   is stricter, improve-only; we relax it to hold-or-improve for
   maintenance changes.) Improvement you did not measure is improvement
   you cannot trust.

Order matters: 1-4 are day-one habits, 5-6 are the improvement loop.
All six are plain text and code. None require training a model.

This method is published in full in the post Does Better AI Agent Memory Come From Training or From Structure?, which covers the evidence behind it and when to reach for it.