Twelve-Factor and Its Descendants
Decisions, justifications and flaws of the Twelve-Factor App and the frameworks that followed it
Apr 4, 2026 · @Valery
Purpose and how to read
The Twelve-Factor App (2011) defined a contract between an application and the platform that runs it. Every framework below rewrites that contract for a new unit of deployment. This document covers named, specific frameworks that descend from it, not umbrella terms such as “cloud native” or “microservices”.
Each framework is read through four questions:
- Context: what changed that prompted it
- Decisions: what it asks you to do
- Justification: the failure each decision prevents
- Flaws: where it is wrong, dated or silent
The Twelve-Factor App (2011)
Context. Adam Wiggins and the Heroku team wrote it from building hundreds of apps and watching hundreds of thousands more run on Heroku. Its core decision: the app assumes nothing about the machine, and the platform assumes nothing about the app beyond a small contract. The site still says “last updated 2017” (12factor.net).
Goals. Declarative setup to cut onboarding cost, a clean contract with the operating system for portability, deployment to cloud platforms without sysadmins, minimal divergence between dev and prod, and scaling without redesign. The factors are means to these goals.
Critiques without a link are this document’s assessment.
What it got right. Docker later made the factors nearly free: container logs are factor XI, and per-container env vars are factor III (Hightower, 2015). Much of the contract became conventional wisdom (Update FAQ).
Cross-cutting flaws.
- Heroku-shaped. Examples assume a PaaS with process types and buildpacks, so they aged faster than the principles.
- Principles mixed with examples. Separating the two is the refresh’s first task.
- Missing concerns. Security and identity, observability beyond logs, API contracts and health signals are absent. Every successor adds at least one of these.
12 Fractured Apps (2015)
Context. Kelsey Hightower published 12 Fractured Apps on 13 December 2015. Docker had made twelve-factor practical, but teams ran containers like VMs, with 2 GB images on full Linux distributions. Apps were “fractured”: they worked only on a happy path where the config file, data directory and database all existed at startup.
Decisions.
- Config files are optional. Load one if present, otherwise fall back to sane defaults, then let env vars override.
- The app creates its own working directories and logs any failure.
- No required start order. Retry dependencies such as the database with increasing waits, logging each attempt.
- Bootstrapping stays in the app, not in entrypoint shell scripts or config-management tools. Wrapper scripts are acceptable only for apps you don’t control.
- Ship artifacts, not build environments: a static binary on a
scratchimage.
Justification.
- Puppet or Ansible ordering (start the database first) only covers up an app that can’t tolerate a missing dependency.
- Wrapper scripts drift out of sync with the app. In his example the entrypoint script’s Alpine base almost doubled the image, from about 6 MB to 11 MB.
- Baking config into per-environment images produces endless names such as
application-v2-prod-01022015.
Flaws.
- Narrow. It is one essay with Go examples and covers startup only, not a methodology.
- Two config sources. Optional files plus env overrides is pragmatic, but it departs from factor III and needs a documented precedence order.
- Hidden waiting. Retrying silently at startup can mask an outage. Readiness probes later made “waiting for the database” visible to the platform.
What carried forward. Tolerance of dependency order became a platform expectation: the container principles of 2017 turn it into lifecycle conformance.
Beyond the Twelve-Factor App (2016)
Context. Kevin Hoffman, an architect at Pivotal (Cloud Foundry), published Beyond the Twelve-Factor App with O’Reilly in April 2016, a 70-page book. His audience was enterprises moving fleets of microservices onto a PaaS. He kept the original factors, revised several, added three, and reordered them deliberately to signal priority (preface).
Decisions: the fifteen factors, in his priority order.
- One codebase, one application
- API first (new)
- Dependency management
- Design, build, release, run (design step added)
- Configuration, credentials and code (credentials named)
- Logs
- Disposability
- Backing services
- Environment parity
- Administrative processes
- Port binding
- Stateless processes
- Concurrency
- Telemetry (new)
- Authentication and authorization (new)
Justification for each change (Cloud Foundry summary).
- API first. Services are consumed by other services, so the contract is designed and agreed before code. This enables mock servers and lets teams work in parallel.
- Design step. Choosing dependencies for a story happens before the build, so it belongs in the pipeline.
- Credentials. Credentials never live in code. Mounted files and config servers such as Spring Cloud Config, Consul or CredHub are acceptable, not only env vars.
- Telemetry. With many instances you can no longer attach a debugger to one. Apps must expose performance metrics, health checks and business metrics.
- Authentication and authorization. Security is designed in from day one, with role- or attribute-based checks on every endpoint.
- Reordering. API first sits second because it shapes everything after it; port binding and concurrency move near the bottom, which reads as a judgment that platforms now handle them.
Flaws.
- Vendor context. Pivotal sponsored it, and the examples lean on Cloud Foundry: buildpacks, CredHub, the service broker.
- Process, not contract. API first and the design step are team practices. The 2024 refresh rules such principles out, keeping only the app-platform interface (Update FAQ).
- Goals without interfaces. Telemetry and security say what to achieve but name no mechanism, such as a metrics format or an identity standard, so compliance is hard to check.
- Factor inflation. Once the list opened, others kept adding: a 2018 Cloud Foundry post proposed a sixteenth factor for agile process.
Principles of Container-Based Application Design (2017)
Context. Bilgin Ibryam of Red Hat published the whitepaper in October 2017 and summarized it on the Kubernetes blog in March 2018. Almost any app could now run in a container, but Kubernetes imposes contracts on apps so it can automate their management. The paper limits its scope to containerized microservices, leaving source control and scaling models to twelve-factor.
Decisions: seven principles in two groups.
Justification. An orchestrator can only schedule, heal and scale what declares its needs and exposes its state. Build-time principles give containers the right granularity and consistency; runtime principles let the platform automate them.
Flaws.
- Reverses the original stance. Twelve-factor apps know nothing about their platform. Here the app implements probes and hooks shaped by Kubernetes semantics.
- Narrower scope. Codebase, config and dependency workflow sit outside it, so it complements twelve-factor rather than replacing it.
- Linux-container assumption. “Only the kernel” doesn’t describe serverless functions or WebAssembly runtimes.
- Platform drift. The principles are generic, but the examples track Kubernetes APIs, which keep changing.
What carried forward. Health and readiness endpoints and declared resource limits became standard practice. The ideas grew into the book Kubernetes Patterns by Ibryam and Roland Huß, now in its second edition (2023).
ML adaptations (2020 onward)
Context. The ZenML team published 12 Factors of Reproducible Machine Learning in Production on 28 September 2020, last updated February 2022. Their claim: ML has two moving parts, code and data, so software practice must be adapted rather than copied. A later series, The 12+ Factor Model, keeps the original five goals and adds “training” and “data” to them.
Decisions: ZenML’s twelve factors.
Mapping to the original. Factors 1, 3 and 12 mirror codebase, config and build-release-run. Factor 9 is dev/prod parity for data. The rest are new because the original has no notion of data as an input that changes.
Flaws.
- Vendor content. The factors are the stated design basis for ZenML’s orchestrator, and the post ends in a sign-up pitch.
- No narrow scope. It mixes coding hygiene (PEP 8, SOLID, testing) with platform concerns, so it reads as a checklist rather than a contract.
- Pre-LLM. It predates foundation models and says nothing about prompts, fine-tuning or evaluating generated output. 12-Factor Agents later covers part of that gap.
Twelve-Factor community refresh (2024 onward)
Context. Heroku open-sourced Twelve-Factor on 12 November 2024 and announced it at KubeCon. The maintainers, including Yehuda Katz and Heroku chief architect Vish Abrams, see the concepts as timeless but the details as dated. The new text lives on the next branch of twelve-factor/twelve-factor and will replace 12factor.net once the maintainers agree it is done.
Decisions so far (Update FAQ).
- Keep exactly twelve factors. The number is kept as a constraint that keeps the manifesto focused.
- Keep the scope. Factors cover only the contract between application code and its platform, and stay language-agnostic. General principles such as DRY or KISS will never be factors.
- Separate principles from examples, then modernize the examples first.
- Start narrow. Begin with stateless request-based apps, then expand to other workload types.
- Proposed changes: a new factor for workload identity, and widening the logs factor into telemetry (December update).
- Name the idea. A clear contract lets each side shed cognitive load, which the maintainers call the narrow-conduit principle (blog).
Justification. Much of the original contract is now conventional wisdom, while best practice drifted from its details. Apps today are systems of many services with diverse backing services, not one app and a database (The New Stack). The FAQ names authentication and service-to-service communication as the thorny problems to solve next.
Flaws and status.
- Slow to ship. Two years on, 12factor.net still serves the 2017 text, and the maintainer blog’s latest post is from April 2025.
- The fixed count forces trade-offs. Adding workload identity at twelve means merging or dropping an existing factor.
- Consensus lags practice. Inclusion is a maintainer judgment call between established and emerging practice, so the text will trail what platforms already do.
- Strength worth keeping. Its scope test, “is this about the app-platform interface?”, is the sharpest filter any descendant offers.
12-Factor Agents (2025)
Context. Dex Horthy of HumanLayer published 12-Factor Agents in April 2025, after talking with over 100 SaaS builders. The pattern he saw: a team grabs an agent framework, reaches 70-80% quality, then must reverse-engineer the framework to go further and starts over. His thesis is that good agents are mostly deterministic software with LLM steps placed at the right points. It is a design guide, not a framework or library.
Decisions: twelve factors plus one in the appendix.
Justification overall. Frameworks hide the prompt, the context and the state, which is exactly where production quality is won. The fastest path he saw was adding small, modular agent ideas to an existing product rather than a greenfield rewrite.
Flaws.
- Borrows the brand more than the structure. Five of the thirteen factors have no counterpart in the original, and none concerns the app-platform contract. It governs the inside of one component.
- Tied to current models. Context limits and error compaction are workarounds for today’s model weaknesses. The guide itself asks what happens if models get smarter (factor 10).
- Gaps. It says little about evaluation, cost, deployment or tool security such as prompt injection.
- Tension with its own advice. The README notes the authors “ignored all our own advice” and built a framework for running agents on Kubernetes. A v1.1 draft exists on a branch, but v1.0 remains current.
What carried forward. Factor 3 popularized the term “context engineering”, which Horthy is credited with coining (AI Engineer).
Cross-framework matrix
Observability is the only concern every framework covers; the bottom three rows are concerns the original never had. Read across a row to see one concern evolve, or down a column to see what a framework covers. In the ML and agent columns the mappings are analogies, not inheritance. A dash means no counterpart.
Synthesis
Each framework appeared when the unit of deployment changed, and each re-solved the same short list: observability, identity, contracts between parts and lifecycle signals.
What survives everywhere.
- Immutable, traceable artifacts: one codebase, immutable images, versioned data, prompts kept in code.
- State and config outside the unit, which makes the unit disposable: stateless processes, stateless reducers.
- Observability, the one concern in every column, growing from stdout logs to telemetry, health APIs and model monitoring.
What keeps being added. These are four things the 2011 Heroku platform handled invisibly:
- Observability beyond logs: Hoffman (2016), Red Hat (2017), ZenML (2020), the refresh proposal (2024).
- Identity and security: Hoffman (2016), the workload identity proposal (2024).
- Contracts between components: API first (2016), tool calls as structured output (2025).
- Lifecycle behavior the platform can rely on: Hightower (2015), Red Hat (2017), pause and resume (2025).
Recurring flaws.
- Vendor origin. Most frameworks come from a company with a platform or product: Heroku, Pivotal, Red Hat, ZenML, HumanLayer. The examples drift toward that product.
- Examples age faster than principles. Only the refresh separates the two.
- Scope creep. The more a framework covers, such as team process or coding style, the less it works as a checkable contract.
- Secrets. The original’s env-var advice is the most criticized single decision. Keep secrets apart from config and fetch them at runtime from a manager that authenticates the workload (Arcjet).
How to apply today.
For any new rule, apply the refresh’s scope test: if it isn’t about the app-platform interface, treat it as team practice, not a factor.
Related notes
- Platform and delivery: the platform side of the contract.
- Operating services: externalized configuration, health checks, and telemetry as system design choices.
- GitOps: where secrets go when configuration lives in Git.
- Developer experience: the narrow-conduit idea applied to platform teams.
Sources
- The Twelve-Factor App
- Twelve-Factor maintainers’ blog: open-source announcement, December 2024 update, Narrow Conduits and the Application-Platform Interface
- twelve-factor/twelve-factor repository and its Update FAQ
- Heroku: Heroku Open Sources the Twelve-Factor App Definition
- The New Stack: Heroku Moved Twelve-Factor Apps to Open Source. What’s Next?
- Kelsey Hightower: 12 Fractured Apps
- Kevin Hoffman: Beyond the Twelve-Factor App (O’Reilly) and preface
- Cloud Foundry: How Many Factors Are There Anyway?
- Bilgin Ibryam: Principles of Container-Based Application Design (Red Hat whitepaper) and Kubernetes blog summary
- Ibryam and Huß: Kubernetes Patterns, 2nd edition
- ZenML: 12 Factors of Reproducible Machine Learning in Production
- The 12+ Factor Model
- HumanLayer: 12-Factor Agents
- AI Engineer: Dex Horthy speaker page
- Diogo Mónica: Why you shouldn’t use ENV variables for secret data
- Arcjet: Should you store secrets in environment variables?