The Software Factory

A cloud, provider-agnostic factory that takes a ticket and returns an updated ticket plus a build for every major platform — automatically.

A Software Factory is a system that treats a ticket the way a factory treats an order: it comes in on one end, and a finished, shippable product comes out the other — with a human only stepping in when judgment is genuinely required.

It runs in the cloud and is provider-agnostic (AWS, Azure, or whichever fits). A factory manager polls a task queue — GitHub Issues, JIRA, or any source behind a small adapter — picks the next task, and routes it to the right factory workers: developers that change code, a build farm that compiles it, and QA when the task calls for it. The definition of done is an updated ticket plus a build ready for every major platform — iOS, Android, Web (WASM), macOS, and Windows (x64 / ARM where possible).

INTAKEtask sourcesGitHub Issuespoll / GraphQLJIRAREST v3AgnosticREST / webhookMANAGERfactory managerPoll task queueSelect & classifyRoute to workerTrack stateWORKERSfactory workersDeveloperchanges codeBuild farmmulti-platformQAif requiredDONEdefinition of doneUpdated ticket

builds foriOSAndroidWASMmacOSWindows (x64 / ARM)

How a ticket becomes a build

The loop has four stages. Each one is a small, replaceable component — that’s what keeps the whole thing provider-agnostic and easy to reason about.

1. Intake. Adapters watch the task source. GitHub and JIRA are first-class, but the manager never talks to them directly — it talks to a normalized internal task model. Add a new source, you write a new adapter, nothing else changes.

2. Manager. The manager polls the queue, picks the next eligible task, classifies it (what kind of work is this? what does it touch?), and routes it to the right worker. It owns state: every task moves through queued → in-progress → building → testing → done, and every transition is written back to the ticket.

3. Workers. A developer worker changes code (for the tasks where that’s the job). A build farm compiles the result across the platform matrix. QA runs when the task requires it — automated checks always, a human gate only when judgment is needed.

4. Done. The ticket comes back updated — with a summary, a PR, links to every artifact, and the decision trail — and the build exists for each major platform.

The build matrix

The hard part of a Software Factory isn’t orchestration — it’s that “every platform” is a matrix, and the matrix is where build systems break. 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.

Three things shape the farm:

  • Cross-compile where you can — targets that build from a different host or architecture let you avoid owning hardware for every one.
  • Some targets are host-locked — a few can only be built where the platform toolchain (and often signing) lives, so they need a dedicated slice of the pool.
  • 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 cheapest and fastest platform to build, sometimes the product’s primary target. That’s a per-repo choice, not a rule. I go deep on this in the build matrix, honestly.

Definition of done

A task is not done when the code is written. It’s done when all of these are true:

  • The ticket is updated — summary, 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).
  • QA ran where the task required it — automated checks always, human sign-off only when the task calls for judgment.
  • Release notes and build artifacts are attached to the ticket.

The blueprint

The short version of the best-of-breed stack (the full reasoning, trade-offs, and an MVP plan live in the deep dive):

  • Orchestration: a thin manager service plus a task queue, deployed as containers so it runs on AWS, Azure, or bare metal interchangeably.
  • Intake: GitHub (REST/GraphQL + webhooks) and JIRA (REST v3 + webhooks) adapters over one internal task model, with a generic REST adapter for the long tail.
  • Workers: sandboxed developer agents, and a containerized build farm using a pipeline-as-code tool or a distributed remote-execution system so builds scale out and cache across runs.
  • Caching: a remote, incremental build cache is what makes repeated multi-platform builds fast enough to be worth running on every ticket.
  • Source of truth: the ticket. Every artifact and decision links back to it.

Security & isolation

Worker agents run cut off from the internet — they can only reach the VPC. This isn’t a nicety; it’s a core requirement, because an autonomous agent that reads untrusted text (the ticket, an issue body, a linked URL, a dependency README) and then has open egress is a prompt-injection and exfiltration target. Isolation is a hard control; “the model probably won’t” is a soft one.

The model is default-deny egress, not a hard air-gap — a hard air-gap would break the one legitimate thing workers need, fetching pinned dependencies. So workers never reach the open internet; they reach a private registry mirror inside the VPC instead, which gives provenance, pinning, caching, and an audit of exactly what was pulled.

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
  • No internet gateway on the worker subnet — no public internet, enforced at the infra layer, not by policy an agent can reason its way around.
  • Default-deny security groups / NSGs — egress allowed only to the mirror, artifact store, build cache, and task queue.
  • PrivateLink / Private Endpoints for object storage and the registry, so even internal-adjacent calls stay off the public internet.
  • Every egress attempt is logged — a denied attempt by an agent is itself an alert (likely injection).
  • Tiered by blast radius — the developer agent gets no egress (or mirror-only); the build farm gets mirror + store + cache. Each worker is an ephemeral sandbox with only the repo + toolchain, so it can’t read sibling agents’ or the host’s code either.
  • Provider-agnostic — the same pattern on AWS (VPC w/o IGW, NAT, PrivateLink, SG) and Azure (VNet, NSG default-deny, Private Link), just different primitives.

On top of the network layer: pin dependencies + lockfiles as the source of truth, run license scanning in QA (a dependency/license-scanning tool) to catch any contamination that slips through, and give agents only short-lived, scoped, VPC-internal credentials so there’s nothing worth exfiltrating.

In this series

The concept above is the overview. Each post goes deep on one piece — generic, no single codebase or platform assumed:

More on the blog →

#software-factory#cicd#infrastructure
Read the deep dive →