AI Software Factories - spinningideas/resources GitHub Wiki
An AI software factory is an autonomous production system that turns written requirements - issues, PRDs, tickets, alerts - into verified, production-ready code with minimal human intervention. Unlike first-generation AI coding assistants, where a developer prompts a pair-programming chatbot at a keyboard, a software factory operates as an asynchronous, event-driven assembly line: a daemon or webhook triggers the work, agent loops plan and implement in isolated environments, independent validation gates the result, and passing changes merge and deploy automatically.
The term "dark factory" borrows from lights-out manufacturing - factories that run with no humans on the floor. Dan Shapiro coined it for software; Cole Medin, Port, Mastra, Warp, and Cognition (Devin) have each operationalized it in different forms.
Scope: This page explains what a factory is, how one works, and catalogs real implementations - open-source harnesses, commercial platforms, and supporting tools - with links to learn more. It merges the content of
AI-Software-Factory.mdandAI-Software-Foundries-aka-Factories.md.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1st Gen: Interactive Pair Assistants (Copilot, Chat UIs) β
β Human developer prompts βββΊ LLM generates diff βββΊ Human reviews & tests β
β *Bottleneck: Human attention and manual typing required at every step* β
ββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β Paradigm Shift
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2nd Gen: Autonomous AI Software Factories ("Dark Factories") β
β Spec / Ticket / Alert βββΊ Autonomous Multi-Agent Loop βββΊ Holdout Testing β
β βββΊ Deterministic Gate βββΊ Auto-Merge βββΊ Canary / Blue-Green Deploy β
β *Bottleneck: Shifted upstream to spec clarity and downstream to tests* β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Three properties define the shift:
- Trigger-driven operation - work initiates from GitHub issues, Linear/Jira tickets, Slack threads, Sentry alerts, or cron timers. No open editor required.
-
Asynchronous 24/7 execution - agent workers run on remote servers, VMs, or container sandboxes, processing tasks in parallel across isolated
git worktrees. - Engineering as harness design - engineers stop writing line-by-line diffs and start designing acceptance criteria, governance rules, holdout tests, and scorecards.
Enterprise architecture distinguishes the upstream foundry (where intelligence and tools are provisioned) from the downstream factory (where code is produced):
| Dimension | AI Software Foundry | AI Software Factory |
|---|---|---|
| Role | Upstream enablement and tool fabrication | Downstream autonomous execution and delivery |
| Artifacts | Model catalogs, RAG engines, context graphs, agent SDKs | Validated code, pull requests, test runs, deployments |
| Focus | How models are evaluated, fine-tuned, governed | How requirements are parsed, implemented, validated, shipped |
| Examples | Azure AI Foundry, Palantir AIP/Foundry, HCLTech AI Foundry | Archon, Warp Factories, Devin/MultiDevin, Mastra, Tempo |
The foundry is the steel mill; the factory is the assembly line that consumes its output.
ββββββββββββββββββββββββββββββββββββββββββββββββ
β GOVERNANCE LAYER β
β MISSION.md | FACTORY_RULES.md | CLAUDE.md β
β (Protected, Immutable Rules) β
ββββββββββββββββββββββββ¬ββββββββββββββββββββββββ
β Read-Only Guidance
βΌ
βββββββββββββββ Issue / Event βββββββββββββββββββββββββ Accepted ββββββββββββββββββββββββββ
β INCOMING β βββββββββββββββββΊ β AGENT 1: TRIAGE β βββββββββββΊ β AGENT 2: BUILDER β
β SPEC/PRD β β (Priority & Scope) β β (Isolated Worktree, β
βββββββββββββββ βββββββββββββββββββββββββ β Static + Unit Tests) β
βββββββββββββ¬βββββββββββββ
β Pull Request
βΌ
βββββββββββββββ Auto-Merge βββββββββββββββββββββββββ Fail ββββββββββββββββββββββββββ
β DEPLOYED TO β βββββββββββββββββ β AGENT 3: VALIDATOR β βββββββββββ β FIX / RETRY WORKFLOW β
β PRODUCTION β (All Gates Pass) β (Independent Holdout)β (Max ~2 β (Fresh Context) β
βββββββββββββββ βββββββββββββββββββββββββ Attempts) ββββββββββββββββββββββββββ
-
The workflow harness - the deterministic engine that drives the pipeline: checks git status, parses labels, creates worktrees, branches on error codes, invokes agents in sequence. Examples: Archon (YAML DAGs), Mastra (TypeScript workflows), Warp
factory.yaml. -
The execution agent - a headless coding CLI treated as an interchangeable UNIX utility: accepts a task prompt, edits files, returns a shell exit code. Examples:
claude -p,codex exec,goose run,amp -x. - The foundation model(s) - code reasoning and planning. Good harnesses route cheap extraction tasks to small models and hard implementation to frontier models.
-
Isolated workspaces - one
git worktree, container, or microVM per task so parallel runs never share runtime state.
| Pillar | What it means |
|---|---|
| Workflow-driven repository | The repo itself defines issue β plan β build β test β PR; agents are swappable headless CLIs bound by an execution contract. |
| Automation engine + priority queue | A daemon wakes on a timer (every 15β30 min) or webhook and works a strict queue: fix failing PRs β validate candidate PRs β build accepted issues β triage new backlog. Finish what's in-flight before starting new work. |
| Continuous deployment to real users | A pipeline that merges but never deploys is a PR generator, not a factory. Passing PRs auto-merge and roll out (blue/green or canary) with automated revert on failed health checks. |
| Protected guidance layer | Immutable governance files bound agent behavior. Any PR that modifies them is rejected automatically. |
| Validation harness + independence line | The builder never grades its own work (see below). |
| File | Purpose |
|---|---|
CLAUDE.md |
Repo conventions: package managers, code style, architecture patterns |
MISSION.md |
Product goals, target users, explicitly out-of-scope features (triage rejects off-mission requests) |
FACTORY_RULES.md |
Operational boundaries: max PR size, protected files, max fix attempts before human escalation |
HOLDOUT.md / END-TO-END.md
|
Hidden acceptance scenarios and documented user journeys the builder cannot see |
The central risk in autonomous generation is an agent falsifying its own checks. Factories solve it by separating who builds from who verifies:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β² THE VALIDATOR RUNS ABOVE THIS LINE (Strict Independence & Fresh Context)
β β’ Deterministic Gate: Bash / CI script decides the merge, never a model.
β β’ Holdout Scenarios: Acceptance tests never visible to the builder.
β β’ Visual Judging: Headless browser regression & layout inspection.
β β’ E2E User Journeys: Real browser automation on actual user flows.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βΌ THE BUILDER RUNS BELOW THIS LINE (Self-Correction in Isolated Worktree)
β β’ Static Analysis: Linters, typecheckers (tsc, mypy), compilers.
β β’ Unit Tests: Component-level tests authored with the implementation.
β β’ Local Integration: Endpoint-level tests inside the worktree.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Core law: give an agent a check it can read and enough attempts, and it will modify the check to pass. Independence - a fresh-context validator plus a deterministic merge decision - is the only reliable defense.
Additional trust controls:
- Protected operational perimeter - the factory cannot edit auth logic, rate limiters, deploy configs, or its own workflow code.
- Fail-closed kill switch - a file or label that halts execution if health/status checks can't be confirmed.
-
Bounded retries - failed validation loops back to a fix workflow with a hard cap (~2 attempts), then escalates to a
needs-humanlabel.
Running one dark factory on a personal repo is easy; running dozens across an org raises governance questions - who owns an agent, which skills/MCP servers are vetted, and who answers when an agent's PR regresses production. Port (and similar IDPs like Cortex) answers this with a control plane around the factory:
- Context Lake - continuously syncs repos, tickets, Slack, CI, and deployments into a software catalog. Planner agents query it (via MCP) for ownership, dependencies, and environment context before writing code.
- Agent & skill registry - every agent has a human/team owner and a scope (read-only planner vs. read-write builder); skills and MCP servers are cataloged and versioned.
- Scorecards (hard standards, not soft prompts) - Bronze (owner, README), Silver (CI, CODEOWNERS, PR template), Gold (green CI on main, zero critical CVEs). Graded programmatically on every merge.
- Closed-loop self-healing - a failed check drops the score, files a structured issue, gets one-click human sign-off, and routes back to the factory to fix - restoring Gold status.
Organizational roles split accordingly: DevOps owns CI/runners, Platform Engineering owns the harness and scorecards, engineers write specs and holdout tests and approve high-risk PRs, and leadership sets the risk envelope and budget. Do not optimize for vanity metrics (tokens consumed, % of code AI-written); measure delivered outcomes:
| Category | Recommended metrics | What it demonstrates |
|---|---|---|
| Delivery velocity | Cycle lead time, deployment frequency, change failure rate, MTTR | The line ships faster without destabilizing the system (DORA) |
| Autonomy level | Issues resolved end-to-end without human edits; PRs merged via automated gates; fix loops per task | How much of the lifecycle runs autonomously vs. needs intervention |
| Governance & cost | Policy/scorecard violations intercepted pre-merge; blast radius of agent actions; cost per shipped feature | Operations stay inside security boundaries with positive unit economics |
The canonical open-source dark factory: a Python daemon + systemd timers on a VPS that polls GitHub labels (factory:triaging, factory:accepted, factory:in-progress, factory:needs-fix), launches headless coding agents in git worktrees, and gates merges on independent holdout scenarios. Archon is the underlying YAML-DAG workflow engine.
Insights from the GPT-6 Astra demonstration: autonomous loops need models that follow user intent across multi-step planning without drifting from requirements; hosting on a remote VPS enables true 24/7 background execution; and GitHub labels function as the workflow state machine that dispatches Archon pipelines.
- Links: ai-software-factory | Archon | dark-factory-experiment | server cheat sheet
-
Cost: Free OSS (MIT).
$10β25/mo VPS + pay-per-token model costs ($0.40β2.50 per completed PR). -
Use:
bootstrap-ubuntu.shon an Ubuntu 24.04 VPS, thenfactory.py initin your repo. See Β§6. - Strengths: total transparency, zero lock-in, battle-tested holdout validation and priority queue; swappable agent CLIs and models.
- Limits: requires Linux server administration; single-machine scale bound by host CPU/RAM/disk.
A Claude Codeβbased software factory implementation from the Zazencodes (Alex Ziskind) video series - headless Claude Code agents wired into an issueβbuildβvalidateβPR pipeline.
- Links: zazencodes-season-3 repo | software-factory-claude-code-v2
- Cost: Free open source; you pay Claude/API usage.
- Use: Clone the repo and follow the directory's setup instructions; pairs naturally with the architecture in Β§2.
TypeScript agent framework for deterministic, long-running factory pipelines: workflow DAGs, built-in LibSQL/Postgres storage, Sentry telemetry, GitHub webhook integration.
- Links: Software factory guide | mastra-ai/mastra
- Cost: Free OSS (Apache 2.0); self-hosted Node.js + your model keys.
-
Use:
npm create mastra@latestthen define triage/implement/validate steps as acreateWorkflowDAG:
import { createStep, createWorkflow } from "@mastra/core";
import { z } from "zod";
const triageStep = createStep({
id: "triage-issue",
inputSchema: z.object({ issueBody: z.string() }),
execute: async ({ context }) => {
// Query LLM to evaluate priority against MISSION.md
return { accepted: true, priority: "high" };
},
});
export const factoryWorkflow = createWorkflow({
name: "DarkFactoryPipeline",
steps: [triageStep /*, implementStep, validateStep */],
});- Strengths: full TypeScript type safety, transactional storage, step memoization, drops into existing Node backends.
- Limits: you build the workflow logic yourself (unlike turnkey Warp/Devin); TypeScript-centric.
Zero-config spec-driven harness: one CLI routes requirements to whichever agents you have installed (Claude Code, Cursor, Windsurf, Codex CLI).
- Link: github.com/lee-to/ai-factory
- Cost: Free OSS.
- Limits: no autonomous scheduling or independent holdout validation; best for solo spec-driven development.
Central factory generator for polyrepo orgs - synchronizes rules, linter profiles, and prompt libraries across heterogeneous microservices.
- Link: github.com/dewantrie/ai-software-factory
- Cost: Free OSS.
Visual multi-agent development workspace structuring requirements, architecture, API plans, and reviews.
- Link: github.com/muhammadsami987123/AI-Software-Factory
- Cost: Free OSS.
Autonomous cloud software engineer in persistent sandboxed microVMs (shell, editor, browser). MultiDevin is the factory orchestrator: a central Manager Agent ingests epics or Jira backlogs, decomposes specifications into discrete subtasks, and coordinates up to ~10 worker agents in parallel sandboxes - each worker branch is compiled, tested, and submitted as a PR.
- Links: devin.ai | Contrary Research breakdown
- Cost: Subscription/ACU-based (~$500+/mo enterprise entry); no separate infra or model bills.
- Use:
npm install -g devin-cli
devin login && devin init
devin run --team-size 5 "Refactor auth layer to OAuth2 PKCE, update tests, generate migrations"- Strengths: turnkey, zero infra, dedicated microVM per task, browser-based visual debugging.
- Limits: enterprise price point; closed-source engine internals.
Declarative "Factories as Code": a versioned factory.yaml defines repos, secrets, integrations (Slack/Linear/Jira), and a Foreman agent that orchestrates Triage β Spec β Implement β Review specialist agents on managed cloud runners.
- Links: warp.dev/factories | docs | demo
- Cost: Early access; usage-based pricing planned (compute + tokens).
-
Use: commit
factory.yamlat repo root, thenwarp factory apply -f factory.yaml; dispatch via@factorymentions or ticket labels:
schemaVersion: v1alpha1
name: core-services-factory
repositories:
- { owner: my-org, name: backend-api }
secrets: [NPM_TOKEN, DATABASE_URL]
integrations:
- { type: slack, channel: "#eng-factory-feed" }
- { type: linear, team: "BACKEND" }
agentDefaults: { model: auto, runner: warp-cloud-standard }- Strengths: versionable factory definitions; native Slack/Linear/Jira dispatch; managed runners.
- Limits: limited early access; proprietary orchestration less customizable than OSS harnesses.
Event-driven issue-to-PR factory: ingests Slack customer feedback, Sentry alerts, and Linear issues; a Reproduction agent writes a failing test first, a Fix agent iterates until it passes, a Review agent opens the PR.
- Link: tempo.new/software-factory
- Cost: Free starter tier; ~$49β199/mo by PR volume.
-
Use: connect GitHub + Slack/Sentry, set triage rules in
.tempo/factory.json, tag@tempo fixon an issue:
{
"monitoredChannels": ["#customer-bugs"],
"autoReproduce": true,
"maxFixAttempts": 3,
"targetBranches": ["main"]
}- Strengths: shortest mean-time-to-resolution loop (telemetry β reproduction β fix); reproduction test prevents speculative fixes.
- Limits: bug-fix focused, less suited to large refactors; relies on third-party sandboxing.
Infrastructure-aware path: Encore (Go/TypeScript framework) parses service declarations into cloud architectures and gives every branch an isolated preview environment for holdout testing; Cortex adds enterprise scorecards and compliance auditing for agent PRs.
- Links: Encore article | Cortex
- Cost: Encore free OSS; Encore Cloud from ~$99/mo. Cortex enterprise per-seat.
-
Use:
encore app create, declare infra in code (e.g.new SQLDatabase("users", { migrations: "./migrations" })), let agents validate againstencore previewenvironments. - Strengths: removes cloud plumbing for agents; instant preview envs enable real E2E holdouts; static service graphs prevent architectural drift.
- Limits: requires adopting Encore for backends (Go/TS); not a wrapper for arbitrary legacy polyglot codebases.
Enterprise IDP and governance harness around the factory (see Β§3): Context Lake, agent/skill registry, Bronze-Silver-Gold scorecards, closed-loop self-healing via MCP.
- Link: port.io/blog/ai-software-factory
- Cost: Free up to 15 seats; enterprise per-seat.
- Use: connect GitHub/Slack, define blueprints + scorecards, expose the Port MCP server to planner agents:
// Example Agent blueprint
{
"identifier": "agent",
"title": "AI Agent",
"properties": {
"owner": { "type": "string" },
"scope": { "type": "string", "enum": ["read-only", "read-write", "deploy"] },
"assignedRepo": { "type": "string" }
}
}{
"mcpServers": {
"port": {
"command": "npx",
"args": ["-y", "@port-labs/port-mcp-server"],
"env": { "PORT_CLIENT_ID": "...", "PORT_CLIENT_SECRET": "..." }
}
}
}- Strengths: ownership/accountability layer; Context Lake kills dependency hallucinations; scorecards are non-bypassable floors.
- Limits: doesn't execute code itself - needs external agents; initial blueprint/ingestion setup required.
A human-in-the-loop workspace for staying on top of agents: shape and annotate plans, review diffs, share with the team, and send structured feedback back to agents in one click. Fills the human-review gap that even dark factories keep at the trust boundary.
- Link: github.com/backnotprop/plannotator
- Cost: Free open source.
- Use: run alongside your coding agent (Claude Code, OpenCode, etc.) as the review/annotation layer before or after agent runs.
Education and architecture community (Cole Medin) teaching the underlying factory mechanics. The Agentic Coding Course covers five disciplines: PRD-first requirements, modular protected rules (CLAUDE.md / FACTORY_RULES.md / MISSION.md), command-ification of repeated tasks, context resets between planning/implementation/verification, and treating bugs as harness-hardening opportunities.
- Link: dynamous.ai
- Cost: ~$79/mo or ~$712/yr membership (promos of 20β40% common).
- Use: courses + private template repos (worktree scripts, triage labels, systemd units) applied to your own infra.
- Strengths: model-agnostic principles that outlast tooling churn; verified reference code; active builder community.
- Limits: education and templates, not a managed control plane; you run the infrastructure.
| Platform | Role |
|---|---|
| Azure AI Foundry | Model catalogs, agent SDKs, enterprise identity, multi-agent orchestration |
| Palantir AIP & Foundry | Enterprise Ontology + decision-action layer |
| HCLTech AI Foundry | Managed enterprise AI enablement |
| Implementation | Type | Orchestration | Isolation | Validation | Cost | Best for |
|---|---|---|---|---|---|---|
| Cole Medin / Archon | OSS harness | Python daemon + systemd + Archon YAML DAGs | Git worktrees on VPS | Independent validator + holdout tests | Free + VPS + tokens | Full self-hosted control |
| Zazencodes v2 | OSS reference | Claude Codeβcentric scripts | Worktrees/sessions | Scripted validation | Free + Claude usage | Learning Claude Code factories |
| Mastra | OSS framework | TypeScript workflow DAGs | Node env + worktrees | Programmatic step validation | Free | TS teams building custom factories |
| Devin / MultiDevin | Commercial platform | Manager agent + parallel workers | Cloud microVM per task | Compiler/lint/browser checks | SaaS (ACUs, enterprise) | Turnkey autonomous issue resolution |
| Warp Factories | Commercial platform | Declarative factory.yaml + Foreman |
Managed cloud runners | Review agent + CI gates | Early access | Teams wanting managed "factories as code" |
| Tempo | Commercial platform | Event hooks (Slack/Sentry/Jira) | Ephemeral containers | Mandatory reproduction test | Freemium | Auto-fixing production bugs from alerts |
| Encore & Cortex | Framework + IDP | Infra-aware service graphs | Preview environments per branch | E2E preview tests + scorecards | Free OSS / $99+ | Backend teams on Go/TS |
| Port | Governance IDP | Context Lake + scorecards + MCP | Delegated to agent runner | Bronze/Silver/Gold scorecards | Free β€15 seats | Enterprise multi-agent governance |
| Plannotator | Review tool | Human-in-the-loop UI | n/a | Human annotation of plans/diffs | Free OSS | Keeping humans in the loop |
| lee-to / dewantrie / sami | OSS utilities | CLI prompt routing | Varies | Manual | Free | Lightweight spec-driven dev |
| Dynamous AI | Education | Patterns & blueprints | Community templates | Holdout methodology | ~$712/yr | Mastering factory mechanics |
The concrete path for the Cole Medin factory, based on the server cheat sheet.
Prerequisites: Ubuntu 24.04 server with β₯8 GB RAM; git, Python 3.10+, bun, uv; GitHub CLI with workflow scope; an authenticated coding agent (Codex or Claude Code).
# 1. SSH key + firewall: allow only SSH/HTTP/HTTPS inbound
ssh-keygen -t ed25519 -f ~/.ssh/factory -N "" # on your local machine
ssh -i ~/.ssh/factory root@<vps-ip>
# 2. Bootstrap the server
curl -sSL https://raw.githubusercontent.com/coleam00/ai-software-factory/main/bin/bootstrap-ubuntu.sh | bash
source ~/.profile
# 3. Authenticate GitHub
gh auth login --hostname github.com --git-protocol https --web -s workflow
gh auth setup-git && gh auth status
# 4a. Authenticate Codex (enable "Device code authorization" in ChatGPT settings first)
codex login --device-auth
codex exec "say hi"
# 4b. Alternative: Claude Code token auth
# On local machine: claude setup-token
# On server:
echo 'export CLAUDE_CODE_OAUTH_TOKEN=<token>' >> ~/.factory-env && chmod 600 ~/.factory-env
echo 'source ~/.factory-env; export IS_SANDBOX=1' >> ~/.profile && source ~/.profile
claude auth status
# 5. Install the factory in your repo
gh repo clone <you>/<app> ~/<app>
git clone https://github.com/coleam00/ai-software-factory ~/ai-software-factory
cd ~/<app> && python3 ~/ai-software-factory/bin/factory.py initConfigure model tiers in ~/.archon/config.yaml - small tasks route to cheaper effort levels, large tasks to high-effort reasoning:
defaultAssistant: codex
assistants:
codex: { model: gpt-6-astra, modelReasoningEffort: medium }
tiers:
small: { provider: codex, model: gpt-6-astra, effort: medium }
medium: { provider: codex, model: gpt-6-astra, effort: medium }
large: { provider: codex, model: gpt-6-astra, effort: high }Runtime verification requirements (under /root/private, chmod 700):
- The test harness starts a fresh instance of the candidate build on an isolated local port.
- The candidate root refreshes from the delivering checkout before each run (not a static dir).
- The app must expose a
/build-idendpoint returning the candidate commit digest so the verifier can confirm the running process matches the PR code.
# 6. Verify + go live
cd ~/<app>
python3 factory/consumer.py doctor
python3 factory/consumer.py list
# File a test issue, run one lifecycle in the foreground, approve the PR, then:
systemctl enable --now factory-timer.timerDay-to-day operations:
# Status: recent ticks, active runs, running build ID
journalctl -u factory-timer.service -n 50 --no-pager
# Re-drive a held PR (fix the underlying hold comment first)
python3 factory/consumer.py redrive <pr-number>
# If the pinned Archon source was modified ("Factory refused: Pinned source has changes"):
rm -rf ~/.cache/factory/archon/<revision>
cd ~/<app> && python3 ~/ai-software-factory/bin/factory.py init-
Stabilize the pipeline - kill flaky tests; enforce format/typecheck/lint on every push; PR templates +
CODEOWNERS. -
Establish the guidance layer - write
CLAUDE.md,FACTORY_RULES.md,MISSION.md. - Deploy an open-source runner - Archon or Mastra on an isolated VPS; label-based triage; worktree isolation.
- Implement the holdout principle - independent validator with fresh context; hidden acceptance tests; a deterministic script - never a model - makes the merge call.
- Layer enterprise governance - Port Context Lake + scorecards; automated issue creation on production check failures to close the self-healing loop.
These diagrams render on the GitHub wiki. They show the same architecture from three angles: enterprise governance, the dark factory lifecycle, and the daily operating loop.
flowchart TD
subgraph EnterpriseContext["Enterprise Context Lake"]
GH[GitHub] --> CL[(Port Context Lake)]
Jira[Jira / Linear] --> CL
Slack[Slack] --> CL
CI[CI / Telemetry] --> CL
end
subgraph FactoryLine["AI Software Factory Execution"]
Plan[Plan Release] --> Split[Split into Issues]
Split --> Laps[Parallel Worktree Laps]
Laps --> Review[2 Independent Reviewers]
Review --> Merge[Merge to Main]
end
subgraph Standards["Port Scorecards"]
Bronze[Bronze: Owner, README, gitignore] --> Silver[Silver: CI, CODEOWNERS, PR Template]
Silver --> Gold[Gold: CI Passing on Main]
end
subgraph HealingLoop["Closed-Loop Self-Healing"]
Fail[Check Fails / CI Goes Red] --> PortIssue[Port Files Issue with Logs]
PortIssue --> HumanApprove[Human Owner Signs Off]
HumanApprove --> FixRun[Factory Picks & Resolves Issue]
end
CL -->|Owner + Standards| FactoryLine
FactoryLine -->|Graded on Merge| Standards
Standards -->|Degraded Rule| Fail
FixRun -->|Restores Gold| FactoryLine
style EnterpriseContext fill:#141d2b,stroke:#3d5573,color:#e6edf3
style FactoryLine fill:#141d2b,stroke:#3d5573,color:#e6edf3
style Standards fill:#141d2b,stroke:#3d5573,color:#e6edf3
style HealingLoop fill:#141d2b,stroke:#3d5573,color:#e6edf3
classDef node fill:#1f2b3d,stroke:#5b8dc9,stroke-width:1.5px,color:#e6edf3
classDef store fill:#16321f,stroke:#3fb950,stroke-width:1.5px,color:#d7f0dc
classDef good fill:#16321f,stroke:#3fb950,stroke-width:1.5px,color:#d7f0dc
classDef alert fill:#3d1f22,stroke:#f85149,stroke-width:1.5px,color:#ffd6d3
classDef human fill:#2a2410,stroke:#f0a848,stroke-width:1.5px,color:#ffd9a0
class GH,Jira,Slack,CI,Plan,Split,Laps,Review,Merge,Bronze,Silver,FixRun node
class CL store
class Gold good
class Fail,PortIssue alert
class HumanApprove human
linkStyle default stroke:#5b8dc9,stroke-width:1.5px,color:#a8c3e0
flowchart TD
Spec([Human Writes Spec / Issue]) --> Triage[Daemon / Triage Agent]
subgraph GuidanceLayer["The Protected Guidance Layer"]
C_MD[CLAUDE.md: Conventions]
F_MD[FACTORY_RULES.md: Boundaries]
M_MD[MISSION.md: Scope & Goals]
end
GuidanceLayer -.->|Read-Only Guardrails| Triage
GuidanceLayer -.->|Read-Only Guardrails| Builder
Triage -->|Accepted Label| Builder[The Builder Agent<br/>Headless CLI in Git Worktree]
subgraph BelowLine["Below the Independence Line"]
Builder --> StaticCheck[Static Types & Linter]
StaticCheck --> UnitTests[Unit & Component Tests]
end
UnitTests --> Validator[The Validator Agent<br/>Fresh Context & Diff Inspection]
subgraph AboveLine["Above the Independence Line"]
Validator --> Holdout[Holdout Acceptance Scenarios]
Holdout --> Visual[Visual Regression / Browser Run]
Visual --> DeterministicGate{Deterministic Gate<br/>Bash / CI Decision}
end
DeterministicGate -->|Pass| Deploy[Blue/Green Deployment<br/>Live to Real Users]
DeterministicGate -->|Fail: max 2 retries| FixRetry[Fix Workflow / Needs-Fix]
FixRetry --> Builder
DeterministicGate -->|Fail: exhausted| NeedsHuman[Needs-Human Label & Alert]
style GuidanceLayer fill:#141d2b,stroke:#f0a848,color:#ffd9a0
style BelowLine fill:#141d2b,stroke:#3d5573,color:#e6edf3
style AboveLine fill:#141d2b,stroke:#3d5573,color:#e6edf3
classDef node fill:#1f2b3d,stroke:#5b8dc9,stroke-width:1.5px,color:#e6edf3
classDef actor fill:#22304a,stroke:#6cb6ff,stroke-width:1.5px,color:#e6edf3
classDef guard fill:#2a2410,stroke:#f0a848,stroke-width:1.5px,color:#ffd9a0
classDef decision fill:#2a2410,stroke:#f0a848,stroke-width:2px,color:#ffd9a0
classDef good fill:#16321f,stroke:#3fb950,stroke-width:1.5px,color:#d7f0dc
classDef alert fill:#3d1f22,stroke:#f85149,stroke-width:1.5px,color:#ffd6d3
class Spec actor
class Triage,Builder,StaticCheck,UnitTests,Validator,Holdout,Visual,FixRetry node
class C_MD,F_MD,M_MD guard
class DeterministicGate decision
class Deploy good
class NeedsHuman alert
linkStyle default stroke:#5b8dc9,stroke-width:1.5px,color:#a8c3e0
sequenceDiagram
autonumber
actor Developer as Human Engineer
participant Manager as Manager Agent
participant Worktree as Worker Agents (Worktrees)
participant Validator as Independent Validator
participant Staging as Staging Cluster
participant Prod as Production
Developer->>Manager: Plan Release (PoC Spec or Epic PRD)
Manager->>Manager: Split into decoupled parallel issues
loop Parallel Laps (One per Worktree)
Manager->>Worktree: Assign Issue (Pick)
Worktree->>Worktree: Implement code & run local unit tests
Worktree->>Validator: Submit candidate PR
Validator->>Validator: Run independent holdouts & E2E checks
alt All checks pass
Validator->>Manager: Approved
Manager->>Staging: Merge PR & deploy to staging
else Checks fail
Validator->>Worktree: Return error logs (Max 2 laps)
end
end
Developer->>Staging: Test & evaluate release experience
alt Release passes user feel
Developer->>Prod: Promote to Production
else Flaws detected
Developer->>Manager: File new issues into loop
end
- Cole Medin: ai-software-factory Β· dark-factory-experiment Β· Archon Β· server cheat sheet Β· GPT-6 Astra factory video Β· Port integration video
- Zazencodes: season-3 repo Β· software-factory-claude-code-v2
- Port: AI Software Factory: What It Is, Why You Need One, Who Owns It
- Warp: Factories Β· docs
- Cognition: Devin Β· Contrary Research breakdown
- Others: Mastra Β· Tempo Β· Encore Β· Cortex Β· Dynamous AI Β· Plannotator
- Foundries: Azure AI Foundry Β· Palantir AIP Β· HCLTech
- Research lineage: Dan Shapiro (Glowforge CEO) coined the "dark factory" concept for software; Martin Fowler / Thoughtworks' continuous-delivery research grounds the deterministic regression boundaries requirement; Microsoft Research & GitHub's AutoDev work establishes isolated sandboxes, issue-driven state machines, and independent evaluation agents.