triptych

Building fun experiences for the web

What started out as a kind of self-care and an exploration of what Claude Sonnet could do, I have worked out a simple and direct way to create science fiction and fantasy novels using Claude Sonnet and other tools like Nano Banana, Cline, and Claude Code.

For many years I have had a backlog of story ideas – half baked thoughts about some set of characters, or a unique situation I wanted to see played out in a short novel. The past year has been a rough one for many people, including myself, and I wanted to see if I could combine two aspects of my interests: AI ( coding ) and Writing.

I have been creating web projects way before the phrase “Vibe Coding” was a thing and I have picked up a few techniques that have helped me with creating web projects. I wondered if I could coax Claude Sonnet to write a full length novel based on my story ideas, so I set out and approached it like I would a website coding project.

I could go into all the false starts and problems I ran into while trying to build a novel via AI, but I thought it would be best to share my current process and touch upon a few findings.

The process

  1. Decide on a genre – I usually picked Cozy Fantasy, or Funny Fantasy.

  2. Ask the AI to search for the primary aspects of that genre and save into research.md

  3. Brainstorm ideas for a high level plot – collaborate with AI to create a list. Pick something fun and compelling

  4. Flesh out the story plot and store in plot.md

  5. Ask the AI to create supporting documents based on the research.md and plot.md —> emotional-arc.md, sensory-details.md, magic-system.md, character-profiles, world-history.md, and writing-style.md. Review these to make sure they fit your vision of your novel.

  6. Based on all the documents created above, ask the AI to create a comprehensive chapter-by-chapter.md which has checkboxes when each chapter is complete, includes the word count and story beats, and is at least 30 chapters long. ( This last aspect is important because the AI will try to create as short a story as possible and acts “lazy” if you let it )

  7. Create a loop.md workflow. This workflow tells the AI to read all the documents above, determine the next chapter to write in the chapter-by-chapter.md , write that chapter, then update the chapter-by-chapter.md – taking also into consideration the previous chapter if it exists. ( This is also a critical aspect – if you just have the AI write the next chapter it will often place characters in random locations, or a character that died in the previous chapter miraculously comes back to life )

  8. Run this workflow over and over in a “clean context” window for every chapter. Do not try to create many chapters at once. The AI gets more and more dense the longer it goes in one session and the novel will suffer for it. The loop.md gives enough context and reading the previous chapter helps it understand just what to do. I tried having it write the whole novel in one session and it was not great.

  9. When you have gotten to the last chapter the real work begins. I would recommend at this point backing up the files you have created to say github. You will be making some changes to the files that may be destructive and you don’t want to lose the work you already started. Create a prompt that tells the AI it is a talented and relentless novel editor, and you want it to read over the whole novel and call out any inconsistencies, plot holes, timeline issues, etc. And store that in an evaluation.md file.

  10. In a new context, ask the AI to review the evaluation.md file and come up with a plan to fix all the issues. I used to skip this part early on and the novel ended up with odd things like characters who’s names would change, or strange plot holes that just went nowhere. This is an essential step to make your novel take a half-step out of the uncanny valley. Tell it to carry out the fix it plan with as minimal changes to the story as possible. You don’t want it to rewrite the whole thing just for one small issue.

  11. You’re done! Almost!

Beyond the Writing

What happens now? You have a bunch of markdown files and some background documents. Not yet much of a book is it? This is the point where you can rely on the AI to help you get the book in shape, as well as create a nice website for your book so you can distribute it.

Give it some Character

As soon as I finish the content of the novel I want to see the characters and book cover for this work. It really helps make the book come alive and gives something for folks to understand more about your novel. I prompt the AI to read the character backgrounds and the plot documents and create comprehensive image prompts for all the main characters. I then feed those prompts into a site like fal.ai which has a ton of models you can choose from to generate amazing imagery. I will have it create the book cover and the main characters. The point of this will be to enhance the book website you will want to create.

Build the Book

Once you have the cover, you will want to create the artifacts to distribute your novel. As a prerequisite for this step, you should set up Pandoc on your local machine. Pandoc is an amazing piece of software that can convert documents from one form to another. What we want it to do is take the markdown files and convert them to HTML, ePub, and PDF. I won’t go into details about how to get that set up, but for the context of this article, I just prompted the AI to create a build.bat file in Windows to take the documents and convert them to HTML, PDF, and ePub in an output folder using Pandoc. The AI got this down in one shot every time. Often before this step I would ask the AI to create a metadata.yml file which contains the book title, author, and summary and have it use that file in the build.bat. Once this is done, run the batch file and see if it outputs the documents as you expect. For me sometimes the AI will add notes or metadata in each chapter like word count or completed state, you’ll have to run some script to strip that out. The AI can create a batch file to fix those things. Run the build script once again to get a completed novel and save this or commit to git.

