nyxandro.ru

Dark Factory

A way of building software where AI agents write, test and ship the code, and no human writes or reads it. People set the goal and the scenarios that machines use to check the result. The name comes from manufacturing: in plants run only by robots, nobody turns the lights on.

Levels: from autocomplete to the dark factory

  1. Level 0Assistanta human writes the code

    Manual coding

    A person writes the code. AI is at most a search engine or a line suggestion.

    Like your parents’ Volvo

  2. Level 1Assistanta human writes the code

    The intern

    The person writes the important parts and hands discrete tasks such as tests and docstrings to the AI.

    Like lane-keeping and cruise control

  3. Level 2Assistanta human writes the code

    The pair

    The person pairs with the AI like a colleague and hands it the routine work.

    Like Autopilot on the highway

  4. Level 3Light factorya human reads the code

    Human in the loop

    AI writes the code, and the person spends the day reading the stream of changes and accepting them.

    Like a Waymo with a safety driver

  5. Level 4The boundarya human checks the plan, not the code

    The PM

    The person writes a spec, argues with the agent about it and reviews plans. Then they leave the agents running for long stretches and check whether the tests pass.

    Like a robotaxi: you can do something else while it drives

    our factory is here

  6. Level 5a human only sets the goal

    Dark factory

    A black box: specs go in, software comes out. No development process is driven by a human.

    Not really a car any more

Dan Shapiro proposed the scale in January 2026 and compared it to self-driving cars. At each level the human does less work on the code, from typing it by hand to only setting the goal. Shapiro calls level 5 the dark factory. The labels above the levels are our reading: this is how “light” and “dark” map onto the scale if you read them by the criteria below.

Light or dark: there is no single definition

AI software development picked up the words “light” and “dark” in 2026, and authors mean different things by “light”. Steve Yegge says outright that there are no reliable definitions yet.

  • Who reads the code

    A dark factory ships code that no human has read. A light factory runs the same pipeline, but a human reads the result before it ships and makes product and architecture decisions up front. This is the most common meaning.

    Used this way by Addy Osmani; StrongDM works by this rule

  • Where the check sits

    Light factories are split by where the human checks. “Light at plan”: a person approves the agent’s plan before it writes code. “Light at merge”: a person reads the change before it ships. A person who clicks “approve” without reading turns it into a dark factory with extra latency.

    Used this way by Diogo Soares

  • Whether you can see the agents

    Here light means transparency, not review. A factory is light when every agent is visible, you can step in and talk to any of them at any time, and all their actions are recorded, even if no human approves anything. Yegge describes his Gas City this way: “a Light Factory… or at least, a very well-lit dark one”.

    Used this way by Steve Yegge and by GitHub projects such as Taskplane

A human reads the code or approves the plan — the factory is light. A human only sets the goal and answers questions — it is dark.

There is no white or black factory in AI software development. Some equipment vendors call plants where robots and people work together “grey factories”, but the term does not appear in software.

WHO RUNS ITHUMANAGENTSPIPELINEChats, CRM, meetingspeople drop the task inOrca IDEplanningOrca IDEa human answers thequestions and approves theplanGitHub Issuesthe issue and its progresslogOrca IDEcoding agent: build,self-review, sub-agentreviewCodeRabbitPR reviewGitHub ActionsCI and stagingOrca IDEacceptance sub-agent in aclean sessionGitHub Actionsrelease and productionOrca automationsmonitoring, on-call agent,issue triageno people here: agents and the pipeline do the workmaterialsplan, questionsfinal planacceptance scenariosissueBuildAnalysisskills, code, versioned docsTest firstfails for the right reasonCodecomplete, no stubsVerificationtests by risk, browser, migrationsThree-pass reviewSelf-reviewsame agentSub-agentfresh sessionPR reviewcloud botcodecommentsfailed: backurgent bug: hotfix through the whole chain againneeds a human decision: back to the inboxmergeimageruns scenariossame imageacceptance reportautomaticcheck, rollbackMonitoring and observationCollect on the serverlogs, metrics, containers, heartbeatObservability hubstorage and alert rulesAlert firesa rule spotted a problemOn-call agentinvestigates the alerttriggerssignalsfixes on the spot: restart, config, serviceissueIssue triageNeeds a human decisionproduct or architectureIssue in the trackerpicked up by an automationUrgent bugneeds a quick fix and releaseInboxissue, idea, materialsPlanningplan, scenariosPlan validationsummary, questionsTracker issueone per featureCIlint and testsStagingtest serverAcceptancethe right thing?Releaseafter acceptanceProductionno rebuild

