This article is also available as a video on the Modern Software Engineering channel.
There has already been a big shift in how we do engineering, with coding harnesses, guides and sensors, skills and hooks. Our goal is still the same – great software – but the tools are changing – rapidly! Today Iām talking about engineering an agent setup so robust that it can produce software unattended. Iāll be talking with Matt Wynne about his experience with Dark Factories.
Note – the following texts are each preceded by the name of the speaker. “Studio Emily” was recorded after the interview took place. The sections where Matt is speaking have been edited to make them shorter without changing the overall meaning.
Studio Emily – Matt Wynne was challenged by his old boss to stretch his AI skills further – and create a āDark Factoryā to radically improve software delivery speed while not compromising on quality. Today Iām interviewing Matt about how that has worked out, and what it means for software developers today. Heās going to explain where human engineering is still needed, and how he incorporates the best parts of Behaviour Driven Development into his agentic AI enabled process.
This video is in our series of AI Briefings. For previous episodes, please check out the playlist. Matt Wynne has recently founded a consultancy called Lean Software Production focussed on AI training for software engineers, and ImpactWorks, providing software to non-profits. Iāve known him for a long time for his work on Cucumber, an open source tool for specifying behaviour and collaborating with stakeholders.Ā
I asked Matt to explain – what is a āDark Factoryā for software development?
Matt – So darkness implies, like, factories where everything in the factory is automated. There’s no humans in the factory at all, and you can turn the lights off. And I think that is a fantasy for software development. Like, I think it’s a sort of a hideous capitalist fantasy that we’re gonna be able to just, like, fire all the humans, and the CEO can just sit there having ideas and money will just start falling into the bank account. It doesn’t seem realistic to me. But how dark are bits of it, is kind of the interesting challenge.
A factory is just automation. It’s just automation that involves LLMs in it. So we can achieve more with an LLM based piece of automation than we could achieve with pure deterministic automation.
Studio Emily – I find that reassuring, and it matches my experience – we still need human expertise in software development. I asked Matt about his first experiences with a Dark factory. He explained that earlier this year, he took part in a week long full-immersion training with an early adopter – Justin McCarthy, the former CTO at StrongDM.
Matt – So, yeah, I kind of got to play with these ideas in just a really cool environment for learning. And the feeling I got after that week⦠the best way I can describe it is – and I’ve never been to space – but I felt like I’d been to space. Like, I had a whole week of just trying out this way of working where I was fully hands off. Like, I wasn’t gonna try and handcraft any of the code. I wasn’t gonna try and read the code. I was gonna try and, you know, steer it from a step removed. And the amount of value that I was able to create that week, the amount of – stuff – that was doing useful things for our business was incredible, the scale of what I could make. So I felt like I’d been in space. Right? That suddenly everything looks smaller. It’s kinda like TDD, actually, Emily. Like, once youāve felt it, it’s really hard to go back. It’s quite addictive.
Studio Emily – Matt is one of those people who really understands TDD, so him talking about Dark Factories in the same way is pretty compelling evidence for me that there is something important here for software developers. Iām still skeptical though, how can you ensure good engineering if you donāt look at the code any more?
Matt has previously shared an example of a software factory with me, the same RPG Combat challenge Iāve talked about before. Matt gave me his full commit history for the project. It starts out with some SKILL.md files and a shell script that runs a Ralph loop. From there, he iterates very fast on building up a factory to solve that problem. I asked him why he didnāt re-use an existing factory setup.
Matt – Yeah. Well, I mean, it’s different every time, I think. the factory that I had been using around that timeā¦was much more designed to deal with pieces that were like the size of a user story. Doing the RPG game felt like I can’t use this thing because it’s the wrong sizeā¦So I’m just gonna build a new one for it. And I think, actually, the skill of developing a factory around a problem is a good skill for us. A new skill that we all need to get good at.
Studio Emily – This skill of building a software factory, letās look at how Matt did that on this example. This is a snippet of the commit history of that project, there are hundreds of commits, this is some of the earlier ones. Iāve highlighted two different kinds – ākaizenā commits in yellow, and āralphā commits in red. A āralphā commit is one where the factory has been running. An agent in a Ralph loop has created code and tests, and itās committed its finished work. A ākaizenā commit is different. Those are the ones where the human – Matt – is improving the factory itself. That means changes to the skills and the harness to improve the way the factory works.

