dsh-context-kb
why774/dsh-context-kb
Turn long conversations into a searchable per-project memory of raw text, conclusion indexes pinned to exact lines, and pitfalls, so a model that lost its context can still find the original decision and code.
설치
dsh plugin --profile web add github:why774/dsh-context-kbREADME
dsh-context-kb
A context knowledge base for DeepSeek Harness. It keeps the raw conversation text, conclusion indexes that point at exact lines, pitfalls, and tool-usage notes in a per-project store, and exposes them to the model as kb_* tools.
The backend is the bundled why774/context-kb command line (vendor/kb/), executed with the local Python 3 interpreter. Nothing leaves the machine.
Tools
| Tool | Purpose |
|---|---|
kb_log | Append raw text to the project knowledge base (initialized on first call) |
kb_seal | Seal the current segment: move its raw text from session/ to archive/ |
kb_index | Write a conclusion index for a sealed segment, optionally pinned to a line range |
kb_search | Search conclusion indexes first, then dig into raw text; long searches the cross-conversation store |
kb_read | Read raw text by coordinate, e.g. archive/T-20261120-001-p1.md:5 |
kb_context | Tiered context assembly: raw text nearby, summaries further back, pointers far away |
kb_hot | The hottest entries for the project (or long for the global store) |
kb_stats | Counts plus a project-directory sanity check |
kb_close | Close the conversation and merge the short-term store into ~/.context-kb |
Storage:
<project>/.context-kb/talks/<talk id>/— short-term store, one per conversation; commit it with the project~/.context-kb/— the long-term store, one per machine
Requirements
- Python 3. Interpreter lookup order:
DSH_CONTEXT_KB_PYTHON, then the DSH runtime under$DSH_HOME/dsh-runtimes/*/dependencies/python, thenpython3/pythononPATH. - DSH 0.2.x.
Optional environment variables: DSH_CONTEXT_KB_PYTHON (interpreter path) and DSH_CONTEXT_KB_TIMEOUT (per-command timeout in milliseconds, default 60000).
Limitations
- The short-term store's "current conversation" is tracked per project directory via
.context-kb/current. Parallel DSH sessions on the same project share one segment until you seal it. - The bundled CLI prints hints such as
python scripts/kb.py ...; the plugin appends a note so the model uses thekb_*tools instead. - Text memory only — it does not resolve code symbols to definitions.
License
MIT. vendor/kb/ is taken from why774/context-kb, also MIT.