Loading...
Loading...
Compare original and translation side by side
DECISION: "remember we're using PostgreSQL"
BLOCKER: "remember I can't access the API yet"
CONTEXT: "remember this is for BOOSTBOX project"
PREFERENCE: "remember I prefer functional components"
PROCEDURE: "remember how to deploy: npm run build then rsync"
NOTE: "remember to update docs after this feature"undefinedDECISION: "记住我们使用PostgreSQL"
BLOCKER: "记住我还无法访问API"
CONTEXT: "记住这是BOOSTBOX项目的内容"
PREFERENCE: "记住我偏好函数式组件"
PROCEDURE: "记住部署步骤:先运行npm run build再执行rsync"
NOTE: "记住完成这个功能后更新文档"undefined
**Step 4**: Add to index
```json
{
"version": "1.0.0",
"created": "2025-10-17T17:45:00Z",
"last_updated": "{current_timestamp}",
"total_memories": N + 1,
"memories_by_type": {
"DECISION": X + 1,
...
},
"memories": [
{
"id": "{uuid}",
"type": "DECISION",
"content": "Using PostgreSQL as primary database",
"timestamp": "{current_timestamp}",
"tags": ["database", "postgresql", "backend"],
"project": "boostbox",
"context": {
"file": "{current_file_if_relevant}",
"conversation_id": "{if_available}"
}
},
...existing memories
],
"tags_index": {
"database": ["{uuid1}", "{uuid2}"],
"postgresql": ["{uuid}"]
},
"project_index": {
"boostbox": ["{uuid1}", "{uuid2}"],
"toolhub": ["{uuid3}"]
}
}undefined
**步骤4**:添加到索引
```json
{
"version": "1.0.0",
"created": "2025-10-17T17:45:00Z",
"last_updated": "{current_timestamp}",
"total_memories": N + 1,
"memories_by_type": {
"DECISION": X + 1,
...
},
"memories": [
{
"id": "{uuid}",
"type": "DECISION",
"content": "Using PostgreSQL as primary database",
"timestamp": "{current_timestamp}",
"tags": ["database", "postgresql", "backend"],
"project": "boostbox",
"context": {
"file": "{current_file_if_relevant}",
"conversation_id": "{if_available}"
}
},
...existing memories
],
"tags_index": {
"database": ["{uuid1}", "{uuid2}"],
"postgresql": ["{uuid}"]
},
"project_index": {
"boostbox": ["{uuid1}", "{uuid2}"],
"toolhub": ["{uuid3}"]
}
}undefined
```markdown
```markdown
**Step 6**: Confirm to userundefined
**步骤6**:向用户确认undefined// Priority order:
1. Exact tag match in requested project
2. Exact tag match in any project
3. Partial content match in requested project
4. Partial content match in any project
// Sort by:
1. Relevance (exact match > partial)
2. Recency (newer > older)
3. Type priority (BLOCKER > DECISION > others)undefined// 优先级顺序:
1. 指定项目中的精确标签匹配
2. 任意项目中的精确标签匹配
3. 指定项目中的部分内容匹配
4. 任意项目中的部分内容匹配
// 排序规则:
1. 相关性(精确匹配 > 部分匹配)
2. 时间远近(最新 > 较旧)
3. 类型优先级(BLOCKER > DECISION > 其他类型)undefined
**Step 4**: Present resultsundefined
**步骤4**:展示结果undefined🚧 Detected blocker: API credentials not available
Saving as BLOCKER for tracking.
When this is resolved, say "blocker resolved: [brief description]"User: "blocker resolved: got API credentials"
✅ Blocker resolved: API credentials not available
📝 Updated memory with resolution timestamp
⏱️ Blocked for: 2 days 4 hours🚧 检测到障碍:API凭证不可用
将保存为BLOCKER进行追踪。
问题解决后,请说“障碍已解决:[简要描述]”用户: "障碍已解决:获取到API凭证"
✅ 障碍已解决:API凭证不可用
📝 已更新记忆并添加解决时间戳
⏱️ 持续阻塞时长:2天4小时Basic: "search [topic]"
Type filter: "search decisions about [topic]"
Project filter: "search boostbox [topic]"
Time filter: "search [topic] this week|month|today"
Combined: "search boostbox decisions about database this week"基础搜索: "search [主题]"
类型筛选: "search decisions about [主题]"
项目筛选: "search boostbox [主题]"
时间筛选: "search [主题] this week|month|today"
组合筛选: "search boostbox decisions about database this week"undefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedfunction relativeTime(timestamp) {
const now = Date.now();
const then = new Date(timestamp).getTime();
const diff = now - then;
const minutes = Math.floor(diff / 60000);
const hours = Math.floor(diff / 3600000);
const days = Math.floor(diff / 86400000);
if (minutes < 60) return `${minutes} minutes ago`;
if (hours < 24) return `${hours} hours ago`;
if (days < 7) return `${days} days ago`;
if (days < 30) return `${Math.floor(days/7)} weeks ago`;
return `${Math.floor(days/30)} months ago`;
}function relativeTime(timestamp) {
const now = Date.now();
const then = new Date(timestamp).getTime();
const diff = now - then;
const minutes = Math.floor(diff / 60000);
const hours = Math.floor(diff / 3600000);
const days = Math.floor(diff / 86400000);
if (minutes < 60) return `${minutes} minutes ago`;
if (hours < 24) return `${hours} hours ago`;
if (days < 7) return `${days} days ago`;
if (days < 30) return `${Math.floor(days/7)} weeks ago`;
return `${Math.floor(days/30)} months ago`;
}~/.claude-memories/index.json%USERPROFILE%\.claude-memories\index.json{
"version": "1.0.0",
"created": "ISO8601",
"last_updated": "ISO8601",
"total_memories": 0,
"memories_by_type": {
"DECISION": 0,
"BLOCKER": 0,
"CONTEXT": 0,
"PREFERENCE": 0,
"PROCEDURE": 0,
"NOTE": 0
},
"memories": [
{
"id": "uuid",
"type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE|NOTE",
"content": "brief summary",
"timestamp": "ISO8601",
"tags": ["tag1", "tag2"],
"project": "project-name",
"status": "active|resolved|archived",
"context": {
"file": "optional-file-path",
"line": "optional-line-number"
}
}
],
"tags_index": {
"tag-name": ["uuid1", "uuid2"]
},
"project_index": {
"project-name": ["uuid1", "uuid2"]
},
"session_index": {
"session-id": ["uuid1", "uuid2"]
}
}~/.claude-memories/index.json%USERPROFILE%\.claude-memories\index.json{
"version": "1.0.0",
"created": "ISO8601",
"last_updated": "ISO8601",
"total_memories": 0,
"memories_by_type": {
"DECISION": 0,
"BLOCKER": 0,
"CONTEXT": 0,
"PREFERENCE": 0,
"PROCEDURE": 0,
"NOTE": 0
},
"memories": [
{
"id": "uuid",
"type": "DECISION|BLOCKER|CONTEXT|PREFERENCE|PROCEDURE|NOTE",
"content": "brief summary",
"timestamp": "ISO8601",
"tags": ["tag1", "tag2"],
"project": "project-name",
"status": "active|resolved|archived",
"context": {
"file": "optional-file-path",
"line": "optional-line-number"
}
}
],
"tags_index": {
"tag-name": ["uuid1", "uuid2"]
},
"project_index": {
"project-name": ["uuid1", "uuid2"]
},
"session_index": {
"session-id": ["uuid1", "uuid2"]
}
}~/.claude-memories/ (Linux/macOS) or %USERPROFILE%\.claude-memories\ (Windows)
├── index.json # Master index
├── decisions/ # Architecture decisions
│ ├── {uuid1}.md
│ └── {uuid2}.md
├── blockers/ # Active/resolved blockers
│ ├── {uuid3}.md
│ └── {uuid4}.md
├── context/ # Project context
│ ├── {uuid5}.md
│ └── {uuid6}.md
├── preferences/ # User preferences
│ ├── {uuid7}.md
│ └── {uuid8}.md
├── procedures/ # How-to procedures
│ ├── {uuid9}.md
│ └── {uuid10}.md
├── notes/ # General notes
│ ├── {uuid11}.md
│ └── {uuid12}.md
├── sessions/ # Session summaries
│ ├── 2025-10-17.md
│ └── 2025-10-16.md
└── backups/ # Daily backups
├── index-2025-10-17.json
└── index-2025-10-16.json~/.claude-memories/ (Linux/macOS) 或 %USERPROFILE%\.claude-memories\ (Windows)
├── index.json # 主索引
├── decisions/ # 架构决策
│ ├── {uuid1}.md
│ └── {uuid2}.md
├── blockers/ # 活跃/已解决的障碍
│ ├── {uuid3}.md
│ └── {uuid4}.md
├── context/ # 项目上下文
│ ├── {uuid5}.md
│ └── {uuid6}.md
├── preferences/ # 用户偏好
│ ├── {uuid7}.md
│ └── {uuid8}.md
├── procedures/ # 操作流程
│ ├── {uuid9}.md
│ └── {uuid10}.md
├── notes/ # 通用笔记
│ ├── {uuid11}.md
│ └── {uuid12}.md
├── sessions/ # 会话摘要
│ ├── 2025-10-17.md
│ └── 2025-10-16.md
└── backups/ # 每日备份
├── index-2025-10-17.json
└── index-2025-10-16.jsonUser: "Let's use React for the frontend"
→ Auto-save as DECISION: Using React for frontendUser: "Can't connect to the API"
→ Auto-save as BLOCKER: API connection failingUser: "I prefer TypeScript over JavaScript"
→ Auto-save as PREFERENCE: Prefer TypeScriptUser: "To deploy: run npm build then copy to server"
→ Auto-save as PROCEDURE: Deployment process💾 Saved as DECISION: Using React for frontend
(say "undo" within 30 seconds to cancel)用户: "我们前端用React吧"
→ 自动保存为DECISION: 前端使用React用户: "无法连接到API"
→ 自动保存为BLOCKER: API连接失败用户: "我偏好TypeScript而非JavaScript"
→ 自动保存为PREFERENCE: 偏好TypeScript用户: "部署步骤:先运行npm build再复制到服务器"
→ 自动保存为PROCEDURE: 部署流程💾 已保存为DECISION: 前端使用React
(30秒内说“撤销”可取消保存)undefinedundefined
**Corruption recovery**:
```bash
**损坏恢复**:
```bashundefinedundefined| User Says | Action |
|---|---|
| "remember we're using PostgreSQL" | Save as DECISION |
| "what did we decide about the database" | Search DECISIONs for "database" |
| "show all blockers" | List active BLOCKERs |
| "any blockers?" | Quick blocker check |
| "remember I prefer functional components" | Save as PREFERENCE |
| "search memories for authentication" | Full-text search |
| "blocker resolved: got API key" | Mark blocker as resolved |
| 用户指令 | 操作 |
|---|---|
| "记住我们使用PostgreSQL" | 保存为DECISION |
| "我们关于数据库的决策是什么" | 搜索与“database”相关的DECISION |
| "显示所有障碍" | 列出活跃的BLOCKER |
| "有障碍吗?" | 快速检查障碍 |
| "记住我偏好函数式组件" | 保存为PREFERENCE |
| "搜索记忆中的认证相关内容" | 全文搜索 |
| "障碍已解决:获取到API密钥" | 将障碍标记为已解决 |
~/.claude-memories/index.json%USERPROFILE%\.claude-memories\index.json~/.claude-memories/decisions/{uuid}.md%USERPROFILE%\.claude-memories\decisions\{uuid}.md~/.claude-memories/blockers/{uuid}.md%USERPROFILE%\.claude-memories\blockers\{uuid}.md~/.claude-memories/backups/%USERPROFILE%\.claude-memories\backups\~/.claude-memories/index.json%USERPROFILE%\.claude-memories\index.json~/.claude-memories/decisions/{uuid}.md%USERPROFILE%\.claude-memories\decisions\{uuid}.md~/.claude-memories/blockers/{uuid}.md%USERPROFILE%\.claude-memories\blockers\{uuid}.md~/.claude-memories/backups/%USERPROFILE%\.claude-memories\backups\