1. Introduction and History of Software Factories
The video introduces the plan to build a software factory with Claude Code, walking through the mind map of the agentic pipeline (spec writer, builder, reviewers, approver). It then covers the history of software factories from Bob Beamer at GE in 1968 through CI/CD to today's agentic factories.
Today, we're4 building a software factory with Claude Code.Thank you to Anthropic for sponsoring today's video.I love using Claude Code.Of course, we're going to be building Claude into our software factory.We'll be using a mix of Opus and Sonnet, and we're on 5.5 as time of filming.Everybody agrees that these models are incredible, so I want to show you what these can do.This is going to be a very simple factory, but as you'll see, it will still be very effective.The idea is that you can build one for yourself inside of an existing project, so I'd encourage you to follow along with the video.This video will be very hands-on.I'm going to explain exactly what we're building with our software factory, what our approach is going to be, and we'll do a quick introduction of what software factories actually are.Here's the mind map for today's video.
So, over here on the right is the demo, and I'm going to explain this diagram first for anybody who already knows what a software factory is.Then we'll go through this left side, and I'll sort of explain a little bit of a history on these things.But if you want to review this, you can get this full thing as a high-quality image if you subscribe to my newsletter.I'll just send it right to your inbox right away.You can look through it with me.Let's actually jump over here.This is what we're going to build.It's a simple agentic software factory where a team of agents take a feature and pull that into the main codebase by the end of our factory.So we input some feature request, and then the rest is handled autonomously, except for this last step, this human approval step.Let's walk through this.
First thing we do is write a spec, and I 'm going to use Opus for that.Then we're going to go to a building agent, which is actually going to build our feature.This will build the full working feature for us.Then we're going to hand this feature off to various review agents.We're going to do a security review, a UX review, a UI design review, and a code review.And these are all done with separate agents.Some of them are Opus, there's Sonnet in here, and then this gets fed back into the builder agent.And this happens in a loop until we're happy, satisfied with the code, and then we go to an approval step.This runs with another agent, which is Opus, and then Opus decides, this agent says, either we merge to main automatically, or we handed off for human review.And this is all managed through our factory that I'm going to build today.
So, if you're ready to go, you can use the time stamps in the video description to skip right to where we start building this.Otherwise, stick with me and I'm going to walk through the rest of this mind map.Software factories were first described by Bob Beamer at GE in 1968.Essentially, they're a computer-controlled programming environment containing standardized development tools along with historical information for management and measurement.And the short history of that is from there we saw a lot of stuff going on in Japan.And I'm sure this was happening in Europe and America as well to some extent, but that's what was characterized the early stage of software factories.Then in the 2000s, we didn't quite have the CICD stuff going on, but it was like how can we have reusable patterns, models, and frameworks to be building software.Then in the 2010s, 2020s, this is where we got CICD.
So, proper continuous integration pipelines, GitHub actions, and now we have agentic factories.So, here's what a software factory looks like in the age of AI.And I love this quote.What's new is the automation of relatively unstructured cognitive work between the deterministic stages, including of course writing the entire code itself, you know, itself.So, this is the basic loop.We have a trigger which goes to an agent which submits a PR which is merged by a human.And inside of here, we have all sorts of clever stuff going on with the agent pulling in information.And this is where the interesting graphs come about with software factories.There's a lot more details I skimmed over in here.I'm going to cover this in my school community on my weekly calls and I record all of these and post them back to the community.So, if you want to keep hearing me discuss software factories, you can join my school community and check that out.
2. Building the Factory with Claude Code
The presenter pastes a detailed prompt into Claude Code using Opus to generate the factory skill, sub-agents, backlog, and dashboard inside an existing website project. Claude builds out the reviewer agents and dashboard, and the presenter reviews the key decisions it made.
Now, let me get onto the build with Claude Code and we're going to start here and I'm going to paste this prompt into Claude to start building things.And this is the whole prompt we're going to use.So, I've got this prompt in the source code for this video.You can find that in the video description and and reference that if you want.At this point, if you're following along with me, you want to start working in an existing project that you have.This is the source code for my website.It's a real ugly project.There is a lot of stuff going on in here.We're going to build a software factory right inside of my website, and I'm going to start by spinning up Claude code.And you'll notice that I've got bypass permissions on, so this is going to let Claude do whatever it wants, but you can set this to your level of comfort.
And the first thing I'm going to do is change my model, and I want to use Opus 5.5.I'm also going to set the effort, and for this task, I want to use high effort because I want it to produce a very high-quality result, and I want it to follow all of the details in this prompt.Let me paste the prompt in, and I'm going to press Ctrl+G, and I can open this prompt up in my sort of default editor.And so I can also get out of this and see it in Claude.Here's the sort of one-sentence description of our spec.We want to build a simple visual software factory in this repo using Claude skills, sub-agents, and markdown files.The markdown files are going to control the state of our application.Now, the orchestrator is very important for my software factory.My orchestrator is going to be Claude code using whatever model I choose at the time, and then I'll run this factory skill in order to spin it up.
Now, from there, the factory works in this loop, which I described earlier.A feature comes through the spec writer, which goes into the builder, which then gets verified by various review agents.And once those are done, if we need changes, this happens in a loop, and then we go to the approver, which either merges to main, the feature, or we get a human review.And this is a system we can use repeatedly every time we want to build a new feature for our project.That's the power of a software factory, and this is why everybody is so excited about these things right now.And we could imagine in the future we want, you know, we can bring in data sources from the outside world, and we can also have other things, like we can have stuff that triggers this instead of a feature.So this is still my prompt, by the way.
Let me come down and continue talking through this.You can see we're setting this up as a skill, And this is the convention for how agent skills should look.And we've also got this factory folder.This will live right inside of the app that I'm working in.And then we have some example files just to give the right style.So this is how Claude sub agent syntax should look.So I have some examples of what this should look like.But we're mostly going to leave this up to the agent to build all of these things.And then here's the commands that I want to have.I want to be able to start a new job through the loop.That's done here like just using factory and then describing my feature.And then lastly, I've got a dashboard.And this is going to give us some visibility into this whole system so we can kind of tell what's happening while everything's running.
So let's kick this off.Check out this.The orchestrator skill looks like this.I feel confident that with a long running agentic task like this, we can really nail all of the little details in this.Um and if you've used Opus, you know exactly what I'm talking about.You can throw any little small detail and it's extremely good at picking these up and propagating them through the code as it builds everything out.Now it's building out the reviewer agents.So these all live as Claude sub agents.And these are going to be the guys in our software factory doing all of our work.Here's the reviewer UI agent.Claude has just finished up.The last thing it was working on was the dashboard for our factory.That's what it created right here.So let's look at these decisions.Max two rounds.That works for me.
Your checkout.The builder works on factory.Okay, so this is the um branch that we check out to build our feature.That's cool.That works.And then we have this rework method.If it didn't work, we can just like spin it through again.So there's some discussion about what the approver should escalate.If we're doing anything with billing, let's make sure we escalate that.Anything with course access.This is stuff that's specific to my own repo.So you know, the agent will be specific to yours too.That's another cool point.Like this prompt that I wrote.This will be general for any anything.This will work for your project just as well as it did for mine because it's not at all adapted to my project.Uh really cool.So let's restart Claude code so it loads the new agents and then run factory next.
Um all right.Now I have a question though.Um when I run factory next, what would that do?I don't think I have anything next yet, right?In other words like I don't have any features that I'm expecting to build, so I don't think that would work.What I want to do is run factory and then describe the feature that I want to build.Also go ahead and spin up the dashboard.Oh what?The backlog actually has some stuff in it.I put three starter items.So Opus just figured out what I should be building next.That is hilarious.And here's where the dashboard's running.So there's nothing going on yet.Everything's empty.Let's spin up our first job.Before we test it though, let me show you exactly what we just built.
3. First Feature Runs Through the Factory
A tour of the generated files shows the orchestrator skill, sub-agents, and markdown metadata, followed by the first real feature (unpaywalling course pages) flowing through spec, build, review, and human approval before merging to main. The presenter demonstrates the dashboard and the factory approve command.
So let me go to my project and I'm going to open up this tool I have called lazygit and this way we can see all the changes.So we built out a bunch of agents.These are all of our sub agents, the things that are doing the work inside of our factory.This is approval agent, builder agent, reviewer agent.Let's go back down.Here is the skill.This to me is like the main thing that's controlling the factory.It's the agent skill that we're going to use to like spin it up.It's the orchestrator skill effectively.That's how we can think of this one.And then we've got a bit of code in the factory itself, but very little.We have this backlog markdown file and this is just going to track our jobs, like the stuff that we haven't built yet that we want to build out later.
And then we have a dashboard and this will be give us observability.I showed you that already and then just a few modifications to the agents file, getting ignoring some stuff.That's it.That's it you guys.I can also show you this in Vim.And let's just look.So this is kind of basically our factory.This is the orchestration skill and it just documents like different ways that we can use this.Um so this is what I'm talking about right here.We have factory/feature.So now inside of Claude, if I was to type backslash and start typing factory, here it is.This is my skill which has been indexed by Claude Code and I can call it directly.I can also look at skills and I'll see this in the list of skills.I just search factory, and this is it.You can see it's a project skill, just for this project available because it's in that dot cloud slash skills.
So let me just quickly hop back.We're on this step right now, running the factory.We're going to watch how this actually proceeds, and I've got this kind of feature that I want to build.So my Obsidian agent setup course pages should not be paywalled, only the videos are paywalled.Let's see if our factory can handle this feature inside my actual website.This is my production site that we're working in right now.So it didn't start the job.The factory's first precondition, a clean working tree, isn't met.I never committed any of this code.I'm actually going to commit this myself like old school.Add cloud code software factory.Push that.All right.Now I'm going to start this again, but I want to clear it.And from here I can run factory and submit my feature.It's creating the job, Obsidian course unpaywall.And now we can see we're starting to use our sub agents.
Here's the first one.We're creating a spec using the spec writer background agent.Let me hop over, and now I'm in the agent itself.So I'm looking at the sub agent and I'm seeing what it's doing.It's creating a spec for me.So now the spec is done.We can see here we've written to a spec file, and I can see our builder has just started working on this.So let me go back to the orchestrator and check out what happened.It was like, okay, we you know, our our sub agent finished.It kind of picked this up, and then it opened the builder.And the builder down here is now down here.And this is this is now our sub agent that's building this out.And by the way, I want to look at this in a dashboard.So let me go over here and spin up the software factory dashboard.
Yeah, it's it's making edits to the code.All right.So this is where we're at.So this is really neat because you could actually imagine we could be doing other stuff like at the same time.I'll also note up here we have a needs human phase.So anything that gets like stuck in here, we know that we would need human review at this point.So this is a like a real functional way that we could be using the dashboard.Oh, nice.Check this out.It just wrote a build file right here.It wrote this file to our factory.Okay, now we're back in main and our agent Okay, sweet.We just went to review and we just kicked off all of our review sub agents.So these guys are representing our review.They're doing it.Okay, the UX round finished.The UI round finished and they passed.
So both of those passed, but we're doing the security over here considering Okay, that's done.Code review This is This is epic.Oh, look at this, you guys.We can even see the little icons.Oh my god, that is so cool.It's deciding if this feature should be pulled in or not.I'm actually blown away.This is This is how I want to develop features now.Why have I not done this yet?So what's Opus deciding?Escalating.It's escalating.So I think it'll go to the human review.There it is.So it's sitting in the human review phase and now I need to approve this.What happens if I click on this?Okay.I can get all sorts of information from the dashboard.That is very cool.Escalate.Why?The build is clean.Every acceptance criteria for the human.If both For the human.So here's how I would approve it.
I would need to know the ID of this feature and then I could run factory approve.Let me do that in a new session.So I'm going to clear this and I'm going to say factory approve and then this.And we're done.It has merged it into my actual code.Now I can have a look at that.So down here, this Claude guy was just running my Okay, I'm going to come down here.View Okay, this is my source code and if I look at the git status, I'm ahead by four commits.That's because I've just committed this.Merge factory one obsidian course on paywall.This is the thing that was done by the agent and I can look at that guy.If I look at the previous commits, this is what it did.So it went off onto a branch.It did a few different commits.
It kind of built out our feature and then it it back.And that merge was done when I approved it.Very cool.
4. Metadata Storage and Parallel Git Worktrees
The presenter explains how factory metadata lives as markdown files and why it should be git-ignored, then adds git worktree support to run multiple features in parallel. Three features run simultaneously across Opus and Sonnet orchestrators, demonstrating the power of owning a simple, understandable factory.
Now, I want to stress one thing.If I come up here, when I said factory approve, what's actually happening here is I have a skill, an agent skill called factory.And when I run that, we trigger the agent skill.Then all of this other stuff in here, this is just free form.So this is not not actually like a strict like schema or a strict spec for, you know, saying approved.Now let me show you where the metadata for this system lives.And this metadata is responsible for populating all of the information we're seeing down here.These just live as markdown files in our project.If I go into factory and then I look at all the files inside of here, this was the feature we just built and all of these files are the metadata that we're populating inside of our dashboard down here.
I love how simple this is.I can just like look at this stuff in Vim myself and review this.Agents can use this, future agents, other systems.This is so cool for me.The one thing I'll say is we probably don't want all of this stuff committed to Git.Of course, they're just text files.There's nothing wrong with committing them all to Git, but it just kind of might mess up your fuzzy searching as you start doing file searching and stuff like that.It's something you can decide what you want to do.For my part, I don't think I would want these committed to Git.So if I look in my Git ignore at the factory, you can see we're not committing any of this.So Claude already decided we shouldn't commit this stuff.So these these things are transient and they'll be deleted if you were to reclone the repo elsewhere unless you were to back them up with like some custom process, which by the way is exactly what I would do.
I would just throw them into cloud storage somewhere and I would get the agent to manage that.If you want to learn more about what I'm talking about there, you should join my school community.You can ask me or just join my weekly calls.I talk about these types of things all the time.This is how developers are building with coding agents now.And speaking of building with coding agents, let's keep developing this with Claude code.What I want to do is be able to support running multiple things through the software factory at at once.Right now, that won't work too well because we're not using git worktrees.So let's build this in right now.Have a look at my software factory.I want to be able to run multiple features through the factory at once.And in order to do that, I think we'll need some sort of git worktree integration.
You know, I just realized um I could have used the software factory to build itself.That would have been awesome.Anyway, we got this done.Now let me start a new session.So what features should we build?Let's go into our factory and I've got this backlog here.Let's have a look at that.Estimated reading time next to the date on the blog post.Okay, let's do that.Add a copy button to code blocks.Sure, let's do that.Add a four four for This is great.These are all things I should have on my site.That's nuts that Opus just came up with those on the fly as it built like the Dude.These things always just blow my mind.All right, let's go factory next.Are we ready?Let's go.Um now the point the point of this is to do multiple of these in parallel.
And we just tick this off.So we pick that one up.Um let's let's do it.I'm going to start a new session down here.And I want to start these in separate tmux areas just so that I can watch all of these go.Let's start up Claude.And let's say factory next.All right, and we've established in our top agent we've started doing some spec writing and stuff.Um what's going on down here?Oh, here they are.So they they have just two of them have entered.We have two new features that have entered the factory.And let's do a third one.Why not?Um all right.Now one thing I should show you is, you know, the orchestrator will be whatever agent we've spun up here.So I 've got Claude Opus 55.Just for fun, let's use Sonnet here.I'm going to say model and we're going to go to Sonnet 55.
And let's see what happens if I put it on low effort.Why not?Let's try it.Factory, next.What feature is this one?This is my last remaining feature, which will be the 404 page.So Sonnet should be very fast.So I would expect that this feature might finish fast.But on the other hand, the orchestrator is not necessarily the limiting agent, right?What's going to limit this are the the sub agents.And right now we're in the spec writer phase.And you know, this Sonnet session is still going to be limited by the speed of the sub agents, which we're still using Opus for.And in fact, we might want to use a a small model to to actually do the orchestration.I don't think so though.My intuition is that we want a really smart model to be the orchestrator, and then some of the sub agents can use lower models, faster models that are, you know, aren't as good.
Um and that's been the approach for my software factory.That's how I that's how I approached this.Um Sonnet is flying though.We're already on the builder phase for that.Oh, this is like a race.Dude, and this is all just this is just working with um with Git work trees, right?Like it's it's just working.Like I I don't really need to worry about it.I don't need to be messing around and switching work trees.Also, we just built this ourselves.Like this is your own thing.You you just built it.You can change it.You can do whatever you want.You're not relying on like some dude's um you know, factory skill that is all hyped and you found it and it does like a million things.This is your own very simple skill for your own software factory.And you know exactly how it works, right?
And when you want to change it, you know how you can change it.I think this is so important and I think people are just totally missing the point um right now with just, you know, following big things and starring everything on on GitHub and thinking they have to keep up andbe trying everything.Really what you have to do is understand the core concepts and how we can use coding agents to be doing the things that everyone's so excited about um and then just making it work for you to give youactual productivity.And I will argue that what I've done here is actual productivity.Like I'm watching three agents crush through features on my website working in their software factory.Damn.What a world we live in.
5. Debugging Approvals, Future Roadmap, and Costs
Review results come in and the presenter debugs why features get stuck needing human approval, fixing the merge blocker issue. The video closes with future improvements like GitHub issues intake and Sentry metrics integration, a discussion of token costs versus quality, and final thoughts.
Okay, our Sonnet agent is in review and it just kicked off all of the reviews.And I think this is probably my favorite part of the UI, how we can actually watch these results come in.Oh.Okay, our blog reading time features are getting pushed through as well.Now the blog reading feature actually does have a UI and a UX component to it whereas these other features didn't so much.So I'm curious if maybe it will get rejected.I doubt it.I mean we'd used Opus to build it.What would be kind of crazy is if we tested out like a really dumb agent as the builder and then got Opus to keep like fixing and judging the dumb agent.That would be pretty fun.Uh oh, okay, needs human.The 404 one needs human.I have a feeling we're going to need to lax the guard rails.
I think like all of these things Claude is going to figure out some reason to get me to look at them.So that's something we could work on.That would be a way to work on our factory and make it more efficient.The approver agent's taking a long time.Okay, it needs human as well for that one.This is actually legit.Um Claude doesn't want to invalidate my blog render cache.That'll take a little while to run when it when we merge this feature.So that's fair.As for the 404 reading block, um I'm a little confused.We seem to have approved this but there says there's nothing for the human but it still needs a human call.So I'm going to investigate that.Why did this not get automatically approved and merged?Merge only runs when the main checkout is clean and on main here we have some stuff.
So that failed.Okay, so the software factory is kind of being dumb.Um we we have changes to the backlog so it couldn't um commit that.Those changes are inevitable whenever we're using the software factory.Therefore, they should not be blockers.Now, of course, it's unfortunate that I'm talking to Sonnet to do this.I mean, Sonnet's certainly quite capable, but I would want to use my best agent to be working on my factory.It's like the most important thing in my codebase, right?Yeah, so it's specifically saying this file is okay if there's changes in it.So that's cool.So hopefully that would work properly next time.Um but let me bring these in.So I've got two things to approve and I can do that now.There's this factory approve command, but I could just be like, okay, merge it in now.So you know, if I'm being real, like that's how I would you know, that's how I would do this.
But in the idea of the factory is that we've actually got inputs coming from things I don't control.Like I'm not necessarily spinning up an agent in a software factory.Maybe it's starting from other triggers.I'm going to talk about that in just a moment in my closing thought.Um but let me finish this up.So I've I've merged this in, so we actually updated the metadata.So I can I can see that that was merged in over here.Um and meanwhile, this other guy is is actually still working.So adding a copy button in code blocks, yeah, that's a little bit maybe a bit of a tricky feature.Clearly.Oh, this is hilarious.So this one won't merge because of the changes that I just got Sonnet to make.Um okay, yeah, update and commit like add those separately and then merge this in.
Oh my god, I can barely speak.Opus got me.There we go.That one's done.What a beautiful thing.Now let me go back to the mind map and I'm just going to finish everything up by having sort of a look at what we would want to do in the future going forward for this.Here's four things that we could do now to get our basic software factory running better for us, to be more effective.And the first thing we already did.We added Git worktree support so that we can run several jobs in parallel and we just demoed that.Sick, right?Next thing we can do is GitHub issues as the intake or other things.For example, maybe we can trigger do from Slack.Um GitHub issues really great sort of way to do this because the issue could be submitted by many different people.
It's tracked inside of GitHub and we can sort of integrate naturally with GitHub in this way.So we see you see a lot of people doing this.There's a lot of videos on YouTube to do that.We could easily extend our system to to use that as an input source for our system.Next would be to connect to application metrics.For example, we could connect to Sentry.This is like a monitoring platform for applications and then we can pull direct bugs like from our app in production and just pull these into the software factory to get the relevant context about what feature we're trying topush through it.This is like really critical for software factories and it sort of reminds it sort of brings to mind these original ideas of software factories that were proposed like all the way back in the 60s like I talked about
earlier in the video how we want access to like monitoring and metrics.And other metrics that we might want are infrastructure metrics like CPU and memory.And the reason we might want those is so we can keep an eye on things after the deployment.The software factory can actually handle the post deployment as well and keep watching things because if we build a feature that wrecks our our software, we can undo it as part of the software factory.It can be still in the loop even after it's published, right?It's not done once it's been pushed to production.This is the future we're going to.This is the future we're already in.Wow.I kind of got goosebumps like actually saying that right now.Thank you to Anthropic for sponsoring today's video.If you aren't using Claude code, then you can click the link in the video description to sign up now.
I hope you followed along with me though.I hope you were doing this as we went and I hope you have your own software factory now for your own project.Now, here's a few things that I think we should consider.Stuff I haven't talked about yet in the video.The first one is I guess the elephant in the room and that's around cost.Like yes, I think this system is probably building out really effective features for me.I've got good observability.I can go into the sub agents.I can see the logs.From a data and quality perspective, I think it's really good.I think it's top-notch.But, it's going to cost more money.There's no way around it.Anytime we're using sub-agents, that's could incur extra costs because the agent has to pass contacts back and forth.So, the question is, is this token cost worth it for quality?
Now, all of this was on my plan.This is all part of my Claude plan.I'm not using API tokens for any of this.That's something to consider.I think that's hugely beneficial, right?So, uh yeah.So, these are like just a couple considerations.Uh despite these things, this is absolutely what I'm going to do.Like, I'm going to be building a lot more of these.And so that brings me finally back around to the channel.I'm going to end this video now, but I want to keep building stuff like this and I've got a few more videos about Claude code coming your way.So, I'll link these here when I'm finished.If there's anything you'd like to see, leave me a comment to let me know.Thanks for watching.