Let Agents Evolve: dsh-rule-evolve in Practice

By zoahdev · 2026-08-15 · Repo: https://github.com/zoahdev/dsh-rule-evolve (v0.9.0)

TL;DR

Turn "failure → rule → verify → apply → recall → retire" into the agent's own loop: every lesson becomes a rule checked by a real verification, installed into the profile's AGENTS.md, and active in the next session.

1. Install

dsh plugin --profile web add github:zoahdev/dsh-rule-evolve#path:/plugin

Four tools: evolve_learn, evolve_apply (refuses unverified installs), evolve_touch (usage), evolve_recall (local retrieval).

2. Full CLI loop

node scripts/dsh-evolve.mjs extract --task "publish to npm" --from install.log --out experience.jsonl
node scripts/dsh-evolve.mjs verify --experience experience.jsonl --dir ./my-plugin
node scripts/dsh-evolve.mjs evolve --experience experience.jsonl --dir ./my-plugin --profile web
node scripts/dsh-evolve.mjs recall --experience experience.jsonl --query "windows bash"
node scripts/dsh-evolve.mjs score / prune / merge-duplicates

3. Real evidence (dogfood)

4. Why this is self-evolution

Rules carry source, verification history, usage history, and lifecycle state. High-score rules survive; low-score rules are retired auditably — the library remembers what works, not everything.

Related