How I turned fstack into a software factory
By Flavio
Updated
Tagged: AI
How I use fstack, Fable, bounded subagents, repository context, and review gates to build many software products without losing control.
If you want the short version of this workflow first, check the software factory glossary entry.
I recently launched fstack, my collection of 13 small agent skills. When I started putting it together, I just wanted a cleaner way to work with a single coding agent: take an idea, nail down the scope, write a plan, build it, check the result, and push.
Then I started running the same setup across all the projects I’m building under ~/www, and the mix got messy fast. Some are small static sites, others have hundreds of generated pages, some are full apps with user accounts and payments, and a few are courses with dozens of lessons and practical templates. Running one agent at a time couldn’t keep up with all of that, and I didn’t want to hand everything over to one giant autonomous agent either.
What I wanted instead was a manager that understands the whole product, a handful of workers building independent pieces, and a strict review pass before anything gets merged. That’s turned fstack into what I now think of as a software factory, a repeatable system where work enters at one end, moves through clear stations, gets checked, and comes out ready to ship. It’s definitely not a magic machine that turns a one-line prompt into a startup. Every agent gets a narrow job, and I still check every output myself, because skipping that review and tossing unverified output at someone else is how you throw a slop grenade.
What I mean by a software factory
The name sounds grander than what’s on disk. Under the hood, my software factory is just plain repository files, a set of agent skills, clear roles for different models, and a few review rules.
What goes into the top of the process can be almost any kind of engineering or content work:
- a product idea
- a feature request
- a set of course lessons
- a large content migration
- a framework port
- a redesign
- a bug that touches several systems
What comes out at the end should be a working, verified, documented change that still matches the product call I made at the start. Here’s how the whole flow runs from start to finish:
idea or task
-> challenge and clarify
-> write the product context
-> write the plan
-> split the work
-> run independent production cells
-> review every return
-> integrate
-> verify the complete product
-> document what matters
-> commit, push, and log the outcome
I’m still in the loop at every decision point. I pick the idea, answer the product questions, approve the plan, and decide whether the finished work is good enough to keep. The setup takes the repetitive implementation work off my plate so I can focus on deciding what to build and checking what comes back.
More agents do not create a factory
Spinning up five agents at once is the easy part. Without structure around them, though, you just end up with five different interpretations of the same task. One agent tweaks the data model, another invents a design system, two edit the same shared file, and another adds a library or finishes early saying everything looks great. You end up with a pile of diffs and very little confidence in any of them.
I went deeper into that problem in lessons from six months of agentic AI, including when a manager/worker split pays off and when it’s faster to just work with a single agent. That’s the gap between parallel work and a production system. To bridge it, you need a few things locked down:
- one source of truth
- one owner of the plan
- clear dependencies
- clear file ownership
- repeatable briefs
- visible progress
- review before integration
- proof before completion
I already had pieces of this workflow before building fstack. Putting them together gave me small control points through the skills, parallel workers through the multi-agent setup, and durable state stored right in the repository files.
fstack is the control system
Even with multiple agents involved, fstack still stays at 13 small skills. I have no interest in collapsing them into one giant /fstack-factory command, because that would bring back the exact mess I wanted to get away from. A single mega-command would have to juggle product strategy, planning, architecture, coding, design, testing, docs, and Git all at once, making it hard to inspect and hard to pause when something goes sideways.
Keeping one skill per step makes the workflow much easier to steer. The main loop looks like this:
fstack-nail -> fstack-plan -> fstack-build -> fstack-check -> fstack-push
Around that core loop, seven supporting skills handle the work before, during, and after building:
/fstack-roastchallenges the idea before I spend time on it/fstack-interviewrecords the product context/fstack-simplifycuts unnecessary complexity/fstack-designbrings the interface back to the existing design system/fstack-counselorsasks three independent models to weigh in on a tough call/fstack-documentwrites and updates the project documentation/fstack-learncaptures one non-obvious lesson for future sessions
Then /fstack sits at the front as the router. It picks one of the other 12 skills, runs it, and stops, so I always get a chance to check what happened before moving on to the next step.
The factory starts before code
A fast setup just helps you build the wrong thing faster if you skip thinking about the product, so the first couple of steps don’t touch code at all.
When I’m unsure about a new idea, I run /fstack-roast. It pushes on the customer, what people do today, real demand, distribution, and the smallest version worth shipping, then gives me one of three calls:
- build the wedge
- shrink it
- do not build it
It’s a quick filter that keeps half-baked ideas out of the build queue.
Once an idea is worth pursuing, /fstack-interview writes the business context into AGENTS.md. The output stays short and focused, looking like this:
## Product context
- **Product:** what this is
- **Customer:** who it is for
- **Demand:** what evidence exists
- **Business model:** how it makes money
- **Status quo:** what it replaces
- **Distribution:** how people find it
- **Not doing:** what stays outside the product
- **Open questions:** what we still do not know
Because AGENTS.md lives in the repository, every new agent session starts from the same product definition instead of guessing what the app does from old chat threads. That’s the core rule I stick to across all of these projects:
Long-lived project state belongs in the repository, not in chat memory.
That goes for documented project decisions too.
The plan is the production order
When a task is still fuzzy, I start with /fstack-nail. It asks up to five questions and boils the answers down to three lines:
- what we’re building
- the constraint that matters most
- what success looks like
Once I sign off on those three lines, /fstack-plan writes PLAN.md. Every plan follows the same four-part template:
### What we're doing
The outcome and why it matters.
### Steps
1. A small step that can be completed and verified.
2. Another small step.
### What we're NOT doing
- A tempting extra that is outside this task.
- A future feature we are not building now.
### How we'll know it works
- A concrete behavior we can test.
- A build, test, or browser check that must pass.
Out of those four sections, What we’re NOT doing usually saves me the most headaches. Coding agents love to expand scope on their own, spotting extra abstractions, settings panels, fallbacks, dashboards, and future features that sound reasonable in isolation but aren’t needed for what we’re shipping right now. Putting those exclusions in writing stops them from sneaking into the work before any agent starts coding.
Fable is the factory manager
Right now I use Fable as the planner, coordinator, and reviewer, and Opus 5 works well in that slot too. This is the one place where I want the strongest reasoning model I have, because the manager has to hold the entire picture in its head. It reads the request, the codebase, AGENTS.md, PLAN.md, the design rules, the existing architecture, and whichever files define shared contracts, then decides how to split the work up and which pieces shouldn’t be split at all.
I keep the coordination rules right inside my repositories so the manager follows the same playbook every time:
Use Fable as the planner, coordinator, and reviewer.
Use Composer 2.5 subagents only for bounded execution or
investigation tasks with clear inputs, constraints, and output format.
Subagents may inspect, report, test, or implement narrow changes.
They may not redefine the plan, change architecture, expand scope,
or touch shared contracts unless explicitly instructed.
If a better reasoning model shows up tomorrow, I can swap Fable out and keep the rest of the setup untouched. Model names will keep rotating, while the split in responsibilities stays the same: one agent owns the plan, and worker agents don’t make product-wide calls on their own.
Paying for the strongest model at the top of the stack pays for itself quickly, because a shaky plan handed out to several fast workers just multiplies the cleanup later. Most of the time, the manager writes less code than the workers do. Its real job is making architecture calls, writing clear briefs, and rejecting work that doesn’t hold up, so individual workers aren’t quietly pulling the codebase in different directions.
Composer subagents are production cells
For bounded execution work, I hand tasks off to Composer 2.5 subagents. By bounded, I mean a task with clear inputs, clear outputs, and a result I can verify on its own without digging through the rest of the app.
Tasks that work well for these subagents look like this:
- inspect a set of routes and return a migration inventory
- write three lesson files from an approved curriculum outline
- implement one calculator in its own folder
- port one isolated application using an existing parity contract
- test a group of pages and report every failure
- research one narrow technical decision without changing files
By contrast, open-ended prompts almost always go poorly when delegated to a worker:
- make the product better
- redesign the architecture
- finish whatever is missing
- clean up the codebase
- build the backend while another worker builds against an undefined API
Whenever one of those big open questions comes up, the manager settles it first before handing anything down to a subagent.
Every worker gets a real brief
If you hand a worker a vague prompt, you’re going to get vague work back. To avoid that, every subagent gets a self-contained brief built around five parts:
## Goal
One sentence describing the exact outcome.
## Context
The product decisions, relevant files, and constraints the worker
cannot safely infer.
## Deliverables
The exact files to create or change and what each must contain.
## Constraints and boundaries
Files the worker must not touch, decisions it must not make,
and work that stays outside this task.
## Bring back
Files inspected, files changed, tests run, decisions made,
uncertainties, and review points.
I also finish every brief with the same instruction:
Flag uncertainty; do not guess silently.
A worker that guesses will often return a very polished implementation of the wrong call, which is much harder to catch than a quick note asking what to do.
Every brief is written assuming the worker has zero chat history. Whatever context it needs has to live either in the repository or inside the brief itself, which also makes the task repeatable if I need to discard a bad run and hand the exact same brief to another worker.
File ownership makes parallel work possible
Running workers in parallel only pays off when they aren’t fighting over the same files. Take a course with six weeks of material as an example. The manager starts by locking down the curriculum, lesson format, shared layout, and metadata contract. Once those are set, three workers can write weeks 1-2, 3-4, and 5-6 at the same time because each one touches its own content files, and the manager wires up the shared course index once they finish.
You can use the same split for plenty of other jobs:
- independent route groups
- separate tools in isolated folders
- content collections
- test suites for unrelated modules
- framework editions in separate package directories
- research tasks that only return reports
What I won’t do is point two writing agents at the same shared abstraction. Putting two workers on the same router, schema, config file, or design token file at once just creates a race condition and merge conflicts, so I stick to one rule:
Parallelize independent files. Sequence shared contracts.
The dependency graph comes before the workers
Plenty of tasks look independent on the surface until you start running them. A UI usually depends on a data contract, tests depend on a finished migration, and product pages depend on verified package metadata. Before launching a batch of workers, the manager maps out those dependencies so nothing starts too early.
For a small project, that map looks something like this:
product contract
-> data model
-> API routes
-> interface
-> end-to-end tests
product contract
-> independent content files
-> independent documentation files
Only the branches with no dependency on each other run at the same time. Alongside that graph, I keep a live task list where every subtask sits in one of six states: pending, in progress, returned, accepted, patched, or re-briefed. It looks a lot like regular project management because that’s what it is: coding agents speed up the work, while the dependencies between tasks still have to be handled in order.
The manager stays useful while workers run
There’s no reason for the manager to sit idle waiting on a batch of workers to finish. While they’re running, it can stay busy on work that won’t collide with their files:
- inspect shared files
- prepare the next briefs
- update the task list
- review a return from an earlier batch
- handle integration work that doesn’t depend on the active workers
- verify the product contract against the current implementation
If a brief turns out to be wrong while a worker is halfway through, I don’t send a stream of corrections mid-run. Steering a worker halfway through usually produces code that mixes two different plans, so I let it finish, review what came back, and send out a corrected brief instead.
Every return is inspected
Worker self-reports are useful, but the manager still opens the actual files, reads the diff, and checks the result against the brief line by line. Every return gets one of three verdicts:
- ACCEPT when the work matches the brief
- PATCH when there’s a trivial issue the manager can fix right away
- RE-BRIEF when the approach or deliverable is off in a real way
Knowing when to patch and when to re-brief makes a big difference. If a worker misses an import, I’ll let the manager patch it and move on, whereas a wrong data model needs a full re-brief. When the manager quietly fixes a big mistake on its own, the bad brief never gets corrected, the boundaries stay fuzzy, and you end up hitting the same failure in the next batch. Sending the task back with a clearer brief explaining what went wrong forces the cell to get it right.
Once the individual tasks pass, the manager does a cross-cutting pass across everything that came back. It checks naming, tone, file structure, imports, links, shared types, and duplicated logic so all the separate pieces line up cleanly as one codebase.
The quality gate has three questions
Once the implementation is done, I run /fstack-check, which walks through three questions.
Does it work?
The agent has to prove the change works by running the checks that fit the project. Depending on what I’m building, that means running the test suite, doing a full site build, opening pages in a browser, submitting forms, checking responsive layouts, or testing a clean install. Telling me it “should work” doesn’t count if nobody ran the check.
Does it match the plan?
Here the agent compares the finished diff directly against PLAN.md. It flags anything from the plan that got missed as well as extra changes that were never approved. It also checks the blast radius across routes, callers, styles, data, configuration, and anything else the diff might touch.
Is it simple?
The final pass scans for unnecessary abstractions, unused code, speculative options, duplicated logic, and third-party dependencies pulled in to replace a handful of lines. If something looks off, /fstack-check reports the problem and stops there without editing the code, so I can handle the fix in a separate step.
Simplification is its own station
/fstack-simplify has one job: remove and trim code without rewriting working designs or swapping frameworks. It hunts for the usual bloat that creeps in when agents write fast:
- dead files and exports
- abstractions with only one caller
- configuration options nobody asked for
- dependencies used in a single place
- error handling for impossible states
- comments that just repeat what the code already says
- speculative features built for future requirements that don’t exist
For each item it flags, it proposes deleting it and tells me what I’d lose if it’s gone. Most of the time the answer is nothing. When you can generate a lot of code quickly, running a dedicated pass that only deletes things keeps the codebase from getting bloated.
The repository is the factory memory
Chat sessions end, models change, and context windows fill up, so an agent you open tomorrow won’t remember a decision you made tonight. Anything that matters has to live in the repository itself.
I keep that state in a handful of plain Markdown files:
AGENTS.mdholds product context, architecture rules, and preferences from earlier workPLAN.mddefines the current batch of work and its boundariesdocs/overview.mdexplains what the product does in plain languagedocs/architecture.mdexplains how the pieces fit togetherdocs/reference.mdlists files, configuration, commands, and environment requirementsLEARNED.mdstores short lessons meant to change how future sessions behave
/fstack-document generates or updates those three files under docs/. When something surprising comes up, /fstack-learn appends one lesson at a time to LEARNED.md, capped at three lines. Here’s what a short LEARNED.md entry looks like:
## 2026-07-25 — Parallel file ownership
Never assign two workers to the same shared registry.
Build isolated files first, then let the manager integrate the registry.
Routine tweaks don’t belong in LEARNED.md. I only add something if it’ll save real time the next time an agent opens the repo.
Outside individual repos, I also keep a global plain-text work log powered by a Git post-commit hook that records each completed outcome grouped by date and project. I wrote a separate post about how that work log works. Between the repo files documenting each product and the work log tracking commits across every project, I can always see what changed and why.
Defaults keep the line moving
For most new web projects, I reach for the same default stack:
- Astro
- HTMX when I need server interactions
- Alpine.js when I need small bits of client-side state
- Cloudflare for deployment
Starting with the AHA Stack saves me from spending the first hour of every project comparing ten frontend frameworks and five hosting platforms. If I’m building a static site, Astro alone is enough. If it’s a server-rendered app, I layer on HTMX, Alpine, D1, authentication, email, or payments only when the product needs them.
Having a default just means I start from a setup I know well, and I still switch whenever the project calls for it. Lately I’ve been building Next.js editions of existing apps because the target platform is Vercel and the Next.js version is the product itself.
What this looks like in my projects
I’ve been using this workflow across very different kinds of projects under ~/www.
On one project, I built a six-week course with 24 lessons, practical labs, an instructor guide, and 12 operating templates. I locked down the curriculum and lesson contract first, then split the writing by week into independent file sets. The manager reviewed each batch, wired up the course navigation, checked the public/private publishing boundary, and ran the full build.
On another project, I added a field-research layer covering hundreds of migration routes. I started by defining the data schema and validation rules, then ran the research route by route. The visible section only went into the site once the reports passed checks for source type, duplicates, attribution, depth, and dates.
The biggest test was planning framework editions for 18 working software packages. Before porting anything, each package got a parity contract listing its routes, features, data, authentication, real-time behavior, integrations, and tests. I grouped the packages into three cohorts:
- static and browser-heavy products
- standard applications
- infrastructure-heavy applications
Shared baseline decisions came first, and after that independent editions could run in parallel. Every single edition had to pass a clean installation, native checks, automated tests, a production build, a package review, and browser checks.
Instead of handing an agent a vague prompt like “make 18 apps,” the workflow broke down into six clear steps:
- define what must remain true
- establish one known baseline
- divide the products by complexity
- give each cell a bounded edition
- inspect every result against the same contract
- publish only the editions that pass
You don’t need a huge project for this to pay off, either. A four-page site doesn’t need eight workers. Every delegation adds overhead for writing a brief, running the worker, and reviewing the output, so whenever a task is faster and clearer to handle directly, the manager just does it.
The factory does not make every product the same
When people hear the word “factory,” they picture identical parts rolling off a conveyor belt. The projects I’m building couldn’t be further from that. Right now the mix includes a content library, a business application, a course, a browser tool, a visual product, and a software package with source code, and each one needs its own interface, data model, and business rules.
What stays consistent across all of them is the process I run to build them:
- clarify before building
- store context in the repository
- plan before parallelizing
- keep architecture decisions centralized
- assign independent file sets
- require explicit return reports
- inspect artifacts instead of trusting summaries
- verify the complete product
- remove unnecessary complexity
- record what future agents must know
What I do not automate
There are decisions I deliberately keep off the automated track. A worker doesn’t get to pivot the product direction just because it spotted an interesting idea while reading the code. Public names, pricing, positioning, and shared data contracts stay with the manager unless a brief specifically delegates them.
I also never merge based on a confident summary alone, and a passing build still needs a check that the work is finished before deploying. Whenever a worker runs into something ambiguous, I want it to flag the uncertainty in its report rather than guess and bake assumptions into the code.
The same goes for the fstack skills themselves. I pick the ones each task calls for instead of running the whole sequence blindly. Sometimes I need a plan without a roast, a clear task can skip /fstack-nail, and a tiny fix can go straight to checking and pushing.
Common factory failures
If you try running a setup like this, a few failure modes show up pretty fast.
Too many workers
Adding more workers increases coordination overhead right away. If your project only has three independent tasks, spinning up ten agents just leaves seven of them wandering around looking for something to do.
Weak briefs
Telling a worker to “build the settings area” leaves every real decision up for grabs. A solid brief spells out the pages, data, states, existing patterns to follow, work that’s out of scope, required tests, and exact files to touch.
Shared-file collisions
Parallel workers shouldn’t edit the same registry or shared abstraction at the same time. Give each worker its own isolated files, then let the manager wire up the shared files once the batch comes back.
Delegated architecture
Workers are great for researching architecture options, but the manager should pick one direction and write that choice into every brief that depends on it.
Blind trust
Unit tests only verify isolated logic, and a worker’s summary only tells you what the agent thinks happened. You still need to confirm the requested files are there and run end-to-end checks that match the kind of product you’re shipping.
Chat-only decisions
Any decision that only lives in a chat transcript disappears as soon as the session ends. Write it into AGENTS.md, PLAN.md, the docs, a test, or the code itself.
Measuring output instead of value
With this setup, you can generate pages, components, tests, and documentation really fast, which makes it easy to confuse raw output with real value. That’s why /fstack-roast and the product interview sit at the front of the workflow, before you spend time building something nobody wants.
How to build this setup yourself
You don’t need a complicated platform to set this up. Start with fstack:
npx skills@latest add flaviocopes/fstack
Next, add a short coordination section to your repository’s AGENTS.md:
Use one agent as the planner, coordinator, and reviewer.
Use worker subagents only for bounded tasks with clear inputs,
file boundaries, constraints, and output format.
Workers may not redefine the plan, change architecture,
expand scope, or edit shared contracts unless instructed.
Every worker must return files inspected, files changed,
tests run, decisions made, uncertainties, and review points.
The coordinator reviews the actual artifacts before integration.
Long-lived project state belongs in repository files.
When I start a new product, I run through the workflow in this order:
- Run
/fstack-roastif the idea needs honest pushback. - Run
/fstack-interviewto record the product context. - Run
/fstack-nailif the first task is still fuzzy. - Run
/fstack-planand approvePLAN.md. - Let the manager map out dependencies and file ownership.
- Write one complete brief for each worker task.
- Run independent tasks in parallel batches.
- Review every return as ACCEPT, PATCH, or RE-BRIEF.
- Let the manager integrate the shared files.
- Run
/fstack-checkacross the full result. - Run
/fstack-simplifyif the diff grew bigger than it needed to be. - Update the documentation and record one useful lesson.
- Run
/fstack-pushonce everything checks out.
Run these steps by hand at first so you get a feel for where the real checkpoints are. Once you’ve seen the process hold up on a couple of projects, you can start automating the parts that repeat.
The bottleneck moved
For most of my career, implementation was the bottleneck, and an idea could take weeks of coding before I had anything real enough to judge. Now I can get working software on screen in a fraction of that time.
That shifts the bottleneck to decisions:
- is this worth building?
- what’s the smallest useful version?
- what must stay true?
- which work can safely run in parallel?
- is the result coherent?
- should this exist at all?
I want to stay in the loop on those calls. The setup handles the repetitive coding so I can spend my energy reviewing real working software and deciding what ships.
fstack is becoming an operating system for building
I still like that every fstack skill stays small. Rather than turning fstack into a large framework, I just gave those small skills specific roles inside a bigger system.
PLAN.md is the production order, and AGENTS.md is the operating manual. A strong reasoning model manages the work (I’m using Fable today, and Opus 5 is another great choice), while Composer subagents act as the production cells. /fstack-check is the quality gate and /fstack-simplify cleans up the excess. The documentation and work log hold the factory’s memory.
I still make the call on what goes into the line and what ships. The whole setup stays small enough that I understand every piece of it, and independent product decisions stay with me instead of getting handed off to an agent swarm.
You can find fstack on GitHub. It’s free, open source, and works with agents that support skills.
Want me to talk about your product? You can sponsor this site.
Related posts about ai: