Want to speak? Submit your talk and join our line up of speakers!
Community
Community
Overview
The story and values that drive us
Ambassadors
Become a Platform Engineering Ambassador
Events
Check out upcoming events near you
Reports
Check out the #1 source of industry stats
Jobs
Find your next  platform engineering role
Join Community
Join and contribute
Vendor opportunities
Certifications
Introduction to Platform Engineering
Platform Engineering Certified Practitioner
Platform Engineering Certified Architect
Agent infrastructure for Platform Engineers
new
Agentic Development Platforms
new
...and many more. Check out Platform Engineering University
Get Certified
For organizations
FOR ENTERPRISE TEAMS
Training & advisory
Home
Services
Results
Resources
FOR Partners
Service Provider
Training Reseller
Certified Provider Directory
BlogLandscape
Get certified
Join community
Join community
Get certified
All events
Make your coding agents policy-aware: Platform guardrails for cloud and Kubernetes
Virtual
In-person
Make your coding agents policy-aware: Platform guardrails for cloud and Kubernetes
Oct 29, 2026
7:00 pm
CEST
CET
-
45 minutes
Coding agents write Terraform and Kubernetes manifests and spin up cloud services. They can’t see your guardrails, and they copy outdated patterns from the repo. Cost leaks, security gaps, and operational misses slip through. Reviews drag. Tickets pile up. Learn how to make agents aware of the policies you already run, and how runtime enforcement catches the rest.
Register
Watch recording
Speaker
Sonny Shi
Head of Product, Stacklet
Speaker
Speaker
Speaker

Coding agents now generate much of the infrastructure code that platform teams once reviewed line by line. That speed is a genuine productivity gain - but it breaks the detect-and-ticket governance model most organizations still rely on. This webinar recap covers how policy as code can give your agents the same cost, security, and operational context your teams already enforce, before code ever reaches production.

Main insights

  • Agents learn from public tutorials, not your encryption, tagging, and least-privilege standards, so their output is frequently noncompliant by default.
  • Reviewing agent-written pull requests takes longer than generating them, turning reviewers into the bottleneck.
  • Policy as code gives agents exact, scoped, machine-readable requirements that wikis cannot reliably provide.
  • A single policy source can guide generation, check pull requests, and enforce at runtime.
  • Runtime enforcement remains essential for drift, manual changes, and live workloads that never pass through an agent.

Sunny Shi, Head of Product at Stacklet, walked platform, FinOps, and security teams through a practical approach to closing the gap between agent-driven development and the governance practices they already run.

You can watch the full discussion here if you missed it.

Why agent-written infrastructure breaks the old loop

Sunny opened with the core problem: "Most code these days are agent generated. That includes application code and infrastructure code and everything in between." The models behind these agents learn from public examples and documentation, which skew toward tutorials rather than real-world implementations. Real implementations include encryption, logging, tagging, least-privilege IAM settings, and cost guardrails - none of which appear consistently in the training data agents rely on.

Two scenarios make this especially visible in practice:

  • Brownfield repositories: In a repository that is several years old, agents copy the patterns they see in surrounding code so the diff looks consistent. That means inheriting outdated tagging standards, overly permissive IAM roles, missing encryption, and oversized resources. Because everything looks familiar, reviewers struggle to spot what is wrong.
  • New services: Agents often hallucinate tagging standards or ignore the security and compliance requirements your organization already enforces. Developers prompting the agent may not know those requirements either, so they cannot catch the gaps before the pull request opens.

Policy context compounds the problem. Tagging schemes, approved regions, KMS keys, and cost guardrails can shift week to week, while a model's knowledge stays frozen at its training cutoff.

The detect-and-ticket loop cannot keep pace

The familiar governance loop - someone creates infrastructure, a tool flags a misconfiguration, a ticket gets filed - was designed for human-paced development. Sunny was direct: that cycle "is much too slow in the age of agentic development." When agents generate pull requests faster than reviewers can process them, misconfigurations slip through and the backlog grows instead of shrinks.

