dsh-novel-forge
dsh-novel-forge: code guardrails for long novels—outline contracts, machine review, fact ledger, foreshadowing tracker, versioned chapters.
Install
dsh plugin --profile web add github:huangziyuan-general/dsh-novel-forge Screenshots 5
What it solves
Long-form AI writing usually fails in four ways: broken settings/power levels, the model “can’t see” earlier text, cross-chapter repetition and runaway word counts, and pervasive AI flavour. This plugin’s design principle is enforced by code > trusted to the prompt, turning every part with an objectively right answer into a hard constraint at the tool/data layer:
- Stage gates:
novel_write_chapterrefuses to write until the chapter outline is approved; the nine-stage state machine validates entry conditions in code and lists exactly what is missing. - Consistency:
novel_ledgerrejects same-chapter value changes, rejects chapters that run ahead of the timeline, warns on overdue foreshadowing;novel_worldbookpins canonical settings and injects them automatically. - Anti-padding: machine review detects 8-character shingle overlap with prior text and refuses to save above threshold; default length gate is 2000–4000 characters per chapter (target 3000), announced in the pre-write briefing.
- Anti-AI-flavour:
novel_noai_scanruns a six-dimension structural scan (boilerplate sentences, stock-word density, direct emotion statements, sentence templates, paragraph-rhythm variance, information dilution) — fully local, zero tokens. - Context supply:
novel_briefingassembles a budgeted context pack (outline → promises → scene contract → character cards → voice cards → ledger → foreshadowing → worldbook → previous chapter ending → anchor passages). Scene contracts support hidden characters: their dossiers never enter context and naming them in prose is blocked by a content gate. - No silent overwrites: revisions go through
novel_proposeproposals; a new version is created only after the user clicks Apply in the panel, and old versions are never overwritten. - No infinite loops: three consecutive rejections of the same chapter trip a circuit breaker that refuses further writes until the outline/contract is fixed.
- Batch drafting: concurrent generation, serial submission, every chapter passing the same gate; a checkpoint file after each commit lets
resume:truecontinue from the break point.
Who it’s for
- Authors using DSH for web-serial / long-form fiction who want “settings stay consistent, no padding, no breaking character” enforced by workflow instead of repeated reminders.
- Token-cost-sensitive users: most checks (full-book health check, golden-three-chapters diagnosis, AI-flavour scan, platform review, retrieval) are deterministic local computation with zero model cost.
- Writing teams that need auditable output: audits produce deterministic numbers, model review must cite evidence, and machine review is separated from model review.
Highlights
20 novel_* tools: project management and nine-stage board, book/chapter outlines plus approval, character cards with voice genes, worldbook, scene contracts, pre-write briefing, chapter commit, fact ledger with point-in-time snapshots, AI-flavour scan, chapter and book-wide audits (including Qidian/Fanqie platform review tables and seven-category sensitivity self-check), style baselines and a 12-axis mood spectrum, proposal-based revision, book import (md/txt/docx), whole-book export, golden-three-chapters diagnosis, paragraph-level polishing, long-form retrieval index, reference-library structure profiling, glossary, and project cloning.
Right-sidebar Forge panel: per-session project list, chapter reading and text-to-speech playback, one-click polish / mechanical proofreading (output as proposals), full-book health check, golden-three-chapters diagnosis, batch drafting with break-point resume, proposal approval, book-card management, session-fatigue warnings and one-click handover to a fresh session.
Install
# from npm (recommended)
dsh plugin --profile web add npm:dsh-novel-forge
# local development (symlink)
dsh plugin --profile web add link:/path/to/dsh-novel-forge
Restart DSH web and hard-refresh afterwards; a ”🔨 Forge” tab appears in the right sidebar, and listing the 20 novel_* tools in a session confirms success. Requires Node ≥ 22 (22.19+/24+ enables the retrieval index, otherwise it degrades gracefully).
Notes
- Writing must go through a session (briefing plus multiple commit gates form a multi-turn loop); the panel handles reading, batch drafting, health checks and proposal approval.
- Screenshots in the repository are real renders of
lib/client.jsusing fictional sample data, not a real book.
Compiled from the project README · All rights belong to the original author
Report issue / Request removal