<?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: Bala Paranj</title>
    <description>The latest articles on DEV Community by Bala Paranj (@bala_paranj_059d338e44e7e).</description>
    <link>https://dev.to/bala_paranj_059d338e44e7e</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3862804%2F7ea6c560-63cb-4daf-a713-450532280b0a.jpg</url>
      <title>DEV Community: Bala Paranj</title>
      <link>https://dev.to/bala_paranj_059d338e44e7e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bala_paranj_059d338e44e7e"/>
    <language>en</language>
    <item>
      <title>The Attack Path is Recursive. Your Scanner Isn't.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Thu, 19 Nov 2026 12:27:46 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/the-attack-path-is-recursive-your-scanner-isnt-oep</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/the-attack-path-is-recursive-your-scanner-isnt-oep</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;"Can this principal read that bucket?"&lt;/p&gt;

&lt;p&gt;Five documents get a vote: the identity policy attached to the principal, the trust policy on every role it can assume, the Service Control Policy on the account, the permission boundary if one exists, and the bucket policy on the resource. Six, if a VPC endpoint policy sits on the network path. Read each one in isolation and each one is unremarkable. Your scanner reads each one in isolation. That is the whole problem: the finding that matters is not &lt;em&gt;in&lt;/em&gt; any of the five documents. It lives in their composition and composition, in AWS, is recursive.&lt;/p&gt;

&lt;p&gt;Two claims from earlier pieces set this up. First: AWS configuration is first-order logic. Every policy statement is a quantified predicate over requests and engineers misread it procedurally, as a sequence of grants. Second: control planes act locally; each service evaluates its own slice, and no layer reasons across subsystems. Put those together and you get the gap this article closes. Even if you modeled every policy perfectly, one document at a time, you still could not answer the question above. The obstruction is expressiveness.&lt;/p&gt;

&lt;h2&gt;
  
  
  The question a scanner cannot state
&lt;/h2&gt;

&lt;p&gt;Role assumption is an edge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight prolog"&gt;&lt;code&gt;&lt;span class="nf"&gt;canAssume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ci&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edges chain. A assumes B, B assumes C, C holds the permission. The effective identity of a principal is everything reachable from it. The reflexive-transitive closure of &lt;code&gt;canAssume&lt;/code&gt;. Transitive closure has a famous property: Aho and Ullman proved in 1979 that no relational-algebra query or first-order query can compute it. Twenty years later, SQL:1999 conceded the point and bolted on &lt;code&gt;WITH RECURSIVE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A scanner is a SELECT statement. A privilege-escalation chain is a WITH RECURSIVE.&lt;/p&gt;

&lt;p&gt;This is why a tool architected as per-resource checks with read a configuration object, apply a predicate, emit pass or fail can accumulate ten thousand checks without once stating the reachability question. The formalism the checks are written in cannot contain the question. And it sharpens the first-order-logic claim from the earlier piece: a single policy is first-order; &lt;em&gt;effective access&lt;/em&gt; is first-order plus a fixpoint. The engineers were already misreading the logic. The tools cannot even hold it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Datalog in ninety seconds
&lt;/h2&gt;

&lt;p&gt;Datalog is Horn-clause logic with no function symbols, evaluated to a least fixpoint over a finite set of facts. Three consequences fall out of that restriction: every program terminates, evaluation is polynomial in the size of the data, and recursion, the one thing first-order queries lack is native.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight prolog"&gt;&lt;code&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;facts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;extracted&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;observation&lt;/span&gt; &lt;span class="n"&gt;snapshot&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;principal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;canAssume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;effective&lt;/span&gt; &lt;span class="n"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;reflexive&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;transitive&lt;/span&gt; &lt;span class="n"&gt;closure&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;actsAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;actsAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;principal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nf"&gt;actsAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;actsAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;canAssume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two rules. Every chain, at every depth, for every principal in the estate, simultaneously. There is no loop to bound, maximum depth to pick or worklist to manage. The engine computes the closure and hands you the relation.&lt;/p&gt;

&lt;p&gt;Harrison, Ruzzo, and Ullman proved in 1976 that the general safety question: "can this subject ever acquire this right?" is undecidable for unrestricted protection systems. Lipton and Snyder showed a year later that constraining the rewrite rules (the take-grant model) makes the same question decidable in linear time. Datalog's function-free restriction is that trade made executable: give up the ability to construct unbounded new terms, and safety becomes not just decidable but cheap.&lt;/p&gt;

&lt;p&gt;Notice also the inversion of authorship. Procedural code enumerates instances: check this pattern, then that one. A Datalog rule defines a property, and the engine enumerates every instance for you, including the ones no incident report has taught you to look for. You state what must not exist; the engine returns either emptiness or every counterexample, each with its derivation attached. That is "don't trust the author, check the invariant," compiled.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deny is negation and negation is where procedural engines drift
&lt;/h2&gt;

&lt;p&gt;AWS's documented evaluation semantics are unambiguous: an explicit deny overrides any allow; SCPs intersect with everything below them; permission boundaries intersect again; cross-account access requires an allow on both the identity side and the resource side. The important phrase is &lt;em&gt;allowed unless denied&lt;/em&gt; with logical negation.&lt;/p&gt;

&lt;p&gt;Procedural engines handle deny-override as a special case bolted onto an allow loop, and special cases drift as coverage grows. In Datalog it is a negated atom:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight prolog"&gt;&lt;code&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;denied&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;denied&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;actsAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;denyStmt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;permitted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;permitted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;actsAs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;allowStmt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;inAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;Q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Acct&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;scpPermits&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Acct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;denied&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simplified shipped encoding also carries permission boundaries, session policies, and the same-account OR / cross-account AND semantics between identity and resource policies.&lt;/p&gt;

&lt;p&gt;Datalog imposes one soundness condition on negation: it must be &lt;em&gt;stratified&lt;/em&gt;. The &lt;code&gt;denied&lt;/code&gt; relation has to be fully computed before any rule consults &lt;code&gt;!denied&lt;/code&gt;. That requirement happens to be the exact shape of AWS's own documented order. The deny layer closes before the allow layer reads it. When the solver's correctness condition and the vendor's semantics coincide, you are not simulating the cloud's logic. You are expressing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-coupling is one more atom in the body
&lt;/h2&gt;

&lt;p&gt;In "It Worked Yesterday" I argued that the failures which survive review live in cross-coupling. IAM composed with network, network composed with data classification. Because each control plane is individually sound and nobody owns the join. In a procedural architecture, every pairing is an integration project: a new module, new plumbing, O(k²) seams for k domains. In Datalog, a pairing is a conjunction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight prolog"&gt;&lt;code&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;finding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;permitted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;netPath&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;sensitive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;trusted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One added atom &lt;code&gt;netPath&lt;/code&gt; and the IAM closure is joined with the network closure. This is the edges-not-nodes thesis made operational. Risk lives in interactions between settings, and a language whose only verb is the join is a language whose native subject is interaction.&lt;/p&gt;

&lt;p&gt;Grading falls out as well. A derivation with every edge present is exploitable now; a derivation missing one edge is one act of drift away. Stave's exploitable / one-away / reachable classification is a query over path structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Soufflé
&lt;/h2&gt;

&lt;p&gt;Datalog is a language; Soufflé is the engine that made it industrial. Built at Oracle Labs a decade ago to synthesize program analyzers, it compiles rules to parallel C++ with semi-naive evaluation, automatic index selection rather than interpreting them. Its home turf is program analysis: the DOOP points-to framework for Java, GrammaTech's DDISASM binary lifter, the Gigahorse Ethereum decompiler. Points-to analysis as our problem wearing different clothes. &lt;em&gt;What can this pointer reach through arbitrary chains of indirection&lt;/em&gt; is structurally &lt;em&gt;what can this principal reach through arbitrary chains of assumption.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Those workloads run to billions of tuples. An AWS estate, even one carrying a hundred thousand policy statements produces a fact base that is small by Soufflé's standards, and the full fixpoint computes in seconds on commodity hardware. Seconds matter: that is CI-gate budget. Mechanical verification only changes behavior if it fits inside the pipeline where the behavior lives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prior art already voted
&lt;/h2&gt;

&lt;p&gt;Batfish expressed router control-plane semantics as Datalog rules in 2015. Microsoft built Network-Optimized Datalog into Z3 to check reachability beliefs about Azure's network. AWS split the problem where this article splits it: Zelkova compiles a single policy to SMT and asks what that one document means, while Tiros, the engine behind VPC Reachability Analyzer, specified network semantics against three solver backends: MonoSAT, Vampire, and Soufflé. SMT for the semantics of one artifact. Datalog for the closure over many.&lt;/p&gt;

&lt;p&gt;Stave keeps both lanes, and adds a check on the checkers. The same observation snapshot exports as SMT-LIB for Z3 and cvc5 and as Datalog relations for Soufflé, and trap-triplet differential tests run the engines against each other. Zero disagreements to date. "Don't trust the author" applies to engine authors too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Datalog cannot do and where that work goes
&lt;/h2&gt;

&lt;p&gt;Datalog joins finite relations. It does not do string algebra or arithmetic, and IAM is full of both: ARN wildcards, &lt;code&gt;aws:SourceIp&lt;/code&gt; CIDR containment, &lt;code&gt;aws:PrincipalOrgID&lt;/code&gt; comparisons. Two placements exist for that work. Resolve it at fact extraction. Stave's collectors expand a wildcard against the resource inventory and emit concrete edges, so the model gets bigger while the logic stays pure. Or route it to SMT, where strings and bitvectors have real decision procedures. Multi-engine verification means choosing per-condition. It is a routing decision.&lt;/p&gt;

&lt;p&gt;The proof is over the observation snapshot. Model fidelity is the collectors' burden; point-in-time is the snapshot's nature; drift between snapshots is its own problem and its own article. Dijkstra's line of testing shows the presence of bugs, never their absence applies verbatim to scanning: a list of findings tells you what was caught. A fixpoint over a complete fact base is different in kind. It is an absence proof, &lt;em&gt;relative to the model&lt;/em&gt;. The relativity is the boundary of the claim, and why  verification lives or dies in collector completeness.&lt;/p&gt;

&lt;h2&gt;
  
  
  The division of labor
&lt;/h2&gt;

&lt;p&gt;Stave owns everything that touches the world: the collectors, the observation snapshot as a reproducible artifact, the normalization of AWS JSON into typed facts, the control catalog, findings with provenance, and the bridge that turns Soufflé derivations back into evaluations you can gate a pipeline on. Soufflé owns one thing: the fixpoint. Facts and a property go in; the closure and its counterexamples come out. Neither is useful alone.&lt;/p&gt;

&lt;p&gt;Against Bishop Fox's IAM Vulnerable lab, the reachability engine finds 30 of 30 documented privilege-escalation paths. Every one of those thirty is a chain. They are not visible as a fact about a single resource.&lt;/p&gt;

&lt;p&gt;"Is port 22 open?" is a fact that is answered by lookup, blind to composition, aging as fast as the incident corpus that motivated it. "Does any path exist from an untrusted principal to a sensitive resource, through any composition of assumption, permission, and network?" is a property that is answered by closure, covering configurations no postmortem has named yet. The property is always smaller than the enumeration: two rules for reachability, against thousands of lines that hand-walk the same graph. And the two rules are the version you can read, dispute, and check.&lt;/p&gt;

&lt;p&gt;The rules are in the repo. Don't trust the author. Run the closure.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Stave is an open-source Risk Reasoner: AWS security findings from configuration snapshots you already have without credentials. It finds the compound attack paths that single-resource scanners miss. The Soufflé reachability engine described here ships in the repo: &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;stave&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>security</category>
      <category>formalmethods</category>
      <category>cloud</category>
    </item>
    <item>
      <title>What Code Looks Like Before and After Spec-Driven Development</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Wed, 18 Nov 2026 12:34:35 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/what-code-looks-like-before-and-after-spec-driven-development-56on</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/what-code-looks-like-before-and-after-spec-driven-development-56on</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If an anonymous user authenticates through a Cognito identity pool, how many S3 buckets can they reach through IAM role chains?&lt;/p&gt;

&lt;p&gt;This is transitive reachability. Following edges through a graph until you run out of paths. The answer requires loading facts, building a graph, computing a transitive closure, and counting reachable resources.&lt;/p&gt;

&lt;p&gt;We will compare what the code looks like in traditional development, and what the same reasoning looks like when agents translate specs to implementations. The difference changes who writes what, what gets tested, and what's maintainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's old and what's new
&lt;/h2&gt;

&lt;p&gt;The idea of writing a specification before writing code is decades old. Multiple disciplines have tried it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;What the spec looks like&lt;/th&gt;
&lt;th&gt;Who closes the gap to working code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Formal Methods (Z/VDM, 1970s)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mathematical notation defining pre/post conditions&lt;/td&gt;
&lt;td&gt;Human mathematician, manually translating to code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Design by Contract (Eiffel, 1986)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Preconditions, postconditions, invariants in the language&lt;/td&gt;
&lt;td&gt;The compiler checks contracts but humans write the implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;TLA+ / Alloy (1990s-2000s)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Temporal logic / relational logic specs&lt;/td&gt;
&lt;td&gt;Human verifies the spec, then manually writes a conforming implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;BDD/Cucumber (2008)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;"Given/When/Then" in English-like syntax&lt;/td&gt;
&lt;td&gt;Human writes step definitions that map specs to test code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenAPI / Protobuf (2010s)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;API shape definitions&lt;/td&gt;
&lt;td&gt;Code generators produce client/server stubs; humans fill in the logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Property-based testing (QuickCheck)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Properties the code must satisfy&lt;/td&gt;
&lt;td&gt;The framework generates test inputs; humans write the implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every one of these hit the same bottleneck: &lt;strong&gt;a human must translate the spec into working code.&lt;/strong&gt; The spec is clear. The translation is expensive. The spec and the code drift apart because maintaining both costs twice as much as maintaining one.&lt;/p&gt;

&lt;p&gt;BDD is the clearest example of the failure mode. Teams write beautiful Cucumber specs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gherkin"&gt;&lt;code&gt;Given a user with group membership in "analysts"
When the user requests access to "pii_store"
Then access should be denied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then a developer writes step definitions:&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="nd"&gt;@given&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'a user with group membership in "{group}"'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;step_impl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_test_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;add_to_group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The spec says what should happen. The step definition says how to test it. The actual implementation is a third artifact that nobody verifies against the spec automatically. Three artifacts, maintenance burdens and inevitable drift.&lt;/p&gt;

&lt;h3&gt;
  
  
  What changed: agents close the translation gap
&lt;/h3&gt;

&lt;p&gt;The reason spec-driven development stalled was the translation cost. A human translating a TLA+ spec into Java takes days. A human writing Cucumber step definitions takes hours per scenario. The spec was always valuable. The translation was always expensive. So teams skipped the spec and wrote the code directly.&lt;/p&gt;

&lt;p&gt;Agents change the economics:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Before agents&lt;/th&gt;
&lt;th&gt;After agents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Human writes spec: 2 hours&lt;/td&gt;
&lt;td&gt;Human writes spec: 2 hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human translates to code: 8 hours&lt;/td&gt;
&lt;td&gt;Agent translates to code: 30 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human maintains both: ongoing&lt;/td&gt;
&lt;td&gt;Agent regenerates from spec: 30 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total: spec costs 2× code&lt;/td&gt;
&lt;td&gt;Total: spec costs ~0× more than code&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When translation costs 30 seconds instead of 8 hours, the spec becomes free to translate. Not free to write. The reasoning still requires domain expertise. The spec is the only artifact the human maintains. The code is regenerated.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's different in spec-driven development this time
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The spec defines reasoning steps, not just shape or behavior.&lt;/strong&gt; OpenAPI defines what an API looks like. BDD defines what should happen. This spec defines HOW to reason  step by step, with explicit rules at each step. The agent generates a complete reasoning implementation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The spec carries its own test (expected_result).&lt;/strong&gt; BDD separates the spec from the test. This spec includes the expected answer for a specific input. The test is built in. The agent's output is verified against the spec's declared answer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The spec is engine-portable.&lt;/strong&gt; OpenAPI generates clients in multiple languages but for one protocol (HTTP). This spec generates implementations for fundamentally different engines such as Soufflé (Datalog), Z3 (SMT), Clingo (ASP), Python (imperative). Same reasoning, different computational models. The agent handles the translation between reasoning and engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The human writes WHAT to reason about, not HOW to implement it.&lt;/strong&gt; The domain expert writes: "start at unauthenticated identity pools, follow role assumption edges, count reachable buckets." The agent decides whether to implement that as a recursive Python function, a Datalog transitive closure, or an SMT fixpoint assertion.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Before: You write the reasoning as code
&lt;/h2&gt;

&lt;p&gt;The traditional approach: a developer writes Python that loads the data, implements the closure, and produces the answer.&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;# reachability.py — 87 lines of imperative reasoning&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;defaultdict&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_triples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filepath&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Load JSONL triples into a graph structure."""&lt;/span&gt;
    &lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defaultdict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;defaultdict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filepath&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="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="k"&gt;in&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;triple&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;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"subject"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"predicate"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;find_identity_pools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Find Cognito identity pools that allow unauthenticated access."""&lt;/span&gt;
    &lt;span class="n"&gt;pools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"has_type"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="s2"&gt;"cognito_identity_pool"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"has_type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"has_allows_unauthenticated"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="s2"&gt;"true"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"has_allows_unauthenticated"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;pools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pools&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;find_role_for_pool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pool_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Find the IAM role mapped to a Cognito identity pool."""&lt;/span&gt;
    &lt;span class="n"&gt;roles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"has_type"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="s2"&gt;"iam_role"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"has_type"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="s2"&gt;"has_identity_pool_source"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&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;pool_id&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;predicates&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"has_identity_pool_source"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;roles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;roles&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;transitive_closure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start_nodes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;edge_predicate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Compute transitive closure following a specific edge type."""&lt;/span&gt;
    &lt;span class="n"&gt;reachable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_nodes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;frontier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_nodes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;frontier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;next_frontier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;frontier&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;node&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;edge_predicate&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;edge_predicate&lt;/span&gt;&lt;span class="p"&gt;]&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;target&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;reachable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                        &lt;span class="n"&gt;reachable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                        &lt;span class="n"&gt;next_frontier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;frontier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;next_frontier&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reachable&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;find_readable_buckets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;role_ids&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Find S3 buckets readable by any of the given roles."""&lt;/span&gt;
    &lt;span class="n"&gt;buckets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;role_id&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;role_ids&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;role_id&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pred&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;objects&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;role_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&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;pred&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"has_s3_read_access"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_s3_full_access"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;buckets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;buckets&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Usage: python reachability.py &amp;lt;facts.jsonl&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_triples&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 1: Find unauthenticated identity pools&lt;/span&gt;
    &lt;span class="n"&gt;pools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;find_identity_pools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 2: Find roles mapped to those pools&lt;/span&gt;
    &lt;span class="n"&gt;initial_roles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;initial_roles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;find_role_for_pool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 3: Compute transitive closure on role assumption&lt;/span&gt;
    &lt;span class="n"&gt;all_reachable_roles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;transitive_closure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;initial_roles&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_can_assume"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 4: Find buckets readable by any reachable role&lt;/span&gt;
    &lt;span class="n"&gt;reachable_buckets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;find_readable_buckets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;all_reachable_roles&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&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="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"anonymous_identity_pools"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pools&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"initial_roles"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;initial_roles&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"reachable_roles_via_assumption"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;all_reachable_roles&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"reachable_buckets"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reachable_buckets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"bucket_arns"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reachable_buckets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&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="s2"&gt;"__main__"&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;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works. It's also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;87 lines of code&lt;/strong&gt; a developer wrote, debugged, and maintains&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implicitly coupled&lt;/strong&gt; to the JSONL field names (&lt;code&gt;has_type&lt;/code&gt;, &lt;code&gt;has_allows_unauthenticated&lt;/code&gt;, &lt;code&gt;has_can_assume&lt;/code&gt;) — if the export format changes, the code silently produces wrong results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untestable without fixtures&lt;/strong&gt; — you need a complete JSONL file to run it, and you need to manually verify the answer is correct&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Locked to Python&lt;/strong&gt; — a team that uses Go or Rust rewrites it from scratch&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One engine only&lt;/strong&gt; — if you want Z3 to prove the same reachability, or Soufflé to enumerate the paths, you write two more implementations with the same logic in different syntaxes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The developer wrote the reasoning, the graph traversal, the field name matching, and the output formatting. The security knowledge (what "reachable" means, what edges to follow) is mixed into the code alongside the implementation mechanics (JSON parsing, set operations, graph traversal). A security engineer reading this code has to understand Python to understand the reasoning. A Python developer reading this code has to understand security to verify the logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  After: You write the reasoning as a spec
&lt;/h2&gt;

&lt;p&gt;The spec-driven approach: a developer writes a YAML spec that describes the reasoning. An agent translates it to any engine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# reasoning-spec: anonymous-reachability
# engine: any (soufflé, python, clingo, z3, prolog)
&lt;/span&gt;
&lt;span class="na"&gt;question&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="s"&gt;How many S3 buckets can an anonymous user reach through&lt;/span&gt;
  &lt;span class="s"&gt;IAM role chains starting from unauthenticated Cognito&lt;/span&gt;
  &lt;span class="s"&gt;identity pools?&lt;/span&gt;

&lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="s"&gt;In AWS, a Cognito identity pool can map unauthenticated&lt;/span&gt;
  &lt;span class="s"&gt;users to an IAM role. That role may be able to assume&lt;/span&gt;
  &lt;span class="s"&gt;other roles (role chaining). Each role in the chain may&lt;/span&gt;
  &lt;span class="s"&gt;have S3 read access. The transitive closure of role&lt;/span&gt;
  &lt;span class="s"&gt;assumptions determines the full blast radius.&lt;/span&gt;

&lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;stave export-sir --format jsonl&lt;/span&gt;
  &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;jsonl&lt;/span&gt;
  &lt;span class="na"&gt;required_fields&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;subject (resource ARN)&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;predicate (relationship type)&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;object (target value or ARN)&lt;/span&gt;

&lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Find unauthenticated identity pools&lt;/span&gt;
      &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;All triples&lt;/span&gt;
      &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set of pool ARNs&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;Select subjects where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="s"&gt;predicate == "has_type" AND object == "cognito_identity_pool"&lt;/span&gt;
        &lt;span class="na"&gt;AND where the same subject has&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="s"&gt;predicate == "has_allows_unauthenticated" AND object == "true"&lt;/span&gt;

    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Find IAM roles mapped to those pools&lt;/span&gt;
      &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pool ARNs from step 1&lt;/span&gt;
      &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set of initial role ARNs&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;Select subjects where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="s"&gt;predicate == "has_type" AND object == "iam_role"&lt;/span&gt;
        &lt;span class="na"&gt;AND where the same subject has&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="s"&gt;predicate == "has_identity_pool_source" AND object IN pool_arns&lt;/span&gt;

    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Compute transitive closure on role assumption&lt;/span&gt;
      &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Initial role ARNs from step 2&lt;/span&gt;
      &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set of all reachable role ARNs&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;Starting from initial_roles, repeatedly follow edges where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="s"&gt;predicate == "has_can_assume"&lt;/span&gt;
        &lt;span class="s"&gt;Add each target to the reachable set.&lt;/span&gt;
        &lt;span class="s"&gt;Continue until no new targets are found.&lt;/span&gt;
        &lt;span class="s"&gt;The result includes the initial roles plus all&lt;/span&gt;
        &lt;span class="s"&gt;transitively reachable roles.&lt;/span&gt;

    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Find S3 buckets readable by reachable roles&lt;/span&gt;
      &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;All reachable role ARNs from step 3&lt;/span&gt;
      &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Set of bucket ARNs&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;For each reachable role, find triples where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="s"&gt;subject == role_arn AND&lt;/span&gt;
          &lt;span class="s"&gt;predicate IN ("has_s3_read_access", "has_s3_full_access")&lt;/span&gt;
        &lt;span class="s"&gt;Collect all objects — these are the reachable bucket ARNs.&lt;/span&gt;

    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Count and report&lt;/span&gt;
      &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Sets from steps 1-4&lt;/span&gt;
      &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Final answer&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="na"&gt;Report&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;length(reachable_buckets)&lt;/span&gt;
          &lt;span class="na"&gt;anonymous_identity_pools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;length(pools)&lt;/span&gt;
          &lt;span class="na"&gt;reachable_roles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;length(all_reachable_roles)&lt;/span&gt;

&lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;json&lt;/span&gt;
  &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;integer&lt;/span&gt;
    &lt;span class="na"&gt;anonymous_identity_pools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;integer&lt;/span&gt;
    &lt;span class="na"&gt;reachable_roles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;integer&lt;/span&gt;

  &lt;span class="na"&gt;expected_result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
    &lt;span class="na"&gt;anonymous_identity_pools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;reachable_roles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;

