DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

liugu2023 /

dsh-knowledge-sync

Verified

This repository has no description yet.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@6544a80f

dsh-knowledge-sync

English | 中文

Freeze every round of a DeepSeek Harness conversation into a knowledge-base document, and let later conversations find it.

A round ends, and what was asked, what was concluded, and which tools ran become one Markdown file. Nothing is sent to a model to make that happen. Later, an agent working in the same directory is told the base exists — two sentences, not the documents — and decides for itself whether to look.

What you get

A file per round Markdown with YAML front matter, under <root>/<session>/t<turn>-<slug>.md
Readable by everything Greppable, editable, and ready for version control — the files are the source of truth, with no sidecar index
Recall, not injection A short pointer in the system prompt plus knowledge_search and knowledge_read; the documents never enter the context uninvited
Scoped to a workspace An agent recalls what was recorded in its own directory, so another project's knowledge is not noise in this one
A page to read it A Knowledge section in settings: filter, open, read

Install

dsh plugin --profile web add dsh-knowledge-sync
dsh --profile web --dump-config   # shows a "# == dsh-knowledge-sync" layer
dsh web

Documents land in ./knowledge beside wherever you launched, or wherever DSH_KNOWLEDGE_ROOT points. Override anything in the profile's cordis.patch.yml:

- id: knowledge
  config:
    root: /srv/project/knowledge

What a document looks like

---
id: "abc12345-t1"
title: "Why is the build red?"
session: "abc12345-0000-4000-8000-000000000000"
turn: 1
created: "2026-08-18T10:00:00.000Z"
outcome: "completed"
cwd: "/srv/project"
tools: ["bash"]
---

# Why is the build red?

## Question

Why is the build red?

## Answer

The lockfile was stale — `pnpm install` had not been re-run after the
dependency bump.

## Tools

- `bash` — {"command":"pnpm install"}

Reasoning is left out on purpose: a document records the conclusion, not the working that reached it. A round that committed no answer is not written at all — an abandoned turn records that something was attempted, not something learned.

How recall works

The plugin does not paste the knowledge base into the conversation. A previous round is usually irrelevant to the current one, and injecting the lot would spend the context window on that irrelevance and invalidate the prompt prefix every time a round is written.

Instead an agent working in a directory with recorded rounds sees one short section:

Knowledge base — 12 documents from earlier conversation rounds for this workspace (/srv/project) are available. They are NOT included in this conversation.

Call knowledge_search when the task resembles work that may already have been done here — a recurring build failure, a decision that was already made, a file whose purpose was already established. Then knowledge_read the ones worth reading in full. Prefer checking over repeating work, and prefer your own judgement over a stale document when the two disagree.

knowledge_search returns titles and ids, never bodies — reading every file on every query would cost more than the lookup is worth. knowledge_read returns one document in full, by id, and only for documents the same rule made visible.

A workspace with nothing recorded contributes no section at all. A pointer to an empty shelf teaches the model to stop believing the pointer.

Configuration

Row Field Meaning
knowledge root Where documents are written
knowledge-capture enabled Freeze rounds as they end
knowledge-recall announce Tell the model the base exists
sameWorkspaceOnly Limit recall to the session's own directory
searchLimit Results per search
knowledge-http path Where the page reads from

Each row is independent: drop knowledge-http in a composition with no web server, or knowledge-recall to record without offering recall, and the rest still works.

Development

The repository is self-contained — it develops against the published @deepseek-ai/* packages, the same versions a dsh installation ships:

pnpm install
pnpm run typecheck
pnpm run test
pnpm run build

Pin those devDependencies exactly, never by range: the registry's latest tag for several harness packages points at a much older release than the CLI installs, and a range resolves to that stale set.

The tests run the real thing — a real agent loop and a scripted model — because the shape of a session log is the one thing this plugin cannot guess at.

Known limitations

  • Search reads titles and tool names, not bodies. Enough to find a round you remember; not a full-text index.
  • Recall is per directory. Sessions in a subdirectory of a recorded workspace do not see it, because the match is exact.
  • No summarization. A document is extracted from the log, not distilled by a model — free, deterministic, and more verbose than a curated note.
  • The page is read-only. The knowledge base is written by the conversations that produced it; a page that could rewrite history would make a document mean less than the round it froze.

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 6544a80f3371

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout