A book written from a library: how Religions, Cults and Power was made
Blog · turning-points

A book written from a library: how Religions, Cults and Power was made

Lesson from:

96 AI agents, one private library, strict rules on attribution, and 282 fixes from the reviewers: the method behind a 1,542-page study

Just after ten on the evening of 22 October 2026, a planning agent was handed the first part of a book. By 03:22 the next morning, 96 AI agents had planned, written and fact-checked 167 of its 174 chapters, making 8,446 tool calls between them. A second, smaller run filled the last gap before four. Every chapter came back with a bibliography of real works, each with a catalogue number you can look up.

Two days later the book had a DOI. It is called Religions, Cults and Power: From Zoroaster and Mithra to the Singularity. The print edition runs to 1,542 pages.

I did not write it in the way people usually mean that word. I wrote the brief and its rules, I reviewed the result, and I built, over a summer, the library it was written from. This post is about how that works, what went wrong, and what I think a book like this is, and is not.

Contents · 11 sections

In one minute #

  • The book is a study, in 17 parts, of how religions, cults and political power developed together: from the Indo-Iranian world, Zoroastrianism and Mithra, through Judaism, the Greco-Roman mysteries, Christianity, Islam, the religions of India and East Asia, the Western esoteric tradition and Freemasonry, Satanism and modern occultism, new religious movements, and religion and politics, to two modern bodies of thought, the Keshe Knowledge Seekers workshops and Mitchell Heisman’s Suicide Note, and a closing comparison.
  • It was drafted by AI agents working only from my private library and its offline reference shelf, under rules I set: report what the sources say, attribute every claim, label the kind of source, add no opinion.
  • One reviewer agent per part checked citations and quotations against the library: 2,963 checks and 282 fixes.
  • It is published under CC BY-SA 4.0 on my personal blog and on Zenodo, with a colophon that says exactly how it was made.
  • The lesson: AI can draft at a scale no single person can. What makes the result worth reading is not the model. It is the library under it and the rules around it.

The before: a shelf too big to read #

By the summer of 2026 the Religion & Spirituality shelf of my library was the largest subject in it. When I surveyed it on 8 August it held 1,185,799 searchable chunks from 21,831 files, about 254 GB. Scholarly monographs, primary texts in translation, insiders’ accounts, apologetics and polemics from every side, esoteric writers, conspiracy literature, a large share of it in Romanian. Several hundred workshop transcripts from one movement. One treatise of about 1,900 pages by one author.

That is more than one person reads in a lifetime. It is also exactly the kind of material where a quick answer from an AI is dangerous. Ask a chat model about a contested question in religious history and you get a fluent paragraph that blends sources, smooths over disagreement, and sometimes cites books that do not exist. My own small local models had done exactly that on this very shelf in August, when they invented library citations outright.

So the question was not “can AI write about this?” Obviously it can. The question was whether it could write something you could check, line by line, against the books it claims to rely on.

The rules #

Every agent in the workflow received the same block of text at the top of its instructions, headed “Rules for this study (the owner’s brief)”. The book’s preface sets them out for readers, and its first sentence of purpose is the one I care about: the brief asked for a study, not a judgement.

Three rules govern every chapter.

Facts as the sources present them. Material is not softened or omitted because it is offensive, sensitive or contrary to current consensus, and no moral commentary is added. A reader who wants to know what a given author claims should find it, in that author’s terms.

Fidelity means attribution. No single author’s claim is presented as established fact. Sentences take the form “According to Moulton…” or “Keshe claims…”. Where the library has no independent check on a claim, the chapter says so.

Neutral connective prose. The editorial voice links, summarises and compares. It does not argue. Where there is a debate, each side gets its strongest evidence, as its own authors give it.

The rules are strict for a reason that has nothing to do with the subject. An AI that is allowed to editorialise will editorialise in the voice of its training data. An AI that must attribute every sentence to a source in a catalogue has much less room to invent.

The method: sources, grades and citations #