You can see that earlier in development, (towards the bottom), there are a lot of ākaizenā commits, and later (nearer the top) there are more āralphā commits. The process of building the factory is never finished, and the point where code starts to be produced is pretty early on, although volumes are small, and the ratio of the two kinds of commits shifts over time. I asked Matt to explain what heās doing in these āKaizenā steps.
Matt – If I’m using a factory to build a piece of software, I’ve got kind of two backlogs. I’ve got the valuable things I want the product to do, the software to do, but then there’s also all of the things I wish the factory did better. So I started keeping a Kaizen backlog, and I wouldā¦kind of oscillateā¦between. Right, I’m making it do something valuable, I’m generating something valuable. And then now I’m stopping, and I’m learning from the mistakes that the factory made, and I’m gonna make the factory better. That way, you can kinda gradually grow and improve the factory that fits the problem that you’re solving in this context, at this moment.
Studio Emily – That sounds like engineering to me. A dark factory sounds a lot less mysterious when you see it as an engineering process of solving problems and creating something that works. Even better, Matt says that designing a factory is a bit like TDD.
Matt – you know, with TDD, we have to say, before we start doing the work, we have to declare what result we want. Right? We have to think through, this is what I want, and then we work backwards to get there. And the same thing with designing a factory, you have to be able to specify in the machinery – what does good look like to you.
Studio Emily – Ok, at this point I am pretty interested in what kind of actual code Mattās factory produces. As a fellow TDD practitioner I thought he would still be interested in code quality, but I wasnāt sure. I asked him whether he still reads the code.
Matt – Eventually, I want to not have to read the code at all. But, initially, I’m gonna read it a lot to try and get a sense of, is this the code I wanted. Because that’s how you get feedback as a human about whether the factory that you’re building is effective.
Emily – This sounds like you actually still care deeply about the design in the code that you’re writing and the code quality. Am I right?
Matt – Totally. And this is the funny thing, I think some people really have sort of conflated vibe coding with anything that LLMs do for us. And sort of the whole point about software factories for me and and the big idea I got from Justin McCarthy is that you can’t trust anything that LLMs do. Like, they will tell you what you wanna hear. They will tell you lies. But, they’re just transformers with this, like, noise in there. Butā¦if you can put a feedback loop in, then, actually, you can get them to converge to something that’s pretty close to what you would have wanted.
Studio Emily – At a low level then, we still care about code quality, building it right. Another big part is making sure the factory builds the right thing. Matt Wynne is famous for his work on the open source tool Cucumber, for Behaviour Driven Development. As I expected, he is using Cucumber and the acceptance test definition language Gherkin to interact with his factories and specify what to build.
Matt – I think BDD is really helpful. Like, I always thought about those acceptance tests as being a boundary object between. You know, like, anthropologists talk about boundary objects. This kind of shared artifact between the people with problems and money, and the people with technical resources, that the Gherkin was like the place where you could come to a common understanding about what is the problem we’re trying to solve and what’s the scope of what. You know, how far we’re gonna go with solving it. So I found, for me, that it’s a really good surface for interacting with the agents about what I want from the software that the agents are generating.
Studio Emily – Iām getting a picture here that the dark factory works because we have human engineering expertise to specify what to build using a language like Gherkin, and use collaborative practices from BDD. And we still care about code quality even if we eventually read little code. What else is needed? Matt explained that he uses Architecture Decision Records to steer the overall architecture of the software, with an architecture coherence review as one of the regular feedback loops to review how well the factory is doing. Matt explained his priorities:
Matt – So what’s the behavior? What’s the architecture? What are we gonna name some things? So I’m getting quite into the details, but I’m not getting into the level of, how are the if statements indented or how many if statements are there or even, like, how many classes are gonna get used to solve this. But the behavior and the architecture, I feel like, are the two things I want to still have input over.
So the Gherkin and the ADRs are really the kind of key places I try and pin down and I read every word, and try and be really involved.
Emily – So can you talk about if people are interested in āgoing to spaceā and having this experience, how can they get started and get this insight that you’ve obviously got?
Matt – Well, I mean, we have a training course, so you could totally come join our training course! But if that’s not available to you, I think it’s really important to get a side quest, like, to get a space where you can play, you need to play with it on a safe problem. Something you want to exist in the world, and something that’s a bit ambitious. Like, it feels a little bit crazy to be expecting that it could be true.
It’s a really hard environment to learn in your real code base where everything matters and you’re terrified of making a mistake. So giving yourself a safe space to play in, I think, is really good.
Conclusions
Studio Emily – I started this conversation feeling pretty skeptical about dark factories for software development. Everything Iāve seen so far tells me that human expertise is needed for successful software development using agentic AI. And – Matt confirmed that this is still true, in fact probably more so. If youāre planning to use agents to generate code that you donāt intend to read, there needs to be a well-engineered system to ensure:Ā
- code quality is good,Ā
- the architecture stays good over time,Ā
- and you build features according to the right specifications.Ā
The advice Iām taking away from Matt Wynne today is you need constant Kaizen to improve your setup. A Dark Factory doesnāt mean you can fire all the engineers, rather you need continuous engineering.
Happy Coding!


