A vendor-neutral reference architecture – from the harness to factory orchestration
AI agents can write code, run tests and fix errors. But when does a coding agent become a software factory? It is not the model that makes the factory, but the organization around the model: functions that take in requirements, coordinate work, make technical decisions and produce verifiable results.
This article explores the architectural solution space, not the design of one particular factory. Which quality checks, approvals and safety mechanisms control this production is the subject of a follow-up article on quality and autonomy.
Factory or Workshop?#
The term software factory is established, but the metaphor is imperfect. Software is usually built as a one-off or as an individual evolution, not as a product made identically a thousand times. Software workshop sounds more fitting at first, but suggests human-coordinated workshop work: people move workpieces from station to station. That is exactly what an agentic factory aims to automate as far as possible.
A flexible manufacturing system that processes individual orders, plans dynamically and checks its results may be the more accurate analogy. This article sticks with software factory; whether a better name is possible deserves a discussion of its own.
The Overall Architecture#
A factory is more than its agents. Above them sits a control layer that accepts work orders, distributes them and assesses risks. Alongside, the factory uses platforms that it does not provide itself: Git hosting and CI/CD, ticket systems, registries, execution environments, deployment, monitoring and messaging systems.
The diagram shows responsibilities, not necessarily separate programs. One product can combine several functions; a factory can use several products for the same function. Likewise, an external CI service can take over test execution while the factory only controls the flow and interprets the results.
What Is Inside an Agentic Coding Tool?#
Even a single agentic coding tool can be broken down into four logical layers:
- Interaction and control: GUI, CLI or API through which a human or the factory assigns tasks and receives status.
- Harness (also called agent harness): agent loop, context management, tool calls and returning results. This is where files are edited, tests are started and Git operations are performed, for example.
- Model access: SDKs, APIs or gateways that pass requests on to models and, where applicable, handle routing, authentication and billing.
- Model: a cloud LLM, a self-hosted open-weight model or a specialized model.
The agent comprises layers 2 to 4: Agent = Harness + Model. The interaction layer is not part of it; it is how the agent is operated.
Agentic coding tools cover different combinations of these layers. Some use existing harnesses (e.g. T3 Code), others bring their own harness (e.g. OpenCode, Oh My Pi), and still others also bring the models (e.g. Claude Code, Codex). Each variant has its pros and cons: T3 Code can use practically any agent, including those that run on a subscription. OpenCode and Oh My Pi let you choose the model freely, but can usually use vendor models only through the usage-based API. Claude Code and Codex come from a single vendor and can be used with the subscription, but are tied to their vendor’s models. This architecture does not automatically imply that a particular vendor subscription may be used in any third-party product. That depends on the integration and the terms of use.
Model access is not a mere technical footnote either: a powerful model for design, a cheaper one for routine implementation and a specialized model for classification can complement each other. The choice should depend on task, reliability, cost and data protection, not on a fixed one-to-one mapping between harness and model.
Four Paths to a Work Order#
A factory needs an intake for work orders, but it does not have to create them itself.
Specification-driven: a carefully worked-out, mostly human-curated specification is handed over. The factory checks whether workable tasks can be derived from it. Writing the specification can sit outside the organization or be part of the software factory.
Ticket-driven: tasks come from Jira, Taiga or another system, possibly directly from customers. A ticket can be complete or first require classification, follow-up questions and refinement.
Analysis-driven: analyses of the code and the production process suggest refactorings, test improvements or other technical work. The factory can turn them into proposals or work orders.
Event-driven: monitoring, failed builds, security scans or new dependency vulnerabilities trigger work. For example, an automated scan could initiate a version upgrade that is then tested and risk-assessed.
The categories overlap: a monitoring finding can first create a ticket; a ticket can refer to a worked-out specification. What matters is how the factory turns the input into a sufficiently clear work order. Asking follow-up questions itself or bringing in a human are possible variants.
Factory Orchestration Is Not Agent Orchestration#
A harness runs the agent loop within a task: it supplies the model with context, executes the tool calls the model chooses and passes the results back until the task is done. Factory orchestration, in contrast, controls tasks and changes across agents and systems.
There are various patterns for this. A central instance can distribute tasks and monitor progress. Agents can delegate in a decentralized way. Or a defined workflow sets fixed stations within which agents act autonomously. Hybrid forms are probably the most obvious choice; the term software factory prescribes none of these variants.
Factory orchestration also includes the question of how a task is broken down into verifiable changes. The breakdown can change during implementation, for example when it turns out that a feature first requires a refactoring. The goal is not always the smallest change, but a sensible balance of dependencies, traceability and risk. How this can relieve human reviews is shown in a follow-up article on quality and autonomy.
Technical Design and Implementation#
Production planning and technical design are different tasks. Orchestration determines when and by whom something is worked on. The design function decides what the technical solution should look like: for example, which interfaces, data models or architectural changes are needed.
One possible division of labor has a powerful model work out the design, an advisor challenge critical decisions and another model take over the implementation. A competing variant uses the same agent for all steps. It avoids handover losses, but may allow less targeted specialization for complex tasks. Whether the separation is better economically and in quality has to be measured – it is not a universal best practice.
Implementation comprises creating, changing, refactoring and deleting code, but also configuration, database schemas, tests and other development artifacts. One agent can do the task alone; several agents can work on it sequentially or in parallel. Parallel work needs additional mechanisms for isolation, conflict handling and integration.
Classification is not necessarily an agent role either. A lean model or a rule-based service can, for example, assess a change without writing code itself or using tools autonomously. Examples of such decision models are Jev by TypeSafe and THX-02 by HAL-X: instead of free text, they return typed answers with calibrated probabilities. The factory has to place such results in its policy context.
What Belongs to the Factory – and What Can Stay External?#
GitHub, GitLab or Gitea, CI/CD, registries, ticket systems and monitoring are external platforms that the factory connects to, not mandatory components of a single factory product. Pull requests are useful for reviews, but not a universal prerequisite. What matters are traceable changes, suitable checkpoints and a controlled transition to the next state.
Functionally, the factory needs coordination, verifiable results and interfaces to the systems in use. How much of this sits in one product is an architectural decision.
Dashboards and notifications are useful too: they show progress, risks and necessary decisions. The decision whether a human must step in, however, is made by risk control; the user interface makes it visible and actionable.
And My Own Software Factory?#
I do not have a software factory of my own yet, but I do have some building blocks that I use with coding agents. Werkrevisor is an AI review gate for pull requests in Gitea: it combines deterministic rules with a model review and uses Jev as a classifier. Simple PRs can be merged without a human; risky ones land with me. Werkregie is meant to take over orchestration one day; so far, Werkregie is mainly a dashboard that shows what agents, builds and reviews are working on right now and where I have to decide. Werkregie also defines the shared workflow: the roles of coding agent, review agent and human, and the steps of a PR.
Werkbaum holds the plans, Werkcrappit provides analyses as a quality metric whose findings can become new work orders. In addition, there are tools in the periphery: Werkator as CI/CD and Werkdock as a sandbox without root privileges. The agents themselves are third-party products, mainly Claude Code and Codex. Accepting work orders, breaking them down and starting agents is still up to me.
Conclusion: The Factory Is the Coordinating Layer#
A software factory is more than the sum of its coding agents. It connects different inputs, planning, technical design, implementation and external platforms into a traceable production system. Several harnesses and models can be used side by side.
The crucial follow-up question is: How does this system check its results without involving a human in every change? That is exactly what a follow-up article on quality and autonomy is about. For the Light, Gray and Dark operating models, there is also the earlier post Gray Software Factory: Autonomy by Risk, Not by Dogma.
Sources and Further Reading#
- Introducing System One Models & Jev (TypeSafe)
- THX-02 API (HAL-X)
- The advisor strategy: Give agents an intelligence boost (Anthropic, April 2026)
- Gray Software Factory: Autonomy by Risk, Not by Dogma
