Skip to content

Productivity: AI book writing

Book Writer

An AI team that writes, fact-checks and publishes book series

In development52%25 of 48 launch items done

Next milestone: Publish Book 2 of the showcase series, then the owner's go to build the web app

Tech stack & architecture

Built with

LayerTechnology
Where it runs todayClaude Code (Anthropic's AI coding tool) on a Mac; the project's instructions and agent definitions are plain files
Lead editor and plannerClaude Fable 5.1, reserved for planning and editorial judgment, never a worker
Worker agentsClaude Opus 5.5 (research, drafting, fact-checking, line editing), Claude Sonnet 5.5 (continuity, art direction, production, speculation panel), Claude Haiku 5.5 (quick mechanical checks)
Pipeline scriptsPython: 19 scripts (about 5,000 lines) for validation, ledger merging, notes, charts, checks, assembly and print
Data formatsYAML and JSON files checked against JSON Schemas; Markdown for all text; the fact ledger as one JSON line per claim
ImagesGoogle Vertex AI (Gemini 3 Pro Image) for cover plates; Python imaging for typography and cover wraps
ChartsPython plotting (matplotlib), drawn from the fact ledger
Second opinion for speculationGoogle Gemini models through Vertex AI, alongside Claude
Ebook and WordPandoc
Print PDFPaged.js page layout, rendered in Google Chrome through Playwright, with running heads, page numbers and page references
PublishingAmazon Kindle Direct Publishing; forms filled through Claude in Chrome in the author's own browser
Version historyGit, with a commit for each finished task
Planned web appA thin web app over the same files, with the Claude Agent SDK as the run engine and a job queue (approved, not built)

How it fits together

flowchart LR
  A[Author] -->|brief, answers, approvals| O[Lead editor AI]
  S[(Series settings file)] --> O
  O --> R[Research and speculation panel]
  O --> B[Blueprints]
  B -->|author approves| D[Drafting agents]
  R --> L[(Fact ledger)]
  D --> F[Fact-checkers]
  F --> L
  D --> E[Line editors and continuity keeper]
  L --> N[Endnotes and charts]
  O --> ART[Art director and Vertex AI images]
  E --> P[Production build]
  N --> P
  ART --> P
  P --> OUT[Ebook, print PDF, Word file, cover wraps]
  OUT -->|author clicks Publish| KDP[Amazon KDP]

The author talks to one lead AI, which plans the work and hands each stage to a specialist agent. Every stage reads files and writes files, so nothing depends on a chat that might end. The series settings file holds everything that changes between series (titles, books, chronology, formats, budget, approval gates and which model does what), and the engine itself holds nothing specific to one series. Facts flow into the ledger, and the endnotes and charts are built from it. The production stage combines text, notes and art into the final files. The author approves the plans, the paid art and the final Publish click.

Services it uses

  • Anthropic Claude, through Claude Code: the lead editor and all the writing, checking and production agents.
  • Google Vertex AI: cover images (Gemini 3 Pro Image) and the non-Anthropic models on the speculation panel. Google's images carry an invisible SynthID watermark, recorded in the book's AI-image disclosure.
  • Amazon Kindle Direct Publishing: ebook, paperback and hardcover publishing and printing.
  • Pandoc, Paged.js and Google Chrome: turning the Markdown text into ebook, Word and print files.

Quality

  • Checks instead of trust. An agent's "done" counts only after small programs agree: schema validation, ledger merge and counts, reading-level and banned-phrase checks, narrator rules, a fork check that shared chapters are identical in both branches, a placeholder scan, and print verifiers.
  • No words lost. Every automatic conversion is checked to prove it changed no words; the Book 1 build was confirmed word-identical to the edited text.
  • Facts. Book 1's ledger holds about 900 entries; Book 2's fact-checks add one ledger file per chapter and branch.
  • Not yet: there is no automated test suite for the pipeline scripts; they are tested by use. Recording AI usage and cost per run is also still to come. Both are on the roadmap.
  • Releases: books are built by the build scripts and published by the author on Amazon KDP after a print preview.

Updated 2026-11-23