memory-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Memory Management

记忆管理

Memory makes Claude your workplace collaborator - someone who speaks your internal language.
记忆功能让Claude成为你的职场协作伙伴——一个能听懂你内部术语的伙伴。

The Goal

目标

Transform shorthand into understanding:
User: "ask todd to do the PSR for oracle"
              ↓ Claude decodes
"Ask Todd Martinez (Finance lead) to prepare the Pipeline Status Report
 for the Oracle Systems deal ($2.3M, closing Q2)"
Without memory, that request is meaningless. With memory, Claude knows:
  • todd → Todd Martinez, Finance lead, prefers Slack
  • PSR → Pipeline Status Report (weekly sales doc)
  • oracle → Oracle Systems deal, not the company
将速记转化为可理解的内容:
User: "ask todd to do the PSR for oracle"
              ↓ Claude decodes
"Ask Todd Martinez (Finance lead) to prepare the Pipeline Status Report
 for the Oracle Systems deal ($2.3M, closing Q2)"
没有记忆功能的话,这个请求毫无意义。有了记忆功能,Claude会知道:
  • todd → Todd Martinez,财务主管,偏好使用Slack
  • PSR → 销售管道状态报告(每周销售文档)
  • oracle → Oracle Systems交易项目,而非Oracle公司

Architecture

架构

CLAUDE.md          ← Hot cache (~30 people, common terms)
memory/
  glossary.md      ← Full decoder ring (everything)
  people/          ← Complete profiles
  projects/        ← Project details
  context/         ← Company, teams, tools
CLAUDE.md (Hot Cache):
  • Top ~30 people you interact with most
  • ~30 most common acronyms/terms
  • Active projects (5-15)
  • Your preferences
  • Goal: Cover 90% of daily decoding needs
memory/glossary.md (Full Glossary):
  • Complete decoder ring - everyone, every term
  • Searched when something isn't in CLAUDE.md
  • Can grow indefinitely
memory/people/, projects/, context/:
  • Rich detail when needed for execution
  • Full profiles, history, context
CLAUDE.md          ← 热缓存(约30人、常用术语)
memory/
  glossary.md      ← 完整解码库(所有内容)
  people/          ← 完整人员档案
  projects/        ← 项目详情
  context/         ← 公司、团队、工具信息
CLAUDE.md(热缓存):
  • 你最常互动的约30人
  • 约30个最常用的缩写/术语
  • 活跃项目(5-15个)
  • 你的个人偏好
  • 目标:覆盖90%的日常解码需求
memory/glossary.md(完整术语表):
  • 完整解码库——包含所有人、所有术语
  • 当CLAUDE.md中找不到内容时进行搜索
  • 可以无限扩展
memory/people/、projects/、context/:
  • 需要执行任务时的详细信息
  • 完整档案、历史记录、上下文

Lookup Flow

查找流程

User: "ask todd about the PSR for phoenix"

1. Check CLAUDE.md (hot cache)
   → Todd? ✓ Todd Martinez, Finance
   → PSR? ✓ Pipeline Status Report
   → Phoenix? ✓ DB migration project

2. If not found → search memory/glossary.md
   → Full glossary has everyone/everything

3. If still not found → ask user
   → "What does X mean? I'll remember it."
This tiered approach keeps CLAUDE.md lean (~100 lines) while supporting unlimited scale in memory/.
User: "ask todd about the PSR for phoenix"

1. 检查CLAUDE.md(热缓存)
   → Todd?✓ Todd Martinez,财务
   → PSR?✓ 销售管道状态报告
   → Phoenix?✓ 数据库迁移项目

2. 如果未找到 → 搜索memory/glossary.md
   → 完整术语表包含所有人/所有内容

3. 如果仍未找到 → 询问用户
   → "X是什么意思?我会记住它。"
这种分层方法让CLAUDE.md保持精简(约100行),同时memory/目录支持无限扩展。

File Locations

文件位置

  • Working memory:
    CLAUDE.md
    in current working directory
  • Deep memory:
    memory/
    subdirectory
  • 工作记忆: 当前工作目录下的
    CLAUDE.md
  • 深度记忆:
    memory/
    子目录

Working Memory Format (CLAUDE.md)

