Loading...
Loading...
Compare original and translation side by side
nmem_stats → total memories, type distribution, age distribution
nmem_health → activation efficiency, recall confidence, connectivity
nmem_habits(action="list") → learned workflow patterns| Category | Criteria | Action |
|---|---|---|
| Hot | Recalled 5+ times in last 7 days | Protect, possibly promote to higher priority |
| Warm | Recalled 1-4 times in last 30 days | Healthy, no action needed |
| Cold | Not recalled in 30-90 days | Review for relevance |
| Dead | Not recalled since creation, >90 days old | Candidate for pruning |
| Zombie | Recalled but always with low confidence (<0.3) | Candidate for rewrite or enrichment |
nmem_stats → 总记忆数、类型分布、时长分布
nmem_health → 激活效率、召回置信度、连通性
nmem_habits(action="list") → 已习得的工作流模式| 类别 | 判定标准 | 操作 |
|---|---|---|
| 热门 | 过去7天被召回5次以上 | 保护,可能提升至更高优先级 |
| 温性 | 过去30天被召回1-4次 | 状态健康,无需操作 |
| 闲置 | 过去30-90天未被召回 | 检查相关性 |
| 失效 | 创建后从未被召回,且已超过90天 | 可考虑修剪 |
| 僵尸 | 被召回但置信度始终低于0.3 | 可考虑重写或增强 |
For each of the top 5 tags in the brain:
1. nmem_recall("What do we know about {tag}?", depth=2)
2. Record: confidence, neurons_activated, context quality
3. Note: Was the answer useful? Complete? Contradictory?Topic Recall Quality:
"postgresql" — confidence: 0.85, complete: yes, useful: yes
"auth" — confidence: 0.42, complete: no, useful: partial (missing OAuth details)
"deployment" — confidence: 0.71, complete: yes, useful: yes
"api-design" — confidence: 0.31, complete: no, useful: no (too vague)
"testing" — confidence: 0.00, complete: no, useful: no (zero memories)针对大脑中的前5个标签:
1. nmem_recall("我们对{tag}了解多少?", depth=2)
2. 记录:置信度、激活的神经元数量、上下文质量
3. 标注:答案是否有用?完整?是否存在矛盾?主题召回质量:
"postgresql" — 置信度: 0.85, 完整: 是, 有用: 是
"auth" — 置信度: 0.42, 完整: 否, 有用: 部分(缺少OAuth细节)
"deployment" — 置信度: 0.71, 完整: 是, 有用: 是
"api-design" — 置信度: 0.31, 完整: 否, 有用: 否(过于模糊)
"testing" — 置信度: 0.00, 完整: 否, 有用: 否(无相关记忆)| Pattern | Signal | Root Cause |
|---|---|---|
| Fragmented topic | Many weak memories, none complete | Needs consolidation into fewer, richer memories |
| Missing reasoning | Decisions recalled without "why" | Needs enrichment (add reasoning post-hoc) |
| Stale chain | Causal chain leads to outdated conclusion | Needs update or deprecation marker |
| Tag sprawl | Same concept under 3+ different tags | Needs tag normalization |
| Confidence cliff | Some topics 0.8+, others <0.3 | Uneven knowledge capture |
| Recall dead-ends | Queries return empty or irrelevant | Missing memories for important topics |
| 模式 | 信号 | 根本原因 |
|---|---|---|
| 碎片化主题 | 大量弱记忆,没有完整的记忆 | 需要合并为更少、更丰富的记忆 |
| 缺失推理过程 | 召回了决策但没有“原因” | 需要增强(事后添加推理过程) |
| 过时链 | 因果链指向过时的结论 | 需要更新或添加弃用标记 |
| 标签泛滥 | 同一概念对应3个以上不同标签 | 需要标签规范化 |
| 置信度断崖 | 部分主题置信度0.8+,其他<0.3 | 知识捕获不均衡 |
| 召回死胡同 | 查询返回空或无关内容 | 重要主题缺少相关记忆 |
nmem_conflictsnmem_conflictsImpact = Frequency × Severity × Fixability
Frequency: How often this topic is queried (1-5)
Severity: How bad the current recall is (1-5)
Fixability: How easy it is to fix (1-5, where 5 = easiest)影响度 = 频率 × 严重程度 × 可修复性
频率: 该主题被查询的频率(1-5)
严重程度: 当前召回效果的糟糕程度(1-5)
可修复性: 修复的难易程度(1-5,5=最容易)Found 5 memories about "PostgreSQL configuration":
1. "PostgreSQL uses port 5432" (fact, priority 3)
2. "Set max_connections=100" (fact, priority 4)
3. "Enable pg_stat_statements" (instruction, priority 5)
4. "PostgreSQL config in /etc/postgresql/16/main/" (fact, priority 3)
5. "Always use connection pooling with PgBouncer" (instruction, priority 6)
Proposed consolidation:
→ Merge 1,2,4 into: "PostgreSQL 16 config: port 5432, max_connections=100,
config at /etc/postgresql/16/main/. Enable pg_stat_statements for monitoring."
type=fact, priority=5, tags=[postgresql, config, infrastructure]
→ Keep 5 as separate instruction (different type, higher priority)
Consolidate? [yes / modify / skip]发现5个关于“PostgreSQL配置”的记忆:
1. "PostgreSQL使用端口5432"(事实,优先级3)
2. "设置max_connections=100"(事实,优先级4)
3. "启用pg_stat_statements"(指令,优先级5)
4. "PostgreSQL配置位于/etc/postgresql/16/main/"(事实,优先级3)
5. "始终使用PgBouncer进行连接池管理"(指令,优先级6)
建议合并:
→ 将1、2、4合并为:"PostgreSQL 16配置:端口5432,max_connections=100,
配置路径为/etc/postgresql/16/main/。启用pg_stat_statements用于监控。"
类型=事实, 优先级=5, 标签=[postgresql, config, infrastructure]
→ 将5作为单独指令保留(类型不同,优先级更高)
是否合并?[是 / 修改 / 跳过]Topic "auth" has low recall confidence (0.42).
Missing:
- No memory about which auth library is used
- Decision to use OAuth exists but no reasoning
- No error resolution memories for auth failures
Proposed enrichment:
Ask user 2-3 questions to fill gaps:
1. "Which auth library/service does this project use?"
2. "Why was OAuth chosen over session-based auth?"
3. "Any common auth errors you've encountered?"主题“auth”的召回置信度低(0.42)。
缺失内容:
- 没有关于使用哪个认证库的记忆
- 存在使用OAuth的决策,但没有推理过程
- 没有关于认证失败的错误解决记忆
建议增强:
向用户提问2-3个问题以填补空白:
1. "该项目使用哪个认证库/服务?"
2. "为什么选择OAuth而不是基于会话的认证?"
3. "你遇到过哪些常见的认证错误?"Dead memories (never recalled, >90 days old):
1. "Tried using Redis 6 but had connection issues" (error, 2025-11-01)
2. "Sprint 3 standup notes: Alice on vacation" (context, 2025-10-15)
3. "Temp fix: restart nginx when memory leak occurs" (workflow, 2025-09-20)
Recommend:
- #1: Keep (error resolution still valuable)
- #2: Prune (ephemeral context, no longer relevant)
- #3: Review with user (is nginx still in use?)
Prune #2? [yes / keep / skip all]失效记忆(从未被召回,且已超过90天):
1. "尝试使用Redis 6但遇到连接问题"(错误,2025-11-01)
2. "Sprint 3站会记录:Alice休假"(上下文,2025-10-15)
3. "临时修复:内存泄漏时重启nginx"(工作流,2025-09-20)
建议:
- #1:保留(错误解决仍有价值)
- #2:修剪(临时上下文,已无相关性)
- #3:与用户确认(是否仍在使用nginx?)
是否修剪#2?[是 / 保留 / 全部跳过]Tag drift detected:
"frontend" (12 memories) + "front-end" (3) + "ui" (5) + "client-side" (2)
Proposed normalization:
→ Canonical tag: "frontend"
→ Merge: "front-end" → "frontend", "ui" → "frontend", "client-side" → "frontend"
Note: "ui" may mean UI/UX design specifically, not just frontend code.
Normalize? [yes / keep "ui" separate / skip]检测到标签漂移:
"frontend"(12个记忆) + "front-end"(3个) + "ui"(5个) + "client-side"(2个)
建议规范化:
→ 标准标签:"frontend"
→ 合并:"front-end" → "frontend", "ui" → "frontend", "client-side" → "frontend"
备注:"ui"可能特指UI/UX设计,而非仅前端代码。
是否规范化?[是 / 单独保留"ui" / 跳过]Priority mismatches:
HOT but low priority:
- "Always run migrations before deploy" (instruction, priority=3, recalled 12x)
→ Recommend: priority=8
HIGH priority but dead:
- "Sprint 2 deadline is Feb 1" (todo, priority=9, never recalled, expired)
→ Recommend: prune or priority=2优先级不匹配:
热门但优先级低:
- "部署前始终运行迁移"(指令,优先级=3,被召回12次)
→ 建议:优先级=8
优先级高但已失效:
- "Sprint 2截止日期为2月1日"(待办,优先级=9,从未被召回,已过期)
→ 建议:修剪或优先级=2nmem_remember(
content="Evolution cycle 2026-02-10: Consolidated 3 PostgreSQL config memories,
enriched auth topic (+3 memories), pruned 2 stale context memories,
normalized 4 tag variants → 'frontend'. Brain grade improved B→A-.",
type="workflow",
priority=4,
tags=["memory-evolution", "maintenance", "meta"]
)Evolution Checkpoint (60 seconds)
1. Satisfied with changes? [yes / partially / no]
2. Biggest remaining gap? [topic name / none / unsure]
3. Next evolution focus?
a) Continue current direction
b) Focus on a specific topic: ___
c) Schedule next cycle in 1 week
d) Skip — brain is healthy enoughnmem_remember(
content="2026-02-10演进周期:合并了3个PostgreSQL配置记忆,
增强了auth主题(+3个记忆),修剪了2个过时上下文记忆,
将4个标签变体规范化为'frontend'。大脑评分从B提升至A-。",
type="workflow",
priority=4,
tags=["memory-evolution", "maintenance", "meta"]
)演进检查点(60秒)
1. 你对更改满意吗?[是 / 部分满意 / 不满意]
2. 最大的剩余空白是什么?[主题名称 / 无 / 不确定]
3. 下一次演进的重点?
a) 延续当前方向
b) 聚焦特定主题:___
c) 1周后安排下一次周期
d) 跳过——大脑状态足够健康Evolution Report — 2026-02-10
Actions Taken:
Consolidated: 3 memory groups → 3 richer memories
Enriched: +4 new memories (auth topic)
Pruned: 2 dead memories removed
Normalized: 4 tag variants → 1 canonical
Rebalanced: 2 priority adjustments
Before → After:
Brain grade: B (82) → A- (91)
Recall confidence: 0.61 avg → 0.74 avg
Active conflicts: 2 → 0
Stale ratio: 22% → 15%
Tag variants: 47 → 43
Next recommended cycle: 2026-02-17
Focus areas: testing (0 memories), deployment (3 memories, could be richer)演进报告 — 2026-02-10
已执行动作:
合并: 3组记忆 → 3个更丰富的记忆
增强: +4个新记忆(auth主题)
修剪: 移除2个失效记忆
规范化:4个标签变体 → 1个标准标签
重新平衡:2次优先级调整
优化前后对比:
大脑评分: B (82) → A- (91)
平均召回置信度: 0.61 → 0.74
活跃冲突: 2 → 0
过时比例: 22% → 15%
标签变体: 47 → 43
建议下一次周期:2026-02-17
重点领域:testing(无相关记忆),deployment(3个记忆,可进一步丰富)