Snapshots

Five memory layers teach Brew more about each store weekly

Being built
  • Layers: brand memory, learnings, Brand Book, workspace taste and each member's feed.
  • A drop runs learnings: the team reviews the draft, then saves.
  • High and medium impact learnings rewrite Plays within a $30 cap.
  • A member's own preferences never reach the brand's memory.
  • Plans from anyone are taken as context, never filtered by who proposed them.
5layers of memory
Your call

Should brand memory and Brand Book rules merge? Proposal: not in v1, revisit in v2.

Engineering · 5.11

Learnings and memory

DraftLast checked Mon Oct 26Owner Param

Answer

Brew keeps five layers of what it learns about a brand, brand memory, learnings, the Brand Book, workspace taste and each member's own tuning, and this page settles what each holds, who may write it and how it changes the brief, Plays and feed.

Today

Layer What it holds Who writes Who reads Source
Brand memory A versioned markdown repo per brand (index plus one file per topic), every line with source, date and id, a change log and a consolidate pass that merges and drops stale lines; embeddings on Vertex the team (and Brew from jams) every jam prompt brew/brand-memory.js:1-8 brew/docs/brand-memory.md
Learnings From pasted or dropped context (call transcripts, notes, decks, plans from anyone): essence, goals, beliefs, facts, and what they tried; every learning carries the exact words it rests on the team, after a review step the brief, memory, card lifts and hides, Play rewrites brew/brand-learnings.js:1-8 memory brew-drop-learnings
Brand Book The brand's whole profile: read layer from public evidence, uploads over it, team edits over those; rules in four groups; kit, voice, words, products, people, proof, library, playbooks the read, then the team every maker (drafts, cards, statics, ideas, Studio) brew/brand-book-read.js:1-6 brew/jam2/brandbook.js:1-8 brew/jam2/rules.js:1-8
Workspace learning A version graph of every object and taste rules, exemplars and checks learned from picks, edits and ships Brew, from behaviour studio and jam turns brew/learn.js:1-6
Your feed Per member: less, normal or more per agent, up to 12 topics, "My preferences" notes, signals they deleted the member the ranker only brew/member-tuning.js:1-6

How a drop flows

POST /api/brands/:slug/drop sends one upload to memory (team only), my preferences, just this once (a jam's photo), or References. Files are read by drop-read.js: text as is, Office files unzipped locally for free, PDFs and images by Gemini. Caps: 600k characters per drop, 200k per file; photos 8 MB. brew/drop.js:1-6 brew/drop-read.js:1-6 memory brew-drop-learnings

A drop to memory runs learnings: the sheet shows the draft, the team unticks lines, then Save updates the brief, memory, learned.json card lifts and hides, and flags or rewrites the Plays it touches. memory brew-drop-learnings

What learnings change

  • Plays: high and medium impact rewrite now within LEARN_CAP_USD $30; low ones wait for the weekly run. brew/build.js:1075 memory brew-move-freshness
  • Ranking: a Play rewritten on learnings +6; team cards +10; learned up +8; learned hide −40 until "bring back". brew/feed-service.js:556-559
  • Proof: the team's own words come first on the proof sheet, members only. memory brew-drop-learnings
  • "Tried" learnings (what the brand did and how it went) keep up to 80 and always go in full into the brief. memory brew-move-freshness
  • Plans from anyone, our team's proposals and agency decks included, are taken as context; never filtered by who proposed them. memory brew-absorb-all-learnings

Brand Book specifics

  • Built after the brief, healed on open, rebuilt when its inputs change (at most every 6 hours, at least weekly); BOOK_V 6. brew/brand-book-read.js:18 memory brew-brand-book
  • Public views: /<slug>/brand, brand.md, brand.json, llms.txt, brand-kit.zip, brand.pdf. The share view never carries members-only data (Meta winners, uploads, team rules). Closed stores share nothing. memory brew-brand-book memory brew-brand-book-guards
  • Proposals from an uploaded file must be grounded in the file. memory brew-brand-book-guards

Tomorrow

Item Version Tag
Learnings with a review step before anything changes v1 Stays
The Brand Book as the one source every maker reads v1 Stays
Rules learned from repeated team edits v2 New memory brew-brand-book
Consolidating memory, learnings and Brand Book rules into one store v3 Changes
Memory export a brand can take with it v2 New

How we do it

  1. New makers call promptBlock, creativeBlock and refsFor; never leak private edits or uploads into the share or public view. memory brew-brand-book
  2. Before a Brand Book deploy, copy the bucket JSON for a few brands and run:
node tools/audit-brand-book.mjs DIR

Add a check and a guard test for every new problem class. brew/CLAUDE.md

  1. With AI off locally only the word-match plan runs; PDF and photo reads can only be checked on staging. Hit the route itself before saying a drop works. memory brew-drop-learnings

Numbers

Metric Definition Where measured
Memory lines per brand Lines in the memory repo memory/state.json
Learnings saved Lines saved per drop after review learned.json (Proposed to count)
Learnings rewrite spend Dollars spent rewriting on learnings per week the rewrite pot in updates.json

Open

  1. Should brand memory and Brand Book rules merge? Proposal: not in v1; in v2 make memory lines that are rules become Brand Book rules after a team confirm.
  2. Should a member's preferences ever reach the brand's memory? Proposal: no, they stay personal.
Sources
  • brew origin/main: brand-memory.js:1-8; brand-learnings.js:1-8; learn.js:1-6; member-tuning.js:1-6; drop.js:1-6; drop-read.js:1-6; references.js:1-6; memory-routes.js; server.js:481-484
  • brew origin/main: brand-book-read.js:1-6, 18; brand-book-routes.js:1-6; jam2/brandbook.js:1-8; jam2/rules.js:1-8; brand-kit.js; build.js:1075; feed-service.js:556-559
  • brew origin/main: docs/brand-memory.md; SCOPE.md (Your feed, Drop anything, References); CLAUDE.md (Brand Book guards)
  • memory brew-drop-learnings, brew-absorb-all-learnings, brew-brand-book, brew-brand-book-guards, brew-move-freshness, brew-arata-reload-2026-10-20

Source file content/engineering/learnings-and-memory.md · For agents: Markdown · JSON