For years, developer-first security meant building around one person: the engineer at the keyboard. We gave them paved roads, sensible defaults, and fast feedback in the IDE. Netflix was an early advocate of that model. That gets harder when much of the code is written by an AI agent. If a coding agent does most of the typing, who is the “developer” you are designing guardrails for?
I put that question to Dhivya Chandramouleeswaran on a recent episode of Scale To Zero. Dhivya is an engineering manager at AWS, where she leads a team of defensive and offensive engineers who secure AI products, and an AI safety research fellow at Heron AI Security. Her answer was refreshingly practical: you design for both, but the paved path looks different for each.
The Agent Still Starts With a Human
Dhivya acknowledged the philosophical side first, the “who built it, who owns it” question. But she was clear about where intent comes from today:
“An AI agent cannot operate in a vacuum. It needs to start with an intent, it needs to start with a goal, and that right now is provided by humans.”
So the human does not disappear from the picture. Their job shifts. Instead of writing every line, they set the goal, the constraints, and the definition of done, and then verify the result. That verification step matters because AI-generated code carries real security risks, and our checklist on whether AI-generated code is safe to ship covers what to look at before it reaches production.
Two Paved Paths, Not One
“We need to design for both. But the guardrails and the paved path would look different for a human and for an AI agent.”
For the Human: System Design and Context
For people, Dhivya described the paved path as mostly knowledge and instructions. Can the engineer explain the system design in detail, “down to the atoms of it”? Do they know the tech stack and design choices their organization expects, and do they have those resources ready to hand to the agent?
Her examples were the kind of rules every team already has in its head: don’t build a Flask application without a certain set of controls, or only build a React application within these guardrails. The human’s paved path is making sure that knowledge is written down and passed on.
For the Agent: Guardrails and Test Cases
For the agent runtime, the paved path is concrete: guardrails that let it follow those instructions, and tests that let humans check it did. Tactically, Dhivya pointed to test cases, regression systems, and production suites that exercise the different functions and use cases of the finished product.
In plain terms, a regression suite is a set of tests you rerun after every change to make sure nothing that used to work has broken. With an agent producing changes quickly, that suite becomes your safety net. For how this fits into everyday engineering, see Shift-Left Security in Practice.
Tell the Agent What Good Looks Like
One of the most useful points in the conversation was about how to phrase guardrails for an agent. Dhivya referenced studies on how agents respond to paved paths:
“A list full of thou shalt not do this, thou shall not do that, is less effective than giving it very specific prescriptive instructions.”
Her advice is to describe how something should be built, or what the final result should look like, rather than piling up prohibitions.
Give It the Right Context Up Front
She listed what that context can include:
- Approved code packages the agent can use
- Previous coding samples, ideally reflecting how your company has produced code before
- Your design patterns
- Product-specific requirements, such as the authorization model a product must follow
Her authorization example was a good one: tell the agent explicitly that it shall use three-legged OAuth for this product. (Three-legged OAuth is the flow where a user approves an app’s access to their data through an identity provider, rather than the app handling their credentials.) Dhivya’s view was that guidance like this should be blanket and easy to implement.
Our addition: a quick way to test your instructions is to read each line and ask whether it describes a target or only a boundary. “Use the shared auth middleware for every route” gives the agent a target. “Don’t write insecure auth” does not.
Instruction files are also an attack surface. Our post on how a text file in your Downloads folder can hijack an AI coding agent shows why you should control where those instructions come from.
How Do You Evaluate Design Decisions an Agent Makes?
Unit tests catch broken functions. They are less helpful for architecture. When I asked how to put evaluations around system design, Dhivya tied the answer to three things: the velocity of the team, its budget, and how many interrupts the development process can tolerate.
Option 1: Get It Right the First Time
Teams that are moving very fast can invest up front: steering documents, the right packages, the right context, and the right access. With that in place, the agent can work without a human interrupting it midway, and the regression tests catch what slips through.
Option 2: Add a Human Checkpoint Between Plan and Act
For critical work, Dhivya recommended separating planning from doing. Many coding agents support a “plan” mode, where the agent proposes an approach without changing code, and an “act” mode, where it carries the plan out.
Her flow looks like this:
- Ask the agent to brainstorm a system design for your end goal and iterate on it together.
- A human verifies the design matches the spec they had in mind.
- Switch to act mode and let the agent follow through, with guardrails and regression tests in place.
Match Supervision to Impact
Which option fits depends on what you are building. If a product affects many customers, is a critical resource, and needs auditability and “absolute correctness,” Dhivya said that is where you can afford, and should accept, more interrupts.
“You have different ways of turning the knob on how supervised you want the agents to be.”
If you are deciding how to roll these controls out to a team, Rolling Out Code Security to Your Development Team covers roles, gates, and adoption.
Quick Reference: Paved Path Checklist for Coding Agents
- Write down the human context. Tech stack, design choices, and non-negotiables your team expects.
- Give the agent prescriptive instructions. Describe the target state, not just a list of don’ts.
- Provide approved packages and code samples. Point the agent at how your company already builds things.
- State product-specific security requirements. For example, the exact authorization flow to use.
- Keep regression and production test suites current. They are how you verify agent output at speed.
- Use plan mode, then act mode, for critical systems. Put a human review on the design before implementation.
- Tune supervision to impact. More checkpoints for high-impact or customer-facing work, fewer for low-risk changes.
- Keep accountability with the human. Whoever sets the intent owns the result. (On the episode, I noted the early “the AI wrote it, not me” attitude is fading, and Dhivya’s framing supports that.)
Closing Takeaway
The question “who is the developer?” has a practical answer: both. The human brings intent, design, and organizational context. The agent needs that context turned into prescriptive instructions, guardrails, and tests. Get those two paved paths right and you can decide, product by product, how tightly to supervise the agent.
If you are thinking about how this fits with code scanning and cloud posture in your own environment, this is the kind of problem we spend a lot of time on at Cloudanix, and we are always happy to compare notes.
Listen to the Full Episode
We also covered securing autonomous agents, threat modeling, trusting AI findings, and AI purple teaming.
Give it a listen, and if you have a question you want answered on a future episode, send it our way.
People Also Read
- How to Secure Autonomous AI Agents: Identity, Sandboxing, and Tool-Call Logging
- Human in the Loop for AI Agents: When Approvals Help and When They Become a Yes Button
- Is AI-Generated Code Safe to Ship? What to Check Before Cursor and GPT Output Reaches Production
- Shift-Left Security in Practice: How DevSecOps Teams Ship Faster Without Risk
- A Text File in Your Downloads Folder Can Hijack Your AI Coding Agent