﻿# Software factory and loop engineering

> How enterprise teams can build software with AI agents without hoping: a loop is a control problem, a software factory is control loops sharing a memory, and AI inside a product is a narrow model call with code before and after it. Every step has a check that is not a model and a person who signs.

Source: https://laszlonemes.com/talks/software-factory-and-loop-engineering · Published: 2026-11-12 · Author: László Nemes

The future of enterprise software development

November 2026 · TED talk · 26 slides, about 28 minutes

`AI engineering` `Coding agents` `Software factory` `Loop engineering`

Nobody knows what software development looks like in five years. The mood fits in three lines – build loops, spend as many tokens as you can, don't read the code. I accept the first two. This talk is about why the third one fails in a team, and what works instead.

It has three parts. Loop engineering: why the famous agent rewrites worked, and why the same loop applied to an everyday feature needs a spec people write first. The software factory: one pipeline for every ticket, where an agent does the work at each station, a deterministic gate measures it and a person signs. And AI inside the product, with four features of the Starschema Portal that put program code before and after every model call.

## Slides

Tap, click or swipe the slides to step through. With a keyboard: the arrow keys, N for the speaker notes, O for all slides, F for full screen. [Open the slides in a new tab](https://laszlonemes.com/slides/software-factory-and-loop-engineering.html)

## What the talk covers

### Where we are

- The three rewrites everyone quotes – Bun from Zig to Rust, the Copilot agent runtime from TypeScript to Rust, TypeScript 7 in Go – all had a compiler for the target and a test suite for the old behaviour before anyone started.
- A port is the easy job for a loop: the old system is the spec and its tests are the judge. A feature has neither until people write it down.

### Loop engineering

- A loop is a control problem: measure, compare with a target, correct a little, measure again. Only the actuator – the part that does the work – is new.
- In a codebase the sensors already exist: compiler errors, analyzers, old tests, architecture rules. The loop works the findings down one small reviewed pull request at a time.
- One difference decides everything: who measures. If the same model does the work and judges it, nothing is measured.
- Review capacity sets the throughput, not the token budget.

### The software factory

- A factory is control loops sharing a memory – context, a knowledge base, skills, triggers, a sandbox, and a model behind an adapter. One thing leaves the building: a small pull request.
- Keep the local agent, move the rules, skills and checks into one shared, reviewed place.
- Five stations – spec, plan, build, review, release – each with an agent, a gate that is not a model, and a person who signs.
- A review comment worth keeping becomes a check if a machine can check it, a skill if it is a how-to, and a knowledge base entry only if it is a reason or a fact.
- The job that runs the model cannot write; the job that writes runs no model. And the oracle – spec, tests, gate settings, waivers – is protected from the agent.
- A change can pass every gate and still be wrong for the system. The first time a person has to notice; after that, a rule catches it.
- A person stays in the loop to understand the requirement, hold the architecture and answer for the result.
- Start with one class of change that already has a sensor. Feature tickets come last.

### AI inside the product

- A chat widget is not a feature. Decide in code what code can decide, give the model only the narrow part, validate what comes back, and let program logic make the final call.
- CV optimization: retrieval over about 9,000 skills in memory, one model call, validation that refuses invented experience. The model call is about 2% of the feature's code.
- Opportunity matching: the model reads the request and scores a shortlist; an algorithm ranks everyone by skills and is the safety net when a batch fails.
- Azure AI Search as a part, not the product: the database decides what gets through, the model cites, code checks every citation.
- RFP Aid, in progress: each AI step is a station – a narrow model call, a deterministic check, a person who accepts it.

Two questions for every step: What can I measure? Who signs? Lights on, sensors everywhere, and a person at the door.

## Read more

- [Loop engineering is a control problem](https://laszlonemes.com/blog/loop-engineering)
- [The software factory is a control problem, too](https://laszlonemes.com/blog/software-factory)
- [Building a software factory on GitHub: the cornerstones](https://laszlonemes.com/blog/software-factory-on-github)
- [State of AI](https://laszlonemes.com/ai)
