Anthropic发布Claude记忆管理文及清理提示词
Anthropic just published an engineering post on how Claude slims down and correc…
不仅分享了 Anthropic 的技术文章,还直接给出了可复用的 Claude Code 清理提示词,结构清晰且具备实操价值。
Anthropic just published an engineering post on how Claude slims down and corrects its own memory. You can ask Claude Code to use it to review your project's auto memory top to bottom and clean it out.
Anthropic 刚刚发布了一篇工程博客,介绍 Claude 如何精简并修正自身的记忆。你可以让 Claude Code 用它来从头到尾审查项目的自动记忆,并进行清理。
Sonnet 3.7 played Pokémon and wrote everything down to memory. It piled up 𝟰𝟭𝟯 𝗳𝗶𝗹𝗲𝘀 and earned just 1 badge. Fable 5 wrote 𝗼𝗻𝗹𝘆 𝟭𝟬 𝗳𝗶𝗹𝗲𝘀 and earned 4. That's an example from the article.
Sonnet 3.7 玩了宝可梦并把一切记录到记忆中。它生成了 𝟰𝟭𝟯 个文件,仅获得 1 枚徽章。Fable 5 只写了 𝟭𝟬 个文件,却获得了 4 枚。这是文章中的一个例子。
Claude Code's auto memory is on by default. The longer you use it on a project, 𝘁𝗵𝗲 𝗱𝘂𝗺𝗯𝗲𝗿 𝗶𝘁 𝗳𝗲𝗲𝗹𝘀. That's because its memory is full of notes that were wrong or went stale when the code changed. It trusts that junk every time before it writes code.
Claude Code 的自动记忆默认开启。你在项目上使用时间越长,它就越显得笨拙。这是因为它的记忆里充满了错误或随着代码变更而过时的笔记。它在每次写代码前都会盲目信任这些垃圾信息。
Send this prompt and the link below to Claude Code 👇
将以下提示词和链接发送给 Claude Code 👇
"Read this article, then review this project's auto memory (MEMORY.md and the other files in the memory folder) against the current code and git history. Pick out anything you can read straight from the code, outdated notes that no longer match the code, guesses that were never verified, play-by-play logs with no conclusion, and entries that repeat or contradict each other.
"阅读这篇文章,然后根据当前代码和 git 历史记录,审查该项目的自动记忆(MEMORY.md 以及记忆文件夹中的其他文件)。找出那些可以直接从代码中读取的内容、不再与代码匹配的过时笔记、从未验证过的猜测、没有结论的逐字日志,以及相互重复或矛盾的记录。"
For each one, quote the original, explain how keeping it would mislead you, and suggest the smallest change. List any memories to delete and any changes involving safety or permissions separately for me to decide. Just show me the recommendations. Don't change any files yet."
对于每一条,请引用原文,解释保留它会如何误导你,并提出最小的修改建议。列出任何需要删除的记忆,并将涉及安全或权限的更改单独列出,由我来决定。只需向我展示建议即可。暂时不要更改任何文件。"
https://www.anthropic.com/research/components-of-agent-memory
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力