Dieser Blogpost ist auch auf Deutsch verfügbar
TL;DR
- Context is the bottleneck: Requirements, decisions and specifications lose consistency and currency.
- Dual-repo reconciliation loop: One repository for the requirements, one for implementing the epics.
- Agent bulkheading: Each agent gets only the context and the permissions it needs.
- Reconciliation: After each epic, new insights flow back into the requirements repository.
- The system learns: The software factory improves itself; the LLM doesn’t have to be retrained for that.
This post is part of a series.
- Part 1: Software Factories
- Part 2: Software Factories (this post)
In my article on software factories, I argued that the real consequence of agentic AI isn’t making human developers more productive, but increasingly automating the software engineering process itself. But what might such a software factory actually look like? How do we organize context, delimit areas of responsibility and make sure that insights from implementation flow back systematically into upstream processes?
In what follows, I want to describe a small slice of such a software factory using a concrete workflow.
Context management as the challenge
In my view, one of the biggest bottlenecks in agentic software engineering is no longer writing code, but managing context. When requirements are scattered across different tickets, architecture decisions disappear into chat logs and a codebase keeps evolving without the underlying specifications being updated, both human developers and agents end up working from unclear or outdated assumptions. On top of that, during implementation we gain insights not only about the technical realization, but also about the domain requirements, the domain itself and the architecture.
A software factory therefore has to continuously evolve not just software, but also its own context.
A concrete example: the dual-repo reconciliation loop
One workflow that already works quite well for me in practice is separating the canonical product context from the concrete implementation of an epic into two repositories.
The requirements repository holds the pure domain requirements, domain analyses, architecture decisions, personas and the roadmap. It represents our current understanding of the software product at any given time.
The coding repository holds, alongside the actual implementation, the local context for implementing an epic.
From the requirements repository, an epic scope document is derived and handed over to the coding repository. These handover documents stay at the boundary level: decisions, not operational, CI or implementation details. On the coding side, a concrete implementation plan is created on this basis and taking the existing implementation into account. Open questions are passed back to the requirements side (open-questions.md). The answers are documented in the implementation plan, with source and date.
Implementation then proceeds along defined milestones, each of which runs through a cycle of implementation, build, commit, CI, release and verification/testing.
Once all milestones are complete, an overarching cleanup step checks that the definition of done is met and records the state reached with a tag.
But the perhaps most important step comes only after that: reconciliation.
Agent bulkheading through context separation
Separating the repositories is a simple example of the concept of agent bulkheading.
Instead of giving every agent the entire available context and maximum decision-making authority, their scope of work, spheres of influence and the context relevant to them are deliberately limited. An agent that fleshes out domain requirements works under different conditions than an agent that implements those requirements. Communication between the two areas of responsibility happens through explicit artifacts and defined interactions. This not only reduces context complexity but also limits the impact of potential errors. A coding agent, for instance, shouldn’t unilaterally change the domain requirements just because a particular implementation turns out to be difficult.
The physical split into two repositories is merely one possible technical realization of this principle.
Another building block, not shown in the diagram, is the infrastructure agent with its own infrastructure repository. It regularly monitors the production systems, analyzes log files, metrics and dashboards and feeds the resulting insights back to the coding and requirements agents. This way, operational experience also flows continuously into the evolution of the implementation, the architecture and the domain requirements.
Reconciliation as a feedback loop
During the implementation of an epic, new insights emerge. Business rules are refined, new concepts and identifiers are introduced, architecture decisions are made or revised, and original assumptions are disproven. These insights must not stay solely in the local implementation context.
So a central question in the final reconciliation is:
Which documents are no longer correct as a result of implementing this epic?
Which parts of our existing product knowledge are no longer correct in light of the insights gained during implementation? Reconciliation serves to feed these insights systematically back into the canonical context and resolve the inconsistencies that exist there. This creates a feedback loop in which the results of downstream activities contribute to improving upstream decisions.
This is a concrete example of closed-loop software engineering.
We no longer iterate solely on features and their implementation, but also on our understanding of the product, the business model, the domain and the architecture. Documentation thus becomes an operational part of the development process rather than an afterthought artifact.
Continuously improving the software factory
From a software factory’s perspective, improving only the product context is not enough.
If, for example, a coding agent repeatedly misinterprets domain requirements, it shouldn’t just be the specific misinterpretation that gets corrected. Rather, the software factory should also question its own way of working. Was the handed-over context incomplete? Were the areas of responsibility not sufficiently delimited? Were quality criteria or suitable guardrails missing? Could a different validation strategy have caught the error earlier?
So alongside continuously improving the product knowledge, we need additional feedback loops that help improve the software factory itself. The underlying LLM doesn’t have to learn for this. The ability to learn is a property of the overall system.
One building block on the way to an autonomous software factory
The workflow described here captures only a small slice of a software factory. Other sub-processes concern, for example, product strategy, requirements engineering, domain modeling, quality assurance, security, deployment and the long-term operation of a software product.
The real engineering task is to design these sub-processes, with their respective areas of responsibility, contexts, guardrails and validation mechanisms, and connect them in such a way that an increasingly autonomous overall system emerges. We don’t have to assume that individual agents work flawlessly. What matters is that errors are detected, contained locally, corrected, and that the insights gained from them are fed back systematically. The dual-repo reconciliation loop is one example of how these principles can already be put into practice today in a concrete development workflow.
Software factories don’t emerge from more capable coding agents alone, but from the deliberate architecture of the entire software engineering process.
PS
- Ideas on how to prepare and maintain knowledge agentically can be drawn quite well from the topic of Agentic Software Modernization. See also the many talks and publications by my colleague Markus Harrer
- Karpathy’s LLM wiki
- Anthropic publication Working with AI
- Various efforts on specifications to improve agentic systems, such as the working group Skills Over MCP
- Recursive harness memory: Self-Improvement Memory Enables Continual Recursive Self-Improvement