<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Douglas Walseth</title>
    <description>The latest articles on DEV Community by Douglas Walseth (@douglasrw).</description>
    <link>https://dev.to/douglasrw</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3830187%2F4a2f19ff-f874-4388-9647-854bd1e1898e.jpeg</url>
      <title>DEV Community: Douglas Walseth</title>
      <link>https://dev.to/douglasrw</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/douglasrw"/>
    <language>en</language>
    <item>
      <title>RSA 2026: The AI Governance Gap Nobody Is Talking About</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 07:46:21 +0000</pubDate>
      <link>https://dev.to/douglasrw/rsa-2026-the-ai-governance-gap-nobody-is-talking-about-28ja</link>
      <guid>https://dev.to/douglasrw/rsa-2026-the-ai-governance-gap-nobody-is-talking-about-28ja</guid>
      <description>&lt;p&gt;RSA Conference 2026 starts March 23. Every security vendor will announce AI agent governance.&lt;/p&gt;

&lt;p&gt;CrowdStrike just acquired SGNL for $740M. Okta announced "Okta for AI Agents" (GA April 30). Singulr, Lasso, Arthur AI, and Patronus are all pitching runtime detection. The AI governance market is officially hot.&lt;/p&gt;

&lt;p&gt;But nobody is talking about the gap that matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Identity Plane vs. The Behavioral Plane
&lt;/h2&gt;

&lt;p&gt;Okta's announcement is significant. They're extending enterprise IAM to treat AI agents as non-human identities — discovery, credential vaulting, universal logout, governance workflows. The stats they cite are real: 88% of orgs report AI agent security incidents, only 22% manage agents as identity-bearing entities.&lt;/p&gt;

&lt;p&gt;CrowdStrike's SGNL acquisition adds policy-based access governance to their security platform.&lt;/p&gt;

&lt;p&gt;Both are solving the &lt;strong&gt;identity plane&lt;/strong&gt;: Who are your agents? What can they access? What credentials do they hold?&lt;/p&gt;

&lt;p&gt;This is necessary. It is not sufficient.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happens After Authentication?
&lt;/h2&gt;

&lt;p&gt;Once an agent is authenticated, credentialed, and authorized — what governs &lt;em&gt;what it actually does&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;Consider: Your AI coding agent has the right credentials, the right permissions, and passes every identity check. Then it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forgets a critical rule because the context window compressed it away&lt;/li&gt;
&lt;li&gt;Generates code that passes tests but introduces a subtle security vulnerability
&lt;/li&gt;
&lt;li&gt;Makes the same class of mistake it made last week, because no one encoded the fix&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Identity governance cannot prevent these. They are &lt;strong&gt;behavioral&lt;/strong&gt; problems — structural issues with how agents process context, retain rules, and learn from failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Detection Ceiling
&lt;/h2&gt;

&lt;p&gt;Every vendor at RSA 2026 selling AI governance will demo the same thing: runtime detection. An agent does something bad, the system catches it, an alert fires.&lt;/p&gt;

&lt;p&gt;The problem with detection-based governance is mathematical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alert volume grows linearly with agent count&lt;/li&gt;
&lt;li&gt;The same class of violation can recur every day&lt;/li&gt;
&lt;li&gt;Governance teams become alert-processing bottlenecks&lt;/li&gt;
&lt;li&gt;Compliance evidence is a snapshot, not a guarantee&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After 12 months of detection-based governance, you have the same violations. You just get faster alerts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Alternative: Prevent by Construction
&lt;/h2&gt;

&lt;p&gt;What if the system structurally prevented violation classes from recurring?&lt;/p&gt;

&lt;p&gt;The enforcement ladder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;L2 (Prose):&lt;/strong&gt; A rule in documentation. Humans must remember it. This is where most governance "frameworks" stop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L3 (Template):&lt;/strong&gt; The rule is embedded in code templates. New code starts correct by default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L4 (Test):&lt;/strong&gt; The rule is checked automatically. Violations fail CI. No human needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L5 (Hook):&lt;/strong&gt; The rule is enforced at the system level. The violation literally cannot occur.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each level up requires zero additional human awareness. L5 enforcement means the lesson is permanent and compounding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Numbers
&lt;/h2&gt;

&lt;p&gt;We run this system in production:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3,700+ violations&lt;/strong&gt; processed through the enforcement ladder&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&amp;lt;5% regression rate&lt;/strong&gt; — once encoded at L4+, violation classes almost never recur&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;250+ specs&lt;/strong&gt; executed by AI agents under structural enforcement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero governance team&lt;/strong&gt; — the system governs itself&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to Ask at RSA
&lt;/h2&gt;

&lt;p&gt;When vendors pitch you AI governance this week:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;"When you detect a violation, what prevents the same class from recurring?" If the answer involves humans or dashboards — you're buying detection.&lt;/li&gt;
&lt;li&gt;"After 12 months, will we have more or fewer alerts?" If "more, because more agents" — governance scales linearly with your problem.&lt;/li&gt;
&lt;li&gt;"Does the system learn from violations structurally?" If "we update our models" — they improve detection, not governance.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Real Gap
&lt;/h2&gt;

&lt;p&gt;The companies that win the AI agent era will not have the best monitoring dashboards. They will have systems that get better every week without human intervention.&lt;/p&gt;

&lt;p&gt;Identity governance (Okta, CrowdStrike) + behavioral enforcement (structural prevention) = complete AI agent governance. Either alone is incomplete.&lt;/p&gt;

&lt;p&gt;RSA 2026 will be full of announcements about the identity side. The behavioral side — preventing violations structurally rather than detecting them — is the gap nobody is talking about.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Free governance scanner for any public repo: &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;walseth.ai/scan&lt;/a&gt;. 30 seconds, no signup.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;RSA 2026 AI Governance Hub with all vendor comparisons: &lt;a href="https://walseth.ai/rsa-2026" rel="noopener noreferrer"&gt;walseth.ai/rsa-2026&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>devops</category>
      <category>governance</category>
    </item>
    <item>
      <title>Structural Enforcement vs Singulr AI: Runtime Governance Compared</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 05:10:22 +0000</pubDate>
      <link>https://dev.to/douglasrw/structural-enforcement-vs-singulr-ai-runtime-governance-compared-43h0</link>
      <guid>https://dev.to/douglasrw/structural-enforcement-vs-singulr-ai-runtime-governance-compared-43h0</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Singulr AI and structural enforcement both aim to solve the same problem: making AI agents trustworthy in production. They take fundamentally different approaches. Singulr operates at runtime, detecting and responding to violations as they occur. Structural enforcement operates at the system level, making classes of violations impossible by construction.&lt;/p&gt;

&lt;p&gt;This is not a question of which product is better. It is a question of which architecture matches your needs: continuous monitoring or permanent prevention.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Singulr AI Works
&lt;/h2&gt;

&lt;p&gt;Singulr AI launched Agent Pulse in March 2026, positioning it as "enforceable runtime governance and visibility for AI agents." The platform provides:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agent Discovery:&lt;/strong&gt; Singulr maps a context graph of tool connections, data access, MCP servers, and permissions across your AI agent ecosystem. This gives visibility into what agents exist and what they can access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Risk Scoring:&lt;/strong&gt; The Singulr Trust Feed combines AI red-teaming with risk scoring aligned to agent type, data sensitivity, and scope. This identifies which agents pose the highest governance risk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Runtime Controls:&lt;/strong&gt; Policy enforcement against unauthorized access and prompt injection, applied at runtime. Integrations cover Copilot Studio, AWS Bedrock, Azure Foundry, GCP Vertex AI, Databricks, ServiceNow, CrewAI, LangGraph, and OpenTelemetry.&lt;/p&gt;

&lt;p&gt;The strength of this approach is breadth. Singulr covers a wide range of agent frameworks and cloud platforms with a consistent governance layer. For organizations with diverse agent deployments, this visibility is genuinely valuable.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Structural Enforcement Works
&lt;/h2&gt;

&lt;p&gt;The prevent-by-construction methodology is built on the &lt;a href="https://dev.to/blog/convergence-enforcement"&gt;enforcement ladder&lt;/a&gt; -- five levels from ephemeral conversation rules (L1) to permanent pre-commit hooks (L5). The core principle: every lesson learned from a violation must be encoded at the highest possible enforcement level.&lt;/p&gt;

