A Novel-Writing AI Toolchain That Checks Its Own Plot Coherence
Hello everyone, I'm Xiaofeichang, a former programmer now running a one-person company. Today I'm bringing you a novel-writing Skills component that supports writing full-length novels. It can build a knowledge base, reference the style of novels in the knowledge base, and also supports a coherence detection feature. If you're interested, keep reading~
1. I've upgraded my novel workflow and Skill
Recently, a few group members said the novels they wrote got signed, and they asked if I could make a Skill to improve efficiency. My answer was, of course. When this novel workflow came out yesterday, the group was buzzing; everyone wanted to try it.
I made an n8n version of a novel Skill before, and earlier this year I also made a short-story Skill. This time I integrated them together, and also integrated them into my workbench. It's more fitting to call it a Skills component rather than just a Skill. This component runs through the entire novel process, including material collection, outlining, character setting, chapter writing, and coherence detection. I further integrated it into the workbench, so you can call the novel-writing and novel-knowledge-base-building functions by clicking buttons on the interface.
1.1. Writing a Novel
To start a new novel, click the [Start a New Novel] button. After jumping to a new page, fill in the novel's name and the Obsidian knowledge base path. The knowledge base path is used to store the already-written novel chapters, allowing you to intuitively open the knowledge base and view the written content.
After clicking the [Create and Enter Writing] button, you can start preparing to write. From the image below, you can see that the novel Skills created a directory in the knowledge base based on the novel's name. I'm writing a farming novel called "Little Lucky Field, Surplus Grain Every Year." Next, you can start perfecting the outline and designing characters.
In the next step, you can fill in the novel's outline, character names, and the knowledge base to reference when writing novel chapters. These are all optional; if you don't want to write them, AI can generate them with one click, but I still prefer to draft the outline and define the characters myself.
The "Write Next Chapter" function can extend the story based on the existing chapters. If it's the first chapter, it starts writing based on the outline and character settings.
The written chapters can be saved directly in Obsidian, making it convenient to reference and connect them when writing the next chapter. Many AI-written novels suffer from plot incoherence; I use Obsidian to store data, which effectively avoids this problem.
When writing the next chapter, you can see the outline and the content of the previous chapter. I also added a new feature: users can customize the plot direction. If you feel the AI is deviating from the plot, you can manually correct it.
You can also check continuity while writing a novel. Just click the [Check Continuity] button. This function mainly checks the coherence between each chapter and character OOC (out-of-character) issues.
After waiting a few minutes, you can view the continuity report. Incoherent parts can be fixed with AI. I haven't currently implemented a feature to batch-write dozens of chapters, because fixing that, whether from a manpower or token perspective, is too cumbersome. Later, when I have a better idea, I might plan to do this; the core issue is still coherence.
1.2. Building a Novel Knowledge Base
There are two ways to build a knowledge base: you can build it based on locally collected novels, or you can collect online novels into the local knowledge base.
Building a knowledge base is very important. I now basically have my own knowledge base system. I have ones for Xiaohongshu, short videos, public accounts, Xiaohongshu virtual materials like wallpapers, novels, etc. But I also found that more knowledge isn't always better. Taking wallpapers as an example, I found that as my knowledge base grew, the wallpapers drawn seemed not as good as before. My initial guess is that as the materials increase, the styles become more varied, and the AI doesn't know which one to pick. Text has a similar problem; more isn't always better. My initial idea to optimize this is to build more subdivided directories, so the AI only references a small, specific subset of materials each time. This view still needs to be confirmed, and a follow-up article will fill this gap.
2. Overview of the Novel Skill's Technical Structure
This novel Skills component mainly consists of two parts: "Novel Creation" and "Novel Knowledge Base." The novel creation module is responsible for creating projects, perfecting outlines, setting characters, generating chapters, fine-tuning the text, and checking continuity.
The novel knowledge base module supports organizing local novel materials and can also fetch online reference content, providing writing materials and method references for subsequent creation. All content is saved to Obsidian according to a fixed structure. When writing a new chapter, the Skill reads the existing content and continues the creation based on the user-specified plot direction, reducing the problem of incoherent plots. This Skill has been included in the support group's resource library, and group members can directly use it.
3. The Workbench is Great
I've now put almost all my pillar Skills into my workbench, calling them directly through the page interface. It's indeed much more convenient than typing AI commands every time.
It can not only serve as a master control panel for Skills for visual invocation but also manage my daily affairs. Workbench Skill guide: I made a Skill that can build a personal workbench with one click, open-sourced
The biggest purpose of building my workbench is to centralize content originally scattered across different Skills, folders, and conversations into a single interface. You can directly click on whatever function you need, and the generated results can be directly viewed and saved. That's all for today's article. Thank you for watching, see you next time~