Make a Site

Ok, now we have a novel, some book artifacts, some images, but how do you share this? The next step in our plan is to have the AI create a book site for you. I usually write a prompt to ask the AI to consider all the background documents and the image prompts and create a book site that matches the style of the book. I ask it to use the cover and other images in the site, and to link to the HTML, PDF, and ePub files in the output folder. Make sure it uses the metadata.yml and links to your own homepage if you like.

After you have created all this stuff, you need a place to publish it right? For me I use an amazing site called Puter.com . This is a site that lets you host all kinds of web based apps, run them in a simulated desktop environment, and even host websites and other things. You can even sync your files via webdav or just drag and drop files up via the simulated desktop environment.

Here’s the link to my latest novel which I have also made available via github: https://github.com/triptych/mothership and the book website: https://mothership-book.puter.site/

I have honed this technique after many many trials and errors, and this has worked the best for me.

The Library

After creating a few of these novels, I struggled to work out an easy way to share them. Each book has it’s own site, but there’s no real sharing between them and if you ran across one, you might never know any of the others exist. So taking another idea from my coding side of things, I created a master website that hosts links to all the other books. I call it The Library. As of this writing I have 34 novels there – some better than others and all of them are free for you to read, download, and share. They represent the realization of a dream I have had for a long time, but never have had the time or ability to complete.

Here’s the current list of books:

The Chaos Sword – A village girl bonds with an ancient, sentient sword

The Librarian's Index – A magical library with a living Index

Gears and Spirits – A tinker's tale of friendship and invention

The Dark Lord's Bed & Breakfast – A retired villain runs a B&B

A Witch on the Line – Thriller about a mysterious phone connection

The Enchanted Teahouse – Tea brewing becomes a gateway to magic

The Magical Herbalist's Apprentice – Plants that speak and ancient wisdom

Mistweaver – Tarot cards become powerful magical entities

Mountain Odyssey – Romantasy in treacherous magical peaks

Reborn as a Boat – Identity and friendship in an unexpected form

The Shrine Gentleman – A hunter becomes a shrine keeper

Starlight Salvage – Finding beauty in space junk

Stellar Tides – Magic and technology blend in floating islands

Suffer the Dragon – A monster healer instead of a hunter

The Fallen Star – Advanced technology versus corrupt sorcery

The Sigil – Multiverse adventures and cosmic mysteries

Nine Lives: A Servant of Anubis – Supernatural noir detective story

Bards of Discord – Rock music meets fantasy adventure

Nightwing Academy – Victorian steampunk shapeshifters

The Gateway – Guarding a magical portal to another realm

Dragon Crossing – A dragon and a boy switch bodies

The Last Vanguard – Science fantasy romance with AI

The Comprehensive Guide to the Best Inns and Outs – Journey of found family

Bramblewood – Romantic fantasy with elemental magic

Clarity – Dark sorceress finds redemption and love

The Unbroken – Ancient magic with a deadly price

A Familiar Feeling – Caring for abandoned magical creatures

Toy Wars – Romantic comedy with living toys

The Undead Groundskeeper – Gothic romance about curse-breaking

The Tower's Shadow – Identity and memory in dark fantasy

Cybrina – Corporate magic versus true witchcraft

The Lost Librarian – A librarian thrust into the real world

Fantasy House Flip – Retired adventurers flip cursed castles

Mothership – A colony ship AI transforms into a protective mother

Quirks

There were many interesting quirks that came up when I was working on these novels. The AI ( Claude Sonnet) would often use the same names for the characters across different books. For female leads it would often choose Lyra or Elara, and for males it would choose names like Kyle. Bad guys would sound like Malachar, or Mal- something. And for some reason it has an unreasonable love for adding a location called the Whispering Woods.

Another quirk in the AI was that it would often try to steer the storyline into a situation where the main character was just one of many of their kind, and that the story would try to establish a school to teach more folks like the main character become powerful. Another theme was that instead of having the good guy win or the bad guy win, the AI would try to seek some third option – a compromise between the two opposing sides ideas. It was very strange to see these things happen time after time. So if you need to have more unique storylines, I suggest you give your prompts advice to avoid those names and situations.

I hope you find this article interesting and I look forward to hearing about what you have learned from it.

I’m going to experiment and try to write a blog post every day for a month, starting today until Nov 4th. It doesn’t have to be about anything at all, but perhaps if I can get into the habit of blogging again good things will happen. Right now I’m working on a new cozy fantasy novel about a travelling tea house, and I’m playing games to help myself feel better. Outside of that, it’s chores and cleaning every weekend.

