← ClaudeAtlas

memorylisted

跨会话记忆管理:保存进度 + 提取经验
chengxuniucode/ForgeTeam · ★ 0 · AI & Automation · score 72
Install: claude install-skill chengxuniucode/ForgeTeam
# Memory Skill ## 目标 统一管理跨会话记忆:保存当前进度(以便下次恢复)+ 提取可复用经验(让框架越用越聪明)。 ## 触发时机 1. **会话结束** — 保存进度快照 2. **ship 之后** — 提取本次交付的经验 3. **debug 解决新问题后** — 记录错误模式和解法 4. **用户手动** — `/memory` ## Part 1: 进度保存(原 checkpoint) 长期记忆只保留可复用信号。每条决策、已知问题或偏好应附任务 ID、可复查证据(文件或命令)、置信度和最后验证时间;低价值或过期记录归档而不反复注入上下文。 ### 收集当前状态 ```yaml snapshot: timestamp: "{ISO datetime}" active_spec: "{slug or null}" route_level: "{micro|standard|full}" current_phase: "{propose|plan|execute|review|verify|ship}" progress: total_tasks: N completed_tasks: M current_task: "{task description}" context: last_action: "{what was just done}" next_action: "{what should happen next}" blockers: ["{any blocking issues}"] files_modified: ["{file paths}"] uncommitted_changes: true|false ``` ### 写入 state.md ```markdown # Current State ## 快照 - 时间: {timestamp} - Spec: {slug} - 路由: {route_level} - 阶段: {phase} - 进度: {M}/{N} tasks - 当前: {current task} ## 上下文 - 上一步: {last_action} - 下一步: {next_action} - 阻塞: {blockers or "无"} ## 恢复指令 1. 读取本文件了解上下文 2. 读取 specs/active/{slug}/tasks.md 了解完整任务 3. 从 Task {N} 继续执行 ``` ### 可选 WIP Commit 如果有未提交的变更且已通过编译: ```bash git add -A git commit -m "wip: checkpoint - {current task description}" ``` ## Part 2: 经验提取(原 learn) ### 学习来源 1. **决策学习** — 非显而易见的技术决策 → `decisions.md` 2. **问题学习** — debug 解决的新问题 → `known-issues.md` 3. **偏好学习** — 用户表达的��格偏好 → `preferences.md` ### 写入格式 **decisions.md 追加**: ```markdown --- ## {date}: {决策标题} **背景**: {context} **选项**: {alte