alcheme-labs/dsh-experience-map ↗★ 0
dsh-experience-map
Evidence-governed experience memory for DeepSeek Harness
安装
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.3public beta, published as the unscoped npm packagedsh-experience-mapand as a matching GitHub Release tarball.
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 locally scans bounded intervals from recently completed Sessions 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.
Requirements
- DeepSeek Harness
0.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 public beta
Add the public npm package to a Web profile and start that profile:
dsh plugin --profile web add dsh-experience-map@0.1.0-beta.3
dsh web
The matching prebuilt tarball is also available from the immutable GitHub Release.
When running DSH from its source checkout, replace dsh with pnpm dsh. To build the same package from source instead:
git clone https://github.com/alcheme-labs/dsh-experience-map.git
cd dsh-experience-map
pnpm install
pnpm run build
pnpm pack
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 28 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.3
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 may never reach the model, an unapproved or altered Context may become indistinguishable from the approved snapshot, a tool result may be attributed to the wrong Usage, or one plugin's rejection may prevent the Experience flow from reaching its authoritative readback. Before co-installing plugins that intercept Agent steps, rewrite messages, or enforce tool policy, validate them together in an isolated profile: preserve actor and Session identity, preserve message.source, confirm approved-only Context delivery to the exact model request, keep tool guards Session-scoped, and verify interruption and tool-result readback. Experience Map does not override another plugin's denial; incompatible global policy should be narrowed, ordered, or isolated at the profile level.
Evidence and release status
A real paired DSH task observed 65.9% lower provider token volume, 45.5% fewer tool calls, and 46.2% fewer model steps after the same matched Experience was approved and delivered. This is one short task family, not an average or guarantee. The exact task, controls, formulas, de-identified events, and non-claims ar