I will talk about the story a bit more tomorrow. I’m using Cline + Claude Sonnet 4.5 to help me with the plot and story writing.

It has been a while since I’ve written much. I’ve been using AI to guide stories and that’s interesting and fun, but more of a diversion than really writing. It’s like having a team of folks that listen to your ideas and create worlds around it. I think it’s a great way for a writer to get out of a slump, and begin to feel creative again. But at the end of the day, writers write. I have a story in mind for this year, and I have a goal to get it written by the end of the year. It’s time to start figuring out what I want to say in this story, and begin to craft that in a way that others would like to read. I also need to start blogging every day – if you want a muscle to get stronger – even a writing muscle – you have to exercise it. So, here I go.

The Tea Dragon's Apothecary

In a sleepy village nestled between enchanted forests and misty mountains, a disgraced alchemist named Elara stumbles upon a wounded tea dragon. Tea dragons are rare creatures whose leaves brew magical teas that can heal, inspire, or even reveal hidden truths. Elara, who lost her license for a potion gone wrong, reluctantly takes the dragon in and begins to care for it. Along the way, she’s joined by a grumpy ex-knight with a cursed sword, a runaway noblewoman who can talk to plants, and a mischievous street urchin with a knack for stealing hearts. Together, they turn Elara’s crumbling apothecary into a haven for misfits and outcasts. But when a mysterious illness threatens the village, Elara must confront her past mistakes and learn to trust her newfound family. A slow-burn romance blossoms between Elara and the ex-knight as they brew teas, share secrets, and heal each other’s wounds.

-—

The Clockwork Catacombs

Beneath the cobblestone streets of a steampunk city lies the Clockwork Catacombs, a labyrinth of gears, traps, and forgotten treasures. Lila, a thief with a mechanical arm she can’t fully control, accidentally awakens an ancient clockwork cat who claims to be the guardian of the catacombs. The cat leads her to a hidden sanctuary where a group of eccentric inventors, each with their own flaws and failures, have built a cozy underground home. Among them is Finn, a charming but reckless engineer who’s haunted by the death of his former partner. As Lila grows closer to the group, she discovers that the catacombs are under threat from a greedy industrialist who wants to exploit their secrets. With the help of her found family, Lila must outwit the industrialist and protect the catacombs—all while learning to embrace her own imperfections and the possibility of love.

-—

The Baker of Broken Things

In a whimsical village where pastries can mend broken hearts and bread can bring forgotten memories, a reclusive baker named Sorrel is known for her ability to fix things—except her own life. Sorrel’s past is a mystery, even to herself, and she’s haunted by nightmares of a magical disaster she can’t quite remember. When a group of strangers arrives in town—a bard with a broken lute, a cursed librarian who turns into a cat at night, and a wandering blacksmith with a shattered sword—Sorrel reluctantly takes them in. Together, they discover that Sorrel’s baking magic is tied to a forgotten kingdom and a prophecy that could save or destroy the world. As Sorrel pieces together her past, she finds herself drawn to the blacksmith, whose quiet strength and vulnerability mirror her own. In the warmth of her bakery, surrounded by the smell of cinnamon and the laughter of her found family, Sorrel begins to heal.

-—

The Lantern Keeper’s Guild

In a world where lanterns hold the light of people’s souls, the Lantern Keeper’s Guild is responsible for protecting these fragile lights from the shadow creatures that lurk in the dark. Nia, a former guild member who was exiled for accidentally extinguishing a lantern, lives alone in a crumbling tower on the edge of the wilderness. When a group of misfits—a lantern thief with a heart of gold, a scholar who’s lost their own light, and a rogue lantern spirit—seeks refuge in her tower, Nia is forced to confront her guilt and rejoin the fight against the shadows. As they work together to relight the lanterns and restore hope to the land, Nia finds herself falling for the lantern thief, whose optimism and resilience challenge her to believe in second chances. Together, they rebuild the guild into a found family of outcasts, proving that even the darkest nights can be illuminated by love and friendship.

-—

The Starry-Eared Inn

Perched on the edge of a cliff overlooking a starlit sea, the Starry-Eared Inn is a haven for travelers, adventurers, and those running from their past. The innkeeper, a half-elf named Calla, has a secret: she can hear the whispers of the stars, which guide her to those in need of shelter. When a storm brings a group of strangers to her door—a pirate captain with a cursed compass, a runaway prince with a knack for storytelling, and a shy astronomer who’s lost their telescope—Calla’s quiet life is turned upside down. As the stars warn of an approaching danger, Calla and her guests must work together to protect the inn and the magical ley lines that converge beneath it. Along the way, Calla finds herself drawn to the astronomer, whose quiet wisdom and starlit eyes remind her of the constellations she loves. In the warmth of the inn’s hearth, surrounded by laughter and the glow of the stars, Calla discovers that home isn’t a place—it’s the people you choose to share it with.

