while word_count < x: write_next_chapter(outline, summary_so_far, previous_chapter_text)
It worked well enough that the novels were better than the median novel aimed at my son's age group, but I'm pretty sure we can do better.
There are web-based tools to help fiction authors to keep their stories straight: they use some data structures to store details about the world, the characters, the plot, the subplots etc., and how they change during each chapter.
I am trying to make an agent skill that has two parts:
- the SKILL.md that defines the goal (what criteria the novel must satisfy to be complete and good) and the general method
- some other md files that describe different roles (planner, author, editor, lore keeper, plot consistency checker etc.)
- a python file which the agent uses as the interface into the data structure (I want it to have a strong structure, and I don't like the idea of the agent just editing a bunch of json files directly)
For the first few iterations, I'm using cheap models (Gemini Flash ones) to generate the stories, and Opus 4.6 to provide feedback. Once I think the skill is described sufficiently well, I'll use a more powerful model for generation and read the resulting novel myself.