&lt;p&gt;When a violation is detected, the response is not an alert. It is a structural change that makes the class of violation impossible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;L3 (Template):&lt;/strong&gt; New code starts correct by default because templates embed the rule.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L4 (Test):&lt;/strong&gt; CI fails if the rule is violated. No human review needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L5 (Hook):&lt;/strong&gt; The violation is blocked at commit time. It literally cannot enter the codebase.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In production, this approach has processed &lt;a href="https://dev.to/blog/why-detection-based-ai-governance-fails"&gt;3,700+ violations with less than 5% regression rate&lt;/a&gt; on enforced code paths. The system improves permanently with each violation -- alert volume decreases over time instead of growing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Differences
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Singulr AI&lt;/th&gt;
&lt;th&gt;Structural Enforcement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Enforcement model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Runtime detection and response&lt;/td&gt;
&lt;td&gt;Prevent-by-construction (hooks, tests, templates)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Violation recurrence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Same violation class can recur indefinitely&lt;/td&gt;
&lt;td&gt;Each violation class is eliminated permanently&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Self-improvement&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No automated learning loop&lt;/td&gt;
&lt;td&gt;GEPA cycle + convergence encoding compound over time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Alert trajectory&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Alert volume grows with agent scale&lt;/td&gt;
&lt;td&gt;Alert volume decreases as lessons compound&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compliance evidence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Point-in-time monitoring snapshots&lt;/td&gt;
&lt;td&gt;Structural proof that violation classes are impossible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SaaS platform with agent framework integrations&lt;/td&gt;
&lt;td&gt;Embedded in development workflow (CI/CD, pre-commit)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Integration breadth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10+ agent frameworks and cloud platforms&lt;/td&gt;
&lt;td&gt;Framework-agnostic (operates at code and commit level)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  When to Choose Each
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Choose Singulr AI when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have agents deployed across many frameworks and need unified visibility&lt;/li&gt;
&lt;li&gt;Your primary concern is discovering what agents exist and what they access&lt;/li&gt;
&lt;li&gt;You need runtime protection against external threats like prompt injection&lt;/li&gt;
&lt;li&gt;Your organization prefers SaaS platforms with vendor support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose structural enforcement when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want violations to stop recurring, not just be detected faster&lt;/li&gt;
&lt;li&gt;Your governance team is drowning in alerts and needs volume to decrease&lt;/li&gt;
&lt;li&gt;You need compliance evidence that is structural, not snapshot-based&lt;/li&gt;
&lt;li&gt;You are willing to invest in embedding governance into your development workflow&lt;/li&gt;
&lt;li&gt;You want a system that &lt;a href="https://dev.to/blog/ai-governance-that-learns"&gt;gets better autonomously&lt;/a&gt; with each violation processed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Consider both when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runtime detection catches the immediate threat while structural enforcement prevents the class. These are complementary architectures. Singulr tells you what happened. Structural enforcement ensures it cannot happen again.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;The difference between detection and prevention is measurable. Run a free context engineering scan on your repository to see your current enforcement posture -- how many of your governance rules are structural (L4/L5) versus prose (L1/L2).&lt;/p&gt;

&lt;p&gt;See what structural enforcement finds that runtime monitoring misses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/scan"&gt;Run the free scan at walseth.ai/scan&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Competitor information sourced from public product documentation and announcements as of March 2026. We aim for accuracy -- if anything here is incorrect, contact us and we will update it.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://walseth.ai/blog/structural-enforcement-vs-singulr" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>comparison</category>
      <category>singulr</category>
      <category>aigovernance</category>
      <category>ai</category>
    </item>
    <item>
      <title>Your Next AI Agent Should Cost $0 to Train</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 05:10:20 +0000</pubDate>
      <link>https://dev.to/douglasrw/your-next-ai-agent-should-cost-0-to-train-5ei0</link>
      <guid>https://dev.to/douglasrw/your-next-ai-agent-should-cost-0-to-train-5ei0</guid>
      <description>&lt;p&gt;&lt;em&gt;Fine-tuned domain agents on consumer hardware. The economics just changed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The consulting pitch for custom AI agents used to start at $50,000. GPU cloud rental, data labeling, ML engineering time -- the cost structure assumed enterprise budgets. If you were a 5-person startup with a $10M seed round, custom AI was not in your budget.&lt;/p&gt;

&lt;p&gt;Two developments collapsed this cost structure in early 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Zero-Compute Stack
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Unsloth + Qwen3.5-4B&lt;/strong&gt; dropped fine-tuning requirements to 5GB VRAM. That is a consumer laptop GPU. Unsloth's custom CUDA kernels deliver 2x training speedup with 70% less memory. Combined with Qwen3.5-4B -- a model with 256K context, 201 language support, and agentic coding optimization -- you can fine-tune a production-capable model on Google Colab's free tier.&lt;/p&gt;

&lt;p&gt;No cloud GPU rental. No ML infrastructure team. No $50,000 training budget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SCOTT and MIM-JEPA&lt;/strong&gt; solved the data problem. Traditional fine-tuning needs thousands of labeled examples. SCOTT's sparse convolutional tokenizer enables self-supervised training on datasets "orders of magnitude smaller than traditionally required." For domain-specific agents, this means your existing documentation, knowledge base, and past interactions are sufficient training data. No labeling pipeline needed.&lt;/p&gt;

&lt;p&gt;Together: zero compute cost, minimal data requirements, and a base model capable enough for domain Q&amp;amp;A, classification, and simple tool use.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Changes
&lt;/h2&gt;

&lt;p&gt;For post-seed startups running AI agents, the calculation flips. Instead of "can we afford custom AI?" the question becomes "can we afford NOT to customize?"&lt;/p&gt;

&lt;p&gt;Off-the-shelf models produce generic outputs that require constant human correction. Every time an engineer fixes a model's response to match your domain, that's a training example being wasted. With zero-cost fine-tuning, those corrections become training data that improves the model.&lt;/p&gt;

&lt;p&gt;The deliverable: a Qwen3.5-4B LoRA adapter trained on your domain data, running on your hardware, owned by you. No API dependency. No per-token billing. No vendor lock-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Missing Piece: Enforcement
&lt;/h2&gt;

&lt;p&gt;Fine-tuning solves domain knowledge. It does not solve reliability.&lt;/p&gt;

&lt;p&gt;A fine-tuned model that knows your domain terminology will still hallucinate. It will still violate constraints that matter to your business. It will work in demos and fail in production in ways that are expensive to debug.&lt;/p&gt;

&lt;p&gt;This is where the enforcement ladder changes the equation. Layer structural constraints -- L4 automated tests, L5 pre-commit hooks -- on top of the fine-tuned model's outputs. Every response passes through domain-specific assertions before delivery. Violations are caught automatically, not discovered by users.&lt;/p&gt;

&lt;p&gt;The enforcement layer is not overhead -- it is what makes the fine-tuned model production-ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Not Just Use API Fine-Tuning?
&lt;/h2&gt;

&lt;p&gt;OpenAI, Anthropic, and Google all offer fine-tuning APIs. They work. But they come with trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Per-token billing.&lt;/strong&gt; Every inference call costs money. At scale, a domain-specific agent fielding hundreds of queries per day accumulates meaningful costs. A local model has zero marginal inference cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vendor lock-in.&lt;/strong&gt; Your fine-tuned weights live on their infrastructure. If pricing changes, you migrate or pay more. With a local LoRA adapter, you own the weights.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No enforcement layer.&lt;/strong&gt; API fine-tuning delivers a model. Not a model with structural quality guarantees. The gap between "fine-tuned" and "production-ready" is exactly the enforcement layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data residency.&lt;/strong&gt; For regulated industries, sending training data to third-party APIs raises compliance questions. Local fine-tuning keeps data on your infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;API fine-tuning is the right choice for teams that need frontier reasoning capabilities. Local fine-tuning with enforcement is the right choice for teams that need domain-specific reliability at predictable cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two-Week Engagement
&lt;/h2&gt;

&lt;p&gt;Here is what a zero-cost custom agent deployment looks like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 1:&lt;/strong&gt; Data preparation (convert existing docs to training format), fine-tuning (LoRA training on Colab), and initial enforcement layer (L4 tests for your domain rules).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 2:&lt;/strong&gt; Validation against your test scenarios, iteration on enforcement rules, handoff of model checkpoint + deployment guide + training notebook.&lt;/p&gt;

&lt;p&gt;What you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A fine-tuned model that understands your domain terminology and workflows&lt;/li&gt;
&lt;li&gt;An enforcement layer (L4 tests) that catches domain-specific failures automatically&lt;/li&gt;
&lt;li&gt;A reproducible Jupyter notebook so your team can retrain as data evolves&lt;/li&gt;
&lt;li&gt;A deployment guide for your target infrastructure (Colab, local GPU, or cloud)&lt;/li&gt;
&lt;li&gt;A performance report comparing base model vs. fine-tuned on your test scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What it costs: consulting time. The compute is free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who This Is For
&lt;/h2&gt;

&lt;p&gt;The ideal client is a post-seed startup (5-20 people, $5M-15M raised) running AI agents that produce generic outputs requiring constant human correction. They have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Domain-specific data (documentation, knowledge base, past interactions)&lt;/li&gt;
&lt;li&gt;Engineers spending time correcting model outputs instead of building product&lt;/li&gt;
&lt;li&gt;Budget for a proof-of-concept ($5K-10K) but not enterprise ML infrastructure ($50K+)&lt;/li&gt;
&lt;li&gt;A use case where domain knowledge matters more than general reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your agents need to understand your terminology, your workflows, and your constraints, a domain-tuned model with enforcement beats a generic frontier model without it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest Limitations
&lt;/h2&gt;