工作记忆格式(CLAUDE.md)

Use tables for compactness. Target ~50-80 lines total.
markdown
undefined
使用表格保持简洁,目标总篇幅约50-80行。
markdown
undefined

Memory

Memory

Me

Me

[Name], [Role] on [Team]. [One sentence about what I do.]
[姓名], [职位],所属[团队]。[一句话介绍你的工作内容。]

People

People

WhoRole
ToddTodd Martinez, Finance lead
SarahSarah Chen, Engineering (Platform)
GregGreg Wilson, Sales
→ Full list: memory/glossary.md, profiles: memory/people/
称呼职位
ToddTodd Martinez,财务主管
SarahSarah Chen,平台部工程师
GregGreg Wilson,销售
→ 完整列表:memory/glossary.md,档案:memory/people/

Terms

Terms

TermMeaning
PSRPipeline Status Report
P0Drop everything priority
standupDaily 9am sync
→ Full glossary: memory/glossary.md
术语含义
PSR销售管道状态报告
P0最高优先级(放下所有工作处理)
standup每日9点同步会议
→ 完整术语表:memory/glossary.md

Projects

Projects

NameWhat
PhoenixDB migration, Q2 launch
HorizonMobile app redesign
→ Details: memory/projects/
名称内容
Phoenix数据库迁移,Q2上线
Horizon移动应用重设计
→ 详情:memory/projects/

Preferences

Preferences

  • 25-min meetings with buffers
  • Async-first, Slack over email
  • No meetings Friday afternoons
undefined
  • 25分钟会议,预留缓冲时间
  • 优先异步沟通,偏好Slack而非邮件
  • 周五下午不安排会议
undefined

Deep Memory Format (memory/)

深度记忆格式(memory/)

memory/glossary.md - The decoder ring:
markdown
undefined
memory/glossary.md - 完整解码库:
markdown
undefined

Glossary

Glossary

Workplace shorthand, acronyms, and internal language.
职场速记、缩写和内部术语。

Acronyms

Acronyms

TermMeaningContext
PSRPipeline Status ReportWeekly sales doc
OKRObjectives & Key ResultsQuarterly planning
P0/P1/P2Priority levelsP0 = drop everything
术语含义上下文
PSR销售管道状态报告每周销售文档
OKR目标与关键成果季度规划
P0/P1/P2优先级等级P0 = 最高优先级

Internal Terms

Internal Terms

TermMeaning
standupDaily 9am sync in #engineering
the migrationProject Phoenix database work
ship itDeploy to production
escalateLoop in leadership
术语含义
standup每日9点在#engineering频道同步
the migrationPhoenix项目数据库迁移工作
ship it部署到生产环境
escalate上报管理层

Nicknames → Full Names

Nicknames → Full Names

NicknamePerson
ToddTodd Martinez (Finance)
TAlso Todd Martinez
昵称人员
ToddTodd Martinez(财务)
T同样指Todd Martinez

Project Codenames

Project Codenames

CodenameProject
PhoenixDatabase migration
HorizonNew mobile app

**memory/people/{name}.md:**
```markdown
代号项目
Phoenix数据库迁移
Horizon新移动应用

**memory/people/{name}.md:**
```markdown

Todd Martinez

Todd Martinez

Also known as: Todd, T Role: Finance Lead Team: Finance Reports to: CFO (Michael Chen)
其他称呼: Todd, T 职位: 财务主管 团队: 财务部 汇报对象: CFO(Michael Chen)

Communication

沟通偏好

  • Prefers Slack DM
  • Quick responses, very direct
  • Best time: mornings
  • 偏好Slack私信
  • 回复迅速,风格直接
  • 最佳沟通时间:上午

Context

背景信息

  • Handles all PSRs and financial reporting
  • Key contact for deal approvals over $500k
  • Works closely with Sales on forecasting
  • 负责所有销售管道状态报告和财务报表
  • 50万美元以上交易审批的关键联系人
  • 与销售团队密切合作进行预测

Notes

备注

  • Cubs fan, likes talking baseball

**memory/projects/{name}.md:**
```markdown
  • 芝加哥小熊队球迷,喜欢聊棒球

**memory/projects/{name}.md:**
```markdown

Project Phoenix

Project Phoenix