On a narrow screen, scroll the diagram sideways.

Inbox

Every piece of the factory’s work starts here. The person needs no format and no template: the agent sorts whatever came in itself and notes who decided what and when, where the sources contradict each other and which questions are still open for people. With that it moves on to planning.

How to start the process

  1. Option 1

    Take an issue from the tracker

    The task is already filed in GitHub Issues: by a person, by the on-call agent or by issue triage. The person opens an agent session in the project in Orca IDE and names the number, for example “take issue #42”. The agent reads the description, the decisions made and the attachments from the issue itself.

  2. Option 2

    Start by hand with a package of materials

    The person opens an agent session in the project and attaches everything there is: documents, chat exports, screenshots, meeting recordings, links to cloud folders. In one sentence they say what they want, for example “here is everything from the client: sort it out and design the feature”. The agent sorts the materials into the inbox folder and makes an inventory. A single message with a raw idea is a package too.

Tools at this stage

  • materials-intake

    AI agent skill

    Sorts everything a project receives (briefs, chats, files, screenshots, links) into one inbox folder and keeps one inventory of what is there and what it says. Passwords and personal data stay out of git. Planning starts from the current materials, not from a draft or a retelling.

    Open on GitHub

Planning

The agent turns the incoming materials into a plan: it studies the project, checks decisions against documentation and writes a specification with steps and tests. Along with the plan it writes the acceptance scenarios.

After deployment to staging, an acceptance sub-agent checks the work against these scenarios. Product and architecture forks go to a human at plan validation.

Tools at this stage

  • feature-blueprint

    AI agent skill

    Writes the feature specification and the implementation plan before any code: how people use the feature, how it works inside, the steps and the tests. Decisions rest on documentation and the practice of well-known products. Only the forks that change the product go to the owner.

    Open on GitHub
  • 1. Analysis Phase

    Global prompt section

    Rules for reconnaissance before the work: study the affected code, check how libraries behave against the documentation of the installed version rather than from memory, and base conclusions on facts from the project.

    Open on GitHub

Plan validation

The agent brings the plan not in full but as a short summary: what will work and how, plus questions on product and architecture forks. Each question is explained with a live example, each option names its cost and what will be hard to change later, and there is a recommendation. The person picks an answer instead of writing one.

Before asking, the agent checks the base of the owner’s earlier decisions. If a similar question was already decided in a similar project, the agent takes that answer and does not ask again. Only new questions reach the person.

Even when no questions are left, the plan is approved once: this is the moment the person sees what will be built and gives the go. The agent records the answers in the base right away, so there are fewer questions with every project.

What the base never decides for the person

Money and the irreversible: paid services and anything that changes a bill, deleting or rewriting stored data, publishing, releasing to real users, granting access. These questions always reach the person, even if they decided a similar one before.

Tools at this stage

  • owner-decisions

    AI agent skill

    Remembers how the owner makes decisions and keeps them as a base across all projects in a private git repository. Before asking a decision question, the agent checks the base: what the owner already decided in a similar situation it answers with that earlier answer, and asks only what is new. New answers go back into the base, so there are fewer questions with every project.

    Open on GitHub
  • feature-blueprint

    AI agent skill

    Writes the feature specification and the implementation plan before any code: how people use the feature, how it works inside, the steps and the tests. Decisions rest on documentation and the practice of well-known products. Only the forks that change the product go to the owner.

    Open on GitHub

