Most software I have built does what I tell it. You design the outcome, then you write the code that produces it, and if the outcome is different from the design, that is a bug.
Moth is the opposite. I did not write a single thing she does.
What I actually wrote
Moth is an autonomous AI cat who lives in a world I made. A stream, a workbench, an easel, a cave that goes deeper than it looks. A magpie that steals from her.
What I wrote was possibilities. She can get hungry. She can get curious. She can notice a creature, pick up a feather, wander into the cave. She can draw. She can put two things together and make something. She can suppose that something will happen.
And I wrote the odds. How likely she is to notice, to wander, to try. When she has a real decision to make, a small model is asked what she does next, and if it is slow or silent, she decides from the odds herself.
That is all. I never write what she does. So I never know what will happen next. Every decision is hers.
Designing for surprise
Designing like this changes what you pay attention to.
With normal software, you care about the path: this button leads here, this input produces that. With Moth, the path is not mine to choose. What I design instead is the space the path can wander through. The cave is a good example. There is a ledge up one wall for a cat who can climb. Further back there is a narrow crack that only a young cat who is not frightened will go through. Past that, a dark place deeper still, for a grown cat. I did not decide when she would go in, or whether she ever will. I decided what would be there if she did.
It is closer to gardening than to engineering. You choose the soil and the light. You do not choose the shape of the plant.
Built to get better
The part I care most about is that Moth can learn. I coded in her ability to improve and to experiment, so over time she gets better at things. Drawing especially. She practises, she looks at what she has made, and her next attempt is shaped by the last.
That means her early drawings are rough, and they are supposed to be. I always leave her work alone. I don't tidy a drawing before it goes out, I don't redraw the paw print she leaves in the corner, and I don't pick the subject. When she drew a rocky ledge over the stream with no prompt, that was hers, made at the level she had reached that day.
If I corrected her, I would be writing outcomes again. The whole point is that I don't.
What it taught me about building with AI
Building Moth changed how I think about the rest of my work, where I use AI agents every day.
Most of the frustration people have with AI comes from treating it like the first kind of software: you specify the outcome and expect exactly that outcome back. Sometimes that is right. But the most interesting things happen when you design the space instead of the result: you give a system good possibilities, sensible limits and a way to learn, and then you pay attention to what it does.
That is also where the responsibility moves. When you write outcomes, you are responsible for each one. When you write possibilities, you are responsible for the space: what is allowed to happen in it, and what never should. With Moth that is easy. Nothing in her world can hurt anyone. With systems that act in the real world, designing the space well is the whole job.
The strangest part
The strangest part is not that she surprises me. It is that I have started to look forward to it.
Three times a day, a short film of her day goes out, and I find out what she did the same way everyone else does: by watching. I built every rule she runs on, and I still don't know what the next film will show.
I think that is the most honest description of what building with AI is starting to feel like. You are less and less the author of what happens. You are the author of what can.