More The AI Native Dev episodes

Paul Stack: I'll Never Write Infrastructure as Code Again thumbnail

Paul Stack: I'll Never Write Infrastructure as Code Again

Published 17 Nov 2026

Duration: 01:02:01

Agentic infrastructure management and automated alert triage systems reduce operational toil and costs while preserving human judgment for critical decisions.

Episode Description

Paul Stack helped build Terraform. Now he says he'll never write another line of infrastructure as code, because an agent harness runs his team's prod...

Overview

Paul Stack, who helped build early Terraform at HashiCorp and later worked at Pulumi, discusses his new company Swamp, which uses AI agents to manage infrastructure as a first-class citizen rather than retrofitting existing code for agents. He describes migrating Swamp's production infrastructure four times in six months - Railway to Digital Ocean App Platform, to Digital Ocean Kubernetes, and to GCP - with full data migration each time, calling it "completely flawless" and "completely seamless."

Stack explains that agents have improved at generating infrastructure as code over the past six months, but challenges persist: IaC is "very opinionated code" with "modules upon modules upon modules" and a "layer of state underneath" complicating refactoring. He frames the traditional approach as a "200% problem" requiring knowledge of both the cloud SDK and the Terraform or Pulumi abstraction, whereas agents simply translate between clouds without those intermediate layers.

In his talk "From Page to Dossier," Stack details a lights-out alert triage factory using deterministic workflows, a small model called Jev for classification (yielding a 91% cost improvement over Claude), and structured dossiers presenting operators with evidence and recommended actions. He stresses that agents handle repetitive toil while humans retain remediation judgment, citing a 1979 IBM principle that "a computer can never be held accountable, therefore a computer must never make a management decision."

What If

  • What if you automated your on-call context gathering with a deterministic agent pipeline?

    • Move: Build a webhook-triggered workflow that ingests alerts, de-duplicates via hash ID, correlates against open incidents, and classifies using a small model before escalating to a large model for triage.
    • Why Now?: Stack's team reduced context-gathering from 30 minutes to approximately 5 minutes, and the 91% cost improvement from using Jev for classification makes this economically viable for a solo operator.
    • Expected Upside: You could potentially reduce on-call wake-ups by auto-closing duplicates and correlated alerts, arriving at incidents with a structured dossier already prepared rather than starting from a blank screen at 3 a.m.
  • What if you encoded your deployment pipeline as reusable "behaviors" with schemas and gates?

    • Move: Define each deployment step as a behavior with a schema, workflow, and specific data structure that adds gates to the process, rather than ad-hoc scripts.
    • Why Now?: Stack describes Swamp behaviors as "pieces of intent" with "schemas" and "a workflow" that "add gates to the process," and notes this lets agents run the full pipeline "end to end" without manual intervention.
    • Expected Upside: You could potentially achieve deterministic deployments where the agent "just need[s] to run this exact script, this exact piece of code" rather than reasoning probabilistically, reducing the risk of unintended infrastructure changes.
  • What if you replaced your runbook with an agent-maintained decision tree?

    • Move: Interview your team to extract institutional knowledge, encode each step as a workflow behavior, and have the agent execute the full context-gathering sequence (logs, dependencies, deploy pipeline, config changes) before presenting findings.
    • Why Now?: Stack notes runbooks are "immediately out of date" and "very rarely kept up to date," while agents "will do the boring part the same way every time" and "don't care if you ask them to do the same task 500 times in a row."
    • Expected Upside: You could potentially eliminate the "first 30 minutes of context gathering" entirely, arriving at incidents with evidence, likely cause, and recommended next steps already compiled into a consistent format.

Takeaway

  • Replace your on-call runbook with a deterministic agent workflow: ingest alerts via webhook, de-duplicate by hash, correlate against open incidents, and classify before escalating to a human.
  • Use a small model for initial alert classification and reserve large frontier models for complex triage; Stack reports this yielded a 91% cost improvement.
  • Encode each deployment step as a reusable behavior with a schema, workflow, and gates so agents execute deterministic scripts rather than reasoning probabilistically through your infrastructure.
  • Give agents read-only access to production with minimal credentials wrapped in encoded vault structures; never share raw environment variables or a single API key.
  • After every incident post-mortem, add a field documenting how to strengthen the automated triage system, feeding learnings back into the workflow to improve future decisions.

Recent Episodes of The AI Native Dev

10 Nov 2026 Edith Harbaugh: Code Is Cheap. The Last Mile Isn't.

Feature flags and AI agents transform software delivery by enabling autonomous rollbacks and rapid iteration, though human judgment remains vital for defining success and maintaining stability.

27 Oct 2026 Caleb Sima: AI Attackers Move at Machine Speed

"AI-driven cybersecurity threats are evolving rapidly, with attackers leveraging speed, complexity, and swarm-like behavior to exploit vulnerabilities, necessitating advanced defensive strategies like automation and high-fidelity monitoring to counter escalating risks."

13 Oct 2026 Maria Gorinova: Feedback Loops That Fix Your Codebase

"Software factories and agentic coding require robust feedback loops to balance efficiency, reliability, and human oversight, with structured workflows and clear intent improving automation outcomes."

6 Oct 2026 Legora CTO: Why AI Agents Need More Than a Chat Window

"AI enhances legal and engineering workflows by automating tasks like drafting and coding, but human judgment remains critical for subjective or high-stakes decisions, with tools like Legora streamlining processes while addressing challenges in tooling, orchestration, and resource optimization."

More The AI Native Dev episodes