dsh-novel-writer is a local writing workbench for Chinese web fiction authors, with 19 built-in tools covering the complete writing workflow from pre-writing preparation to cross-chapter structural checkups.
[Primary Uses] It is aimed at creative assistance and consistency maintenance for Chinese novels (especially web fiction). Authors can gather their writing materials before starting, perform quantitative self-checks after finishing, retest revisions by priority, and check structural coherence at the cross-chapter level.
[Main Capabilities]
- Writing Starter Pack (novel_chapter_brief): In a single call before starting, gather 16 items of material, including the previous chapter's continuation point, this chapter's direction, relevant characters, foreshadowing to be resolved, language conventions, style baseline, anchor passages and skeleton, prohibited list, and a pre-writing checklist, offering compact / full budget tiers; materials that cannot be retrieved enter degraded status with reasons given, and it is read-only with no disk writes.
- Revision Workbench (novel_fix_plan): Turn style diagnostics into a prioritized to-do list, including original sentence line-number locations, current values and target values, original-text anchor passages and revision directions, supporting three-state retesting of plan / verify / mark, providing direction only and not generating body text.
- Structure View (novel_plot graph): Check foreshadowing setup spans, continuous character absences, plotline gaps, timeline order, and comparison against the outline.
- Style Profile Report (novel_style_report): A 6-dimensional measurement report covering writing-style fingerprint, high-frequency vocabulary, genre and subgenre, emotion quantification, a 12-axis atmosphere spectrum, and semantic style distance; measurement and judgment are separated, and the plugin reports numbers only without attaching labels.
- 12-Axis Atmosphere Spectrum: nightmare feel, anxiety and oppression, warmth and healing, sweet pet daily life, tear-jerking angst, dark cruelty, suspense and mystery, passionate热血, absurdist humor, loneliness and alienation, literary and aesthetic, and erotic ambiguity, with a traceable evidence chain.
- Local Semantic Engine: Built-in bge-small-zh Chinese model (about 24MB, distributed with the plugin), local CPU inference, supporting novel_semantic_search for natural-language search of semantically related passages across the whole book, with semantic-level style comparison and semantic implicit emotion analysis, lazy-loaded with automatic fallback.
- Sentence Pattern Analysis: Distribution of nine sentence types, arrangement patterns, sentence-length rhythm, emotion curves, style fingerprints, and rhythm suggestions, with caching and report export.
- Emotion Purification and Quantification: Strong/weak emotion word grading, contamination source detection, caveat warnings; Valence sliding window calculation of variance, slope, and contradiction index, identifying implicitImagery carriers.
- Worldview and pragmatic detection: automatic judgment of cultural baseline (Western/Eastern/hybrid) with confidence, speechStyle forms of address, courtesy formulas, rituals, and tone norms, and recognition of genre conventions and web-novel signals.
- Writing assistance: foreshadowing registry, five setting sheets (characters · locations · props · timeline · worldview), chapter summaries, continuity audit, batch import, style self-check, continuation assistance.
- Writing sentinel (novel_continuity_check): continuity check (hard time jumps, semantic distance, character continuity, hook carryover), OOC detection (deviation from a character's emotional baseline), outline-drift detection (overlap between direction lines and main-text keywords).
- Style baseline: six-dimensional writing measurement + per-chapter μ±σ baseline band, supporting custom ±% tolerance per dimension (recommended value = 1.5× the σ of fluctuation across the original chapters). Baseline scope (v6.5.5) can be selected per book as "by whole book" or "by part", supports checking benchmark chapters as the baseline, and the chapter currently being checked is always excluded.
- Original mode and creative materials: the panel can be filled with creative settings (worldview, characters, taboos, main storyline, genre, additional requirements), novel_outline maintains creative materials, originality enforces the chain "setting book→outline→hook", and dynamic batching prevents plot jumps and character OOC.
- Experience and statistics: library statistics cards (chapter count per book, total word count, active word count over the last 7 days), experience demo, report history.
[How to use] Requires Node ≥ 22.3. Three installation methods are supported: command line (can add --profile <name> to specify a configuration), installation from GitHub, and use as an MCP server (usable even without DSH). After installation, restart DSH, and the "Writing Assistant Features" entry appears in the main navigation area of the left column. Basic writing workflow: in the conversation, say in sequence "get materials for the next chapter" → "write chapter 7" → "self-check chapter 7" → "turn chapter 7 into a revision checklist", then after revising, verify and re-test. MCP server: the package includes a built-in stdio MCP server (mcp/server.mjs), which exposes the 19 tools as-is to any MCP client (such as Claude Desktop, Cursor). It is a local process running on this machine; it requires no server, no internet connection, and no persistent process. The priority for the library root directory is --root > environment variable DSH_NOVEL_WRITER_ROOT > current working directory.
[SuitUse Cases】 Daily writing, continuation, revision, and consistency maintenance for Chinese web fiction and novel authors; writing analysis that needs to be localized without exposing the manuscript externally; authors who want to keep their writing style stable through quantitative baselines.
【Limitations and Notes】
- This plugin is designed for Chinese novel analysis and writing. Its core capabilities such as sentence patterns, emotion, and imagery, as well as its built-in semantic models, are all built and tuned for Chinese corpora, and support for other languages such as English is limited.
- It runs locally, and automatically falls back to pure rule-based mode when the semantic engine is unavailable.
- File system read/write is limited to the user-specified library root directory novels/ and its data directory <root>/.novel-writer/, as well as the plugin switch file ~/.dsh/dsh-novel-writer/state.json. The only exception: the src of novel_import can by design point to any directory, and mode:"apply" + move:true will delete the source file. The MCP server by default restricts src to within the library root; when importing from an external directory, use --allow-external-src to explicitly allow it.
- External network: the only outbound call is to the GitHub Releases API to check for new versions, with a 3-second timeout, 24-hour cache, and silent degradation on failure. The request contains no book content whatsoever.
- No subprocesses (the only exception is opening the system file manager); no lifecycle scripts.
- Compatibility range: Node.js >= 22.3, DSH >= 0.1.1-rc.2.
- Runtime dependencies: onnxruntime-web, @huggingface/tokenizers, with peerDependency react ^18.2.0.
【Data Directory】 Under <library root>/.novel-writer/ are included plots (foreshadowing), settings (settings), summaries (summaries), analysis (analysis reports), audits (consistency audits + revision checklists), embedding (semantic index), and style-reports (style profiles).