Zontak LLCSmall AI factories · engineer-reviewed

Articles

I Couldn't Sleep, So I Built a Factory

I wasn't feeling great and I couldn't sleep. My brain was working though, so at 2 a.m. I was at my desk watching a ticket from my GitHub queue turn into a reviewed plan. Two minutes. Nobody touched it, not me, not anybody. By the morning the same thing had written the code, run eleven hundred tests, and shipped its first pull request.

I'm not a startup. I don't have servers or a team or funding. I have one Mac, a $200 a month AI subscription, and a day job I'd like to spend a little less time on. If that sounds like you, keep reading.

I'm writing this down because a lot of people right now want to automate their work, like I do, and I think it's more doable than it looks. This is part one of four, the foundry, version one. One night with Claude, and how it turned into a small software factory. Basically a machine that takes work in and pushes finished work out while I sleep.

A factory on one Mac

Software factory. Sounds like you need a room full of servers and a pile of money, right? That's what I thought too. So I asked Claude, wouldn't this cost a bunch? Turns out, no. The model runs on Anthropic's machines, not mine. The whole thing is one small Node program and a SQLite file. And the apps I ship sit on Cloudflare's free tier. So it's small, but it's a factory nonetheless.

The real limits aren't hardware anyway. It's the usage caps on the subscription, so the factory has to pace itself. It's my attention, because if it makes more than I can review, I just get a backlog. And it's the checks. It can only ship what it can test by itself.

I already had something like this at work. It goes through my Jira tickets across four repos and fixes them. So the idea was, let's build the same kind of thing at home, for my own little projects, and grow it in versions. One, two, three, you know.

One night

I gave Claude a really generic instruction. Grow it, the level is up to you, run all night. And then I just watched. It worked in small batches, one merge at a time, and kept a night log so if the terminal crashed it wouldn't lose the plan. Which, by the way, already happened to me earlier that evening. Lesson learned.

By the morning the factory had a release button that ships the day's work and rolls itself back if the smoke test fails. It had a sandbox, so every agent works in a locked box. We actually planted a nasty ticket telling it to steal my passwords, and it got "Operation not permitted" thirteen times out of thirteen. It had queue mode, so it pulls tickets from GitHub by itself and decides: do it alone, ask me, or skip it. It had a board where the tickets ride a little conveyor belt and stars pop when something ships. I love that part. And a scorecard that tells me at 7:30 what shipped, what's waiting for me, what broke and what it cost.

Every piece came with its own tests and a pull request, and nothing merged until the checks were green.

I mostly said yes, no, and try again.

The moment it worked

So we gave it some fuel. One real ticket, add a browser test for importing time from Toggl. And we turned the queue on.

Two minutes later one agent had read the ticket, a second agent had checked the plan, and it was waiting for my OK. I said yes. The builder wrote the test in its sandbox, the project's eleven hundred tests ran, another agent reviewed the actual diff, and it handed it to me for sign-off. I read it and honestly thought, yeah, I'd merge this. So I did. Pull request 321, the factory's first one. That was the moment for me. Not the speed, not the board. Reading a pull request a machine wrote overnight and thinking, this is good, I'd merge this.

What actually surprised me wasn't the code. It was the judgement. On another ticket it decided to skip, because the ticket itself said wait until we measure the speed first. That decision cost two cents.

What went wrong

It wasn't all smooth. And I think the stuff that broke is the most useful part, so here it is.

First, a branch disappeared. My repo deletes a branch after it's merged, which is normally nice. But our release merged next into main, so GitHub quietly deleted next, and the factory's next build failed. Claude found it in a minute, put the branch back, and added a rule so it can't happen again. And it just said, this one was my mistake. I like that.

Second, a loop that could never finish. One job deployed a fix to our test server and then waited for the monitoring to confirm it. Except the monitoring only watches the live site. So it waited, failed, rebuilt, waited again. Thirteen steps, and everything else stuck behind it. Now it's a ticket. That's kind of the point of a practice night, whatever trips the factory becomes something the factory can fix.

How we work together

Somewhere around 4 a.m. I told Claude how I see it. Not a human, but some kind of intelligent thing I work with, like a colleague. So we wrote ten commandments, for both of us. Number one is do no harm. Number nine is Denis decides, Claude recommends. Number ten is look after each other.

A few habits made it work. I'm a visual thinker, so instead of asking me what I want, Claude draws four or five versions and I just point. This one, not that one. Every decision comes as a few options with the recommended one first, and I pick. Most of the time I take the recommendation, but when I don't, that's usually where my ideas come from.

And the updates are short. I have a few screens and a lot going on, so I get one line in a soft apricot color above my prompt, and it only says "you're needed" when I actually am.

If you want to try this

You can do this too. You don't need my code, or servers, or a team. You need a queue you already have, GitHub issues or Jira or even a to-do list, and small clear tickets work best. You need checks it can't argue with, so your tests decide what ships, not how confident the AI sounds. You need gates for yourself, so it plans and builds alone but you approve the plan and sign off the result. And you need a sandbox, because if it reads tickets other people wrote, that text can't be trusted.

That's it, really.

If you're automating your own work, I'd love to hear how. Maybe one of these ideas helps somebody. That's the whole point.