惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
V
Vulnerabilities – Threatpost
A
Arctic Wolf
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
Hugging Face - Blog
Hugging Face - Blog
H
Hacker News: Front Page
D
Docker
人人都是产品经理
人人都是产品经理
Attack and Defense Labs
Attack and Defense Labs
Forbes - Security
Forbes - Security
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
aimingoo的专栏
aimingoo的专栏
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Simon Willison's Weblog
Simon Willison's Weblog
腾讯CDC
WordPress大学
WordPress大学
T
Tenable Blog
P
Proofpoint News Feed
月光博客
月光博客
T
Tor Project blog
The Cloudflare Blog
罗磊的独立博客
S
Secure Thoughts
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The Hacker News
The Hacker News
P
Palo Alto Networks Blog
I
Intezer
小众软件
小众软件
N
News | PayPal Newsroom
V
Visual Studio Blog
L
LINUX DO - 最新话题
W
WeLiveSecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Troy Hunt's Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园_首页
D
DataBreaches.Net
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security Affairs
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
阮一峰的网络日志
阮一峰的网络日志

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
The Anatomy of an Action Governance Layer: From Intent to Enforcement
Fuzentry™ · 2026-05-07 · via DEV Community

Picking Up Where We Left Off

In Part 1, we established why post-execution safety fails and why pre-execution gates are an architectural necessity for AI systems that take real-world actions. Now we're going deeper: what does the internal structure of an action governance layer actually look like?

This isn't about specific tools or frameworks. This is about the structural components any team needs to implement if they want deterministic, auditable action governance.

The Four Components of Action Governance

An action governance layer has four distinct components that operate in sequence. Skip any one of them and you'll end up with gaps that compound under production load.

┌──────────────────────────────────────────────────────────┐
│            Action Governance Layer                         │
│                                                           │
│  ┌─────────┐  ┌──────────┐  ┌─────────┐  ┌───────────┐ │
│  │ Action  │→ │ Policy   │→ │ Decision│→ │ Execution │ │
│  │ Intake  │  │ Resolver │  │ Engine  │  │ Boundary  │ │
│  └─────────┘  └──────────┘  └─────────┘  └───────────┘ │
│                                                           │
└──────────────────────────────────────────────────────────┘

Enter fullscreen mode Exit fullscreen mode

Let's break each one down.


Component 1: Action Intake — Normalizing Intent

Before you can evaluate an action, you need a consistent representation of what the system intends to do. Raw LLM output isn't that. Tool calls aren't that. You need a normalized action intent structure.

The action intake component transforms whatever your upstream system produces into a standardized format your governance layer can evaluate.

class ActionIntent:
    """
    Normalized representation of what the system wants to do.
    This is the CONTRACT between your AI system and your
    governance layer.
    """

    def __init__(self):
        self.action_type = None       # category of action (read, write, delete, communicate)
        self.target_resource = None    # what system/data is being acted upon
        self.requesting_context = None # who/what initiated this action
        self.parameters = {}           # action-specific details
        self.timestamp = None          # when this intent was resolved
        self.trace_id = None           # correlation back to original request


def normalize_intent(raw_action, source_context):
    """
    Transform raw system output into evaluable intent.

    This normalization is critical because:
    1. Different upstream systems produce different formats
    2. Policy evaluation needs consistent structure
    3. Audit trails require standardized records
    """
    intent = ActionIntent()

    # Classify what TYPE of action this is
    # (not the specific API call, but the semantic category)
    intent.action_type = classify_action_semantics(raw_action)

    # Identify WHAT is being acted upon
    # (the resource, not the endpoint)
    intent.target_resource = resolve_target(raw_action)

    # Capture WHO/WHAT is asking for this
    # (user context, session state, permission scope)
    intent.requesting_context = source_context

    # Preserve action-specific details for policy evaluation
    intent.parameters = extract_evaluable_params(raw_action)

    return intent

Enter fullscreen mode Exit fullscreen mode

Why this matters: Without normalization, your policies must understand every possible format your AI system might produce. That creates brittle coupling between your LLM layer and your governance layer. When you change models or add new tool integrations, your policies break.

With normalization, policies evaluate against a stable contract regardless of what's upstream.

Component 2: Policy Resolver — Finding What Applies

Not every policy applies to every action. A policy resolver determines which policies are relevant given the specific action intent and its context.