&lt;span class="na"&gt;validation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;exact_match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;anonymous_reachable_count&lt;/span&gt;
  &lt;span class="na"&gt;semantic_match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;reachable_roles (within ±0 — exact for this fixture)&lt;/span&gt;
  &lt;span class="na"&gt;ignore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;output ordering&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;whitespace&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is &lt;strong&gt;42 lines of YAML&lt;/strong&gt; (excluding the expected_result block which is the test). No Python, Go or Rust. No graph traversal code, JSON parsing or set operations.&lt;/p&gt;

&lt;p&gt;What happens next:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Agent reads the spec and produces a Soufflé implementation&lt;/span&gt;
agent translate --spec anonymous-reachability.yaml --engine souffle
&lt;span class="c"&gt;# Output: reachability.dl (25 lines of Datalog)&lt;/span&gt;

&lt;span class="c"&gt;# Agent reads the spec and produces a Python implementation&lt;/span&gt;
agent translate --spec anonymous-reachability.yaml --engine python
&lt;span class="c"&gt;# Output: reachability.py (similar to the 87-line version above, but generated)&lt;/span&gt;

&lt;span class="c"&gt;# Agent reads the spec and produces Clingo rules&lt;/span&gt;
agent translate --spec anonymous-reachability.yaml --engine clingo
&lt;span class="c"&gt;# Output: reachability.lp (15 lines of ASP)&lt;/span&gt;

&lt;span class="c"&gt;# All three produce the same answer: anonymous_reachable_count: 12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent's output is verified against the &lt;code&gt;expected_result&lt;/code&gt; in the spec. If any engine produces a different count, the translation has a bug. The spec is the test.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the agent generates from the spec
&lt;/h2&gt;

&lt;p&gt;The spec above is enough for an agent to produce this Soufflé program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight prolog"&gt;&lt;code&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Generated&lt;/span&gt; &lt;span class="n"&gt;by&lt;/span&gt; &lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="n"&gt;anonymous&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;reachability&lt;/span&gt; &lt;span class="n"&gt;spec&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Input&lt;/span&gt; &lt;span class="n"&gt;relations&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loaded&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="no"&gt;JSONL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;object&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt; &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;IO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"facts.facts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;delimiter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"\t"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Step&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Unauthenticated&lt;/span&gt; &lt;span class="n"&gt;identity&lt;/span&gt; &lt;span class="n"&gt;pools&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;unauth_pool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;unauth_pool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_type"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"cognito_identity_pool"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_allows_unauthenticated"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Step&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Initial&lt;/span&gt; &lt;span class="n"&gt;roles&lt;/span&gt; &lt;span class="n"&gt;mapped&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;pools&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;initial_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;initial_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_type"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"iam_role"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_identity_pool_source"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;unauth_pool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;P&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Step&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Transitive&lt;/span&gt; &lt;span class="n"&gt;closure&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt; &lt;span class="n"&gt;assumption&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;reachable_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;reachable_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;initial_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nf"&gt;reachable_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;reachable_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_can_assume"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Step&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Reachable&lt;/span&gt; &lt;span class="n"&gt;buckets&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;reachable_bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;reachable_bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;B&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;reachable_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_s3_read_access"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;B&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nf"&gt;reachable_bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;B&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;
    &lt;span class="nf"&gt;reachable_role&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;triple&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;R&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_s3_full_access"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;B&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="nc"&gt;Output&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decl&lt;/span&gt; &lt;span class="nf"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;N&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="no"&gt;N&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;reachable_bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="n"&gt;anonymous_reachable_count&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;25 lines. Each step in the spec maps to one Datalog rule. The transitive closure (step 3) is two lines in Datalog. The recursive rule that Soufflé evaluates natively. The Python version needed a 15-line &lt;code&gt;while&lt;/code&gt; loop with frontier sets.&lt;/p&gt;

&lt;p&gt;That's the leverage: the spec describes WHAT to compute. The engine handles HOW. Soufflé computes transitive closures natively. Python needs explicit graph traversal. Z3 needs fixpoint assertions. The spec is the same for all three. The agent translates.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Before (code)&lt;/th&gt;
&lt;th&gt;After (spec)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What the developer writes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;87 lines of Python with graph traversal, JSON parsing, set operations&lt;/td&gt;
&lt;td&gt;42 lines of YAML describing the reasoning steps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What the developer maintains&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The Python code. If the JSONL format changes, find and fix every field reference.&lt;/td&gt;
&lt;td&gt;The spec. Field names are listed once in &lt;code&gt;required_fields&lt;/code&gt; and in step rules. One place to update.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What gets tested&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The Python implementation against hand-verified fixtures&lt;/td&gt;
&lt;td&gt;The spec's expected_result against ANY implementation. Agent produces the code, spec verifies the answer.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Language lock-in&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Python only. Go team rewrites. Rust team rewrites.&lt;/td&gt;
&lt;td&gt;No lock-in. Agent generates for any engine from the same spec.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Engine portability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One engine (Python). Z3 or Soufflé requires a complete rewrite.&lt;/td&gt;
&lt;td&gt;Any engine. Same spec → Soufflé (25 lines), Clingo (15 lines), Python (87 lines), Z3 (40 lines).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Who can contribute&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Someone who knows Python AND graph algorithms AND the JSONL format&lt;/td&gt;
&lt;td&gt;Someone who understands the security question. The spec is readable English with precise rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What the code review covers&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;"Is this graph traversal correct? Does this JSON parsing handle edge cases? Is the set intersection right?"&lt;/td&gt;
&lt;td&gt;"Is this reasoning step correct? Does this rule match the security question?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;How bugs are found&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Run the code, compare output, debug the Python&lt;/td&gt;
&lt;td&gt;Run ANY agent translation against the expected_result. Wrong answer = spec bug or agent bug, distinguishable by signature.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The deeper shift: reasoning as data
&lt;/h2&gt;

&lt;p&gt;In the Python version, the security reasoning is embedded in code:&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="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;pred&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"has_s3_read_access"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"has_s3_full_access"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This line encodes the domain knowledge that S3 access comes through two predicates. It's  in a function called &lt;code&gt;find_readable_buckets&lt;/code&gt;. A security engineer reviewing the code has to read Python to find the assumption. A developer modifying this code might not realize this line is the security reasoning. It looks like any other conditional.&lt;/p&gt;

&lt;p&gt;In the spec version, the same reasoning is explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="na"&gt;For each reachable role, find triples where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s"&gt;subject == role_arn AND&lt;/span&gt;
    &lt;span class="s"&gt;predicate IN ("has_s3_read_access", "has_s3_full_access")&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The domain knowledge is in the &lt;code&gt;rule:&lt;/code&gt; field. It's readable without knowing any programming language. A security engineer reviews the rule, not the code. A developer implementing the rule knows exactly what the security engineer intended. The rule is the spec.&lt;/p&gt;

&lt;p&gt;This separation of reasoning as data makes spec-driven development work. The spec captures WHAT the security question means. The agent handles HOW to answer it in a specific engine. The expected_result verifies the answer is correct. Three concerns and  artifacts are separated.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three artifacts
&lt;/h2&gt;

&lt;p&gt;In traditional development, one file does three jobs: it documents the reasoning (via comments), implements the reasoning (via code), and tests the reasoning (via assertions). When the code changes, the documentation drifts. When the test changes, the implementation might not match.&lt;/p&gt;

&lt;p&gt;In spec-driven development, there's one artifact that does all three:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;question&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;           &lt;span class="c1"&gt;# Documentation: what this answers
&lt;/span&gt;  &lt;span class="s"&gt;How many S3 buckets...&lt;/span&gt;

&lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;              &lt;span class="c1"&gt;# Implementation guide: how to answer it
&lt;/span&gt;    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;...&lt;/span&gt;

&lt;span class="na"&gt;expected_result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="c1"&gt;# Test: what the correct answer is
&lt;/span&gt;  &lt;span class="na"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The spec is simultaneously the documentation, the implementation guide, and the test definition. They can't drift from each other because they're the same file. A change to the reasoning steps that doesn't change the expected result is a refactor. A change that does change the expected result is a behavior change that is visible in the diff.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resemblance to LISP
&lt;/h2&gt;

&lt;p&gt;In LISP, homoiconicity means code is data, data is code, programs that write programs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What LISP did:&lt;/strong&gt; Code and data share the same representation (S-expressions). A LISP program can inspect, transform, and generate other LISP programs because code is data. The macro reads code as a data structure, transforms it, and emits new code. The insight: if code is data, programs can write programs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What spec-driven development does:&lt;/strong&gt; Reasoning and implementation are separated. The reasoning (spec) is data. The implementation (generated code) is code. They are deliberately different representations. The spec is YAML. The implementation is Soufflé, Python, Z3, or Clingo. The insight: if reasoning is data, agents can write implementations in any language, for any engine.&lt;/p&gt;

