vilicvane/dsh-plugin-turn-memory ↗★ 0
dsh-plugin-turn-memory
Turn-granular context memory for DeepSeek Harness: per-turn flowing summaries replace completed turns on the surface, with verbatim tags and a three-mode recall tool.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-plugin-turn-memory
Turn-granular context memory for DeepSeek Harness: step 1 of a two-step context-compression plan.
Every time a root session's turn completes, a one-shot fork (same model as the conversation, sharing its warm request prefix) writes an independent flowing summary of that turn alone. At the pre-step of the next user-initiated turn, each summarized turn is replaced on the model-visible surface by its summary checkpoint. The newest user message always stays verbatim, and the raw events remain in the append-only log for replay and recall.
The expand_turn tool recalls a turn's full transcript in three modes:
- fork — the main model continues from the conversation state at that turn, with the warm request prefix; best for deep questions about a recent turn.
- subagent — a cheap model reads the turn's full text and answers a targeted question or produces a directed summary.
- raw — the turn's full text is returned directly into the conversation; very large turns are truncated; last resort.
The model picks the mode itself (default auto routes recent turns to fork and older turns to subagent).
Summary format (version 3)
Each checkpoint is a single user message:
## Timeline
- [chronological entries: user requests, decisions, discoveries, fixes]
## Current State
- [what stands when the turn ends]
## Open Questions and Pending Input
- [pending questions, reproduced VERBATIM]
## Next Step
- [the single next action, or (none)]
Marking rules:
- Superseded ideas, methods, and conclusions carry a leading [outdated] marker; when a turn invalidates something from an earlier summary, it names that turn.
- Untested assumptions carry a leading [assumption] marker.
- User wording, commands, paths, identifiers, and error strings are quoted verbatim wherever wording matters.
- Read-in material (code, docs, config, output) that the turn relied on or future turns will likely need is preserved verbatim enough to avoid re-reading, each passage with one line saying why it matters.
- Long verbatim passages (roughly over 800 characters) become placeholder tags — for the message that started the turn, for a tool result — and the harness replaces every tag with the original text when the checkpoint lands. Tags save output tokens, never omit content.
- Reusable procedures are referenced by name (skill or script path) instead of being restated; the steps live in skills loaded on demand.
Install
From GitHub:
dsh plugin --profile web add github:vilicvane/dsh-plugin-turn-memory
From a local directory (development):
dsh plugin --profile web add link:/path/to/dsh-plugin-turn-memory