nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:xyz6683/dsh-memory-vault
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Local-first long-term memory and personal-profile plugin for DeepSeek Harness.
Distill SOPs, best practices, and personal preferences in any session; recall them automatically in new conversations; aggregate everything into a personal profile by life domain. All data stays in a local SQLite file — zero external services, zero runtime dependencies, clean uninstall.
中文文档 · Design · Dev journal · GUI verification
Harness conversations are "one-shot": switch sessions, wait a few days, and the AI forgets who you are, what your project conventions are, and which pitfalls you already hit.
| Pain point | Solution here |
|---|---|
| Amnesia across sessions | Automatic recall before every first step: hybrid-ranked memories injected under a hard budget |
| Distillation is left to the AI's mood | Explicit "remember this" writes land directly; AI-extracted candidates go to a confirmation queue — nothing becomes active without your approval |
| Memories are flat sentences | Seven structured kinds (preference / fact / decision / constraint / lesson / sop / event / summary); SOPs carry ordered steps |
| Domains all mixed together | First-class domain dimension (dev / career / workflow / english / investment, editable) |
| Store but never use | Personal profile analysis: per-domain aggregation of preferences, SOP inventory, lessons, decisions + optional LLM narrative |
| Opaque data | One-click human-readable Markdown export; JSONL backup/restore; every memory traceable to its source turn |
0.2.0-rc.2)^22.19.0 or >=24.0.0git clone https://github.com/xyz6683/dsh-memory-vault.git
cd dsh-memory-vault && npm install
dsh plugin --profile web add "$PWD"
# restart dsh web if it was already running, then refresh the browser
Verify:
dsh --profile web --dump-config | grep -A2 dsh-memory-vault
mvault_add;<mvault_context> recall block appears and the agent answers from memory;Every memory carries these dimensions (mvault_add parameters):
| Dimension | Values | Notes |
|---|---|---|
kind |
preference / fact / decision / constraint / lesson / sop / event / summary |
sop + steps = ordered workflow |
track |
user / global / project / project-log / daily-log |
Layered tracks (3.2) |
domain |
dev / career / workflow / english / investment / general (editable) |
Used for recall weighting, filtering, profile aggregation |
importance / confidence |
0–1 | Ranking and extraction thresholds |
stableKey |
any stable id | Updating the same fact supersedes the old value; old version kept, reversible |
steps |
string array | Ordered SOP steps |
branches |
git branch names | Branch scoping for project memories (3.4) |
tags |
short labels | Retrieval helpers |
entities / relations |
entities and directed edges | Woven into the knowledge graph (3.6) |
| Track | What goes in | Recall behavior |
|---|---|---|
user |
Your preferences, habits, communication style | Recalled + profiled |
global |
Cross-project facts, SOPs, lessons | Recalled + profiled |
project |
Project key facts (decisions, conventions, pitfalls) | Recalled; filtered by git branch scope |
project-log |
Project progress stream | Never auto-injected; on-demand reads + export |
daily-log |
Daily progress stream | Never auto-injected; on-demand reads + export |
| Gate | Trigger | Destination | Rationale |
|---|---|---|---|
| ① Explicit | You say "记住…" → mvault_add |
Active immediately | User-intent, zero trust cost |
| ② Extraction | Completed turn → background LLM distillation (autoExtract: true) |
Confirmation queue — active only after approval | The AI proposes, you decide |
| ③ Progress logs | mvault_add to project-log/daily-log |
Active but excluded from auto-recall | Traceability without noise |
Difference from similar plugins: automatic extraction never writes active memories directly.
agent/pre-step (first step of every turn), on by default;<mvault_context> block, explicitly marked as reference data, not instructions, under hard maxContextChars/maxContextTokens budgets;mvault_expand fetches full text by id (progressive disclosure);branches surface only in matching git branches (auto-recall filters by the session's current branch; mvault_recall accepts an explicit branch); unscoped memories are visible everywhere.With autoExtract: true:
mvault_review;mvault_graph);mvault_entity_merge), rename (old spelling kept as alias), duplicate preview, orphan diagnostics, delete (links only, memory text untouched);mvault_revert rolls back to the previous version.mvault_profile [domain] returns a structured profile:
narrative: true generates an LLM narrative; route defaults to the session model).The panel's 画像 tab visualizes the same data — a long-term foundation for development and strategy planning.
Sidebar "Memory Vault" button → four tabs:
| Tab | What it does |
|---|---|
| 记忆 | One-line compact titles (expand for full text), keyword search, domain filter, delete |
| 待确认 | Confirmation queue: approve/reject with confidence, source turn, reason |
| 画像 | Per-domain counts + preferences/SOP/lessons/decisions/constraints lists |
| 导出 | One-click Markdown export |
mvault_export: human-readable Markdown — USER.md / MEMORY.md / projects/<key>/KEY.md + LOG.md / daily/YYYY-MM-DD.md / domains/<domain>.md (Hermes-compatible § separators), editor-friendly and git-versionable;mvault_backup: exact JSONL snapshot export/restore (restore requires an empty database);If you are an agent: treat this section as your manual — read once, call everything correctly.
Tool list (18): mvault_add · mvault_propose · mvault_recall · mvault_expand · mvault_forget · mvault_revert · mvault_graph · mvault_profile · mvault_review · mvault_export · mvault_backup · mvault_archive_expand · mvault_archive_retry · mvault_entity_merge · mvault_entity_rename · mvault_entity_find_duplicates · mvault_entity_delete · mvault_entity_orphans
When to call what:
| The user says | What you do |
|---|---|
| "记一下 / 记住 / 这是我的偏好 / 以后都这样" | mvault_add — only when the user explicitly asked; pick kind; preferences → track: user; general facts/SOPs → global; project-specific → project (optionally branches); workflows → kind: sop + steps array |
| (user did not ask, but you judge the work worth remembering) | mvault_propose: file the candidate into the confirmation queue and tell the user "N memory suggestions await confirmation" — active only after approval; never self-approve |
| "查一下记忆 / 之前我们怎么定的" | Rely on automatic recall first (injected each turn); if insufficient, mvault_recall; truncated results → mvault_expand |
| "有哪些待确认的记忆" | mvault_review {action: list}; approve/reject only when the user says so |
| "分析我的画像 / 我擅长什么" | mvault_profile (optional domain filter; narrative: true for the narrated version) |
| "把记忆导出 / 备份一下" | mvault_export (Markdown) or mvault_backup {action: export} |
| "这条记忆错了 / 过时了" | mvault_forget; for an updated fact write a new memory with the same stableKey (auto-supersede); mistakes → mvault_revert |
| "这两个实体是同一个" | mvault_entity_find_duplicates preview → mvault_entity_merge |
Semantics you must respect:
<mvault_context> may conflict with the current request; the user's current input always wins.mvault_add only when the user explicitly asked (active immediately); when you judge something worth remembering on your own, use mvault_propose (confirmation queue); automatic extraction candidates also enter the queue — any write not directed by the user requires approval, which you must never grant yourself; point the user to the queue instead.project-log/daily-log (not recalled); only durable facts go to global/project.kind: 'sop' with each step in steps, not squashed into one paragraph.domain from the configured list; fall back to general when unsure.stableKey; reuse the same key when updating.All defaults ship in cordis.patch.yml; override by id in your profile's cordis.patch.yml:
| Option | Default | Meaning |
|---|---|---|
autoRecall |
true |
Recall before the first step of every turn |
autoRecallLimit / autoRecallMinScore |
5 / 0.18 |
Recall count / minimum score |
maxContextChars / maxContextTokens |
2600 / 1300 |
Hard budgets of the injected recall block |
domains / defaultDomain |
6 domains / general |
Domain dimension (restart after edits) |
domainBoost / weights |
0.1 / six weights |
Ranking mix |
halfLifeDays |
30 |
Recency half-life |
explicitWritesActive |
true |
Explicit writes take effect immediately |
autoExtract |
false |
Automatic distillation switch (queue fills only when on) |
extractMinConfidence |
0.65 |
Minimum candidate confidence |
extractProvider / extractModel |
— | Distillation route (empty = reuse session route) |
profileProvider / profileModel |
— | Narrative-profile route (empty = reuse session route) |
visualizationTrustedHosts |
[] |
Trusted hosts for non-loopback deployments |
$DSH_HOME/dsh-memory-vault.sqlite, 0600, WAL mode; application_id rejects foreign databases.Cache-Control: no-store.autoExtract or the narrative profile sends the relevant transcript/aggregate to your configured model route.node:sqlite (harmless).mvault_export / mvault_backup + git.autoExtract needs a working model route; failures retry with the archive preserved — no data loss, no turn blockage.| Symptom | Fix |
|---|---|
No mvault_* tools |
Check --dump-config shows dsh-memory-vault; restart dsh web (a page refresh alone is not enough) |
| No recall block | Check autoRecall: true; newly written memories appear from the next turn |
| Queue always empty | autoExtract is off by default; enable and restart |
| Panel unavailable / 403 | Non-loopback deployments must add the host to visualizationTrustedHosts |
| Upgrading | Local checkout: git pull && npm run check; restart dsh web |
npm run typecheck # host + client
npm test # 35 tests (node's built-in test runner)
npm run build # tsc + tsdown client bundle
npm pack # publish tarball (21 files / ~60KB)
Design rationale and the full pitfall journal (including the survey of dsh-memory-graph / dsh-memory-evolve / dsh-memos-bridge) live in docs/.
MIT © dsh-memory-vault contributors. The storage layer's FTS5/trigger wiring is adapted from dsh-memory-graph (MIT); see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: memory。