Inside an AI Software Factory: 7 Stages, 3 Layers, and the Cost Curve Nobody Warns You About

Inside an AI Software Factory: 7 Stages, 3 Layers, and the Cost Curve Nobody Warns You About

●2 ●7
calendar_today • schedule3 min read

Autocomplete and chat assistants made individual developers faster. But the human is still the engine: one ticket, one IDE, one branch at a time.

An AI software factory changes the unit of work. Your board (Jira, Linear, GitHub Issues) becomes a conveyor belt. Autonomous agents pick up tickets, read the codebase, make multi-file changes, run tests, and open pull requests. The benchmark teams aim for is a 60-80% cut in feature lead time.

Here is how it works and where it breaks.

What is a software factory?

It is an automated development system where AI agents, standardized workflows, and engineering tools turn tasks into tested, deployable code with minimal human intervention. It relies on deterministic inputs, repeatable toolchains, and fully auditable outputs. Unlike a chat window in your IDE, it works on the work item itself, from intake to deployment.

The 7 stages

  1. Intake. Requests from Linear, Jira, Slack, or the CLI become a structured task contract.

  2. Context resolution. The system maps the codebase using code graphs, semantic retrieval, organizational memory, and live environment state via MCP connectors.

  3. Planning. Complex work is split into steps, shown as a reviewable roadmap before anything runs.

  4. Autonomous execution. Agents edit files, compile, run scripts, and self-correct in isolated sandboxes.

  5. Review and policy enforcement. Static analysis, linters, security scanners, and LLM-based policy checks catch leaked secrets and structural violations.

  6. Delivery. Approved changes enter your existing CI/CD through normal pull requests, using non-human service identities.

  7. Observability. Every prompt, tool call, and decision is traced (e.g., via OpenTelemetry) for audit and evaluation.

Kanban stops being a reporting tool

When someone moves a ticket to a designated column, a webhook spins up an agent, hands it the ticket, and provisions a sandbox. Progress is posted back to the issue thread.

The interesting part is that agents also create work:

• A planning agent breaks an epic into sub-tickets with acceptance criteria and dependencies.
• An execution agent that spots tech debt files a separate ticket instead of bloating its diff.
• Validation agents triage failed builds, find the originating commit, and open a fix task.

This only works if the input is precise. Formal specs (GitHub's Spec-Kit, the CAIPE framework) replace loose ticket descriptions, because ambiguity makes agents guess.

Three layers that keep it under control

• Specification layer. Humans define intent, contracts, and constraints. This is the most durable artifact in the system.
• Harness layer. Tests, static analysis, security policies, and benchmarks packaged as automated checks. The key rule: every agent mistake becomes a permanent constraint in the harness.
• Execution loop. Agents iterate until the harness passes.

Oversight scales with risk. With human-in-the-loop, agents stop at the pull request. With human-on-the-loop, agents run continuously and humans watch telemetry. The goal is to avoid verification debt, where generated code piles up faster than anyone can check it. Sonar's Agent-Centric Development Cycle formalizes this as guide, generate, verify, solve.

For multi-agent setups, splitting roles helps: planner, product manager, architecture, code generator, reviewer, and validation/DevOps agents. Each stays focused and makes fewer reasoning errors. Designing these topologies for a specific stack is a big part of [AI agent orchestration.][1]
The cost curve nobody warns you about

Token costs here are not linear. According to Anthropic's production data, a single agent uses roughly 4x the tokens of a basic chat, and multi-agent systems up to 15x.

The drivers:
• Every agent re-ingests the same codebase context.
• Planner agents spend tokens only on routing and summarizing.
• Failed harness checks trigger retries (sometimes up to eight).
• Test and analysis logs feed back into the context window.
• Terminal output, diffs, and schemas inflate context.
• Faster generation means more PRs, so more verification spend.

Track four KPIs from day one:
• Feature lead time: 60-80% reduction
• First-pass task success: above 75%
• Verification overhead: below 15% of traditional review time per 1,000 lines of AI code
• Net task ROI: above 300%

A four-phase rollout

  1. Standardize context and tools. Common issue templates, formal specs, and MCP gateways that centralize credentials and access scopes. This is where solid AI integration work pays off.
  2. Build the harness. Test suites, static analysis, security gates, and mandatory human approval for critical paths.
  3. Enable board-driven execution. Webhooks to sandboxes, auto-generated tech-debt tickets, bug triage, and human-on-the-loop for low-risk tasks.
  4. Add a control plane. An agent registry with identities, ownership, token budgets, and cost-per-completed-task tracking.

Skipping the governance steps is how teams end up with "agentic chaos": security gaps, wasted tokens, and brittle infrastructure.

Where this leaves classic AI-assisted development

Copilot-style AI-assisted development still has the human as the main execution unit, and peer review as the main quality gate. In a factory, agents execute and harnesses gate quality. The new bottleneck is verification, not typing.

We're InterCode, and we build these systems for engineering teams. The full version of this guide, with a side-by-side comparison of traditional, AI-assisted, and AI-led SDLC, is [on our blog][3].

Question for the community: if you've tried board-driven agents, what broke first for you: context, verification, or cost?

1 Comment

0 votes
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

A Textile Mill's Dyehouse Ramp Curve: Get One Step Wrong and the Sheet Belongs to the Master

aiomniu - Oct 18

How AI Is Changing Web Development, and What Developers Still Need to Understand

Daniel Decker - Nov 10

Systems Thinking: Thriving in the Third Golden Age of Software

Tom Smithverified - Apr 15

The Sovereign Vault — A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9
chevron_left
202 Points • 9 Badges
Tallinn, Estonia • intercode.com
4Posts
0Comments
1Connections
InterCode is an AI-first development hub for high-growth digital companies

We are a Claude Certifie... Show more

Related Jobs

Commenters (This Week)

3 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!