Dark Factory Software Development: Which Lights to Leave On

Dark factory software development ships code no person has read. Who verifies it, why an agent's own tests are weak, and which lights to leave on.

By Ait Nohaila, Business Development Representative 13 min read

Dark factory software development means that AI agents write, check and release code that no person has read. It is only as safe as its checks, so those checks must be independent of the agents that write the code.

Reading every change is slow, so it is the first step a busy team wants to drop. The tests are green and the releases go out. Then a customer is charged the wrong amount. Nobody can say which change did it, because nobody read any of them.

What is a dark factory in AI software development?

Definition

A dark factory is a way to make software in which no person reads or approves the code before it is released.

  • AI agents write the code, and machines decide whether it is good enough.
  • People write the requests and look at the results.

The name comes from factories where robots work without light.On Dan Shapiro's scale of AI coding, level 5 is the dark factory, "a black box that turns specs into software".Addy Osmani describes the same step: "code ships that no human has read, verified only by other machines."

Software factory vs dark factory: what is the difference?

A software factory is the whole line, from the request to the release.What is a software factory explains each station.Light and dark are two ways to run that line.

Light factory

  1. DecidePeople
  2. BuildAgents
  3. CheckMachines
  4. Read the changeA person
  5. ReleaseA person approves

Dark factory

  1. DecidePeople
  2. BuildAgents
  3. CheckMachines
  4. Read the changeNobody
  5. ReleaseMachines
A lit lamp means that a person works there. Turning off the last two lamps makes the factory dark.
QuestionLight factoryDark factory
Who decides that it is right?Automatic checks, then a person.Automatic checks alone.
What slows it down?People's time to review.The time to build checks you can rely on.
What is the risk?Changes wait, or reviews become a formality.A mistake that no check looks for is released unseen.

Why are teams tempted to turn the lights off?

The reasons are good ones. Agents produce changes day and night, and a person can only read so many. A tired reviewer approves too easily. Many changes are also so small that a reviewer adds little.

Some teams have already done it.StrongDM, a security company, published the rules of its own factory in February 2026.Two of them read "Code must not be written by humans" and "Code must not be reviewed by humans".

There is a cost that does not show on a release chart.Osmani calls it comprehension debt, "the widening gap between how much code exists and how much any human still understands".Tests can stay green while that gap grows, and you notice it on the day someone has to fix something by hand.

Who verifies when AI agents write the code and the tests?

Once nobody reads the code, everything depends on this question.Simon Willison asked it in his article about StrongDM's factory:

how can you prove that software you are producing works if both the implementation and the tests are being written for you by coding agents?
Simon Willison, February 7, 2026

A useful test brings a second point of view: the person who writes it makes other assumptions than the person who wrote the code.Eran Kahana, on Stanford Law School's CodeX blog, calls this difference a mismatch and names the risk: "When the same AI model writes the code and evaluates it, that mismatch shrinks."

Why tests written by the same agent are weak

An agent asked to make the tests pass will look for the shortest way.StrongDM met two shortcuts and described both.The first is in the code: "return true is a great way to pass narrowly written tests, but probably won't generalize to the software you want." The second is in the test: it "can be lazily rewritten to match the code".

The code is written to please the test

function isCodeValid(code) { return true;}

The test tries one valid code, so it passes. Every wrong code is accepted too.

The test is rewritten to match the code

- expect(total).toBe(41.00)+ expect(total).toBe(40.50)

The total is wrong. The test now expects the wrong total, so it passes.

A check of the running shop, stored somewhere else

Expected: 41.00On the screen: 40.50Failed
Two ways to a green test that prove nothing. A check outside the code asks another question: what does the customer see?

A third cause needs no shortcut at all. When the agent misreads the request, its code and its test share the same misunderstanding, and they agree.

The agent's own tests are still worth having, because they are quick and catch real mistakes.They should not have the last word.How to test AI-generated code lists what they cannot see.

What makes a check independent of the agent?

A check does not become independent because another tool runs it. Look for these four signs.

SignWhat it meansExample
It starts from the userIt follows what a person does in the application, not how the code is organized.Add a lamp, enter the code, read the total.
People chose what it expectsSomeone who knows the rule worked out the result.Finance says that this basket costs 41.00.
The building agent has no write accessYour permissions keep its changes out of the tests that the gate runs.The tests are in another repository.
It asks the same question every timeThe same steps and the same expectations at every build.Today's build and next month's get the same test.
If one agent can change both the code and what the test expects, a green result proves very little.

How to keep tests out of a coding agent's reach

