dsh-explainDeepSeek Harness plugin
Private, local-first continuous learning for DeepSeek Harness: capture, review, and correct what Explain learns.
- Stars
- 12
- Forks
- 0
- License
- MIT
- Last commit
- Sep 2, 2026
- Latest release
- v0.2.0
Overview
Private, local-first continuous learning for DeepSeek Harness: capture, review, and correct what Explain learns.
Original README
Cached from the project repository on Sep 3, 2026. This is source content, separate from the Agents.md review above.
Quick start · Watch the full demo · Privacy model · Reproduce the recording
dsh-explain is a learning-mode plugin for DeepSeek Harness. It turns useful concepts from completed work into structured explanations, schedules lightweight reviews, and lets you inspect or correct what it learns about you.
The primary agent stays untouched. Explain uses its own model calls, scheduler, context, and local SQLite database.
See the learning loop

The 28-second preview runs against real assembled DSH Web 0.1.2-alpha.5 with deterministic, private fixture data. Watch the higher-quality MP4 or read the recording contract.
| Capture | Review | Adapt |
|---|---|---|
Turn a finalized answer or selected text into an editable /explain draft. Nothing submits automatically. | Revisit due concepts through recall, application, and distinction questions. | Inspect explanation preferences and topic familiarity, then correct or forget an inference. |
Quick start
Current main targets DSH 0.1.2-alpha.5:
shnpx @deepseek-ai/dsh@0.1.2-alpha.5 plugin --profile web add github:yuezengwu/dsh-explain npx @deepseek-ai/dsh@0.1.2-alpha.5 --profile web
Open Settings → Learning, choose an auxiliary provider and model, enable learning mode, and save. Explain observes only future completed top-level turns; it does not scan existing history.
Git-hosted plugins build during installation. If pnpm requests build approval, add the printed dsh-explain entry to the profile's pnpm-workspace.yaml, then repeat the install command. For automated runs that should not open a browser, start DSH with --no-open.
The latest tagged Explain release is
v0.2.0;v0.3.0has not been published. Installing from GitHub uses the current alpha.5-compatiblemainbranch.
Start from the work itself
| Entry point | What happens |
|---|---|
/explain <request> | Requests an explanation using the current session as bounded source context. |
| Explain selected text | Creates an editable /explain --selection … draft from visible text. |
| Learn from this answer | Creates an editable draft tied to the exact finalized assistant turn. |
| Automatic evaluation | May add one useful explanation after an eligible turn, within your configured budget. |
/review | Opens or resumes a local review round in the Learning tab. |
Each explanation answers three practical questions: What is it? Why does it matter here? What is the common pitfall? Choose Got it to close the card, or Not yet for a different explanation.
Review, then correct the model
Concepts marked Got it enter a local spaced-review schedule. Learning → Today's review selects up to three due concepts and asks recall, application, and distinction questions. The auxiliary model evaluates each answer as Mastered, Partial, or Forgotten and schedules the next review at a deterministic interval.
Learning → Learning overview exposes the current judgments about explanation length, structure, examples, terminology, and topic familiarity—with confidence and source links. You can correct an inference, forget it, or set an explicit preference. Precedence is fixed and visible: explicit preference → user correction → model inference.
One learning thread, many sessions
- Every
$DSH_HOMEowns exactly one Explain learning thread; resumes and forks never copy it. - Every source session has at most one explanation awaiting feedback.
- One global scheduler serializes explanations, reviews, autonomous evaluation, rephrases, and compaction.
- Autonomous evaluation has a persistent rolling 24-hour budget, configurable in Settings.
- Rephrasing still works if a source session is later deleted because only a bounded source summary is retained.
Local-first by design
| Data | Behavior |
|---|---|
| Learning thread | Stored in $DSH_HOME/dsh-explain/v1/thread.sqlite. |
| Enablement and model settings | Stored through DSH settings in $DSH_HOME/settings.yaml. |
| Source material | Reduced to bounded capsules; rephrasing retains at most a 2,000-character restricted summary. |
| Global learning context | Sent only to the auxiliary Explain model, never to the primary agent. |
| Export | A versioned local backup includes learning state and profile audit, but excludes full sessions, credentials, and absolute host paths. |
| Clear | A typed CLEAR confirmation atomically removes learned content while preserving runtime settings and the active budget window. |
Explain uses first-party DSH conversation, composer, assistant-action, and settings extension points. It does not require patches to DSH or other plugins.
Compatibility and verification
| Check | Current result |
|---|---|
| DSH compatibility | 0.1.2-alpha.5 public API packages and assembled source |
| Unit and integration | 71 tests |
| Assembled DSH Web | 6 scenarios |
| Explain-owned shortcuts | 3 M6 scenarios |
| Production package | Build and pack dry-run |
See the acceptance matrix for coverage and PR #16 for the earlier real-model workflow evidence. DSH remains a developer preview; Explain follows its current public API line instead of retaining compatibility layers for private-preview packages.
Local development
The default development install uses published 0.1.2-alpha.5 API packages. Assembled-Web tests and demo recording also need a built DSH 0.1.2-alpha.5 source checkout:
shpnpm install DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm dsh:link DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm dsh:link:check pnpm typecheck pnpm test DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm test:web DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm test:m6 pnpm build
Install this checkout directly for manual development:
shdsh plugin --profile web add /absolute/path/to/dsh-explain dsh --profile web --dump-config dsh --profile web
Documentation
| Document | Purpose |
|---|---|
| Demo production | Storyboard, privacy contract, commands, assets, and artwork provenance. |
| Product requirements | User model, scope, policies, and acceptance criteria. |
| Architecture | Persistence, scheduling, RPC, UI integration, and failure behavior. |
| Acceptance matrix | Automated and real-flow evidence. |
| Iteration plan | Completed milestones and follow-up sequencing. |