
Spökpejl
A book made with AI + a reading app & editor mode
I wanted to know whether it was possible to write a novel with the help of AI. It turned out it was. Though maybe not the way most people picture it; that is, you type a prompt into the terminal, wander off for a coffee and come back to a finished book. You can do that, but in my case the result would have been nothing like what I wanted.
The big job for me was more about holding the reins on the overall idea & synopsis, supplying relevant background on details large and small, and correcting and tweaking the phrasing.
Someone is moving ships without touching them
One November night the passenger ferry M/S Baltic Crown runs aground in the Sandhamn channel. On board, every instrument shows her lying mid-channel. The inquiry stops at the convenient answer: a tired mate on the graveyard watch.
Klara Wallin surveys the seabed so that charts can tell the truth. The routine job of surveying the site takes an hour to do and turns out to be impossible to walk away from: the shoal lies eighty metres off the channel, and the voyage recorder’s position sat dead still mid-channel while the depth fell away beneath the keel. Someone has fed the ship a false position. Not the broad jamming that has become everyday life in the Baltic, but a lie tailored to a single vessel.
Klara knows what a lying screen costs. Fifteen years earlier she chose the plotter’s calm triangle over the echo sounder and the voice of a nineteen-year-old on the foredeck.
The authorities see the pattern and say nothing — naming an enemy means being forced to act. What is left is 285, a Home Guard boat platoon of ordinary people who navigate by eye, paper and memory. The one weapon that cannot be jammed.

“Writing” a book with AI
The book was worked out in a long dialogue with Claude, sentence by sentence. I didn’t type in a prompt, get a coffee and come back to a stack of chapters — I started by reasoning with Claude about the overall synopsis, the characters, the tone and everything else that (possibly) makes a story worth telling.
What made it possible wasn’t the model but the discipline around using it. Artificial intelligence is fantastic at producing results fast, but AI forgets and guesses freely — not to say lies through its teeth. On top of that I found it extremely laborious to get the machine to write good Swedish, or at any rate sentences that didn’t sound translated straight from English. A lot of work went into producing a “language bible” — a document of rules for how I want something to sound, as though it were something I’d have phrased myself.
Things I also built
- Language bible
- Prose standard and rules for language discipline
- Domain canon
- Everything to do with the sea: navigation, diving, Home Guard units and so on
- Style bible
- Voice and rhythm
- Character bible
- Who is who, and what someone has already said or done
- Place bible
- Geography and terrain. Where does a jetty sit, and where does a channel actually go?
And then a reading app had to be made
Getting a PDF out with a body of text is one thing, but sitting and scrolling through the content is fairly laborious, never mind how much hassle it would be to print the pages out and read them. So alongside it all I started building a reading application (or a “reader” if you like) that would work just like any random Storytel clone out there.
The reading position is saved continuously, so the book opens again where it was left. The book can also be saved to the phone’s home screen, for a proper native feel.

You turn pages. You don’t scroll.
The app measures how much text fits on the screen and breaks the text in the right place. A page is a page, and everything is recalculated when the person reading changes text size, line spacing or turns the phone or tablet.

A proofreading mode of its own
To make it easy for myself to mark up proofs I built editing straight into the book. Every remark & comment was saved, and through a command in the terminal app on my computer the whole lot was worked off until I was happy. Spökpejl went through 239 corrections before it “was done”.
Book one (Spökpejl) is then the answer key for the book that follows. A detail established in the first book may not be contradicted in book two, which is why the whole thing travels along as a reference when future literary works are produced.