&lt;p&gt;A 4B parameter model has a ceiling. It will not match Claude or GPT-4 on complex multi-step reasoning. It excels at domain Q&amp;amp;A, classification, entity extraction, and simple tool use. If your use case requires sophisticated reasoning, you need a larger model or an API-based approach.&lt;/p&gt;

&lt;p&gt;The enforcement layer catches known failure modes. Novel edge cases require ongoing monitoring. The honest pitch: this is not magic. It is a practical, low-cost path from generic AI to domain-specific AI with production-grade quality gates.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://walseth.ai/blog/zero-cost-custom-agents" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>finetuning</category>
      <category>customagents</category>
      <category>unsloth</category>
      <category>devops</category>
    </item>
    <item>
      <title>Your Context Is Poisoned</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 02:49:39 +0000</pubDate>
      <link>https://dev.to/douglasrw/your-context-is-poisoned-3poc</link>
      <guid>https://dev.to/douglasrw/your-context-is-poisoned-3poc</guid>
      <description>&lt;p&gt;Lance Martin at LangChain published a framework for context engineering with four operations: Write, Select, Compress, and Isolate. Each operation has a failure mode. We mapped all four to real production data from our 6-agent autonomous system.&lt;/p&gt;

&lt;p&gt;The result: 4,768 violations detected. Every single one traces back to one of these four poisoned context patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure Mode 1: Stale Context (Write)
&lt;/h2&gt;

&lt;p&gt;Your agent's instructions were written three sprints ago. The API changed. The schema migrated. The agent keeps generating code against a version of reality that no longer exists.&lt;/p&gt;

&lt;p&gt;In our system, stale context is the most common violation category. Agent CLAUDE.md files reference file paths that have moved, cite constraints from specs that were superseded, and enforce patterns the codebase abandoned weeks ago.&lt;/p&gt;

&lt;p&gt;The fix is not better documentation. Documentation drifts by definition. The fix is &lt;a href="https://dev.to/blog/convergence-enforcement"&gt;structural enforcement&lt;/a&gt; -- L5 hooks that validate context freshness before the agent acts on it. When an instruction references a file path, the hook verifies the path exists. When a constraint cites a spec, the hook confirms the spec is still active.&lt;/p&gt;

&lt;p&gt;Detection tools tell you the context was stale after the agent shipped broken code. The prevent-by-construction approach is different: an L5 hook prevents the stale context from reaching the agent at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure Mode 2: Missing Context (Select)
&lt;/h2&gt;

&lt;p&gt;The agent has access to 200K tokens of context window. It selects 40K of conversation history, 20K of file contents, and zero bytes of the configuration that actually matters.&lt;/p&gt;

&lt;p&gt;We track this as "context gap" violations. The agent makes a decision that would have been correct if it had read the target repo's CLAUDE.md first. It didn't, because nothing forced it to. The context was available but not selected.&lt;/p&gt;

&lt;p&gt;Our enforcement ladder addresses this with mandatory context loading. Before a coder agent touches any repo, an L5 hook verifies it has read the repo's CLAUDE.md. Before an agent responds to an operator message, it must check its inbox. These are not suggestions -- they are automated gates that block execution until the required context is loaded.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure Mode 3: Bloated Context (Compress)
&lt;/h2&gt;

&lt;p&gt;Context windows are large. 200K tokens sounds infinite until your agent has read 40 files, run 80 commands, and accumulated 150K tokens of conversation history. At that point, compression kicks in. Earlier messages get summarized or dropped.&lt;/p&gt;

&lt;p&gt;What gets dropped first? The instructions at the top. The system prompt. The behavioral constraints.&lt;/p&gt;

&lt;p&gt;We measured this directly: agents averaged 12 rule violations per day after context compression events. They kept working confidently, generating output that violated the rules they could no longer see. This is the silent failure mode -- &lt;a href="https://dev.to/blog/ai-agent-forgets-rules-compaction-fix"&gt;your agent forgets its rules every 45 minutes&lt;/a&gt; and never tells you.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://dev.to/blog/ai-agent-forgets-rules-compaction-fix"&gt;pre-compaction memory flush&lt;/a&gt; hook solves this. At 150 tool calls, it writes critical context to persistent storage before compression hits. When the agent's context gets compressed, the knowledge survives on disk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure Mode 4: Leaking Context (Isolate)
&lt;/h2&gt;

&lt;p&gt;Multi-agent systems have a context isolation problem. Agent A's constraints leak into Agent B's context. Agent B's research pollutes Agent C's execution queue. Without isolation boundaries, agents influence each other in ways nobody intended.&lt;/p&gt;

&lt;p&gt;We run 6 agents with distinct roles: coder, CEO, oracle, communications. Each has its own memory, goals, and behavioral rules. Without isolation enforcement, the coder agent was picking up strategic directives meant for the CEO agent and making product decisions it had no authority to make.&lt;/p&gt;

&lt;p&gt;Isolation enforcement means each agent's context is structurally bounded. Cross-agent signals follow a defined routing protocol. The coder agent cannot read the CEO's mailbox. The oracle cannot modify the coder's priorities. These boundaries are enforced at the data access layer, not by asking agents to be careful.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;p&gt;From our production system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4,768&lt;/strong&gt; total violations detected across 6 agents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;18&lt;/strong&gt; violations promoted to structural enforcement (L3-L5)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;477:1&lt;/strong&gt; violation-to-promotion ratio -- the real measure of &lt;a href="https://dev.to/blog/the-477-to-1-problem"&gt;self-improvement velocity&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&amp;lt; 5%&lt;/strong&gt; regression rate on violations that received L5 enforcement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Detection finds violations. Enforcement makes them impossible. That is the difference between monitoring context health and engineering context health.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means for Your System
&lt;/h2&gt;

&lt;p&gt;If you are running AI agents in production -- coding assistants, research agents, autonomous workflows -- your context is poisoned in at least one of these four ways. You might not know it yet because the failure mode is silent: the agent keeps producing confident output from degraded context.&lt;/p&gt;

&lt;p&gt;The question is not whether your context is clean. The question is whether your system can detect and prevent context poisoning structurally, before the agent acts on it.&lt;/p&gt;

&lt;p&gt;Run a scan on your repo to see where your context engineering stands:&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://walseth.ai/blog/your-context-is-poisoned" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>productiondata</category>
    </item>
    <item>
      <title>Token Security Is an Innovation Sandbox Finalist. Here Is What That Means for AI Agent Governance.</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 02:49:34 +0000</pubDate>
      <link>https://dev.to/douglasrw/token-security-is-an-innovation-sandbox-finalist-here-is-what-that-means-for-ai-agent-governance-1m7e</link>
      <guid>https://dev.to/douglasrw/token-security-is-an-innovation-sandbox-finalist-here-is-what-that-means-for-ai-agent-governance-1m7e</guid>
      <description>&lt;h2&gt;
  
  
  The Innovation Sandbox Pick Nobody Expected
&lt;/h2&gt;

&lt;p&gt;RSAC 2026 selected Token Security as one of ten Innovation Sandbox finalists, presenting on Day 1 (March 23). The program has a strong track record -- previous winners include Wiz, Apiiro, and Abnormal Security, each worth billions today.&lt;/p&gt;

&lt;p&gt;Token Security is not a governance vendor in the traditional sense. They are building identity security purpose-built for non-human identities (NHIs) -- the AI agents, service accounts, API keys, and machine credentials that are rapidly outnumbering human users in enterprise infrastructure. Their thesis is straightforward: traditional IAM was designed for humans, and the explosion of AI agents requires a machine-first identity architecture.&lt;/p&gt;

&lt;p&gt;They raised $28M in Series A funding led by Notable Capital in January 2026, and their Innovation Sandbox selection puts them in front of the largest security audience of the year.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Token Security Actually Does
&lt;/h2&gt;

&lt;p&gt;Token Security's platform operates at the identity layer for AI agents and NHIs. Four core capabilities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Continuous NHI Discovery&lt;/strong&gt; -- Automatically finds AI agents and non-human identities across cloud infrastructure, mapping what exists and what it connects to&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contextual Identity Graph&lt;/strong&gt; -- Maps relationships between agents, services, resources, and permissions into a queryable graph structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission Drift Detection&lt;/strong&gt; -- Monitors when agent permissions deviate from their intended scope, catching privilege creep before it becomes a security incident&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intent-Based Access Controls&lt;/strong&gt; -- Grants and restricts access based on what agents are supposed to do, not just static role assignments&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;They also integrate with MCP servers, which gives them visibility into the agent toolchain layer -- what tools agents are using and what resources those tools access.&lt;/p&gt;