Acceptance

Acceptance scenarios are the criteria from the specification: “Given / When / Then” with concrete values. The agent writes them during planning, and there is no need to hide them: the acceptance agent checks the live app, not the tests, and the app passes only if it really works.

After deployment to staging, the agent running the deployment starts an acceptance sub-agent in a clean session. It gets only the scenarios and the staging address, with no code and no work history, and walks through every scenario as a user. For each one it returns “passed” or “failed: here is what I saw”, with evidence — a screenshot or a server response. Failed — the agent fixes the work and deploys again. Passed — the work moves on to release.

The step is written into the project’s deployment guide, like the PR review. Without a login to staging the acceptance agent hits the sign-in form and checks nothing, so access for it is a required part of that guide.

How to give the acceptance agent access

  1. Option 1

    Credentials named in the project rules

    Staging gets separate test accounts, and the project rules say where their logins and passwords are kept. They must live where the agent can read them, but not in git.

  2. Option 2

    A temporary login for the check

    The deployment hands the acceptance agent a one-time sign-in link or token and revokes it after the run. No permanent password is stored anywhere, but staging needs a way to issue such logins.

Build

The build runs in one agent session, from analysing the task and the project to checking the result. This way the agent does not reread the context and does not lose its line of reasoning. The order of the steps comes from the agent’s global rules.

If the person handed over the task and left, the agent works in autonomous mode: it asks no questions and writes its decisions down. If the session runs out of context, the work moves to a new session in one document.

Review is shown in the next block: self-review, a sub-agent in a clean session and the PR review.

Tools at this stage

  • goal-rules

    AI agent skill

    Rules for autonomous mode: the agent finishes a long task while the person is away, asks no questions and does not stop. It settles every unclear point itself and writes the decision down, and never crosses a short list of dangerous actions.

    Open on GitHub
  • session-handoff

    AI agent skill

    Carries unfinished work to a new session in one document when the old one runs out of context. The agent in the new session first checks the document against the real repository and only then continues.

    Open on GitHub

Analysis

Before the work the agent loads the skills for the task’s stack, platform and domain and uses their rules before a generic web search. The project’s skills are picked by skill-picker.

The agent studies the affected code and widens the reconnaissance only when the task’s scope, risk or the system’s coupling calls for it. It checks how libraries and APIs behave against the documentation of the version installed in the project, not from memory. Before writing its own code, it looks for a ready native capability.

Conclusions rest on evidence: documentation, the project’s code, the installed package. What it could not check, the agent marks plainly as unverified.

Tools at this stage

  • 1. Analysis Phase

    Global prompt section

    Rules for reconnaissance before the work: study the affected code, check how libraries behave against the documentation of the installed version rather than from memory, and base conclusions on facts from the project.

    Open on GitHub
  • skill-picker

    AI agent skill

    Picks, vets and installs project-level skills for the project’s stack: it sorts the technologies into layers, rates where the agent is most likely to write outdated code, reads every candidate in full and installs only what is approved. The result is one table of what skills cover and what they do not.

    Open on GitHub
  • find-docs

    AI agent skill

    Fetches current documentation and code examples for any library, framework, SDK or CLI through Context7. The agent checks behaviour against the documentation of the version installed in the project, not against what it remembers from training, where the API may have changed.

    Open on GitHub
  • goal-rules

    AI agent skill

    Rules for autonomous mode: the agent finishes a long task while the person is away, asks no questions and does not stop. It settles every unclear point itself and writes the decision down, and never crosses a short list of dangerous actions.

    Open on GitHub

Test first

For new behaviour and for a bug fix the agent first writes or updates a test that describes the expected result, following the project’s own test structure.