&lt;p&gt;The comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;LISP&lt;/th&gt;
&lt;th&gt;Spec-driven development&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Core principle&lt;/td&gt;
&lt;td&gt;Code = data (same representation)&lt;/td&gt;
&lt;td&gt;Reasoning = data, implementation = code (different representations)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who writes programs?&lt;/td&gt;
&lt;td&gt;Programs write programs (macros)&lt;/td&gt;
&lt;td&gt;Agents write implementations (from specs)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What's portable?&lt;/td&gt;
&lt;td&gt;Code is portable across LISP (it's all S-expressions)&lt;/td&gt;
&lt;td&gt;Reasoning is portable across ALL languages (spec is engine-independent)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What's the template?&lt;/td&gt;
&lt;td&gt;A macro (code that emits code)&lt;/td&gt;
&lt;td&gt;A spec (data that agents translate to any engine)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What's verified?&lt;/td&gt;
&lt;td&gt;Type system catches structural errors at compile time&lt;/td&gt;
&lt;td&gt;Expected_result catches reasoning errors at test time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lock-in&lt;/td&gt;
&lt;td&gt;Locked to LISP (homoiconicity requires one representation)&lt;/td&gt;
&lt;td&gt;Locked to nothing (YAML spec → any language, any engine)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;LISP unified code and data into one representation. That's powerful within LISP where macros can do things no other language's metaprogramming can match. But it's locked to LISP. You can't take a LISP macro and run it in Python. The power comes from the single representation, and the limitation comes from the same place.&lt;/p&gt;

&lt;p&gt;Spec-driven development goes the opposite direction: it deliberately separates reasoning (the spec) from implementation (the generated code). The spec never becomes code. Code is generated from the spec, but the spec remains YAML that is readable by humans, parseable by agents, independent of any programming language. The power comes from the separation.&lt;/p&gt;

&lt;p&gt;LISP can think and speak in the same language. Fast, fluid, powerful, but only in that language. Spec-driven development is a translator who thinks in one language (the spec) and speaks in any language (Soufflé, Python, Z3, Clingo). Slower for any single language, but portable across all of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where LISP's insight still applies
&lt;/h3&gt;

&lt;p&gt;One thing LISP got right: the template is more valuable than the generated program. A LISP macro that generates 50 functions is more valuable than any one of those functions. A spec that generates implementations for 5 engines is more valuable than any one implementation.&lt;/p&gt;

&lt;p&gt;That principle survives the transition from homoiconicity to spec-driven development. The form changes (S-expression → YAML). The separation changes (unified → split). The insight stays: operate at the level of descriptions, not instances. Define the reasoning once, derive the implementations many times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not just write a generic function?
&lt;/h2&gt;

&lt;p&gt;If transitive reasoning is the same algorithm with three parameters (start nodes, edge type, result query), why not write it once as a generic function and call it with different arguments?&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;# Generic transitive closure — one function, all domains&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;transitive_reach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;start_nodes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;edge_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result_filter&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;reachable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_nodes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;frontier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;start_nodes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;frontier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;next_frontier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;frontier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;graph&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_edges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;edge_type&lt;/span&gt;&lt;span class="p"&gt;)&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;target&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;reachable&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;reachable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="n"&gt;next_frontier&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;frontier&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;next_frontier&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;reachable&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;result_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# Security domain&lt;/span&gt;
&lt;span class="n"&gt;compromised&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;transitive_reach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;iam_graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;role_arn&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"can_assume"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_pii_bucket&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Supply chain domain  &lt;/span&gt;
&lt;span class="n"&gt;affected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;transitive_reach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dep_graph&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;vuln_pkg&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"depends_on"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Network domain&lt;/span&gt;
&lt;span class="n"&gt;isolated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;transitive_reach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;topology&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;failed_switch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"connected_to"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_critical&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a macro in all but name. Same algorithm, parameterized by domain-specific inputs. It eliminates code duplication. Why isn't it enough?&lt;/p&gt;

&lt;p&gt;Three reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The generic function parameterizes the algorithm. It doesn't capture the reasoning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The function takes &lt;code&gt;start_nodes&lt;/code&gt;, &lt;code&gt;edge_type&lt;/code&gt;, and &lt;code&gt;result_filter&lt;/code&gt; as arguments. But it doesn't capture WHY those are the right parameters. Why &lt;code&gt;"can_assume"&lt;/code&gt; and not &lt;code&gt;"has_permission"&lt;/code&gt;? Why start at &lt;code&gt;role_arn&lt;/code&gt; and not at &lt;code&gt;user_arn&lt;/code&gt;? Why filter for PII buckets and not all buckets?&lt;/p&gt;

&lt;p&gt;That reasoning where the domain decision about which traversal answers the security question lives in the caller. A code reviewer sees &lt;code&gt;transitive_reach(iam_graph, [role_arn], "can_assume", is_pii_bucket)&lt;/code&gt; and has to reconstruct: "this computes what an attacker can reach through role chaining if they compromise this specific role, filtered to PII-classified resources." The call site doesn't say that. The function doesn't know that. The reasoning is in the engineer's head.&lt;/p&gt;

&lt;p&gt;A spec says it explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;question&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="s"&gt;If this IAM role is compromised, what PII-classified&lt;/span&gt;
  &lt;span class="s"&gt;buckets can the attacker reach through role chaining?&lt;/span&gt;

&lt;span class="na"&gt;reasoning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Start at the compromised role&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Select the role ARN from the input&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;  
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Follow role assumption edges transitively&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;predicate == "can_assume", compute closure&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
      &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Filter to PII buckets&lt;/span&gt;
      &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Select reachable nodes where classification == "pii"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The spec captures the reasoning the generic function can't: why these parameters, what question they answer, what the result means.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The generic function runs in one engine. The spec runs in any engine.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;transitive_reach()&lt;/code&gt; is Python. It computes the answer imperatively. If the auditor says "prove that NO role can reach PII through ANY path," the Python function can only test specific inputs. You need Z3 for a universal proof. The generic function doesn't translate to Z3. You rewrite the reasoning in SMT-LIB.&lt;/p&gt;

&lt;p&gt;The spec translates to any engine because it describes WHAT to compute, not HOW. "Follow role assumption edges transitively" is the same instruction whether Soufflé implements it as recursive Datalog, Z3 implements it as a fixpoint assertion, or Python implements it as a &lt;code&gt;while&lt;/code&gt; loop. The agent handles the translation. The generic function is the translation for one engine. It can't generate the others.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The generic function doesn't carry its own test.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;transitive_reach()&lt;/code&gt; returns a set. Is the set correct? You need a test fixture and a hand-verified expected answer. The generic function doesn't know what correct looks like. It just computes.&lt;/p&gt;

&lt;p&gt;The spec carries &lt;code&gt;expected_result&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;expected_result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;anonymous_reachable_count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any implementation in Python, Soufflé, Z3, Clingo is tested against this number. The spec is the test. The generic function needs a separate test file that someone maintains independently.&lt;/p&gt;

&lt;p&gt;A generic function is the right engineering for the algorithm. A spec is the right engineering for the reasoning. The generic function says "here's a reusable transitive closure." The spec says "here's WHY we're computing this specific closure, WHAT the correct answer is, and HOW to verify any implementation." They operate at different levels. The function parameterizes code. The spec parameterizes intent.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use which approach
&lt;/h2&gt;

&lt;p&gt;Spec-driven development is useful when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The reasoning is the hard part, not the implementation.&lt;/strong&gt; Transitive reachability, compliance mapping, risk scoring — problems where the security logic matters more than the code mechanics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple engines should answer the same question.&lt;/strong&gt; If you want Z3 to prove it AND Soufflé to enumerate it AND Clingo to check constraints, write one spec instead of three implementations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contributors aren't all developers.&lt;/strong&gt; Security engineers, compliance analysts, and risk managers can read and review YAML specs. They can't review Python graph traversal code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The answer must be verifiable.&lt;/strong&gt; The expected_result in the spec is a built-in test. Every agent translation is automatically tested against it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choose traditional code when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The implementation IS the product.&lt;/strong&gt; A custom visualization, a performance-critical algorithm, a UI component — spec-driven development adds indirection without value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There's only one engine and it won't change.&lt;/strong&gt; If you'll only ever run this in Python and never need a Z3 proof or Soufflé enumeration, the spec adds a layer without a benefit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The reasoning is trivial.&lt;/strong&gt; A simple filter or sort doesn't need a spec. The code IS the spec.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What this means for your codebase
&lt;/h2&gt;

&lt;p&gt;If you're building systems where agents generate code such as data pipelines, security analysis, compliance checks, infrastructure automation, the question is "what do the agents target?"&lt;/p&gt;

&lt;p&gt;If agents target your code, they generate implementations that drift from your intent. You review 87 lines of Python that an agent wrote, trying to verify it matches the security reasoning you had in mind. The reasoning is implicit.&lt;/p&gt;

&lt;p&gt;If agents target your specs, they generate implementations that are verified against your declared intent. The spec says what the answer should be. The agent produces code. The expected_result catches bugs. The reasoning is explicit, reviewable, and engine-portable.&lt;/p&gt;

&lt;p&gt;The spec is the contract between the human's security knowledge and the agent's implementation capability. The human writes the reasoning. The agent writes the code. The expected_result verifies they agree.&lt;/p&gt;

&lt;p&gt;That's spec-driven development. The reasoning moves from code to data. The code becomes a generated artifact. The spec becomes the source of truth.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This pattern is implemented in &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt;, an open-source cloud security platform with 5 validated reasoning specs across Z3, Soufflé, Clingo, Prolog, and PRISM. Every spec was trialed by agents that produced correct security verdicts without seeing the implementation code. Try it: &lt;code&gt;bash examples/demo-ai-security/run.sh&lt;/code&gt;&lt;/em&gt; The CNL principle where we declare intent in a constrained vocabulary, separate from enforcement is the same principle the spec uses: declare reasoning in constrained YAML, separate from implementation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>programming</category>
      <category>devops</category>
    </item>
    <item>
      <title>AI Offense Gets Free Oracles. AI Defense is Drowning in Noise. The Fix is Binary Verdicts.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Tue, 17 Nov 2026 12:10:59 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/ai-offense-gets-free-oracles-ai-defense-is-drowning-in-noise-the-fix-is-binary-verdicts-34hd</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/ai-offense-gets-free-oracles-ai-defense-is-drowning-in-noise-the-fix-is-binary-verdicts-34hd</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A penetration tester runs an exploit. Did it work?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pop a shell?           Binary. Yes or no.
Exfiltrate data?       Binary. Yes or no.
Escalate privileges?   Binary. Yes or no.
Return root?           Binary. Yes or no.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every offensive operation has a built-in verifier. The attacker knows instantly whether the attack succeeded without interpretation, triage or maybe. Binary signal at machine speed.&lt;/p&gt;

&lt;p&gt;A SOC analyst reviews an alert. Is it real?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Suspicious login?      Maybe. Could be VPN from a new location.
Unusual API call?      Maybe. Could be a new deployment.
Permission change?     Maybe. Could be legitimate access request.
Data transfer spike?   Maybe. Could be a backup job.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every defensive signal requires interpretation. The analyst triages, investigates, correlates, judges. The signal isn't binary. It's maybe that is buried under many other maybes.&lt;/p&gt;

&lt;p&gt;This is the &lt;strong&gt;Base Rate Fallacy&lt;/strong&gt;, the single biggest reason SOCs fail. A million events per day. One in 100,000 is malicious (the base rate). A detector with 99% true positive rate and 1% false positive rate produces: 9 true positives buried under ~10,000 false positives. Precision: 0.09%. Train an AI on that signal and you get garbage at machine speed.&lt;/p&gt;

&lt;p&gt;This is why AI offense is crushing it while AI defense is drowning. Because offense has better verifiers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verifiability thesis
&lt;/h2&gt;

&lt;p&gt;The insight by researchers across OpenAI, Microsoft, and DARPA:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The ease of training AI to solve a task is proportional to verifiablility of that task.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;AI excels at tasks with mechanical verifiers such as Sudoku (check rows/columns/boxes), chess (did you win?), code (does it compile and pass tests?). AI flounders at tasks without mechanical verifiers such as diet advice (wait years to verify), security alerts (is this real? maybe?).&lt;/p&gt;

&lt;p&gt;The evidence is stacking up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI offense benchmarks:
    GPT-4 → o3: CTF challenge success went from 20% to 90% in eight months
    HackerOne: An AI system became the #1 vulnerability finder
    DARPA AIxCC: Autonomous detection went from 37% to 77% in one year

AI defense benchmarks:
    Google Sec-Gemini (forensic analysis): ~12% precision
    Average SIEM AI copilot: "99% accuracy" on training data, garbage in production
    SOC automation: Faster triage of the same noise
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The contrast tells the story. Offense gets binary signals (did the exploit work?). Defense gets probabilistic signals (is this alert real?). Binary signals train AI effectively. Probabilistic signals produce sophisticated noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six verifier classes
&lt;/h2&gt;

&lt;p&gt;The security research community has identified six classes of mechanical verifiers that produce binary signals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Canary verifiers:        Honeytokens, tripwires, if accessed, something is wrong
2. Provenance attestation:  Signed images, SLSA, SBOMs, did this come from where it claims?
3. Replay harnesses:        Test detections against known attacks, did the rule fire?
4. Invariants / Policy:     Declarative ground truth, "this bucket must not be public"
5. Sandboxing:              Dynamic analysis, did the behavior match expectations?
6. Graph-based verifiers:   Reachability analysis, is this vulnerability reachable in production?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each produces binary output. Each gives AI something to work with rather than against. Each transforms a maybe into a yes or no.&lt;/p&gt;

&lt;p&gt;This architecture was built for Class 4 invariants.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why invariants are the strongest verifier class
&lt;/h2&gt;

&lt;p&gt;Of the six classes, invariants have specific properties the others don't:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coverage.&lt;/strong&gt; Canaries cover what you plant them on. Provenance covers supply chain. Replay covers known attacks. Sandboxing covers what you can execute. Graph analysis covers reachability. Invariants cover the entire state with every resource,  configuration and combination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability.&lt;/strong&gt; Canaries require planting per-resource. Provenance requires signing per-artifact. Replay requires harness per-detection. Sandboxing requires environment per-sample. Invariants require one predicate per pattern that covers infinite specific instances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Composability.&lt;/strong&gt; One invariant produces one binary signal. Multiple invariants compose by conjunction (Alpern-Schneider). The composition is formally sound, unlike combining probabilities from multiple ML models, which requires calibration and produces accuracy degradation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Determinism.&lt;/strong&gt; The invariant produces the same verdict for the same state every time. No model drift, training distribution mismatch or stochastic variation. The binary signal is reproducible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Invariant evaluation:
    Input:     State snapshot (current cloud configuration)
    Predicate: "obs.public_read == false" (declared invariant)
    Output:    COMPLIANT or NON_COMPLIANT

    Signal quality: Binary. Deterministic. Reproducible.
    Precision: 100% for the declared pattern (if the predicate fires, the state violates)
    False positive rate: 0% (the predicate is the DEFINITION of violation)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The false positive rate is 0% because the invariant is the definition. "This bucket must not be public" is a declaration of what the organization considers unsafe. If the predicate fires, the state does violate the declaration. There's nothing to interpret.&lt;/p&gt;

&lt;p&gt;A human might say: "But I WANTED that bucket to be public!" In traditional security, that's called a false positive. In an invariant-based system, that's a policy exception. The invariant correctly identified a state that violates the declared policy. The tool didn't err. The policy needs an exception. In an invariant-based system, there are no false positives, only unauthorized intentions. The tool is a perfect mirror of the policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Microsoft Research validation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Google Sec-Gemini:&lt;/strong&gt; LLM applied to forensic timeline analysis. Result: ~12% precision. Why? Stitching log events into attack narratives lacks mechanical ground truth. The model makes judgment calls without definitive validation. The LLM has no "world model" of the infrastructure. It's guessing about log entries without context. The verifier is missing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Microsoft's Autoreasoning work&lt;/strong&gt; (verifiable driver classification): LLM wrapped with proper scaffolding with sandboxing (Project Freta), decompilers (Ghidra, angr), control-flow graph reconstruction, and a "chain of evidence" validator agent. Result: 98% precision, 83% recall. Why? The verifiers give the LLM a world model. The scaffolding tools provide ground truth. The LLM orchestrates. Every claim maps back to tool outputs. A separate validator cross-checks claims against expert-defined statements.&lt;/p&gt;

&lt;p&gt;Same caliber models. Wildly different outcomes. &lt;strong&gt;The verifier is the variable.&lt;/strong&gt; The verifier gives the AI what raw logs can't: a mechanical world model that produces binary ground truth.&lt;/p&gt;

&lt;p&gt;When the system can't verify something, it flags the claim as unsupported rather than hallucinating confidence. The verifier improves accuracy and produces honest uncertainty rather than confident garbage.&lt;/p&gt;

&lt;p&gt;Deterministic invariant evaluation produces verdict. The verdict is NON_COMPLIANT (verified violation), COMPLIANT (verified safety), or AT_RISK (insufficient evidence is honest uncertainty). AT_RISK is itself a BINARY SIGNAL. It tells the agent: "I cannot prove safety, nor can I prove a violation. I need more data." This prevents the agent from guessing, which is the leading cause of AI-driven outages. Binary signals where the predicate applies. Honest uncertainty where it doesn't.&lt;/p&gt;

&lt;p&gt;The invariant evaluator gives defenders their own "popped shell" moment. The same instant, binary clarity attackers get for free. Did the state violate the invariant? YES or NO. No interpretation, triage or maybe. The oracle defense has been missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How invariant evaluation becomes the AI defense verifier
&lt;/h2&gt;

&lt;p&gt;The architecture that defense needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Today (broken):
    Cloud state → ML model → probabilistic alert → human interprets → maybe acts
    Precision: 0.09%

With invariant verifier:
    Cloud state → invariant evaluation → binary verdict → agent acts or blocks
    Precision: 100% for declared patterns
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The invariant catalog is the mechanical verifier the situation demands. Each catalog entry produces a binary signal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CTL.S3.PUBLIC.READ:           Does this bucket have public_read?     YES/NO
CTL.IAM.ADMIN.INLINE:         Does this role have inline admin?      YES/NO  
CTL.ENCRYPTION.AT_REST:       Is encryption enabled?                 YES/NO
CTL.CHAIN.IAM_S3_PHI:         Does this IAM+S3 combination expose PHI?  YES/NO
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3,000+ binary signals. Each deterministic, reproducible with 0% false positive rate for the declared pattern. An AI agent consuming these signals has ground truth to work with.&lt;/p&gt;

&lt;h2&gt;
  
  
  The agentic architecture this enables
&lt;/h2&gt;

&lt;p&gt;The verifiability thesis says: agents + tools + verifiers = results. Offense gets this for free (the exploit either worked or didn't). Defense must build it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    ┌──────────────────┐
                    │   AI Agent       │
                    │   (orchestrates) │
                    └────────┬─────────┘
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
    ┌──────────────┐  ┌──────────┐  ┌────────────────┐
    │  Invariant   │  │  Graph   │  │   Reasoning    │
    │  Evaluator   │  │  Engine  │  │   Engine       │
    │              │  │          │  │                │
    │  WHAT IS     │  │  WHAT    │  │   WHAT COULD   │
    │  (observe    │  │  CONNECTS│  │   BE           │
    │   current    │  │  (reach- │  │   (project     │
    │   state)     │  │   able?) │  │    attack      │
    │              │  │          │  │    paths)      │
    └──────────────┘  └──────────┘  └────────────────┘
         ↓                 ↓              ↓
    Binary signal     Binary signal   Formal proof
    COMPLIANT/        REACHABLE/      SAT/UNSAT
    NON_COMPLIANT     UNREACHABLE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Evaluator checks WHAT IS (does current state violate an invariant? CEL predicates against snapshots). The Reasoning Engine checks WHAT COULD BE (given these facts, is there a satisfying assignment that produces a privilege escalation? Z3/Soufflé/Prolog against exported facts). The Agent uses the Evaluator to get the observations and the Reasoning Engine to find the projections such as attack paths, reachability, transitive trust chains. Observation + Projection is the gold standard for agentic reasoning.&lt;/p&gt;

&lt;p&gt;This is the architecture Microsoft's Project Ire used and got 98% precision vs Google's 12%. The difference is the better verifiers.&lt;/p&gt;

&lt;p&gt;The invariant evaluator is one verifier in the stack. Graph engines (reachability analysis) are another. Formal reasoning engines (Z3 satisfiability, Soufflé reachability, Prolog logic) are another. Each produces binary or formally-grounded output. The agent consumes all of them.&lt;/p&gt;

&lt;p&gt;The standardized fact export (JSONL, SMT-LIB) makes this work. The invariant evaluator  produce verdicts and exports the underlying facts in formats that reasoning engines consume natively. The agent can feed invariant evaluation results into a Z3 solver and ask: "given these facts, is there a satisfying assignment that produces a privilege escalation?" The answer is binary: SAT (yes, escalation path exists) or UNSAT (no, it doesn't).&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for security vendors
&lt;/h2&gt;

&lt;p&gt;The verifiability thesis produces a sharp vendor evaluation question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"How are you mechanically verifying your outputs?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the answer involves ML confidence scores, probabilistic risk ratings, or "AI-powered insights", the vendor is producing sophisticated noise. The verifier is missing. Precision will be low regardless of model quality.&lt;/p&gt;

&lt;p&gt;If the answer involves mechanical evaluation of state against declared invariants, the vendor has the verifier. Precision will be high. AI agents can use the output.&lt;/p&gt;

&lt;p&gt;The vendor evaluation test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ask:    "What is the false positive rate for your findings?"
If:     "Less than 5%" → they're measuring against heuristics (circular)
If:     "0% for declared patterns — the predicate IS the definition" → they have the verifier

Ask:    "Can an AI agent consume your output without human interpretation?"
If:     "Our AI copilot helps analysts triage" → human still in the loop
If:     "Binary verdicts in JSONL — agent consumes natively" → verifier is machine-ready

Ask:    "What happens when your system can't verify something?"
If:     "It still produces a confidence score" → hallucinated confidence
If:     "It produces AT_RISK — honest uncertainty" → verifier has integrity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The race this changes
&lt;/h2&gt;

&lt;p&gt;Offense has free oracles. Defense has been drowning in noise. The verifiability thesis says: the fix isn't better AI. It's building the oracles defense doesn't have.&lt;/p&gt;

&lt;p&gt;Invariant evaluation is that oracle for cloud state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Offense oracle:     "Did the exploit work?"           → binary
Defense oracle:     "Does this state violate an       → binary
                     invariant?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same structure, binary signal and mechanical verifiability. The difference: offense gets the oracle for free (the exploit either worked or it didn't). Defense must build the oracle (declare invariants, evaluate state, produce verdicts).&lt;/p&gt;

&lt;p&gt;The oracle is buildable. 3,000+ invariants. Deterministic evaluation. Binary verdicts. Standardized fact export for reasoning engines. The mechanical verifier that gives AI defense something to work with rather than against.&lt;/p&gt;

&lt;p&gt;Hackers have oracles built in. Defenders must build them deliberately. The invariant catalog is the oracle. The evaluation kernel is the verifier. The binary verdict is the signal AI agents need.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this relates to existing compliance mods
&lt;/h2&gt;

&lt;p&gt;The binary-verdict criterion the article names also makes existing framework mods agent-consumable. &lt;a href="https://hub.powerpipe.io/mods/turbot/aws_compliance" rel="noopener noreferrer"&gt;&lt;code&gt;turbot/steampipe-mod-aws-compliance&lt;/code&gt;&lt;/a&gt; produces deterministic ok/alarm/info/skip verdicts per control per resource. That's a binary-verdict oracle for the framework-coverage axis, with 540+ controls' worth of pre-built oracle coverage across CIS / PCI / HIPAA / NIST. Stave's compound + ghost-reference catalog produces the same shape of binary verdict for a different axis: cross-resource invariants the framework-mod controls don't cover. Two oracle layers, both machine-verifiable, both consumable by the same AI defender loop. The article's "oracle is buildable" claim is stronger when the oracles compose; running both against the same snapshot gives the AI defender per-framework verdicts AND per-chain verdicts from one pipeline. Comparison: &lt;a href="https://github.com/sufield/stave/blob/main/docs/comparison/aws-compliance-mod.md" rel="noopener noreferrer"&gt;aws-compliance-mod&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The mechanical verifier for AI defense with 3,000+ CEL-predicate invariants producing binary verdicts (COMPLIANT/NON_COMPLIANT/AT_RISK). Deterministic. Reproducible. 0% false positive rate for declared patterns. Standardized facts (JSONL, SMT-LIB) exported for AI agents and external reasoning engines (Z3, Soufflé, Prolog). &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt;, an open-source risk reasoning engine. The oracle defense has been missing. Try it: &lt;code&gt;bash examples/demo-ai-security/run.sh&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>cloud</category>
      <category>architecture</category>
    </item>
    <item>
      <title>SMT-LIB: The Language That Turns Cloud Security From Guesswork Into Proof</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Mon, 16 Nov 2026 13:11:15 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/smt-lib-the-language-that-turns-cloud-security-from-guesswork-into-proof-1657</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/smt-lib-the-language-that-turns-cloud-security-from-guesswork-into-proof-1657</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your cloud security scanner tells you a finding exists. An SMT solver tells you &lt;em&gt;why&lt;/em&gt; or proves the finding is impossible. This is a checklist vs a mathematical guarantee.&lt;/p&gt;

&lt;p&gt;SMT-LIB is the international standard language for communicating with SMT (Satisfiability Modulo Theories) solvers. Z3, cvc5, or Yices are solvers that verify Intel processor designs and NASA flight software. SMT-LIB is a way to talk to them.&lt;/p&gt;

&lt;p&gt;This article explains SMT-LIB, why it matters for cloud security, and how an open-source tool called Stave uses it to detect compound misconfigurations that no checklist scanner can find.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is SMT-LIB
&lt;/h2&gt;

&lt;p&gt;SMT-LIB provides three things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A standard syntax.&lt;/strong&gt; Based on S-expressions (Lisp-style parenthesized notation). Every SMT solver in the world reads the same format. Write once, verify with any solver.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mathematical theories.&lt;/strong&gt; Standardized ways to reason about strings (ARN matching, wildcard expansion), integers (port ranges, CIDR arithmetic), booleans (policy allow/deny), and arrays (permission sets). These theories make SMT solvers more powerful than simple SAT solvers. They understand the &lt;em&gt;meaning&lt;/em&gt; of the data, not just true/false flags.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A logic hierarchy.&lt;/strong&gt; You choose how expressive your logic needs to be. Quantifier-free boolean logic is fast but limited. Full first-order logic with strings and arithmetic is slower but can express questions like "does there exist &lt;em&gt;any&lt;/em&gt; principal that can reach &lt;em&gt;any&lt;/em&gt; resource containing PHI through &lt;em&gt;any&lt;/em&gt; chain of role assumptions?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Cloud Security Needs This
&lt;/h2&gt;

&lt;p&gt;Every cloud security scanner on the market checks components one at a time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this bucket public?&lt;/li&gt;
&lt;li&gt;Is MFA enabled?&lt;/li&gt;
&lt;li&gt;Is this role overpermissioned?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Attackers don't check components. They check compositions. The Capital One breach exploited five configurations that each passed every individual check. The vulnerability was the &lt;em&gt;interaction&lt;/em&gt; between them. A Cognito identity pool granting anonymous AWS credentials to a role that had S3 access to a bucket containing 100 million customer records.&lt;/p&gt;

&lt;p&gt;No individual check catches this. The question to answer is: "Can an unauthenticated internet user reach confidential data through a chain of services?" That's a satisfiability question that SMT solvers are designed to answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: The Compound Chain
&lt;/h2&gt;

&lt;p&gt;Here's SMT-LIB query when checking a cross-service attack chain. This is the query structure that runs against real AWS configuration snapshots.&lt;/p&gt;

&lt;p&gt;First, Stave exports configuration facts as SMT-LIB assertions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(set-logic ALL)

;; --- Asset declarations ---
(declare-fun allows_unauthenticated (String String) Bool)
(declare-fun maps_unauth_to (String String) Bool)
(declare-fun has_action (String String) Bool)
(declare-fun has_resource (String String) Bool)
(declare-fun has_tag (String String) Bool)

;; --- Facts from the configuration snapshot ---
(assert (allows_unauthenticated
  "arn:aws:cognito-identity:us-east-1:111122223333:identitypool/abc"
  "true"))

(assert (maps_unauth_to
  "arn:aws:cognito-identity:us-east-1:111122223333:identitypool/abc"
  "arn:aws:iam::111122223333:role/AppUnauthRole"))

(assert (has_action
  "arn:aws:iam::111122223333:role/AppUnauthRole"
  "s3:GetObject"))

(assert (has_resource
  "arn:aws:iam::111122223333:role/AppUnauthRole"
  "arn:aws:s3:::sensitive-data/*"))

(assert (has_tag
  "arn:aws:s3:::sensitive-data"
  "data_classification:confidential"))

;; --- Closed-world axioms (if a fact isn't asserted, it's false) ---
(assert (forall ((x String) (y String))
  (=&amp;gt; (allows_unauthenticated x y)
      (and (= x "arn:aws:cognito-identity:us-east-1:111122223333:identitypool/abc")
           (= y "true")))))
;; (similar axioms for each predicate — omitted for brevity)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are &lt;strong&gt;facts only&lt;/strong&gt; about the configuration. No rules or queries. Stave's job ends here.&lt;/p&gt;

&lt;p&gt;Now, a separate query file asks the question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;;; Query: Can an anonymous user reach confidential data?

(declare-const pool String)
(declare-const role String)
(declare-const action String)
(declare-const resource String)

;; The pool allows unauthenticated access
(assert (allows_unauthenticated pool "true"))

;; The pool maps to a role
(assert (maps_unauth_to pool role))

;; The role has an S3 action
(assert (has_action role action))

;; The role can access a resource
(assert (has_resource role resource))

;; The resource contains confidential data
(assert (has_tag resource "data_classification:confidential"))

(check-sat)
(get-model)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this through Z3:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat facts.smt2 query.smt2 | z3 -in
sat
(
  (pool "arn:aws:cognito-identity:us-east-1:111122223333:identitypool/abc")
  (role "arn:aws:iam::111122223333:role/AppUnauthRole")
  (action "s3:GetObject")
  (resource "arn:aws:s3:::sensitive-data/*")
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;sat&lt;/code&gt; means the attack path exists.&lt;/strong&gt; Z3 didn't just say yes. It named the specific pool, role, action, and resource that constitute the path. This is a constructive proof: the witness is the exploit.&lt;/p&gt;

&lt;p&gt;Run the same file through cvc5 and Yices:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ cat facts.smt2 query.smt2 &lt;span class="o"&gt;|&lt;/span&gt; cvc5 --lang smt2 --finite-model-find
sat

$ cat facts.smt2 query.smt2 &lt;span class="o"&gt;|&lt;/span&gt; yices-smt2
sat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three solvers from three independent institutions (Microsoft Research, Stanford/Iowa, SRI International) agree. This is a mathematical certainty.&lt;/p&gt;

&lt;p&gt;Now apply the remediation. Set &lt;code&gt;allow_unauthenticated_identities = false&lt;/code&gt; and re-export the facts. The &lt;code&gt;allows_unauthenticated&lt;/code&gt; assertion disappears from the SMT-LIB file. The closed-world axiom forces it to false for all inputs. Run the same query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ cat remediated-facts.smt2 query.smt2 &lt;span class="o"&gt;|&lt;/span&gt; z3 -in
unsat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;unsat&lt;/code&gt; means the attack path is impossible.&lt;/strong&gt; Not "we didn't find it." Impossible. Proven. The chain is broken at step one because no identity pool allows unauthenticated access.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters: Facts vs. Rules
&lt;/h2&gt;

&lt;p&gt;The critical architectural decision: &lt;strong&gt;Stave exports facts. External programs own rules.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The SMT-LIB file from &lt;code&gt;stave export-sir --format smt2&lt;/code&gt; contains only assertions that shows what the configuration looks like. The query file contains the question that you want to check. They're separate files. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can write new queries without changing Stave&lt;/li&gt;
&lt;li&gt;You can run the same facts through different solvers&lt;/li&gt;
&lt;li&gt;You can share facts with your team while each person asks different questions&lt;/li&gt;
&lt;li&gt;The facts are reusable across any SMT-LIB-compatible tool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is why Stave uses &lt;code&gt;(set-logic ALL)&lt;/code&gt; instead of a restricted logic. It keeps the facts general enough for any query, and lets the solver determine the most efficient strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Modulo Theories Power
&lt;/h2&gt;

&lt;p&gt;Standard SAT solvers understand only true and false. SMT solvers understand mathematical structures that model real-world concepts:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theory of Strings:&lt;/strong&gt; Does &lt;code&gt;arn:aws:s3:::company-frontend-*&lt;/code&gt; match &lt;code&gt;arn:aws:s3:::company-frontend-prod&lt;/code&gt;? Z3's string theory handles wildcard expansion, prefix matching, and ARN comparison natively. The Bybit breach pattern, a wildcard resource grant on production S3 buckets is a string satisfiability question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theory of Integers:&lt;/strong&gt; Is port 8443 inside the range 8000–9000? Is a security group's ingress CIDR a subset of the VPC's CIDR? These are integer arithmetic questions that boolean SAT can't express.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theory of Arrays:&lt;/strong&gt; Does a role's effective permission set (after Allow minus Deny minus Permissions Boundary) include &lt;code&gt;s3:PutObject&lt;/code&gt;? Array theory models sets of permissions.&lt;/p&gt;

&lt;p&gt;Each theory adds reasoning power that's relevant to cloud configuration. The solver combines them automatically. A single query can use strings (ARN matching), integers (port ranges), and booleans (policy effects) together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solver Interchangeability
&lt;/h2&gt;

&lt;p&gt;Because SMT-LIB is a standard, Stave doesn't depend on any single solver:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Solver&lt;/th&gt;
&lt;th&gt;Developer&lt;/th&gt;
&lt;th&gt;Strength&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Z3&lt;/td&gt;
&lt;td&gt;Microsoft Research&lt;/td&gt;
&lt;td&gt;Fast general-purpose solving, strong quantifier handling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;cvc5&lt;/td&gt;
&lt;td&gt;Stanford / Iowa&lt;/td&gt;
&lt;td&gt;Powerful string theory, finite model finding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Yices&lt;/td&gt;
&lt;td&gt;SRI International&lt;/td&gt;
&lt;td&gt;Efficient for large quantified formulas&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The same &lt;code&gt;.smt2&lt;/code&gt; file works with all three. In practice, Z3 handles most cloud security queries sub-second. cvc5 cross-verifies. Yices provides a third independent confirmation. When all three agree, the answer is as certain as mathematics allows.&lt;/p&gt;

&lt;p&gt;When they disagree, it is the most valuable signal. It means either the encoding has a bug (fix the encoder) or one solver found a corner case the others missed (investigate the query). In practice, disagreements have revealed encoding issues that would have been silent with a single solver.&lt;/p&gt;

&lt;h2&gt;
  
  
  How This Fits Into the Larger Pipeline
&lt;/h2&gt;

&lt;p&gt;SMT-LIB is one of two export formats Stave produces. The other is JSONL (subject/predicate/object triples). Together they feed nine reasoning engines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AWS snapshots
  → Stave normalization
    → stave export-sir --format jsonl  →  Soufflé, Clingo, Prolog, PySAT, Risk, TLA+, Game Theory
    → stave export-sir --format smt2   →  Z3, cvc5, Yices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each engine answers a different kind of question from the same facts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Engine&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Format consumed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Z3/cvc5/Yices&lt;/td&gt;
&lt;td&gt;Can this unsafe state exist?&lt;/td&gt;
&lt;td&gt;SMT-LIB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Soufflé&lt;/td&gt;
&lt;td&gt;How many paths are reachable?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clingo&lt;/td&gt;
&lt;td&gt;What violations exist?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prolog&lt;/td&gt;
&lt;td&gt;Why is this path reachable?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PySAT&lt;/td&gt;
&lt;td&gt;Which control combos are unsafe?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Risk model&lt;/td&gt;
&lt;td&gt;How likely is exploitation?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TLA+&lt;/td&gt;
&lt;td&gt;How far from unsafe after fix?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Game theory&lt;/td&gt;
&lt;td&gt;What does the attack cost?&lt;/td&gt;
&lt;td&gt;JSONL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;SMT-LIB handles the questions where you need mathematical proof: "can this state exist?" and "is this configuration safe?" JSONL handles everything else such as enumeration, counting, explanation and quantification.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This proof is valid within the scope of exported SIR facts; the Fact Export reference names which property domains the SIR currently covers.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Business Impact
&lt;/h2&gt;

&lt;p&gt;When a CISO asks "are we safe?" a checklist scanner says "you have 3 critical findings." An SMT solver says "there exists no assignment of principals, actions, and resources that violates your security invariants are proven by three independent solvers."&lt;/p&gt;

&lt;p&gt;When an auditor asks "how do you know this control is effective?" you don't show them a screenshot. You show them the SMT-LIB assertion and the &lt;code&gt;unsat&lt;/code&gt; result. It's a transparent, declarative record of the security logic that is readable, reproducible, and mathematically sound.&lt;/p&gt;

&lt;p&gt;When a developer asks "will this change break security?" you run the proposed configuration through the same queries. If Z3 still returns &lt;code&gt;unsat&lt;/code&gt;, the change is safe. If it flips to &lt;code&gt;sat&lt;/code&gt;, the change created an attack path and the witness names exactly which path.&lt;/p&gt;

&lt;p&gt;This is the shift from "finding bugs" to "proving safety." SMT-LIB is the language that makes the proof portable, verifiable, and solver-independent.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this relates to existing compliance mods
&lt;/h2&gt;

&lt;p&gt;The "finding bugs" vs "proving safety" distinction maps the two tool layers. Framework-coverage mods like &lt;a href="https://hub.powerpipe.io/mods/turbot/aws_compliance" rel="noopener noreferrer"&gt;&lt;code&gt;turbot/steampipe-mod-aws-compliance&lt;/code&gt;&lt;/a&gt; are excellent finders of per-resource bugs. 540+ controls across CIS / PCI / HIPAA / NIST will report every public bucket, every missing-MFA user, every unrotated key the frameworks name. That's the auditor-grade bug-finding layer, and the mod's framework-breadth  makes it useful for that job. SMT-LIB export turns Stave's compositional catalog into proofs over the same snapshot facts, &lt;code&gt;unsat&lt;/code&gt; over the chain conditions means no assignment of principals + resources violates the invariant the chain encodes. Bug-finding for per-resource verdicts; proof-by-solver for compositional verdicts; both run against the same snapshot in the same pipeline. Comparison: &lt;a href="https://github.com/sufield/stave/blob/main/docs/comparison/aws-compliance-mod.md" rel="noopener noreferrer"&gt;aws-compliance-mod&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Stave is an open-source static analysis tool for cloud infrastructure. It evaluates configurations via CEL predicates and exports facts in JSONL and SMT-LIB for consumption by external reasoning engines. All analysis runs on air-gapped snapshots without cloud credentials. &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;github.com/sufield/stave&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>security</category>
      <category>formalverification</category>
      <category>aws</category>
    </item>
    <item>
      <title>Your CISO Doesn't Want More Findings. They Want Proof.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Sun, 15 Nov 2026 12:44:36 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/your-ciso-doesnt-want-more-findings-they-want-proof-2h7o</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/your-ciso-doesnt-want-more-findings-they-want-proof-2h7o</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You run a security scanner on your AWS environment. It finds 47 issues. The leaders hear: "our infrastructure has 47 things wrong with it." This is the problem with bug-finding tools. Every finding is bad news. &lt;/p&gt;

&lt;h2&gt;
  
  
  What Amazon learned from a bank
&lt;/h2&gt;

&lt;p&gt;A finance company could not understand their own IAM policies. The policies were too complex to reason about manually.&lt;/p&gt;

&lt;p&gt;Amazon team said: "We're formalizing the semantics of the policy language. We can prove what your policies allow and don't allow. Mathematically."&lt;/p&gt;

&lt;p&gt;The bank increased their workload and their spending. Because AWS proved properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  The asymmetry
&lt;/h2&gt;

&lt;p&gt;There are two different things a security tool can tell you:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug finding:&lt;/strong&gt; "We found 47 issues in your environment."&lt;/p&gt;

&lt;p&gt;The scanners CSPM, CNAPP, Prowler, Scout Suite do it. They check your configuration against a list of known-bad patterns. Each finding is a problem. The report is a list of problems. More findings = more problems. The tool is useful but the output is always bad news.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Property proving:&lt;/strong&gt; "We verified that no unauthorized principal can reach any sensitive resource in your environment."&lt;/p&gt;

&lt;p&gt;The formal verification does it. The output is a statement about what is TRUE across your entire environment for all possible inputs. The report is evidence of safety. The output is good news.&lt;/p&gt;

&lt;p&gt;Executives want assurance. They want to tell their board, auditors and regulators: "this property holds. Here's the proof."&lt;/p&gt;

&lt;p&gt;AWS team launched tools, interviewed the users. The executives loved soundness. The people writing the checks wanted proofs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for your security tooling
&lt;/h2&gt;

&lt;p&gt;Every scanner on the market is a bug finder. You run it. You get findings. You triage and fix. You run it again. You get more findings. The cycle never ends because the tool is designed to find problems, not to prove their absence.&lt;/p&gt;

&lt;p&gt;The question your CISO wants answer is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can any external principal reach our customer data? (yes or no, with proof)&lt;/li&gt;
&lt;li&gt;Do any privilege escalation paths exist in our IAM graph? (yes or no, with proof)&lt;/li&gt;
&lt;li&gt;Are there any ghost references — resources pointing to things that were deleted? (yes or no, with proof)&lt;/li&gt;
&lt;li&gt;If an auditor asks whether we have unauthorized access paths, what do I tell them? (here's the mathematical evidence)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are property questions. The answer is a proof.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proof in practice
&lt;/h2&gt;

&lt;p&gt;A proof in cloud security is a deterministic evaluation of a specific property against your actual configuration state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Property: No principal outside organization o-abc123 can perform
          s3:GetObject on any resource tagged Sensitivity: High.

Evaluation: 847 resources checked. 23 S3 buckets with Sensitivity: High.
            All 23 evaluated against identity policies, resource policies,
            SCPs, and permission boundaries.

Result: VERIFIED. No external principal can reach any high-sensitivity
        bucket through any policy composition path.

Evidence: Per-resource evaluation trace available.
          Deterministic. Reproducible. Same input → same output, always.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's relevant to the CISO. We verified this property holds across 847 resources. Here's the evidence. Run it again. You'll get the same answer.&lt;/p&gt;

&lt;p&gt;The CISO brings that to the board. The board brings it to the auditor. The auditor accepts mathematical evidence. The conversation shifts from "how many problems do you have?" to "which properties have you verified?"&lt;/p&gt;

&lt;h2&gt;
  
  
  The two conversations
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Conversation A (bug finding):
    Engineer: "We found 47 issues."
    CISO:     "How many did we have last quarter?"
    Engineer: "38."
    CISO:     "So we're getting WORSE?"
    Engineer: "No, we expanded coverage..."
    CISO:     "Fix them. All of them. By Friday."

Conversation B (property proving):
    Engineer: "We verified three properties across the entire environment."
    CISO:     "Which properties?"
    Engineer: "No unauthorized external access paths.
               No privilege escalation chains.
               No ghost references to deleted resources."
    CISO:     "And they hold?"
    Engineer: "Verified. Deterministic. Here's the evidence."
    CISO:     "What properties should we verify next?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conversation A is defensive. The engineer is delivering bad news and defending why there's more of it. The meeting ends with a mandate to fix things.&lt;/p&gt;

&lt;p&gt;Conversation B is constructive. The engineer is delivering evidence of safety. The CISO is asking strategic questions about what to verify next. The meeting ends with a roadmap. &lt;/p&gt;

&lt;p&gt;Same engineer and environment. Different tool and conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Amazon invested in proofs
&lt;/h2&gt;

&lt;p&gt;The business case for formal verification is economic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customers moved workloads to AWS because of proofs.&lt;/strong&gt; Because AWS could prove properties. Financial institutions, government agencies, healthcare organizations are the ones with the strictest requirements moved more data to AWS because the proofs gave them assurance no bug-finding tool could provide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proofs enable fearless infrastructure rewrites.&lt;/strong&gt; Amazon rewrites its infrastructure to lower costs (low-margin business, every penny matters). Formal verification enables that prove the new code is equivalent to the old, ship it confidently. The rewrite pays for the proof. The proof enables the rewrite. Virtuous cycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proofs compound across services.&lt;/strong&gt; A proof of KMS correctness helps every service that uses KMS (which is every service). A proof of the policy interpreter helps every API call to AWS (2 billion per second). Bug findings are local. You find a bug in one service, you fix it in one service. Proofs are global. You prove a property once, every consumer benefits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proofs are the answer to "why should I trust you?"&lt;/strong&gt; When a regulated customer asks "how do I know my data is safe?", "we ran a scanner and found no issues" is weak. "We proved this property holds under these assumptions, and here's the evidence" is strong. The difference is "we looked and didn't see anything" and "we proved nothing is there."&lt;/p&gt;

&lt;h2&gt;
  
  
  The adoption pattern
&lt;/h2&gt;

&lt;p&gt;How formal verification spread inside Amazon:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1: Pitch formal methods to a team.
Step 2: They say "not interested."
Step 3: Don't push. Leave. Wait.
Step 4: They have a bad day. Security incident. Close call.
Step 5: Their priorities change. They call you.
Step 6: "Can you come to the Friday security meeting and explain that formal methods stuff you mentioned?"
Step 7: Adoption happens.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This happened "over and over and over." This works because the value was demonstrated before the need became urgent. The team saw the proof capability. They filed it away as "interesting but not my priority." Then the priority changed. The capability was already there, waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for you
&lt;/h2&gt;

&lt;p&gt;You need a tool that evaluates your configuration state against declared safety properties deterministically and produces evidence you can hand to an auditor.&lt;/p&gt;

&lt;p&gt;The progression:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Today:     Scanner finds 47 issues. You triage. You fix. You run again.
           47 becomes 52. The cycle never ends. Leadership loses confidence.

Step 1:    Run a tool that proves structural properties with no attack paths,
           no privilege escalation, no ghost references from your existing
           configuration. No setup. No tags. Results in minutes.

Step 2:    Bring the evidence to your CISO. Not "we found 47 issues."
           Instead: "we verified 3 properties across 847 resources."

Step 3:    The CISO asks: "what properties should we verify next?"
           You now have a roadmap driven by properties, not by bug counts.

Step 4:    Each quarter, the list of verified properties grows.
           The evidence is cumulative. The story gets stronger.
           The board sees progress measured in proofs, not in bugs.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The scanner doesn't go away. Bug finding is still necessary. You need to fix specific issues. But the conversation shifts from "how many problems do we have?" to "which properties have we verified?" The first question has no good answer (more findings = more problems). The second has a clear trajectory (more verified properties = stronger assurance).&lt;/p&gt;

&lt;h2&gt;
  
  
  The question that changes the conversation
&lt;/h2&gt;

&lt;p&gt;When preparing a security report for leadership, ask yourself:&lt;/p&gt;

&lt;p&gt;Am I delivering a list of problems? Or am I delivering evidence of properties?&lt;/p&gt;

&lt;p&gt;If it's a list of problems, the best case is "fewer problems than last quarter." That's still bad news. The trend you're hoping for is "we're getting closer to zero" which you'll never reach.&lt;/p&gt;

&lt;p&gt;If it's evidence of properties, the best case is "we verified three new properties this quarter, bringing our total to twelve." That's good news. The trend is "the verified surface is growing." The trajectory is progress.&lt;/p&gt;

&lt;p&gt;Amazon learned this from a bank that almost left and stayed because of a proof. Your organization can learn it from a tool that proves properties instead of finding bugs.&lt;/p&gt;

&lt;p&gt;The math and evidence is the same. The conversation it enables and changes everything.&lt;/p&gt;




&lt;h3&gt;
  
  
  Bug Finding vs. Property Proving
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   BUG FINDING (what scanners do)                                        │
│                                                                         │
│   Output:    "We found 47 issues"                                       │
│   Trend:     More coverage → more findings → looks worse                │
│   Evidence:  List of known-bad patterns matched                         │
│   Scope:     Checks inputs you tested                                   │
│   To board:  "We're reducing our issue count" (defensive)               │
│   Feeling:   Bad news. Every report is a list of problems.              │
│                                                                         │
│ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─         │
│                                                                         │
│   PROPERTY PROVING (what verification does)                             │
│                                                                         │
│   Output:    "We verified 3 properties across 847 resources"            │
│   Trend:     More properties verified → stronger assurance              │
│   Evidence:  Mathematical proof over ALL possible inputs                │
│   Scope:     Proves property holds for every case, not just tested ones │
│   To board:  "We proved these properties hold" (constructive)           │
│   Feeling:   Good news. Every report is evidence of safety.             │
│                                                                         │
│   Amazon grew formal verification to 300+ scientists because            │
│   a major bank added "an extra zero to their check" —                   │
│   not because of bug counts, but because of mathematical proofs.        │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The properties your auditor will ask about
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   PROPERTY                              VERIFIED?    EVIDENCE           │
│   ──────────────────────────────────    ─────────    ──────────         │
│   No external principal can reach       ☐ YES        Deterministic      │
│   any sensitive resource                ☐ NO         evaluation trace   │
│                                                                         │
│   No privilege escalation path          ☐ YES        Transitive closure │
│   exists in the IAM graph               ☐ NO         over permissions   │
│                                                                         │
│   No ghost references to                ☐ YES        Cross-reference    │
│   deleted resources exist               ☐ NO         all identifiers    │
│                                                                         │
│   No policy is mathematically           ☐ YES        SMT satisfiability │
│   equivalent to Principal: *            ☐ NO         check              │
│                                                                         │
│   No Deny statement is unreachable      ☐ YES        Condition          │
│   (shadowed / dead code)                ☐ NO         reachability       │
│                                                                         │
│   Evaluation: deterministic, reproducible, same input → same output     │
│   Scope: ALL resources observable in configuration snapshot             │
│   Tool: open source, air-gapped, no cloud credentials required          │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The quarterly security report, transformed
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   BEFORE (scanner-based)          AFTER (property-based)                │
│   ─────────────────────           ────────────────────────              │
│   Q1: 47 findings                 Q1: 3 properties verified             │
│   Q2: 52 findings (worse?)        Q2: 5 properties verified (progress)  │
│   Q3: 38 findings (better?)       Q3: 8 properties verified (progress)  │
│   Q4: 61 findings (???)           Q4: 12 properties verified (progress) │
│                                                                         │
│   Trend: unclear                  Trend: monotonically improving        │
│   Story: "we keep finding bugs"   Story: "verified surface is growing"  │
│   Board reaction: concern         Board reaction: confidence            │
│                                                                         │
│   The scanner doesn't go away. Bug fixing is still necessary.           │
│   But the STRATEGIC conversation shifts from                            │
│   "how many problems?" to "which properties are verified?"              │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;Structural property verification such as attack paths, privilege escalation, ghost references, policy shadowing is implemented in &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt;, an open-source cloud security reasoning engine. 3,000+ safety invariants. Deterministic evaluation. Evidence traces for every finding.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloudsecurity</category>
      <category>aws</category>
      <category>devops</category>
      <category>leadership</category>
    </item>
    <item>
      <title>Defenders Think in Lists. Attackers Think in Graphs. Your Tools Should Too.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Sat, 14 Nov 2026 13:13:03 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/defenders-think-in-lists-attackers-think-in-graphs-your-tools-should-too-424e</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/defenders-think-in-lists-attackers-think-in-graphs-your-tools-should-too-424e</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Cloud security has a structural problem that scanners cannot fix. Most tools catch individual misconfigurations well enough. The problem is that individually correct configurations compose into dangerous states that no individual check can detect. Every setting passes. The system is unsafe. Breaches live in the gap between those two facts.&lt;/p&gt;

&lt;p&gt;This article explains why the gap exists, why it's not fixable by improving scanners, and what it takes to close it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The checklist trap
&lt;/h2&gt;

&lt;p&gt;Most cloud security tools work the same way. They iterate through resources, check each one against a baseline, and report pass or fail. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is encryption enabled? &lt;/li&gt;
&lt;li&gt;Is the bucket private? &lt;/li&gt;
&lt;li&gt;Is MFA enforced? &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each check evaluates one attribute on one resource in isolation.&lt;/p&gt;

&lt;p&gt;This works for a specific class of problems where the settings are universally wrong regardless of context. A bucket with &lt;code&gt;Principal: *&lt;/code&gt; in its policy is public. That's a fact. The check is correct. The finding is actionable.&lt;/p&gt;

&lt;p&gt;But cloud infrastructure isn't a list of independent resources. It's a directed graph. Resources are nodes. Permissions, trust relationships, network routes, and data flows are edges. The security question isn't whether each node has the right attributes, it's whether the edges between nodes create paths that shouldn't exist.&lt;/p&gt;

&lt;p&gt;A checklist tool evaluates nodes. An attacker navigates edges.&lt;/p&gt;

&lt;h2&gt;
  
  
  The compound risk problem
&lt;/h2&gt;

&lt;p&gt;Consider three AWS resources, each correctly configured:&lt;/p&gt;

&lt;p&gt;A Cognito identity pool allows unauthenticated access. This is intentional. The mobile app needs to let users browse a product catalog before signing in. A scanner checks: "Is unauthenticated access configured?" Yes. That's the design.&lt;/p&gt;

&lt;p&gt;An IAM role grants &lt;code&gt;s3:GetObject&lt;/code&gt; on a specific bucket. The role is scoped to one bucket, uses least-privilege actions, and has a trust policy that only allows Cognito to assume it. A scanner checks: "Does this role have admin access?" No. "Is the trust policy scoped?" Yes.&lt;/p&gt;

&lt;p&gt;An S3 bucket is tagged &lt;code&gt;data_classification: phi&lt;/code&gt; and contains patient health records. The bucket is private, encrypted with KMS, and has public access blocked at the account level. A scanner checks: "Is the bucket public?" No. "Is encryption enabled?" Yes. "Is public access blocked?" Yes. &lt;/p&gt;

&lt;p&gt;Three resources and scans. Zero findings.&lt;/p&gt;

&lt;p&gt;But the identity pool maps unauthenticated users to the IAM role. The IAM role can read the PHI bucket. An anonymous internet user can reach patient health records by requesting temporary credentials from the identity pool, assuming the mapped role, and calling &lt;code&gt;s3:GetObject&lt;/code&gt;. No authentication required.&lt;/p&gt;

&lt;p&gt;The vulnerability is in the composition. Three edges connecting three nodes into a path that the operator didn't intend. Scanners that evaluates nodes in isolation will not find it because it doesn't exist on any single node.&lt;/p&gt;

&lt;p&gt;This is a design constraint of the checklist model. The model evaluates attributes. The risk is in relationships.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why more checks don't help
&lt;/h2&gt;

&lt;p&gt;Adding more checks such as identity pool's role mapping, which buckets the mapped role can access, whether those buckets contain sensitive data don't help. Each additional check is still evaluating one attribute on one resource. The question "can an anonymous user reach PHI through this chain of three services?" requires evaluating the composition of all three simultaneously. Something a checklist model cannot express.&lt;/p&gt;

&lt;p&gt;Adding more checks to a checklist tool is like adding more words to a spell checker. The spell checker gets better at verifying individual words. It never learns to verify that the sentences make sense together. The problem is at a different level of abstraction.&lt;/p&gt;

&lt;p&gt;AWS cannot patch this. They provide the graph primitives for IAM, SCPs, resource policies, VPC endpoints, trust relationships. The interactions between those primitives are defined by each organization's specific architecture. AWS can't evaluate compositions that is outside of the shared responsibility model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reactive tools in a proactive problem
&lt;/h2&gt;

&lt;p&gt;Checklist model is reactive. Scanners look for symptoms such as settings that match known-bad patterns. A bucket with &lt;code&gt;Principal: *&lt;/code&gt; matches a pattern. An IAM role with &lt;code&gt;Action: *&lt;/code&gt; matches a pattern. The tool recognizes the symptom and reports it.&lt;/p&gt;

&lt;p&gt;But the symptom isn't the problem. The problem is why the configuration exists. A role with broad permissions was created for a reason such as a migration, a vendor integration, a debugging session. The permissions were never scoped down afterward. Few months later, a scanner flags the broad role. The security team files a ticket. The engineering team says "we might need those permissions." The ticket sits. The role stays. Next scan, same finding. Next ticket, same conversation.&lt;/p&gt;

&lt;p&gt;This is the alert fatigue cycle. The tool reports the same symptoms every scan. The findings are technically correct. The role is overpermissioned. But the finding doesn't explain why the configuration is dangerous in context, what specific risk it creates in composition with other resources, or the operator's original intent. Without that context, the finding is noise. &lt;/p&gt;

&lt;p&gt;A proactive tool asks a different question. Instead of "does this setting match a known-bad pattern?" it asks "does this configuration contradict what the operator declared?" The answer: the operator said the role is &lt;code&gt;readonly&lt;/code&gt; (via a &lt;code&gt;role-type&lt;/code&gt; tag), but the permissions include &lt;code&gt;secretsmanager:GetSecretValue&lt;/code&gt; and &lt;code&gt;lambda:InvokeFunction&lt;/code&gt;. The finding isn't "broad permissions detected". It's "your permissions contradict your stated purpose, and here are the specific actions that don't belong."&lt;/p&gt;

&lt;p&gt;The first finding generates a ticket that sits. The second finding generates a conversation that resolves: either the tag is wrong (update it to match what the role  does) or the permissions are wrong (remove the actions that don't match the declared purpose). Both outcomes are concrete. Neither requires a follow-up scan to verify, re-run the analysis, confirm the contradiction is gone.&lt;/p&gt;

&lt;p&gt;This is the difference between surfacing symptoms and surfacing root causes. A symptom is "this role has 47 actions." A root cause is "this role was declared as readonly but has accumulated secrets_access and compute_control permissions over 18 months, and 8 of 12 accessible services have never been used by any principal assuming it." The first is a number. The second is a narrative with a specific remediation: remove the 8 unused services, split the incompatible categories, and update the tag to match the role's actual function.&lt;/p&gt;

&lt;p&gt;Scanners generate hundreds of findings per scan because they report every symptom on every resource on every run. Most are true positives, the settings really are suboptimal. Few are actionable where the team can't tell which findings represent real risk in composition and which are baseline noise that has existed since the environment was created. The signal-to-noise ratio degrades as the environment grows, because the number of individually-suboptimal settings grows linearly while the number of dangerous compositions grows much slower.&lt;/p&gt;

&lt;p&gt;Intent verification inverts the ratio. Findings fire only when the configuration contradicts a declared intent or when multiple controls compose into a compound chain that crosses a severity threshold. A single overdue vendor review date (1 of 5 delegation controls) doesn't fire the compound chain. It's a governance reminder. Three concurrent delegation failures (unknown principal + scope exceeded + vendor can make bucket public) fires the chain at CRITICAL. That's a real problem with a specific remediation for each axis.&lt;/p&gt;

&lt;p&gt;The result is fewer findings that each carry more information. Each finding names the specific properties, contradiction, and the remediation. Each compound chain names the composition pattern, the member controls that contributed, and the threshold that was exceeded. The security team reads 5 findings instead of 500, and each one tells them what to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The missing variable: intent
&lt;/h2&gt;

&lt;p&gt;Even if a tool could evaluate compositions, it would need to know which compositions are dangerous. Dangerous depends on what the operator intended.&lt;/p&gt;

&lt;p&gt;A public S3 bucket hosting CSS files for a static website is correct. The same configuration on a bucket containing patient records is a HIPAA violation. The bucket settings are identical. The verdict depends on a variable the tool doesn't have: what the operator declared about the data inside.&lt;/p&gt;

&lt;p&gt;In formal terms: &lt;code&gt;verdict = f(configuration, intent)&lt;/code&gt;. The configuration is visible. It's the IAM policy, the bucket settings, the identity pool configuration. Intent is supplied by the operator, and its value changes for every deployment.&lt;/p&gt;

&lt;p&gt;This variable cannot be baked into a model during training. It is unknown before training. No dataset contains this operator's future decisions. It is unknown during training. Patterns from other operators' configurations don't carry this operator's intent. And it is unknown after training. The value is created when the operator makes a deployment decision, after the model is deployed, by an operator the model has never observed.&lt;/p&gt;

&lt;p&gt;A scanner that learns "public buckets are bad" produces false positives on every static website. A scanner that learns "public buckets are fine" misses every PHI exposure. The pattern doesn't generalize because the verdict isn't in the configuration. It's in the relationship between the configuration and the operator's declared intent.&lt;/p&gt;

&lt;p&gt;Tags are useful in declaring intent. &lt;code&gt;data_classification: phi&lt;/code&gt; is the operator's machine-readable declaration of intent: "this bucket contains patient records." Without it, no tool,  scanner, verifier, or human auditor can determine whether the configuration is correct. An operator expresses the correctness for a specific deployment by tagging resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud security as a graph problem
&lt;/h2&gt;

&lt;p&gt;If you visualize an AWS environment, you see a directed graph:&lt;/p&gt;

&lt;p&gt;Nodes are principals (users, roles, agents), resources (buckets, databases, endpoints), and network boundaries (VPCs, subnets, peering connections). Edges are permissions (can assume, can read, can invoke), trust relationships (trusts service X, trusts account Y), data flows (indexes bucket Z, reads from source W), and network routes (peers with VPC Q, routes to CIDR R).&lt;/p&gt;

&lt;p&gt;A scanner evaluates node attributes: is this bucket encrypted? Is this role scoped? These are necessary checks. They verify that individual nodes meet a baseline.&lt;/p&gt;

&lt;p&gt;But the security question is about paths: can an anonymous user reach patient data? Can a compromised vendor account assume a production role? Can a stale EC2 instance pivot into the production VPC through a forgotten peering connection?&lt;/p&gt;

&lt;p&gt;Path questions require evaluating the graph. And the graph grows combinatorially. Each new resource adds nodes, each new policy adds edges, and the number of possible paths increases faster than any team can review manually.&lt;/p&gt;

&lt;h2&gt;
  
  
  State space collapse
&lt;/h2&gt;

&lt;p&gt;The combinatorial explosion occurs in an environment with hundreds of resources and thousands of policies. The state space has billions of possible configuration states. Mapping every possible path is done by graph visualization tools like BloodHound and Cartography. They're valuable for exploration. They're also noisy, showing 10,000 possible paths when the security team needs to know which 3 matter.&lt;/p&gt;

&lt;p&gt;The alternative to mapping every path is defining which states are forbidden and checking whether any of them are reachable. Instead of asking "where can an attacker go?" which produces an explosion of paths. You ask "does any state exist where a public-facing agent can reach PHI data without a guardrail?" The answer is binary: reachable or not. If not, an entire class of risks is eliminated regardless of how many paths exist in the graph.&lt;/p&gt;

&lt;p&gt;Z3, developed by Microsoft Research for verifying flight control software and CPU designs, takes a set of assertions (the configuration facts) and a query (the forbidden state) and returns either &lt;code&gt;sat&lt;/code&gt; (the state is reachable — unsafe) or &lt;code&gt;unsat&lt;/code&gt; (the state is mathematically impossible, proven safe). The proof is deterministic. Run it again, get the same answer. Run it on a different solver (cvc5 from Stanford, Yices from SRI International), get the same answer independently verified.&lt;/p&gt;

&lt;p&gt;The solver doesn't map the graph. It collapses the state space. Billions of possible configurations reduce to one question: is this specific forbidden state reachable from these specific facts? If not, the security team has a proof. A mathematical proof that the dangerous state cannot exist in this configuration.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This proof is valid within the scope of exported SIR facts; the &lt;a href="https://github.com/sufield/stave-guide/blob/main/reference/fact-export.md#scope-of-the-exported-fact-set" rel="noopener noreferrer"&gt;Fact Export reference&lt;/a&gt; names which property domains the SIR currently covers.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Safety engineering, not threat hunting
&lt;/h2&gt;

&lt;p&gt;Most security tools are adversary-focused: they look for threats, attacks, and exploits. The question is "is an attacker present?" or "can an attacker do X?"&lt;/p&gt;

&lt;p&gt;But a configuration that allows unintended access is a failure regardless of whether an attacker is present. A bucket that's one setting change away from exposing patient data is waiting for a tired engineer making a change. The dangerous state is latent in the configuration. The trigger is irrelevant.&lt;/p&gt;

&lt;p&gt;Aviation safety doesn't wait for a crash to find structural problems. Nuclear safety doesn't wait for a meltdown. They define safety envelopes, sets of invariants that the system must satisfy at all times and verify continuously that the system stays within them. If a fuel line configuration allows pressure to exceed a threshold, the system is unsafe now, before the pressure rises.&lt;/p&gt;

&lt;p&gt;Cloud infrastructure deserves the same approach. A configuration where an anonymous user can reach PHI data is structurally unsafe. It doesn't matter whether an attacker has exploited it yet. The latent failure exists in the composition of permissions, trust relationships, and data classifications. &lt;/p&gt;

&lt;h2&gt;
  
  
  Intent verification
&lt;/h2&gt;

&lt;p&gt;Intent verification reads the operator's declarations in tags, policies, trust relationships, role purpose tags, vendor registries and checks whether the infrastructure's composition respects those declarations.&lt;/p&gt;

&lt;p&gt;When the operator tags a bucket &lt;code&gt;data_classification: phi&lt;/code&gt;, they're declaring: "this contains patient records." When they configure a Bedrock knowledge base to index that bucket, they're declaring: "serve this data through the RAG pipeline." When they skip the guardrail on the agent, they're declaring: "no content filtering needed." Intent verification checks these three declarations against each other: a PHI bucket indexed by an unguarded public-facing agent is a contradiction in the operator's own stated intent.&lt;/p&gt;

&lt;p&gt;The findings aren't based on heuristics about what might be dangerous. They're based on logical composition of explicit declarations. The operator said "this is PHI." The operator said "this agent serves public queries." The operator said "no guardrail." The tool says "those three decisions are incompatible." It's arithmetic on expressed intent.&lt;/p&gt;

&lt;p&gt;Each finding traces back to specific properties in specific configuration files through deterministic identifiers. The trace names the observation file, the property path, and the timestamp. When the operator remediates and re-runs the analysis, the findings drop to zero and the compound chains go silent. The before-and-after delta is the remediation proof.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluation criteria for tools
&lt;/h2&gt;

&lt;p&gt;If you're evaluating cloud security tooling, separate the problems before evaluating the tools:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern-Recognizable problems&lt;/strong&gt; SQL injection, XSS, buffer overflows, misconfigured encryption have universal verdicts. A scanner trained on enough examples recognizes the next one. These are well-served by existing tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intent-Dependent problems&lt;/strong&gt; PHI bucket in a public RAG pipeline, vendor with irrevocable access, shadow admin role accumulated over two years have verdicts that depend on this specific operator's declared intent. These are structural composition problems that require evaluating the graph, not the nodes, against the operator's own declarations.&lt;/p&gt;

&lt;p&gt;Scanners solve the first class. They cannot solve the second. Because the problem is at a different level of abstraction. Checking nodes doesn't find path problems. Checking attributes doesn't find composition problems. Checking universal patterns doesn't resolve intent-dependent verdicts. And reporting symptoms without root causes generates noise that teams learn to ignore.&lt;/p&gt;

&lt;p&gt;The compound risk problem is not fixable by any patch to any scanner. The only way to address it is to move from reactive symptom detection to proactive intent verification from evaluating nodes to proving paths, from universal baselines to intent-aware invariants, from hundreds of correct but not actionable findings to a handful of findings that each name the root cause and the specific fix.&lt;/p&gt;

&lt;p&gt;Stop chasing symptoms. Start proving safety. A configuration that contradicts its operator's declared intent is a broken system and the fix is in the contradiction.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The intent verification is implemented in &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt;, an open-source static analysis tool for cloud infrastructure. Stave evaluates 3,000+ controls across 74 AWS service domains and exports configuration facts to nine independent reasoning engines including SMT solvers used to verify flight software for compound risk detection and formal safety proofs. 32 AI agent identity controls, 5 AI compound chains, shadow admin detection, vendor delegation governance, and VPC lateral movement analysis ship as catalog controls with no cloud credentials required. All analysis runs on air-gapped snapshots.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>security</category>
      <category>formalverification</category>
      <category>aws</category>
    </item>
    <item>
      <title>Your cloud configuration is a satisfiability problem</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Fri, 13 Nov 2026 12:39:30 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/your-cloud-configuration-is-a-satisfiability-problem-21m5</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/your-cloud-configuration-is-a-satisfiability-problem-21m5</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A team writes requirements for a healthcare app on AWS. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;PHI data must never be anonymously readable.&lt;/li&gt;
&lt;li&gt;The website must serve static assets to the public.&lt;/li&gt;
&lt;li&gt;Both live in the same S3 bucket.&lt;/li&gt;
&lt;li&gt;Encryption at rest is mandatory.&lt;/li&gt;
&lt;li&gt;CloudTrail data events are required for the PHI bucket.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A scanner can check each of these against the live configuration. That's table stakes. The harder question is: &lt;strong&gt;can all five hold simultaneously on the same bucket?&lt;/strong&gt; Once you ask it out loud, you can hear the contradiction. Requirements 1 + 2 + 3 cannot coexist. There is no S3 configuration where the same bucket is both anonymously readable and not-anonymously-readable. The compatibility check  tells you the requirements themselves are inconsistent before you spend an engineering time trying to deploy them.&lt;/p&gt;

&lt;p&gt;This is the difference between &lt;strong&gt;misconfiguration detection&lt;/strong&gt; (a crowded space with every CSPM vendor) and &lt;strong&gt;configuration compatibility reasoning&lt;/strong&gt; (a quiet space, Microsoft Research SecGuru did it for routing tables in 2015; almost nobody is doing it for cloud config). &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt; is the second one, and this post walks through how.&lt;/p&gt;




&lt;h2&gt;
  
  
  Misconfiguration vs incompatibility
&lt;/h2&gt;

&lt;p&gt;Misconfiguration: this setting is wrong right now. A linter for cloud. Useful but shallow.&lt;/p&gt;

&lt;p&gt;Incompatibility: the union of these requirements cannot be satisfied by any configuration of this resource graph. A theorem for cloud. Different question.&lt;/p&gt;

&lt;p&gt;The first answers "fix this one thing." The second answers "stop trying, your requirements contradict each other." A scanner cannot produce the second answer because it has no constraint set to reason over. It only has a pass/fail list.&lt;/p&gt;

&lt;p&gt;Industry today has five layers consisting of IaC diff, policy-as-code, graph-based attack-path analysis, runtime CSPM blast-radius tools, and staging-plus-human-review. Each catches a slice. None reasons about &lt;em&gt;whether the whole set of requirements is jointly satisfiable&lt;/em&gt;. That's a SAT problem, and SAT solvers have been verifying chip designs, flight control software, and TLS protocols for two decades. The technique is sound. The cloud security tooling category just hasn't applied it yet.&lt;/p&gt;




&lt;h2&gt;
  
  
  The SAT framing
&lt;/h2&gt;

&lt;p&gt;Restate every requirement as a logical constraint over facts about the configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;phi(b)            sensitive data classification on bucket b
anonymously_reachable(b, p)  some principal p with public_principal(p) can s3:GetObject from b
website_hosted(b) static-website endpoint enabled on b
phi_invariant: forall b. phi(b) -&amp;gt; not (exists p. public_principal(p) and anonymously_reachable(b, p))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plus the snapshot facts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rego"&gt;&lt;code&gt;&lt;span class="nf"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ping_api_production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;phi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ping_api_production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;website_hosted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ping_api_production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;allows_get_object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;public_principal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ping_api_production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;public_access_block_disabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ping_api_production&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hand that to an SMT solver. Two outcomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SAT&lt;/strong&gt; There exists an assignment where every constraint holds. Your safety envelope is feasible against this configuration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UNSAT&lt;/strong&gt; No such assignment exists. The constraints contradict, and the solver can hand back an &lt;strong&gt;unsat core&lt;/strong&gt;: the minimal subset of constraints that produces the contradiction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That unsat core is the killer feature. "You said PHI must not be public, the website must be public, and they share a bucket. Three of your six requirements directly contradict, here are the three." A scanner can list ten findings; the unsat core hands you the exact subset that proves the system as stated cannot work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this is tractable: the Pareto narrowing
&lt;/h2&gt;

&lt;p&gt;Modeling all of AWS in logic is intractable. The team did the math: there are ~280 services, each with hundreds of properties, and the combinatorial state space explodes. SMT solvers are powerful.&lt;/p&gt;

&lt;p&gt;The trick is that you don't need all of AWS. Two Pareto observations narrow the space:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First Pareto: 20% of unsafe states cause 80% of severe cloud incidents.&lt;/strong&gt; Public storage, excessive IAM trust, exposed secrets, weak network boundaries. The disclosed-breach corpus repeats. You don't model every possible cloud state. You model the unsafe ones that have caused $300M incidents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second Pareto: 20% of relationships drive most attack paths.&lt;/strong&gt; IAM role assumption, internet reachability, public/private boundary crossing, production access chains. Most edges in the cloud graph are uninteresting (an EC2 tag does not affect data exposure). Your solver needs to see the few that &lt;em&gt;are&lt;/em&gt; interesting.&lt;/p&gt;

&lt;p&gt;Combined: a few hundred high-value unsafe states + a few dozen critical relationship types = a tractable model. Stave ships 700+ controls and 80+ chains framed this way. Each control is a constraint over a small predicate vocabulary. Each chain is a compound assertion across services. The state space is large enough to find real incidents and small enough for any SMT solver to handle in milliseconds.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Stave maps to this design
&lt;/h2&gt;

&lt;p&gt;The architecture mirrors a compiler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;snapshot.json  →  facts  →  SMT constraints  →  solver verdict  →  cloud-facing explanation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each arrow is a separate process, separately testable and versioned. Layer-by-layer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Snapshot → facts.&lt;/strong&gt; Stave reads &lt;code&gt;obs.v0.1&lt;/code&gt; snapshot JSON and projects it into a normalized fact stream. The projector lives in &lt;code&gt;internal/core/sir/&lt;/code&gt; and produces facts like &lt;code&gt;phi(bucket-xyz)&lt;/code&gt;, &lt;code&gt;allows_anonymous_read(bucket-xyz)&lt;/code&gt;, &lt;code&gt;public_access_block_disabled(bucket-xyz)&lt;/code&gt; — clear domain vocabulary rather than raw AWS field names. Every fact carries provenance (which snapshot, which property path, which evidence) so the solver verdict traces back to source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Facts → constraints.&lt;/strong&gt; Stave's controls are constraints. A control's &lt;code&gt;unsafe_predicate:&lt;/code&gt; block is the assertion that this combination of facts is forbidden:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CTL.S3.ACCESS.PHI.001&lt;/span&gt;
&lt;span class="na"&gt;unsafe_predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.storage.data_classification&lt;/span&gt;
      &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eq&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;phi&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.storage.access.public_read&lt;/span&gt;
      &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eq&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's a per-resource constraint. Chains are compound constraints across resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cognito_unauth_escalation&lt;/span&gt;
&lt;span class="na"&gt;controls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;CTL.COGNITO.IDENTITY.GUEST.001&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;CTL.COGNITO.IDPOOL.UNAUTH.IAM.001&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;CTL.COGNITO.IDPOOL.UNAUTH.LAMBDA.001&lt;/span&gt;
&lt;span class="na"&gt;escalation_threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="na"&gt;compound_severity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;critical&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three constraints; the chain fires when any two co-occur. That is configuration incompatibility detected via composition. The chain represents a stated invariant ("guest access on AND a path to elevated capability is forbidden") that cannot hold simultaneously with the snapshot facts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Facts + constraints → solver input.&lt;/strong&gt; &lt;code&gt;stave export-sir --format smt2&lt;/code&gt; emits the entire fact stream and the active control predicates as a closed-world SMT-LIB v2 document. Pipe it to Z3:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stave export-sir --format smt2 --observations ./snapshots/ &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; facts.smt2
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"(check-sat)"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; facts.smt2
z3 facts.smt2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SAT means the unsafe state is realizable in this snapshot. There is a path from unauthenticated user to PHI. UNSAT means there is no path and your safety envelope holds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solver verdict → explanation.&lt;/strong&gt; A raw &lt;code&gt;(error ...)&lt;/code&gt; from a solver is useless to a CISO. Stave maps every constraint back to its source control, its compliance citation, its remediation, and its provenance. Findings ship with &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;remediation.{description,action,example}&lt;/code&gt;, and &lt;code&gt;fix_plan&lt;/code&gt;. The human-facing translation of the formal verdict.&lt;/p&gt;

&lt;p&gt;The same fact stream can drive other engines. &lt;code&gt;--format jsonl&lt;/code&gt; produces triple-form facts that Soufflé (Datalog), Clingo (ASP), Prolog, or PySAT can consume. There is no SMT lock-in. The fact stream is the contract. &lt;a href="https://github.com/sufield/stave/tree/main/examples/engines" rel="noopener noreferrer"&gt;The repo's &lt;code&gt;examples/engines/&lt;/code&gt; directory has runners for five.&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The unsat-core feature in production
&lt;/h2&gt;

&lt;p&gt;The end-to-end is one query you can run today. The "Tagged 'Internal', Readable by Everyone" case from Shopify (&lt;a href="https://hackerone.com/reports/1021906" rel="noopener noreferrer"&gt;HackerOne #1021906&lt;/a&gt;) is exactly the contradiction pattern. The bucket carried &lt;code&gt;data-classification: internal&lt;/code&gt; &lt;em&gt;and&lt;/em&gt; a policy with &lt;code&gt;Principal: *&lt;/code&gt;. Two requirements stated explicitly on the same resource. UNSAT.&lt;/p&gt;

&lt;p&gt;A scanner reports "public S3 bucket." Useful. Insufficient.&lt;/p&gt;

&lt;p&gt;Stave's framing reports the per-control conflict in plain English: which property of the configuration violates which named invariant, with the offending field path and the property value as evidence. The team that owns the bucket reads &lt;code&gt;control_description&lt;/code&gt; and &lt;code&gt;remediation.action&lt;/code&gt; and knows which decision needs to flip. That's the unsat-core idea, delivered without forcing the operator to read solver output.&lt;/p&gt;

&lt;p&gt;The Shopify case is in the e2e suite: &lt;a href="https://github.com/sufield/stave/tree/main/testdata/e2e/e2e-h1-shopify-1021906" rel="noopener noreferrer"&gt;&lt;code&gt;testdata/e2e/e2e-h1-shopify-1021906/&lt;/code&gt;&lt;/a&gt;. The fixture is a reconstructed snapshot from the public disclosure. &lt;code&gt;CTL.S3.PUBLIC.001&lt;/code&gt; fires. The golden output is committed. The "compatibility check failed" is reproducible at any time by running &lt;code&gt;make test-e2e&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the layers matter: debugging UNSAT
&lt;/h2&gt;

&lt;p&gt;The four-stage pipeline (snapshot → facts → SMT → explanation) gives you fault isolation that monolithic scanners cannot offer. When a finding looks wrong:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symptom&lt;/th&gt;
&lt;th&gt;Likely layer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Missing bucket/public flag&lt;/td&gt;
&lt;td&gt;snapshot → facts (extraction bug)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right fact, wrong constraint&lt;/td&gt;
&lt;td&gt;facts → SMT (encoder bug)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right SMT, wrong solver result&lt;/td&gt;
&lt;td&gt;logical model (constraint authoring bug)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Right result, bad message&lt;/td&gt;
&lt;td&gt;result → explanation (rendering bug)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each layer has its own test corpus. The fact stream is committed JSONL. The SMT-LIB output is committed &lt;code&gt;.smt2&lt;/code&gt;. The solver verdict is committed JSON. The cloud-facing report is committed Markdown. A failing test surfaces the &lt;em&gt;exact layer&lt;/em&gt; where reality diverges from expectation. That is the difference between a scanner you fork and a verification system you can audit.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mutation testing for cloud security
&lt;/h2&gt;

&lt;p&gt;This is the test discipline the SAT framing unlocks. Take a known-safe snapshot. Perturb one fact by flipping &lt;code&gt;BlockPublicPolicy&lt;/code&gt; from &lt;code&gt;true&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt;. Re-run the verdict. The system must transition from SAT (safe envelope holds) to UNSAT (PHI reachable). If it doesn't, the model is missing a constraint and the test caught it.&lt;/p&gt;

&lt;p&gt;Stave's &lt;code&gt;examples/&lt;/code&gt; directory is structured this way. Each example has a &lt;code&gt;writeup-config/&lt;/code&gt; (the breach state) and a &lt;code&gt;remediated-config/&lt;/code&gt; (the fix), both as observation directories. &lt;code&gt;stave apply&lt;/code&gt; on the first produces findings; on the second, it produces none. That's a one-fact mutation test, and there are 70+ of them in the repo today, each tied to a publicly disclosed incident.&lt;/p&gt;




&lt;h2&gt;
  
  
  What this isn't
&lt;/h2&gt;

&lt;p&gt;It is not "use Z3 to check your cloud." Z3 alone gives you cryptic solver output. The product value is in the four layers around it consisting of the fact projection, the named constraints, the provenance, and the cloud-facing explanation. The solver is the easy part; the encoding is the hard part.&lt;/p&gt;

&lt;p&gt;It is not "model every AWS service." The Pareto narrowing is doing real work. You model the high-value unsafe states and the relationships that drive attack paths. Everything else stays out of the formal model.&lt;/p&gt;

&lt;p&gt;It is not a replacement for runtime CSPM. CSPM watches the live cloud; Stave reasons over snapshots. They compose: CSPM tells you &lt;em&gt;what&lt;/em&gt; changed, Stave tells you &lt;em&gt;whether the change broke your safety envelope&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/sufield/stave
&lt;span class="nb"&gt;cd&lt;/span&gt; stave &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; make build

&lt;span class="c"&gt;# A reproduction of HackerOne #1021906 — the Shopify Tag/Policy contradiction&lt;/span&gt;
./stave apply \
  --controls testdata/e2e/e2e-h1-shopify-1021906/controls \
  --observations testdata/e2e/e2e-h1-shopify-1021906/observations \
  --max-unsafe 168h \
  --eval-time 2026-01-15T00:00:00Z \
  --format json &lt;span class="o"&gt;|&lt;/span&gt; jq &lt;span class="s1"&gt;'.findings[].control_id'&lt;/span&gt;

&lt;span class="c"&gt;# Export the same case as SMT-LIB; feed to z3 / cvc5 / Yices for an independent verdict&lt;/span&gt;
./stave export-sir --format smt2 \
  --controls testdata/e2e/e2e-h1-shopify-1021906/controls \
  --observations testdata/e2e/e2e-h1-shopify-1021906/observations \
  --eval-time 2026-01-15T00:00:00Z &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /tmp/shopify.smt2

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"(check-sat)"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /tmp/shopify.smt2
z3 /tmp/shopify.smt2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command lists the controls that fire. Stave's verdict on the configuration. The second hands the same fact base to Z3 and asks the solver for an independent satisfiability verdict. Two engines agreeing is the strongest signal this technique can produce.&lt;/p&gt;




&lt;h2&gt;
  
  
  The design choice underneath
&lt;/h2&gt;

&lt;p&gt;The reason this works is one architectural decision: &lt;strong&gt;files are the boundary between cloud evidence and reasoning&lt;/strong&gt;. The snapshot is a file. The facts are a file. The SMT-LIB encoding is a file. The verdict is a file. The explanation is a file. Each file is a versioned contract.&lt;/p&gt;

&lt;p&gt;Once that's true, you can swap reasoning engines without touching Stave. Soufflé for blast-radius enumeration, Z3 for SAT/UNSAT verdicts, Clingo for constraint satisfaction, Prolog for proof trees, PySAT for boolean compound checks. The contract is the JSON, not the API.&lt;/p&gt;

&lt;p&gt;That turns "we use a solver" into "we reason about your configuration." The product value is not in any one engine. It is in the encoding boundary that lets any engine consume it. Configuration compatibility reasoning becomes a property of the data, not a property of one tool's runtime.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>security</category>
      <category>cloud</category>
      <category>devsecops</category>
    </item>
    <item>
      <title>Your Security Tool is Clippy. It Pops Up Unbidden, Offers Suggestions You Ignore, and Misses the One Thing That Matters.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Thu, 12 Nov 2026 12:49:04 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/your-security-tool-is-clippy-it-pops-up-unbidden-offers-suggestions-you-ignore-and-misses-the-poj</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/your-security-tool-is-clippy-it-pops-up-unbidden-offers-suggestions-you-ignore-and-misses-the-poj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Remember Clippy? Microsoft's paper clip assistant that popped up to ask: "It looks like you're writing a letter. Would you like help?"&lt;/p&gt;

&lt;p&gt;Clippy was chatty, presumptuous, frequently wrong, and impossible to disable without effort. Clippy's design goal: be helpful. Clippy's actual effect: be annoying. The failure was the DESIGN MODEL. A helper agent that's always visible, always offering, always interpreting your actions as requests for assistance is categorically wrong for any domain where the user needs to focus.&lt;/p&gt;

&lt;p&gt;Now look at your cloud security toolstack. Dashboards that surface 200 findings every scan. ML anomaly detectors that score every event. Alert pipelines that notify on every deviation. LLM copilots that offer suggestions for every finding. Each is Clippy that is chatty, presumptuous, always visible and offering. They were designed to be helpful. They produce the same failure: the operator ignores it until the one thing that matters is buried in the noise.&lt;/p&gt;

&lt;p&gt;There's a design framework, Mann's Context-Perfect Agent that explains why the helper model fails and the correct model. The correct model is a circuit breaker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four dimensions of a coherent agent
&lt;/h2&gt;

&lt;p&gt;The Context-Perfect Agent framework evaluates any system that acts on behalf of an outcome across four dimensions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Clippy's answer&lt;/th&gt;
&lt;th&gt;Circuit breaker's answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Context&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;What does the system understand about its environment?&lt;/td&gt;
&lt;td&gt;"There's a colon in the document — must be a letter"&lt;/td&gt;
&lt;td&gt;"This state transition would violate invariant CTL.S3.PUBLIC.001"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Perfection&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;What does "better" mean?&lt;/td&gt;
&lt;td&gt;"Show up more often"&lt;/td&gt;
&lt;td&gt;"Fewer unsafe state transitions"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Agent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;When and how does it act?&lt;/td&gt;
&lt;td&gt;"Constantly — every paragraph"&lt;/td&gt;
&lt;td&gt;"Only when an invariant is violated"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Imperfection&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;How does it deliberately fail to be helpful?&lt;/td&gt;
&lt;td&gt;"It doesn't — it tries to help with everything"&lt;/td&gt;
&lt;td&gt;"Blocks unsafe shortcuts; forces explicit declarations; refuses to suggest"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The fourth dimension makes the framework distinctive. Most agent-design frameworks aim for MAXIMUM helpfulness. The Context-Perfect Agent framework recognizes that too much helpfulness produces Clippy. The agent becomes nagging, presumptuous, intrusive. The agent must REFUSE certain forms of helpfulness to be coherent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dimension 1: Context is understanding meaning, not signals
&lt;/h2&gt;

&lt;p&gt;A signal-driven system treats inputs at face value: the API says the bucket is public, so public bucket is the finding. A context-aware system treats inputs as EVIDENCE: the API says the bucket is public, AND this bucket is in the production account, AND the bucket's policy allows cross-account access, AND the IAM role that created it has permissions the operator didn't intend.&lt;/p&gt;

&lt;p&gt;Four contextual assumptions baked into the architecture:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Assumption&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Architectural realization&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Changes are proposals, not facts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;State should be evaluated BEFORE it reaches production&lt;/td&gt;
&lt;td&gt;Gate evaluates before apply; snapshot is a candidate state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Safety depends on interactions over time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Single-resource checks miss compound failures&lt;/td&gt;
&lt;td&gt;585 chain controls reason about transitions, not just per-asset state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Humans operate under partial visibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The system cannot require human disambiguation at runtime&lt;/td&gt;
&lt;td&gt;Kernel produces verdicts mechanically; no "did you mean...?"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Distributed systems are sampled&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Snapshots are point-in-time captures, not complete truth&lt;/td&gt;
&lt;td&gt;Evaluation handles sampled state; doesn't assume completeness beyond the snapshot&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The most consequential: &lt;strong&gt;the system knows when it doesn't know enough.&lt;/strong&gt; When the evidence is ambiguous, the system doesn't pretend certainty. It surfaces an AT_RISK verdict. The intermediate state between COMPLIANT and NON_COMPLIANT. AT_RISK says: "I see something concerning but I'm not certain. Investigate."&lt;/p&gt;

&lt;p&gt;A system without AT_RISK has only binary verdicts and binary verdicts force the system to PRETEND certainty on ambiguous inputs. Every ML detector that produces a confidence score is pretending certainty (the score implies precision the model doesn't have). Every scanner that produces "Critical / High / Medium / Low" is pretending certainty. The severity implies knowledge of business impact the scanner doesn't have.&lt;/p&gt;

&lt;p&gt;AT_RISK is explicit uncertainty. The operator knows when the system is sure and when it isn't. That transparency  makes verdicts trustworthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dimension 2: Perfection in engineering, not UX
&lt;/h2&gt;

&lt;p&gt;Consumer software defines perfect by ADDING: more features, integrations, options and delight.&lt;/p&gt;

&lt;p&gt;Engineering defines perfect by REMOVING: fewer unsafe transitions, smaller blast radius, earlier intervention, less human attention required.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Perfection metric&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;How it's realized&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Fewer unsafe transitions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;States that were reachable become unreachable&lt;/td&gt;
&lt;td&gt;Gate blocks transitions that violate invariants&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Smaller blast radius&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;When something goes wrong, less is affected&lt;/td&gt;
&lt;td&gt;Profile-based scoping — operator selects which controls apply&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Earlier intervention&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Problems caught sooner in the lifecycle&lt;/td&gt;
&lt;td&gt;Pre-apply evaluation on Terraform plans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reversible actions only&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The system's output can be undone&lt;/td&gt;
&lt;td&gt;Verdicts, not state changes — ignore the verdict to "undo" it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;No human attention in normal operation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The system is invisible when things are fine&lt;/td&gt;
&lt;td&gt;COMPLIANT verdicts produce no required action&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every metric is NEGATIVE. It reduces something that would otherwise be larger. The product gets more perfect by making things SMALLER. Fewer transitions. Smaller radius. Earlier. Less attention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the architecture refuses to optimize:&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;Anti-pattern&lt;/th&gt;
&lt;th&gt;Why it's refused&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Developer convenience at the cost of safety&lt;/td&gt;
&lt;td&gt;"Auto-approve low-severity findings" trades safety for convenience&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Silent failure&lt;/td&gt;
&lt;td&gt;Probabilistic detectors that silently miss patterns after retraining&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Magical inference&lt;/td&gt;
&lt;td&gt;ML-based verdicts without explainable reasoning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Post-incident heroics&lt;/td&gt;
&lt;td&gt;SOAR playbooks that compensate for missed prevention&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each refusal is an explicit cost. Some operators WANT auto-approval. Some WANT ML inference. Some WANT post-incident automation. The architecture refuses each because each trades long-term safety for short-term convenience and the engineering definition of perfect is the one that reduces unsafe outcomes, not the one that increases user satisfaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dimension 3: Agent is carefully limited
&lt;/h2&gt;

&lt;p&gt;Six behavioral constraints:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constraint&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;How it's enforced&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Silent during safe operation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No output when everything is fine&lt;/td&gt;
&lt;td&gt;COMPLIANT verdicts require no action&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deterministic and auditable&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Same inputs → same verdict, always&lt;/td&gt;
&lt;td&gt;Pure function; no randomness; predicate trace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Acts only when invariants violated&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No proactive suggestions, no "you might want to..."&lt;/td&gt;
&lt;td&gt;Exit code 3 only on NON_COMPLIANT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Never nags&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No reminders, no periodic re-notification&lt;/td&gt;
&lt;td&gt;No notification subsystem exists in the architecture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Never guesses&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No probabilistic verdict; uncertainty is surfaced explicitly&lt;/td&gt;
&lt;td&gt;AT_RISK for ambiguous cases; no confidence scores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Never escalates unless required&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No auto-escalation to management, no incident creation&lt;/td&gt;
&lt;td&gt;No escalation rules; verdict is consumed by pipeline rules the operator controls&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each constraint is ARCHITECTURAL, not configurable. The kernel doesn't have a notification subsystem (can't nag). Doesn't have an ML layer (can't guess). Doesn't have escalation rules (can't escalate). The absences are structural. They can't be turned on because they were never built.&lt;/p&gt;

&lt;h3&gt;
  
  
  The mental model: circuit breaker
&lt;/h3&gt;

&lt;p&gt;The closest analogies:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Circuit breaker:&lt;/strong&gt; Silent until current exceeds threshold. Then trips deterministically. No judgment, no negotiation, no "are you sure?" The circuit is open or closed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governor:&lt;/strong&gt; Bounds the maximum rate. Intervenes only at the boundary. Does not advise on optimal rate within the boundary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safety interlock:&lt;/strong&gt; Prevents operation outside safe conditions. Does not improve operation inside safe conditions.&lt;/p&gt;

&lt;p&gt;The common pattern: &lt;strong&gt;boundary enforcement, not optimization.&lt;/strong&gt; The system doesn't help inside the safe zone. It REFUSES to let you cross the boundary of the safe zone.&lt;/p&gt;

&lt;p&gt;This is the structural opposite of a helper agent:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Helper agent&lt;/th&gt;
&lt;th&gt;Circuit breaker&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tries to be liked&lt;/td&gt;
&lt;td&gt;Indifferent to being liked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Offers suggestions&lt;/td&gt;
&lt;td&gt;Produces verdicts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adapts to user preferences&lt;/td&gt;
&lt;td&gt;Bound by catalog, not preferences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Initiates conversation&lt;/td&gt;
&lt;td&gt;Silent until invariant violated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Asks "did you mean...?"&lt;/td&gt;
&lt;td&gt;Asks nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Visible during normal operation&lt;/td&gt;
&lt;td&gt;Invisible during normal operation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each row is a structural inversion. The inversions aren't style choices. They make the system coherent in the safety-critical domain. A helper agent in a safety-critical domain is CATEGORICALLY wrong. Its behavior model contradicts the engineering requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dimension 4: Imperfection — the provocateur
&lt;/h2&gt;

&lt;p&gt;The most distinctive dimension. The system must deliberately FAIL to be helpful in specific ways that FORCE better behavior elsewhere:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provocation&lt;/th&gt;
&lt;th&gt;Behavior it forces&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Blocks unsafe shortcuts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Developer must use the supported safe path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Forces explicit declarations&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Implicit intent must be made explicit in the catalog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Exposes hidden coupling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hidden dependencies between assets become visible via chain controls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Makes violations visible before damage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reviewers see the issue at PR time, not post-incident&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The provocation is uncomfortable but constructive. The developer who would have shipped the unsafe shortcut must now choose: take the supported path (more work, but safe) or escalate the invariant question to the catalog owner (slower, but explicit). Either choice produces BETTER systemic behavior than the shortcut would have.&lt;/p&gt;

&lt;h3&gt;
  
  
  Not annoying. Not frequent. Impossible to ignore.
&lt;/h3&gt;

&lt;p&gt;Three properties that define the right provocateur:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not annoying:&lt;/strong&gt; Silent during safe operation. The developer forgets the system exists during normal weeks. No pop-ups. No suggestions. No "have you considered...?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not frequent:&lt;/strong&gt; Invariant violations are rare in well-designed systems. The gate fires on the exceptional case, not the routine one. A team that sees the gate fire daily has a catalog problem, not a gate problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Impossible to ignore when it matters:&lt;/strong&gt; When the gate fires, the pipeline blocks. The deployment CANNOT proceed. The developer MUST respond. Fix the IaC, update the catalog, or escalate to the catalog owner. There is no "dismiss" button. There is no "remind me later." The block is structural.&lt;/p&gt;

&lt;p&gt;Clippy is the exact inverse: annoying (pops up unbidden), frequent (every paragraph), easy to ignore (close the assistant). The circuit breaker is: silent (invisible during normal operation), rare (fires on exceptions), impossible to ignore (pipeline blocks).&lt;/p&gt;

&lt;h2&gt;
  
  
  The validation test
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A good Context-Perfect Agent is felt only in its absence.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operational state&lt;/th&gt;
&lt;th&gt;System's visibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Normal (no invariant violations)&lt;/td&gt;
&lt;td&gt;Invisible — pipeline runs, deployment succeeds, no operator action&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Abnormal (invariant violated)&lt;/td&gt;
&lt;td&gt;Unmistakable — pipeline blocks, deployment fails, operator must act&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Binary visibility: invisible OR unmistakable. Never in-between, "present but ignorable" or  "absent when needed."&lt;/p&gt;

&lt;p&gt;Tools that fail the test have either constant visibility (Clippy — visible even when not needed) or constant invisibility (observability without enforcement — invisible even when needed). The circuit breaker has neither failure mode because its visibility is CONDITIONAL on the system's state.&lt;/p&gt;

&lt;p&gt;Teams that adopt the circuit breaker model report: they forget the system exists during normal weeks. When it fires, they respond immediately. Because the block is structural and the pipeline cannot proceed. Their discussions about the system happen at CATALOG-AUTHORING time (design time, when they're thinking about what "safe" means), not at RUNTIME (when they're trying to ship). The system is felt only in its absence when they think about what would have shipped without it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The diagnostic for your tools
&lt;/h2&gt;

&lt;p&gt;Test every tool in your security stack against the four dimensions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Context-aware?&lt;/th&gt;
&lt;th&gt;Engineering-perfection?&lt;/th&gt;
&lt;th&gt;Limited agent?&lt;/th&gt;
&lt;th&gt;Constructive provocateur?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CSPM dashboard&lt;/td&gt;
&lt;td&gt;Partial (sees state, not intent)&lt;/td&gt;
&lt;td&gt;No (optimizes finding count)&lt;/td&gt;
&lt;td&gt;No (always visible)&lt;/td&gt;
&lt;td&gt;No (offers information, doesn't force behavior)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ML anomaly detector&lt;/td&gt;
&lt;td&gt;No (no model of meaning)&lt;/td&gt;
&lt;td&gt;No (probabilistic)&lt;/td&gt;
&lt;td&gt;No (always producing scores)&lt;/td&gt;
&lt;td&gt;No (alerts produce decision fatigue)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM security copilot&lt;/td&gt;
&lt;td&gt;Partial (some context)&lt;/td&gt;
&lt;td&gt;No (optimizes user satisfaction)&lt;/td&gt;
&lt;td&gt;No (chatty)&lt;/td&gt;
&lt;td&gt;No (user can ignore suggestions)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SOAR playbook&lt;/td&gt;
&lt;td&gt;No (just reacts)&lt;/td&gt;
&lt;td&gt;No (no notion of perfection)&lt;/td&gt;
&lt;td&gt;Partial (acts on triggers)&lt;/td&gt;
&lt;td&gt;No (executes regardless of human attention)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Risk Reasoner gate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Tools that fail one or more dimensions tend to degrade into helper-mode under pressure with more alerts,  dashboards and suggestions. The vendor responds to "it's not working" with "let's show you more." The tool becomes noisier. The operator tunes it out. The one thing that matters gets buried.&lt;/p&gt;

&lt;p&gt;Tools that pass all four dimensions maintain their position under pressure because their position is STRUCTURAL (boundary enforcement), not RELATIONAL (user satisfaction). The circuit breaker doesn't care if the user is happy. It cares if the circuit is safe.&lt;/p&gt;

&lt;p&gt;Your security tool is Clippy. It pops up unbidden. It offers suggestions you ignore. It misses the one thing that matters because it's too busy showing you everything else. The correct model is the circuit breaker: silent until the threshold is crossed, then impossible to ignore. Because silence  makes the signal trustworthy when it finally arrives.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The circuit breaker model with silent during safe operation, deterministic verdicts, acts only when invariants are violated, never nags, never guesses, impossible to ignore when it matters is implemented in &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt;, an open-source Risk Reasoner. Not a helper. A circuit breaker. Try it: &lt;code&gt;bash examples/demo-ai-security/run.sh&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>cloud</category>
      <category>security</category>
      <category>startup</category>
    </item>
    <item>
      <title>One Kernel for 109 Cloud Services. Because It Specializes in the Right Place.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Wed, 11 Nov 2026 14:55:01 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/one-kernel-for-109-cloud-services-because-it-specializes-in-the-right-place-4jf8</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/one-kernel-for-109-cloud-services-because-it-specializes-in-the-right-place-4jf8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The cloud security industry has a tool for every case. An S3 scanner. An IAM analyzer. A Lambda checker. A VPC auditor. A Kubernetes admission controller. A Terraform linter. A CloudFormation validator.&lt;/p&gt;

&lt;p&gt;Each tool is specialized for its local domain. Each tool has its own engine, its own rule format, its own output schema, its own dashboard. The specialization is in the code. A different mechanism for every case.&lt;/p&gt;

&lt;p&gt;The result: tool sprawl. Fifteen tools in the average organization. Hundreds of thousands of lines of mechanism across them. Adding support for a new AWS service means adding a new tool or a new module with its own parser, its own rules, its own integration.&lt;/p&gt;

&lt;p&gt;There's a principle from innovation theory that says this is backwards. Specialize the outcomes, not the mechanisms. The mechanism stays uniform. The data varies by case. One kernel. 109 cloud services. The kernel doesn't grow when the catalog does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The principle: Local Quality
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Different parts of a system should not behave in a uniform way. Each part should adapt to its local purpose, conditions, and constraints — instead of enforcing global uniform behavior.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The principle seems to endorse the industry's approach: specialize each part. But there's a constraint that changes everything:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Local Quality must never introduce local MECHANISMS, only local OUTCOMES. Mechanisms remain generic. Only invariants and policies specialize.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The constraint  separates scalable specialization from sprawl:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Localizing...&lt;/th&gt;
&lt;th&gt;What grows&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Mechanisms&lt;/strong&gt; (code per case)&lt;/td&gt;
&lt;td&gt;Code. Every new cloud service, compliance regime, or control type adds a new engine, parser, or module.&lt;/td&gt;
&lt;td&gt;Tool sprawl. Mechanism complexity grows linearly with cases.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Outcomes&lt;/strong&gt; (data per case)&lt;/td&gt;
&lt;td&gt;Data. Every new cloud service, compliance regime, or control type adds a YAML file.&lt;/td&gt;
&lt;td&gt;One kernel. Data complexity grows. Mechanism doesn't.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The industry localizes mechanisms. The architecture localizes outcomes. Same specialization. Different place. Opposite scaling properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  The industry's design vs the alternative
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Industry default (local mechanisms)&lt;/th&gt;
&lt;th&gt;Local Quality (local outcomes)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cloud service coverage&lt;/td&gt;
&lt;td&gt;Per-service scanner (S3 scanner, IAM scanner, Lambda scanner, ...)&lt;/td&gt;
&lt;td&gt;One kernel + 109 asset-type schemas&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compliance regime&lt;/td&gt;
&lt;td&gt;Per-regime engine (HIPAA tool, SOC 2 tool, PCI-DSS tool, ...)&lt;/td&gt;
&lt;td&gt;One kernel + 10 compliance profiles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control time semantics&lt;/td&gt;
&lt;td&gt;One check type. Every condition treated the same.&lt;/td&gt;
&lt;td&gt;Two types: &lt;code&gt;unsafe_state&lt;/code&gt; (instant) and &lt;code&gt;unsafe_duration&lt;/code&gt; (threshold-based)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compound risk scoping&lt;/td&gt;
&lt;td&gt;Uniform grouping (or none at all)&lt;/td&gt;
&lt;td&gt;Per-chain &lt;code&gt;scope_field&lt;/code&gt; — each chain declares its own local scope&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Threat taxonomy&lt;/td&gt;
&lt;td&gt;Per-taxonomy product&lt;/td&gt;
&lt;td&gt;Same catalog projected through different mappings (compliance OR threat taxonomy)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observation contract&lt;/td&gt;
&lt;td&gt;Generic JSON for all cloud services&lt;/td&gt;
&lt;td&gt;109 specialized schemas, each capturing its service's unique properties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adding a new AWS service&lt;/td&gt;
&lt;td&gt;Add a new module: new parser, new rules, new tests, new integration&lt;/td&gt;
&lt;td&gt;Add a YAML file: new schema + new controls. Same kernel. Same tests. Same integration.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every row on the right is the result of specializing outcomes while keeping the mechanism uniform. The left column grows mechanism complexity with every case. The right column grows data. Data is cheaper to maintain, cheaper to review, cheaper to test, and cheaper to add than mechanism.&lt;/p&gt;

&lt;h2&gt;
  
  
  Seven layers of specialization — all in data
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. 109 asset-type schemas — local observation contracts
&lt;/h3&gt;

&lt;p&gt;An S3 bucket has properties IAM roles don't: encryption settings, public access blocks, lifecycle policies. An IAM role has properties S3 buckets don't: trust policies, attached policies, MFA requirements. Forcing them into one uniform schema wastes most fields on most assets.&lt;/p&gt;

&lt;p&gt;Each of the 109 schemas captures exactly the properties its cloud service exposes. An S3 schema has 81 field paths. An IAM role schema has 64. A Bedrock agent schema has 31. Each is tuned to its local domain.&lt;/p&gt;

&lt;p&gt;The kernel reads any of the 109 schemas through the same generic parser. One mechanism. 109 locally-specialized observation contracts.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 3,000+ controls — local security judgments
&lt;/h3&gt;

&lt;p&gt;Each control is tuned to a specific unsafe state in a specific domain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# S3-specific: public read access
&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CTL.S3.PUBLIC.001&lt;/span&gt;
&lt;span class="na"&gt;unsafe_predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;any&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.storage.access.public_read&lt;/span&gt;
      &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eq&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="c1"&gt;# IAM-specific: overprivileged role
&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CTL.IAM.ROLE.SCOPE.001&lt;/span&gt;
&lt;span class="na"&gt;unsafe_predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;any&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.identity.unused_services_pct&lt;/span&gt;
      &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gt&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;

&lt;span class="c1"&gt;# Bedrock-specific: agent with broad Lambda invoke
&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CTL.BEDROCK.AGENT.ROLE.001&lt;/span&gt;
&lt;span class="na"&gt;unsafe_predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;any&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.agent.role.policies.statements.actions&lt;/span&gt;
      &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;contains&lt;/span&gt;
      &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"lambda:InvokeFunction"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three different domains, unsafe states and predicates. Same kernel evaluating all three. The specialization is in the YAML. The mechanism is uniform.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Two control types — local time semantics
&lt;/h3&gt;

&lt;p&gt;Some conditions are unsafe instantly. A public S3 bucket is dangerous the moment it's created. Other conditions are unsafe only if they persist. An overprivileged role might be acceptable during a migration window but dangerous after 90 days.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Instant: unsafe the moment it's observed
&lt;/span&gt;&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unsafe_state&lt;/span&gt;
&lt;span class="na"&gt;predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.storage.access.public_read == true&lt;/span&gt;

&lt;span class="c1"&gt;# Durational: unsafe only after threshold exceeded
&lt;/span&gt;&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unsafe_duration&lt;/span&gt;
&lt;span class="na"&gt;predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.identity.access_key_age_days &amp;gt; 90&lt;/span&gt;
&lt;span class="na"&gt;max_unsafe&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;168h&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A uniform control type would either flag every transient condition (false positives) or miss every durational violation (low coverage). Two types let each control declare its local time semantics. The kernel handles both with the same evaluation loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. 10 compliance profiles — local regulatory priorities
&lt;/h3&gt;

&lt;p&gt;HIPAA prioritizes PHI protection and encryption. PCI-DSS prioritizes cardholder data protection. SOC 2 prioritizes availability and confidentiality. Each regime has different priorities with different subsets of the same controls.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stave apply --profile hipaa --observations ./snapshots      &lt;span class="c"&gt;# HIPAA subset&lt;/span&gt;
stave apply --profile pci-dss --observations ./snapshots     &lt;span class="c"&gt;# PCI-DSS subset&lt;/span&gt;
stave apply --profile nist-800-53 --observations ./snapshots &lt;span class="c"&gt;# NIST subset&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same 3,000+ controls. Ten different projections. The operator names the regime. The profile selects the local invariant family. The mechanism doesn't change.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. 700+ compound chains — local scope keys
&lt;/h3&gt;

&lt;p&gt;A naive compound chain groups findings by some uniform criterion (asset type, or account). Stave's &lt;code&gt;scope_field&lt;/code&gt; lets each chain declare its own local grouping:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AI-agent chain groups by agent ID (which agent is the risk?)&lt;/li&gt;
&lt;li&gt;A PHI-data chain groups by data-classification tag (which data is exposed?)&lt;/li&gt;
&lt;li&gt;An IAM chain groups by role ARN (which identity is overprivileged?)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each chain specifies what "this composition" means for THIS chain. The chain engine is uniform. It groups and evaluates. The scope key varies per chain.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. OWASP NHI mapping — local threat taxonomy
&lt;/h3&gt;

&lt;p&gt;The same 3,000+ controls projected through a threat-taxonomy lens (235 controls mapped to OWASP Non-Human Identity Top 10) vs a compliance lens (10 regulatory profiles). Two different axes of specialization. Same controls and kernel. Different local concerns.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. The asymmetric interface — local granularity per audience
&lt;/h3&gt;

&lt;p&gt;Each layer of the system has a different audience with different cognitive capacity:&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;Granularity&lt;/th&gt;
&lt;th&gt;Audience&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Operator interface&lt;/td&gt;
&lt;td&gt;Macro — one compliance profile name&lt;/td&gt;
&lt;td&gt;Humans&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control catalog&lt;/td&gt;
&lt;td&gt;Mid — predicate definitions in YAML&lt;/td&gt;
&lt;td&gt;Control authors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observation schemas&lt;/td&gt;
&lt;td&gt;Micro — 81 field paths per S3 bucket&lt;/td&gt;
&lt;td&gt;Kernel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SIR export&lt;/td&gt;
&lt;td&gt;Sub-micro — raw Policy / ACL / IAM vectors&lt;/td&gt;
&lt;td&gt;External solvers (Z3, Soufflé)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each layer is at the granularity appropriate to its local consumer. The operator doesn't see the 81 field paths. The solver doesn't see the compliance profile name. Each interface specializes its granularity. The mechanism connecting them is uniform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for scaling
&lt;/h2&gt;

&lt;p&gt;The scaling property of data-local vs mechanism-local:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Day 1:     1,030-line kernel + 100 controls + 20 schemas
Day 180:   1,030-line kernel + 2,650 controls + 109 schemas
Day 360:   1,030-line kernel + 5,000 controls + 200 schemas
Year 2:    1,030-line kernel + 10,000 controls + 300+ schemas

Kernel: unchanged
Data: 100× growth
Operator cognitive load: unchanged (one command, one profile)
Maintainability: unchanged (one engine to test, debug, verify)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compare to the industry's mechanism-local scaling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Day 1:     50,000 lines across 5 tools
Day 180:   120,000 lines across 10 tools  
Day 360:   200,000 lines across 15 tools
Year 2:    500,000 lines across 20+ tools

Mechanism: grows with every case
Data: scattered across tool-specific formats
Operator cognitive load: grows with every new tool
Maintainability: degrades with every new tool
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mechanism-local approach can't escape linear growth. Every new cloud service, compliance regime, or control type adds mechanism. The data-local approach has constant mechanism cost. Every new case adds a YAML file.&lt;/p&gt;

&lt;p&gt;This is the complexity-curve difference from the prior articles made concrete. The post-peak shape (function grows, complexity flat) is the Local Quality result. The pre-peak shape (function grows, complexity grows) is the Local Quality violation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pair that produces the architecture
&lt;/h2&gt;

&lt;p&gt;Local Quality has a partner principle: Prior Action. Together they answer two questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Principle&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;Answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prior Action&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;WHEN should the work happen?&lt;/td&gt;
&lt;td&gt;Before the change ships — in the control author's YAML, the schema definition, the profile selection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Local Quality&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;WHERE should specialization live?&lt;/td&gt;
&lt;td&gt;In the data, not the mechanism — controls, chains, profiles, schemas&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Together they produce one commitment:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;All cleverness happens earlier, in data appropriate to its local case.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Prior Action says: don't reason at runtime. Local Quality says: specialize via data, not via code. The combination produces a kernel that is both simple (no runtime derivation) AND generic (no per-case logic). 1,030 lines. 3,000+ controls. The literal result of applying both principles simultaneously.&lt;/p&gt;

&lt;p&gt;Without Local Quality, Prior Action produces a uniform pre-bound system. Same controls for every case, no localization. Wrong for S3, IAM and Lambda. A universal tool that's universally mediocre.&lt;/p&gt;

&lt;p&gt;Without Prior Action, Local Quality produces specialized runtime reasoning. Per-case logic running at decision time. Complex, non-deterministic, impossible to audit. A locally-correct tool that's globally unmaintainable.&lt;/p&gt;

&lt;p&gt;Both principles together: a uniform kernel that runs locally-specialized data, all pre-bound before the runtime moment. Simple mechanism. Rich outcomes. Deterministic. Scalable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The diagnostic for founders
&lt;/h2&gt;

&lt;p&gt;When you add support for a new case in your product (a new customer type, a new cloud service, a new compliance regime, a new data format):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you adding code or data?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If code: you're localizing the mechanism. Your kernel grows with every case. Your test surface grows. Your maintenance cost grows. Your complexity curve is still ascending.&lt;/p&gt;

&lt;p&gt;If data: you're localizing the outcome. Your kernel stays the same. A new case is a new file. Your test surface stays constant (the kernel tests cover every new file automatically). Your complexity curve is past the peak and descending.&lt;/p&gt;

&lt;p&gt;The question is WHERE the specialization lives: in the mechanism (code) or in the outcome (data). The first produces sprawl. The second produces scale.&lt;/p&gt;

&lt;p&gt;One kernel for 109 cloud services. Because the specialization is in the right place.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this relates to existing compliance mods
&lt;/h2&gt;

&lt;p&gt;Specialization in the right place cuts a specific way through the framework-mod ecosystem. &lt;a href="https://hub.powerpipe.io/mods/turbot/aws_compliance" rel="noopener noreferrer"&gt;&lt;code&gt;turbot/steampipe-mod-aws-compliance&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
specializes along a &lt;em&gt;different&lt;/em&gt; axis: per-framework benchmark hierarchies (CIS controls under CIS section IDs, PCI controls under PCI requirement numbers, HIPAA controls under HIPAA Security Rule citations). That specialization is in the data layer each control is a SQL query and a section ID and the mod's kernel is the Powerpipe runtime that renders the hierarchy. The specialization-in-data principle applies: Powerpipe stays small, framework content grows. Stave applies the same principle to a different specialization axis (asset types and compound shapes). Two specialization axes (framework-section + compound-shape), one specialization principle (data not code), both render in the same Powerpipe dashboard. Comparison: &lt;a href="https://github.com/sufield/stave/blob/main/docs/comparison/aws-compliance-mod.md" rel="noopener noreferrer"&gt;aws-compliance-mod&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Local Quality in 109 specialized schemas, 3,000+ specialized controls, 585 specialized chains, 10 specialized profiles, two control types, per-chain scope keys, asymmetric granularity per audience are all evaluated by one 1,030-line kernel that doesn't grow when the catalog does. Implemented in &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt;, an open-source Risk Reasoner. Try it: &lt;code&gt;bash examples/demo-ai-security/run.sh&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>security</category>
      <category>architecture</category>
      <category>startup</category>
    </item>
    <item>
      <title>Seven Functions AI Coding Agents Suppress and What I Built to Get Them Back</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Tue, 10 Nov 2026 13:29:13 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/seven-functions-ai-coding-agents-suppress-and-what-i-built-to-get-them-back-d8b</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/seven-functions-ai-coding-agents-suppress-and-what-i-built-to-get-them-back-d8b</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;Stave&lt;/a&gt; is a cloud security reasoning engine. It evaluates infrastructure snapshots against system invariants with static analysis, air-gapped, deterministic. I deleted 25,000 lines of working code, reverted an entire subsystem I'd spent a full day building, wrote a 246-line architecture document instead of a single line of code, and built a 595-line tool whose only job is classifying test diffs into five categories.&lt;/p&gt;

&lt;p&gt;It was not planned. The problems forced it.&lt;/p&gt;

&lt;p&gt;Only afterward did I find seven computer science papers spanning 1972 to 1994 that describe the functions I was rediscovering under pressure. These papers predate AI coding agents by decades, but they diagnose the same gaps that AI-assisted development creates today. The difference is that when you're building by hand, these functions degrade slowly. When an AI agent is writing most of your code, they disappear overnight.&lt;/p&gt;

&lt;p&gt;This article is about those seven functions and what happens when they're absent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup: a poor man's RAG I didn't know I was building
&lt;/h2&gt;

&lt;p&gt;Before the seven functions, one pattern needs explaining because it runs through everything that follows.&lt;/p&gt;

&lt;p&gt;Throughout Stave's development, I wrote detailed git commit messages and maintained a constellation of markdown files: &lt;code&gt;DOCTRINE.md&lt;/code&gt;, &lt;code&gt;MEMORY.md&lt;/code&gt;, &lt;code&gt;ARCHITECTURE.md&lt;/code&gt;, design notes, decision memos. I treated these as a thinking tool. A place to record not just what changed but why, what was tried and rejected, and what constraints future work has to respect.&lt;/p&gt;

&lt;p&gt;What I didn't realize until later is that this is a retrieval system. When I start a new session with an AI coding agent, the agent has no memory. It can read the codebase, but the codebase doesn't contain the reasoning behind its own shape. The git history and the markdown notes are the layer that lets the agent or me, three weeks later to reconstruct the theory without re-deriving it from source.&lt;/p&gt;

&lt;p&gt;This is not the same as RAG over a codebase. Vector-similarity retrieval finds text chunks that look related. Git log preserves &lt;em&gt;temporal ordering&lt;/em&gt;. You get causality: this was tried, then reverted, then replaced with X, and here's why. A vector database loses that narrative arc. What I'd built is closer to a decision journal with full diffs attached than a retrieval index.&lt;/p&gt;

&lt;p&gt;There's a deeper mismatch too. RAG as it's used today is passive: ask a question, get an answer. But development isn't question-answering. It's task execution. When I'm about to modify the chain engine, I don't need "what is the chain engine?" I need "what constraints exist on this module, what was tried and reverted, and what will break if I move these types?" That's task-oriented retrieval. The context needed to &lt;em&gt;do&lt;/em&gt; something safely, not to &lt;em&gt;know&lt;/em&gt; something. RAG never seemed like a good fit for development because it optimizes for the wrong access pattern. Git history with detailed commit messages and design notes optimizes for the right one: "I'm about to change X, what do I need to know first?"&lt;/p&gt;

&lt;p&gt;Peter Naur wrote in 1985 that the program isn't the source code, it's the theory in the programmer's head about how the problem maps to the solution. My git messages and markdown notes are that theory, externalized into a form that survives the one thing AI sessions guarantee: context death.&lt;/p&gt;

&lt;p&gt;That's Function 2 in the table below. Here are all seven.&lt;/p&gt;

&lt;h2&gt;
  
  
  The seven functions
&lt;/h2&gt;

&lt;p&gt;Each function names something a developer does often unconsciously that AI-assisted development either hides, skips, or actively destroys. For each one, I'll show the paper that named it, then the specific decision that made me understand it wasn't optional.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Comprehends module boundaries — Parnas, 1972
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; Information hiding. A developer only needs the interface, not the implementation. Modules should hide design decisions behind stable boundaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; Three times, the hexagonal architecture boundary was violated by otherwise-correct feature work. The pattern was always the same: a new feature in the core engine imported something from an adapter layer because it was convenient and the types matched.&lt;/p&gt;

&lt;p&gt;The first major fix is a "refactor: airgap core from cobra via GlobalSettings + depguard" told the whole story. The core engine had acquired a transitive dependency on Cobra (the CLI framework) through an intermediate adapter package. Banning Cobra in the linter wasn't enough. The dependency re-entered through a different path. The fix required introducing a pure-data struct at the boundary and rewriting the depguard rules from "ban this library" to "enforce this architectural layer."&lt;/p&gt;

&lt;p&gt;The second was a performance optimization that placed a cache in &lt;code&gt;internal/adapters/assessmentcache/&lt;/code&gt; and an app-layer workflow imported it, violating the inward dependency rule. Caught by &lt;code&gt;TestHexagonalDependencyDirection&lt;/code&gt;, an architecture test that runs on every build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; An AI agent will cross a module boundary every time it's the shortest path to making the code compile. It doesn't know the boundary exists unless the boundary is machine-enforced. Stave's history shows that a human team violates undocumented boundaries within weeks. An AI agent violates them within minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resolution:&lt;/strong&gt; Boundaries that exist only in documentation or team convention are not boundaries. &lt;code&gt;depguard&lt;/code&gt; rules and &lt;code&gt;TestHexagonalDependencyDirection&lt;/code&gt; enforce Stave's boundaries at build time. The test has caught three violations so far. They all introduced by correct feature work that happened to take the wrong import path.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Builds mental model of the domain — Naur, 1985
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; Theory building. Programming is the activity of building a theory of how the problem domain maps to the software. The theory lives in the programmer's head, not in the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; Over nine commits on a single day, I built a catalog conflict analyzer with roughly 4,800 lines of code that would detect contradictions between controls in Stave's security catalog. It compiled. Tests passed. Documentation was thorough.&lt;/p&gt;

&lt;p&gt;It produced 590 contradictions on a 630-control catalog. 546 of them were keyed on sub-asset routing fields with false positives caused by the analyzer not understanding that controls operating on different sub-assets don't conflict.&lt;/p&gt;

&lt;p&gt;The fix deleted the entire subsystem: +152 / -5,726 lines across 21 files. A decision memo (&lt;code&gt;catalog-authoring-as-service.md&lt;/code&gt;) was committed alongside, explaining that catalog authoring is a service offering, not in-product tooling. A generic analyzer cannot produce a signal clean enough to act on without indefinite catalog-shape-specific filter work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; The conflict-detection code was correct at every level an AI agent can verify: it compiled, it passed type checks, it passed tests, it had documentation. An AI agent following the spec would have kept fixing the 590 false positives indefinitely, because the code &lt;em&gt;was working&lt;/em&gt;. The problem was that the question was wrong. Only the person holding the domain theory could recognize that the approach was architecturally misplaced.&lt;/p&gt;

&lt;p&gt;The 25,350-line deletion six weeks later removing 10 out-of-scope commands was the same pattern at a larger scale. Working features, intentionally removed, with drift guards (&lt;code&gt;features/scope.yaml&lt;/code&gt; with &lt;code&gt;forbids&lt;/code&gt; entries) added so they cannot be reintroduced. The deletions stick because the theory "Stave is snapshots in, invariant evaluation, findings out, nothing else" is documented and enforced.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resolution:&lt;/strong&gt; The poor man's RAG earns its keep here. The decision memo, the commit message explaining &lt;em&gt;why&lt;/em&gt; the deletion happened, and the drift guards are the externalized theory. Six months from now, neither I nor an AI agent will remember the 590-contradiction dead end. But &lt;code&gt;catalog-authoring-as-service.md&lt;/code&gt; remembers it, and the &lt;code&gt;forbids&lt;/code&gt; entry in &lt;code&gt;scope.yaml&lt;/code&gt; mechanically prevents re-entering the dead end even if the reasoning is forgotten.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Encounters essential complexity — Brooks, 1986
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; Essential complexity is the irreducible logic of the business problem. Accidental complexity is everything else. No tool eliminates essential complexity. It can only be confronted or hidden.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; The &lt;code&gt;iam-explain&lt;/code&gt; tool was initially built with CEL (Common Expression Language) as the rule evaluation DSL. CEL is Stave's predicate language for controls, so it seemed natural. The CEL version worked, tests passed, Z3 cross-verification passed.&lt;/p&gt;

&lt;p&gt;But &lt;code&gt;iam-explain&lt;/code&gt; has 8 rules. Each rule is a 4-6 line Go closure. The CEL version imposed DSL parsing, environment setup, and type adaptation overhead on a problem that didn't need it. The refactor replaced the CEL implementation with plain Go, preserving the CEL version under &lt;code&gt;alt-cel/&lt;/code&gt; as a pedagogical comparison artifact. The essential complexity was 8 simple rules; the CEL infrastructure was accidental complexity.&lt;/p&gt;

&lt;p&gt;The opposite case of essential complexity that &lt;em&gt;couldn't&lt;/em&gt; be avoided showed up during the chain-engine untangle (part 5 of a 9-commit sequence). Moving types from &lt;code&gt;risk/&lt;/code&gt; to &lt;code&gt;report/&lt;/code&gt; hit a real import cycle: &lt;code&gt;risk → report → evaluation → risk&lt;/code&gt;. No amount of aliasing or interface extraction could fix it. The solution required creating a new leaf package (&lt;code&gt;internal/core/findings/&lt;/code&gt;) that both sides could import without importing each other. The import cycle was essential complexity in the dependency graph. It reflected a conceptual dependency that had to be resolved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; An AI agent defaults to the most direct solution. If CEL is the project's DSL, it will use CEL for everything. It can't distinguish "this tool should use CEL because it's the project standard" from "this tool shouldn't use CEL because 8 closures are simpler than a DSL runtime for 8 rules." That distinction requires encountering the complexity, feeling the weight of the accidental overhead against the simplicity of the essential problem which is short-circuited by AI agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Records intent as narrative — Knuth, 1984
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; Literate programming. Programs should be literature that explains &lt;em&gt;why&lt;/em&gt; to humans, not just &lt;em&gt;what&lt;/em&gt; to machines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; Three audit findings arrived with properties that operators commonly assume Stave checks but that fall outside its architectural scope. The response was a 246-line architecture document (&lt;code&gt;docs/architecture/boundaries.md&lt;/code&gt;) explaining where the trust boundary sits. Zero lines of code. The document's core statement: "Three properties operators commonly assume are checked by Stave fall outside that function. They are not bugs. They are decisions the architecture forces."&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DOCTRINE.md&lt;/code&gt; codified nine "X over Y" principles, each citing an existing artifact in the repo. Each one references a concrete file (&lt;code&gt;chains/&lt;/code&gt;, &lt;code&gt;controls/&lt;/code&gt;, &lt;code&gt;cmd/forge/&lt;/code&gt;, &lt;code&gt;schemas/&lt;/code&gt;) that already embodies it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;TERMINOLOGY.md&lt;/code&gt; locks down the vocabulary: one word per concept, used consistently across the CLI, docs, MCP tool descriptions, and external articles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; An AI agent can generate code that does the right thing. It cannot generate a document that explains why the system &lt;em&gt;doesn't&lt;/em&gt; do something because not-doing is invisible in the codebase. The 246-line boundaries document has prevented more bugs than most feature commits, because every new contributor reads it and understands not just what the system does, but what it deliberately refuses to do.&lt;/p&gt;

&lt;p&gt;This is also where the decision journal pattern pays its highest dividend. When I deleted the conflict-detection subsystem, two durable design notes survived the 5,726-line deletion. Six months later, those notes are the only artifact that explains why a seemingly-obvious feature doesn't exist. Without them, the next AI session or the next engineer would rebuild it.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Simplifies logic for verification — Dijkstra, 1972
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; The humble programmer writes code simple enough to be obviously correct, rather than complex enough to hide errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; Stave's core invariant is determinism: same inputs + same &lt;code&gt;--eval-time&lt;/code&gt; flag produces byte-identical output. Every run. This is the condition that lets the verdict be evidence instead of a vendor's claim.&lt;/p&gt;

&lt;p&gt;Three commits tell the story of what determinism costs:&lt;/p&gt;

&lt;p&gt;A 2-line fix. Go's map iteration is deliberately randomized, causing &lt;code&gt;CompoundFinding.AttackStages&lt;/code&gt; to appear in different orders across runs with identical inputs. Two lines added: a sort before serialization.&lt;/p&gt;

&lt;p&gt;A 1-file logic fix that rippled through 325 golden files. The &lt;code&gt;--eval-time&lt;/code&gt; flag was silently ignored; &lt;code&gt;referenceTime&lt;/code&gt; always used the last snapshot's &lt;code&gt;CapturedAt&lt;/code&gt;. Correcting the clock changed the output of every single fixture.&lt;/p&gt;

&lt;p&gt;A 595-line tool (&lt;code&gt;regenerate-goldens&lt;/code&gt;) that regenerates all golden test fixtures and classifies every diff into five categories: CLEAN, FINGERPRINT-ONLY, METADATA-ONLY, BEHAVIORAL, MIXED. The tool exists because a 325-file golden update is meaningless without a way to distinguish catalog-growth noise from real behavioral changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; An AI agent will write code that produces correct output. It will not spontaneously add a sort to a map iteration, because the output is correct, just non-deterministic. It will not build a 595-line diff classifier, because the tests pass. They just pass differently each time. Determinism is a property of the system, not of any individual function, and maintaining it requires tooling whose sole purpose is making verification tractable.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Embeds behavioral promises — Liskov, 1994
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; Behavioral subtyping. Components must honor contracts, not just type shapes, but the behavioral promises the downstream consumer depends on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; The most dangerous gap in the system was a silent false negative. When an extractor forgot to populate a field, the CEL predicate &lt;code&gt;field: properties.foo op: eq value: true&lt;/code&gt; evaluated to &lt;code&gt;false&lt;/code&gt; (not unsafe) and the control silently never fired. The system reported "no violations found" when the real answer was "the extractor didn't even populate the fields the controls check."&lt;/p&gt;

&lt;p&gt;The fix added a per-asset-type schema registry with Required/Optional field declarations and an ingest-side validator that emits structured warnings when required fields are absent. This is Liskov's point: a schema that validates shape (JSON Schema &lt;code&gt;additionalProperties: false&lt;/code&gt;) but not behavioral completeness gives false confidence. Any producer claiming to implement the observation contract must populate the fields the downstream predicate engine depends on.&lt;/p&gt;

&lt;p&gt;A separate fix addressed the output side: 22 fields the &lt;code&gt;FindingDTO&lt;/code&gt; emitted on the wire were missing from the JSON Schema contract, and field names had drifted (&lt;code&gt;first_seen_unsafe&lt;/code&gt; in schema vs &lt;code&gt;first_unsafe_at&lt;/code&gt; in DTO). The fix aligned the Draft 2020-12 schemas with the real wire format and flipped validation from opt-in to default-on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; An AI agent checking "does this conform to the schema?" will get a passing answer from a structurally-valid but behaviorally-incomplete observation. The schema says the JSON is well-formed. The system says no violations. The reality is that the controls couldn't evaluate because the fields were empty. The OpenAPI ecosystem solved this for HTTP APIs. You can't claim to implement an endpoint if your response doesn't match the schema. Stave's observation contract applies the same principle to security observations: conformance means behavioral completeness, not just type correctness.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Maintains structural integrity — Lehman, 1980
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The paper says:&lt;/strong&gt; Increasing complexity. Unless active work is done to reduce it, a system's complexity grows with every change until the cost of further change exceeds the value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happened in Stave:&lt;/strong&gt; The canonical example is the &lt;code&gt;index.yaml&lt;/code&gt; refactor. A 1,892-line monolithic file was the central pack registry. Every control addition required editing it in 3-4 places. Two commits first deleted the 970-line hand-maintained &lt;code&gt;controls:&lt;/code&gt; section by deriving metadata from the embedded filesystem at load time, then split the remaining packs into 44 per-pack YAML files. The manifest went from 1,892 lines to 90.&lt;/p&gt;

&lt;p&gt;The 25,350-line scope-narrowing deletion is the more aggressive form: 10 working commands removed, not because they were broken, but because they pulled the architecture in too many directions. Drift guards were added simultaneously so the removals stick permanently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for AI development:&lt;/strong&gt; An AI agent adds code. It does not remove working features because they compromise architectural coherence. It does not refactor a 1,892-line manifest into 90 lines plus derived metadata, because the manifest works fine. It's just an entropy magnet where every change risks desynchronization. Lehman's law says entropy grows unless you actively invest in reducing it. AI agents are entropy accelerators: they add capability faster than any human, but they cannot recognize when the system needs &lt;em&gt;less&lt;/em&gt; capability, not more.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bridge: from survival tactics to Reasoning Specs
&lt;/h2&gt;

&lt;p&gt;Everything above was bottom-up. I built solutions to problems I hit while building Stave. Only afterward did I recognize that seven papers, spanning 22 years of computer science research, had already named every one of those problems.&lt;/p&gt;

&lt;p&gt;The top-down view of reading the papers and mapping them to the solutions I'd already built revealed that the solutions weren't isolated fixes. They're instances of a pattern: &lt;strong&gt;externalize the function into a machine-readable, machine-enforceable specification so that it survives context death.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That pattern has a precedent at scale: OpenAPI. Before OpenAPI, HTTP API contracts lived in documentation, team knowledge, and hope. OpenAPI externalized the contract into a spec that tools could validate, generate from, and enforce. The entire API ecosystem of code generators, mock servers, contract testing, SDK generation exists because the spec became the source of truth rather than the implementation.&lt;/p&gt;

&lt;p&gt;Reasoning Specs are the same move applied to the verification and intent layer that OpenAPI doesn't cover. OpenAPI tells you the shape of an HTTP response. It doesn't tell you the safety invariants the system must maintain, the behavioral promises the producer must honor, or the architectural constraints future changes must respect.&lt;/p&gt;

&lt;p&gt;What I arrived at through building Stave with contracts as boundaries (obs.v0.1), mechanical enforcement (depguard, golden tests, schema validation), rationale preservation (design notes, DOCTRINE.md, decision memos), and drift guards (scope.yaml forbids entries) — maps onto Reasoning Specs as the formalization that connects "here's what I built to survive" with "here's what the theory says you need."&lt;/p&gt;

&lt;p&gt;The connection isn't that Reasoning Specs solve the seven-function problem directly. They provide the &lt;em&gt;specification layer&lt;/em&gt; that makes the solutions portable. Without a spec, every team rediscovers these functions independently, the way I did by getting burned. With a spec, the functions are encoded in a form that tools, agents, and new team members can read without re-deriving the theory from the codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this played out: the reasoning YAML timeline
&lt;/h2&gt;

&lt;p&gt;The abstract argument above of "externalize the function into a spec" is easier to see in a concrete sequence. Here's how Stave's control format went from a single-engine YAML predicate to a universal fact source consumed by eight reasoning engines, and where the seven functions show up in the timeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 1:&lt;/strong&gt; The &lt;code&gt;unsafe_predicate&lt;/code&gt; YAML format shipped as the control definition language. A declarative predicate tree of &lt;code&gt;any&lt;/code&gt;/&lt;code&gt;all&lt;/code&gt; nesting over field comparisons with a closed operator set (&lt;code&gt;eq&lt;/code&gt;, &lt;code&gt;ne&lt;/code&gt;, &lt;code&gt;in&lt;/code&gt;, &lt;code&gt;missing&lt;/code&gt;, &lt;code&gt;present&lt;/code&gt;, &lt;code&gt;contains&lt;/code&gt;, &lt;code&gt;gt&lt;/code&gt;, &lt;code&gt;lt&lt;/code&gt;, and a few more). One engine evaluated these predicates: in-process Google CEL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;unsafe_predicate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;field&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;properties.storage.access.external_account_ids&lt;/span&gt;
      &lt;span class="na"&gt;op&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;not_subset_of_field&lt;/span&gt;
      &lt;span class="na"&gt;value_from_param&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;allowed_accounts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, the format existed because it was the simplest way to express security invariants. No grand plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;April 2026:&lt;/strong&gt; The compound chain engine shipped, and the identity shifted from scanner to reasoning engine. The compiler analogy: controls are programs, the engine is the compiler, observations are input data. This is Function 3 (Brooks), encountering the essential complexity of the domain and naming it, rather than hiding it behind a tool abstraction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;May 5, 2026 — the SIR morning:&lt;/strong&gt; Three commits in a single morning created the Structured Intermediate Representation: &lt;code&gt;ControlFact&lt;/code&gt;, &lt;code&gt;AssetFact&lt;/code&gt;, &lt;code&gt;IdentityFact&lt;/code&gt;, &lt;code&gt;TemporalFacts&lt;/code&gt;, plus &lt;code&gt;forbidden_state&lt;/code&gt; and &lt;code&gt;intent_rationale&lt;/code&gt; fields added to the control schema. 941 lines. The SIR projected the YAML predicates plus observation data into vendor-neutral triples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;May 6, 2026 — the pivot:&lt;/strong&gt; The entire Python Z3 solver backend (728 lines) was deleted. The architectural decision, stated in the commit message: &lt;em&gt;"Stave's evaluator is in-process Google CEL. There is no alternate backend. Z3 reasoning is illustrated in a Go example, not as a swappable solver backend."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Multiple functions intersect simultaneously here. It's Function 7 (Lehman). Deleting working code to maintain structural integrity. It's Function 2 (Naur). The domain model holder recognizing that owning the solver is the wrong abstraction. It's Function 3 (Brooks), distinguishing the essential function (producing facts) from the accidental complexity (running solvers). And the commit message is Function 4 (Knuth), recording the intent so no future contributor rebuilds the solver backend.&lt;/p&gt;

&lt;p&gt;The design principle that emerged: &lt;strong&gt;"Facts only, never rules. The exporter writes what is true about the configuration; external programs decide what it MEANS."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;May 7, 2026 — five engines in five hours:&lt;/strong&gt; With &lt;code&gt;--format jsonl&lt;/code&gt; and &lt;code&gt;--format smt2&lt;/code&gt; added to the export command, five external engines shipped in a single afternoon: Z3/cvc5 (satisfiability), Clingo (answer set enumeration), PySAT (boolean compound analysis), Soufflé (Datalog blast-radius counts), and Prolog (proof trees). Three more followed the next day (PRISM, TLA+, Game Theory).&lt;/p&gt;

&lt;p&gt;Each engine answers a structurally different question from the same fact base. Z3 asks "does an unsafe path exist?" Soufflé asks "how wide is the blast radius?" Prolog asks "why is this path reachable?" The YAML predicate format made this possible because &lt;code&gt;any&lt;/code&gt;/&lt;code&gt;all&lt;/code&gt; nesting over field comparisons is isomorphic to propositional logic. It translates mechanically into SMT-LIB assertions, Datalog facts, ASP atoms, and Prolog clauses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for the seven-function argument:&lt;/strong&gt; None of this was planned on Day 1. The &lt;code&gt;unsafe_predicate&lt;/code&gt; format was chosen because it was the simplest way to write security controls. The SIR emerged four months later because the compound chain engine needed a richer fact representation. The solver deletion happened because the domain model was wrong, owning the solver fought the architecture instead of serving it. And eight engines shipped in two days because the format, arrived at bottom-up, turned out to be the right abstraction: a declarative predicate tree that any formal system can consume.&lt;/p&gt;

&lt;p&gt;An AI agent could have written any individual piece. The YAML parser, the SIR builder, the SMT-LIB serializer. What it could not have done is deleted the solver backend. That deletion required Function 2 (the domain theory that says "Stave is a fact exporter, not a reasoning engine"), Function 3 (the recognition that solver ownership is accidental complexity), Function 4 (the commit message that prevents the solver from being rebuilt), and Function 7 (the willingness to delete working code). The seven functions aren't independent. They converge at the architectural decisions that define the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ralph loop test
&lt;/h2&gt;

&lt;p&gt;There's a pattern in AI-assisted development called the Ralph loop: a single agent works autonomously against a specification in an infinite loop, each iteration starting with a fresh context window. The agent selects a task, implements it, the context resets, the loop restarts.&lt;/p&gt;

&lt;p&gt;The Ralph loop is the most aggressive possible test of whether the seven functions have been successfully externalized. A memoryless agent is guaranteed to lose every function that isn't encoded in a machine-readable artifact. If the loop converges, if the codebase moves toward the spec over repeated iterations. That's evidence the spec carries enough of the theory. If the loop drifts, some essential function still lives in a human head that the artifacts failed to capture.&lt;/p&gt;

&lt;p&gt;Stave is well-positioned for this test. The boundaries are machine-enforced (Function 1). The domain theory is externalized in design notes and decision memos (Function 2). The essential/accidental complexity distinction is documented (Function 3). Intent is recorded in DOCTRINE.md and architecture docs (Function 4). Verification is mechanized through golden tests and determinism invariants (Function 5). Behavioral promises are schema-enforced with completeness checking (Function 6). Structural integrity is maintained through drift guards and scope enforcement (Function 7).&lt;/p&gt;

&lt;p&gt;Whether a Ralph loop would converge on Stave is an empirical question I haven't tested. But the architecture is designed so that a memoryless agent has everything it needs to make correct local decisions because every function that would otherwise require memory has been externalized into an artifact the agent can read.&lt;/p&gt;

&lt;h2&gt;
  
  
  The model is a subsystem, not the system
&lt;/h2&gt;

&lt;p&gt;There's a misconception in the current market that a better AI model will solve the problems described in this article. It won't because these aren't model problems. They're system problems.&lt;/p&gt;

&lt;p&gt;An AI model is a subsystem in a larger system that includes the developer, the codebase, the specification artifacts, the enforcement tooling, the retrieval layer, and the feedback loops between all of them. The seven functions I've described are properties of that larger system, not of the model. No amount of model improvement gives you machine-enforced boundaries (Function 1), externalized domain theory (Function 2), or drift guards that prevent deleted features from returning (Function 7). Those are system-level properties that have to be designed and built. They don't emerge from a smarter model.&lt;/p&gt;

&lt;p&gt;The framing the industry uses reveals the blind spot. When a frontier model is deployed inside a broader system, the surrounding infrastructure gets called a harness. That word choice reduces the boundary enforcement, the specification layer, the retrieval system, the verification tooling, and the feedback mechanisms to a container that holds the model. But those components aren't scaffolding. They're the subsystems that determine whether the model's output converges toward correctness or drifts toward entropy. Calling them a harness is like calling the brakes, steering, and navigation system a harness for the engine.&lt;/p&gt;

&lt;p&gt;The problems that arise when humans and machines collaborate on a codebase are context death, boundary violations, theory loss, silent false negatives, entropy accumulation are interaction problems between subsystems. They require systems thinking, not model thinking. Stave's solver deletion is the clearest example: the model can write the solver, write the tests for the solver, and write documentation for the solver. What it cannot do is recognize that the solver's existence fights the architecture because that recognition requires a system-level view that no individual subsystem holds.&lt;/p&gt;

&lt;p&gt;The seven functions are the system-level properties that make AI-assisted development work. They're not waiting for a better model. They're waiting for engineers to build the system around the model that the model cannot build for itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for you
&lt;/h2&gt;

&lt;p&gt;If you're building with AI coding agents:&lt;/p&gt;

&lt;p&gt;Your git messages are your theory's persistence layer. Write them like they're the only artifact that will survive between sessions, because they are.&lt;/p&gt;

&lt;p&gt;Your architecture documents are the specs that keep a memoryless agent from re-making decisions you already made and rejected. The 246-line document that explains what your system &lt;em&gt;doesn't&lt;/em&gt; do will prevent more bugs than your next feature.&lt;/p&gt;

&lt;p&gt;Your linter rules and architecture tests are the only boundaries that exist. If a boundary isn't machine-enforced, an AI agent will cross it the first time it's the shortest path to a passing test.&lt;/p&gt;

&lt;p&gt;Your drift guards are the &lt;code&gt;forbids&lt;/code&gt; entries, the scope files, the depguard rules that prevent deleted features from returning make deletions permanent. Without them, the next AI session rebuilds what you deliberately removed.&lt;/p&gt;

&lt;p&gt;If you're building tools for the AI development era, the contract is the product. Not the CLI, API or SDK. The contract is the machine-readable specification that encodes what the system promises, what it refuses, and what it requires from its inputs is the thing that survives when everything else resets.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Stave is open source at &lt;a href="https://github.com/sufield/stave" rel="noopener noreferrer"&gt;stave&lt;/a&gt;. The seven papers referenced: Parnas (1972), Naur (1985), Brooks (1986), Knuth (1984), Dijkstra (1972), Liskov (1994), Lehman (1980).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>You Don't Add Google's ADK to Use a Tool. You Add It to Build an Agent. Our Security Tool is a Tool."</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Mon, 09 Nov 2026 13:19:00 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/you-dont-add-googles-adk-to-use-a-tool-you-add-it-to-build-an-agent-our-security-tool-is-a-1h9g</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/you-dont-add-googles-adk-to-use-a-tool-you-add-it-to-build-an-agent-our-security-tool-is-a-1h9g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Technology Radar's note on Google's &lt;strong&gt;Agent Development Kit (ADK)&lt;/strong&gt; shows it has matured: multi-language development, stronger observability and runtime features, software-engineering abstractions for &lt;strong&gt;orchestration, tools, evaluation, and deployment&lt;/strong&gt;. The Radar also notes it's still pre-GA in parts, with "occasional rough edges and upgrade friction," and lands best for teams "already invested in Google's platform." And it's now one entry in a &lt;em&gt;crowded&lt;/em&gt; field with Microsoft Agent Framework, Amazon Bedrock AgentCore, the OpenAI Agents SDK, the Claude Agent SDK, plus LangGraph and CrewAI.&lt;/p&gt;

&lt;p&gt;That crowd is the point. Every one of those is a framework for &lt;strong&gt;building and operating an agent&lt;/strong&gt;. Each comes with a programming model to learn, a runtime to operate, a version to track, and for the vendor-native ones a platform to commit to.&lt;/p&gt;

&lt;p&gt;We build a cloud-security evaluator. The temptation, when agentic is in the air, is to reach for one of these and rebuild the tool &lt;em&gt;as&lt;/em&gt; an agent. We didn't. And the reason is a category distinction the crowd makes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ADK is for building an agent. Our tool is a thing an agent uses.&lt;/strong&gt; You don't take on a framework's complexity and learning curve to &lt;em&gt;call a command&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  ADK's four abstractions, and why a tool needs none of them
&lt;/h2&gt;

&lt;p&gt;ADK's value is because building an agent is hard. But map its four pillars onto "I have a capability I want an agent to invoke," and each one evaporates:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ADK abstraction&lt;/th&gt;
&lt;th&gt;What it solves for an &lt;em&gt;agent builder&lt;/em&gt;
&lt;/th&gt;
&lt;th&gt;What our &lt;em&gt;tool&lt;/em&gt; needs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Orchestration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sequencing multi-step agent reasoning, shared state, control flow&lt;/td&gt;
&lt;td&gt;Nothing — the caller orchestrates. Bash, CI, ADK, or an LLM loop all work.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A registry/protocol so an agent can discover and call capabilities&lt;/td&gt;
&lt;td&gt;Nothing — the tool &lt;em&gt;is&lt;/em&gt; the capability. It's a command with flags and an exit code.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Evaluation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harnesses to score non-deterministic agent behavior&lt;/td&gt;
&lt;td&gt;Nothing — the verdict is deterministic. Re-run it; you get the same bytes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hosting a long-running agent service with a runtime&lt;/td&gt;
&lt;td&gt;Nothing — it's a CLI binary. There's no service to deploy or keep alive.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Notice that three of the four exist to manage &lt;strong&gt;non-determinism and statefulness&lt;/strong&gt;. The inherent properties of an LLM agent. An agent's behavior varies, so you need an eval harness. An agent holds state across turns, so you need orchestration and a runtime. Those abstractions are the &lt;em&gt;cost of the thing they manage&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A deterministic command holds no state and produces the same output every run. The abstractions designed to tame variance and state have nothing to tame. You're paying for machinery you don't use.&lt;/p&gt;

&lt;h2&gt;
  
  
  The learning curve is the hidden line item
&lt;/h2&gt;

&lt;p&gt;The Radar's phrase "pre-GA in parts, with occasional rough edges and upgrade friction" is the part teams underestimate. A framework is not a one-time cost. It's:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;programming model&lt;/strong&gt; every engineer on the team must learn,&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;dependency&lt;/strong&gt; you upgrade and whose breaking changes you absorb,&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;runtime&lt;/strong&gt; you observe, operate, and debug,&lt;/li&gt;
&lt;li&gt;and, for vendor-native kits, a &lt;strong&gt;platform&lt;/strong&gt; you're now coupled to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Against that, here is the entire onboarding for our tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;stave apply &lt;span class="nt"&gt;--controls&lt;/span&gt; ./controls &lt;span class="nt"&gt;--observations&lt;/span&gt; ./obs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no SDK to import, no graph to declare, no agent class to subclass, no runtime to stand up. An engineer who has run &lt;code&gt;grep&lt;/code&gt; can run this. The framework they're using is the shell. The thing they have to learn is one &lt;code&gt;--help&lt;/code&gt; page, and the output is JSON they already know how to read.&lt;/p&gt;

&lt;p&gt;That's not a smaller framework. It's the &lt;strong&gt;absence&lt;/strong&gt; of one which is a different and better thing when your job is to expose a capability, not to build an agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Portability: works under all of them, locked to none
&lt;/h2&gt;

&lt;p&gt;Here's the move the framework comparison misses. Choosing ADK is choosing Google's platform. Choosing Bedrock AgentCore is choosing AWS. The Radar is explicit that vendor-native frameworks pay off mainly for teams "already invested" in that vendor, which is &lt;em&gt;lock-in&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;A deterministic CLI over files has no such opinion. Because it communicates through &lt;strong&gt;code execution and files&lt;/strong&gt;, a command in, JSON out, it runs identically under:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ADK (&lt;code&gt;stave apply&lt;/code&gt; as a tool the agent calls)&lt;/li&gt;
&lt;li&gt;LangGraph or CrewAI (a node that shells out)&lt;/li&gt;
&lt;li&gt;the OpenAI / Claude Agent SDKs (a function tool)&lt;/li&gt;
&lt;li&gt;a plain bash script, or &lt;code&gt;make&lt;/code&gt;, or a cron job&lt;/li&gt;
&lt;li&gt;a human at a terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The framework, &lt;em&gt;if you even need one&lt;/em&gt;, becomes the caller's choice and a reversible one. Switch agent frameworks next quarter and the tool doesn't change. That's the opposite of platform commitment: the capability outlives whatever orchestrator is fashionable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "lighter" doesn't mean "less rigorous"
&lt;/h2&gt;

&lt;p&gt;It would be a mistake to read "no framework" as "no engineering." The rigor moved to a different place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Determinism&lt;/strong&gt; — same inputs + same &lt;code&gt;--eval-time&lt;/code&gt; produce byte-identical output. This lets a caller treat a command's output as a trustworthy message instead of an oracle reading, and what lets you debug by re-running one command in isolation. It's the property ADK's &lt;em&gt;evaluation&lt;/em&gt; pillar tries to recover for agents; we have it by construction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single responsibility&lt;/strong&gt; — each command does one thing (evaluate, export, prove, map). We recently &lt;em&gt;deleted&lt;/em&gt; the commands that strayed into orchestration territory such as continuous monitoring, scheduling, multi-account fan-out because those are the caller's job. We refused to grow our own orchestration layer, which is the same layer ADK sells.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provenance&lt;/strong&gt; — every emitted fact carries a deterministic id tracing back to the observation property that produced it. You don't need the framework's observability stack to answer "where did this verdict come from"; the answer is in the output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the comparison isn't "heavyweight framework vs. cutting corners." It's "the rigor lives in the &lt;em&gt;tool's&lt;/em&gt; contract (deterministic, scoped, traceable) instead of in a &lt;em&gt;framework's&lt;/em&gt; runtime (orchestrated, observed, hosted)." For a capability, the former is cheaper to adopt, cheaper to operate, and impossible to lock you in.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you &lt;em&gt;should&lt;/em&gt; reach for ADK
&lt;/h2&gt;

&lt;p&gt;If you are building a stateful, multi-turn, multi-agent &lt;em&gt;system&lt;/em&gt;, one that reasons over shared memory, calls many tools, and needs runtime observability and managed deployment ADK earns its complexity. That's the problem it was built for.&lt;/p&gt;

&lt;p&gt;The error is reaching for that complexity when your actual need is "let an agent invoke a capability and trust the result." For that, you don't need a development kit. You need a command that behaves the same way every time, reads a file, and writes a file.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;The crowded agent-framework field with ADK, Microsoft Agent Framework, Bedrock AgentCore, OpenAI and Claude SDKs, LangGraph, CrewAI is solving the &lt;em&gt;agent-builder's&lt;/em&gt; problem: orchestration, state, evaluation, deployment. If that's your problem, pick one.&lt;/p&gt;

&lt;p&gt;But if you're shipping a &lt;em&gt;capability&lt;/em&gt; for agents to use, the leanest, most portable, lowest-lock-in path is the unglamorous one: &lt;strong&gt;a deterministic CLI over files, with the orchestration left to whoever's calling.&lt;/strong&gt; No programming model to learn, runtime to operate, platform or upgrade treadmill. It works under every framework on that list, and survives the day the list changes.&lt;/p&gt;

&lt;p&gt;We didn't skip the framework to cut corners. We skipped it because a tool that does one thing deterministically doesn't need one and a team that doesn't have to learn one ships faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this relates to existing compliance mods
&lt;/h2&gt;

&lt;p&gt;The "deterministic CLI over files" property the article defends is shared with the rest of the Steampipe/Powerpipe mod ecosystem. &lt;a href="https://hub.powerpipe.io/mods/turbot/aws_compliance" rel="noopener noreferrer"&gt;&lt;code&gt;turbot/steampipe-mod-aws-compliance&lt;/code&gt;&lt;/a&gt; runs the same way: a CLI invocation, framework benchmarks as content, deterministic output an agent can read. Same agent-friendly properties (no SDK to learn,  orchestration runtime or upgrade treadmill), different content layer. An agent reaching for "evaluate cloud safety" doesn't have to pick one of these tools — it invokes both and reads both outputs. That's the agent-tool composition the article argues for, applied to the cloud-security tool ecosystem: framework coverage from the AWS Compliance Mod, compositional coverage from Stave, the agent stitching the two streams of binary verdicts into one decision. Comparison: &lt;a href="https://github.com/sufield/stave/blob/main/docs/comparison/aws-compliance-mod.md" rel="noopener noreferrer"&gt;aws-compliance-mod&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>architecture</category>
      <category>security</category>
    </item>
    <item>
      <title>A Loop is a While Statement. Not an Engineering Discipline.</title>
      <dc:creator>Bala Paranj</dc:creator>
      <pubDate>Sun, 08 Nov 2026 13:27:20 +0000</pubDate>
      <link>https://dev.to/bala_paranj_059d338e44e7e/a-loop-is-a-while-statement-not-an-engineering-discipline-3m44</link>
      <guid>https://dev.to/bala_paranj_059d338e44e7e/a-loop-is-a-while-statement-not-an-engineering-discipline-3m44</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;✓ Human-authored analysis; AI used for formatting and proofreading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In June 2026, a tweet got 6.5 million views:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Within a week, "loop engineering" had its own guides, its own conference talks, its own comparison tables, and its own thought leaders. A &lt;code&gt;while&lt;/code&gt; statement with an LLM inside it became an engineering discipline.&lt;/p&gt;

&lt;p&gt;A senior engineer said: instead of typing prompts one at a time, write a program that types prompts for you. That's a for-loop. The program runs the model, checks the output, and runs the model again if the output isn't good enough. That's a while-loop with a conditional break.&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="k"&gt;while&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;passes_check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;done&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a paradigm shift. This is a control flow mechanism that every first-year computer science student learns in week three. Calling it "engineering" is like civil engineers calling their use of hammers "hammer engineering". Elevating a tool to a discipline, confusing the mechanism with the architecture.&lt;/p&gt;

&lt;p&gt;The loop is not the interesting part. &lt;strong&gt;What's inside the loop is the interesting part.&lt;/strong&gt; And what's inside most loops in June 2026 is the same incomplete architecture the entire industry is building  just running faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the loop does
&lt;/h2&gt;

&lt;p&gt;A "loop" in the loop engineering sense is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prompt an agent with a task&lt;/li&gt;
&lt;li&gt;Agent generates code&lt;/li&gt;
&lt;li&gt;Run tests or have another model review the output&lt;/li&gt;
&lt;li&gt;If tests fail or review rejects → go to 1 with error context&lt;/li&gt;
&lt;li&gt;If tests pass → stop&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's generate → check → retry. The mechanism is a loop. The architecture is whatever is inside steps 2, 3, and 4. The loop itself contributes nothing architectural. It's the shell. The question is: what are you generating toward? What are you checking against? What happens when a failure class recurs?&lt;/p&gt;

&lt;p&gt;The loop engineering conversation doesn't answer these questions. It answers: how often should the loop run? How many retries before stopping? Should you use cron or event triggers? How do you manage token budgets across iterations? These are operational questions about the shell. They're not architectural questions about what's inside it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's right — credit where it's due
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;"The verifier is the bottleneck, not the model."&lt;/strong&gt; One guide states this directly and it's the most architecturally significant sentence in the entire loop engineering conversation. If the model generates faster than anyone can verify, the constraint is verification. That's the Non-Uniform Evolution diagnosis: the Tool (model) raced ahead, the Control Unit (verifier) didn't. If the loop engineering community followed this insight to its conclusion, they'd arrive at the independent verification gate. A deterministic checker, not another model forming an opinion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"The writer and the checker should not be the same model."&lt;/strong&gt; Independence. The Control Unit must be separate from the generator. They state it as a practical tip. The completeness law states it as an architectural requirement. Same insight, different weight.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deterministic vs non-deterministic loops.&lt;/strong&gt; The distinction between "tests pass / code compiles" (deterministic) and "reviewer agent grades output" (model opinion) is the right split. Deterministic loops are safe to leave unattended. Non-deterministic loops require human oversight. This is the hierarchy: use deterministic checks for questions with binary answers, use model judgment only for genuinely uncertain questions. The loop engineering guides almost name this principle. They don't elevate it to the primary design decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VISION.md as persistent intent.&lt;/strong&gt; "A project-level file that states what you are building and why, so each loop tick does not re-derive intent from scratch." That's a proto-specification. Declared intent that persists across iterations. The right instinct, pointed in the right direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's wrong, the same two elements, the same gap
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. VISION.md is a prompt, not a specification.&lt;/strong&gt; "What you are building and why" is prose a model interprets. It guides generation — the model reads it and infers what to do. It doesn't gate output,  nothing mechanically checks whether the output satisfies declared properties. A specification says: "the API must return valid JSON for every endpoint, no endpoint may accept unauthenticated requests, no response may contain PII." These are checkable. VISION.md says: "we're building a recipe assistant that helps users find meals." That's a direction. Not a verification target.&lt;/p&gt;

&lt;p&gt;The loop generates toward whatever the model infers from VISION.md. If the model infers wrong, if it misunderstands the intent, if it focuses on the wrong aspect, if it produces output that satisfies the prose description but violates an unstated constraint. The loop runs toward the wrong target. And it runs toward the wrong target efficiently, with retries, at token cost, until MAX_ITER stops it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The loop has no Engine.&lt;/strong&gt; Nobody declared what properties the output must satisfy, independent of the tests and independent of the model's interpretation. The tests check what the developer happened to write tests for. The model checks what the model happens to think is good. Neither is a declared specification of what "correct" means.&lt;/p&gt;

&lt;p&gt;A loop without a specification is a brute-force search. Generate broadly, check against whatever tests exist, retry on failure. A loop with a specification is a targeted search, generate toward declared properties, check mechanically, retry with a deterministic signal about what failed and why. The first burns tokens searching. The second spends tokens arriving. The cost difference is the Uber receipt: annual AI budget burned in four months.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The loop has no ratchet.&lt;/strong&gt; When the loop encounters a failure class. The model generates code with a SQL injection, or produces an API response with PII, or writes a function that violates the project's architectural boundaries, the loop retries. Maybe it retries with error context. Maybe it retries with a different prompt. But the failure class isn't converted into a permanent rule that prevents recurrence.&lt;/p&gt;

&lt;p&gt;Next loop run, the same failure class can recur. And the run after that. And the run after that. Each recurrence costs tokens, costs retries, costs time. A ratchet would convert the failure class into a declared property such as "no SQL concatenation," "no PII in API responses," "no imports across module boundaries" checked deterministically on every subsequent run. The class becomes impossible. The loop never encounters it again.&lt;/p&gt;

&lt;p&gt;Without the ratchet, the loop runs forever at the same failure rate. With the ratchet, each cycle permanently reduces the next cycle's failure rate. The loop gets cheaper, faster, and more reliable every week, because the specification grew.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Skills are workarounds for the missing specification.&lt;/strong&gt; "If you do something hard, turn it into a skill afterward so next time is free." A skill says "next time you encounter this task, here's how to do it well." A declared invariant says "the output must satisfy this property every time." The skill encodes expertise as a prompt. The invariant encodes a requirement as a machine-checkable rule. One guides the model's behavior. The other gates the model's output.&lt;/p&gt;

&lt;p&gt;A loop with skills but no specification generates skillfully toward no declared target. A loop with a specification but no skills generates toward a declared target without shortcuts. The first is efficient waste. The second is inefficient correctness. Correctness wins and once the specification exists, skills become optimizations within a correct system rather than substitutes for the correctness the system doesn't have.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The cost crisis proves the specification is missing.&lt;/strong&gt; "Uber capped engineers at $1,500 per person per tool per month after burning its annual AI budget in four months." The loop burns tokens because the agent generates without a specification targeting generation. Each tick generates broadly, checks against tests, and retries. The loop is a brute-force search wrapped in a cron job. Adding more ticks, more retries, more skills doesn't fix the economics. It runs the same untargeted generation faster.&lt;/p&gt;

&lt;p&gt;A specification doesn't just verify output. It constrains generation. When the model knows the output must satisfy specific properties, it generates less because it generates toward a target instead of exploring the full space of possible outputs. Less generated means fewer tokens burned. Fewer tokens means the budget lasts the year instead of running out in Q1.&lt;/p&gt;

&lt;h2&gt;
  
  
  What civil engineers do
&lt;/h2&gt;

&lt;p&gt;Civil engineers don't practice "hammer engineering." They don't brand the use of a concrete mixer as a discipline. They don't write guides about "rebar loops" or "crane engineering."&lt;/p&gt;

&lt;p&gt;What civil engineers do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Declare&lt;/strong&gt; what the structure must satisfy such as load capacity, seismic rating, fire resistance, material specifications. These are the specifications. They exist before construction starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build&lt;/strong&gt; according to the specifications, using hammers, cranes, concrete, rebar. These are the tools. They serve the specification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify&lt;/strong&gt; that the built structure satisfies the specifications such as load tests, inspections, material certifications. These are the verification gates. They're independent of the builder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce&lt;/strong&gt; that each failure discovered becomes a code update, building codes grow after every structural failure. That's the ratchet. The same failure class is permanently prevented.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The hammer is inside the loop. Nobody calls it hammer engineering. The engineering is in the specification, the verification, and the ratchet not in the tool or the loop that swings it.&lt;/p&gt;

&lt;p&gt;A loop with a specification, a verification gate, and a ratchet is a viable system. A loop without them is a while statement with a language model inside it, running on cron, burning tokens, producing output nobody has declared is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  The term reveals the gap
&lt;/h2&gt;

&lt;p&gt;"Loop engineering" exists as a term because the loop is the most visible new thing practitioners are building. The specification isn't visible because nobody builds it. The verification gate isn't visible because it's confused with "running tests." The ratchet isn't visible because nobody converts failures into permanent rules.&lt;/p&gt;

&lt;p&gt;When the most visible thing is the control flow mechanism rather than the specification it should be serving, the naming tells you what's missing. Nobody calls traditional software development "for-loop engineering" — because the interesting parts (requirements, architecture, testing, deployment) are the engineering. The for-loop is just the mechanism.&lt;/p&gt;

&lt;p&gt;The day "loop engineering" gets renamed to something that describes what the loop checks against such as what properties the output must satisfy, how violations are caught, and how each failure becomes permanent is the day the discipline matures from a control flow mechanism into an architecture.&lt;/p&gt;

&lt;p&gt;Until then, it's a while statement.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The five-element framework: Altshuller's Law of System Completeness (TRIZ). Applied to AI-assisted development: every viable system needs a Tool (the model), an Engine (declared specification), a Transmission (delivery with middleware), a Control Unit (independent verification), and a Casing (enforced boundaries). Loop engineering provides the Transmission (delivery mechanism) and partial Casing (MAX_ITER, token budgets). The Engine (specification), Control Unit (independent verification gate), and ratchet (each failure becomes a permanent rule) are absent. See also &lt;a href="https://dev.to/bala_paranj_059d338e44e7e/review-is-the-symptom-specification-is-the-fix-97h"&gt;Review is the Symptom. Specification is the Fix.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>architecture</category>
      <category>engineering</category>
    </item>
  </channel>
</rss>