This is where most teams make their first architectural mistake: they evaluate ALL policies against every action. At scale, this creates latency problems. More critically, it creates maintenance problems — when policies conflict, you need clear precedence rules.

class PolicyResolver:
    """
    Determines which policies apply to a given action intent.

    Key design decision: policies are resolved based on
    action properties, not hardcoded to specific endpoints
    or tool names. This makes the system resilient to
    upstream changes.
    """

    def resolve(self, intent, governance_context):
        """
        Returns ordered list of applicable policies.
        Order matters — first deny wins, constraints accumulate.
        """
        applicable = []

        # Layer 1: Universal policies (always apply)
        # Example: "no action during maintenance window"
        applicable.extend(
            self.get_universal_policies(governance_context)
        )

        # Layer 2: Resource-specific policies
        # Example: "PHI access requires active consent record"
        applicable.extend(
            self.get_resource_policies(intent.target_resource)
        )

        # Layer 3: Action-type policies
        # Example: "delete actions require elevated context"
        applicable.extend(
            self.get_action_type_policies(intent.action_type)
        )

        # Layer 4: Context-specific policies
        # Example: "after-hours actions limited to read-only"
        applicable.extend(
            self.get_contextual_policies(intent.requesting_context)
        )

        # Sort by precedence — deny policies evaluate first
        return self.order_by_precedence(applicable)

Enter fullscreen mode Exit fullscreen mode

The layered resolution pattern ensures that broad organizational policies (Layer 1) always apply, while specific resource and contextual policies add granularity. This mirrors how compliance actually works in regulated environments — there are baseline rules everyone follows, plus specific rules for specific situations.

Component 3: Decision Engine — Deterministic Evaluation

The decision engine takes the normalized intent and resolved policies, then produces a structured decision. This is the core of your governance layer, and it MUST be deterministic.

class DecisionEngine:
    """
    Evaluates action intent against applicable policies.

    CRITICAL PROPERTY: Given the same intent and policy set,
    this engine MUST produce the same decision every time.
    No randomness. No probabilistic inference. No LLM calls.

    Why? Because governance decisions need to be:
    - Reproducible (for audit)
    - Explainable (for users and regulators)
    - Testable (for CI/CD)
    """

    def evaluate(self, intent, policies, context):
        decision_trace = []  # Record every evaluation step
        accumulated_constraints = []

        for policy in policies:
            # Each policy evaluates independently
            result = policy.evaluate(intent, context)

            # Record this evaluation for audit trail
            decision_trace.append(PolicyEvaluation(
                policy_id=policy.id,
                policy_version=policy.version,
                input_hash=hash(intent, context),
                result=result
            ))

            # First DENY wins — stop evaluation
            if result.outcome == "deny":
                return GateDecision(
                    outcome="deny",
                    triggering_policy=policy.id,
                    reasoning=result.explanation,
                    trace=decision_trace,
                    escalation=result.escalation_path
                )

            # DEFER pauses evaluation for human review
            if result.outcome == "defer":
                return GateDecision(
                    outcome="defer",
                    triggering_policy=policy.id,
                    reasoning=result.explanation,
                    trace=decision_trace,
                    review_context=result.review_payload
                )

            # ALLOW may carry constraints
            if result.constraints:
                accumulated_constraints.extend(result.constraints)

        # All policies passed — action is allowed with constraints
        return GateDecision(
            outcome="allow",
            constraints=merge_constraints(accumulated_constraints),
            trace=decision_trace
        )

Enter fullscreen mode Exit fullscreen mode

Key design decision: First-deny-wins. This is intentional. In governance, a single applicable policy that says "no" should override any number of policies that say "yes." This matches how regulatory compliance works — you need ALL applicable rules to pass, not a majority vote.


Component 4: Execution Boundary — The Actual Enforcement Point

The execution boundary is where the decision becomes enforcement. This is the physical point in your architecture where allowed actions proceed and denied actions stop.