The test runs before the code and has to fail for the right reason: that shows it really checks the new behaviour instead of always passing. Tests may not be simplified at the cost of quality or coverage.

If a function parses input, does arithmetic over money or limits, sorts data or builds state from events, a property-based test appears next to the example tests.

Tools at this stage

  • 2. Implementation Phase (TDD Workflow)

    Global prompt section

    How the code gets written: first a test that fails for the right reason, then a complete implementation with no stubs. Changes are checked in the project’s development mode, without needless rebuilds.

    Open on GitHub
  • property-testing

    AI agent skill

    Writes property-based tests with fast-check in TypeScript and Hypothesis in Python: a test states what must hold for any input and tries hundreds of inputs on its own. The agent brings it in when a function parses input, does arithmetic over money or limits, sorts data or builds state from events.

    Open on GitHub
  • goal-rules

    AI agent skill

    Rules for autonomous mode: the agent finishes a long task while the person is away, asks no questions and does not stop. It settles every unclear point itself and writes the decision down, and never crosses a short list of dangerous actions.

    Open on GitHub

Code

The agent writes code until all tests pass. The implementation is complete: no stubs and no answers tailored to the test.

Changes are checked in the project’s development mode, where edits apply on their own. The agent should not rebuild images or the production build by habit: only when dependencies, the Dockerfile or the build settings change.

Tools at this stage

  • 2. Implementation Phase (TDD Workflow)

    Global prompt section

    How the code gets written: first a test that fails for the right reason, then a complete implementation with no stubs. Changes are checked in the project’s development mode, without needless rebuilds.

    Open on GitHub
  • goal-rules

    AI agent skill

    Rules for autonomous mode: the agent finishes a long task while the person is away, asks no questions and does not stop. It settles every unclear point itself and writes the decision down, and never crosses a short list of dangerous actions.

    Open on GitHub

Verification

The agent runs tests as widely as the change’s scope and risk require: one targeted check for a small edit, wider runs for shared contracts, data and security.

If the change touches the interface, the agent checks it in a browser, then closes the browser and deletes the screenshots. Migrations and stored data are checked with the project’s tools on an isolated database. The agent cleans up temporary files and excess debug logging after itself.

Tools at this stage

  • 4. Verification & Integration

    Global prompt section

    Checking the result: tests as wide as the change’s scope and risk require, the interface in a browser, migrations and data on an isolated database, temporary files cleaned up.

    Open on GitHub
  • 5. Final Verification

    Global prompt section

    How far the final checks go, by risk: one targeted check for a small edit, wide runs only when the change touches shared contracts, data, security or the build.

    Open on GitHub
  • goal-rules

    AI agent skill

    Rules for autonomous mode: the agent finishes a long task while the person is away, asks no questions and does not stop. It settles every unclear point itself and writes the decision down, and never crosses a short list of dangerous actions.

    Open on GitHub

PR review

The agent has opened a pull request, and one more reviewer reads the code: a cloud one, from the outside. It never saw how the code was written and leaves its remarks right in the PR. For each remark the agent either fixes the code or replies in the PR why it is not taking it, and only then merges.

This step belongs to shipping. How to go through it is described in the project’s own deployment guide in the docs folder, and the project’s rules tell the agent to read it before shipping.

Who reviews

  1. Option 1

    CodeRabbit

    A cloud bot that reviews every new PR on its own. Free for public repositories, paid plans for private ones. By default it skips drafts, and on the free plan it skips PRs of more than 100 files.

  2. Option 2

    Codex on call

    The agent comments “@codex review” on the PR, and Codex leaves a regular GitHub review. The repository has to be connected to Codex once; the same settings can turn on a review of every PR without a call.

  3. Option 3

    Claude on call

    The agent mentions “@claude” in a PR comment and asks it to check the changes. It runs through a GitHub Action: the repository gets the Claude app and a workflow file, and reviews spend a Claude API key or subscription.