Use two places with different permissions. The building agent works in the first one. Your pipeline takes the tests from the second.

The application's repository

Code and unit tests

The building agent can write here

The gate's own repository

End-to-end tests and the pipeline's settings

Only the QA team can write here

The pipeline installs the change, then runs the tests

0 All passed: the change goes on.

1 A test failed: the change goes back.

2+ A test could not run or was stopped: the change waits.

The numbers are the exit codes of gtr-cli. The separation comes from your own permissions.

Three details decide whether this works.

  • Protect the pipeline's settings as well, because an agent that can edit the step that runs the tests can also remove it.
  • Give the agent a copy of the tests to run, so that a change to the copy changes nothing at the gate.
  • Let a change go on only when the result is 0, because a test that did not run has proved nothing.
The gate, run by the pipeline
gtr-cli run D:\gate\tests --countdown 0 --ai-verification off --junit results\junit.xml --json results\results.json

Should the agent even see the tests?StrongDM says that its scenarios are "often stored outside the codebase".Willison says of scenarios kept where the agents cannot see them: "It imitates aggressive testing by an external QA team".Each choice has a price.

Your choiceWhat you gainWhat you give up
The agent can read and run a copyIt finds out why a test failed and fixes its code quickly.It knows the expected values and can aim at them.
The agent never sees the testsIt has to build what was asked, with no answers to copy.Fixes take longer, because it learns only what you pass on.

A mix works well. Share most of the tests, and keep a few important workflows for the gate alone.

Which lights to turn off, and which to leave on

Osmani's rule is a good start.A loop can run by itself "only if the check is cheap, runs at high frequency, and relies on something that can't be easily faked out".Leave the light on where a mistake is costly and only a person can judge it.

Kind of changeIf it is wrongWhat can check itLight
A code style fixSmall cost, easy to undoCode analysis and unit testsOff
A minor library updateA workflow may breakEnd-to-end tests of the workflows that use itOff, once those tests exist
Everyday wordingSmall cost, easy to undoA text checkOff, except for legal or medical text
The look of a screenEvery user sees itA visual check says what changedOn: a person says whether it was intended
A price or tax ruleMoney and refundsTotals that a person worked outOn
Sign-in and permissionsExposed data cannot be called backA security review and testsOn
Moving or deleting stored dataIt may be impossible to undoA rehearsal on a copyOn
What a test expectsIt can hide a real defectOnly someone who knows the ruleAlways on

This table is a starting point. Five steps make your own.

  1. 1

    List the kinds of change your agents make

    Use the last few weeks of pull requests, and sort them by what they touch: wording, style, libraries, prices, sign-in, stored data.

  2. 2

    Ask what a wrong one would cost

    Who would be hurt, could you undo it, and how soon would anyone notice? A mistake nobody notices for a month is costly even when it is small.

  3. 3

    Name the check that would catch it

    Write down one check for each kind of change. If the only answer is the agent's own tests, leave the light on.

  4. 4

    Try to fool the check

    Make that mistake on purpose in a test copy of the application, then run the check. Only a check that you have seen fail can be relied on.

  5. 5

    Turn off one light, and look back

    Choose one kind of change. After a few weeks, read a sample of what was released, and turn the light back on if a mistake got through.

A worked example: an agent changes a checkout

A shop's welcome code takes 10% off the goods, never off the delivery. Lena, from finance, works out one basket: a lamp at 40.00, less 4.00, plus 5.00 for delivery, makes 41.00. Karim, the QA lead, records that purchase, reads the test on the timeline and checks that it expects 41.00. He keeps the test in the gate's own repository.

Months later, an agent is asked to move all the price calculations into one place. No price should change.

What happensWhat it shows
The agent's new code takes 10% off the delivery too, so the total becomes 40.50.A real mistake, easy to miss among hundreds of changed lines.
A unit test that expected 41.00 fails. The agent changes it to expect 40.50.Every test in the application's repository is green.
The pipeline runs Karim's test. The total on the screen is 40.50, the test expects 41.00, and gtr-cli returns 1.The change stops at the gate, before review and release.
The agent runs its copy of the test, reads what was expected and what was found, and corrects its code.The failure explains itself, so the agent can act on it.
The pipeline runs the original test again. The total is 41.00, and gtr-cli returns 0.The gate is open.

The team's rule for prices is lights on, so a developer also reads this change before it is released. Had it been a style fix, the gate alone would have been enough.

Two ways in: a light for people, a layer for AI agents

The example used GUI Test Studio in two ways. It is a testing solution where QA teams and AI agents build, execute, and manage tests visually, without code scripts. A factory can use either way, or both.

