Introduction
Writing a book becomes harder as the book grows.
Not only because of writing itself, but because of the growing write–read cycle.
Every new chapter increases:
- context size
- consistency management
- restructuring costs
- update overhead
At some point, large books start behaving similarly to large software systems.
Continuous publishing pipeline for modular AI-compatible books.
Software Engineering Already Solved This
Software engineering solved large-system complexity using:
- modularity
- separation of concerns
- automation
- build pipelines
- continuous delivery
So while writing a playbook on business automation, I started applying the same principles to book publishing itself.
The Publishing Pipeline
Instead of maintaining one giant document, the book is split into modular Markdown files:
001-introduction.md
002-automation.md
003-ai-systems.mdThen a build pipeline combines them automatically into multiple outputs.
edit chapters
→ press build
→ automatically generate:
- styled PDF edition
- AI-readable markdown editionThe architecture behaves similarly to software deployment pipelines.
Why AI-Readable Books Matter
Books increasingly have two audiences:
humans
+
machinesA growing amount of reading will happen through:
- ChatGPT
- Claude
- Gemini
- AI agents
- RAG systems
- knowledge systems
Instead of manually reading hundreds of pages, people will increasingly upload books into AI systems and query them conversationally.
Project Structure
book/
chapters/
dist/
scripts/
styles/Example:
book/chapters/001-introduction.md
book/chapters/002-automation.mdThe Tooling
The stack is intentionally simple:
- VSCode
- Markdown
- Pandoc
- CSS
- PowerShell
- wkhtmltopdf
No CMS. No publishing platform. No vendor lock-in.
The Build Process
The build script:
- combines chapters
- converts Markdown → HTML
- injects styling
- generates PDF
- exports AI-readable Markdown
Example:
pandoc combined.html
→ PDF
chapters/*
→ combined markdown
→ LLM editionCore Principle
content
≠
presentationMeaning:
- Markdown = ideas
- CSS = styling
- scripts = automation
This keeps the publishing process scalable and maintainable.
Conclusion
I think books will increasingly behave like software systems:
- continuously updated
- modular
- machine-readable
- automatically published
Especially:
- technical books
- playbooks
- internal documentation
- AI-native knowledge systems
Resources
Automated Book Publishing Repository (github.com/MichaelZelensky/automated-book-publish)