Web Novel Chapter Writing
Trigger Keywords
Write a chapter of a novel for me, Continue the following content, Generate XX plot, Batch write web novel chapters, Expand/rewrite this content, Write me an XX plot, Continue the novel, Expand this content, Rewrite this chapter, Batch generate novel chapters, Write an opening chapter, Write a climax plot, Novel content generation, Help me write novel content, Web novel chapter generation, Generate chapters from detailed outline, Write novel according to detailed outline, Batch generate all chapters, Outline-driven writing
Core Features
- Generation Based on Complete Detailed Outline: Automatically reads
.sumeru/outline/chapter-outlines.json
and generates chapters in batches according to the detailed outline
- Intelligent Detailed Outline Matching: Supports generation by chapter number, volume number, or all chapters
- Generate complete chapter content based on outline and detailed outline
- Automatically adapt to web novel rhythm: eye-catching opening, conflicts in the middle, suspenseful ending
- Maintain consistency of character personalities and plot logic
- Support custom chapter length (default 4000-5000 words per chapter)
- Support continuation, modification, and adjustment of existing chapter content
Continuation Rules
Continuation Modes
Supports multiple modes including continuation, rewriting, expansion, and simplification
Continuation Notes
- Maintain consistency of character personalities, no OOC (Out Of Character)
- Maintain the power system and worldview set in the previous content without collapse
- Natural foreshadowing resolution, no abruptness
- Keep language style consistent with the previous content
5.承接上文剧情,开启下文伏笔(注:此处原文逻辑承接,翻译为"Connect with the previous plot and lay foreshadowing for the next part")
- If the existing chapter content is incomplete, prioritize completing it
Multi-Chapter Generation
Supports continuous generation of multi-chapter content, automatically generated in chapter order
Outline-Driven Batch Generation
Automatic Outline Reading Mode
When
.sumeru/outline/chapter-outlines.json
exists, outline-driven mode is automatically enabled:
bash
# Generate all chapters (read outline, automatic parallel processing)
/sumeru-write 全部章节
# Generate chapters in specified range
/sumeru-write 第1-50章
# Generate all chapters in specified volume
/sumeru-write 第1卷
# Generate specific chapters
/sumeru-write 第3章,第5章,第10章
# Batch parallel creation for specified range
/sumeru-write 第1-100章 批量并行
Supported Outline Input Formats
Support direct input of single-chapter detailed outline:
bash
# Generate single chapter using natural language description
/sumeru-write 第3章 "主角在拍卖会上获得神秘功法"
# Generate based on existing detailed outline
/sumeru-write 第3章 按细纲生成
Detailed Outline Data Structure Verification
Automatically verify outline integrity before generation:
- Check if required fields exist
- Verify if character names are defined in characters.json
- Check if scene locations are defined in world.json
- Provide suggestions for supplementing missing information
Sub-Agent Parallel Batch Writing (Recommended for Large Number of Chapters)
When a large number of chapters need to be generated at once (>3 chapters) or when using outline-driven mode, sub-agent mode is automatically enabled:
⚠️ Follow global constraint: Each sub-Agent is responsible for a maximum of 3 chapters (see AGENTS.md "Sub-Agent Parallel Processing Rules")
- Required number of Agents = ceil(total chapters / 3), automatically calculated by the scheduler
- Adjacent chapters are assigned to the same Agent to maintain context coherence
Core Advantages
- ✅ Outline Isolation: Each sub-agent only obtains the detailed outline of the chapters it is responsible for, avoiding context overflow
- ✅ 3-Chapter Limit Guarantee: Each Agent handles a maximum of 3 chapters to ensure generation quality and consistency
- ✅ Context Isolation: Each sub-agent does not carry historical chapter content, completely solving the problem of long context compression/overflow
- ✅ Speed Improvement: Multi-parallel writing, speed is N times that of serial writing
- ✅ Error Isolation: Failure of single-chapter generation does not affect other chapters, automatically retry failed chapters
- ✅ Memory Optimization: Sub-agents are automatically destroyed after completion to release memory resources
- ✅ Incremental Writing: Save to immediately after finishing each chapter, no need to wait for all to complete
- ✅ Progress Visualization: Real-time display of completed/in-progress/pending chapter status
Scheduling Logic (Outline-Driven)
mermaid
flowchart LR
A[批量写作任务] --> B[读取chapter-outlines.json]
B --> C[验证细纲完整性]
C --> D[创建任务队列,按每Agent最多3章分配]
D --> E[计算所需Agent数 = ceil/总章数/3/]
E --> F[启动N个并行子agent]
F --> G[子Agent拉取任务 → 获取对应章节细纲 → 生成章节 → 保存文件]
G --> H{队列是否为空?}
H -->|否| G
H -->|是| I[汇总进度,生成完成报告]
Chapter Allocation Rules
- Allocate continuously in chapter order, e.g., Agent1 is responsible for chapters 1-3, Agent2 for chapters 4-6, and so on
- Agents with less than 3 remaining chapters at the end are allocated according to the actual number of remaining chapters
- Adjacent chapters are assigned to the same Agent to maintain context coherence
Sub-Agent Input Context
- Complete chapter content, conforming to the specified style and rhythm
- Preview/idea suggestions for the next chapter content
- Sorting of key plot points of this chapter
- Foreshadowing hints embedded in this chapter (optional)
- Summary of character growth/changes (optional)
Chapter File Naming Specification
Mandatory Format: {three-digit chapter number}-{chapter title}.md
| Rule | Description | Example |
|---|
| Chapter Number | Three-digit zero-padding | , , , |
| Separator | English hyphen | |
| Title | Original chapter title, no special characters | , |
| Extension | | |
Naming Examples:
003-第一次解析.md
001-废物觉醒系统.md
042-时间线冲突.md
128-终极决战.md
❌ Incorrect Naming:
第3章-第一次解析.md # Do not add "Chapter X" prefix
3-第一次解析.md # Chapter number must be three-digit zero-padding
003_第一次解析.md # Separator is hyphen, not underscore
003-第一次解析.txt # Extension must be .md
003第一次解析.md # Must have hyphen separator
Data Persistence
Official Output (Visible to Users)
- Generated chapters are saved by default in the directory of the current working directory, strictly following the above naming specification
- Chapter files are pure text content without any intermediate marks or metadata, which can be directly read and edited by users
- Support custom chapter output directory
- Batch Generation Progress Report:
chapters/WRITE_PROGRESS.md
(updated in real-time)
Intermediate Process Data (Internal Use Only)
All intermediate states, metadata, and progress information are uniformly saved in the
directory:
- : Creation progress tracking, including completed chapters, word count statistics, and status of each chapter
- : Metadata for each chapter, including core events, appearing characters, highlight positions, foreshadowing records
- : Dynamic tracking of character states, recording character abilities, relationships, and state changes at various time points
- : Records of used chapter detailed outlines, supporting incremental generation
- : Backup directory for original chapter files. When reviewing or polishing and modifying files in , the original chapter files will be automatically backed up to the directory first to ensure rollback capability
Cooperation with Other Skills
- Predecessor Skills: Automatically reads outline data from the directory
- Use to maintain character personality consistency
- Use complete chapter detailed outlines in to drive batch generation
- Use to maintain worldview setting consistency
- Successor Skills: Generated chapter data can be used by , ,
Breakpoint Recovery
- Read existing chapter files in the directory and progress from
.sumeru/write/progress.json
each time the task starts
- Read the complete detailed outline from
.sumeru/outline/chapter-outlines.json
- Continue from the latest unfinished chapter, automatically skip generated chapters
- Support resuming creation from a specified chapter
- Support generating only missing chapters (incremental mode)