&lt;p&gt;Their content marketing leading into RSA has been notably aggressive: 10+ blog posts published in a single week, each targeting different segments of the NHI security narrative. This is sophisticated go-to-market execution that signals both marketing maturity and confidence in their Innovation Sandbox pitch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Question Token Security Answers -- And the One It Does Not
&lt;/h2&gt;

&lt;p&gt;Token Security answers a critical question: &lt;strong&gt;Who are your AI agents, and what can they access?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a real problem. Most organizations have no inventory of their non-human identities. AI agents spin up with credentials that nobody tracks. Permission sprawl happens silently. When a security team asks "which agents have access to production data?", there is usually no answer.&lt;/p&gt;

&lt;p&gt;Token Security provides that answer. Their identity graph and continuous discovery solve the visibility gap that makes NHI governance impossible. This is valuable and necessary work.&lt;/p&gt;

&lt;p&gt;But there is a second question that identity governance does not address: &lt;strong&gt;What will the agent do with that access, and how do you prevent violations?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An AI agent can be fully discovered in Token Security's identity graph, have correctly scoped permissions, pass every NHI compliance check -- and still produce outputs that violate compliance policies. It can still drift from its behavioral constraints. It can still introduce governance regressions in the codebase it modifies. Identity verification ensures the right agent has the right access. It does not ensure the agent uses that access correctly.&lt;/p&gt;

&lt;p&gt;This is the identity-behavioral gap. Token Security operates at the identity layer. Behavioral enforcement operates at the constraint layer. They are different problems requiring different architectures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identity Layer vs Behavioral Layer
&lt;/h2&gt;