Why wikis fall short and policy as code works

Many organizations store best practices in internal wikis and assume agents can consume them. Sunny outlined why that assumption breaks down:

  • Wikis are lossy. They contain instructions the agent must interpret, screenshots of console settings, and code snippets that lack full configuration context.
  • Loading entire wiki pages bloats the agent's context window with irrelevant content - a vacation policy sitting next to an infrastructure standard, for example.
  • Wikis are built for human collaboration, not machine consumption, so your governance team has no reliable way to control exactly what an agent reads.
  • Policies embedded in traditional security or FinOps tools require connectors that agents may not have access to across your development environment.

Policy as code addresses these gaps directly. A policy specifies the exact field to set - encryption must be enabled, a lifecycle rule must be present, a specific KMS key must be used. Because agent output is "non-deterministic by design," as Sunny put it, you still need a deterministic check once resources are live.

What a policy-aware agent needs

Sunny outlined four requirements for an agent that can operate within your governance boundaries:

  1. Rules and policies the agent can read and act on.
  2. Awareness of your organization's structure, because some policies apply organization-wide and others apply at the department or team level.
  3. A delivery mechanism to inject that guidance into the agent's development workflow automatically.
  4. Deterministic verification to check results at merge time and at runtime.

Policy as code in practice

Stacklet uses the Cloud Custodian policy language. Each policy defines a resource type, a set of filters, and a set of actions. Examples from the session include requiring specific tag keys and values, requiring IAM policies without wildcard conditions, and blocking cross-account access for designated applications.

Key characteristics Sunny highlighted:

  • The language works across every major cloud provider and Kubernetes, giving you one governance language across the full stack.
  • Policies mirror the API specifications agents work with. Rather than a generic "all resources must be encrypted," a policy can specify whether AES-256 server-side encryption or KMS encryption is required.
  • Policies are human-readable and version-controlled in Git, so you can track changes and roll them forward or back.

One policy source across the lifecycle

Sunny described reusing the same policy source at three stages:

Generation | Acts as guidance for the agent, surfacing the fields and risks for each resource type as it writes infrastructure code.

Merge time | Checks infrastructure-as-code files in the pull request using a Terraform provider, with guidance in comments that other code review agents can pick up.

Runtime | Works as a detective control (report and triage with the resource owner) or a preventive control (stop and act), so misconfigurations live for seconds instead of weeks or months. 

Delivering live context with the MCP server and skills

Your organization may have hundreds or thousands of policies. Loading all of them into every agent interaction wastes tokens and bloats context. Stacklet's MCP server provides scoped context based on where policies apply, using a hierarchy of account groups and sub-organizations. A production payments account, for example, receives policies from multiple tiers of that hierarchy. The agent gets only the set that applies to the infrastructure it is building.

The Stacklet guardrail skill brings that intelligence into the agent's context window automatically whenever the agent works on infrastructure, so developers do not have to invoke it explicitly.

Sunny demonstrated this with a GPU node pool example. Instead of a generic recommendation, the agent returned options that fit both policy and cost constraints - spot capacity on weekdays, with on-demand capacity requiring an exception. In Sunny's words, FinOps and security teams "are part of the conversation" during design and development rather than "tickets that sit on a Jira board after the fact."

Demo: A serverless application built with policy awareness

In the live demo, Sunny prompted the agent to build a serverless application using Lambda, RDS, S3, and SQS. When the agent initially could not reach the MCP server, it began generating code without governance context. Once authenticated, it distilled the organization's governance posture and revised its output.

Changes the agent made, based on policies already present in the environment:

  • Removed inline IAM policies.
  • Applied reserved concurrency and a dead letter queue to Lambda functions.
  • Changed the default database backup retention from 7 days to 30 days.
  • Raised log retention from 30 days to one year.
  • Used IAM authentication for RDS rather than a static password.

No new policies were written for the demo. The agent learned from the posture already enforced across the stack.

