Preface¶
When writing long-form content or stories within DeepSeek Harness (DSH), models often offer extensive generic advice, whereas what is truly useful is “narrative moves others have used in similar situations.” If the entire library’s retrieval results were stuffed into the conversation, the main text would be flooded with entries, making it difficult to focus in subsequent turns.
storymine is a narrative technique library: it splits books into chapters, extracts actions, and writes them into SQLite. The community plugin dsh-storymine (maintainer: amberpulse, Category: Web Tools) connects this library to DSH. If you get stuck while writing, you can ask, “How did others write this section?” The query results are pushed to the “Technique Library” panel on the right, while the main conversation only retains a brief announcement. The following sections introduce its positioning, capabilities, and installation configuration.
What is this¶
dsh-storymine is a DSH plugin (comprising both host and client halves), not the storymine core itself. The core storymine.py is responsible for chapter splitting, extraction, and database insertion; this plugin handles querying, displaying, and management within DSH.
- Repository: github.com/amberpulse/dsh-storymine
- Community Directory: skillhub.cn/plugins/amberpulse/dsh-storymine
- License: MIT; Current package version: 0.1.0
- Engine Requirements: Node ≥ 20, DSH
>=0.2.0 <0.3.0
Core Features¶
Six Tools¶
| Tool | Function |
|---|---|
storymine_query |
Given a situation description, find reusable narrative techniques from the library |
storymine_stats |
Asset overview: number of books, number of actions, action distribution, progress per book |
storymine_list |
Browse the entire technique table grouped by action |
storymine_failures |
List chapters with extraction failures or suspicious splitting |
storymine_extract |
Extract and insert txt files chapter by chapter (slow, requires batching) |
storymine_delete |
Delete entries (preview only by default, acts only with confirm) |
storymine_query reads SQLite directly on the Node side and utilizes DSH’s model; stats / list / failures / extract / delete require local Python 3.10+ and the storymine.py core.
Right-side “Technique Library” Panel¶
- Entry cards from past queries are grouped by Action with sources cited.
- There is an input box at the bottom of the panel: ask within the panel, and results go only to the panel without taking up space in the main conversation.
- Partitioned by session, can be cleared; styling follows the DSH theme (
--dsw-*tokens).
Tool return values only include “how many entries were pushed + action distribution.” The entry content goes into the panel and store to avoid flooding the conversation. Consequently, the model does not see the full text of the entries; it is up to you to judge whether to adopt a specific technique.
Default “Two-Stage Selection” Query¶
When the library is large, feeding every complete practice to the model at once incurs high token and attention costs. The default queryMode is two-stage: the first round uses short summaries to select shortlistSize (default 20) candidates from the entire library, and the second round provides complete practices only for the candidates to make a final selection. The README records that under the same situation description with deepseek-v4.1-flash, single-stage and two-stage timings are similar, but tokens are saved by approximately 65%. You can also switch to single for comparison.
Installation and Activation¶
The plugin runs with the permissions of the current DSH process; it is recommended to read the repository source code and the MIT license before installation. The community directory is an independent site and has no official affiliation with DeepSeek or High-Flyer.
1. Install to profile (Desktop version also supports: Sidebar “Plugins → Add Plugin → Local Path”)
dsh plugin --profile <your_profile> add /path/to/dsh-storymine
2. Configure library paths in the profile’s cordis.patch.yml (It will explicitly error out if not configured)
- id: storymine
name: 'dsh-storymine'
config:
dbPath: '/abs/path/to/storymine.db'
kernelPath: '/abs/path/to/storymine.py' # Can be omitted if only running query
Environment variables can also be used (config takes priority): STORYMINE_DB, STORYMINE_KERNEL, STORYMINE_PYTHON, etc. See the “Configuration” section in the README for details.
3. Restart DSH (The Host resides in the host process; hot-swapping is not effective)
How to verify installation¶
- A new storymine Technique Library tile appears on the right-side “Get Started” guide page.
- You can ask directly in the panel’s bottom input box, and entries appear immediately (without passing through the main conversation).
- Asking the same question in the main conversation: the body text only contains an announcement + suggestion, while entries are in the panel.
Typical Usage¶
Prerequisites: DSH ≥ 0.2.0 (web profile or desktop version), an existing storymine.db; if there is no library, there is nothing to query.
Example in the main conversation (from README):
Use storymine_query to find some entries: The character just revealed their hand, should the next beat be a resolution or an escalation?
Entries appear in the right-side “Technique Library,” while the body text retains only a one-line announcement. When you need to check library scale or maintenance data, you can call storymine_stats, storymine_list, storymine_failures; for data insertion, use storymine_extract (which follows the kernel’s own storymine/config.json channel and does not consume the DSH provider).
Use Cases and Notes¶
Suitable for: Writing, screenwriting, and narrative design scenarios where a storymine technique library is maintained or planned; users who want to query techniques within DSH without polluting the conversation flow.
Common Limitations (README Known Limitations)
queryoften takes tens of seconds (one model round-trip for each of the two stages); you can reduceshortlistSizeor changequeryMode.- The panel must be used within an already open session; otherwise, it will show
no session surface is mounted. - Model calls for
extractfollow the kernel configuration and are independent of the model selected in DSH. - If the plugin version does not match DSH,
Invalid schema for function ... type: nullmay appear (must satisfy theengines.dshrange).
Troubleshooting Quick Check: If dbPath is not configured, it reports “Technique library path not configured”; only non-query tools require kernelPath; after installation, be sure to restart and check the [storymine] lines in the logs.
Conclusion¶
dsh-storymine embeds the storymine narrative library into DSH tools and the right-side panel: querying utilizes the model and SQLite, while display and archiving are separated. It is suitable for the workflow of “asking how others wrote this section when stuck.”
- Directory Page: https://www.skillhub.cn/plugins/amberpulse/dsh-storymine
- GitHub: https://github.com/amberpulse/dsh-storymine