# Multi-Core Collaborative Novel Writing > [简体中文](./README.md) | English A **multi-agent novel-writing mode** for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai): one "conductor" leads the whole operation while 5 specialized subagents each own their own job — building the world, planning the plot, managing characters, writing the prose, and reviewing the quality. The preset bundles the `novel-writing` engine skill (length-driven pipeline + hard gate checker script + 33-dimension structural audit) as the studio's single operating manual. Pick it when you start a new session and this ready-to-work "writing studio" carries a novel from an idea all the way to a finished draft. ## What is it It's not just a chatbot — it's a **6-person novel studio with clear division of labor**: **one "conductor" leads, 5 "specialized subagents" each do their own job**. Unlike the old approach where *one AI plays six roles by turns* in a single conversation, here every position is a real, independent agent: the one who writes prose only writes prose, the one who checks only checks, the one who owns the world only owns the world. Each subagent carries only its own slice of work in its context, so it doesn't interfere with the others — more focused, no flavor mixing. | Role | Strength | What it does | | --- | --- | --- | | Conductor | Full-time general manager; doesn't write, so it can make objective calls | Assigns tasks; runs the hard gate script; keeps pacing, settles disputes, signs off the final draft; if the same chapter is rejected 3 times in a row, convenes all subagents to recalibrate the *Narrative Constitution* | | World subagent | The single authority on worldbuilding and proper nouns | Produces the *World Rules Whitepaper* and *Glossary Index*; expands every setting into "what it is + why + how it affects the story"; records the power gap between protagonist and ceiling to prevent power creep | | Plot subagent | Chief planner of the main plot and cause-and-effect | Uses the "node method" for mainline nodes, turning points, and the foreshadowing ledger; writes a per-chapter memo before any prose; writes an explicit "because… therefore…" causal chain for every node — no forced plot; actively plants foreshadowing and designs conflicts | | Character subagent | Archive keeper of each character's soul and voice | Builds "four-dimension soul" profiles (surface traits / hidden desires / psychological thresholds / relationship web) and "voice gene cards" (sentence length / catchphrases / forbidden words / signature gestures); refuses stereotypes, writes growth arcs, keeps behavior believable | | Prose subagent | The sole writer — focused, undisturbed | First obeys the other subagents' settings (constitution / foreshadowing / world / character); breaking them requires a "waiver request"; easy-to-read, non-essay-like prose; description serves the characters; no direct emotion statements (hint through action or setting); chapter length follows the size agreed at project setup | | Reviewer subagent | Only finds flaws, never rewrites — objective stance | Checks the text against all settings line by line; three-color-light ruling: 🔴 fatal → reject for rewrite with reasons, 🟡 warning → approve after fixes, 🟢 pass; long-form chapters go through a 33-dimension structural audit (JSON on disk); also verifies the "naturally unfolding" plot and outputs pacing advice plus chapter-ending hooks | ## Installation This is a **DSH preset plugin**: once installed, it automatically registers the 「多核协同写作模式」 preset with DSH, so you can simply pick it when starting a new session. ### Option 1: Install as a plugin (recommended) Run this single command in your DSH terminal (works on Windows / macOS / Linux): ``` dsh plugin --profile web add github:sailoumili/novel-writer ``` After installing, **restart or refresh DSH web**, then pick 「多核协同写作模式」 when starting a new session. ### Option 2: Manual install (fallback) Prefer not to use the command line? You can also install manually: #### One-line script Windows (PowerShell) — copy and paste this single line: ```powershell irm https://raw.githubusercontent.com/sailoumili/novel-writer/main/install.ps1 | iex ``` macOS / Linux (terminal): ```bash curl -fsSL https://raw.githubusercontent.com/sailoumili/novel-writer/main/install.sh | bash ``` After installing, **refresh or restart the DSH page**, then pick 「多核协同写作模式」 when starting a new session. #### Manual download 1. Click the green `Code` button → `Download ZIP`, then unzip. 2. Rename the extracted folder to `novel-writer` (GitHub's zip folder usually has a `-main` suffix — remove it). 3. Move the `novel-writer` folder into your DSH presets directory: - Windows: `C:\Users\\.dsh\.agent-presets\` - (`~/.dsh/.agent-presets/`, where `~` is your home directory) 4. Refresh (or restart) the DSH page. 5. When starting a new session, pick **多核协同写作模式**. ## How to use 1. After picking the preset, send one message with your genre and core premise, for example: > Genre: Eastern fantasy + cosmic horror. Premise: a hunter who can see others' "death countdowns" tries to save a village about to be devoured by an Old One — without being corrupted himself. 2. The conductor first loads the bundled `novel-writing` skill (the studio's operating manual), then follows its flow, **pausing for your approval at every step** (it won't dump chapters on you): - It asks for your **length settings** (total chapters, words per chapter, language, revision gate) and picks the "short-story anchor" or "long-form anchor" mode; - It dispatches "World" and "Plot" to a joint session to draft the *Narrative Constitution* and the *World Whitepaper* outline → wait for your approval; - After approval it dispatches "Character" to generate the main character profiles → saved to local files; - It dispatches "Reviewer" for a foundation review (up to 3 rounds), then asks for permission to write Chapter 1 → it writes only when you say go. ## It reads and writes files — please note To keep profiles and ledgers across sessions, this preset gives the AI **file read/write permission**. For each new novel it creates a project folder in your workspace (`` is the project name, optionally date-prefixed at setup): ``` outputs// ├─ book.md size settings: genre/total chapters/words per chapter/gate/mode ├─ story/ │ ├─ brief.md your original premise (supreme authority, never modified) │ ├─ constitution.md Narrative Constitution: core conflict, world rules, hard constraints │ ├─ whitepaper.md World Rules Whitepaper (incl. power ceiling and gap) + glossary │ ├─ outline.md outline (volume-level map / full per-chapter for short stories) │ ├─ roles/.md each character's "four-dimension soul + voice gene card" │ ├─ pending-hooks.md foreshadowing ledger (planted/advanced/resolved, 3-chapter warning) │ ├─ current-state.md state card (current chapter/position/goal/conflict…) │ ├─ chapter-summaries.md per-chapter summary table │ └─ plans/ per-chapter memos (planning always precedes prose) ├─ chapters/ │ ├─ 0001_title.md … final chapter texts (always the latest version) │ └─ index.md chapter index: no./title/status/words/audit score ├─ revisions/ review reports, revision trails, dead drafts (0001_v1.md …) └─ packaging/ blurb & selling points when the work completes ``` A bundled hard-gate script (`skills/novel-writing/scripts/check.mjs`) programmatically checks every chapter's word-count band and the "de-AI-flavor" rules (transition-word density, banned sentence patterns, em-dashes) — a chapter that fails the gate blocks the next one. File operations still respect DSH's own sandbox policy; the preset does not bypass the sandbox. ## Chapter versioning - Each chapter's final text lives in its own file: `chapters/000N_title.md` — always the **latest version**. - **Never overwrite on revision**: before a rewrite, the old text is moved to `revisions/000N_vX.md` (X starts at 1) as a dead draft; the new text is written back to `chapters/`. - **Only the final text counts**: continuation reads only the file in `chapters/`; dead drafts are kept but ignored. - `chapters/index.md` records each chapter's status, word count, and audit score — read it first when continuing. ## Editing it - The conductor's "brain" is in `agent.cordis.yml`; the full studio operating manual is in `skills/novel-writing/` (SKILL.md + references/ + the checker script). - The installed preset lives at `~/.dsh/.agent-presets/novel-writer/` — editing files there works too: the plugin **only writes files that don't exist and never overwrites your changes**. - To upgrade to the plugin's bundled version: delete the whole `~/.dsh/.agent-presets/novel-writer/` folder and restart DSH — the plugin will lay down a fresh copy. - Uninstalling the plugin (`dsh plugin --profile web remove novel-writer`) does not delete the preset files already written. - To delete it entirely: remove the folder `~/.dsh/.agent-presets/novel-writer/`. ## License [MIT](./LICENSE)