The agent also produced a plain-language summary explaining what it changed, where, and why. It surfaced a conflict between a SOC 2 requirement for 365-day log retention and a FinOps cost policy, then resolved it by making the retention period a configurable variable - lower in development, one year in production. That summary makes it straightforward for a human reviewer or a code review agent to understand the reasoning behind each decision.

Why runtime enforcement still matters

Even with a guardrail skill installed, you need a backstop. Shift-left policies can flag a specific line in a Terraform module before merge, giving a developer or a code review agent the chance to fix it. But not every change flows through infrastructure as code. Someone may adjust a setting directly in the cloud console, or a developer may write infrastructure code by hand without an agent in the loop.

Runtime policies cover those cases by detecting, preventing, and acting on live resources. Examples from the session include right-sizing an idle GPU instance, right-sizing a pod that requests ten times what it actually uses, and handling security, compliance, and tagging issues where no agent was involved at all.

Q&A highlights

How does this differ from OPA? Sunny explained that OPA uses the Rego policy language and operates as a general-purpose policy engine. Cloud Custodian is domain-specific and built for cloud resources. It includes built-in filters and actions - for example, a related-resource filter that can find EC2 instances whose security groups expose SSH to the internet without requiring separate lookups. It also deploys natively across cloud environments through event-based serverless functions or polling, not only within the pull request lifecycle.

How does it differ from putting policy rules in CI/CD hooks? Policies live and are managed centrally in Stacklet and apply across your environment through custom cloud or cluster groups. Because policies can change daily or weekly - for example, when you open a line of business in Europe under a different regulatory jurisdiction - managing them centrally keeps them current and easier to maintain than embedding them directly in each pipeline.

Can you use Stacklet policies with Helm charts? Policies operate against the Kubernetes spec - pods, nodes, config maps, and similar resources. Sunny noted that agents translate that spec into Helm charts effectively, much as they translate cloud API specifications into Terraform.

Where do you start from zero? Stacklet ships policy packs with thousands of policies aligned to frameworks including SOC 2, CIS, and HIPAA, plus packs for cost and AI governance. They use the same policy language shown in the demo, so you can adapt them to your organization's specific requirements.

​

If you enjoyed this, find here more great insights and events from our Platform Engineering Community.

For more comprehensive guidance, check out the Platform Engineering Certified Architect Course and learn best practices from industry experts.

​

Key takeaways

  • Treat agents as a new source of policy risk. Agents copy the context they see and fall back on public tutorials. You must give them your real standards before code ships, not after review, or you will spend more time fixing agent output than you save generating it.
  • Prefer policy as code over wikis for agent guidance. Exact, scoped, versionable policies give agents precise field-level requirements and keep context small, which reduces ambiguity and token waste compared to loading unstructured documentation.
  • Reuse one policy source across generation, merge, and runtime. A single governance language lets you guide the agent, check pull requests, and enforce on live resources without maintaining separate toolchains for each stage.
  • Keep a deterministic backstop for runtime. Agent output is non-deterministic and not all changes flow through infrastructure as code. Detective and preventive controls remain essential for drift, manual changes, and live workloads that never pass through an agent at all.
This event is exclusive. Reserve your spot now.
Register now
Watch recording
Join our Slack

Join the conversation to stay on top of trends and opportunities in the platform engineering community.

Join Slack
Sitemap
HomeAboutAmbassadorsCertificationsEventsJobs
Resources
BlogBook: Thinking in PlatformsPlatformConCertified provider directoryWhat is platform engineering?Platform toolingVendor opportunities
Join US
Youtube
LinkedIn
Platform Weekly
Twitter
House of Kube
Weave Intelligence

Subscribe to Platform Weekly

Platform engineering deep dives and DevOps trends, delivered to your inbox crunchy, every week.

© 2026 Platform Engineering. All rights reserved.
Privacy Policy
Privacy PolicyTerms of ServiceCookies Settings
Supported by
Register now