dsh-experience-skill
Verifieddsh-experience-skill · v0.1.0 · MIT
Self-evolving experience plugin for DeepSeek Harness: one experience-retrieval skill entry + local experience_search tool, with batched learning and two-round validation.
Install
dsh plugin add dsh-experience-skill Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Tags
Readme
dsh-experience-skill
Self-evolving experience plugin for DeepSeek Harness (DSH).
- One Skill List entry:
experience-retrieval(name + description only; body loads on demand) - One local tool:
experience_search(0 model calls; filters local experiences and returns ≤2 inline) - Learning: trace → Issue/Attempt/Evidence → one batch call per threshold → candidates → two-round observation → gate → active
- No per-turn summarization:45min heartbeat only; model is called at most once per batch (plus one retry)
Requires DSH 0.2.x (session event API) and Node.js >= 22.19.
Install
In your DSH profile directory (e.g. ~/.dsh/profiles/<profile>):
- Add dependency:
{
"dependencies": {
"dsh-experience-skill": "^0.1.0"
}
}
- Add the bundle:
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"dsh-experience-skill"
]
}
}
}
- Install and restart DSH:
pnpm install
# restart DSH Desktop
After restart, check:
- Skill List contains only one new entry:
experience-retrieval; experience_searchis callable and returnsNO_MATCHon an empty library;$DSH_HOME/experience-skill/is created (registry, traces, logs, checkpoints).
$DSH_HOMEdefaults to~/.dsh. The plugin never writes into~/.dsh/skills/; experiences are not registered as individual skills.
Privacy and data
Everything is stored locally under $DSH_HOME/experience-skill/:
| Data | Content | Retention |
|---|---|---|
traces/ |
redacted event summaries (no file bodies) | retentionTraceDays(默认 90 天,自动清理) |
registry.json |
tasks/issues/attempts/evidence/candidates/active experiences | until deleted |
logs/ |
retrieval/feedback/cost metadata(query 摘要已脱敏) | until deleted |
candidates/, active/, archive/ |
rendered Markdown experience files | until deleted |
Network disclosure: learning sends a redacted digest(goal/symptoms/attempt summaries/evidence excerpts, no full tool output)to the model provider configured in DSH. Retrieval never calls a model. Set localOnly: true to disable learning entirely; captureSubagents: false(default)skips subagent sessions.
autoLearn defaults to true: after enough interaction, one batch call may be sent to the configured provider. Daily budgets bound it. Set autoLearn: false if you want capture/retrieval only.
Configuration
Override defaults in your profile patch (cordis.patch.yml):
- id: experience-skill
config:
autoLearn: true # 默认 true;false = 只采集/检索
localOnly: false # true = 完全不调用模型
captureSubagents: false # 不采集 subagent 会话
maxExtraCallsPerDay: 6
dailyLearningTokens: 90000
maxBatchesPerDay: 4
batchThresholdTurns: 8
maxRetrievalsPerDay: 12
dailyRetrievalTokens: 40000
maxResults: 2
minScore: 55
retentionTraceDays: 90
provider: '' # 空 = 会话路由
model: '' # 空 = 会话模型
reasoningEffort: 'off'
How it works
session/eventcaptures a whitelisted, redacted trace (0 model calls);- 45min heartbeat / turn-end check: incremental trace read, issue correlation, budget gate;
- If ≥
batchThresholdTurnsnew turns and budget allows: one batch call produces candidates with filter terms and evidence refs; - Candidate →
observing;two valid task turns →pending_review;gate passes →active; - Future tasks: Skill List shows one entry; model calls
experience_search; local scoring returns ≤2 experiences inline (no second model, no temporary skill); feedbackupdates adoption/negative stats; harmful patterns demote active experiences for review.
Cost defaults
| Operation | Extra model calls |
|---|---|
| Trace capture / 45min check / correlation / retrieval | 0 |
| One batch of new traces | ≤1(+≤1 retry) |
| Daily learning budget | ≤6 calls / 90k tokens / 4 batches |
| Retrieval budget | ≤12 searches / 40k tokens/day |
All counts are written to logs/cost.jsonl and checkpoints.json.
Uninstall / delete data
- Remove
dsh-experience-skillfromdsh.profile.bundlesand dependencies; pnpm installand restart DSH;- Delete
$DSH_HOME/experience-skill/to remove all local experiences and traces.
Development
node --test # 68 tests, mock ctx/LLM, no DSH required
Limitations
- No CLI in the published package (review/rollback are not shipped yet);
- Retrieval is lexical (CJK grams + exact terms), no embeddings;
- A second DSH window sharing the same
$DSH_HOMEruns read-only (lock owner), so its registry view may be stale; - Session log backfill is not performed; only events after plugin load are captured.
License
MIT