&lt;p&gt;The distinction matters because the two layers prevent different failure modes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identity layer failures&lt;/strong&gt; (Token Security's domain):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unknown agents operating in production infrastructure&lt;/li&gt;
&lt;li&gt;Stale credentials with excessive permissions&lt;/li&gt;
&lt;li&gt;Permission sprawl across NHI populations&lt;/li&gt;
&lt;li&gt;No audit trail of which agents exist or what they connect to&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Behavioral layer failures&lt;/strong&gt; (Walseth AI's domain):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agents producing outputs that violate compliance policies&lt;/li&gt;
&lt;li&gt;Context drift where agent behavior diverges from intent&lt;/li&gt;
&lt;li&gt;Constraint regression when code changes weaken governance controls&lt;/li&gt;
&lt;li&gt;No structural prevention of violation classes before runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can have perfect identity governance and still experience behavioral failures. You can have perfect behavioral enforcement and still have NHI visibility gaps. Enterprises need both layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Innovation Sandbox Means for the Market
&lt;/h2&gt;

&lt;p&gt;The Innovation Sandbox selection validates that NHI security is now a first-class category at RSA, not a niche within traditional IAM. This matters for three reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visibility.&lt;/strong&gt; Innovation Sandbox finalists receive press coverage estimated at $5M+ in equivalent visibility. Token Security's pitch on March 23 puts NHI identity security in front of every CISO, security architect, and enterprise buyer attending RSA. Search volume for "Token Security", "NHI security", and related terms will spike during the week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validation.&lt;/strong&gt; The program's track record of selecting companies that become category leaders means the judges see NHI identity as a real, fundable, scalable market. This draws more investment and more competition to the identity layer of agent governance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complementary positioning.&lt;/strong&gt; For organizations evaluating AI agent security, Token Security's Innovation Sandbox presence clarifies the two-layer architecture: identity governance (who agents are and what they can access) and behavioral enforcement (what agents do and how they comply). Teams that deploy Token Security for NHI discovery still need behavioral constraints for the agents they discover.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Two-Layer Architecture Enterprises Need
&lt;/h2&gt;

&lt;p&gt;The strongest AI agent security posture combines both layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Token Security&lt;/strong&gt; discovers every agent, maps every permission, detects every identity drift&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavioral enforcement&lt;/strong&gt; ensures every discovered agent actually complies with policies, maintains context integrity, and produces governance-compliant outputs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither layer alone is sufficient. Identity without behavioral constraints means you know who your agents are but cannot prevent what they do. Behavioral constraints without identity management means you govern agent behavior but cannot see your full NHI surface.&lt;/p&gt;

&lt;p&gt;Our &lt;a href="https://dev.to/blog/enforcement-ladder-nist-ai-rmf"&gt;enforcement ladder&lt;/a&gt; operates at five levels, from prose documentation through automated hooks, each compounding on the previous. This prevent-by-construction approach eliminates violation classes before they reach runtime -- the exact layer that identity governance does not cover.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Watch at RSA
&lt;/h2&gt;

&lt;p&gt;Token Security presents to the Innovation Sandbox judges on March 23. Watch for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How they position NHI discovery relative to existing IAM vendors (particularly &lt;a href="https://dev.to/vs-okta"&gt;Okta for AI Agents&lt;/a&gt;, which also targets NHI governance from the enterprise identity side)&lt;/li&gt;
&lt;li&gt;Whether their pitch addresses the behavioral gap or stays focused on identity&lt;/li&gt;
&lt;li&gt;Audience questions about what happens after agents are discovered and permissioned&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a full comparison of all AI governance vendors heading into RSA, see our &lt;a href="https://dev.to/vendors"&gt;vendor map&lt;/a&gt;. To see how behavioral enforcement scores your own repository, &lt;a href="https://dev.to/scan"&gt;run the free scanner&lt;/a&gt; or explore the &lt;a href="https://dev.to/leaderboard"&gt;AI governance leaderboard&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See also: &lt;a href="https://dev.to/vs-token-security"&gt;Walseth AI vs Token Security&lt;/a&gt; for a detailed feature comparison.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://walseth.ai/blog/token-security-innovation-sandbox-rsa-2026" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>tokensecurity</category>
      <category>innovationsandbox</category>
      <category>rsa2026</category>
      <category>nhisecurity</category>
    </item>
    <item>
      <title>The AI Failure Tax: What Unreliable Agents Actually Cost in Financial Services</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 01:59:40 +0000</pubDate>
      <link>https://dev.to/douglasrw/the-ai-failure-tax-what-unreliable-agents-actually-cost-in-financial-services-2g1i</link>
      <guid>https://dev.to/douglasrw/the-ai-failure-tax-what-unreliable-agents-actually-cost-in-financial-services-2g1i</guid>
      <description>&lt;p&gt;Every AI agent failure has a cost. In financial services, those costs compound:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Direct cost:&lt;/strong&gt; The failed transaction, wrong calculation, missed compliance check&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recovery cost:&lt;/strong&gt; Human time to detect, diagnose, and fix&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trust cost:&lt;/strong&gt; Internal stakeholders lose confidence in AI adoption&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regulatory cost:&lt;/strong&gt; Audit findings, remediation plans, potential fines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We measured this across production agent systems. The numbers:&lt;/p&gt;

&lt;p&gt;A single L1-enforced rule (prose instruction in a prompt) has a ~47% violation rate under context pressure. For a financial services agent processing 1,000 decisions/day, that's ~470 potential violations.&lt;/p&gt;

&lt;p&gt;The same rule at L5 (hook enforcement) has a 0% violation rate. The agent literally cannot proceed without satisfying the check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The math:&lt;/strong&gt; If each violation costs  in recovery time (conservative — most finserv incidents cost much more), moving from L1 to L5 enforcement saves ,500/day per rule. For 10 critical rules, that's ,000/day.&lt;/p&gt;

&lt;p&gt;This is not theoretical. This is measured production data from systems running the enforcement ladder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scan your own AI repos:&lt;/strong&gt; &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;Free Governance Scanner&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://walseth.ai/blog/ai-failure-tax-financial-services" rel="noopener noreferrer"&gt;Full analysis →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>fintech</category>
      <category>governance</category>
      <category>compliance</category>
    </item>
    <item>
      <title>Why Your AI Agent Needs a Command Center, Not Better Prompts</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 01:59:36 +0000</pubDate>
      <link>https://dev.to/douglasrw/why-your-ai-agent-needs-a-command-center-not-better-prompts-2c5l</link>
      <guid>https://dev.to/douglasrw/why-your-ai-agent-needs-a-command-center-not-better-prompts-2c5l</guid>
      <description>&lt;p&gt;Andrej Karpathy described the ideal AI system as a "command center" — observable, debuggable, steerable. Most agent frameworks give you none of that.&lt;/p&gt;

&lt;p&gt;Here's the gap: your agent runs 50 tasks, fails silently on 3, and you find out from a customer complaint. There's no audit trail, no enforcement of what went wrong, no way to prevent it next time.&lt;/p&gt;

&lt;p&gt;The enforcement ladder approach gives agents 5 levels of structural control:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;L1 (Prose):&lt;/strong&gt; Instructions in CLAUDE.md — easily ignored&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L2 (Convention):&lt;/strong&gt; Naming patterns, file structure — fragile&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L3 (Template):&lt;/strong&gt; Structured output formats — moderate enforcement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L4 (Test):&lt;/strong&gt; Automated verification — catches violations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;L5 (Hook):&lt;/strong&gt; Pre-commit/pre-deploy automation — prevents violations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key insight: L1 (prose instructions) fails ~47% of the time under context pressure. L5 (hooks) fails 0% — the code literally cannot execute if the check fails.&lt;/p&gt;

&lt;p&gt;When Karpathy talks about a command center, this is what he means: structural enforcement that doesn't depend on the model reading its instructions correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it yourself:&lt;/strong&gt; &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;Free AI Governance Scanner&lt;/a&gt; — paste any GitHub repo and get a scored assessment in 30 seconds.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://walseth.ai/blog/karpathy-command-center" rel="noopener noreferrer"&gt;Full analysis on our blog →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>governance</category>
      <category>devops</category>
    </item>
    <item>
      <title>How the Enforcement Ladder Maps to Anthropic's Context Engineering Framework</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 01:32:06 +0000</pubDate>
      <link>https://dev.to/douglasrw/how-the-enforcement-ladder-maps-to-anthropics-context-engineering-framework-3284</link>
      <guid>https://dev.to/douglasrw/how-the-enforcement-ladder-maps-to-anthropics-context-engineering-framework-3284</guid>
      <description>&lt;h2&gt;
  
  
  Anthropic Published the Playbook. We Already Ran It.
&lt;/h2&gt;

&lt;p&gt;Last week Anthropic released "Effective Context Engineering for AI Agents" — their official guide to managing the tokens that flow through production AI systems. It immediately became the most-cited reference in the agent engineering space.&lt;/p&gt;

&lt;p&gt;Reading it felt like looking in a mirror.&lt;/p&gt;

&lt;p&gt;Their core framework — what they call "Right Altitude" — describes a spectrum from over-specified prose (brittle, breaks on edge cases) to structural constraints (robust, self-enforcing). They argue that the right level of abstraction determines whether your agent system compounds or collapses.&lt;/p&gt;

&lt;p&gt;We've been running exactly this hierarchy in production since September 2025. We call it the enforcement ladder. Five levels, from conversation to pre-commit hooks, each encoding lessons at increasing durability.&lt;/p&gt;

&lt;p&gt;The mapping isn't approximate. It's exact.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Mapping
&lt;/h2&gt;

&lt;p&gt;Anthropic's guide identifies four core operations for context engineering: &lt;strong&gt;Write&lt;/strong&gt; (add information), &lt;strong&gt;Select&lt;/strong&gt; (choose what enters the window), &lt;strong&gt;Compress&lt;/strong&gt; (reduce without losing signal), and &lt;strong&gt;Isolate&lt;/strong&gt; (separate concerns into independent contexts).&lt;/p&gt;

&lt;p&gt;Our enforcement ladder implements all four — plus a fifth operation Anthropic acknowledges but doesn't systematize: &lt;strong&gt;Verify&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Anthropic Concept&lt;/th&gt;
&lt;th&gt;Enforcement Ladder&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tool design constraints&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;L5: Hooks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pre-commit hooks, automated scanners, CI gates. Hard constraints that reject bad context before it enters the system. Anthropic's guide says "tool design &amp;gt; verbose instructions." We agree — and we have 3,700+ violation records proving hooks catch what instructions miss.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compaction with structured recall&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;L4: Tests&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Automated tests that verify context survives compression. When Claude auto-compacts your 200K context to 40K, do the critical facts survive? L4 tests catch context rot before it causes downstream failures.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured note-taking patterns&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;L3: Templates&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standardized formats (WARM files, completion reports, spec templates) that ensure critical information is written in machine-parseable structure. Manus independently discovered the same pattern — their &lt;code&gt;todo.md&lt;/code&gt; recitation is L3 enforcement.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Brittle extreme" (over-specified prose)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;L2: Prose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Natural language instructions in CLAUDE.md files. Anthropic explicitly warns this is the weakest form of context management. We track it as a failure mode: if a lesson can only be encoded as prose, we document why structural enforcement was impossible.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The hierarchy isn't arbitrary. Each level is strictly more durable than the one below it. A hook (L5) survives context compaction, developer turnover, and model upgrades. A prose instruction (L2) survives none of those.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Layer Anthropic Left Out: Verification
&lt;/h2&gt;

&lt;p&gt;Anthropic's guide focuses on getting the right context into the window. That's necessary but not sufficient.&lt;/p&gt;

&lt;p&gt;The missing piece is &lt;strong&gt;closed-loop verification&lt;/strong&gt; — systematically checking whether your context engineering actually worked. Not "did the model generate output?" but "did the output respect the constraints the context was supposed to enforce?"&lt;/p&gt;

&lt;p&gt;In our system, this is the violation database. Every time an agent's output contradicts an encoded constraint, we record it: which rule, which agent, what happened, what the intended behavior was. 3,706 violations logged across 960+ commits. Each violation is a data point that feeds back into the enforcement ladder — promoting patterns from L2 prose up to L5 hooks when they fail repeatedly.&lt;/p&gt;

&lt;p&gt;Anthropic hints at this with their mention of "evaluative signals," but they don't prescribe a systematic feedback loop. The OpenClaw-RL paper (arxiv 2603.10165) quantifies why this matters: combined evaluative + directive signals produce 4.8x improvement over 16 iterations compared to evaluative signals alone.&lt;/p&gt;

&lt;p&gt;Context engineering without verification is like writing tests but never running them.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Manus Confirms
&lt;/h2&gt;

&lt;p&gt;The Manus team published their own context engineering lessons the same week. Their production agent — handling real user tasks at scale — independently validated the same hierarchy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Logit masking&lt;/strong&gt; (hard constraint on token generation) maps to L5 hooks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic tool removal&lt;/strong&gt; (soft constraint) maps to L3/L4&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File system as extended memory&lt;/strong&gt; maps to our WARM files (persistent context that survives compaction)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;todo.md recitation&lt;/strong&gt; (re-reading structured state each step) maps to L3 templates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Their key insight: "No amount of raw capability replaces memory, environment, and feedback." That's the enforcement ladder thesis in one sentence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters for Your Production Agents
&lt;/h2&gt;

&lt;p&gt;If you're running AI agents in production — or planning to — Anthropic's guide gives you the vocabulary. The enforcement ladder gives you the implementation.&lt;/p&gt;

&lt;p&gt;Three concrete actions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Audit your context altitude.&lt;/strong&gt; How much of your agent's behavior depends on prose instructions (L2) vs. structural constraints (L5)? The ratio predicts failure rate. In our system, every lesson starts as prose and gets promoted up the ladder. If a constraint has been violated 3+ times as prose, it must be promoted to L4 or L5.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Build the verification loop.&lt;/strong&gt; Log every time your agent violates an expected constraint. Not just errors — constraint violations. The difference matters. An error is "the code crashed." A violation is "the code ran fine but ignored the rule that says don't modify production data." Violations are invisible without explicit checking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Measure context survival across compaction.&lt;/strong&gt; Anthropic's guide discusses context rot — information loss when the context window compresses. Test this explicitly. Write a critical fact into your agent's context, trigger compaction, then check if the agent still knows the fact. Our data shows ~40% of L2 prose doesn't survive a single compaction cycle. L5 hooks survive indefinitely because they're encoded in the file system, not the context window.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Competitive Window
&lt;/h2&gt;

&lt;p&gt;Three things happened in March 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic published official context engineering guidance&lt;/li&gt;
&lt;li&gt;OpenAI acquired Promptfoo (AI testing/security)&lt;/li&gt;
&lt;li&gt;Microsoft announced E7 general availability for May&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The platform vendors are converging on "context integrity" as a feature. The window for independent practitioners to establish methodology ownership is narrowing.&lt;/p&gt;

&lt;p&gt;The enforcement ladder isn't a product pitch. It's a framework that maps 1:1 to what Anthropic recommends, extends it with verification, and has 6 months of production data behind it. If you're evaluating how to manage context for your agents, the question isn't whether to use a hierarchy like this — it's whether to build it yourself or adopt one that's already been battle-tested.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Run a free context health scan on your repository at &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;walseth.ai/scan&lt;/a&gt;. See how your project's enforcement structure maps to Anthropic's framework — in 30 seconds, no signup required.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>governance</category>
      <category>agents</category>
      <category>anthropic</category>
    </item>
    <item>
      <title>What Okta's Entry Into Agent Governance Means for Enterprises</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 00:50:08 +0000</pubDate>
      <link>https://dev.to/douglasrw/what-oktas-entry-into-agent-governance-means-for-enterprises-4bka</link>
      <guid>https://dev.to/douglasrw/what-oktas-entry-into-agent-governance-means-for-enterprises-4bka</guid>
      <description>&lt;h2&gt;
  
  
  The Biggest Enterprise Entry Into Agent Governance
&lt;/h2&gt;

&lt;p&gt;On March 16, 2026, Okta announced "Okta for AI Agents" at Okta Showcase -- the most significant enterprise entry into AI agent governance to date. General availability is set for April 30, one week before RSA Conference closes.&lt;/p&gt;

&lt;p&gt;The timing is not accidental. Okta is planting its flag in the agent governance space before the largest security conference of the year, and before the rest of the industry can react.&lt;/p&gt;

&lt;p&gt;Here is what they announced, what it means, and the critical gap it does not address.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Okta Built
&lt;/h2&gt;

&lt;p&gt;Okta for AI Agents extends enterprise IAM to treat AI agents as first-class non-human identities. The platform has seven key capabilities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shadow AI Discovery&lt;/strong&gt; -- Detects unauthorized AI agents connected to enterprise apps via their Identity Security Posture Management (ISPM) engine&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Universal Directory for Agents&lt;/strong&gt; -- Registers agents as non-human identities with full lifecycle management&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Gateway&lt;/strong&gt; -- Centralized control plane with a virtual MCP server that aggregates tools from the Okta MCP registry&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privileged Credential Management&lt;/strong&gt; -- Vaults and rotates agent credentials automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Universal Logout for AI Agents&lt;/strong&gt; -- Instant kill switch that revokes all tokens for a rogue agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Governance Workflows&lt;/strong&gt; -- Brings agents into standard certification and access-review workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SIEM Integration&lt;/strong&gt; -- Agent activity logged and forwarded to enterprise SIEM&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Integration partners at launch include Boomi, DataRobot, and Google Vertex AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers That Drove This
&lt;/h2&gt;

&lt;p&gt;Okta cited four statistics that explain why they are entering this space now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;88% of organizations&lt;/strong&gt; report suspected or confirmed AI agent security incidents&lt;/li&gt;
&lt;li&gt;Only &lt;strong&gt;22%&lt;/strong&gt; treat agents as independent, identity-bearing entities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;80%&lt;/strong&gt; have experienced unintended agent behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;23%&lt;/strong&gt; report credential exposure from agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first and third numbers are the most telling. Nearly nine in ten organizations have had agent security incidents. Four in five have experienced unintended agent behavior. These are not edge cases. This is the baseline reality of deploying AI agents in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Okta Gets Right
&lt;/h2&gt;

&lt;p&gt;Okta is solving a real problem at the right layer for their expertise. Enterprise organizations genuinely do not know how many AI agents are operating in their environment, what those agents can access, or how to shut them down when something goes wrong.&lt;/p&gt;

&lt;p&gt;The Universal Logout capability alone is worth the price of entry. When 23% of organizations have experienced credential exposure from agents, an instant kill switch is not a nice-to-have -- it is table stakes for production deployments.&lt;/p&gt;

&lt;p&gt;Shadow AI discovery addresses the visibility gap that plagues every enterprise we talk to. You cannot govern what you cannot see, and Okta's ISPM engine is well-positioned to find agents that IT does not know about.&lt;/p&gt;

&lt;p&gt;The Agent Gateway with MCP integration is forward-looking. By aggregating agent tools through a centralized control plane, Okta creates a single point of policy enforcement for agent access. This is architecturally sound for the identity layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Gap: Identity Does Not Equal Behavior
&lt;/h2&gt;

&lt;p&gt;Here is what Okta's announcement does not cover: what agents actually do once they have been authenticated.&lt;/p&gt;

&lt;p&gt;An agent can be fully registered in Okta's Universal Directory, properly credentialed via their Privileged Credential Management, and monitored through their SIEM integration. That agent can still:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Produce outputs that violate compliance policies&lt;/strong&gt; -- identity verification does not constrain agent output quality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drift from its behavioral constraints&lt;/strong&gt; -- credential management does not enforce context integrity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Introduce governance regressions&lt;/strong&gt; in the codebases it modifies -- access control does not prevent structural violations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hallucinate or generate non-compliant content&lt;/strong&gt; -- the Agent Gateway controls what tools an agent can access, not how it uses them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the identity-behavioral governance gap. Okta secures the identity plane. The behavioral plane -- what agents do, how they comply, whether their outputs meet governance standards -- requires prevent-by-construction enforcement: structural constraints that make violations impossible regardless of identity controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Layers, One Problem
&lt;/h2&gt;

&lt;p&gt;Think of it as two layers of the same stack:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Identity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Is this agent authorized to act?&lt;/td&gt;
&lt;td&gt;Okta for AI Agents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Behavioral&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Is this agent acting correctly?&lt;/td&gt;
&lt;td&gt;Structural enforcement&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The 88% incident rate exists because most organizations have neither layer. Okta entering the space means enterprises will soon have the identity layer. The behavioral layer -- enforcement ladders, context integrity checks, constraint automation -- is what we build.&lt;/p&gt;

&lt;p&gt;These layers are complementary. Identity governance without behavioral enforcement catches unauthorized agents but misses compliant-but-incorrect behavior. Behavioral enforcement without identity governance catches violations but cannot revoke agent access when needed.&lt;/p&gt;

&lt;p&gt;The strongest governance posture uses both.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means for the Market
&lt;/h2&gt;

&lt;p&gt;Three implications of Okta's entry:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Market validation.&lt;/strong&gt; When a $15B identity company builds an AI agent governance product, it confirms that agent governance is enterprise-critical infrastructure, not a niche concern. Every conversation we have with prospects about whether AI governance is "real" just got easier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Category creation.&lt;/strong&gt; Okta's announcement creates the "AI agent governance" category in enterprise security. Search volume for "okta ai agents", "ai agent governance", and "ai agent security" will spike around RSA. This lifts all boats in the space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The complementary gap becomes obvious.&lt;/strong&gt; As enterprises deploy Okta for agent identity, they will immediately discover that identity alone does not prevent behavioral incidents. The 80% who have experienced unintended agent behavior will not see that number drop just because agents have better credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  For Teams Evaluating Agent Governance
&lt;/h2&gt;

&lt;p&gt;If you are evaluating AI agent governance solutions ahead of RSA Conference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start with identity&lt;/strong&gt; if you do not know how many AI agents operate in your environment. Okta's shadow discovery solves the visibility problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with behavioral enforcement&lt;/strong&gt; if you are building AI agent systems and your agents are producing incorrect, non-compliant, or inconsistent outputs. &lt;a href="https://dev.to/scan"&gt;Run our free scanner&lt;/a&gt; to see where your governance gaps are.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan for both&lt;/strong&gt; if you are deploying AI agents in regulated industries. EU AI Act compliance, NIST AI RMF alignment, and SOC 2 requirements span both identity and behavioral governance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a detailed comparison of how the two approaches differ, see our &lt;a href="https://dev.to/vs-okta"&gt;Walseth AI vs Okta comparison page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Okta's entry is good for the entire AI agent governance space. They bring enterprise credibility, existing customer relationships, and a serious engineering effort to the identity layer.&lt;/p&gt;

&lt;p&gt;The behavioral enforcement layer -- what agents do, how they comply, whether their outputs meet governance standards -- remains the unsolved half of the problem. That is where structural enforcement, enforcement ladders, and context engineering operate.&lt;/p&gt;

&lt;p&gt;Okta governs who your agents are. We govern what they do. Enterprises need both.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://walseth.ai/blog/okta-enters-agent-governance" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>okta</category>
      <category>agentgovernance</category>
      <category>identity</category>
      <category>competitiveanalysis</category>
    </item>
    <item>
      <title>AI Governance Leaderboard: We Scanned 21 Top Repos Before RSA 2026</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 00:50:03 +0000</pubDate>
      <link>https://dev.to/douglasrw/ai-governance-leaderboard-we-scanned-21-top-repos-before-rsa-2026-3k3p</link>
      <guid>https://dev.to/douglasrw/ai-governance-leaderboard-we-scanned-21-top-repos-before-rsa-2026-3k3p</guid>
      <description>&lt;h1&gt;
  
  
  AI Governance Leaderboard: We Scanned 21 Top Repos Before RSA 2026
&lt;/h1&gt;

&lt;p&gt;RSA Conference 2026 starts March 23. Every AI security vendor will be on stage talking about governance, compliance, and responsible AI. We wanted to see what governance actually looks like in the repos people are shipping.&lt;/p&gt;

&lt;p&gt;So we scanned 21 of the most popular AI/ML repositories using the same &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;governance scanner&lt;/a&gt; anyone can run for free. No manual review. No subjective scoring. Just structural analysis of what each repo enforces automatically.&lt;/p&gt;

&lt;p&gt;The results are not great.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;21 repos scanned&lt;/strong&gt; across AI agent frameworks, ML libraries, web frameworks, and AI SDKs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average score: 53/100&lt;/strong&gt; (grade C)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only 2 repos (10%)&lt;/strong&gt; score 70+ and are on track for EU AI Act readiness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;6 repos (29%)&lt;/strong&gt; have any AI governance configuration (CLAUDE.md or .cursorrules)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1 repo&lt;/strong&gt; scored an F&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://dev.to/leaderboard"&gt;View the full interactive leaderboard&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Top 5
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;th&gt;Repository&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Grade&lt;/th&gt;
&lt;th&gt;EU AI Act&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/vllm-project/vllm" rel="noopener noreferrer"&gt;vllm-project/vllm&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;78&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;On track&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/BerriAI/litellm" rel="noopener noreferrer"&gt;BerriAI/litellm&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;72&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;On track&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/Significant-Gravitas/AutoGPT" rel="noopener noreferrer"&gt;Significant-Gravitas/AutoGPT&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;68&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;Gaps identified&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/fastapi/fastapi" rel="noopener noreferrer"&gt;fastapi/fastapi&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;62&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;Gaps identified&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/langchain-ai/langchain" rel="noopener noreferrer"&gt;langchain-ai/langchain&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;td&gt;B&lt;/td&gt;
&lt;td&gt;Gaps identified&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;vLLM leads the pack at 78/100 with pre-commit hooks, 7 CI/CD workflows, a security policy, and Dependabot. Its one critical finding: 2 .env files committed to source control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom 3
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;th&gt;Repository&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Grade&lt;/th&gt;
&lt;th&gt;EU AI Act&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/ollama/ollama" rel="noopener noreferrer"&gt;ollama/ollama&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;36&lt;/td&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;Not ready&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/microsoft/autogen" rel="noopener noreferrer"&gt;microsoft/autogen&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;D&lt;/td&gt;
&lt;td&gt;Not ready&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;&lt;a href="https://walseth.ai/scan?url=https://github.com/yoheinakajima/babyagi" rel="noopener noreferrer"&gt;yoheinakajima/babyagi&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;Not ready&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;BabyAGI's 17/100 is the lowest score in the set. No CI/CD pipeline, no enforcement hooks, no security policy, no governance config. It scores points only for having a test directory and basic project hygiene.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Pattern: CI/CD Without Enforcement
&lt;/h2&gt;

&lt;p&gt;The most striking finding across all 21 repos: &lt;strong&gt;nearly every project has CI/CD, but almost none enforce rules structurally.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most repos scored 15/15 on CI/CD. They have GitHub Actions. They run tests in the pipeline. That part of modern software development is well-adopted.&lt;/p&gt;

&lt;p&gt;But enforcement -- pre-commit hooks, commit-lint, CODEOWNERS, branch protection -- averages only 11/30 across all repos. This is the gap. Rules exist in documentation but are not structurally enforced before code enters the pipeline.&lt;/p&gt;

&lt;p&gt;This is exactly what we call the "detection gap" in the &lt;a href="https://dev.to/blog/convergence-enforcement"&gt;enforcement ladder&lt;/a&gt; framework. You can detect violations in CI, but by then the code is already committed. Structural enforcement catches problems before they enter the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Governance Is Nearly Absent
&lt;/h2&gt;

&lt;p&gt;Only 6 of 21 repos (29%) have any AI governance configuration -- a CLAUDE.md file or .cursorrules. This means that in 71% of the most popular AI/ML repos, AI coding tools operate with zero structural guidance.&lt;/p&gt;

&lt;p&gt;When a developer uses Cursor, Claude Code, or GitHub Copilot on these repos, the AI has no project-specific rules to follow. No constraints on what it can modify. No enforced patterns. The governance score for these repos on this dimension: 0/15.&lt;/p&gt;

&lt;p&gt;The repos that do have governance configs: vLLM, LiteLLM, AutoGPT, LangChain, Transformers, and LocalAI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Scores Mean
&lt;/h2&gt;

&lt;p&gt;Our scanner evaluates 6 dimensions (100 points total):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enforcement (30 pts):&lt;/strong&gt; Pre-commit hooks, commit-lint, CODEOWNERS, branch protection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD (15 pts):&lt;/strong&gt; GitHub Actions, Travis CI, CircleCI workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security (20 pts):&lt;/strong&gt; Security policy, .gitignore, no committed .env files, Dependabot/Renovate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing (10 pts):&lt;/strong&gt; Test configuration files, test directories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Governance (15 pts):&lt;/strong&gt; CLAUDE.md, .cursorrules, governance directories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hygiene (10 pts):&lt;/strong&gt; README, CONTRIBUTING, LICENSE, CHANGELOG, lockfiles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Grades: A (80+), B (60-79), C (40-59), D (20-39), F (below 20).&lt;/p&gt;

&lt;h2&gt;
  
  
  Category Breakdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AI Agent Frameworks (8 repos, avg 47/100)
&lt;/h3&gt;

&lt;p&gt;The agent frameworks -- the repos building autonomous AI systems -- scored the lowest as a category. AutoGPT leads at 68, but BabyAGI (17), Autogen (30), and SuperAGI (41) drag the average down. These are the repos building systems that make autonomous decisions, and they have the least governance infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  ML Libraries (3 repos, avg 62/100)
&lt;/h3&gt;

&lt;p&gt;vLLM (78) lifts this category. scikit-learn and Transformers both score 54 -- solid CI/CD and testing, but weak on enforcement and governance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web Frameworks (3 repos, avg 58/100)
&lt;/h3&gt;

&lt;p&gt;FastAPI (62), Pydantic (59), Django (54). These established projects have mature CI/CD but mostly lack AI governance configs and full enforcement tooling.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI SDKs (4 repos, avg 56/100)
&lt;/h3&gt;

&lt;p&gt;The Anthropic SDK (55), OpenAI SDK (53), LlamaIndex (58), and DSPy (56) cluster tightly in the C range. The Anthropic SDK notably has no pre-commit hooks despite being from the company that makes Claude.&lt;/p&gt;

&lt;h3&gt;
  
  
  Local AI / Inference (3 repos, avg 53/100)
&lt;/h3&gt;

&lt;p&gt;LiteLLM (72) stands out. Ollama (36) is the weakest -- no enforcement hooks, no test infrastructure detected, and no governance config.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methodology
&lt;/h2&gt;

&lt;p&gt;All scans were run on March 16, 2026 using the &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;Walseth AI Governance Scanner&lt;/a&gt; -- the same tool available for free at walseth.ai/scan. Scores are point-in-time snapshots based on the default branch at scan time.&lt;/p&gt;

&lt;p&gt;The scanner analyzes the file tree of each repository via the GitHub API. It checks for the presence of specific files and directories that indicate structural governance. It does not read file contents beyond filenames and paths.&lt;/p&gt;

&lt;p&gt;Repos that fail to scan (private, rate-limited, or not found) are excluded. All 21 repos in this leaderboard scanned successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Would It Take to Score an A?
&lt;/h2&gt;

&lt;p&gt;No repo in this scan scored an A (80+). To get there, a project would need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pre-commit hooks AND commit-lint AND CODEOWNERS (25/30 enforcement)&lt;/li&gt;
&lt;li&gt;3+ CI/CD workflows (15/15)&lt;/li&gt;
&lt;li&gt;Security policy + Dependabot + no committed .env files (17-20/20)&lt;/li&gt;
&lt;li&gt;Test config + test directories (10/10)&lt;/li&gt;
&lt;li&gt;CLAUDE.md or .cursorrules + governance directory (15/15)&lt;/li&gt;
&lt;li&gt;README + CONTRIBUTING + LICENSE + lockfile (8-10/10)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The tooling exists. The patterns are well-understood. Most projects just have not prioritized structural enforcement alongside their CI/CD pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scan Your Own Repo
&lt;/h2&gt;

&lt;p&gt;Every score in this leaderboard was generated by the same free scanner you can run right now:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;Scan your repo free at walseth.ai/scan&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Want a deeper analysis? Our &lt;a href="https://buy.stripe.com/4gw7vP5lKbcP4wg6oo" rel="noopener noreferrer"&gt;$497 Full Governance Report&lt;/a&gt; covers 30+ dimensions with specific remediation steps and a compliance roadmap.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/leaderboard"&gt;View the full interactive leaderboard with sortable columns&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Last scanned: March 16, 2026. Scores are point-in-time snapshots. &lt;a href="https://walseth.ai/scan" rel="noopener noreferrer"&gt;Run the scanner&lt;/a&gt; to get the latest score for any repo.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://walseth.ai/blog/ai-governance-leaderboard-rsa-2026" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aigovernance</category>
      <category>leaderboard</category>
      <category>rsaconference</category>
      <category>ai</category>
    </item>
    <item>
      <title>The 477:1 Problem</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 00:28:47 +0000</pubDate>
      <link>https://dev.to/douglasrw/the-4771-problem-5gco</link>
      <guid>https://dev.to/douglasrw/the-4771-problem-5gco</guid>
      <description>&lt;p&gt;Every AI team celebrates when their agent catches errors. Nobody tracks whether those errors stop recurring.&lt;/p&gt;

&lt;p&gt;We ran 6 autonomous agents through 145+ specs and 960+ commits. The critical metric we discovered: &lt;strong&gt;477:1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's 4,768 violations detected but only 18 promoted to structural enforcement. A stark gap between detection and actual prevention.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Ratio Means
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;violation&lt;/strong&gt; is a detected failure — an agent breaks rules, uses outdated context, or misses constraints. Detection is straightforward; every monitoring tool does it.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;promotion&lt;/strong&gt; is when that violation becomes structurally impossible to repeat. Not "we documented it." Not "we added a Jira ticket." The violation gets encoded as an L5 hook, L4 test, or L3 template in the &lt;a href="https://walseth.ai/blog/enforcement-ladder" rel="noopener noreferrer"&gt;enforcement ladder&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The remaining 4,750 violations can recur because nothing structural changed — despite logging and alerting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the Gap Exists
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. No promotion pipeline.&lt;/strong&gt; Teams have error logging but lack mechanisms to transform logged errors into structural prevention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Promotion requires architecture.&lt;/strong&gt; Real solutions mean writing L5 hooks or L4 tests that fail builds — not just updating documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The 80/20 trap.&lt;/strong&gt; Most violations are low-severity conventions. The 18 promotions targeted highest-leverage issues causing cascading failures or production breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real Example
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Violation:&lt;/strong&gt; Coder agent committed code without running full test suites, breaking unrelated modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;L2 Detection:&lt;/strong&gt; Added a prose rule to documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; Agent violated it again within 2 days. Prose rules get lost in context compression.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;L5 Promotion:&lt;/strong&gt; Created a pre-commit hook running tests automatically. Commits fail if any test breaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Zero violations in 30+ days. Prevention-by-construction achieved.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Measure Your Ratio
&lt;/h2&gt;

&lt;p&gt;Most teams cannot answer: "Of the errors your AI agents made, how many can never happen again?"&lt;/p&gt;

&lt;p&gt;To measure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Count distinct failure classes (not individual errors)&lt;/li&gt;
&lt;li&gt;Count promotions — structural enforcement that makes violations impossible&lt;/li&gt;
&lt;li&gt;Divide violations by promotions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A ratio of 477:1 is honest. Most production AI systems would be thousands-to-one or infinity-to-one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Regression Rates
&lt;/h2&gt;

&lt;p&gt;Our 18 L5 promotions show &lt;strong&gt;&amp;lt; 5% regression rates&lt;/strong&gt;. Once promoted to structural enforcement, violations rarely recur.&lt;/p&gt;

&lt;p&gt;Compare this to L2 prose enforcement with &lt;strong&gt;&amp;gt; 40% regression rates&lt;/strong&gt; — documentation gets forgotten or compressed out of context.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enterprise Implications
&lt;/h2&gt;

&lt;p&gt;If you are deploying AI agents in production, you have violations. The determining question isn't detection volume but promotion count.&lt;/p&gt;

&lt;p&gt;We publish this ratio because transparency about the gap builds more credibility than pretending the gap does not exist. Every team running AI agents has this gap — most just don't measure it.&lt;/p&gt;

&lt;p&gt;The path forward isn't better detection. It's building the pipeline that turns detected violations into structural enforcement, one promotion at a time.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Free codebase governance audit: &lt;a href="https://walseth.ai" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Your AI Agent Forgets Its Rules Every 45 Minutes. Here's the Fix.</title>
      <dc:creator>Douglas Walseth</dc:creator>
      <pubDate>Wed, 18 Mar 2026 00:28:26 +0000</pubDate>
      <link>https://dev.to/douglasrw/your-ai-agent-forgets-its-rules-every-45-minutes-heres-the-fix-151e</link>
      <guid>https://dev.to/douglasrw/your-ai-agent-forgets-its-rules-every-45-minutes-heres-the-fix-151e</guid>
      <description>&lt;p&gt;Every AI coding agent has the same silent failure mode: context compression. When the conversation gets long enough, the LLM compresses earlier messages to make room. Your carefully crafted system prompts, project rules, and behavioral constraints? Gone. The agent keeps working, but now it's working without guardrails.&lt;/p&gt;

&lt;p&gt;This isn't theoretical. We run a 6-agent production system that processes thousands of tool calls per day. Before we fixed this, agents would silently lose their CLAUDE.md instructions, forget which files they'd already modified, and repeat work they'd done 30 minutes ago. The worst part: they never told us. They just kept generating confident, rule-violating output.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Invisible Knowledge Loss
&lt;/h2&gt;

&lt;p&gt;LLMs have finite context windows. Claude's is 200K tokens. Sounds like a lot — until your agent has read 40 files, run 80 commands, and accumulated 150K tokens of conversation history. At that point, the system compresses. Earlier messages get summarized or dropped entirely.&lt;/p&gt;

&lt;p&gt;What gets lost first? The instructions at the top. The CLAUDE.md rules. The project constraints. The memory of what the agent already tried.&lt;/p&gt;

&lt;p&gt;Detection tools can't help here. By the time you detect that the agent forgot its rules, it's already shipped rule-violating code. You need prevention.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fix: One Hook, 150 Tool Calls
&lt;/h2&gt;

&lt;p&gt;The solution is a PostToolUse hook that monitors context consumption and flushes critical knowledge to persistent storage before compression hits.&lt;/p&gt;

&lt;p&gt;Here's the core logic (simplified from our production implementation):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;#!/usr/bin/env python3
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Pre-compaction memory flush hook.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;

&lt;span class="n"&gt;FLUSH_THRESHOLD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;  &lt;span class="c1"&gt;# ~75% of context window
&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;session_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/tmp/session_&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;AGENT_NAME&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;default&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Load or initialize session state
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;session_file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session_file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_text&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tool_calls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;files_read&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;files_written&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;flushed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;# Track every tool call
&lt;/span&gt;    &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tool_calls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

    &lt;span class="c1"&gt;# Flush before compression hits
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tool_calls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;FLUSH_THRESHOLD&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;flushed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
        &lt;span class="n"&gt;memory_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/agents/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;AGENT_NAME&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/MEMORY.md&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;## Session &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;isoformat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="n"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;- Files modified: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;files_written&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="n"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;- Files read: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;files_read&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; total&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="n"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;- Tool calls: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tool_calls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

        &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;memory_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;flushed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;notification&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Memory flushed to persistent storage before context compression.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}))&lt;/span&gt;

    &lt;span class="n"&gt;session_file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Register it as a Claude Code hook in your project's &lt;code&gt;.claude/settings.local.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"PostToolUse"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hooks/pre_compaction_flush.py"&lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Every tool call increments the counter. At 150 calls (~75% of a 200K context window), the hook writes a session summary to persistent storage. When compression happens, the knowledge survives.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Changes in Practice