What stops a merge without a review

On free GitHub only public repositories have branch protection. There you can block merging until the reviewer is done and while any remark is still open, and the block applies to administrators too. But GitHub also counts a review the bot skipped as passed, so large PRs are better split.

A private repository on a free account has no such protection: a PR can be merged at any moment, and waiting for the review rests only on the agent’s instructions. For GitHub itself to block merging without a review, you need a paid GitHub plan or a public repository.

Harness

The harness is everything around the model: the rules the agent reads at the start of every session, the skills it loads for the task, and the tools it uses to see the code and work with services. The model answers questions; how the factory behaves is set by the harness.

Prompts

Global agent rulesShared rules for every project: how to talk to the owner, how to analyse a task, write the test first and the code after it, check the result, and what is forbidden. Claude Code reads them from ~/.claude/CLAUDE.md, OpenCode from ~/.config/opencode/AGENTS.md.

Skills

Intake and planning

  • materials-intakeSorts everything a project receives into one inbox folder and keeps one inventory of what is there and what it says. Passwords stay out of git.
  • feature-blueprintDesigns a feature before code: how people use it, how it works inside, and a step-by-step plan with tests. Only the forks go to the owner.
  • owner-decisionsThe owner’s decision base across all projects: what was already decided, the agent answers the way the owner did before, and asks only what is new.

Build

  • skill-pickerPicks and installs the project’s skills for its stack and shows what is covered and what is not.
  • find-docsCurrent documentation for the right version of any library through Context7, so the agent does not write code from outdated memory.
  • property-testingProperty-based tests with fast-check and Hypothesis: they try hundreds of inputs and prove they can fail.
  • goal-rulesAutonomous mode: the agent finishes a long task with no questions, writes its decisions down and never crosses the stop-list.
  • session-handoffCarries unfinished work to a new session in one document, checked against the repository.

Production and problems

  • prod-reconRead-only reconnaissance of production or staging: finds the way in, confirms the version, reads logs and the database, reports and fixes nothing.
  • issue-registerKeeps the project’s register of open problems true to the code: cuts what is closed and keeps one file.
  • diagnosing-bugsA diagnosis loop for hard bugs and performance regressions: reproduce, narrow down, find the cause.

Helpers

  • sparringModel-vs-model sparring: a second look from Claude or Codex at a plan, a review or a decision.
  • agent-browserA browser for the agent on the command line: open a page, click, fill a form, take a screenshot.

Closing the cycle

  • worklogCloses the cycle: from agent session logs and git it counts how much time and how many tokens a task took, and splits it by task into entries for the tracker.Repository not published yet

How our factory works

The diagram above shows our factory end to end. Here are the rules it rests on and the mechanisms that let it run without a human once the plan is approved.

Factory rules

  1. Agents write and review the code. No human opens it.
  2. Acceptance is not run by the builder: a sub-agent in a clean session checks the live app, not the tests.
  3. Only what passed acceptance on staging goes to production.

Acceptance by an agent

Acceptance scenarios are the criteria from the specification that the agent writes during planning. After deployment to staging it starts an acceptance sub-agent in a clean session: the sub-agent gets only the scenarios and the staging address, walks through them as a user would and brings evidence for each one. If a scenario fails, the task goes back to the build.

Review in three passes

First the coding agent in Orca IDE checks its own code. Then a sub-agent in a clean session reads it: it does not know how the code was written, so it does not repeat the author’s line of thought. Last, CodeRabbit reviews the pull request. After the merge, GitHub Actions runs the linter and the tests.

One image from staging to production

GitHub Actions builds the image once and deploys it to staging. Once acceptance passes, the pipeline ships the same image to production on its own, with no rebuild, so production gets exactly what was tested. A check runs after the deploy, and a failure triggers an automatic rollback.

The on-call agent