class ExecutionBoundary:
    """
    The enforcement point. Nothing passes without a decision.

    This component has ONE job: enforce the gate decision.
    It does not evaluate. It does not interpret. It enforces.

    Architectural constraint: there must be NO path from
    intent to execution that bypasses this boundary.
    """

    def enforce(self, intent, decision, action_executor):
        # Record enforcement event (regardless of outcome)
        audit_record = self.create_audit_record(intent, decision)

        if decision.outcome == "deny":
            # Action stops here. Period.
            self.emit_denial_event(intent, decision)
            self.store_audit(audit_record)
            return RefusalResponse(
                reason=decision.reasoning,
                policy=decision.triggering_policy,
                trace_id=intent.trace_id
            )

        if decision.outcome == "defer":
            # Action queued for human review
            self.emit_deferral_event(intent, decision)
            self.queue_for_review(intent, decision)
            self.store_audit(audit_record)
            return DeferralResponse(
                reason=decision.reasoning,
                review_id=generate_review_id(),
                trace_id=intent.trace_id
            )

        if decision.outcome == "allow":
            # Execute with constraints applied
            constrained_action = apply_constraints(
                intent, decision.constraints
            )
            result = action_executor.execute(constrained_action)

            # Record successful execution
            audit_record.execution_result = result
            self.store_audit(audit_record)
            return result

Enter fullscreen mode Exit fullscreen mode

Why separate enforcement from evaluation? Because they have different failure modes. If your decision engine has a bug, you want to fix evaluation logic without touching execution paths. If your execution boundary has a latency issue, you want to optimize enforcement without risking policy logic changes.

Separation of concerns isn't just clean architecture — it's operational safety.

The Audit Trail: Your Regulatory Lifeline

Every component above produces audit data. When a regulator asks "why did your system do X?" or "why did your system refuse Y?", your answer is the complete decision trace:

  • What action was intended (normalized intent)
  • Which policies applied (resolver output)
  • How each policy evaluated (decision trace)
  • What enforcement action was taken (boundary record)
  • What constraints were applied (if allowed)

This isn't optional logging. This is the architectural proof that your system has governance.

class GovernanceAuditRecord:
    """
    Complete record of a governance decision.

    This record must be:
    - Immutable (no post-hoc modification)
    - Complete (captures full decision context)
    - Queryable (supports compliance reporting)
    - Tamper-evident (hash chain or similar)
    """

    trace_id: str                  # Correlation to original request
    timestamp: datetime            # When decision was made
    intent: ActionIntent           # What was attempted
    resolved_policies: list        # What policies applied
    decision_trace: list           # How each policy evaluated
    final_decision: GateDecision   # The outcome
    enforcement_action: str        # What happened at boundary
    execution_result: any          # Result (if allowed)

Enter fullscreen mode Exit fullscreen mode

Common Implementation Mistakes

Having seen teams attempt this pattern, here are the pitfalls:

Mistake 1: Putting policy logic in the LLM prompt. Your system prompt is not a governance layer. It's a suggestion to a probabilistic system. Policies must be externalized and deterministically evaluated.

Mistake 2: Using the LLM to evaluate its own actions. If you're asking GPT-4 whether GPT-4's proposed action is safe, you've built a system that can talk itself into anything. Gate evaluation must be independent of action generation.

Mistake 3: Building the gate as an afterthought. If your system already executes actions and you're trying to bolt on governance, you'll discover bypass paths everywhere. Pre-execution gates work best when designed into the architecture from the start.

Mistake 4: Ignoring the "defer" outcome. Allow/deny is easy. Defer — "this action needs a human to decide" — is where real governance lives. Without escalation paths, your gate will either be too permissive or too restrictive.


Tradeoffs at This Layer

Policy maintenance is ongoing work. Policies aren't "set and forget." As your system's capabilities expand, policies need to expand with them. Budget for policy engineering as a continuous activity.

Testing governance is different from testing features. You need adversarial testing — "can I construct an intent that bypasses policy X?" This requires a different testing mindset than functional testing.

Performance at scale. With thousands of actions per minute, gate evaluation latency matters. Policy resolution needs caching strategies. Decision engines need optimization. Plan for this from the architecture phase.

What's Next

Part 3 dives into refusal infrastructure — how to architect principled refusal as a first-class system behavior, not an error state. When your gate says "no," what happens next determines whether your system is governable or just filtered.

These patterns represent educational architectural concepts. Production implementations require domain-specific policy design, performance optimization, and integration considerations unique to each deployment context.

Designing action governance for AI systems in regulated environments? We've shipped this architecture across healthcare, finance, and enterprise. Connect with us at Tailored Techworks on LinkedIn — we talk architecture, not marketing.