&lt;/h2&gt;

&lt;p&gt;Before the hook, our agents exhibited three failure patterns after context compression:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rule amnesia.&lt;/strong&gt; Agent forgets CLAUDE.md constraints and starts violating project rules. In our system, this caused an average of 12 rule violations per agent per day post-compression.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Work repetition.&lt;/strong&gt; Agent re-reads files it already processed, re-runs commands it already executed. We measured 23% wasted tool calls from redundant work after compression events.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Silent context loss.&lt;/strong&gt; Agent continues with high confidence but degraded capability. No error, no warning, no indication that critical context was lost. This is the most dangerous pattern — the agent doesn't know what it doesn't know.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After deploying the hook across our 6-agent system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rule violations post-compression dropped to near-zero. The agent reads the flushed memory file on restart and recovers its constraints.&lt;/li&gt;
&lt;li&gt;Redundant tool calls reduced by 18%. The session summary tells the agent what it already did.&lt;/li&gt;
&lt;li&gt;We paired the flush hook with a PreToolUse memory search enforcer — a second hook that reminds the agent to read persistent memory before its first substantive action. Belt and suspenders.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why This Matters Beyond Our System
&lt;/h2&gt;

&lt;p&gt;Context compression isn't unique to our setup. Every long-running AI agent session hits it. If you're running Claude Code, Cursor, Windsurf, or any agentic coding tool on a large codebase, your agent is losing context regularly. You just don't see it because the failure is silent.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://walseth.ai/blog/enforcement-ladder" rel="noopener noreferrer"&gt;enforcement ladder&lt;/a&gt; framework treats this as an L5 problem — the highest enforcement level. L5 means automated, zero-awareness-required. The hook fires automatically. The agent doesn't need to remember to save its memory. The system handles it.&lt;/p&gt;

&lt;p&gt;This is the difference between detection and prevention. A monitoring tool tells you the agent forgot its rules after it shipped bad code. An L5 hook prevents the forgetting from happening at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;The hook above works with any Claude Code project. Drop it in your repo, register it in settings, and your agent stops losing context at compression boundaries.&lt;/p&gt;

&lt;p&gt;If you want to see how your entire AI development pipeline scores on enforcement posture — including compaction vulnerability, rule enforcement, and test coverage — run our free governance scanner:&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Free codebase governance audit: &lt;a href="https://walseth.ai" rel="noopener noreferrer"&gt;walseth.ai&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