The first chapter of the book is about method, and it describes something I would recommend to anyone writing from a large collection: grade your sources. The study sorts its material into three grades:

  1. primary texts in translation: scripture, the Avesta, the Rigveda, inscriptions;
  2. scholarly secondary works: historians and scholars of religion writing about a tradition from outside it;
  3. insider or advocacy works, read as evidence of what their authors believe, not as evidence of what happened.

A founder’s account of his own teaching is grade three. A Masonic author describing Freemasonry is grade three. That is not an insult. It is a label that tells the reader what kind of statement they are reading.

The second body of evidence is the offline reference shelf: Kiwix archives of the English and Romanian Wikipedia, Wikisource and Project Gutenberg, running inside my lab with no internet needed. It supplies dates, names and mainstream summaries, and it is the baseline against which single-author claims are read. I wrote about that shelf in its own post.

Citations are inline and look like this:

[Boyce, Zoroastrians, #55117, ch. 6 "Alexander and Iran"]
[Keshe, KSW 360, #378072]
[Wikipedia: Theories about religion]

The number after the hash is the work’s identifier in my catalogue. That one detail is what makes the whole thing checkable: an agent cannot cite “a scholar” in general; it has to name a work that exists, by a number that resolves. A citation that does not resolve is visibly broken. The library post explains how those identifiers came to exist in the first place, out of almost a hundred thousand messy files.

The night: plan, write, review, synthesise #

The workflow had four phases.

Plan. One planner per part read the shelf through search tools and proposed a list of chapters with synopses. Seventeen planners.

Write. Sixty-one writer agents, each given a few chapters, the rules and the plan, wrote chapters of roughly two thousand words each, searching and reading the library as they went, and returned a bibliography with every work they cited.

Review. Seventeen fact-and-citation reviewers, one per part, took the finished chapters and checked them against the library: does each catalogue number point to the author and title claimed, does each quotation appear in that text, does each claim attributed to an author match what the author wrote.

Synthesis. One agent wrote the preface and introduction from the finished parts.

The review reports are the part I find most instructive, because they show what goes wrong when a machine writes from sources. A few real examples from the review of the part on Israel and the Second Temple:

  • every one of the 86 distinct catalogue numbers cited across ten chapters resolved to the right author and title;
  • about 32 passage-level spot checks confirmed the quotations;
  • one key point listed archaeological sites slightly differently from the cited author’s text, with one place swapped for another. Corrected to his wording;
  • one chapter had presented its own application of an author’s scheme to a later period as if the author had made it. He had not, in the cited passages. It is now marked as the study’s application;
  • one claim attributed to a historian could not be found in his text at all, and was removed.

Not invention, mostly. Drift. A paraphrase that slides a little, an inference that gets attributed to the source, a list that gets tidied. Exactly the errors a tired human writer makes too, at a speed no human writer reaches. Across all seventeen parts, the reviewers recorded 2,963 checks and 282 fixes. That ratio is the most honest number in this post.

What went wrong #

The first planner, for Part 1, was stopped by a safety classifier before it finished, and returned one chapter instead of eight. The book’s foundations were missing. Before four in the morning, a second, smaller run of five agents wrote the seven missing chapters and corrected the introduction. Then I found that the preface still said Part 1 was incomplete, written when it was, plus three wrong cross-references between parts. All fixed, the book rebuilt and re-imported. The lesson went into my record: after a gap is filled, search the front matter for statements about the gap.

On 24 October, asked for a PDF for the archive, an AI assistant rebuilt the book from the blog copy with a generic e-book converter instead of using the book’s own LaTeX pipeline: raw HTML on the part pages, the wrong font size, web breadcrumbs in the text. My reply is preserved in the mistake entry, in capitals: “REDO IT IN PLAIN LATEX”, “I HAVE ALREADY THE ORIGINAL TEX FILE”. The proper build, from the chapter sources through pandoc and XeLaTeX, produced 1,542 pages with zero missing characters. The same evening, a different edit to the book’s landing page stripped its layout and left it as one run-on paragraph for about 40 minutes before anyone noticed, because a text search said the page was fine and only a rendered screenshot showed it was not.

None of this is glamorous. All of it is what publishing actually is.

The technical heart: why the library matters more than the model #

If you take one idea from this post, take this one. The quality of AI writing from sources is bounded by three things, and the model is the least important of them.

The catalogue. Every citation needs a stable identifier that resolves to one work. Without it, “according to Boyce” is unfalsifiable. With it, a reviewer agent can check every claim mechanically.

Retrieval that returns real passages. The writers did not answer from memory. They searched an index of the actual texts, in English and Romanian, and read the passages they cited. A model writing from memory blends; a model writing from retrieved text quotes.

A separate reviewer with the same tools. The writer and the reviewer must be different agents with different instructions. A writer checking its own work finds what it meant to say. A reviewer finds what it actually said.

The rest is plumbing: a script that assembles the chapters and bibliographies, pandoc to LaTeX, XeLaTeX for typesetting, and the same chapter files exported to the blog so the online and print editions cannot drift apart.

Licence, honesty and the colophon #

About a third of the book is attributed quotation; the longest single quote is 128 words. Some of the reference material comes from Wikipedia, which is CC BY-SA. So the book is CC BY-SA 4.0, the only fully compatible choice: anyone may reuse, translate and build on it, with attribution, under the same terms. The copyright page also says that quotations remain the property of their authors and are used for study and criticism, with attribution.

And it says this, which I consider the most important line in 1,542 pages: drafted with AI assistance from the LSN library and its offline reference shelf, and reviewed by the author.

The book is on my personal blog as 177 posts, and on Zenodo, the open archive run by CERN, as Revision 2 with the DOI 10.5281/zenodo.23623219. Why that permanent record mattered is the subject of the previous post in this series, on proof. The book’s fingerprint also sits in the library’s provenance ledger, next to every other file in the library.

What it is, and what it is not #

It is a map of what a large private library says about one of the oldest subjects people write about, ordered, cross-referenced and cited to the shelf.

It is not peer-reviewed scholarship, and it does not pretend to be. It is not a statement of my beliefs: the rules were written precisely to keep my opinions, and the model’s, out of it. It is not complete: where the library holds only one side of a question, the book can only report that side, and says so. One limitation is stated outright in the text: for one modern movement the library holds no independent biography of its founder, so his account of his own life is reported as self-account throughout.

And it is not “AI wrote a book”. People wrote every source. I built the library, wrote the brief, set the rules and reviewed the result. The agents did, in five hours, the reading and drafting that would have taken me years, and they did it under rules that made their mistakes findable.

Questions people ask me #

Can AI really write a book-length study from sources? #

It can draft one, if the sources are organised and the rules are strict. The drafting is the fast part. The hard parts are the catalogue that gives every source an identifier, the retrieval that returns real passages, and a separate review that checks every citation. Without those, you get a fluent, confident book that cannot be checked.

How do you stop AI from inventing citations in a long document? #

Make every citation point to an identifier in a catalogue, and check them all with a separate reviewer that has access to the same texts. In this book, the reviewers recorded 2,963 checks and 282 fixes. The fixes were mostly drift, not invention: a paraphrase that went too far, or an inference credited to the source.

Why is the book CC BY-SA instead of all rights reserved? #

Because it quotes material licensed CC BY-SA, and share-alike is the only licence fully compatible with that. It also matches the purpose: a study built from a library should be free to reuse, translate and correct, with attribution.

Does the book express the author’s own views on religion? #

No. The rules for every chapter forbid moral commentary and require every claim to be attributed to a named source. Where sources disagree, each side is presented with its own evidence. The book describes what the library’s authors say, not what I believe.

Closing #

There is an old picture of the scholar alone in a room full of books, reading for decades to write one. I have the room full of books. I do not have the decades.

What I learned that October night is that a machine can do the reading at a speed that feels like a different kind of thing altogether. But it can only be trusted with the room if every book has a number, every claim has a source, and someone is there in the morning to check the work. The library came first. The rules came second. The book was, in the end, the easy part.