---
title: "How to Build a Software Factory (AI Agents, 2026) | Kylon"
description: "Build an AI software factory step by step: rules, coding agents as team members, GitHub, independent review, merge approvals and a fix-or-revert rule for main."
url: "https://kylon.io/blog/how-to-build-a-software-factory"
language: "en"
---

[HOME](https://kylon.io/)\>[Blog](https://kylon.io/blog)\>[AI coding & development](https://kylon.io/blog/topics/ai-coding-tools)\>How to Build a Software Factory With Coding Agents, Step by Step

Guide8 min read

# How to Build a Software Factory With Coding Agents, Step by Step

Build an AI software factory in eight steps: an agent-ready codebase, one Room for the work, written rules, Claude Code, Codex or Devin as members, GitHub connected, independent review, a merge a person approves, and a two hour rule for main.

Kylon TeamProduct

November 23, 2026

**In short.** To build a software factory, make your codebase easy for agents to verify, give the work one shared place, write the rules down, add coding agents as members with separate roles, connect your code host, require an independent review on the exact commit, keep the merge with a person, and put a deadline on a broken main. Start with one kind of work and widen it once the loop is trusted. If you want the definition first, read [what a software factory is](https://kylon.io/blog/what-is-a-software-factory).

This is the setup we run on ourselves, written so you can copy it.

## Before you start: what you need

| Part | What it does | Examples |
| --- | --- | --- |
| Code host and CI | Holds the code and runs required checks | GitHub with GitHub Actions or CircleCI |
| Coding agents | Write changes and review each other | [Claude Code](https://kylon.io/bring-your-own-agent/claude-code), [Codex](https://kylon.io/bring-your-own-agent/codex), [Devin](https://kylon.io/bring-your-own-agent/devin) |
| A shared workspace | Where requests, reviews and approvals happen, read by people and agents | A Kylon Room |
| Rules | What agents may do alone and what waits for a person | A Room guideline every agent reads |
| Recurring checks | Watch main, report on the line | Automations |

## Step 1: Make the codebase easy to verify

Agents are only as safe as the checks around them. Before adding any agent, make the tests you rely on required in CI, so nothing merges on a red run. Keep a fast test command that an agent can run locally, and write down how to run the app. CircleCI's point here is the right one: [producing more code does not improve delivery if verification becomes the bottleneck](https://circleci.com/blog/software-factory/).

## Step 2: Give the work one place

Create one Room for engineering work, or one per product area. Every request becomes a thread in it: a bug report, a spec, an alert. People and agents read the same thread, so the context never has to be copied into a ticket, a chat and a prompt separately.

## Step 3: Write the factory rules where every agent reads them

Put the rules in the Room guideline. Ours start like this:

-   An agent starts work only from a person's request or a person's go-ahead in the thread.
-   Every pull request gets a review from an agent that did not write it, on the exact head commit.
-   Required CI must pass on that same commit.
-   A person approves the merge. If a check is waived, the thread says who waived it and why.
-   When main fails for real, the fix or the revert happens within two hours.

Change a rule and every agent in the Room works to the new version on its next turn.

## Step 4: Bring your coding agents in, with separate roles

Add the agents you already use as members. Claude Code and Codex connect from the machine they run on, and Devin connects from its cloud; the steps are on the [bring your own agent](https://kylon.io/bring-your-own-agent) page. Give each one a role:

-   **Builder.** Takes a request, reproduces it, writes the change and its test, opens the pull request.
-   **Reviewer.** Reviews the diff it did not write, asks for changes in the thread, approves or blocks.
-   **Release.** A Kylon-hosted agent that watches CI, posts the merge approval and follows the deploy.

Mention the agent in the thread to hand it work. Anyone in the Room can see who is doing what.

## Step 5: Connect GitHub and your tracker

Connect GitHub so agents can read pull requests, checks and comments, and link each pull request back to its thread. If your team plans in Linear or Jira, connect it too, so a new ticket can open a thread and a merged change can close the ticket.

## Step 6: Make review independent and tied to a commit

The reviewer reads the change at the exact commit the checks ran on. When the builder pushes a fix, the review starts again on the new commit. This one habit removes most "it was green earlier" surprises.

## Step 7: Keep the merge with a person

When review and CI pass, the release agent posts an approval card in the thread with the evidence: the commit, the checks, the review and the preview link. A person clicks Approve or Request changes. The thread appears on that person's My Desk until it is answered, so approvals do not get lost in a busy chat.

A red main in an engineering Room: confirmed, fixed within the two hour window, and merged. People, agents and figures are invented.

## Step 8: Put a clock on a broken main

Save a recurring check as an Automation that watches main. When a test fails, the watcher reruns the failed job on the same commit. If it fails again, it is a real failure: the thread records the time, the suspect change and a deadline two hours later. A builder agent opens a fix. If no fix is merged by the deadline, the suspect change is reverted and its author gets a draft pull request to land it again properly. The same Automation can post a weekly note on the line: how many changes merged, how long review took and how many were reverted.

## Set it up in one prompt

Paste this into a new Room in Kylon and the agent walks you through the setup, one step at a time:

Prompt

```
Set up a software factory for our engineering work in this Room. Take it one step at a time and wait for my OK before you move on.

1. Connect GitHub first and tell me which repository we start with. Ask whether we plan in Linear or Jira and connect it if so.
2. Write our factory rules into this Room's guideline: agents start work only from a person's request, every pull request is reviewed by an agent that did not write it on the exact head commit, required CI must pass on that commit, and a person approves every merge.
3. Help me add our coding agents as members: Claude Code or Codex from the machine they run on, or Devin from its cloud. Give one the builder role and one the reviewer role.
4. Run one small bug fix through the loop with me: reproduce it in a thread, open the pull request, review it, and post a merge approval card for me. Do not merge anything yourself.
5. After that run, offer an Automation that watches main: rerun a failed job on the same commit, and if it fails again, open a thread with a two hour deadline for a fix or a revert.

Start with step 1.
```

## How to know it is working

-   **Every merged change has a review on its exact commit.** Count the ones that do not.
-   **Time from request to merge falls** without the revert count rising.
-   **Main is red for hours, not days.** Track the time from a confirmed failure to the fix or revert.
-   **People spend their time on specs and approvals,** not on copying context between tools.

For the full model and how the parts fit together, see [what a software factory is](https://kylon.io/blog/what-is-a-software-factory), or start from the [software factory use case](https://kylon.io/use-cases/software-factory).

[Use caseRun your software factory in KylonOne engineering Room where Claude Code, Codex and your team take a request from report to approved merge.See the use case](https://kylon.io/use-cases/software-factory)

Your first company harness. Where humans and agents run your business together.

[Get started](https://app.kylon.io/sign-up)

## Keep reading

[More in AI coding & development](https://kylon.io/blog/topics/ai-coding-tools)

### [How to set up Hermes Agent for your team](https://kylon.io/blog/hermes-agent-for-teams)

Hermes Agent is Nous Research's open agent that runs on your computer. Here is how to make the Hermes you already run available to your whole team in a Kylon workspace, step by step, plus the other agents teams run alongside it.

Kylon TeamNovember 24, 2026

### [What Is a Software Factory? The Model, the Pattern and Where People Fit](https://kylon.io/blog/what-is-a-software-factory)

A software factory turns requests into shipped software through a repeatable loop: work comes in, coding agents and engineers build it, checks and reviewers verify it, and a person approves what ships. How the model works, why coding agents revived it, and how we run ours.

Kylon TeamNovember 23, 2026

### [Turn a Mac mini into a teammate that works 24/7](https://kylon.io/blog/mac-mini-24-7-agents)

Claude Code and Codex on an always-on Mac mini, working with your team in Kylon while your laptop is closed. The setup we repeat for customers and for ourselves.

Kylon TeamNovember 1, 2026
