alcheme-labs/dsh-experience-map ↗★ 1
dsh-experience-map
将已完成的工作转化为可复用的经验记忆 适合需要让智能体复用历史成功解决方案以提高效率的场景。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:alcheme-labs/dsh-experience-map說明文件
閱讀完整 README ↗description: "Turn completed DeepSeek Harness work into evidence-governed, reusable Experiences that can be checked, approved, executed, verified, revised, and forgotten." kind: "package-bundle"
Experience Map for DeepSeek Harness
English | 中文
Status:
0.1.0-beta.6targets DSH0.2.0-rc.2and uses task-completion notifications without automatic historical backfill; management labels and counts stay on one line. See the changelog for the beta.4–beta.6 behavior changes. The published0.1.0-beta.3remains for DSH0.1.5-rc.2; its artifact is unchanged.
Summary
Experience Map helps a DeepSeek Harness agent reuse a solution that already worked instead of exploring a different route every time a similar task appears. It turns selected Session evidence into a structured, versioned Experience, checks whether that Experience still applies to the current environment, and asks the user to approve the exact reuse plan before it affects a task. The Bundle works inside the existing Harness Experience tab and also supports Browser-free Host operation and an opt-in management CLI. SQLite owns the durable Experience records; Markdown, learning views, and the relation map are readable projections rather than competing memory stores.
Table of Contents
- Use this package
- Five-minute quickstart
- Plugin interoperability
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
- License
Use this package
Start with the five-minute quickstart. Automatic suggestion detection and recall are already enabled after installation: finish one task with a real outcome, open the conversation's Experience tab, and decide only whether a save-ready suggestion should become durable Experience memory. The same guide gives reproducible headless and management CLI commands and their approval boundaries.
Interface preview from an isolated demo profile with de-identified sample data:

