Distill Memory

nowledge-co/community/nowledge-mem-omp-plugin/skills/distill-memory

作者 nowledge-co1f4d7eb61466dbfc93ce8d7a0a806c4d4a196dd0無授權條款收錄於 2026年10月9日更新於 2026年10月9日

Save decisions, insights, preferences, and procedures as durable memories. Fires when the conversation produces knowledge worth keeping across sessions.

AI 產生的概覽

透過 nmem 命令列工具,把對話中值得長期保留的決策、偏好、流程與經驗存成記憶。

功能
這個技能會指示代理主動記錄對話中產生的持久知識,例如附帶理由的決策、可重複的流程、除錯經驗、偏好、計畫以及重要背景。它定義了可用的記憶類型(fact、preference、decision、plan、procedure、learning、context、event)、重要性分級,以及偏好原子化、可執行項目的品質規則。它也要求先搜尋以避免重複,在既有記憶可被細化時改為更新,並在完成較大型任務後檢視是否需要新增或更新記憶。
適用情境
當一次工作階段產生值得跨工作階段保留的知識時使用,例如已定案的架構取捨、使用者會重複使用的工作流程,或穩定的偏好。它不適用於例行修復、進行中的工作、簡單問答或一般資訊。
執行需求
需要環境中提供 nmem 命令列工具,並能寫入使用者的記憶儲存區。這個技能不含指令碼,只有指示內容。

Distill Memory

Save proactively when the conversation produces a durable fact, preference, decision, plan, procedure, learning, event, or important context. Do not wait to be asked.

When to Distill

Decision with rationale: Compared options, chose with reasoning, trade-off resolved.

Repeatable procedure: Step-by-step workflow the user will need again.

Lesson from debugging: Root cause found, unexpected behavior explained, prevention identified.

Durable preference: Coding style, tooling choice, naming convention, architectural stance.

Plan for future sessions: Agreed next steps, phased approach, deferred work items.

Skip: Routine fixes, work in progress, simple Q&A, generic information.

Usage

bash
nmem --json m add "content" -t "Title" --unit-type <type> -i <importance>

Valid Unit Types

fact, preference, decision, plan, procedure, learning, context, event

Importance Scale (Descending)

RangeMeaningExamples
0.8-1.0MajorArchitecture decisions, production incident fixes, core preferences
0.5-0.7UsefulDebugging insights, workflow improvements, project conventions
0.3-0.4MinorSmall tips, one-off observations, context notes

Examples

bash
# High-value decisionnmem --json m add "Chose PostgreSQL over MongoDB: need ACID for transaction integrity and complex joins across order/inventory tables" \  -t "Database: PostgreSQL for ACID" \  --unit-type decision -i 0.9
# Procedurenmem --json m add "Deploy sequence: run migrations first, then canary at 5%, watch error rate for 10 min, promote to full rollout" \  -t "Production Deploy Procedure" \  --unit-type procedure -i 0.7
# Preferencenmem --json m add "Prefer named exports over default exports in TypeScript. Makes refactoring and IDE navigation faster." \  -t "TS: Named Exports Preferred" \  --unit-type preference -i 0.6

Add vs Update

Search first to avoid duplicates. If a memory already captures the same concept and the new information refines it, update instead of creating a new entry:

bash
nmem --json m update <memory_id> -c "updated content"

One strong memory is better than three weak ones.

At the end of a substantial task, explicitly review whether one durable memory should be added or updated.

Memory Quality

Good (atomic, actionable):

  • "React hooks cleanup must return a function. Caused memory leaks in event listeners."
  • "PostgreSQL over MongoDB: ACID needed for transaction integrity."

Poor: Vague "fixed some bugs", conversation transcript dumps, overly broad summaries.

When to Skip

Do not distill routine work. If the user wouldn't miss it when it's gone, it shouldn't exist. Quality over quantity: 1-3 distilled memories per session is typical.

Links

來源與署名

來源:nowledge-co/community位於nowledge-mem-omp-plugin/skills/distill-memory提交1f4d7eb

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架