distill-memory
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDistill Memory
提炼记忆
Capture breakthrough moments and valuable insights as searchable memories in your knowledge base.
将突破时刻和高价值洞见捕捉为知识库中可搜索的记忆。
When to Suggest
何时建议提炼
Breakthrough moments:
- Extended debugging finally resolves
- User relief signals ("Finally!", "Aha!", "That was it!")
- Root cause discovered after investigation
Important decisions:
- Compared multiple options
- Chose with clear rationale
- Trade-off resolved with reasoning
Research conclusions:
- Investigated multiple approaches
- Reached definitive conclusion
- Optimal path determined
Unexpected discoveries:
- Counterintuitive solution found
- Assumption challenged and corrected
- Surprising cause-effect relationship
Lessons learned:
- "Next time do X instead"
- Preventive measure identified
- Pattern recognized for future use
Skip these (not worth preserving):
- Routine fixes
- Work in progress
- Simple Q&A
- Generic information
突破时刻:
- 长时间调试后终于解决问题
- 用户发出如“终于搞定了!”“啊哈!原来如此!”“就是这个!”的释然信号
- 经调查后找到问题根源
重要决策:
- 对比过多种方案
- 基于清晰理由做出选择
- 通过推理解决了权衡取舍问题
研究结论:
- 调研过多种实现路径
- 得出明确结论
- 确定了最优方案
意外发现:
- 找到违反直觉的解决方案
- 原有假设被推翻并修正
- 发现了令人惊讶的因果关系
经验教训:
- “下次应该选择X方案”
- 识别出预防措施
- 总结出可复用的模式
以下情况无需留存:
- 常规修复操作
- 进行中的工作
- 简单问答内容
- 通用信息
Prerequisites
前置条件
nmem CLI - Choose one option:
Option 1: uvx (Recommended)
bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uvx --from nmem-cli nmem --versionOption 2: pip
bash
pip install nmem-cli
nmem --versionEnsure Nowledge Mem server is running at
http://localhost:14242nmem CLI - 选择以下任一方式安装:
选项1:uvx(推荐)
bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uvx --from nmem-cli nmem --version选项2:pip
bash
pip install nmem-cli
nmem --version确保Nowledge Mem服务器在运行
http://localhost:14242Usage
使用方法
Use to create memories:
nmem m addbash
nmem m add "Insight content with context for future use" \
-t "Searchable title (50-60 chars)" \
-i 0.8使用命令创建记忆:
nmem m addbash
nmem m add "Insight content with context for future use" \
-t "Searchable title (50-60 chars)" \
-i 0.8Memory Quality Guidelines
记忆质量准则
Good memories (atomic + actionable):
- "React hooks cleanup must return function. Missing return caused memory leaks in event listeners."
- "PostgreSQL over MongoDB: ACID compliance needed for financial transactions."
- "Docker build cache invalidation: COPY package*.json before source files."
Poor memories (avoid):
- Vague: "Fixed bugs in the code"
- Too long: Full conversation transcripts
- No context: "Use useState"
优质记忆(原子化+可操作):
- "React hooks cleanup must return function. Missing return caused memory leaks in event listeners."
- "PostgreSQL over MongoDB: ACID compliance needed for financial transactions."
- "Docker build cache invalidation: COPY package*.json before source files."
劣质记忆(需避免):
- 模糊表述:“修复了代码中的bug”
- 内容过长:完整的对话记录
- 缺乏上下文:“使用useState”
Content Guidelines
内容准则
- Focus on outcome/insight, not process
- Include "why" not just "what"
- Add enough context for future understanding
- Be specific and actionable
- 聚焦结果/洞见,而非过程
- 不仅说明“是什么”,还要解释“为什么”
- 添加足够上下文以便未来理解
- 内容具体且具备可操作性
Importance Scores
重要性评分
| Score | Use for |
|---|---|
| 0.8-1.0 | Major breakthroughs, critical decisions |
| 0.5-0.7 | Useful patterns, good practices |
| 0.3-0.4 | Minor tips, nice-to-know |
| 评分 | 适用场景 |
|---|---|
| 0.8-1.0 | 重大突破、关键决策 |
| 0.5-0.7 | 实用模式、最佳实践 |
| 0.3-0.4 | 小技巧、拓展知识 |
Options
可选参数
| Flag | Description | Example |
|---|---|---|
| Searchable title | |
| Score 0.0-1.0 | |
| JSON response | |
| 参数 | 描述 | 示例 |
|---|---|---|
| 可搜索的标题 | |
| 评分(0.0-1.0) | |
| 返回JSON格式响应 | |
Suggestion Approach
建议时机与方式
Timing: After resolution/decision, when user pauses
Pattern: "This [type] seems valuable - [essence]. Distill into memory?"
Frequency: 1-3 per session typical. Quality over quantity.
时机: 问题解决/决策做出后,用户暂停工作时
表述模式: “这一[类型]内容很有价值——[核心要点]。是否将其提炼为记忆?”
频率: 每次会话建议1-3次即可,重质不重量
Examples
示例
bash
undefinedbash
undefinedHigh-value debugging insight
High-value debugging insight
nmem m add "React hooks cleanup must return function. Missing return caused memory leaks in event listeners when component unmounted."
-t "React Hooks Cleanup Pattern"
-i 0.9
-t "React Hooks Cleanup Pattern"
-i 0.9
nmem m add "React hooks cleanup must return function. Missing return caused memory leaks in event listeners when component unmounted."
-t "React Hooks Cleanup Pattern"
-i 0.9
-t "React Hooks Cleanup Pattern"
-i 0.9
Architecture decision
Architecture decision
nmem m add "Chose PostgreSQL over MongoDB: needed ACID compliance for financial transactions and complex JOIN queries for reporting."
-t "Database Choice: PostgreSQL for ACID"
-i 0.9
-t "Database Choice: PostgreSQL for ACID"
-i 0.9
nmem m add "Chose PostgreSQL over MongoDB: needed ACID compliance for financial transactions and complex JOIN queries for reporting."
-t "Database Choice: PostgreSQL for ACID"
-i 0.9
-t "Database Choice: PostgreSQL for ACID"
-i 0.9
Development workflow tip
Development workflow tip
nmem m add "Docker build cache: COPY package*.json and run npm install BEFORE copying source files. Saves rebuild time on code changes."
-t "Docker Build Cache Optimization"
-i 0.7
-t "Docker Build Cache Optimization"
-i 0.7
nmem m add "Docker build cache: COPY package*.json and run npm install BEFORE copying source files. Saves rebuild time on code changes."
-t "Docker Build Cache Optimization"
-i 0.7
-t "Docker Build Cache Optimization"
-i 0.7
Debugging lesson
Debugging lesson
nmem m add "CORS preflight fails silently in fetch. Check Network tab for OPTIONS request, not just the main request."
-t "CORS Debugging: Check OPTIONS Request"
-i 0.8
-t "CORS Debugging: Check OPTIONS Request"
-i 0.8
undefinednmem m add "CORS preflight fails silently in fetch. Check Network tab for OPTIONS request, not just the main request."
-t "CORS Debugging: Check OPTIONS Request"
-i 0.8
-t "CORS Debugging: Check OPTIONS Request"
-i 0.8
undefined