The server sends logs, metrics, container status and a heartbeat to the observability hub. When an alert rule fires, an Orca automation calls the on-call agent. Whatever can be fixed right away, it fixes on the spot: restarts a container, corrects a config, brings a service back up. Everything else it files as an issue, and a separate automation triages it: an urgent bug goes to a hotfix and runs through the whole chain again, a regular issue stays in the tracker until an automation picks it up, and a question that needs a human decision goes back to the inbox.

The human appears on the diagram in two places. Into the inbox they bring the task: an issue from the tracker, or anything at all — a raw idea, a finished PRD, a work chat, links. The agent turns it into a plan on its own, and at plan validation the human reads a short summary of what will work and how, picks answers to the questions on product and architecture decisions, and approves the final plan once. Everything else, from the tracker issue to on-call duty in production, runs without them. Questions raised by triage come back to the inbox too.

Review and acceptance answer different questions

The reviewer never runs the program, the acceptance agent never reads the code. Each one misses what the other catches.

Review
self, sub-agent, PR bot
Question
How is it built?
Where
In the repository, before merge
What it sees
The code changes and the requirements
Catches
Logic errors, security holes, missed cases
Misses
An empty setting on the server: the code is right, the feature is dead
Acceptance
sub-agent in a clean session
Question
Is it the right thing, and does it work?
Where
On staging, after deploy
What it sees
Only the scenarios and the server address
Catches
A misread task, server settings, migrations, integrations
Misses
Tangled code that will be hard to change six months from now

Where machines can go alone, and where they cannot

More and more, teams decide “with a human or without” one loop at a time instead of for the whole project.

Fine without a human

  • The check is cheap, fast and hard to fake: types, linters, deterministic and property-based tests.
  • The loop is short. By Dex Horthy’s rule of thumb, an agent holds up for three to ten steps and starts losing the thread past twenty.
  • Example: a nightly job that fixes one lint issue and opens one small PR.

A human is needed

  • A mistake is expensive and only a person can catch it.
  • Authentication, payments, public APIs.
  • Architecture decisions that live for years.
  • Subtle production bugs that hit many users at once.

A factory runs at the speed of its checks. Agents write code faster than anyone can verify it.

Cases

Public stories of teams that tried working without reading the code.

StrongDM AI

since July 2025level 5

Three people, two rules: humans neither write nor review code. Scenarios outside the repository, satisfaction judged by another model, digital twins of external services.

Figures
3
people on the team
2
rules: no writing, no reviewing code
$1,000
a day per engineer, the minimum bar

OpenAI

February 2026no hand-written code

About a million lines in five months, none written by hand. Engineers steered agents through pull requests and CI, wrote map-style documentation for the agents, and rules that are checked automatically.

Figures
~1M
lines of code
5
months of work
0
lines written by hand

HumanLayer

July 2025back to review

Went lights-out and stopped reading code. About four months later an incident came up that agents could not untangle, and an engineer had to dig into code nobody had opened for months. Review came back, and decisions moved earlier: product, architecture, program design, order of work.

Figures
~4 mo
without reading code, until a hard incident
4
decision stages now come before code

30 minutes of planning and alignment can save hours of review.

Five steps toward a factory

  1. 01

    Scenarios before code

    Write down what a person does and what they should see. That is the exam.

  2. 02

    Give the agent access

    The acceptance agent has to log in to staging. Write down in the project rules where the test credentials live, or hand out temporary access for the duration of the check.

  3. 03

    A separate acceptance agent

    A sub-agent in a clean session gets only the scenarios and the staging address, walks through them as a user and brings evidence for each one.

  4. 04

    One image from staging to production

    Production gets exactly what passed staging. After deploy comes a check, and an automatic rollback if it fails.

  5. 05

    Turn the lights off one loop at a time

    Start with narrow loops where the check is cheap and reliable. Switch release to automatic once the acceptance metric has proven itself. Keep architecture with people.

Further reading on dark factories

Primary sources and write-ups this page is built on.