Codename: Phoenix Also called: "the migration" Status: Active, launching Q2
代号: Phoenix 其他称呼: "the migration" 状态: 进行中,Q2上线

What It Is

项目内容

Database migration from legacy Oracle to PostgreSQL.
将数据库从传统Oracle迁移到PostgreSQL。

Key People

关键人员

  • Sarah - tech lead
  • Todd - budget owner
  • Greg - stakeholder (sales impact)
  • Sarah - 技术负责人
  • Todd - 预算负责人
  • Greg - 利益相关者(影响销售)

Context

背景信息

$1.2M budget, 6-month timeline. Critical path for Horizon project.

**memory/context/company.md:**
```markdown
预算120万美元,周期6个月。是Horizon项目的关键路径。

**memory/context/company.md:**
```markdown

Company Context

公司上下文

Tools & Systems

工具与系统

ToolUsed forInternal name
SlackCommunication-
AsanaEngineering tasks-
SalesforceCRM"SF" or "the CRM"
NotionDocs/wiki-
工具用途内部名称
Slack沟通-
Asana工程任务管理-
Salesforce客户关系管理"SF" 或 "the CRM"
Notion文档/知识库-

Teams

团队

TeamWhat they doKey people
PlatformInfrastructureSarah (lead)
FinanceMoney stuffTodd (lead)
SalesRevenueGreg
团队职责关键人员
平台部基础设施Sarah(负责人)
财务部财务相关Todd(负责人)
销售部营收Greg

Processes

流程

ProcessWhat it means
Weekly syncMonday 10am all-hands
Ship reviewThursday deploy approval
undefined
流程含义
Weekly sync周一10点全员会议
Ship review周四部署审批
undefined

How to Interact

交互方式

Decoding User Input (Tiered Lookup)

解码用户输入(分层查找)

Always decode shorthand before acting on requests:
1. CLAUDE.md (hot cache)     → Check first, covers 90% of cases
2. memory/glossary.md        → Full glossary if not in hot cache
3. memory/people/, projects/ → Rich detail when needed
4. Ask user                  → Unknown term? Learn it.
Example:
User: "ask todd to do the PSR for oracle"

CLAUDE.md lookup:
  "todd" → Todd Martinez, Finance ✓
  "PSR" → Pipeline Status Report ✓
  "oracle" → (not in hot cache)

memory/glossary.md lookup:
  "oracle" → Oracle Systems deal ($2.3M) ✓

Now Claude can act with full context.
务必先解码速记再执行请求:
1. CLAUDE.md(热缓存)     → 首先检查,覆盖90%的场景
2. memory/glossary.md        → 热缓存中未找到时查看完整术语表
3. memory/people/、projects/ → 需要执行时的详细信息
4. 询问用户                  → 未知术语?学习它。
示例:
User: "ask todd to do the PSR for oracle"

CLAUDE.md查找:
  "todd" → Todd Martinez,财务 ✓
  "PSR" → 销售管道状态报告 ✓
  "oracle" → (热缓存中未找到)

memory/glossary.md查找:
  "oracle" → Oracle Systems交易项目(230万美元) ✓

现在Claude可以在完整上下文下执行任务。

Adding Memory

添加记忆

When user says "remember this" or "X means Y":
  1. Glossary items (acronyms, terms, shorthand):
    • Add to memory/glossary.md
    • If frequently used, add to CLAUDE.md Quick Glossary
  2. People:
    • Create/update memory/people/{name}.md
    • Add to CLAUDE.md Key People if important
    • Capture nicknames - critical for decoding
  3. Projects:
    • Create/update memory/projects/{name}.md
    • Add to CLAUDE.md Active Projects if current
    • Capture codenames - "Phoenix", "the migration", etc.
  4. Preferences: Add to CLAUDE.md Preferences section
当用户说“记住这个”或“X的意思是Y”时:
  1. 术语表条目(缩写、术语、速记):
    • 添加到memory/glossary.md
    • 如果频繁使用,添加到CLAUDE.md的快速术语表
  2. 人员信息
    • 创建/更新memory/people/{name}.md
    • 如果重要,添加到CLAUDE.md的关键人员列表
    • 务必记录昵称——这对解码至关重要
  3. 项目信息
    • 创建/更新memory/projects/{name}.md
    • 如果是当前活跃项目,添加到CLAUDE.md的活跃项目列表
    • 务必记录代号——比如“Phoenix”、“the migration”等
  4. 偏好设置:添加到CLAUDE.md的偏好设置部分

