Platform teams rarely get burned by a model that is wrong. They get burned by a model that is right and fully authorized.
The usual adoption path looks harmless. Someone gives an agent a service account, a shell, and a path into the cluster, then hopes that careful prompting will substitute for access control. It survives the demo. Then an AI-generated Terraform module widens a bucket policy because a permission error needed fixing quickly, a remediation script fires against the wrong context and takes live nodes with it, and engineers quietly spend more time auditing suggested CLI commands than those commands ever saved them.
None of that is a prompt problem. It is a permissions and process problem wearing a prompt costume.
Why the default setup fails
Three assumptions break almost immediately in real platform work.
Assumption one: the model understands blast radius. It does not. An agent sees a permission error and a tool that can fix it. It has no model of which account is production, which bucket holds customer data, or which node pool is holding up a paying tenant's traffic.
Assumption two: a dry run is a safety net. A dry run is only safe if the identity performing it is structurally incapable of applying. If the same token that plans also applies, the dry run is theater.
Assumption three: humans will catch it in review. Reviewers catch what they can see. If the artifact of record is the model's cheerful prose summary rather than the raw diff, the reviewer is auditing a paraphrase.
The fix is not a better model. It is deterministic guardrails that sit in the platform layer, expressed as code, enforced by systems that do not negotiate.

Figure: Editorial context image from the source page (preview only; rights remain with the publisher) · Credit / further reading: dev.to
How to score this checklist
Every item below is binary. There is no partial credit and no roadmap entry that counts as a pass.
- Pass means it is true today, in the environment where the agent runs.
- Fail means the agent stays read-only until it is true.
If you cannot answer an item without opening a ticket, treat it as a fail. Uncertainty in an access-control review is the same as absence.
Part 1 — Identity and blast radius
1. Dedicated non-human identity per agent. Pass: the agent has its own principal, separate from every human account, with short-lived credentials and a named owner. Fail: it reuses an engineer's kubeconfig, a shared CI key, or a long-lived static secret.
2. Least privilege as an explicit allowlist. Pass: permissions are enumerated by resource and verb, version-controlled, and reviewed like application code. Fail: any wildcard at all, or any path back to a broad admin policy for convenience.
3. Structural separation of plan and apply. Pass: the identity that proposes a change literally cannot execute it — different principal, different pipeline stage. Fail: one token covers both dry run and mutation.
4. Environment-scoped credentials minted per run. Pass: a credential is issued for one cluster, account, or workspace, and expires in minutes. Fail: a credential that works in staging and production, or one that never expires.
Part 2 — The change path
5. Agents propose pull requests, never commits. Pass: all agent output lands as a branch and a PR, and CI validates it before a human sees it. Fail: the agent can push to a protected branch or call a mutating API directly.
6. Policy gates block before merge, not after deploy. Pass: policy-as-code checks run on every plan and fail the build on violation. Fail: violations surface in a weekly report, a dashboard, or a Slack digest nobody reads on Friday.
7. The diff is the artifact of record. Pass: reviewers approve the raw plan or diff; the model's explanation is annotation sitting beside it. Fail: the approval decision depends on reading the model's summary of what it did.
8. Promotion is deterministic and environment-ordered. Pass: one artifact is promoted staging to production through a fixed pipeline with fixed ordering. Fail: the agent can pick a target environment from free-form text or inference.

Figure: HEXOPS original illustration inspired by the topic (not a copy of the source article imagery) · Credit / further reading: dev.to
Part 3 — Observability and recovery
9. Every action is reconstructable. Pass: an auditor can trace prompt, proposed plan, approving principal, and applied result for any change in under fifteen minutes. Fail: logs show a kubectl call with no originating request attached.
10. A kill switch exists outside the agent's reach. Pass: a human can freeze the agent's identity — revoke the credential, not edit the prompt — in a single action. Fail: disabling the agent requires a deploy, a code change, or the agent's cooperation.
11. Rollback is pre-built and rehearsed per action class. Pass: every permitted mutation has a documented inverse that has been exercised in a non-production environment this quarter. Fail: the recovery answer is restoring from backup and hoping the RPO holds.
12. Read and write modes are different modes. Pass: the default posture is read-only diagnostics; write access is opt-in per task, scoped, and expires automatically. Fail: there is one mode and it does everything.
Key takeaways
- The dominant AI risk in platform engineering is authorization, not hallucination. Models are usually doing exactly what the credentials allow.
- Plan and apply must be structurally different identities. Anything less turns your dry run into a rehearsal for the real thing.
- The raw diff is the review artifact. A model's summary is commentary, never evidence.
- Guardrails belong in the platform layer as code, with a kill switch a human can pull without touching the agent.
Next steps
- Inventory every agent, script, and automation with a credential that reaches production, and record its owner.
- Rank those identities by blast radius, not by how recently they were built.
- Convert the top three to short-lived, environment-scoped credentials this sprint.
- Add a blocking policy gate on the highest-risk repository before adding any new agent capability.
- Run a rollback rehearsal for one action class per quarter and write down the result.
Sources
Further reading: Adding AI Guardrails to Platform Engineering (Without Letting Agents Touch Prod State)



