tinyfactory: a software factory with a human near the loop
An experiment in a high-trust, self-improving software factory for technical founders who want to validate an idea at zero cost.
Many companies and engineering teams are experimenting with agentic software factories. A lot of them describe the same problem: when humans step out of the loop, entropy and chaos build up in the code quickly.
tinyfactory is an experiment with some ideas for handling that: a high-trust self-improving software factory that can run by itself for most of its work. It is open source and very young. There are many features left to build before it achieves its goals, but the foundations are in and you can experiment with it today.
What it is for
It is deliberately narrow: aimed at a technical founder, or a tiny team, who wants to bootstrap an idea and validate it properly with real users, at zero cost. It is not an enterprise factory. It should get an MVP validated and stay out of your way, so your time goes on talking to customers and thinking about the product.
The factory avoids the slow decay you get when a general agent harness such as Claude Code, Codex or Cursor builds out a product by itself. Each change looks ~okay, and the codebase gets steadily worse. The factory has to keep a good pace and still prevent that. Then an idea that gets traction can keep growing in the same factory, on the same stack, without a fight against slop and churn.
One command
npx tinyfactory somefunidea
That sets up:
- a private GitHub repository and a project board;
- a product pipeline, with sandboxed agents for product, design, engineering, research, architecture and review
- a structured codebase shell for building on top of
- a Next.js web app hosted on Vercel
- a database with user authentication on Neon and Better Auth
All of it runs on free plans, and the one thing you bring is your own AI subscription (Claude, for now). The command asks for a few approvals in the browser to set it up initially.
The loop
The factory runs the whole product pipeline, and engineering is one part of it. The end state is one automated loop, with a person near it instead of in it:
idea → refine → build → review → ship → observe, then back to idea.
- Idea. You, or an agent, add a rough ticket to the backlog saying who has the problem and what solving it would change for the business. A few notes are enough.
- Refine. A product agent turns it into small tickets with acceptance criteria. A designer agent shows each new screen as a picture before anything is built.
- Build. An engineer agent writes the tests first, then the change.
- Review. Scripts check the change, then two reviewer agents read it. The pull request shows a screenshot for each acceptance criterion.
- Ship. It merges and deploys.
- Observe. The factory watches the live product. An incident, a bug, or an observed metric becomes a ticket, and the loop starts again.
Build, review and ship work today. Refine and design are new. Observe is not built yet.
The product’s brain is in the repository
The factory aims at customer outcomes and business impact, and a shipped feature is only a step towards them. For that, the agents need to know the product as well as the code, so the repository holds both. PURPOSE.md says who the product is for and what it will not do. Transcripts and notes from a user interview become signals, and a signal becomes a ticket once enough evidence backs it. A feature ticket states the customer’s problem, a hypothesis and the measure that will show whether it worked. Every decision is recorded with its reason, in three records: product decisions, architecture decisions and the factory’s own. An agent reads them before it builds, so a path that was rejected is not tried again. Each decision a person makes improves the next one an agent makes.
Every agent starts from the purpose and from its ticket, so the engineer agent acts as a product engineer who knows why a change matters. The project board shows where every ticket is, so you can manage the product from one place. Eventually there will be an integrated UI visualizing the factory state and allowing easy interaction with it.
How it is built
The factory is event-driven, and the GitHub project board drives it. You add a rough idea as a ticket, and a product agent refines it into small ones. You mark a ticket ready, and that event starts a workflow in which an engineer agent picks it up. Every later step starts the same way, from an event: a pull request opens, a check fails, a review passes.
It is built in three layers. A skill is the instructions for one job, such as building a ticket or reviewing for correctness. A workflow runs an agent with one skill when its event arrives. The factory is those workflows running together. Each agent runs on its own GitHub Actions runner, so every run gets an isolated sandbox with only the permissions its workflow grants. The factory acts only for people who can write to the repository, so a stranger’s comment starts nothing.
How quality is kept
Agents do not hold a quality bar by themselves. Left alone they drift: each change looks fine, and the codebase gets a little worse. So the bar is written down where every agent reads it before it starts: what good work looks like, how the code is organised, how the interface looks, and a reference feature to build like.
The bar is then enforced before anyone has to judge. A script checks what a script can check, and two reviewer agents read each change with no memory of the build, one for architecture and one for correctness and ticket adherence.
What makes it hold is that the factory keeps raising the bar by itself. It examines the runs that go wrong, and turns the cause into a rule, a check or a recorded decision that the next agent starts from.
How it improves
The factory improves itself while it builds your product. When a run goes wrong, or costs more than it should, a retro agent finds the cause and proposes a change to the factory: a new check, a clearer instruction or a better design. The proposal is a ticket, and the factory builds it like any other. A bug ticket starts a retro as well, which finds the step that let it through. So the same kind of mistake should not happen twice.
tinyfactory is being built with tinyfactory. Its first ~300 pull requests are, in effect, the factory’s training data: they show where the agents need more steering, and each of those places becomes an improvement to the factory.
Zero cost and zero friction
Testing an idea shouldn’t cost anything. One command sets up the repository, hosting, database, sign-in and the agents’ workflows, all on free plans, so the only thing you pay for is the Claude subscription you already have.
The free plans have limits, and GitHub’s Actions minutes run out first, so the factory is built to use as few as it can. If your idea takes off and one plan becomes the bottleneck, you upgrade that plan and nothing else changes.
Have a look
tinyfactory is at version 0.0.1 and not read for real work yet. Some parts are new, others aren’t built, and it improves every day.
The code is MIT-licensed, and the README explains how to start a project. Suggestions, issues and pull requests are welcome: github.com/edmulraney/tinyfactory.