Vibe Coding 2 -- SnowMeth - an AI Novel-Writing Assistant

I have started several novels, although I have never finished one. Can AI maybe help with that?

One way of writing a novel I have tried is the Snowflake method, so named because of its fractal nature: start with a one sentence summary, expand it to a paragraph, expand that to several pages, make a list of the chapters, and so on.

As I've been experimenting with AI, I was curious: can an AI use the Snowflake method to write a novel?

The answer is: sort of!

(I am not a front-end developer or a designer, so forgive me my crimes in those areas.)

step-10

Claude Code and I spent a couple of days putting together a prototype using dspy for the AI agents, Gemini 2.5 Flash-Lite for the LLM, and React for the front-end.

(I tried getting Gemini Code to pitch in a bit whenever I timed out of Claude credits, but it deleted my database, so it lost its coding privileges.)

You can work on multiple stories:

home

You get to pick your own premise:

step-1

It proceeds step by step (and you can suggest changes at any time):

step-5

And at the end of it you'll end up with sort of a novel:

step-10

Here is a video of the whole process:

And here is the project on GitHub:

github.com/joelgrus/snowmeth

This is not deployed anywhere, but you can download the code from GitHub and run it yourself with your own API keys. (Gemini 2.5 Flash-Lite is dirt cheap, I have been hacking on this for several days and have used probably $2 in tokens)


As sort of a sidenote, dspy is really interesting. Initially the appeal for me was that it allows you to do programmatic optimization of prompts (rather than having to do a lot of bespoke prompt engineering). But on this project I had a lot of different LLM calls and very little interest in "optimizing" them at this stage.

Nonetheless, from a hacking / prototyping perspective, it was extremely ergonomic to work in terms of signatures rather than prompts:

class ParagraphExpander(dspy.Signature):
    """Expand a one-sentence novel summary into a full paragraph"""

    sentence_summary = dspy.InputField(desc="The one-sentence summary to expand")
    story_idea = dspy.InputField(desc="The original story idea for context")
    paragraph = dspy.OutputField(
        desc="A compelling paragraph (3-5 sentences) that expands on the summary with more detail about the setup, conflict, and stakes"
    )

Even these descriptions were probably overkill, I blame Claude.

Anyway, I quite enjoyed working with dspy and will likely keep using it as my agent framework.