Wondering if I might start blogging again…

I was going to do some work on my Denweaver site this weekend, but ended up doing other things with family as well as resting on Sunday. However, I did do some work. I was writing down some ideas for the site, and I also played a few other web based games.

One game in particular – which is meant to be a sort of learning game for kids – really inspired me as they have a really smooth and clean way to introduce players into the game. The site is https://www.prodigygame.com/ and I started looking at how they onboard new players. They do some clever things with cut scenes, and show you your little home and how to interact with NPC’s as well as a few battles to help you learn the ropes. I really like this kind of “learning by doing” and they also add a bit of storyline and motivation for you to play.

Originally I was going to just tell the player they have a house, and a dungeon and how the mechanics work and let them just start out. But I really like this idea of just putting them in the world, have a short cut scene that introduces the first level of mechanics and get them immersed right away. It’s so much better than the expositional style I was going to go with.

Here’s an example screen

And here’s one with the upsell

They do such a great job with color, design, and everything. I’m super impress with this supposedly kids learning game.

Another example

This is helping me rethink how I am organizing my own game.

Instead of endless menus, and walls of text. I want to put them into the game right away and let them explore.

So, while I didn’t do any coding this weekend, I did learn a lot, and this will have a dramatic impact on the course of my own Denweaver game.

I seem to have survived a major hurdle in my life. I had a minor heart attack in April, and immediately got 2 ‘stints’ in my heart to prevent major damage. But during that time, it seems they determined that I was in an urgent need of a heart bypass surgery. Just thinking about what has happened to me since then is kinda beyond imagining.

However, I’m now almost fully recovered from this surgery and I’ll be going back to work next week. It is with much trepidation as I’ve been super weak and doing my best to recover day to day.

One of the things that has kept me going has been hanging out on Mastodon, and working on my little web game Denweaver. Every day I have been doing a little bit more on the coding side and it’s been helping me to have something to focus on a bit.

Also, to be honest, it has helped me remember why I even started coding in the first place. It was originally because web development is FUN. I just can’t get enough of HTML, CSS, and JS. And having the browser bend to my ideas is just super empowering. I’ve been doing this for a long time, but over the years I’ve kinda lost sight of the fun aspect of things. I’m now spending more time on that – and also I want to blog more. I feel like it will help me process all this stuff I’m going through, and maybe some knowledge or experience I have will interest someone else.

This title is level 54 because I just had a birthday 2 days ago. I’ve survived a major surgery and “levelled up” . Time to put away doubts and procrastination and just DO STUFF.

Denweaver is a game that will have many things to do. Primarily you’ll be creating a home for yourself as well as a dungeon that others can visit and play in. Beyond just the home you create, as you level up you can add more places in your “den” that will be visitable by other folks. This will be sorta like websites in that the place is a permanent link you can point to that others can visit.

You could create a library where folks could check out books. Or a tavern where you might sell drinks. And in the dungeon below you might come up with fun places like a mad scientist lab, or a pool full of man-eating fish. The idea is to take a cozy building sim and combine it with a sort of dungeon crawler.

As I sit before my computer – I’ve had a bit of a course correction for my web based game DenWeaver. I’ve spent some time thinking about Godot Engine and how it’s great for building interfaces, but the app I am building is much more than just a game you might play on your desktop. It’s supposed to have deep links into the web – being able to create your own websites itself, among other things. I spent the weekend playing around with KaboomJS as well as a web application server called Astro.

These explorations have convinced me to redirect my efforts and build this game all in web tech – Svelte in Astro plus KaboomJS. I was able to have some early success testing out some things that had blocked me before with an earlier version of Astro, and I believe I can actually make the thing now.

I want to make a cozy game where you can play online with your friends – building a house that you can share with other players, as well as a dungeon below your home that others can play in.

This is really my passion project. I want to put everything I know into it and make this something special. If I can survive my upcoming medical stuff, then this is what I want to spend the rest of my life working on – and make it a reality.

I keep trying to make this game – and always running into some kind of blocker – but this time around I feel like I will get closer to my goal than ever.

I am also playing around with Appwrite – a cloud based auth and database service. It seems to be actually working on my app server – which feels just like crazy town for me – as usually NOTHING works as I want it to. You can read about the service I’m leveraging to try out auth here .

I’m also going to try to blog at least 3x a week. I want to get back into writing and development in a serious way. The only real way to do that is to commit to something. So starting today I will start blogging every week. And … making progress on this game.

I spent some time this weekend working on a mini chooser screen for Denweaver – this is just laying some foundations for the features.

Enter your email to subscribe to updates.