Way inWhat it givesIn the example
A light for peopleA test that people read on a visual timeline, and a Confidence Report with expected beside actual and the run's video. A person then decides: accept the new look, update the test, or report a bug.Karim reviews the test. When it fails, he reads one report and not hundreds of lines of code.
A layer for AI agentsThrough our MCP server, an agent creates a test, runs it, reads why it failed and can propose a change. In the pipeline, gtr-cli gives the gate's answer.The agent reads the two totals and corrects its code. The gate does not depend on what the agent says.

The tools that change a saved test show a preview first.They apply the change only when the call confirms it, and the assistant is instructed to ask a person before that.It is a safeguard in the conversation, not a lock, which is why the gate's tests need your own permissions.Create a test from a prompt shows how to connect Claude, ChatGPT with Codex, VS Code, or a local AI model we provide or you bring.

What the person at the gate reads: expected beside actual. Here, the optional AI second look is switched on and explains the difference.

Read the Confidence Report describes each part.The decisions that belong to a person are the subject of human-in-the-loop testing.

An AI judge or a saved test: two ways to decide

StrongDM's scenarios are end-to-end user stories, and an AI model judges the results.The team calls its measure "satisfaction".GUI Test Studio makes another choice: a saved test, run the same way every time.Each one suits a different kind of result.

QuestionAn AI model judges the resultA saved test checks the result
What does it suit?Open results, such as a chatbot's answer.Results you can write down: a total, a message, a saved record.
What does each run need?Calls to an AI model.No AI call with AI Smart Verification off.

Repeatable AI testing looks closer at what AI should decide in a test, and what it should not.

What to know before you start

LimitWhat it means
A test checks what it was told to checkIn the dark, a workflow that no test covers is released unchecked.
It looks at the running applicationGUI Test Studio does not review source code, security or architecture. Keep code analysis, unit tests and review for those.
It does not only look at the screenA test can also check what the server answers, with a Call API step, and the network activity and logs of the run.
A desktop test needs a screenIt uses the build machine's real screen, one test at a time. A web test can run without a browser window, and its browsers and devices can run side by side.
Permissions change over timeCheck from time to time that the building agent still cannot write to the gate's tests or settings.

The options of gtr-cli and the set-up of a build machine are in Run tests in your pipeline.Every feature is in the 30-day trial, and the plans are on the pricing page.

Key takeaways

  • 1A dark factory releases code that no person has read. It is only as safe as its checks.
  • 2An agent's own tests help, but they are not enough. They can share its misunderstanding, or be rewritten to match the code.
  • 3Independent checks start from what a user does, expect what people decided, and are kept out of the building agent's reach by your own permissions.
  • 4Choose for each kind of change, and turn off a light only after you have seen its check fail.
  • 5GUI Test Studio helps in two ways: a visual test and a clear report for people, and a real test that AI agents and pipelines can run.

Questions

What is a dark factory in AI?

In software, a dark factory is a process in which AI agents write, check and release code that no person has read. The name comes from factories run by robots, which can work with the lights off.

What is the difference between a software factory and a dark factory?

A software factory is the whole line that turns requests into released changes, with or without people reading the code. A dark factory is one way to run it: the steps where a person reads or approves the code are gone.

Is dark factory AI coding safe?

It depends on the kind of change and on the checks. A small change that is easy to undo, with a check that is hard to fool, is a good candidate. A change to prices, permissions or stored data needs a person's judgment.

Can an AI agent test its own code?

Yes, and it should, because its tests catch many mistakes quickly. They are not enough as the only check. If the agent misunderstood the request, its code and its tests can share the same mistake.

How do I stop an AI coding agent from changing the tests?

Keep the tests where the agent has no permission to write, such as another repository or folder, and run them from your pipeline. Protect the pipeline's own settings too. This is a set-up your team makes with its own permissions.

Which changes can be released without a human review?

Start with changes that cost little when they are wrong, are easy to undo, and have a check you have seen fail. Fixing a code style warning is a typical example. Keep a person on prices, sign-in, permissions, stored data and any change to what a test expects.

Does a dark factory still need people?

Yes. People decide what to build, what must be true when it is done, which checks count and which changes must never go through in the dark. They also decide what a failure means.

Does GUI Test Studio use an AI model to check a change?

Not when AI Smart Verification is off: running and verifying a saved test then makes no call to an AI model. When it is on, AI is asked only about a check that failed, and its answer is the final verdict on that check.

StrongDM, Claude, ChatGPT, Codex and VS Code are trademarks of their respective owners.

All articles