dsh-chapters
Long memory for local AI — your agents keep every word, without ever summarizing a thing.
When the context window fills, dsh-chapters archives the conversation as verbatim chapters and opens the next session with a table of contents — compaction costs zero inference tokens, and every byte stays retrievable.
Getting started
Install
Adds the latest dsh-chapters to your harness profile and brings its tools, commands, and the
chapterspreset with it.dsh plugin --profile web add @treeseed/dsh-chapters@0.1.3Keep it current
Updates the plugin to the newest published version whenever you run it.
dsh plugin --profile web update @treeseed/dsh-chaptersRestart, then go
Restart
dsh webso the bundle loads. From any session: click Fork with chapters on a message, or ask your agent to archive and continue. That’s the whole setup.
--profile web is required on every plugin command — swap web for your profile name.
What it gives you
Every claim below is measured, not projected — the runs, counters, and tapes behind it are in Part V.
Compaction that costs zero inference tokens
Summarizing means feeding the whole conversation back through the model, every time the window fills. This plugin archives by copying its own log instead — compacting costs nothing.
Verbatim memory your agents actually use
Archives are the original text, byte for byte — not a paraphrase you have to trust. In the documented run, agents reached into the archive on their own 49 times.
Nothing is ever destroyed
The session log is append-only. Compacting hides old spans in the window but keeps every word on disk, so the original session stays open — branch it, abandon the branch, keep working.
New sessions inherit a map, not a burden
A continuation starts with one short message: a table of contents of everything that came before. About 100 tokens instead of thousands.
The tool-output firehose, defused at arrival
Huge tool results — 40K-line logs, dumped lockfiles — never enter the context window. They are stored once, and the agent can search or read them on demand.
One link turns session memory into team memory
Point your project at a git repository or a TreeDX service, and every session under it can search the shared corpus. Offline it degrades to local-only and says so.
Built for the model on your own GPU
Made for small local models: no API key, no vector DB, no daemon, no telemetry. Your memory is plain Markdown files that any tool can read.
Team steering that respects every machine
Rules are proposals that bind only after each machine approves them. Approved rules ride into every continuation — under a budget that refuses with numbers instead of clipping a line.
Loud honesty, from the engine to the CI
When something cannot be done, the plugin refuses and says why. CI replays real recorded sessions, so nothing can fake green.
Continuity you can click
One button under every assistant message archives the conversation and continues it in a new session. Installing is one line; uninstalling leaves your archive and pool in place.
The commands
Scope & activation. Installing the plugin registers these commands, six agent tools, and the fork button in every session of your profile — nothing else to enable. Routing the host’s /compact through the plugin’s zero-token engine is the one part that needs the chapters preset: pick it from the preset menu in the composer (installed automatically; a continuation session composes its preset itself).
/chapters-link
Bind this workspace to a shared knowledge pool. One link per project — every later session and sub-agent under that path inherits it, and linking publishes what is already archived.
/chapters-link /home/you/team-kb.git # local or bare git repo — no credentials /chapters-link https://github.com/you/team-kb.git <tok> # smart-HTTP pool; token stored 0600 in the DSH home /chapters-link treedx+https://kb.example.com/team <tok> # TreeDX service backend /chapters-link # show the current binding
Linked: project treeseed-ai/kb · transport git · mirror .dsh-knowledge/ Published 30 chapter(s), 2 artifact(s) · Sync: pending first push
/chapters-status
The state of the memory system for this workspace: sync mode with the steps behind it, pending counts, vocabulary mode — or an honest local-only with the failed step named.
/chapters-status
mode: synced (git · treeseed-ai/kb) steps: cloned ✓ → published 2 new file(s), 28 already mirrored ✓ → pushed ✓ pending: 0 · last sync 2026-09-27 21:14 · vocabulary: shadow (17 candidates, apply off)
/chapters-enrich
Drive the background annotator that adds topics and search summaries to archived chapters. Batches run after pushes and on idle by themselves; the body text of a chapter can never be touched — a hash guard rejects it.
/chapters-enrich run # drain the queue now /chapters-enrich model local/qwen3.8-flash-next # choose the annotator (or: model clear) /chapters-enrich report # what was annotated, with provenance
ladder drained: 3 chapter(s) annotated · 12 topic labels · 2 provenance entries appended guard: 0 body mutations attempted · 1 legacy fragment stitched into index view
/chapters-rule
Teach agents durable practices. add writes a write-once proposed rule (it binds nothing yet); approve makes it core on THIS machine only; approved rules ride into every continuation notice verbatim.
/chapters-rule add retrieval "Search the pool for prior findings before designing changes." /chapters-rule list --proposed /chapters-rule approve retrieval/a17f /chapters-rule revoke retrieval/a17f
proposed retrieval/a17f (category retrieval, write-once) — binds nothing until approved approved on this machine (harness "ws-dev") → included in continuation notices under the 1,200-token core budget
/compact
The harness command — listed here because the chapters preset routes it through the plugin: an in-place checkpoint computed from the log (zero inference tokens) that carries your PLOT note forward and archives the hidden span first.
/compact # with the 'chapters' preset selected in the preset menu
surface 57,221 → 23,643 tokens · seqs 10–154 shadowed (33,575 tok) · archived verbatim plot carried: "PLOT: 3 of 6 reports in and cross-verified…" · inference tokens: 0
Authoritative detail — every flag, refusal message, output shape — lives in§15 Commands.