원클릭으로
memory-checkpoint
Externalize detailed memory to Memory Bank before conversation summarization to prevent context loss. Triggers: CP, checkpoint, save, 存檔, 記一下, 保存, sync memory, dump, 先記著.
메뉴
Externalize detailed memory to Memory Bank before conversation summarization to prevent context loss. Triggers: CP, checkpoint, save, 存檔, 記一下, 保存, sync memory, dump, 先記著.
Use when brainstorming ideas, stuck on a problem, exploring alternatives, or needing creative input - provides structured creativity methods (SCAMPER, Six Hats, Mind Map), Multi-Agent parallel thinking, and concept collision for unexpected sparks. Don't use for mechanical execution tasks
Auto-update CHANGELOG.md following Keep a Changelog format. Triggers: CL, changelog, 變更, 版本, version, 更新日誌, whatsnew.
Proactively detect and execute code refactoring to maintain DDD architecture and code quality. Triggers: RF, refactor, 重構, 拆分, split, 模組化, modularize, 太長, cleanup.
Comprehensive code review checking quality, security, and best practices. Triggers: CR, review, 審查, 檢查, check, 看一下, PR, code review, 品質.
Ensure code follows DDD architecture and DAL separation principles. Triggers: DDD, arch, 架構, 新功能, 新模組, new feature, scaffold, 骨架, domain.
Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.
| name | memory-checkpoint |
| description | Externalize detailed memory to Memory Bank before conversation summarization to prevent context loss. Triggers: CP, checkpoint, save, 存檔, 記一下, 保存, sync memory, dump, 先記著. |
在對話被 Summarize 壓縮前,主動將詳細記憶外部化到 Memory Bank,避免重要上下文遺失。
當對話過長時,系統會自動 Summarize(摘要)對話歷史,可能導致:
解決方案:在被 Summarize 前,主動將關鍵記憶寫入 memory-bank/ 目錄。
## 當前工作焦點
<!-- 當前正在做什麼 -->
## 進行中的變更
<!-- 具體的檔案和修改 -->
## 待處理事項
<!-- 下一步要做什麼 -->
## 關鍵決策
<!-- 本次對話做的重要決定 -->
## 相關檔案
<!-- 涉及的檔案路徑列表 -->
## Done (已完成)
- [x] 具體完成的事項(含檔案路徑)
## Doing (進行中)
- [ ] 正在進行的工作
## Next (下一步)
- [ ] 計劃要做的事項
## YYYY-MM-DD
### 決策:[決策標題]
- **背景**:為什麼需要這個決定
- **選項**:考慮過的方案
- **決定**:最終選擇
- **原因**:選擇的理由
## 架構變更記錄
### YYYY-MM-DD: [變更標題]
- **變更內容**:
- **影響範圍**:
- **相關檔案**:
當偵測到以下情況,AI 應主動執行 Checkpoint:
對話長度指標
工作階段轉換
明確指標
使用者可隨時說:
更新 activeContext.md:
# Active Context
> Last checkpoint: 2024-XX-XX HH:MM
## 🎯 當前焦點
[一句話描述當前在做什麼]
## 📝 本次對話摘要
1. [做了什麼 1]
2. [做了什麼 2]
3. [做了什麼 3]
## 📁 變更的檔案
- `path/to/file1.py` - [變更摘要]
- `path/to/file2.ts` - [變更摘要]
## ⚠️ 待解決
- [ ] 問題 1
- [ ] 問題 2
## 💡 重要決定
- 決定 A:[原因]
- 決定 B:[原因]
## 🔜 下一步
1. [下一步 1]
2. [下一步 2]
更新所有相關 Memory Bank 檔案:
memory-bank/
├── activeContext.md ← 當前焦點 + 變更檔案
├── progress.md ← Done/Doing/Next
├── decisionLog.md ← 新決策(如有)
├── architect.md ← 架構變更(如有)
├── productContext.md ← 技術棧變更(如有)
└── systemPatterns.md ← 新模式/慣例(如有)
git commit 前 → 觸發 memory-checkpoint → 同步 Memory Bank → commit
memory-checkpoint = 批次更新
memory-updater = 增量更新
User: checkpoint
AI: 📸 執行記憶檢查點...
已更新 Memory Bank:
- ✅ activeContext.md - 記錄當前焦點與 5 個變更檔案
- ✅ progress.md - 新增 3 個已完成項目
- ✅ decisionLog.md - 記錄 2 個決策
下次對話可從此處繼續,即使被 Summarize 也不會遺失關鍵資訊。
AI: 💡 偵測到對話較長且有多項進展,建議執行記憶檢查點。
是否要我同步 Memory Bank?
User: 好
AI: 📸 執行記憶檢查點...
[更新 Memory Bank]
在 .vscode/settings.json 中可配置:
{
"claude.skills.memoryCheckpoint": {
"autoTrigger": true,
"triggerThreshold": {
"conversationTurns": 10,
"filesModified": 5
},
"includeFiles": [
"activeContext.md",
"progress.md",
"decisionLog.md"
]
}
}
好的 Checkpoint 應包含:
| 項目 | 必須 | 說明 |
|---|---|---|
| 當前焦點 | ✅ | 一句話描述正在做什麼 |
| 變更檔案列表 | ✅ | 完整路徑 + 簡述 |
| 待解決事項 | ✅ | 還沒完成的工作 |
| 重要決策 | ⚪ | 如有新決策 |
| 下一步 | ✅ | 接下來要做什麼 |
| 時間戳記 | ✅ | 知道這是什麼時候的狀態 |
在 CLAUDE.md 或 AGENTS.md 中加入:
## Memory Checkpoint 規則
1. **主動觸發時機**
- 對話超過 10 輪時,主動建議 checkpoint
- 完成重大功能後,主動執行 checkpoint
- 使用者說要離開時,主動執行 checkpoint
2. **Checkpoint 內容**
- 必須包含:具體檔案路徑、變更摘要、下一步
- 避免:過於籠統的描述、遺漏重要細節
3. **格式要求**
- 使用時間戳記
- 檔案路徑使用相對路徑
- 保持簡潔但完整