@jayyuen66/dsh-lesson-loop
Turns guard denials, gate failures and human thumb-downs into project lessons, and injects only the rules a human has armed into each new session of that project; it registers no model tools and is reviewed through its settings card.
Install
dsh plugin --profile web add @jayyuen66/dsh-lesson-loop
Sandbox test
This plugin has not been tested yet. Submit a test →
README
<p align="center">
<img src="https://cdn.jsdelivr.net/gh/JayYuen666/dsh-lesson-loop@main/icon.svg" width="96" height="96" alt="dsh-lesson-loop logo" />
</p>
<h1 align="center">dsh-lesson-loop</h1>
<p align="center"><em>Guard denials, gate failures and human thumb-downs become project lessons; only a rule a human confirmed is injected back into the model at session start.</em></p>
<p align="center">
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-lesson-loop"><img src="https://img.shields.io/npm/v/@jayyuen66/dsh-lesson-loop?style=flat-square&logo=npm&logoColor=white" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/@jayyuen66/dsh-lesson-loop"><img src="https://img.shields.io/npm/d18m/@jayyuen66/dsh-lesson-loop?style=flat-square" alt="npm downloads (total)" /></a>
<a href="https://github.com/JayYuen666/dsh-lesson-loop/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/JayYuen666/dsh-lesson-loop/ci.yml?branch=main&style=flat-square&label=ci" alt="ci" /></a>
<img src="https://img.shields.io/badge/license-MIT-4c1?style=flat-square" alt="MIT" />
<img src="https://img.shields.io/badge/node-%3E%3D24.9-4c1?style=flat-square&logo=nodedotjs&logoColor=white" alt="node" />
<img src="https://img.shields.io/badge/dsh-%5E0.2.1--rc.5-658EFF?style=flat-square" alt="dsh" />
<a href="https://github.com/deepseek-ai/deepseek-harness"><img src="https://img.shields.io/badge/powered_by_dsh-4D6BFE?style=flat-square&logo=deepseek&logoColor=white" alt="powered by dsh" /></a>
</p>
<p align="center">
<img src="https://skillicons.dev/icons?i=typescript,nodejs,react,vitest,githubactions" alt="tech stack" />
</p>
<p align="center">
<a href="https://github.com/JayYuen666"><img src="https://img.shields.io/badge/GitHub-JayYuen666-181717?style=flat-square&logo=github&logoColor=white" alt="GitHub" /></a>
<a href="mailto:cqwkkj@gmail.com"><img src="https://img.shields.io/badge/Email-cqwkkj@gmail.com-EA4335?style=flat-square&logo=gmail&logoColor=white" alt="Email" /></a>
<a href="https://twitter.com/JayYuen666"><img src="https://img.shields.io/badge/Twitter-X%2FJayYuen666-000000?style=flat-square&logo=x&logoColor=white" alt="Twitter/X" /></a>
<a href="./README.zh-CN.md"><img src="https://img.shields.io/badge/lang-简体中文-658EFF?style=flat-square" alt="简体中文" /></a>
</p>
A self-evolution loop for dsh: one lesson bus the guard plugins report to, one rule library a human curates, and armed rules injected into every new session of their project.
<img src="https://api.iconify.design/lucide/file-text.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Contents
- [What it does](#what-it-does)
- [Install](#install)
- [Verify it is live](#verify-it-is-live)
- [What it does not provide](#what-it-does-not-provide)
- [Enabling it in dsh](#enabling-it-in-dsh)
- [The lesson bus](#the-lesson-bus)
- [Settings](#settings)
- [Public interface](#public-interface)
- [Data and privacy](#data-and-privacy)
- [Known boundaries](#known-boundaries)
- [FAQ](#faq)
- [Development](#development)
- [License](#license)
<img src="https://api.iconify.design/lucide/shield.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> What it does
- One bus, no coupling. Sibling plugins report through the optional
lessonLoopservice; a profile without this package only drops those reports. The host half provides the service, the client half renders a web card holding the switches and the rule review desk. - Sink. Each report appends one line to the event stream and merges into a candidate card keyed by (project, category, signature); at
promoteThresholdthat key is marked ready for review. - A machine never promotes a rule. Status
armedis only ever a human decision — the card'sarmaction writes it, and the startup migration merely carries an existing armed state onto a merged card.reject/demote/archive/edit/reviveare human actions too. - Remind. A project-agnostic standing section keeps the loop visible, and each root session receives the full text of its project's armed rules at
agent/created. Subagent sessions are skipped. - Zero model tools, zero HTTP routes of its own. The card's data plane is the official Typert Remote namespace
lessonLoopRules, reached through the host/apigateway.
How a rule is judged
- Three counters answer three different questions:
violation(the scenario fired and was broken),suppressed(the scenario fired and was followed, driven bypass),samples(the rule was present and not violated). - The only ratio is
violation / (violation + suppressed);samplesis exposure and never a denominator. samplescounts a durable session once even when it is resumed: duplicate disposal edges are deduplicated, so reopening a session does not inflate exposure.- Demotion needs a positive
suppressed,violationatdemoteThreshold, real evidence atdemoteMinSamples, and the ratio atdemoteRatio. - A rule with zero clean hits whose scenario keeps firing is undeterminable: neither the ratio nor the decay can retire it, so it stays armed for a human. One
passclears the flag.
<img src="https://api.iconify.design/lucide/package.svg?color=%23658EFF&height=22" height="22" width="22" align="absmiddle" alt="" /> Install
dsh plugin --profile web add @jayyuen66/dsh-lesson-loop
Remove with dsh plugin --profile web remove @jayyuen66/dsh-lesson-loop. The package is on the public npm registry, so installation needs no credentials.
- Node.js
>= 24.9, hostdshon the rolling^0.2.1-rc.5 || ^0.2.2-alpha.3window. The plugin's own floor isengines.node(>=24.9.0), which is the host's floor from0.2.2-alpha.2up: a host below it never starts, so a lower claim here would promise an environment nobody can install into. The requirement the host reads
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::12,最后更新 2026-11-05