Skip to content
Development
Command

/memory

项目记忆管理,维护 memory-bank(持久化,另见 /cc-best:context 管理会话上下文)

From plugin
4944 skills8 agents44 commands20 hooks
shell
$ npx -y skills add xiaobei930/cc-best --agent claude-code

Ships with cc-best. Installing the plugin gets this command.

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/memory

Context preview

What this command does when you run it.

项目记忆管理,维护 memory-bank(持久化,另见 /cc-best:context 管理会话上下文)

Command definition

memory.md
description: 项目记忆管理,维护 memory-bank(持久化,另见 /cc-best:context 管理会话上下文)
argument-hint: "[load|status|sync]"
allowed-tools: Read, Write, Edit, Glob, Grep

/memory - 项目记忆管理

管理项目上下文和长期记忆,确保连续性。

记忆层次

1. 即时记忆(当前会话)

  • 当前任务上下文
  • 最近的代码变更
  • 未解决的问题

2. 短期记忆(memory-bank/progress.md)

  • 今日完成的工作
  • 当前阶段状态
  • 待办事项

3. 长期记忆(memory-bank/\*.md)

  • 架构设计决策
  • 技术选型理由
  • 历史问题和解决方案

记忆更新规则

必须更新的时机

1. **完成一个 Phase** → 更新 progress.md + architecture.md 2. **做出重要决策** → 记录到相关文档 3. **遇到并解决问题** → 添加到问题记录 4. **发现可复用模式** → 记录到规范文档

更新格式

### [日期] [时间]

**操作**: [做了什么]
**结果**: [产出/状态]
**决策**: [为什么这样做](可选)
**下一步**: [接下来做什么]

上下文恢复

新会话开始时

1. 读取 `memory-bank/progress.md` - 了解当前状态和最近进展 2. 读取当前阶段相关文档 3. 确认下一步任务

恢复命令

  • `/cc-best:memory load` - 加载项目上下文
  • `/cc-best:memory status` - 显示当前记忆状态
  • `/cc-best:memory sync` - 同步所有记忆文件

关键文件索引

| 文件 | 用途 | 更新频率 | | ----------------------------- | -------------- | ---------- | | `memory-bank/progress.md` | 当前状态和进度 | 每个任务 | | `memory-bank/architecture.md` | 架构设计 | 架构变更时 | | `memory-bank/tech-stack.md` | 技术选型 | 技术变更时 |

记忆容量管理

避免信息过载

  • progress.md 只保留最近 7 天的详细记录
  • 历史记录归档到 `docs/history/`
  • 保持每个文件 < 500 行

信息压缩

  • 完成的任务只保留摘要
  • 相似问题合并记录
  • 定期清理过时信息

渐进式加载(大项目推荐)

当 memory-bank 文件 > 5 个或总量 > 30KB 时:

1. 先 `ls memory-bank/` 查看文件列表和大小 2. 用 `head -20 <file>` 预览相关文件 3. 只完整加载确实需要的文件

> 小项目(3-5 个文件,~20KB)直接全量加载即可,不必强求渐进式。

> **记住**: Memory Bank 是跨会话的桥梁,每次会话结束前更新 progress.md,下次启动就能无缝继续。

Read more
Read it on GitHub ↗
Ships withcc-best

Role-Driven Development Workflow for Claude Code Transform Claude into a complete development team. From product requirements to code review — one plugin, full workflow. Quick Start • Features • Workflow • Commands • FAQ

Get the whole plugin, auto-invoked
Stats
49
Stars
0
Views
3
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
1mo ago
Last commit
6mo ago
Created

Repo: xiaobei930/cc-best