· entry 5 of A software factory builds a media server

What is a self-evolving software factory?

So far: 169 messages from me · about 15 h of my time · 536 agent-hours · about 94 € · 27,000 SLOC*

At 17:58 today my phone showed this message.

Telegram message from the factory. Vector, the RTX 4080 laptop, dropped off the network at about 17:40 with 0.8 GB of disk free. Work has moved to the Celsius. It asks me to check power, Wi-Fi and restart the laptop if it is frozen, so the agents can reach it and free its disk.

It came from the software factory that is building my media server. One of its laptops had filled its disk and dropped off the network. By the time I read the message, the work had already moved to another machine. It asked me for the one thing it could not do itself. Someone had to walk to the laptop, check the power and Wi-Fi, and restart it if it had frozen.

I call it a self-evolving software factory. What that means is easiest to explain through the steps that led to it. Most people who use AI have already tried some of them.

  1. A person writes every line. This was all of programming until a few years ago. The computer only turns finished code into a program and complains about mistakes.
  2. The computer suggests the next line. A code editor with AI completion offers to finish the line or the whole function as you type. You accept or ignore it. You are still the one writing.
  3. The computer writes pieces on request. This is where most people meet it. You ask ChatGPT or Claude to make a web page for your band or a small tool for your spreadsheet, and you get the code back. You copy it, try it and ask again when something is wrong.
  4. The computer makes the change itself. You open an agent such as Claude Code or Codex in a project folder. An agent is an AI that can use tools. It reads the files, makes the change, runs the tests and fixes its own errors. You describe the task and check the result.
  5. The computer plans. You give the same agent a larger goal, such as adding user accounts to a web shop. It writes a plan, you approve it, and it works through the tasks one by one. You read less and less of the code.
  6. The computer runs a team. Several agents work at once in separate roles. One writes, another tests, a third reviews, and programs check their work. You set the goals and answer the questions they cannot.
  7. The factory improves itself. The team also changes how it works, from its own record of what went wrong. You set the ground rules, decide what to build and turn the work up or down.

Seven steps from writing code by hand to a self-evolving software factory. At each step the computer does more of the work and the person does less.

Most people who use AI for code are at step three. Many developers work at four or five. This project is at seven.

Who decided what

I set a handful of ground rules, most of them on the first day. Everything else is the factory’s own design, and it keeps changing. The factory decided who does what, and above all who may see what. Definers write what “correct” means for a task, including tests the builders never see. Builders write the code, several at once, and may not mark their own work done. Auditors go back over finished work and try to break it, without knowing which AI model built it. Programs land the changes, run the slower checks afterwards and undo any change that broke something. An agent saying its work is done counts for nothing. Only a program’s check counts.

The factory also decides where the work runs. It uses every computer I give it, shifts work to whichever has room, and moves it away from one that drops out, as the laptop did today. At the time of writing it has six.

Changing its own design is what separates it from skills, the instruction files for AI agents that get talked about on social media. A skill stays as a person wrote it. This factory has rewritten its own process dozens of times in four days, whenever its record showed that a rule was wrong.

I do not read the code, so the tests are the only proof that it works. But a test can pass without checking much, and AI agents asked to write tests are known to take shortcuts. In one study, a leading model cheated on more than half of a set of tasks built so that they could not be solved honestly.

So the factory tests its tests. A program makes small deliberate mistakes in code that has just changed, such as turning a “less than” into a “greater than”, and runs the tests again. If they still pass, they were not really checking that code, and the miss is recorded against the agent that wrote them. In the trade this is called mutation testing, and Google does the same on its own code changes. It was in the factory’s plan from the day it designed its process. It switched it on two days later, after its own auditors found 28 faults in work that had already passed every check.

Back to the laptop

The full disk got the same treatment. Within hours the factory had written a guard program that keeps disks from filling up without relying on any agent to behave. Every 20 seconds it checks free space. When space runs low it removes old build output, the leftovers from making programs, biggest first. When it runs very low it pauses the programs that write build output, frees space, and lets them continue when there is room again, or after 15 minutes at the latest. If that is still not enough, something other than build output is filling the disk, and it raises an alarm.

The factory made the guard safe before switching it on. It touches only build programs inside the work directories, never the agents themselves. It keeps a list of what it paused, so if it dies, the next guard releases them first. It was tested on a fake build before it ran for real. It does not delete video clips, recordings or datasets. Those are not its to delete, and for them the alarm goes to a person. The guard now runs on two machines, and versions for Windows and the Mac are being written.

More about the media server itself tomorrow, and it’s already wild what has happened.

* SLOC: source lines of code. The server’s own code only; tests, comments and blank lines are not counted.