Problems it solves
Ordinary chat history can remind a model what was said, but it does not reliably tell the model which steps worked, under which conditions, who approved them, or whether the old result is still valid. A vector search can retrieve similar text, but similarity alone is not permission to reuse a procedure.
| Recurring problem | Experience Map response |
|---|---|
| Similar tasks take different routes | Store the successful route as typed, versioned components. |
| A past answer lacks evidence | Bind each claim and step to exact source references and evidence grades. |
| An old solution may be stale | Run a current Preflight before proposing reuse. |
| Automatic memory extraction can preserve mistakes | Create a Candidate first; a user reviews its fields before publication. |
| Several Experiences overlap or conflict | Compose selected contributions deterministically and disclose discarded or overridden items. |
| A plausible result may not be a real success | Verify the current external state and create an immutable Settlement. |
| Knowledge changes over time | Publish a new Version, retain the old record, or Forget future retrieval. |
The result is an experience map, not only a knowledge graph. It records facts and relations, but it also records applicability, decisions, execution progress, verification, outcomes, revisions, and governance.
What an Experience contains
An Experience is a reusable decision or execution asset with an intent, scope, validity conditions, typed components, source evidence, risk and effect information, allowed use modes, and immutable versions.
The first product phase supports six kinds:
| Kind | Captures |
|---|---|
| Procedure | Repeatable steps, checkpoints, side-effect rules, failure branches, and verifiers. |
| Diagnostic | Symptoms, observations, hypotheses, discriminators, misleading signals, resolutions, and recovery checks. |
| Strategy | Decision points, options, constraints, criteria, trade-offs, stop rules, and outcome measures. |
| Preference Policy | User or organization preferences, authority, scope, override policy, and examples. |
| Fact | Sourced statements, qualifiers, validity periods, and contradiction policy. |
| Causal | A causal candidate with a mechanism, competing explanations, evidence links, a falsifier, and an explicit causal grade. |
A Causal Experience is not automatically treated as established causality. The product keeps causal_candidate distinct from stronger evidence grades and never lets a confidence score replace evidence.
Automatic suggestions and the save gate
By default, the Bundle learns only tasks whose completion notifications it observes while running. Startup and periodic maintenance do not discover or read historical Sessions. Reused old Sessions contribute new completed tasks; tasks completed while the plugin was inactive are not automatically backfilled. Recent-N ordering uses already observed Session records and lists zero or more suggestions by Session. Repeated occurrences of the same stable kernel across Sessions share one group and one save action. This recent-N/TTL projection is disposable rather than a second durable experience store; unattended expired suggestions may be discarded.
- A verified Procedure/Diagnostic, a verbatim user Preference with explicit scope and exception semantics, or a fresh structured Fact whose declared authority matches the actual tool call may become save-ready.
- Strategy remains
needs_enrichmentorneeds_review; Causal always begins as acausal_candidate. Neither local rules nor a model can promote them directly into one-click save. - Automatic detection, grouping, and default recall make no external model call. This release records the optional enrichment mode and DSH generation route, but reports enrichment as
configured_but_unavailableuntil a real foreground producer, disclosure/budget receipt, and supported call configuration exist; it never silently calls that route or bypasses the deterministic publication gate. - A new task accepts at most one primary match after type-specific hard gates, thresholds, and margin checks. Weak or inconsistent evidence abstains, and an expired Fact contributes nothing after Preflight.
Version compatibility
| Experience Map version | Verified DeepSeek Harness version | npm package |
|---|---|---|
0.1.0-beta.3 | 0.1.5-rc.2 | dsh-experience-map@0.1.0-beta.3 |
0.1.0-beta.6 | 0.2.0-rc.2 | dsh-experience-map@0.1.0-beta.6 |
Both npm latest and beta point to beta.6. DSH 0.1.5-rc.2 users must explicitly pin beta.3. Other DSH versions require a fresh compatibility check.
Requirements
- DeepSeek Harness
0.2.0-rc.2for plugin0.1.0-beta.6. Use the published plugin0.1.0-beta.3with DSH0.1.5-rc.2. - Node.js
^22.19.0or>=24.0.0. - A configured Harness LLM provider only when you want the model to propose a Candidate.
@huggingface/transformersonly when you deliberately enable the optional local dense-retrieval adapter. It is not installed automatically; review SECURITY.md first.
The npm package does not bundle Transformers.js or model weights and does not download a model automatically. The two recall modes have different evidence boundaries:
| Mode | Installed state | Best fit | Current evidence boundary |
|---|---|---|---|
| Deterministic hard gates + MiniSearch lexical ranking | Default; no model required | Zero extra model dependency and precision-first abstention | 12/12 with zero harmful matches on the frozen 12-case replay. This is not broad recall evidence; paraphrases and cross-language tasks may still be missed. |
| The same hard gates + local multilingual E5 hybrid ranking | Explicit opt-in | Calibrated Procedure/Diagnostic paraphrases, bilingual, and semantically similar tasks | 12/12 with zero harmful matches on the same hybrid replay. The 108-case quality suite also used local E5 for semantic equivalence, component mapping, and applicability, but those 108 cases are not all recall queries. |
Vector similarity only discovers and ranks candidates after the hard gates. It cannot by itself authorize saving, exact merging, Context injection, or tool execution. Automatic dense applicability and semantic equivalence are currently calibrated only for Procedure and Diagnostic; another Experience kind cannot cross deterministic gates merely because it has a high vector score. To reproduce the release-tested local semantic path, follow the pinned setup in the quickstart for @huggingface/transformers@4.2.0 and the exact Xenova/multilingual-e5-small revision. Do not reuse these thresholds with an uncalibrated model. A missing, drifted, or unavailable model produces an explicit lexical fallback.
Install the compatible version
For a DSH 0.2.0-rc.2 Web profile, install the exact npm version:
dsh plugin --profile web add dsh-experience-map@0.1.0-beta.6
dsh web
For DSH 0.1.5-rc.2, install the published dsh-experience-map@0.1.0-beta.3; its GitHub Release remains unchanged. npm latest and beta both point to 0.1.0-beta.6, so an unversioned install targets DSH 0.2.0-rc.2. Users of DSH 0.1.5-rc.2 must explicitly install 0.1.0-beta.3.
When running DSH from its source checkout, replace dsh with pnpm dsh. To clone this repository first:
git clone https://github.com/alcheme-labs/dsh-experience-map.git
cd dsh-experience-map
After installation, refresh any already-open Harness browser tabs, then open a conversation and select the Experience tab. A Host restart does not replace JavaScript already loaded in a tab. The Bundle does not open a separate website.
Configure Experience Map
Open Settings → Plugins → Plugin configuration, then expand Experience Map. The card exposes the 56 settings that can safely apply to the next operation without a Host restart. Changes are staged locally and saved as one revision-fenced mutation; a rejected or conflicting save keeps the draft for correction. Each operation captures one immutable settings snapshot, so a save never changes an extraction, Plan, verification, or learning batch already in progress. Candidate disclosure shows the captured settings revision and digest, and a later settings change invalidates the old confirmation.
The card groups default behavior and model generation first, with source/evidence, planning/verification, and learning batch controls under advanced sections. Resetting a field removes its user override and restores the Bundle composition value. The settings document never becomes a second Experience-domain writer: SQLite continues to own Candidates, Versions, Plans, Settlements, revisions, relations, and governance.
Database ownership and SQLite pragmas, the optional historical and verified-outcome fixtures, taskFingerprintProposalMode, and learningPollIntervalMs remain startup-only Cordis configuration. They are not presented as live controls because changing them requires resource re-registration, fixture revalidation, or worker restart.
Save an Experience from automatic suggestions
- Finish or diagnose a real task in a Harness conversation.
- Open
Experienceand inspect automatic suggestions by recent Session, cross-Session repetition, or incomplete state; no type selection is required first. - Choose
Save as experiencefor a suggestion that passed the save gate, or dismiss an unwanted suggestion. Exact repeats target one Experience Series. - Content that needs judgment continues through Candidate review: inspect the exact disclosure and model route, confirm it, accept/edit/reject each field, then publish an immutable Experience Version. The Bundle does not retry a paid model request automatically.
Reuse an Experience
- Submit a similar task.
- Review matches and the current Preflight results in the task-mode workbench.
- Inspect the exact Plan, including selected and discarded contributions.
- Approve, adapt, or reject that Plan.
- Let the next exact task consume its one-time binding and deliver minimal Experience Context.
- Advance the guided steps, run current verification, and settle the outcome.
- Create a Revision when the evidence shows that only part of the Experience must change.
Use headless and management modes
The Host plugin can load without Browser services, so CLI/headless profiles remain valid:
pnpm dsh plugin --profile headless add dsh-experience-map@0.1.0-beta.6
pnpm dsh --profile headless "your task"
Automatic Session suggestion detection and Experience recall are enabled by default. Saving a suggestion remains an explicit owner decision, and defaultMustUseExperience defaults to false: a match may prepare a Plan, but it does not force the task to use it. Context is injected only after the current Plan is approved; automatic tool execution remains disabled.
Management commands are intentionally excluded from ordinary Web and headless profiles. A dedicated management profile can mount dsh-experience-map/cli/startup and dsh-experience-map/cli/runner, then query the same Host-owned state:
pnpm dsh --profile experience-management experience status
pnpm dsh --profile experience-management experience suggestions-show
pnpm dsh --profile experience-management experience suggestion-save --input /absolute/path/to/save-suggestion.json
pnpm dsh --profile experience-management experience suggestion-dismiss --input /absolute/path/to/dismiss-suggestion.json
pnpm dsh --profile experience-management experience candidate-list
pnpm dsh --profile experience-management experience plan-list
pnpm dsh --profile experience-management experience learning-governance-show
Plugin interoperability and runtime-hook boundaries
Experience Map intentionally participates in the Host's global agent/pre-step flow, observes session/event and llm/stream, and installs a narrow per-Agent tool guard only while an approved Usage is active. These surfaces let it match the current direct user task, inject only the exact approved Experience Context, prove that the prepared Context reached the Session and model-request boundaries, and correlate guided steps with real tool results. They do not transfer ownership of model calls, tools, jobs, approvals, or the Session Log away from DeepSeek Harness, and they do not enable automatic tool execution.
Using the same lifecycle events is not by itself a conflict. Compatibility risk appears when another plugin changes the meaning or continuity of those shared boundaries, for example when it:
- short-circuits or rejects
agent/pre-stepbefore downstream handlers can run, or removes, reorders, or replaces messages without preserving theirsourceidentity; - applies a global allow/review/deny policy to every tool call without composing with existing Agent-scoped guards and Harness approval semantics;
- suppresses, rewrites, or consumes
session/event,llm/stream, or tool-result signals that Experience Map needs for delivery and execution correlation; - keeps approval, failure, or safety state globally across actors or Sessions, or substitutes that state for the Host-authenticated actor and the exact approved Plan; or
- assumes sole ownership of hook ordering, Context injection, approval resumption, or execution-result handling.
In these cases, an approved Context