Vollständiges Transkript anzeigen (5.872 Wörter)
Greg: What are software factories and why is it going viral? I mean, it's basically this concept that allows you to use AI agents to actually ship software that isn't sloppy at all, that is more like a factory. More like think about an assembly line, and you're just instead of building physical products, you're building software. And that's kind of the dream. I mean, if you're able to just create this factory that builds software and it's valuable software and you can create multiple apps that generate revenue and add value to people's lives, that sounds pretty good to me. So on today's episode, I brought on Ras Mic, and he clearly explains the entire process. By the end of this episode, you're going to understand how to set your own software factory up yourself. So, enjoy the episode. I can't wait to see what you build. There's a reason why this concept is going viral, and I'll see you at the end. Today's episode is brought to you by Brex. My company's been on Brex for a year and a half, and I started because I kept hearing companies like Vercel, OpenAI, and Anthropic were using Brex, and I figured if they're using it, why shouldn't I? It's been a game changer. The thing that got me is how smooth it is. It's got high-limit cards, it's got banking, it's got AI that handles the back-office busy work like expense reports, which I don't want to do, on its own. It's really just built for this agentic world. If you're building something new, it's time to get Brex. Check it out at brex.com/solutions/startups. Link in the description.
(Music plays)
Greg: Mic, welcome back to the pod. By the end of this episode, what are people going to learn?
Mic: We're going to understand what this bizarre phrase software factory means. I'm actually going to show you how I run mine. It's a lot easier than you think, and it's definitely model and harness agnostic, so you don't have to purchase some different product to have a software factory. It's going to be fun, and it's going to be simple.
Greg: Okay, so you're going to explain what it is, why it matters, how it works, how to think about it. By the end of this, people are just going to be able to boot up their own software factory if they want. Or, if they think, you know what, this Ras Mic guy, I don't, I don't like software factories. I don't like what he's saying, they can pass.
Mic: 100%, 100%.
Greg: With the term software factory, there's been a lot of like startups who have started. And you know, I'm not here to knock anyone's hustle, but a software factory is completely harness and model agnostic, meaning it doesn't matter what model you use, it doesn't matter what harness you use, it should work, right? Because a software factory is more about someone's workflow, skills, and domain knowledge, and it's packed up in specific skills that they use in their development process. Now, I want everyone to think like the last after they built. You probably went on Codex, Cloud Code, Cursor, whatever it is, and you typed, right? You said I want to build this, and it built it out for you. You saw it, and you didn't like it, and you made some changes, right? And you saw the changes, maybe you liked it, you deployed it to Vercel or to production, and you're good to go. Or you kept on iterating. That's the process. The whole point of a software factory is in each step of the development process, how can I best maximize the model's capability to get the greatest output, right? And also, how can I move fast, right? Because if we're using the term factory, there's some sort of structure and speed and conveyor belt nature that allows me to ship as quick as possible without losing quality. That's the long bloated Mikashim list definition of software factory. I haven't lost anyone, hopefully, Greg.
Greg: That was perfect. Okay, so understood, but like why does that matter?
Mic: The reason why it matters is, intelligence is continuing to increase. We have amazing models like GPT-6 Astra. A good software factory allows you to systemize and use these models in a very efficient way versus just typing in and continuing to go back and forth. And I think it's better I just show you how mine works to give people an idea. Now, I'll give my skills are available for free, no charge, nothing like that. But I don't want you to blindly copy me. I would like for you to think about it, understand the process, and then apply it yourself. That being said, I have about five or six files that make my software factory. I have an agents.md file, and for everyone who might not be aware with for agent what an agent.md file is, it's basically this one document, this one markdown file, that's injected into the system prompt, that's inject, sorry, not in the system prompt, that's injected into the agent chat every time you communicate with an agent. So every time I say hi, if there's an agents.md file, before the hi is sent, the agents.md file is sent. And what's cool about this file is, I can sort of dictate how I want the agent to act. And we actually did a video not too long ago, Greg, where I talked about most people's agent.md file is useless, because they were telling the agent.md file what the code looked like and already information that's in the codebase that the agent could already know about. But if you look at mine, there's a simple workflow. And this workflow is something that's not native to the agent, so it explains clearly how to do it. And I'll walk you through every single step. The first step is isolate. There's a skill called new-feature, and this is what it does. It says every new feature starts in a fresh Git work tree, branched from origin main, so agents can work in parallel without conflicts, never build on main. And if you know when Michael is on Greg's channel, there's always diagrams. So we're about to draw. So with the first step, when I'm working on a project, and I tell it to work on a feature, the first thing it's going to do is isolate. And what this basically means is you can think of, Greg and Mike's app, you can think of Greg's and Mike's app like the journey being, you know, we started here, we started prompting here, and this is when we launched to production, and we've got thousands of customers. The way most people work with their agents is at every single step of the journey, they're building a feature, they're building a feature, they're building a feature, and it's it's a very linear process, right? One feature at a time, one feature at a time, one feature at a time. And if you ever try to work, like, with on multiple features at the same time, sometimes there's conflicts, there's issues, people have, you know, oh my agent deleted this file, it overwrote this file. What this first step, isolate, does is the following. I'm going to show via diagram. So let's say Greg was like, I really don't like our landing page. And I'm telling Greg, you know, our our API calls can be faster. When Greg works on his feature, what the agent does using my agents.md, is it's going to create a new branch, and you can think of a branch as a copy-paste of the exact moment where the app is. So Greg is going to work on a new branch, a new work tree of the app. A work tree is basically a copy of the app, like, you can think of someone copying a block of text, pasting it in a new document, working on that document, and at some point, going to merge it back in the original document. So that's what Greg is doing. He has a new document working on that feature. And guess what, Mike has another feature has to work on. So I can do it at the same time or I can do it a different time. I now have my own branch. Here's what's cool: me and Greg, and another person, or you yourself with 50 different agents, can work on multiple features, and there's not going to be an issue of one agent overstepping on another agent's work. This happens a lot to people. If you ever see tweets, Greg, of people saying, man, like I was working on this, and the agent deleted a bunch of stuff, almost always, it's because people have their agents working on different features on the same branch. And the agent will do what you tell it to do, so you told it to update the landing page, but then you also told it to make the API calls faster, and now it's noticing, oh, these pages, the way they're calling the API suck, let me delete these and write these again, but then it was working on a design on that page, so issues start to arise. Isolate allows me to work on multiple features, at the same time, parallel, without having an agent overstep on an agent's work. This is the first step of my workflow. This isn't native to the agent, so it makes sense to exist in the agents.md file. Plus the new feature skill allows me to do that. And when Greg is done, or when I'm done, and I'll explain the workflow for this, but just to close the loop, when Mike's done, all I do is merge these changes back, and then what Greg's done, he can either do it before me, or he can do it after me, but we're merging into the main document, and there's not going to be conflicts, because we worked on a copy at first. So this allows me to ship fast with multiple agents. If I show you, and I can maybe show here, if I show you my terminal, if you notice, there's four tabs of Beselo, three of them finished, but I literally have four different features on the same exact app, ones working on an email client, the other one is working on a computer environment, a Linux environment, the other one is doing a landing page update, so I can work on these confidently, whilst still having isolation. It's not native to the agent, this agents.md plus the new feature skill allows me to do that. I'll pause here. Any questions, Greg, so far?
Greg: Yeah, I mean, it's like crystal clear. I think it's, the way I think about it is if you actually had a team of engineers and you were trying to build an app, you obviously wouldn't be building it all on main, and and having everyone just being pushing to main and stuff like that, that just doesn't make sense. I think, you know, I'm non-technical, and I think you have all of a sudden all these non-technical people starting to build apps, and they're running into this. You, you basically made mention, you're kind of like, oh hey man, like sometimes it happens that agents overwrite stuff. I mean, the truth is, 95% of the time, if you're building, you're going to have agents kind of mess up and and overwrite things. So, this is like, to me, this is you know, makes a lot of sense, and it's sort of a bigger idea, which is, how do you structure your, you know, the way you work with agents to be more like a team versus, uh, you know, yeah, no, just more like a team.
Mic: Yeah, I mean, and I, I mean, it's a better name. Team is better than isolate. I might take the team. But that's basically, that's basically what it is, right? So, isolate sounds like some sort of like whey protein that I'm going to want to. Yeah, no, I, I, so if you guys check the link, there will be a name of the day very soon. But that's basically what it does. It allows for me to have multiple agents working on different tasks, all at the same time, without overstepping each other, right? And there's also a cleanup process I won't get into, like once the branch, like once the work is merged in, the work tree gets deleted, all that type of stuff happens. So that's step number one. Number two is the actual building. And this I find, this was a skill that I, I shared originally way back, but now it's part of my workflow and I shared it with everyone, is code-structure. We're going to talk about models soon, but one thing about, uh, the models is, they are great at doing the work, it just might not be done the best way, right? Especially when writing code. Um, there's for example, fable is I would say one of the first models to really write code that I would say, huh, like this is better than some of the best engineers I've seen, right? Like fable runs, writes really good code. But even Astra, which is workhorse, most powerful model, my favorite model, some of the code quality decisions it makes is, uh, and it's not that the model is not capable, the models is just getting it done. And if it can get it done in a sloppy way, it'll get it done in a sloppy way. What the code structure skill does, it writes it in what's called a service layer architecture. Won't bore everyone, but basically it's written in a way where let's say you had, you needed human intervention, you hired a developer, very easy for the developer to catch on, or you yourself are a developer, very easy for you to catch on, but even for your agents, for them to come back to the code and read the code, they'll be like, oh like, yeah, like it makes sense. Like I've had like, I've had GPT 5.6 Soul write code, and it works, it does what it's supposed to do. But then I'll have fable review the code, and fable will be like, this is disgusting. Like there's duplications, there's functions all over the place, there's dead code, right? So just because it works, doesn't mean it's written well. This skill gives the agent a guideline on how to write code. So going back to this diagram again, I'm working on a new feature, right? The first thing that happens is isolate. The second thing that happens is, and I'm going to I hope people are seeing the factory nature of it, the second thing that happens is the building, and in building, we're using the skill called code-structure. And basically in this process, when I'm telling the agent, oh build me uh this landing page, build me uh this feature, for example, I've been working on this app, and the one feature that I wanted built is I wanted a skills like repository where I can have different agents of mine connect to this app and store the skills. And I basically told the agent build me that, and as it was writing the code, it kept referencing the code structure skill so it started to write code in a way that me as a developer, I can review, but, you know, god forbid I need to hire somebody to review the code, it's not going to be the slop canon where they're confused and they don't know what to do or they overcharge you. It's written in a way for a developer to understand and I find that if you use another agent that doesn't have context on your codebase, it will understand it very well. So first, we isolate, excuse the bad name. Second, we build, right? And all of these are done in an opinionated way that allow the agent to move fast and to do the thing as best as possibly can be. I think this makes sense, right, Greg, nothing.
Greg: Yeah. Keep going.
Mic: So step number three is prove. Here's the thing. Um, you know, agents can't pinky promise, right? So like, if you push an agent enough, well GPT 6 Astra is the reason why it's a big leap in model capability is like it like the like it is the least hallucinating model, which is fantastic. But like that model aside, most models you can kind of push to like lie or to believe something, or sometimes they'll straight up be like, oh, I actually realized I didn't do this work for you. So one thing that I have the agent prove the agent do, is to prove the work that it did. And there's two skills involved in this, evidence driven testing. And basically what evidence driven testing does, if your machine has the capability to do it, it will literally record the before state, meaning before the feature, or let's say you're trying to fix a bug, it will record the bug in action, and what it will do after is after it's done fixing, it will record a working version after, right? So this is what evidence driven testing does. It proves that the fix actually was made, because you'll be surprised, sometimes the agent will write the code and it'll think it work, but it didn't test it, or it didn't prove that it worked, and it just told you to work. So I need to make sure that the agent actually prove this work. But let's say, let's say your machine does not have the capability to do that. There's another skill called before and after. And I can actually, let me pull up a PR to show this, Greg, because I think it is better show you than I tell you. This is a PR my agent made. I didn't make this, the agent made this, and I wanted it to create an admin email page and connect an email service that I made. Look at what it did. It showed me a before state where the page didn't exist. It just it didn't. And it shows me the after state, right? So for every feature that I'm building, every PR that I'm doing, I am getting a before state and after state. And the reason why this helps, this helps me like, I'll be honest, I'm not reading all my code nowadays. Like, I might like, okay, did this, uh, like let's see, uh, like like like, barely. It's a skim. It's a skim situation.
Greg: It's a skim. It's a skim situation.
Mic: I'll be honest, the skims have even become less and less now, but a lot of the things that I'm doing now is I'm working on the front end where I make sure that it's following my code structure skill and I make sure I'm getting before and after screenshots, right? I can even pull up let me pull up another um example. Here's a more prominent example where I was working on a specific uh computer feature where I wanted to give my agent a computer and it just didn't work, right? The first run didn't work, um I didn't even have like my software factory set up, I was working on a different machine, and it pushed the code and it didn't work. As you can see, nothing's going on. I told my agent it didn't work, used the skills, used the factory, and this is the after screenshot with it actually using the app, right? So, these skills, the prove and the before and after, force the agent to give me factual, like a before and after proof, whether it's a video or it's screenshots. And there are times where it'll do the before, but then it'll do the after and be like, oh I just looked at the after screenshot or the after video, and I didn't really finish the feature. So I'll go back to what, it'll go back to building, right? This is the factory nature of it. I didn't have to tell it, oh that yeah you failed your before and after, go finish the the skills are written in a way where the agent knows, okay, the before and after criteria hasn't been met, I have to go continue on building, right? So, this gives me a visual representation of the work that's been done. It makes reviewing, especially if you're a non-technical person, it makes reviewing easier, because you know, I just look at some screenshots or a video, right? So, in the building process, at some point, I'll have a PR where I get to see before and after, and even though I might not understand all this mumbo jumbo, it, it will explain, it will show me visual proof that the work's been done. Now, I already hear somebody asking, what if the proof is not visual? And there's actually, um, a PR I'll show someone performance. I think it's this one. Okay, so I wanted to do another example here. I wanted to do a performance update, meaning for one of the apps I was building, the clicks weren't snappy enough. Like you can see now, everything is snappy, it's loading fast, that wasn't the case. So, I told the agent fix it, and it did. And it did end up giving me screenshots, but let's say there this was like something that it couldn't give me screenshots for. It will write tests and then it'll give me the results. In this case, it checked the speed at which the page was loading before. In this case, one of the pages 815 milliseconds. This is a sin in web development. Like this cannot happen, and mind you, this was written by GPT 5.6 Soul, right? Great model. But it got it down to 60. 817, 61. So I have again, actual proof by the agent that it's done what it said it did in the review process. I'll pause right here, Greg. Anything I've missed so far, Greg, or does it?
Greg: So, you know, if you're trying to build a software factory, trust, obviously is going to be a big part of that. And I think what you're saying is, hey, we're if you know, you're going to, if you're going to have all these agents, you know, building features, building apps, we need to be able to trust the things that it's going to create. So what you're saying is, here are a couple of skills that allow you, as like the agent manager, where in this case, Mickey you're like, you are the agent manager, right? You're not, you're not deep in the code anymore. You're kind of just looking at what's happening. And what's cool about, um, the before and after visual stuff is, it's kind of good for, you know, millennials and Gen Z or people on, you know, Instagram stories or Snap stories, stuff like that. It's almost like you're just like clicking through story to story, yes, yes, no. Like it's, it's, it's, it's bite size.
Mic: Basically, that's literally it right there, right? It's it's allowing me to build trust with the agent because, and what's funny is, like you said it earlier and it kind of clicked in my head. This is what like, normal organizations used to do with their engineers, right? It's like, you build a feature, and then there was someone whose job, like a senior engineer, whose job was to review your work, and you would have this PR with this description, um, and it would show, okay, basically, this is the work that I've done, and this is the test that I've written, right? So it's basically the same thing, except now we're doing it with machines. Like that's essentially it, and, and an example of the video, um, this is a, this is me using Cursor Cloud Agents, it records, it says proof of improvement, and like this is a, this is me using cursor cloud agents, it says proof of improvement, and like this is a video of the agent at work, using the app, right? So, this allows, to your point, like Instagram, TikTok, I can watch this and see, all right, okay, the agent actually built this and it works. This makes it easy for me to not have to read code, and I can just merge away and live my best life and go outside and touch grass.
Greg: So, there's that. Now we have one final step, which is the ship step. Now the ship step, I mentioned before and after, but there's this skill called Greploop, which uses a third party service named Greptile, which is a code review agent. Now, you don't need to use a code review code review agent, but if you're really serious about building software and it's going to be used by users, I highly suggest using some code review agent. Code Rabbit, Macroscope, there's tons of good ones out there. But me using Greptile, they have this skill called Greploop. And basically what this does, and I think I'll show it with this PR. Greptile leaves these summaries, and then it gives feedback. For example, this was the initial feedback it gave, um on the PR. There was some issue with, you know, pagination, right here, some menu space wasn't preserved, so it gave this feedback, meaning the agent that wrote the code missed these things. And that's fine, it happens, right? Even humans miss these things, right? But what happens is, Greptile not only gives feedback, it gives a confidence score. Now this is a five out of five, because after the feedback was given, if you see my name and then this line over here, the feedback was addressed, my agent addressed the feedback. But before the feedback was addressed, this score was a three out of five. What that tells my agent is that there are things that it missed and it needs to look at it. What the Greploop skill does, and by the way, this happens automatically. Someone doesn't have to write Greploop. The agent will do it automatically. What it does is, as follows, it says it opens the PR with the before and after proof embedded in the description. Whenever the change has a visible surface, measured numbers or output pairs, when it doesn't, it will give you numbers, right, or screenshot. And then look what the agent does. It runs Greploop, or Greploop apps, the difference is Greploop apps, if your file change was like 10,000 lines plus, um that skill activates, like you don't have to worry, the agent does it itself. But look what it does. It says Greptile reports five out of five until resolved comments, finished by presenting PR URL. Basically what this means is, it will the agent will take the feedback it got, it will go back to build. So check this out. Let's say we are at the point, let me write this down, we are at the point where we're at build, where we're uh ship, right, and it's now running Greploop. When I get a feedback score, a confidence score and it's a three out of five, what now happens, and remember we were talking about loops? This is actually a good loop. What happens is, this goes back to building. Now the agent goes back to step two, it starts to build, after it builds what is it what does it do? It proves, and then it ships. And here's what happens, automatically, the agent will wait for a new score. Greptile then gives us a four out of five. We caught some things, but there's one final thing we missed, go back to building. Right, it builds, it proves, and guess what it does? It ships, and now I have a five out of five. When I have a five out of five, what's left now is for me to merge, and I think maybe I have an open PR right here, so I can show you what that looks like. What's left for me is to just click Merge. When I click Merge, what happens is, this is finally back in the main copy of the app, of the main version of the app, and I did this while working on 15 either simultaneous version, uh, sorry, um, uh, features, 15 different features with different agents, sub agents, all that type of stuff. What this allows and this is the factory nature, it allows for an agent to have an isolated instance where it can work on its own, it has guidelines on how to build, it has a methodology to prove its work, and then it has an external service, proving its work, checking its work, and if its work is not up to standard, it has to continue in a loop working until that standard is met. Once I get a five out of five, this is when I enter the picture. This is what a software factory is. Notice we didn't talk about model, we didn't talk about harness, it's all workflows, skills, and a little bit of domain knowledge, right? Not everybody works the same. This is how I work, um, but I've found great results with this. I'll pause right here, Greg. Let me know what I need to further explain or, um, or add on.
Greg: I, I'm like what's clicking in my head is just this physical factory analogy for a software factory. So, just to like summarize, I'm going to tell you how I'm, I'm seeing it and I want I want your thoughts. So, like the isolate piece and the step one, um, that's like a factory taking a custom order and, you know, giving it its own station so it doesn't mess with the rest of production, right? So, you, you, you know, you called it a work tree, you know, in software, it's a branch, a work tree, an isolated environment, but, you know, that's the basic concept. Yes. Number two, uh, build, right? Build is the assembly line. So, the agent is actually, like, cutting and welding and assembling and wiring the product. Um, obviously, in software, you're not doing that. You're writing code, you're changing files, you're getting structure to things. You're actually creating something that's real, in a software, in a software sense. Um, step three is the proving step, which is basically a fancy way of saying quality control. So, basically, yes. Right? Like before anything leaves the factory, someone has to test it. You're not just going to like create a product and not have people test it. Like does it turn on? Does it, does it fit? Does it break under pressure? Like all the things. Like, you know, I'm I'm picturing like a car factory, something like that. In software, you know, you can run tests like, um, well, you can run test, you can preview it, you can do logs, you and, you know, the screenshots you showed. And then lastly, the shipping piece, um, it's basically like once it passes quality control, you know, it's going out the door, um, but there's going to be some things that you have to like, let, you know, you're going to have to merge it, you're going to have to deploy the PR, you're going to have to do release notes, you're going to have to, you know, give feedback back to the product team because maybe it doesn't pass quality control and then you have to like do that loop again, right? Exactly.
Mic: Yes.
Greg: I think I might actually rename everything you sit, like I've written, to what you said. Because like now I'm realizing like, oh yeah, my names are terrible. The what Greg says makes sense. That's exactly how this works.
Mic: Cool. So basically what we're doing here is we're taking a factory and we're making it a software factory.
Greg: Basically, so and this is why like I've seen again, not to knock people's startups and and products and stuff like that, like a software factory is not a product. It's not a special harness, it's not a like, oh this company built a software, no, a software factory is literally just a bunch of markdown files. And this is also another insane thing off-topic maybe a different video, is some startups are now an agent with a couple markdown files, right? We've really entered that time. So I hope this made sense for everyone and it excites everyone. I'm very excited with the time we're in right now because a lot of things are possible now.
Greg: 100%. I mean, no, this is, this is insane that you're actually able to do this. It's cool that you, people like you are like sharing this because I think it's, it's worthwhile. I want to just do one quick note on, um, Greploop or any code review software, you know, I think if you're serious, you know, no affiliation with Greploop or, or anything like that, but I think if you're serious, you know, about creating software, having, you know, some code review, software is pretty like I I don't understand why you wouldn't use a Greploop, a code rabbit, one of these tools.
Mic: Something, right? Like it makes sense, because like if you have, like, you know, we in business and I know because a lot of business people are watching, you know, we take the service we provide and all that stuff seriously, but it seems like with building software like we just don't care, right? And if you have people who are going to use your app, like, I don't know, like there's a level of like empathy I have for the user on the other side, and you know, a lot of these like startups because they've raised a jillions of dollars, like they have a lot of free tiers. Like you can cycle through free tiers and use a bunch of this stuff for free, right? So I highly encourage, if you're building something that you're serious, you're passionate about, I would use a code review agent of any kind.
Greg: Yeah. Cool. Thanks for coming on, thanks for sharing the sauce, all include links for where to follow, Mickey on the internet, on YouTube, all those places. His, his software that he's creating too. Go give him a follow, and uh, dude, I'll see you next time.
Mic: I appreciate you Greg, as always. Thank you everyone for showing love and watching, and yeah, we'll see you in the next one.