- Início
- Plugins
- Uso e cobrança
- dsh-self-evolve
dsh-self-evolve
jianghuife/dsh-self-evolve
Hermes-style self-evolution for DeepSeek Harness: a skill_manage tool that lets the agent save proven procedures as skills, prompt guidance for when to save them, usage tracking, and a background curator that keeps the self-authored skill library healthy
Instalar
dsh plugin --profile web add github:jianghuife/dsh-self-evolveREADME
dsh-self-evolve
中文 | English
Hermes-style self-evolution for DeepSeek Harness: the agent saves proven procedures as skills, a background curator keeps the self-authored library healthy, and future sessions follow the proven procedure instead of rediscovering it.
The loop
- The agent solves a non-trivial problem (multi-step fix, hard-won root cause, user correction).
- Prompt guidance nudges it to call
skill_manage(create)with the proven procedure: steps, pitfalls, verification. - The skill lands as
<skills root>/<name>/SKILL.md— the exact directory-package shapedsh-skill-filesystemscans — so it enters the next session's skill catalog with no extra wiring and full progressive disclosure (catalog shows name + description; the body loads only on demand). - When a loaded skill turns out wrong, the agent patches it in the same session (
patchis exact-text replace — token-cheap, like an Edit tool for skills). - The curator ages out what stops earning its place.
Installation
Node.js 22.19 or later. Install the npm package into a DSH profile (replace web as needed):
dsh plugin --profile web add dsh-self-evolve
Installing through dsh plugin add activates the bundled default configuration automatically. Verify the composed config without starting DSH:
dsh --profile web --dump-config
Install a local checkout instead of the npm release:
dsh plugin --profile web add /path/to/dsh-self-evolve
What's registered
skill_managetool — actionscreate/patch(preferred) /edit/delete/write_file/remove_file/pin/unpin. Every write stampsmetadata.authoredBy: dsh-self-evolvepluscreatedAt/updatedAt/version; only skills carrying that stamp can ever be modified — bundled and human-authored skills are read-only.deletearchives (moves into the state dir), never destroys. SKILL.md is capped at 15 KB by default; resource files at 64 KB.- Prompt guidance — one static system-prompt section (order 160) stating when to save, when to patch, and the memory-vs-skill rule ("skills store procedures; facts belong in memory"). Static text ⇒ cache-stable. Loads only where a
systemPromptservice is composed. - Usage tracking — a
tools/resultobserver records every successfulskilltool load of a skill living in this root into<state dir>/usage.json. The ledger is separate from frontmatter so recording a use never rewrites SKILL.md. - Curator — one pass per
curatorIntervalHours(default 24 h, 30 s after startup): agent-authored skills unused forstaleDays(30) getmetadata.status: stale; unused forarchiveDays(90) are moved to<state dir>/archive/<name>-<timestamp>/. Pinned skills are exempt; nothing is ever hard-deleted; foreign skills are never touched. Status writes restore the file's mtime so curation bookkeeping never counts as activity.
Config
| key | default | meaning |
|---|---|---|
skillsRoot | <dsh home>/skills | Where agent-authored skills are written (must be a scanned skill root). |
stateDir | <dsh home>/self-evolve | Usage ledger + archive. |
staleDays | 30 | Days without use before a skill is marked stale. |
archiveDays | 90 | Days without use before a skill is archived. |
maxSkillBytes | 15360 | SKILL.md size cap. |
maxResourceBytes | 65536 | Per-resource-file size cap. |
curatorIntervalHours | 24 | Minimum hours between curator passes; 0 disables. |
guidance | true | Contribute the self-improvement prompt section. |
Out of scope (by design)
Hermes layers two more mechanisms on top; both are deliberately separate systems:
- LLM-review curation (a forked agent voting keep / patch / consolidate / archive per skill) — the mechanical phase here leaves the hooks in place (
metadata.status, the ledger, the ownership gate). - Offline GEPA evolution (trace-driven optimization of skills proposed as PRs) — belongs in a pipeline that reads session logs (
ctx.sessionQuery), not in the runtime plugin.
License
MIT