Introduction¶
A common practice when writing long-form fiction in DSH is to mix tasks, chats, and setting files together: character cards scattered across notes, main text in another directory, relationships kept in your head, and having to search “where did this name appear” every time you revise a chapter. Novel Studio (lyjsyyds/dsh-novel-studio) installs long-form writing into DSH as an independent workspace: a book icon in the sidebar opens a bookshelf and eleven content sections for the current work, plus tabs for search, progress, relationship graph, validation, AI, export, and other tools. Data remains local YAML and Markdown; the plugin is only a read/write and presentation layer; Agents in chat can also directly operate the library through sixteen registered tools.
What This Is¶
Novel Studio is a DSH client plugin released by maintainer lyjsyyds (npm package name dsh-novel-studio-lyjs, GitHub repository dsh-novel-studio, current version 0.2.1, MIT license). It requires the DSH engine >=0.2.0-rc.1, injects sidebar and main panel into the browser side, and provides HTTP routes and Agent tools on the host side.
Community directory page: skillhub.cn/plugins/lyjsyyds/dsh-novel-studio (independent site, no official affiliation with DeepSeek / 幻方). Source code: github.com/lyjsyyds/dsh-novel-studio.
How the Interface and Data Are Organized¶
When the sidebar icon is opened, the left side shows the bookshelf (one entry per novel; the arrow next to the title can collapse it into a vertical edge, width preference is stored in the browser, and it defaults to collapsed when no record exists), and the right side shows the current book’s Overview · Characters · World · Outline · Panels · Chapters · Materials · Drafts, as well as tools like Search · Progress · Import · Settings and Relationship Graph · Validation · AI · Export.
Each work occupies an independent folder in the library root directory, with the default root path being ~/.dsh/novels. The actual root directory is determined by priority: explicit parameter → environment variable DSH_NOVEL_ROOT → location saved in the panel (written to root in ~/.dsh/novel-studio.yaml) → default path. The environment variable locks the library (when GET /root returns locked: true, the panel becomes immutable), preventing test data from being written into the production library.
The typical directory structure is as follows (excerpt from README):
~/.dsh/novels/<book-title>/
book.yaml work metadata
settings.yaml
characters/<id>.yaml characters
relationships.yaml relationships
world/ worldview
outline/ outline
panels/ panel outlines
chapters/<id>.md chapter text
meta/ chapter metadata
drafts/ snapshots
materials/ materials
publish/ publish artifacts
Core Features¶
The following documents the capabilities in the order of “write settings → write main text → check problems → hand off to AI / Agent”.
Full-Library Search and Writing Progress¶
Search searches the entire book from one entry point: main text (with line numbers), records and fields from all sections, material file names, raw YAML; after a hit, jump to the corresponding section and highlight it.
Progress records daily net output based on progress.yaml (deleting main text counts as a negative value, rather than “0 words today”), displaying total word count, today and this week, consecutive writing days, a 30-day curve, as well as the gap after setting goals, daily average words needed, and estimated completion date based on the current pace.
Relationship Graph and Consistency Validation¶
Relationship Graph connects characters, factions, locations, and items into a network: record fields (such as faction leader, location region, item owner) automatically form edges, while manually written edges go in relationships.yaml. When only viewing characters, their affiliated factions still appear as gray context nodes. The graph supports zooming (0.5×–4×) and drag-to-pan.
Validation is a read-only scan of the entire book: dangling edges, invalid [[links]], duplicate or missing chapter numbers, unresolved or overdue foreshadowing, long-absent supporting characters, reappearance after exit, potential leaks, calendar/age inconsistencies, empty sections, etc., classified into three levels: errors / warnings / hints. The same panel includes “Reader Reports”: simulated readers score each chapter and generate emotional curves (results stored in reader/reports.yaml).
The Calendar sub-feature is pure local arithmetic: combining world/calendar.yaml, world/festivals.yaml, chronology, and character birth years, it calculates festival countdowns and ages under the “now” date, without calling any model.
Main Text, Drafts, Import/Export¶
Draft box saves snapshots before modifying chapters; before restoring from a draft, it automatically saves another “pre-restoration” state, making step-by-step rollback possible.
Export can render Markdown manuscripts, plain text, single-page HTML, or complete JSON backups (including section and material text, excluding local paths), supporting preview, copy, download, or writing to the book’s publish/ and recording manifest.yaml.
Import defaults to preview only: JSON can restore the entire library or restore as a new book; pasted Markdown can be split into chapters by forms like # Chapter One; existing files under materials/, publish/, import/ can also be read in. Whole-book replacement requires secondary confirmation.
Books deleted from the bookshelf are moved to the library root directory’s .trash/ (renamed but bytes not deleted), and can be restored from the “Recycle Bin” or permanently deleted.
AI Panel and Agent Tools¶
The panel AI tab composes prompts using the current book’s real data: relationship graph, characters, world rules, terminology, storylines, beats, chapter index, validation issues, etc.; before running tasks like continuation, polishing, outline deduction, or consistency review, you can check which entries to include (the section list is derived from lib/schema.js, and newly added extension sections will automatically appear).
The plugin registers 16 tools with the DSH tools service (the panel still works if there is no tools service), for example:
| Tool | Purpose |
|---|---|
novel_library |
Create books, list books, modify metadata, delete books |
novel_records |
Read/write entries in various sections |
novel_graph / novel_link |
Read relationship network, add/delete/modify relationships |
novel_validate |
Run consistency validation (read-only) |
novel_search |
Full-book search |
novel_chapters / novel_drafts |
Chapter ordering and draft box |
novel_progress |
Progress query and goal setting |
novel_export / novel_publish |
Render export and write to publish/ |
novel_import |
Import JSON / Markdown etc. (including dry-run) |
novel_ai |
Execute book AI tasks in chat |
novel_extract |
Recognize new entries from main text and fill empty fields into the library |
novel_guide / novel_extension |
Read manual, scaffold extensions |
Extensions are placed under lib/extensions/, and host-side code besides lib/index.js is hot-reloaded by mtime, taking effect on the next HTTP request; browser-side changes take effect after refreshing the page. See EXTENSIONS.md in the repository for details.
Other Panel Capabilities¶
Website interface saves common publishing platform backends as cards, with the list stored in ~/.dsh/novel-studio.yaml, only accepting http:// / https:// links, and opening in a new tab on click.
Settings are written to settings.yaml (e.g., theme, autosave, fontSize, wordGoal); reading font size uniformly applies to main text, AI results, export previews, etc.
Installation and Activation¶
The local installation method given in the README is to link the plugin directory to the desktop profile (you need to put the repository in a directory on your machine first; the text does not expand on clone steps):
dsh plugin --profile desktop add link:<absolute-path-to-this-directory>
After installation, the profile’s bundles will include dsh-novel-studio-lyjs, and node_modules/dsh-novel-studio-lyjs points to a Junction of that directory; modifying plugin code generally does not require reinstallation. The npm package name differs from the GitHub repository name because dsh-novel-studio is already taken on npm; the command writes a directory path, which is irrelevant to the package name difference.
The only dependency is yaml ^2.9.1; the plugin reads and writes the library within the DSH process with the current user’s permissions, and it is advisable to read through the source code and MIT license before installation.
Typical Usage¶
- Switch library or migrate: In the panel settings, “Change” the library root path, and you can check “Move existing books along”; you can also use
POST /rootto pass{ root, move? }, or set the environment variableDSH_NOVEL_ROOTto pin the location. - Agent writes settings: First use
novel_recordswithaction: 'schema'to view section paths, then read/write character, worldview YAML entries; usenovel_linkto modify relationships, andnovel_validateto check the problem list after modifications. - Agent writes main text:
novel_draftssaves a snapshot before modifying chapters;novel_chaptershandles missing numbers and reordering;novel_extractcanrecognizecandidate entries from new main text, thenapplyto only fill empty fields. - Continue writing in the panel: Open the AI tab, check the setting entries to feed to the model, select a task for streaming generation; before generation, you can use
GET /library/:book/ai/tasksto view the task menu (HTTP routes and the panel share the same data layer). - Publish backup: Use panel export or
novel_exportto get text; when saving to disk is needed, usenovel_publishto write topublish/.
On the development side, you can run npm test in the plugin directory to run smoke tests; for a running DSH, you can use node tests/http.e2e.mjs to make real HTTP requests (README “Development” section).
Use Cases and Notes¶
Suitable for: Authors who maintain multiple long-form works in DSH over the long term, want settings, outlines, main text, relationships, and validation closed-loop in the same UI and Agent tools; need a pure file-based library for git or manual YAML/Markdown editing.
Notes:
- The plugin runs in the same process and file system permissions as DSH, so do not point the library path to an untrusted shared directory; link-type configurations (website interface) only allow http(s).
- Agent tools are unavailable without a
toolsservice, but the client panel can still operate the local library. - Cross-book reuse of settings uses the cross-book shared library described in the README (explicit promotion and import), which does not automatically link data between multiple books.
- The community directory is only for discovery and description; installation commands follow the README and official DSH CLI documentation.
Conclusion¶
Novel Studio separates long-form writing from the general task flow into an independent workspace: structured YAML, Markdown main text, relationship graphs and read-only validation, net output progress, as well as AI and sixteen Agent tools that read real settings. If you are looking for a client-side novel workbench in the DSH ecosystem, you can learn about it from the directory page, view the complete README, EXTENSIONS.md, and testing instructions on GitHub, then install it into the desktop profile using the link method.
- Directory page: https://www.skillhub.cn/plugins/lyjsyyds/dsh-novel-studio
- GitHub: https://github.com/lyjsyyds/dsh-novel-studio