dshbase

插件目录 / Knowledge / dsh-explain

dsh-explain

已验证 · 实测可装 yuezengwu

✓ 持续维护 基于 17 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

12Stars
0Forks
0未关闭 issue
TypeScript语言
2026-08-20最近推送
跨平台平台

功能简介

DSH 本地优先学习模式插件:跨会话全局学习线程、按来源讲解、ExplainContext、压缩与可诊断设置界面。

我们的评价
可用 — 实测通过,早期项目

DSH 本地优先学习模式插件:跨会话全局学习线程、按来源讲解、ExplainContext、压缩与可诊断设置界面。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

English · 简体中文

dsh-explain

Turn everyday DSH work into a private, continuous learning loop.

DSH 0.1.0-rc.8 Local first MIT License

dsh-explain is a learning-mode plugin for DeepSeek Harness. It turns useful concepts from completed work sessions into structured explanations, keeps them in one global learning thread, and adapts future explanations to what the user already knows.

The primary agent stays untouched: Explain uses its own model calls, scheduler, context, and local SQLite database.

See it in action

Select a DSH answer, create an Explain request, review the learning card, and mark it mastered

Select text or choose Learn from this answer, review the editable /explain draft, generate a learning card, then mark it understood. This demonstration used real DSH Web sessions and real DeepSeek main-agent and Explain model rounds; the exact commits and recording conditions are preserved in PR #16.

Quick start

Explain currently targets DSH 0.1.0-rc.8.

npx @deepseek-ai/[email protected] plugin --profile web add github:yuezengwu/dsh-explain
npx @deepseek-ai/[email protected] web

Then open Settings → Learning, select 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.

Ways to learn

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. It never submits automatically.
Learn from this answer Creates an editable draft tied to the exact finalized assistant turn.
Automatic evaluation After an eligible completed turn, Explain may add one useful explanation within the configured budget.

Use /explain on, /explain off, and /explain status to control or inspect the runtime without leaving the composer.

Each learning card answers three questions:

  • What is it? A concise explanation of the concept.
  • Why does it matter? The practical reason it matters in the source work.
  • What is the common pitfall? A mistake or misconception to avoid.

Choose Got it to close the card, or Not yet to request a different explanation. Rephrasing remains available even if the source session is later deleted.

One learning thread, many work sessions

Every $DSH_HOME owns exactly one Explain learning thread. Individual work sessions contribute material, but resumes and forks never copy the learning state.

  • Each source session has at most one explanation awaiting feedback.
  • All work sessions display the same global history in the first-party Learning tab.
  • One global scheduler serializes manual explanations, autonomous evaluation, rephrases, and compaction.
  • The default autonomous budget is 50 requests per rolling 24 hours and survives restarts.
  • A private ExplainContext tracks explanation preferences, knowledge level, and learning progress.
  • When structured observations or closed explanations are pending, auxiliary history compacts after 30 minutes without an Explain action, or before a request would exceed 50% of the selected model's context window.

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 source summary.
Global learning context Sent only to the auxiliary Explain model, never to the primary agent.
Primary session Never receives Explain events, prompts, or learning context. Primary turns are not blocked.

Explain uses first-party DSH conversation.view, composer, assistant-action, and settings extension points. It does not require better-sidebar or patches to other plugins.

Compatibility and verification

  • Current compatibility line: DSH 0.1.0-rc.8.
  • Unit suite: 64 tests.
  • Assembled DSH Web acceptance: 4 scenarios.
  • Explain-owned shortcut acceptance: 3 M6 scenarios.
  • Real-model workflow evidence: PR #16.
  • Detailed acceptance matrix: docs/ACCEPTANCE.md.

DSH is still a developer preview. Explain follows the current public API line and does not retain compatibility layers for earlier private-preview packages.

Local development

The default install uses the published rc.8 API packages. Assembled-Web tests also need a built DSH rc.8 source checkout:

pnpm install
DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm run dsh:link
DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm run dsh:link:check
pnpm run typecheck
pnpm test
DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm run test:web
DSH_SOURCE_DIR=/absolute/path/to/dsh pnpm run test:m6
pnpm run build

Install this checkout directly for manual development:

dsh plugin --profile web add /absolute/path/to/dsh-explain
dsh --profile web --dump-config
dsh --profile web

test:web starts a fresh keyless DSH Web composition and verifies the Learning view, settings, source navigation, and missing-source fallback. test:m6 installs only Explain and verifies both editable-draft shortcuts plus clean unload and reinstall behavior.

Documentation

Document Purpose
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 Current follow-up work and sequencing.

The detailed design documents are currently written in Chinese.

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-explain」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:yuezengwu/dsh-explain

Headless(CLI)profile:

dsh plugin --profile headless add github:yuezengwu/dsh-explain

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

给 agent 一套记忆、知识库或检索层,让它不再跨会话丢上下文。

适合谁

跑长项目、想让 agent 记住决策、文档和偏好而不用每次重讲的人。

二次开发建议

记忆/检索后端是缝——插新存储、调蒸馏策略,或加引用与审计轨迹。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Knowledge 里更多

浏览全部 7795 个插件 →