Skip to Content

Memory and learning

What zerd remembers per repo, where it is stored, and how lessons and edit history feed back into later runs.

Per repo, stored outside it. zerd keeps only what cannot be invented: what you told it, and what verified runs changed.

  • Lessons. /learn <rule>, a rejection with feedback, a standing rule at the start of a message, or a correction. A model reads each reply next to what it replied to, so "no, not this" or "yes, like that" becomes a lesson tied to its request, not a phrase-match. It runs as a background call. Lessons are written into the repo's AGENTS.md under ## Learned by zerd, so you can review and commit them. /forget N removes one (also from AGENTS.md).
  • Edit history. Each verified run records its request words and the files it changed. A match is the share of the search query's words, so a 40-word brief can't drown a 5-word search.
  • Learn from the past. zerd learn-import --repo . mines your Claude Code sessions. Claude Code deletes transcripts after 30 days, but ~/.claude/history.jsonl keeps every prompt forever. --deep reads each task's story in chunks (files, failed commands, what Claude said, your reply) and weighs candidates against the repo's existing AGENTS.md rules, taste and skills, so only new rules are added and noise is dropped. The deep run is review-then-apply: the dry run saves its verdict, --apply writes exactly that with no model call, and --reweigh redoes only the final step.
  • Instruction files are honoured the way you wrote them: every AGENTS.md / CLAUDE.md in a directory plus ~/.claude/CLAUDE.md, @imports followed, up to 80k chars whole, and commit/comment/spec/plan rules kept even when a file is too long to inline. Command Code taste files are read too.
  • Review memory (see above) and task notes (see context) are the other two stores.