Project memory notes that keep agents consistent
Agents forget. Project memory notes keep sessions consistent without dumping the whole repo into context every time.
Agents forget. Project memory notes keep sessions consistent without dumping the whole repo into context every time. The trap is writing memory that becomes false. Wrong memory is worse than no memory.
What belongs in project memory (and what does not)
Good project memory is stable, short, and linked to truth:
- Boundaries: package ownership, allowed dependencies, and where code is supposed to live.
- Invariants: public API rules, error shape, data model rules, and performance budgets.
- How to verify: the few commands that prove a change is safe (tests, lint, build).
- Forbidden patterns: the mistakes that keep recurring in agent diffs, with a concrete example.
Avoid putting these into “memory”:
- Secrets and internal tokens
- Long chat transcripts
- Meeting summaries as source of truth
- Pasted code blocks that drift away from the canonical implementation
Workflow: update memory as part of shipping

Update
Treat memory like documentation with an owner and a gate.
- Start with a small set of cards. System map, boundaries, testing norms, deploy and rollback, and forbidden patterns.
- Link cards from rules. Make them visible at session start.
- Add a PR gate. One checkbox: “Memory update needed?” If yes, update the card in the same PR or a follow-up.
- Prune aggressively. If a claim is stale, delete it or replace it with a link to canonical code.
- Review monthly. Memory is an API for automated authors. Unreviewed memory becomes fiction.
Checklist: what a “memory card” should contain
- A one-screen description of the decision or boundary.
- Links to canonical code and docs, not pasted copies.
- A short “how to verify” command list.
- One concrete anti-pattern to avoid, with a repo example.
- An owner or rotation, and a prune cadence.
- No secrets or customer data.
Three failure modes that cause drift

Failure modes to catch early
- Stale truth. The card says one thing, the code does another.
- Fix: delete claims fast. Replace with pointers to canonical code. Prune monthly.
- Duplicated guidance. The same rule is rewritten across multiple files and conflicts.
- Fix: pick one canonical card per topic. Link to it instead of rewriting it.
- Secret leakage. Tokens, customer data, or internal URLs land in memory.
- Fix: treat memory like a public artifact. Keep secrets out. Use placeholders and secure vaults.
Bottom line

When this fits vs when it does not
Project memory works when it is short, owned, and continuously pruned. Use it to encode boundaries, invariants, and verification commands. If you also need to keep day-to-day agent sessions small, pair this with context budgeting and onboard new engineers with agent onboarding checklists.
Share