Writing a historical novel with Claude Code
How I “wrote” a book in Russian in 17 hours, and then spent a week fixing mistakes
A HERO
William Herschel, the man who discovered Uranus, has been my hero since I read about him in Encyclopedia for Children in late 60ies. I was completely mesmerised by the picture of his giant telescope. I learned that he cast, cut and polished all his mirrors himself, not just constructed the tubes, and built the scaffolding.
It triggered my early interest in natural sciences, and I dubbled in building telescopes myself albeit on a much smaller scale.
Much later my Ph.D. thesis was about processing astronimical images in ground based optical synthetic apertures. So that was the background.
Relatively recently I learned that he was originally a German from Hanover, and came to England as a musician, an oboe player. The new English ruling dynasty was the House of Hanover. What I did not know it was just a part of the story. He was a military musician in a Guards regiment that was protecting the British coast, was called back to Hanover to fight the French, deserted, and fled back to England.
He made a good career as a musician, gave lessons to nobility, secured a position as an organist in the city of Bath, wrote 24 symphonies and some concertos. He made a pretty decent living out of it.
Then he studied music theory which led to mathematics which led to natural sciences and astronomy in particular. His main achievment was to discover a new planet which he named Georgium Sidus, George’s star to honor the King. In return, the King gave him a pension, position of a court astronomer, and as the legend has it, pardoned him for the desertion.
I know two other personalities who combined music and science: Alexander Borodin who wrote the magnificent opera Prince Igor, and who was an accomplished organic chemist, and Brian May of the band Queen, who has a Ph.D. in astrophysics. Sir Herschel was actually the first one of a kind chronologically.
I got so excited about the story, that decided to write a historical novel. I’m no writer. I have earned a Ph.D. in physics in my time, and I am a decent musician multi-instrumentalist, but words are not my medium.
My first surprise was that there was no book about Herschel. People prefer to write about his sister Caroline who was supporting William for most of his life, and discovered several comets herself. So, the way to writing a book in my native Russian was open!
BUILDING THE FOUNDATION
So, I put Claude Code to work.
The first step was to collect the sources before writing anything. We ran deep research on Herschel, the Hanoverian army, Minorca, Bath, Pulkovo, the people around him, dates, facts. The rule was strict: no fiction, but mark the gaps the documents leave open. Physics, optics and music had to be correct. The afterword names every invention and liberty we took.
An AI forgets between sessions. A novel can’t. It has to be consistent. So we had to craft memory, and put all the findings into it. A short CLAUDE.md tells every new session to read them first. The memory of this project is a git repository with .md files.
After the sources were collected, we interactively crafted the skeleton of the book. I felt that we needed to add a bit of fiction around the desertion, so we came up with a plot line that was not in the documents but was plausible.
Writing the initial text did not take much time: about seventeen hours, forty thousand words. I started reading.
The structure held. The plot held. The voice, which Claude modelled from my Facebook posts, felt sufficiently mine: short, choppy, matter of fact.
The Russian did not hold.
The model writes mostly grammatically correct Russian, but it is built like English. Inanimate subjects doing things (“the hill fired”), words that mean one thing in English and a different thing in Russian. I called them calques, the linguists’ term for loan translations.
Two examples. The model kept using “paper” for any document: a discharge, a pass, a permit, a leave. English does that. Russian has a different word for each, and the book’s central object, the discharge, became “the paper” in half the chapters. And a word it used three times next to “paper”, “politely”, was wrong in a way I could not immediately explain, until I realised that in Russian politeness is always directed at a person, never at a document.
So I created three critics: a generic one, and two prompted as contemporary Russian historical belletrists, Valentin Pikul and Boris Akunin. The changes proposed by all three were approved automatically, and disagreements were manually moderated. They also caught factual errors, problems with dates, names, etc.
I corrected chapter one line by line, about fifteen remarks in an evening, and then asked the obvious question: can we generalise? We could. My corrections became eight rules (later twenty-four), and then I built a critic whose only job was to find calques across the whole book. Four agents read it in parallel and returned 170 findings in about three minutes. In the second pass I gave them the git diff of my own edits as calibration, so they could see not just the rules but my hand. That pass produced nearly 400 findings.
Then I built a reading page. The whole book is laid out paragraph by paragraph; I select a phrase, tag it (“awkward”, “unclear”, “check the fact”), and send it. The comment lands in the session, the text gets fixed, the book rebuilds, a commit is made, a reply goes into the thread, and the thread closes. About two hundred threads have gone through it so far.
WHAT THE CRITICS CAN’T SEE
Critics are good at grammar and calques. What they can’t catch is anything the model itself finds obvious. It wrote a line of dialogue that reads perfectly to the model, which knows the whole scene. I read it and had no idea what the character meant. The same goes for historical realities nobody explains, and for jokes encrypted so well that only the model can decrypt them. The critics said all of it was fine. I noticed.
The author also catches the physics. The model wrote that a mirror “breaks” light where it should have said “reflects”. It put a tube with no eyepiece into a scene about observing the Moon.
The critics edit the language. The author has to edit the world.
WHERE I CHANGED THE PLOT
I didn’t like how the discharge was handled. It’s the document proving that William was legally released from the army, so not a deserter. In the early draft his father got it, and the tension dropped. Claude offered to adjust the timing: hide it longer, or give it to his brother. I saw the problem was structural, and suggested something else: William doesn’t know the document exists until his conversation with the King. The complicated relationship with his brother Jacob does the rest.
In the end William believed himself a deserter for 59 years. Jacob held the document back, and his sister Caroline kept silent until he dictated his memoirs. The model doesn’t hold the question the whole book asks. The author does.
WHAT I’D TELL SOMEONE TRYING THIS
Turn corrections into rules. One complaint becomes a class of complaints.
Keep memory in files, not in the conversation. Canon, characters, chronology, plan, rules, and a short instruction file that says to read them.
The model knows the word and misses the company the word keeps.
Critics will agree with the model. A human reader won’t.
Use real sources and name your inventions. A reader should know where the history stops.
Speed is a blessing and a curse. Seventeen hours to a draft is thrilling. The week of line edits afterward is where the hard work is done. Just like with vibe-coded software, I spent more time debugging the book than creating the original draft.
I’m still editing. A few hundred small fixes to go.
The book is in Russian.
If you read Russian, check it out: https://claude.ai/artifact/2TjW2TCzCJHmSr4TVg1Zqs, and feel free to report “bugs”, just by highlighting a piece of text on the page.
If you don’t, a translation, if it ever comes, will be a separate adventure, and I suspect the calques in the opposite direction will become a different set of problems.


Discussion about this post