YouTube2Text

Build a Better Software Factory with Claude Code — Transcript

by ZazenCodes · 6,956 words · 967 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Today we're building a better software
  2. 0:01factory with Claude code. Thank you to
  3. 0:04Anthropic for sponsoring today's video.
  4. 0:06In the last video we built a basic
  5. 0:08software factory that can live inside of
  6. 0:10your project. People really seem to like
  7. 0:13this, like a lot. And there was also a
  8. 0:16lot of great feedback about how I can
  9. 0:18make that software factory better. So in
  10. 0:20today's video I did that. It uses GitHub
  11. 0:23issues, it submits PRs, it does multiple
  12. 0:25jobs in parallel from a single
  13. 0:27orchestrator, it uses Fable and Haiku.
  14. 0:30And it also has some more deterministic
  15. 0:31steps so that we're producing higher
  16. 0:33quality code from our factory. In the
  17. 0:35hands-on section of the video I'll start
  18. 0:36by showing you how to install this
  19. 0:38inside of your own project. I'll be
  20. 0:40doing that for one of my projects and
  21. 0:42demonstrating how to use it. I would
  22. 0:44highly encourage you to follow along
  23. 0:45with me in that part of the video.
  24. 0:47Here's the full mind map from the video
  25. 0:49and you can get this if you sign up for
  26. 0:50my email newsletter. I'll send you this
  27. 0:52image that you can use as reference. The
  28. 0:54big things going on here is this is the
  29. 0:56factory. I'm going to explain this soon.
  30. 0:58This is the prompt that use to install
  31. 1:00this in your own project. Here is my
  32. 1:02previous video on software factories. If
  33. 1:04you didn't watch that, what I did was I
  34. 1:06built a modular software factory that
  35. 1:08can live inside of your project. This is
  36. 1:10driven by Claude code sub-agents. If you
  37. 1:12want to learn more about the historical
  38. 1:14context of software factories, I still
  39. 1:16recommend watching the start of that
  40. 1:18video. Otherwise, this video will have
  41. 1:20everything you need. Here's what's new
  42. 1:21in V2. We have an intake step which uses
  43. 1:24Fable. We've got better routing using
  44. 1:26Haiku agents and this is more dynamic.
  45. 1:29We have more determinism built in so
  46. 1:31that we're doing more tests throughout
  47. 1:33the pipeline so that our software
  48. 1:35factory is more reliable. It runs on
  49. 1:37GitHub issues. This is the input and the
  50. 1:39output is a PR that gets pushed to our
  51. 1:41GitHub project. And we have better
  52. 1:43observability and cost and time per job
  53. 1:46and stuff like that. So to really
  54. 1:47understand that, let's look at the
  55. 1:49factory flow diagram. The input to our
  56. 1:52factory is a GitHub issue or multiple.
  57. 1:54It can take in many GitHub issues at
  58. 1:56once and process them all together. And
  59. 1:59these come into an intake step, which is
  60. 2:01Fable. This is a new step in this
  61. 2:03version of the factory where Fable
  62. 2:04thinks about if this is worth building.
  63. 2:07It scopes it out within the context of
  64. 2:09the project. It assesses it for risk,
  65. 2:11and it could potentially reject the
  66. 2:13feature or ask for more information from
  67. 2:16a human. Next, we're going into the spec
  68. 2:18writing and building step, and these are
  69. 2:20still two distinct steps, but I'll talk
  70. 2:22about in my closing thoughts for the
  71. 2:23video how these could probably be merged
  72. 2:26into a single step. From here, we're
  73. 2:27going to push our code through a gate.
  74. 2:29This is a new deterministic step, and
  75. 2:31the idea here is that we're really
  76. 2:33wanting to validate that the software
  77. 2:34factory is correct. And so, this is a
  78. 2:36cheap step where we can run this on the
  79. 2:38build and make sure it's looking good.
  80. 2:40And if it's not, we can go back to the
  81. 2:42builder, and then eventually, when we
  82. 2:44get through the gate, then we go to some
  83. 2:46reviewers. And so, we're going to do a
  84. 2:47code review, and this will be done with
  85. 2:49Haiku or Sonnet if it's deemed risky.
  86. 2:52And the risk comes back to this
  87. 2:55assessment which was made by Fable at
  88. 2:56the start of the pipeline. And I did
  89. 2:58this because I wanted to demonstrate how
  90. 3:00we can use agents inside of our software
  91. 3:02factory to inform later steps and to
  92. 3:05potentially cost optimize our software
  93. 3:07factory. Uh we're also going to go to
  94. 3:08other reviewers, and we'll do this all
  95. 3:10in parallel, and depending on the
  96. 3:11results of these, we can push the job
  97. 3:13back to the builder to fix. And once we
  98. 3:15get through the code review, then we go
  99. 3:17to an approver step, which decides if
  100. 3:19this can be merged automatically or if
  101. 3:22this needs human review in order to
  102. 3:24close out the loop on our software
  103. 3:25factory and implement this feature into
  104. 3:27the codebase. Now, having seen this
  105. 3:29factory flowchart, there's a whole
  106. 3:31section of stuff over here, but I want
  107. 3:33to get to this later in the video. This
  108. 3:35is more details around the how the
  109. 3:36system works. Right now, I want to focus
  110. 3:38on this, which is how to actually use
  111. 3:41this system with Claud code. We start
  112. 3:43with an orchestrator, and the
  113. 3:44orchestrator is a Claud code session
  114. 3:46that I'm going to spin up, and inside of
  115. 3:48that session, I'm going to say factory
  116. 3:50run. From here, it will start spinning
  117. 3:52sub agents, background agents in Claud
  118. 3:54code that will be doing various tasks
  119. 3:56within our system. It also has a
  120. 3:58deterministic spine, and what this means
  121. 4:00is I have actual scripts, like
  122. 4:02checks.sh, this gate script, this route
  123. 4:05script. I have a jobs script. These are
  124. 4:08shell commands that are shipped with the
  125. 4:10factory. I'll show you these later in
  126. 4:12the video, and these are doing
  127. 4:13deterministic things to push our jobs
  128. 4:15through the the pipeline, through the
  129. 4:16actual factory. So, we have these
  130. 4:18commands: factory run, factory run n,
  131. 4:22where n is a number, like a specific
  132. 4:25GitHub issue that we want to process.
  133. 4:27And we can just pass anything we want in
  134. 4:29here. We can just pass any arbitrary
  135. 4:31string in order to do stuff within our
  136. 4:33factory context inside of our project.
  137. 4:36And this all comes with the skill that
  138. 4:38I'm going to show you how to install in
  139. 4:39the video. Another thing that comes
  140. 4:41along with this is a dashboard so that
  141. 4:43we can view everything as it moves
  142. 4:44through the factory. And the other
  143. 4:46important things to know are that we
  144. 4:48have concurrency built in here. So,
  145. 4:49we'll process up to three jobs at once,
  146. 4:51and this is a configuration setting,
  147. 4:53which you can change after you've
  148. 4:55installed the factory in your project.
  149. 4:57So, let's get started by installing the
  150. 4:59factory. So, this is the prompt that you
  151. 5:01can copy and paste into your own project
  152. 5:03in order to follow along with me in the
  153. 5:05demo. So, I'm just going to copy this,
  154. 5:07and I'm going to go over to my terminal.
  155. 5:08And I'm inside of a project called note
  156. 5:11wall app. Just a simple note
  157. 5:13application. I can sort of write stuff.
  158. 5:15That's it. I've also got this app on
  159. 5:17GitHub, and this is important for the
  160. 5:18issues and the pull requests, which will
  161. 5:20be a core component of our software
  162. 5:22factory. So, I'm going to spin up Claude
  163. 5:24Code, and we'll use Claude to install
  164. 5:26our software factory. And I'm just going
  165. 5:28to paste this in. So, it says, "Install
  166. 5:30this software factory in this project,
  167. 5:32and this is the reference repository."
  168. 5:34It's a link to my source code for this
  169. 5:36video. And here's that exact link. If
  170. 5:38you open it up, you'll see something
  171. 5:39like this, and you'll see that prompt is
  172. 5:41actually right in here in the source
  173. 5:43code. So, you can get this in the video
  174. 5:45description and find this link. You'll
  175. 5:46notice that we have this folder .claud.
  176. 5:48We also have this factory folder. Both
  177. 5:51of these are going to appear inside of
  178. 5:52your project after this is installed.
  179. 5:54Let me go ahead and run this.
  180. 5:56This just finished up, and let me show
  181. 5:58you what was installed. So, if I go into
  182. 5:59note wall app and look at this inside of
  183. 6:01Vim, the two main things we've added are
  184. 6:03this .claud folder, and inside of here I
  185. 6:06have a bunch of agents files. These are
  186. 6:08the sub agents, the descriptions of how
  187. 6:10our sub agents in the factory work. And
  188. 6:13we've got skills and inside of skills
  189. 6:14I've got one new skill installed which
  190. 6:16is factory and it has one file called
  191. 6:18skill dot MD which describes the entire
  192. 6:21behavior of the factory. But that's not
  193. 6:23all of the code that you just got. You
  194. 6:25also got this folder which is called
  195. 6:27factory and here's where we have all of
  196. 6:29the code dependency for the factory. The
  197. 6:31big things to pay attention to are the
  198. 6:33bin files. These are what are
  199. 6:35responsible for ingesting and pushing
  200. 6:37things through the factory as jobs. We
  201. 6:39have check dot SH which does
  202. 6:41deterministic checks like classic CICD
  203. 6:44stuff as stuff gets pushed through our
  204. 6:46factory. We have a configuration file
  205. 6:48where we can specify behavior of our
  206. 6:50factory and we have a dashboard file
  207. 6:51basically observe our factory. Now
  208. 6:53coming back up I want to show you this.
  209. 6:55So there's a bunch of stuff Claude says
  210. 6:58changed for NoteWall and there's a whole
  211. 6:59bunch of stuff of how the software
  212. 7:02factory that I provide the template was
  213. 7:03actually adapted to your project. And
  214. 7:05the big things are this one. Check dot
  215. 7:07SH is going to run your actual tests
  216. 7:10inside of your project. This line right
  217. 7:12here agents dot MD has a new software
  218. 7:14factory sections and let's look at that
  219. 7:16new section that was added. It looks
  220. 7:18like this. Software factory. So we're
  221. 7:19explicitly documenting how to use the
  222. 7:22software factory inside of our agents
  223. 7:24file. Now let's get out of this and I'm
  224. 7:26going to start a new session up here
  225. 7:27with Claude and I want to actually
  226. 7:29demonstrate our software factory in use.
  227. 7:31Now I'm on Opus 5.5 with low effort. And
  228. 7:34let's see what happens if I just try and
  229. 7:36run the factory right now. I'm going to
  230. 7:38say factory run. And we're checking.
  231. 7:40Factory bin job queue. We are running a
  232. 7:43script inside of our factory to see
  233. 7:45what's in the queue. And it says oh, it
  234. 7:47came back empty. There's nothing going
  235. 7:49on. So let's go over to GitHub and put
  236. 7:51something in our queue for the factory
  237. 7:53and you can see that I have a bunch of
  238. 7:54open issues. However, these don't have
  239. 7:57the right label on them. So they're not
  240. 7:58going to get picked up by the factory
  241. 8:00until we explicitly label them. This is
  242. 8:03just a safety measure that I shipped
  243. 8:05with the factory because the idea is
  244. 8:07many bit different people might be
  245. 8:08adding issues into your project, but you
  246. 8:10want to choose which ones get processed
  247. 8:12by your factory. Let's pick up just one
  248. 8:14issue to start with. I've got this one
  249. 8:16called dark mode, and I'm going to go to
  250. 8:17labels, and I'm going to add the factory
  251. 8:19label. If you don't see this, you can
  252. 8:21just create it. It won't exist for your
  253. 8:23project unless you create it yourself.
  254. 8:25And now that I've done that, I can see
  255. 8:27this label's been applied. So, I can go
  256. 8:29back to my factory, and if I run the
  257. 8:31exact same command again, now it'll pick
  258. 8:33that up and start processing it through
  259. 8:35the factory. And we can see it's
  260. 8:37creating a job, and it is in the intake
  261. 8:39stage now for this dark mode feature.
  262. 8:43That is now serving. So, we can see
  263. 8:45issue one, dark mode, is in the intake
  264. 8:48step. This is being processed by Fable,
  265. 8:51and I wanted Fable to do the first step
  266. 8:53of our factory because to me, that's
  267. 8:55just a really important step to
  268. 8:57understand what's happening in the
  269. 8:58context of our project. Next, we've
  270. 9:00moved into the spec writer. So, I can
  271. 9:03show you that if I click into this, we
  272. 9:04can get more information. We're going to
  273. 9:06see a bunch of different files being
  274. 9:07accumulated as the task gets pushed
  275. 9:10through the factory. We just saw spec
  276. 9:12got created, and this is what was
  277. 9:14created by the spec writer. But before
  278. 9:16that, we had Fable write this intake
  279. 9:18form, and Fable decided to accept it,
  280. 9:21and it decided it was low risk. It only
  281. 9:23touches the UI as a surface, and it has
  282. 9:26a little summary of all the sort of big
  283. 9:28things you'd want to know, and then a
  284. 9:29full agent log of like more information
  285. 9:32that Fable was thinking around this
  286. 9:34feature. And this is really important in
  287. 9:35a factory to understand what the agent
  288. 9:37was thinking as it pushed your thing
  289. 9:39through the factory. It's really
  290. 9:40important for debugging and analyzing
  291. 9:42the effectiveness of the factory over
  292. 9:44time just to keep all of this
  293. 9:45information around from your job. So,
  294. 9:47now we're in the builder phase. Let me
  295. 9:48come back to Claude, and let's see
  296. 9:50what's going on over here. I can
  297. 9:51actually see the builder as an agent
  298. 9:53down here, and this is a sub agent in
  299. 9:56Claude code. And what I can do is click
  300. 9:57enter and go into that. So, I can
  301. 9:59actually see what this sub agent is
  302. 10:01thinking, and I could steer it. What are
  303. 10:03you doing? Now, this level of
  304. 10:05interaction with the agent is kind of
  305. 10:07not really the point of the software
  306. 10:08factory. I'm going to talk more about
  307. 10:10that in my closing thoughts, but I just
  308. 10:12wanted to show you how you can do this
  309. 10:13with Cloud Code. Let's go back to the
  310. 10:15main agent. So, this is going to be our
  311. 10:17orchestrator, and in principle, this
  312. 10:19could spin up other jobs at the same
  313. 10:20time. Now, let's follow this one task
  314. 10:23all the way through. The build just
  315. 10:24finished, and we're seeing that now it's
  316. 10:26in the review phase. And this means that
  317. 10:28it passed the gate. The gate was this
  318. 10:31deterministic step that we had to go
  319. 10:33through, where we're running certain
  320. 10:34tests and linting and stuff like that.
  321. 10:36And I can show you that go back to
  322. 10:38Obsidian. This is the part that we just
  323. 10:40got through. So, we just went through
  324. 10:42the gate, and we're getting a green
  325. 10:43check mark on that. And now we're going
  326. 10:45through all of these guys. So, coming
  327. 10:47back to our terminal,
  328. 10:49and bringing this back up, we can see
  329. 10:51that's why the gate went green here.
  330. 10:53Now, we see the UX guy just approved, so
  331. 10:55this is done. We're just waiting on the
  332. 10:57code review and the UI review. And then
  333. 10:59we'll go through the rest of the
  334. 11:01pipeline. But, look at this, the code
  335. 11:03review just failed. We got orange for
  336. 11:06the code review. That means we're going
  337. 11:08to get kicked back to the builder phase.
  338. 11:10And let me just quickly show you that.
  339. 11:12So, now we're going to follow this
  340. 11:13route, and we're going to have to go
  341. 11:15back to the builder with some feedback,
  342. 11:17and then we'll have to get pushed
  343. 11:18through again. So, we're actually seeing
  344. 11:20this self-fixing recursive aspect of the
  345. 11:22pipeline now. And we can look at that.
  346. 11:25We can look at more information. So, let
  347. 11:26me come in here, and I'm going to click
  348. 11:28on the code, and the verdict was one
  349. 11:31readability gap. This reviewer was
  350. 11:33basically really being really picky
  351. 11:35about something, and it kicked it back
  352. 11:37because like how something was working.
  353. 11:39Now, notice how the code review is using
  354. 11:41haiku or only saw on it if it's
  355. 11:44determined to be risky. I'm going to
  356. 11:46come back to this later because it turns
  357. 11:48out that using models like haiku in this
  358. 11:51phase of the pipeline might not be such
  359. 11:53a good idea. These models aren't always
  360. 11:56able to understand the code as well as
  361. 11:58the builder. So, it can create an
  362. 11:59actually bad dynamic when you have code
  363. 12:01review happening by an agent that's not
  364. 12:04as intelligent as the builder agent. In
  365. 12:06any case, coming back here, we see that
  366. 12:08the UI has also failed. And so, now Now
  367. 12:10kicked back, and we're going to go
  368. 12:12through another round of reviews after
  369. 12:14we build pass our gate. We're going to
  370. 12:16have to get these guys to review it
  371. 12:18again based on the feedback that they've
  372. 12:20provided to the builder. And here they
  373. 12:21go. They're back into the next round of
  374. 12:23review. We can see this time the code is
  375. 12:25going green and hopefully the UI agent
  376. 12:27passes as well. Nice. It went green and
  377. 12:30we are in the approved phase. Now this
  378. 12:32approver is going to decide if it's can
  379. 12:34be automatically merged or if it needs
  380. 12:37human review before it merges. And I
  381. 12:39think this is a cool thing that our
  382. 12:40factory can do because it can allow for
  383. 12:43a lot more autonomous behavior. If it's
  384. 12:45a straightforward feature that can be
  385. 12:47merged without us looking, that saves
  386. 12:49human time. That's valuable and that's
  387. 12:51something I want my factory doing for
  388. 12:53me. And indeed it's done. So we can see
  389. 12:55we have a PR that was created for this
  390. 12:57and it's been merged. So this has
  391. 12:59actually been merged into our production
  392. 13:01code. Let me show you that over on
  393. 13:02GitHub. Here it is. It's called dark
  394. 13:05mode one. This was from the intake step.
  395. 13:07We actually just wrote some stuff in
  396. 13:08here 6 minutes ago. I opened a pull
  397. 13:11request and then I marked it as
  398. 13:12completed. So let me go to the PR. This
  399. 13:15is the one associated with that issue
  400. 13:17and I added a bunch of stuff. This is
  401. 13:19all the commits that our software
  402. 13:20factory was making and then down here
  403. 13:22we're saying pull request successfully
  404. 13:24merged and closed. Our system decided it
  405. 13:26didn't need my attention. It's something
  406. 13:27that could be automatically merged but
  407. 13:29we have the full history of how this
  408. 13:30worked inside of GitHub which I think is
  409. 13:32very powerful for observability. And if
  410. 13:34I go to the code, I can see that I
  411. 13:36merged a pull request. This was done a
  412. 13:38minute ago and that's now in the code
  413. 13:40base. Now let's pull these changes in
  414. 13:42from the remote. So if I say get status,
  415. 13:44I should see some files that have
  416. 13:46changed locally. And what we're seeing
  417. 13:48here are the files and folders that were
  418. 13:51added or modified when we installed the
  419. 13:52software factory itself. I never added
  420. 13:55and committed these. So let me do that
  421. 13:56now. All right. Adds as in code software
  422. 13:58factory and these are all the files that
  423. 14:00we were looking at earlier. You'll also
  424. 14:02notice that I'm on main right now. So
  425. 14:04I'm working on my main branch and now
  426. 14:06I'm going to pull in the remote changes
  427. 14:08from main. I'll just say get pull. I'm
  428. 14:10going to have to clean up some merges
  429. 14:12but okay, we did auto merging. So it's
  430. 14:13all good. There were some conflicts with
  431. 14:15the agents, but we handled it. So, now
  432. 14:17we pulled these changes in and you can
  433. 14:18see a bunch of changes to stuff like the
  434. 14:20style and the theme. This is for our
  435. 14:22dark mode feature. Now, let me show you
  436. 14:24that. I'll say npm run dev and let me
  437. 14:25show you this app again. So, here it is.
  438. 14:27Now, I have a dark mode going on by
  439. 14:29default. It's dark now. Okay. So, now
  440. 14:32that I've showed you how to take one
  441. 14:33issue and push it through our entire
  442. 14:35factory, I want to show you how to do
  443. 14:37this for many issues at once. Now, I've
  444. 14:39got four issues open in here. I'm going
  445. 14:41to grab all of them and I'm going to add
  446. 14:43the factory label to all of them at the
  447. 14:45same time. And now, all of these guys
  448. 14:47have the factory label. So, let me come
  449. 14:49back to Claude and we're going to
  450. 14:50process everything at once. Now, let me
  451. 14:52just come back here. If I run factory
  452. 14:54run, it's going to process everything
  453. 14:56together. But, I could also say factory
  454. 14:58run and then just give a single number
  455. 15:00and just process that issue. I want to
  456. 15:02demonstrate that right now. So, I'll
  457. 15:04just say factory run and let's just pick
  458. 15:06one issue. Issue number four is called
  459. 15:08different fonts. So, let me just say
  460. 15:10four. It's looking at the queue and
  461. 15:12that's reading all of these from GitHub
  462. 15:15and it's found the right one in take
  463. 15:16issue number four, different fonts. And
  464. 15:19now, it's processing that through our
  465. 15:20factory. I can check in on that and here
  466. 15:23it is. Different fonts is now in the
  467. 15:25intake step. So, Fables having a look at
  468. 15:27that. Now, let's process the rest. And
  469. 15:29because this session right here is the
  470. 15:31orchestrator, I can keep continuing
  471. 15:33using it and I can use this orchestrator
  472. 15:35to interact with existing jobs in our
  473. 15:37factory or I can use it to create new
  474. 15:39jobs. And that's what I want to do now.
  475. 15:41So, I'll just say factory run and this
  476. 15:44is going to process everything else.
  477. 15:46It's going to pull all of the issues and
  478. 15:48push them through our factory and we're
  479. 15:49going to see these all starting to
  480. 15:50appear in the intake step. There they
  481. 15:53are. Notice how we just have three
  482. 15:55things running. This is because we set
  483. 15:56our concurrency for our factory to
  484. 15:58three. What's the uh concurrency
  485. 16:01setting? Currency is three in
  486. 16:02factory.config.json.
  487. 16:04Now, let me show you some other new
  488. 16:06stuff that's in our factory. We're
  489. 16:08timing these jobs. So, I can see this
  490. 16:10dark mode job has a time of 8 minutes.
  491. 16:13That's how long it took to push through
  492. 16:14the whole factory. We're also providing
  493. 16:16a cost. So, this one says $3.40. It
  494. 16:19didn't actually cost me $3.40
  495. 16:22to push this through the factory. It was
  496. 16:23free for me. I just used my Claude plan.
  497. 16:25However, this gives us an idea of how
  498. 16:28expensive these jobs are when
  499. 16:29benchmarked against each other, and then
  500. 16:31we can use that to try and optimize our
  501. 16:33factory. We can try and make this more
  502. 16:34efficient by looking at the job cost and
  503. 16:36trying to push this down in certain
  504. 16:38ways. So, I thought that was an
  505. 16:39important addition to this factory. Now,
  506. 16:41let's look at what's going on. We have a
  507. 16:43job that's in the needs human. So, this
  508. 16:45thing is effectively unpaused. And
  509. 16:47because of that, we've now automatically
  510. 16:49started the intake for the final issue.
  511. 16:52This is called multiple walls. Now,
  512. 16:54let's focus on this step that needs
  513. 16:56human review. There's two ways that we
  514. 16:58can do this in our application. The
  515. 17:00first way is I could actually click on
  516. 17:01it, and now I can start to sort of look
  517. 17:03at it and examine these files which are
  518. 17:05being written durably to our factory.
  519. 17:08So, I can see that the build has been
  520. 17:09blocked, and there's this decision.md
  521. 17:11why the builder was blocked. This is not
  522. 17:13how I would inter- interface with the
  523. 17:15factory. I would just talk to Claude up
  524. 17:17here. This guy is the orchestrator. He's
  525. 17:19managing everything, but his chat is
  526. 17:21fairly free for me to talk to. Or what I
  527. 17:23could do is spin up a new Claude code
  528. 17:25instance inside the same project. And as
  529. 17:27long as I use the factory skill, I can
  530. 17:29just ask whatever I want. What happened
  531. 17:31with the different fonts task? I can see
  532. 17:33this needs a decision for me. What
  533. 17:35happened? Intake accepted the issue with
  534. 17:37a narrower scope. It doesn't really know
  535. 17:39what to do for font. Default to
  536. 17:41handwriting. It wants some input from
  537. 17:42me. Now, because this is a video and I
  538. 17:44don't really care, yeah, just do
  539. 17:45whatever you want. Let's get this going
  540. 17:47again. So, that should be able to push
  541. 17:48this task back along. I've basically
  542. 17:50made my decision, and now our software
  543. 17:52factory should pick this up, and you can
  544. 17:54see we've just added this feedback
  545. 17:56one.md. I can click in there, and it
  546. 17:59says, "Yeah, just do whatever you want.
  547. 18:01Let's get this going again." And now
  548. 18:02we'll see this job go somewhere, and
  549. 18:04here it is. It's back in the building
  550. 18:06phase. Meanwhile, our colored sticky
  551. 18:08notes is just waiting on the UI, and
  552. 18:10then this should This one should be
  553. 18:11built out, and the multiple walls has
  554. 18:14been called high. So, this is like a
  555. 18:16high-risk feature, and that's a label
  556. 18:18that Fable put on our features. These
  557. 18:20little labels are things that I added
  558. 18:23from the initial intake step. I'm
  559. 18:25getting Fable to decide and based on
  560. 18:26that information, it adapts the factory
  561. 18:28behavior as we push the job through.
  562. 18:30Check this out. For changing the display
  563. 18:32name, it has code, it has UX and UI, but
  564. 18:35there's no security reviewer on that.
  565. 18:37Whereas this guy does have a security
  566. 18:39reviewer and the reason was because this
  567. 18:41was a medium difficulty. Therefore, it
  568. 18:43was assigned a security review step.
  569. 18:46Whereas this guy was low, so he was not
  570. 18:48assigned a security review step. This is
  571. 18:51just a behavior because I wanted to
  572. 18:53illustrate how we can change and make
  573. 18:55our software factory dynamic.
  574. 18:57Effectively, a dynamic directed acyclic
  575. 18:59graph. And this can help with
  576. 19:01efficiencies of your factory. Again,
  577. 19:04I'll speak more about efficiencies and
  578. 19:05my thinking around that in my closing
  579. 19:07thoughts in the video. Now, let me clean
  580. 19:09up what's going on up here. I've got two
  581. 19:11Claude sessions going on. This guy on
  582. 19:13the right, I just used to interact with
  583. 19:15our factory, but I'm fine to spin that
  584. 19:17one down. I could just totally get rid
  585. 19:18of that. Nothing changes in our factory.
  586. 19:21But, if I was to try and kill this
  587. 19:23session, well, this has a bunch of sub
  588. 19:24agents associated with it. We also have
  589. 19:26a shell and this shell is the thing
  590. 19:28that's actually serving our dashboard.
  591. 19:30There's no reason Claude has to do that.
  592. 19:32I could have served it myself manually,
  593. 19:34but if I try and spin this guy down,
  594. 19:37see, I just pressed control C and
  595. 19:38actually all background agents stopped.
  596. 19:40So, all of these guys have now been just
  597. 19:43totally halted. That's not good. So,
  598. 19:46what I'm going to say is factory run.
  599. 19:48And what this should do is
  600. 19:50look at the current state. It's looking
  601. 19:52at the queue. So, it went back to
  602. 19:53GitHub. It's like, what's going on? It
  603. 19:55looks at the queue and now it should
  604. 19:57spin all these guys back up. So, in that
  605. 19:58sense, the factory is fairly durable.
  606. 20:01Now, I'm sure I just lost a little bit
  607. 20:03of work because whatever those sub
  608. 20:05agents were doing, we've now spun up new
  609. 20:07sub agents and you can see these guys
  610. 20:09all just started from scratch. So, any
  611. 20:11work that was currently in flight just
  612. 20:13got completely annihilated and we're
  613. 20:14we're restarting that. So, in
  614. 20:16particular, this UI step was currently
  615. 20:18ongoing and that got blown up and we
  616. 20:20restarted it. It's not a good idea to do
  617. 20:22that, but um the factory is pretty
  618. 20:24durable, right? I just showed you how we
  619. 20:26stopped it and we were able to spin it
  620. 20:27back up and now things are getting
  621. 20:29pushed through. And now I can see
  622. 20:30everything's accumulated here. It either
  623. 20:32needs review and then there's two that
  624. 20:33have finished. And looking at this in
  625. 20:35GitHub, now I can see we've got flag
  626. 20:37from our software factory on three
  627. 20:39issues. And if I go to the pull request,
  628. 20:41three open PRs for each of these and
  629. 20:44there's two closed ones. And in the
  630. 20:46source code itself, of course, we're
  631. 20:47going to see that that was pulled in.
  632. 20:49Merge pull request number seven, change
  633. 20:51display name. Now, coming back to our
  634. 20:53factory, and I just love this idea that
  635. 20:55we can come back to it with a very
  636. 20:57totally clean project and just run this
  637. 20:59factory command in order to get all the
  638. 21:01context from inside of here. What's
  639. 21:03going on with the different fonts? We
  640. 21:05need a call on this.
  641. 21:07So, let's see. The fonts is stuck in the
  642. 21:09factory rule, not the feature. It needs
  643. 21:11a call from you. All right, so this guy
  644. 21:13here, different fonts, this was blocked
  645. 21:16because of an issue with my software
  646. 21:18factory. So, I just fixed the factory. I
  647. 21:20told it hey, go fix yourself. This
  648. 21:22should have never been blocked. We
  649. 21:24should have been able to keep building
  650. 21:25this. When I wrote it up here,
  651. 21:27I just want to be real with you guys. I
  652. 21:28was like, also update V2 factory in
  653. 21:30Zazon code season 3. So, that means the
  654. 21:32factory you install will have this fix.
  655. 21:35Like, this should be fixed for you. So,
  656. 21:36this has got picked up and now it's
  657. 21:38getting tossed back to the builder
  658. 21:39phase. So, we will work through that
  659. 21:41one. Now, let's talk about the other
  660. 21:43ones. Now, since I've already loaded my
  661. 21:44factory, I'm just going to ask questions
  662. 21:46directly. How about issue number five?
  663. 21:48What's going on there? All right, now
  664. 21:49there's some noise going on because this
  665. 21:51other job's running, but this is what it
  666. 21:53said. There's a lot of stuff in here.
  667. 21:54I've got this skill. This is just my own
  668. 21:56skill. It's called TLDR. So, what my
  669. 21:58TLDR skill does is it just shortens the
  670. 22:01output of the agent. Okay, I trust you
  671. 22:03to handle this one properly. You can do
  672. 22:05that. Next, what's going on with issue
  673. 22:07number three, the colored sticky notes?
  674. 22:09The new color tester never runs because
  675. 22:11it skips server. May I send it back with
  676. 22:13move test and run color. Do that. Sounds
  677. 22:15good for issue number three. Now, these
  678. 22:18guys here appear to be needing human
  679. 22:20review, but I've already kicked these
  680. 22:22along. So, if I refresh this, I can see
  681. 22:24this one's actually changed. It's
  682. 22:25getting built now. The multiple walls is
  683. 22:28still here. What should we do about the
  684. 22:30multiple walls issue number five? Okay,
  685. 22:34so for issue number five, we're actually
  686. 22:35intentionally made it. We're waiting.
  687. 22:37We're waiting for these other tasks to
  688. 22:39finish. The orchestrator has some sort
  689. 22:41of shared understanding, right, of
  690. 22:42what's going on in the system and we're
  691. 22:44waiting on this until these guys have
  692. 22:46finished and then we're going to merge
  693. 22:48this PR in.
  694. 22:49That makes sense to me. And notice how
  695. 22:51we keep getting these TLDRs. That's from
  696. 22:53my skill, so I could just say this and
  697. 22:55I'll say, "Stop outputting TLDR." I'll
  698. 22:57leave a link to this and my other ones
  699. 22:59in the video description. If you like
  700. 23:01them, please leave me a star. Helps me
  701. 23:03out a lot on this channel and with my
  702. 23:04brand. And if you're enjoying this video
  703. 23:06on software factories, you can get my
  704. 23:08PDF guide if you sign up for my
  705. 23:10newsletter. This just has a structured
  706. 23:12summary of what we talked about in this
  707. 23:14video, along with links and installation
  708. 23:16commands. You can send this to your
  709. 23:17friends or use it yourself. This is my
  710. 23:19newsletter. I just send one email a
  711. 23:21week. And if you sign up for this, I'll
  712. 23:22also give you some other stuffs like my
  713. 23:24agentic engineer playbook. This just has
  714. 23:27my like philosophy on agentic
  715. 23:29engineering and basically this new age
  716. 23:32that we're going into as software
  717. 23:33engineers. Now, everything's done except
  718. 23:35for this last multiple wall. And what's
  719. 23:37going on with multiple walls? I'm going
  720. 23:39to get TLDR working on that. It's
  721. 23:42stalled. It waits on your sign-off for
  722. 23:44the wall format.
  723. 23:46One round to merge.
  724. 23:48Yep, let's do whatever you want and
  725. 23:49merge it in. We also have links here. I
  726. 23:51can click this link and open up the PR
  727. 23:54directly. Okay, I think it's worried
  728. 23:56about throwing out some data. This is
  729. 23:57just a test app, I don't care. Yeah,
  730. 23:59just get rid of the data right now. Just
  731. 24:01test data, it doesn't matter. I love
  732. 24:02this one. I love how it's like actually
  733. 24:04recording these. So, we have factory bin
  734. 24:06job feedback. This is a function in our
  735. 24:08factory that explicitly sets feedback
  736. 24:11from the user and we have tons of these
  737. 24:13functions. I want to show you these in
  738. 24:15in just a minute. We're about to get to
  739. 24:16this. Let me just show you the final
  740. 24:18version of the application. So, I'll
  741. 24:20pull all the changes in. So, here's our
  742. 24:22our thing. We can now change the color
  743. 24:25of the sticky notes. That's cool. This
  744. 24:27one will be red. Let's go with red.
  745. 24:31Yeah, nice. Okay. And there was also Oh,
  746. 24:34I can change my name. Okay, cool. Now,
  747. 24:36if I do new one, I'm talk now.
  748. 24:40Yeah, there he is. Okay. Go back to our
  749. 24:42mind map and sort of walk through these.
  750. 24:45So, the deterministic checks are handled
  751. 24:46by this checks.sh.
  752. 24:49This is something that checks and
  753. 24:50deterministically fails if we're not
  754. 24:53meeting the right
  755. 24:54things that we need in our project. If
  756. 24:56we're not passing the tests, and it's
  757. 24:58very simple. Look at this. It's a bash
  758. 25:00file, and it's going to run through, and
  759. 25:02it's going to run all these npm commands
  760. 25:04because we have an npm project. But if
  761. 25:06you have a different project, you'll be
  762. 25:07running different tests in here. So,
  763. 25:09we're doing a linting, we're doing a
  764. 25:11type check, we're doing npm test, and
  765. 25:13then we're running a build. We're
  766. 25:14actually building our project, making
  767. 25:15sure all of this works. If If something
  768. 25:17goes wrong here, we do not even get to
  769. 25:20the reviewers. It hasn't even made it
  770. 25:21that far because this gate is put in
  771. 25:23place right in front of them. So,
  772. 25:25job.json drives all of the stages. This
  773. 25:28is a file that's on your computer that
  774. 25:30lives and represents the job as it gets
  775. 25:32pushed through the factory. And this
  776. 25:34thing is only written It's only updated
  777. 25:37by factory bin job. This is not like a
  778. 25:41vibey thing that gets updated by Claude
  779. 25:44code. Claude code calls factory bin job
  780. 25:47in order to update this JSON file. And
  781. 25:50let me show you that. It'll be very
  782. 25:52obvious when you look at this. Let me
  783. 25:53look at job inside of here. And it says
  784. 25:55right at the top, "The only writer of
  785. 25:57factory jobs job ID job.json." We have
  786. 26:01all these different commands like job
  787. 26:03queue. This looks at the queue of what's
  788. 26:05going on. If I follow queue, we can kind
  789. 26:07of see
  790. 26:08probably This might be a bit messy, but
  791. 26:10we're going to be looking at GitHub. Do
  792. 26:11you see issues equals gh.json? This is
  793. 26:14looking at GitHub and seeing what's
  794. 26:17going on inside of GitHub. So, then
  795. 26:18there's job create, job advance, job
  796. 26:21merge. And this is what's responsible
  797. 26:22for pushing things through our pipeline,
  798. 26:24running this script. Let me show you the
  799. 26:26actual jobs. Now, we're not going to see
  800. 26:28those inside of here because they're
  801. 26:30being get ignored. If I go into factory
  802. 26:33and look at everything in here, we have
  803. 26:35a jobs folder. This is where the actual
  804. 26:37data of the stuff in our factory lives.
  805. 26:40You should know that this data just
  806. 26:42lives on your computer. This is being
  807. 26:44get ignored. It's not being got backed
  808. 26:46up to GitHub. So, if you wanted to
  809. 26:47persist this, you could build something
  810. 26:49in in order to persist this separately,
  811. 26:51and that's what I would do. I would
  812. 26:52build in something that saves this data
  813. 26:54to Google Cloud Storage, and I would
  814. 26:55just say, "Hey Claude, I want to save
  815. 26:57this stuff to Cloud Storage. Let's set
  816. 26:59up a workflow for doing that. It'll
  817. 27:01handle that for you." This is the data
  818. 27:02that we keep seeing in our factory,
  819. 27:04including round one, round two, round
  820. 27:05three. This is the data that if I look
  821. 27:07inside of here is populating all of
  822. 27:09these files right here. Um it's just
  823. 27:11coming from those markdown files that's
  824. 27:13on that's on my actual system. And I've
  825. 27:15got this job.json. So, this guy right
  826. 27:17here, this is the file that is being
  827. 27:19edited by those bin scripts. When it
  828. 27:22says only factory bin job writes it,
  829. 27:25this is the thing that is making our
  830. 27:27software factory durable and properly
  831. 27:29passing jobs through the life cycle of
  832. 27:32the factory. The big point is that this
  833. 27:34thing is worked on programmatically.
  834. 27:35Claude does not work on this itself.
  835. 27:38Claude runs functions in order to update
  836. 27:40this file. Hope that's clear. That's
  837. 27:42really important for how our factory is
  838. 27:44working. Right, we've pretty much
  839. 27:45covered everything. Thank you to
  840. 27:47Anthropic for sponsoring today's video.
  841. 27:49And if you're not using Claude Code yet,
  842. 27:51then you can click the link in the video
  843. 27:52description and sign up now. Let me
  844. 27:54share some closing thoughts on what
  845. 27:55we've built today and where I want to
  846. 27:57take this next. First of all, this is
  847. 27:59definitely an improvement on my software
  848. 28:02factory from the previous video. There's
  849. 28:04a lot of things that I thought through
  850. 28:05better, and I like how this one is
  851. 28:07working better than that previous one.
  852. 28:09However, it's also more complicated. And
  853. 28:11with complexity doesn't always come
  854. 28:13improvement. So, I would encourage you
  855. 28:15to look at this factory and say, "How
  856. 28:16could I actually simplify this a little
  857. 28:18bit for myself while still getting all
  858. 28:20the performance that that I want out of
  859. 28:22the factory?" Next thing I want to talk
  860. 28:23through is cost. So, we're tracking the
  861. 28:25cost or like the estimated cost if we
  862. 28:27were paying token prices. Again, we're
  863. 28:30not paying token prices, so that's
  864. 28:32something to keep in mind, but it's
  865. 28:33still a good benchmark that we can use
  866. 28:35to try and optimize the cost over time
  867. 28:37and compare the cost of different jobs.
  868. 28:39And what we might want to try and do is
  869. 28:41use cheaper models like Haiku at certain
  870. 28:43places in the pipeline. For example,
  871. 28:45maybe we could use Haiku in the reviewer
  872. 28:48phases. However, if we're doing this and
  873. 28:50now the reviewers are failing because
  874. 28:52they're using Haiku and they're just not
  875. 28:54really thinking very intelligently about
  876. 28:55the problem and then they're kicking
  877. 28:57work back to the builder, that could
  878. 28:59actually end us end up costing us more
  879. 29:01money. So, that's something I would I
  880. 29:03would be careful about doing. Um
  881. 29:05potentially the approver could be a
  882. 29:06Haiku agent. But, then as well, we're
  883. 29:09like, do we want to put the choice of
  884. 29:11approving this feature into our code
  885. 29:13base on Haiku? I don't know if I want to
  886. 29:15do that. And I really like how we're
  887. 29:16using GitHub issues and pull requests.
  888. 29:19And something cool that we could do
  889. 29:20would be to watch the performance
  890. 29:22metrics of our actual production system
  891. 29:24and then be pushing those things
  892. 29:26automatically into GitHub issues where
  893. 29:28they could then be ingested into the
  894. 29:29factory. So, if we wanted to basically
  895. 29:32bring in a layer of, you know,
  896. 29:34post-implementation monitoring, like
  897. 29:36post-production uh deployment monitoring
  898. 29:39in our actual system, we could do that
  899. 29:41through this exact factory, through the
  900. 29:43GitHub issues, like form factor. We can
  901. 29:46be getting other systems, any other
  902. 29:48system we have, to be pushing GitHub
  903. 29:50issues into our project, adding the
  904. 29:52factory label, and then it gets picked
  905. 29:54up here and pushed through our system.
  906. 29:56So, we don't actually need like extra
  907. 29:58layers in order to attach things like
  908. 30:00observability. That's pretty much
  909. 30:02already handled for us by the GitHub
  910. 30:04issues. Okay, the last thing I want to
  911. 30:05talk about is actually using this in
  912. 30:08production. So, this is the big
  913. 30:10complaint with software factories. It's
  914. 30:11like, okay, yeah, that's cool, but you'd
  915. 30:13be a a psycho to actually plug this into
  916. 30:15your real production system.
  917. 30:17And I would have to agree with you,
  918. 30:19right? This is a 30-minute video that
  919. 30:22you've watched about how software
  920. 30:24factories work, how you can build one
  921. 30:25for yourself. I'm not telling you that
  922. 30:28you should take the code that I've
  923. 30:29showed you in today and plug it into
  924. 30:31your production system and close your
  925. 30:33eyes and get your agents chugging
  926. 30:35through all of your all of your issues
  927. 30:37for you and building your application in
  928. 30:39in that [music] way. Um I do think it's
  929. 30:41something you could do in the way that I
  930. 30:43showed you how we're controlling it and
  931. 30:45we're sort of looking at it and we're
  932. 30:46checking how it goes. Yeah, sure. That's
  933. 30:49a that's a thing you could do. I think
  934. 30:51this is a thing you could start with and
  935. 30:53I think that actually software
  936. 30:55development in general will go to an
  937. 30:57abstraction layer that looks like this.
  938. 30:59That's less about coding agent harnesses
  939. 31:01like we're seeing them today like Claude
  940. 31:03um how Claude code works today but
  941. 31:05instead from a higher level like super
  942. 31:07Claude code where you're you're sort of
  943. 31:09managing above the agent harness level
  944. 31:12in the same type of way as we're seeing
  945. 31:13this video. So I think the concept of a
  946. 31:15software factory is very important to
  947. 31:17understand. I think what I'm showing you
  948. 31:19today could be the basis of something
  949. 31:20that would work in a production system
  950. 31:23um and I think that you just have to be
  951. 31:25very thoughtful about actually how that
  952. 31:26should should happen for you. Um and I
  953. 31:29and I'd love to hear your thoughts on
  954. 31:30that as well. So what's next for me with
  955. 31:32my software factory? Well, I'd love to
  956. 31:34hear in the comments ways that we you
  957. 31:36think this can be improved or modified
  958. 31:38but the big thing I'm thinking is how do
  959. 31:40we get this running in the cloud? Like I
  960. 31:43don't want to run this on my computer
  961. 31:44anymore. I want this just automatically
  962. 31:46running somewhere and I think the Claude
  963. 31:48agent SDK would be the way to go for
  964. 31:50this. So that's what I'm considering for
  965. 31:52my next video. Love to hear your
  966. 31:54thoughts on that and thank you for
  967. 31:56watching.

About this transcript

This page contains the full transcript of Build a Better Software Factory with Claude Code by ZazenCodes, generated from the public captions YouTube serves with the video. The transcript has 6,956 words across 967 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.