~4m27:16software factory explained by a Senior Engineer (step by step)
Oct 12, 2026
Read: ~4m · You save: 23 min
Software Factory Explained by a Senior Engineer (Step by Step)
Learn how to build an agentic software factory with AI agents automating your SDLC. Shift from coding to building the production line!
An agentic software factory represents a paradigm shift in software development, integrating artificial intelligence agents throughout the entire software development lifecycle to automate repetitive tasks. This approach allows engineers to operate at a higher conceptual level, focusing on design systems, API definitions, and architectural hypotheses rather than granular code implementation.
Core Concept: Building the Factory, Not Just the Product
The fundamental principle of an agentic software factory is a transition from building the product directly to building the infrastructure—the factory—that produces the product. Engineers shift from manual coding to defining design systems, specifying API architectures (e.g., REST or GraphQL), and outlining caching strategies. These directives then guide autonomous agents that handle the implementation details. This allows engineers to function more like scientists, testing hypotheses and refining the production line rather than being directly involved in the assembly process.
Architecture and Implementation
The described agentic software factory architecture features a monolithic frontend and microservices backends, all managed within GitLab. The system leverages AWS services, with many components utilizing free-tier offerings. A personal Cloud Max subscription was sufficient for implementation, suggesting accessibility for individual developers without requiring extensive resources or enterprise-level budgets.
The workflow begins with a triage agent that ingests issues from various sources, including Slack, Sentry, and user reports. This agent analyzes incoming data to determine if an issue is a genuine error, if it's already documented, or if it has been previously resolved.
Following triage, a refinement agent assesses the scope and impact of an issue. It estimates the "blast radius" (the number of services affected by a potential change), determines priority (e.g., critical production bugs), and estimates the size of the fix. This process, which previously consumed days of manual effort for engineers, is now largely automated. The refinement agent can reproduce bugs using tools like Cypress and Playwright, often generating videos and detailed steps for reproduction, which are then documented in a ticket. These tickets, generated by agents, include scope, acceptance criteria, and evidence of reproduction, often with screenshots and videos.
A prioritizer agent then determines the order of implementation for these refined tickets. Tickets that are clear-cut bugs and easy to fix, such as minor frontend adjustments, are routed directly to an implementer agent.
The implementer agent acts as the primary code-writing entity. It accesses a design system (Cloud MD) that provides directives on coding standards, API design, caching, database interactions, and other architectural specifications. The agent also utilizes "skills" from relevant technology providers, such as Vercel for React and AWS for cloud services, to ensure best practices are followed. It has access to internal systems like Simply Past Hogs, Linear, and GitHub. This agent can work in parallel on multiple tickets.
The Building and Quality Pipeline
A critical component of the agentic software factory is the building and quality pipeline. This pipeline is designed to ensure code quality and reliability, enabling engineers to sleep soundly without manually reviewing every line of code. The focus shifts from fixing individual components to improving the factory itself. Engineers consider the second and third-order consequences of agent actions, such as the potential impact of widespread custom hook generation on bug density and testing efforts.
The pipeline incorporates several quality gates:
- Code Linting and Static Analysis: Tools like ESLint and TypeScript are used, alongside more advanced static analysis tools like Fallow. Fallow identifies code duplication, which is detrimental due to increased token consumption for testing and ingestion, and measures cyclomatic complexity to prevent overly long functions. These static measures feed back into the agent, allowing it to correct its own code.
- Dead Code and Unused Resources Detection: The system actively identifies and removes obsolete code, backend endpoints, or database tables that are no longer necessary, preventing accumulation of technical debt.
- End-to-End Testing: While unit testing with AI is considered inefficient due to rapid code changes, end-to-end tests executed in a real environment provide confidence. The factory boasts 950 independent end-to-end test suites that run nightly.
- Visual Difference Checks: For every pull request, agents generate screenshots before and after changes. This visual comparison allows for quick identification of discrepancies, as manual review of extensive AI-generated text or code is impractical.
- Turn Limit: Agents are allowed a limited number of "turns" (attempts) to fix an issue. If an agent exceeds a predefined limit (e.g., 100 turns), the process is escalated to human review to prevent excessive token consumption and identify fundamental issues with the factory or architecture.
Engineering Oversight and Review
When issues arise that agents cannot resolve within the turn limit, human engineers intervene. This involves analyzing the root cause, potentially redesigning the factory's architecture, modularizing code, or addressing missing context that prevented the AI from solving the problem. This is where human judgment and deep engineering expertise are crucial, scaling through embedding this knowledge into agents and skills.
Pull requests generated by agents are subject to review. The level of review depends on the "blast radius" of the change. Small blast radius changes affecting a single service may be automatically merged. Larger changes, particularly those impacting core systems like the database, trigger more rigorous review. An AI reviewer also checks for architectural regressions, violations of module boundaries, and redundant system state.
For deployment, changes with a low blast radius are automatically merged, deployed to staging, and undergo a subset of critical end-to-end tests (smoke testing). A QA agent then acts as a user to perform final validation before the ticket is closed in Linear and the code is merged to production.
Environment Reproducibility and Formal Verification
Reproducing development and testing environments is a significant challenge. For the frontend, AWS Amplify facilitates environment creation. The backend requires agents to have access to reproducible environments, including database copies and the ability to check out specific code branches. This often involves significant "duct taping" and careful management of data, including anonymization and semantic recreation of user activity.
Future work includes implementing formal verification, where high-level rules (e.g., "a user cannot make two payments within 5 seconds") are encoded into the software. Agents then build lower-level code that must adhere to these static rules, ensuring predictability and type safety, especially for enterprise-level systems. Languages like Bend are being explored for this purpose.
Evolving Engineering Skills and Mindset
The agentic software factory necessitates a shift in the engineer's mindset and skill set. The focus moves from 80% implementation to a more scientific approach, involving hypothesis testing and abstract problem-solving. Engineers become "productizing engineers" who integrate findings into the factory. This aligns more closely with traditional engineering principles, emphasizing feasibility, cost, and material selection.
While the age of manual code craftsmanship may be diminishing, a deep passion for coding and strong fundamental skills remain essential. Engineers are encouraged to develop broader, end-to-end capabilities, including cloud knowledge, system design, API design, and end-to-end testing, moving away from hyper-specialization.
The factory automates tasks like ingesting, classifying, and prioritizing issues, reducing time spent in meetings. While some hands-on coding is reduced, engineers gain time for higher-level architectural thinking, database schema design, and data normalization—tasks previously difficult to prioritize due to feature demands.
Future Work and Considerations
Future developments for the agentic software factory include:
- Model Routing: Implementing a system to select between cost-effective and high-performance AI models based on task requirements.
- Documentation and Changelog Agents: Automating the generation of documentation and changelogs to reduce code comments and improve clarity.
- Incident Postmortems: Enhancing agents to conduct thorough postmortems and identify necessary architectural changes, rather than just fixing individual bugs.
- Agent-Friendly Codebase Design: Designing modular codebases with clear boundaries to facilitate agent interaction and limit failure propagation.
The transition to agentic software factories is seen as a positive evolution, enabling engineers to focus on more engaging and impactful work, provided they maintain and enhance their core engineering skills and embrace the new paradigm.
Introduction to Agentic Software Factory
The agentic software factory is a paradigm shift in software development, leveraging AI agents to automate tasks and elevate the engineer's role to system design and oversight, rather than manual coding.
- An agentic software factory integrates AI agents into the software development lifecycle.
- It automates most repetitive parts of software development.
- Engineers spend more time building the factory or reviewing critical code, rather than most code.
- The focus shifts from building the product to building the factory that builds the product.
- This approach allows engineers to work at a higher level, like scientists or production line builders.
Architecture and Core Agents
The software factory architecture relies on cloud services and integrates specialized agents like Triage, Refinement, and Prioritizer to automate issue ingestion, analysis, and ticket creation, significantly reducing manual effort.
- The architecture discussed uses AWS, with many services available on free tiers.
- A monolithic front-end and microservices back-end on GitLab are used.
- A triage agent ingests issues from Slack, Sentry, or user reports.
- A refinement agent estimates scope, blast radius, priority, and size of issues.
- The refinement agent reproduces issues using tools like Cypress and Playwright, creating detailed tickets.
- A prioritizer agent determines which tickets are ready for implementation or need human input.
The Implementer and Build Quality Pipeline
The implementer agent writes code based on defined standards, while the build and quality pipeline acts as a critical gatekeeper, using automated tools and tests to ensure code integrity and prevent regressions.
- The implementer agent writes code, guided by a design system and defined APIs (REST/GraphQL).
- It utilizes skills from technology providers (e.g., Vercel, AWS) and has access to MCP servers, Linear, and GitHub.
- The build and quality pipeline is crucial for ensuring code quality without manual review of all code.
- This pipeline includes deterministic measures like linters (ESLint), TypeScript, static analysis tools (Fallow) for code duplication and complexity.
- It also incorporates end-to-end tests and visual difference checks in Pull Requests.
Handling Agent Errors and Human Oversight
Despite automation, human oversight is essential. A turn limit and escalation process manage agent failures, allowing engineers to focus on complex problem-solving and factory improvements when issues arise.
- Agents can get stuck in loops or make mistakes, requiring human intervention.
- A 'turn' limit (e.g., 100 turns) is set for agents to fix issues before escalating.
- When agents fail repeatedly, engineers analyze the root cause and potentially modify the factory's architecture or code.
- Engineers provide judgment and scale it through agents and skills.
- Code reviews are prioritized based on blast radius; low blast radius PRs might be auto-merged.
Deployment and Advanced Verification
Deployment includes automated testing and QA agents. Advanced techniques like formal verification and static typing are employed to ensure high-quality, predictable enterprise software.
- Deployment involves staging environments with a subset of end-to-end tests (smoke testing).
- A QA agent acts as a user to test features.
- Reproducible environments are key for backend deployments, requiring copies of databases and backend services.
- Formal verification, using high-level rules (e.g., 'Bend' language), ensures software adheres to critical logic.
- Jev is used for classification tasks due to its static typing for predictable output.
The Evolving Role of Software Engineers
Software engineers are evolving into 'AI native' engineers, focusing on system design, architecture, and leveraging AI tools. This requires a blend of fundamental engineering principles and new skills in cloud, AI, and system design.
- The shift is from manual coding to building and refining the software factory.
- Engineers adopt a 'scientist' mindset for hypothesis testing and a 'productizing' mindset for implementation.
- There's a greater focus on software engineering fundamentals, cloud, architecture, and system design.
- Hyper-specialization is decreasing; engineers need broader, end-to-end skills.
- While craftsmanship aspects change, passion for coding and deep understanding of fundamentals remain crucial.