Recalling Memory

调用记忆

When user asks "who is X" or "what does X mean":
  1. Check CLAUDE.md first
  2. Check memory/ for full detail
  3. If not found: "I don't know what X means yet. Can you tell me?"
当用户问“X是谁”或“X是什么意思”时:
  1. 首先检查CLAUDE.md
  2. 检查memory/目录获取详细信息
  3. 如果未找到:“我还不知道X是什么意思。能告诉我吗?”

Progressive Disclosure

渐进式披露

  1. Load CLAUDE.md for quick parsing of any request
  2. Dive into memory/ when you need full context for execution
  3. Example: drafting an email to todd about the PSR
    • CLAUDE.md tells you Todd = Todd Martinez, PSR = Pipeline Status Report
    • memory/people/todd-martinez.md tells you he prefers Slack, is direct
  1. 加载CLAUDE.md快速解析任何请求
  2. 需要完整执行上下文时再深入memory/目录
  3. 示例:起草给Todd的关于PSR的邮件
    • CLAUDE.md告诉你Todd = Todd Martinez,PSR = 销售管道状态报告
    • memory/people/todd-martinez.md告诉你他偏好Slack,风格直接

Bootstrapping

初始化

Use
/productivity:start
to initialize by scanning your chat, calendar, email, and documents. Extracts people, projects, and starts building the glossary.
使用
/productivity:start
命令初始化,扫描你的聊天记录、日历、邮件和文档,提取人员、项目信息并开始构建术语表。

Conventions

约定

  • Bold terms in CLAUDE.md for scannability
  • Keep CLAUDE.md under ~100 lines (the "hot 30" rule)
  • Filenames: lowercase, hyphens (
    todd-martinez.md
    ,
    project-phoenix.md
    )
  • Always capture nicknames and alternate names
  • Glossary tables for easy lookup
  • When something's used frequently, promote it to CLAUDE.md
  • When something goes stale, demote it to memory/ only
  • CLAUDE.md中使用粗体术语提高可读性
  • 保持CLAUDE.md篇幅在100行以内(“热门30条”规则)
  • 文件名:小写,连字符分隔(
    todd-martinez.md
    project-phoenix.md
  • 务必记录昵称和别名
  • 使用表格形式的术语表便于查找
  • 当内容频繁使用时,升级到CLAUDE.md
  • 当内容过时后,降级到仅保留在memory/目录

What Goes Where

内容分类

TypeCLAUDE.md (Hot Cache)memory/ (Full Storage)
PersonTop ~30 frequent contactsglossary.md + people/{name}.md
Acronym/term~30 most commonglossary.md (complete list)
ProjectActive projects onlyglossary.md + projects/{name}.md
NicknameIn Key People if top 30glossary.md (all nicknames)
Company contextQuick reference onlycontext/company.md
PreferencesAll preferences-
Historical/stale✗ Remove✓ Keep in memory/
类型CLAUDE.md(热缓存)memory/(完整存储)
人员约30个最常联系的人glossary.md + people/{name}.md
缩写/术语约30个最常用的glossary.md(完整列表)
项目仅活跃项目glossary.md + projects/{name}.md
昵称如果是前30个关键人员则包含glossary.md(所有昵称)
公司上下文仅快速参考context/company.md
偏好设置所有偏好-
历史/过时内容✗ 删除✓ 保留在memory/

Promotion / Demotion

升级/降级

Promote to CLAUDE.md when:
  • You use a term/person frequently
  • It's part of active work
Demote to memory/ only when:
  • Project completed
  • Person no longer frequent contact
  • Term rarely used
This keeps CLAUDE.md fresh and relevant.
升级到CLAUDE.md的情况:
  • 你频繁使用某个术语/联系某人
  • 属于当前活跃工作内容
降级到仅memory/的情况:
  • 项目已完成
  • 不再频繁联系某人
  • 术语很少使用
这样能让CLAUDE.md保持新鲜且相关。