In the first two posts, I discussed two different execution models for Agentic Systems and why guardrails are much broader than AI safety.
The obvious next question is:
How do we actually implement guardrails?
The answer depends entirely on who controls execution.
If your framework controls execution (LangGraph, Semantic Kernel, AutoGen, OpenHands and similar frameworks), many guardrails can be implemented as executable code.
If the LLM controls execution (many GitHub Copilot + VS Code agent workflows, BMAD-style frameworks, prompt-based agents), the implementation strategy is very different.
This is where many teams struggle.
They keep adding more instructions to agent prompts and expect deterministic behavior.
Unfortunately, longer prompts do not create stronger guardrails.
Instead, think of guardrails as layers.
Layer 1 — Prompt Guardrails
These are the instructions placed inside agent definitions, skills or shared context.
Examples:
Never assume missing requirements.
Ask clarification questions when ambiguity exists.
Explain architectural decisions.
Generate unit tests alongside production code.
Apply SOLID principles.
Prefer composition over inheritance.
Avoid duplicate implementations.
Keep components focused on a single responsibility.
These improve behavior but are not enforcement.
The LLM can still ignore them.
Layer 2 — Shared Engineering Guardrails
Avoid repeating the same engineering standards in every agent.
Instead, maintain a single reusable Engineering Guardrails document that every implementation agent receives.
Examples include:
Architecture principles
UI development standards
Backend coding standards
API standards
Security standards
Testing standards
Performance standards
Accessibility standards
Observability standards
Every Developer Agent, UI Agent, Backend Agent and Reviewer Agent should inherit the same engineering standards instead of maintaining their own copies.
Layer 3 — Workflow Guardrails
Rather than asking one agent to do everything, distribute responsibility.
A typical workflow could become:
Requirements Agent
↓
Architecture Agent
↓
Implementation Agent
↓
Security Reviewer
↓
Code Reviewer
↓
QA Reviewer
↓
Merge
Each agent validates the previous output before work continues.
Even if every review is still performed by an LLM, separating responsibilities generally produces better results than one monolithic "Developer Agent."
Layer 4 — External Validation
This is the layer many prompt-based frameworks are missing.
Never rely solely on the LLM to verify its own work.
Validate outputs using deterministic tools.
Examples:
Build succeeds
Lint passes
Unit tests execute
Static analysis passes
Dependency vulnerabilities checked
API contracts validated
Architecture rules validated
Secret scanning completed
Unlike prompt instructions, these checks cannot be ignored by the model.
Layer 5 — Human Approval
Not every decision should be automated.
Examples requiring human approval may include:
Architecture changes
Database schema changes
Production deployments
Security-sensitive modifications
Changes affecting multiple repositories
Human approval is also a guardrail.
Layer 6 — Continuous Review
Agentic SDLC should not end when code is generated.
Continuously evaluate:
Is the architecture becoming more coupled?
Is technical debt increasing?
Are components growing too large?
Are tests keeping pace with development?
Is duplicate code increasing?
Are security findings increasing?
Is maintainability improving or degrading?
Guardrails should evolve with the codebase.
One observation from experimenting with BMAD-style workflows is that the biggest improvement doesn't come from writing larger prompts.
It comes from moving responsibility away from a single "smart agent" and toward a combination of:
Shared engineering guardrails
Specialized review agents
Deterministic validation tools
Human approval where appropriate
The future of AI-native SDLC is unlikely to be about building ever-smarter agents.
It is more likely to be about building systems where agents operate within well-designed guardrails and every important decision can be independently validated.
That's what will make AI-assisted software engineering predictable, maintainable and production-ready.
Comments
Post a Comment