<?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: Yaping Ma</title>
    <description>The latest articles on DEV Community by Yaping Ma (@yapingma).</description>
    <link>https://dev.to/yapingma</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%2F4231173%2F1a38771d-16a3-455f-9fa7-025d41d256f3.png</url>
      <title>DEV Community: Yaping Ma</title>
      <link>https://dev.to/yapingma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yapingma"/>
    <language>en</language>
    <item>
      <title>Beyond Vibe Coding: Building Invariant-Driven Agentic Systems with AWS Kiro</title>
      <dc:creator>Yaping Ma</dc:creator>
      <pubDate>Fri, 06 Nov 2026 22:22:42 +0000</pubDate>
      <link>https://dev.to/yapingma/beyond-vibe-coding-building-invariant-driven-agentic-systems-with-aws-kiro-2gcn</link>
      <guid>https://dev.to/yapingma/beyond-vibe-coding-building-invariant-driven-agentic-systems-with-aws-kiro-2gcn</guid>
      <description>&lt;p&gt;&lt;em&gt;This post was written as part of the Kiroween 2026 hackathon.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Vibe Coding Paradox
&lt;/h2&gt;

&lt;p&gt;In 2026, building software with AI models has become the default. You give a model a prompt, it generates fifty lines of clean TypeScript, your smoke test passes, and you commit. &lt;/p&gt;

&lt;p&gt;Then production happens.&lt;/p&gt;

&lt;p&gt;A user enters unicode edge cases into your cryptographic key manager. A high-frequency matching engine receives simultaneous orders that cause balance rounding leaks. Your AI agent claimed the feature was "complete," yet hidden state space bugs lingered unseen.&lt;/p&gt;

&lt;p&gt;The fundamental issue isn’t model intelligence—it’s &lt;strong&gt;verification density&lt;/strong&gt;. Unit tests verify two or three examples you happened to think of. What about the 100,000 permutations you didn't?&lt;/p&gt;

&lt;p&gt;When AWS announced the &lt;strong&gt;Kiroween 2026&lt;/strong&gt; hackathon, I set out to solve this exact problem in the &lt;strong&gt;Skeleton Crew&lt;/strong&gt; track by building &lt;strong&gt;SpecGuard Crew&lt;/strong&gt;—a reusable foundation template combining Kiro's Spec-driven engineering with automated Property-Based Testing (PBT).&lt;/p&gt;




&lt;h2&gt;
  
  
  1. What Makes Kiro Different: Executable Specs Over Chat
&lt;/h2&gt;

&lt;p&gt;Most coding assistants are conversational chatbots grafted onto an editor. Kiro treats development as an &lt;strong&gt;executable specification lifecycle&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;EARS Requirements&lt;/strong&gt;: Instead of vague prompts, requirements are formulated in strict EARS syntax (&lt;code&gt;WHEN &amp;lt;trigger&amp;gt; THE System SHALL &amp;lt;action&amp;gt;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Steering Documents&lt;/strong&gt;: Kiro’s &lt;code&gt;.kiro/steering/&lt;/code&gt; files act as non-negotiable architectural guardrails. We configured &lt;code&gt;product.md&lt;/code&gt;, &lt;code&gt;tech.md&lt;/code&gt;, and &lt;code&gt;structure.md&lt;/code&gt; so that every agent mutation adhered to pure state-machine reducers and sub-millisecond invariant latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Hooks&lt;/strong&gt;: Whenever a developer or agent saves a file, Kiro triggers &lt;code&gt;.kiro/hooks/pbt-verify-on-save.json&lt;/code&gt;. If an edit violates any invariant under a 1,000-sample generative fuzz pass, the save is rejected.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  2. One Foundation, Two Orthogonal Worlds (The Skeleton Crew Architecture)
&lt;/h2&gt;

&lt;p&gt;To demonstrate the versatility of SpecGuard, we built two completely different applications on top of the same core template:&lt;/p&gt;

&lt;h3&gt;
  
  
  Application 1: Necromancer Vault (Zero-Knowledge Key Splitting)
&lt;/h3&gt;

&lt;p&gt;A cryptographic safe implementing Shamir's Secret Sharing over Galois Field $GF(256)$. Plaintext secrets (like private keys or API credentials) are decomposed into $n$ horcrux shares with a threshold $k$.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Formal Invariant&lt;/strong&gt;: Any $k$ shares reconstruct the exact secret byte-for-byte; any $k-1$ shares leak zero bits of information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PBT Stress Pass&lt;/strong&gt;: 500 randomized generative trials verifying round-trip reconstruction and tamper resistance in under 60 milliseconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Application 2: Potions Exchange (High-Frequency Dark Orderbook)
&lt;/h3&gt;

&lt;p&gt;A financial limit order matching engine for Halloween ingredients (Dragon Blood, Bat Wings, Moon Dust) featuring FIFO Price-Time priority.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Formal Invariant&lt;/strong&gt;: Total system gold and inventory balances must remain strictly conserved before and after every trade event.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PBT Stress Pass&lt;/strong&gt;: 500 generative streams of randomized order floods verifying that no asset is created or destroyed, and the bid-ask spread is never crossed.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. How Kiro Caught a Critical Cryptographic Flaw
&lt;/h2&gt;

&lt;p&gt;During initial development, a conversational prompt generated Galois Field arithmetic using polynomial &lt;code&gt;0x11b&lt;/code&gt;. The code looked mathematically elegant and passed basic unit tests for small numbers.&lt;/p&gt;

&lt;p&gt;However, when Kiro executed our automated property tests, &lt;code&gt;fast-check&lt;/code&gt; immediately flagged a counterexample: element &lt;code&gt;2&lt;/code&gt; had an order cycle of only 51 elements instead of 255, completely corrupting Lagrange interpolation! &lt;/p&gt;

&lt;p&gt;Because our Kiro steering document mandated PBT verification before implementation, Kiro identified the cycle limitation and switched to primitive polynomial &lt;code&gt;0x11d&lt;/code&gt; ($x^8 + x^4 + x^3 + x^2 + 1$), restoring full mathematical soundness. A human reviewer might have missed this bug for weeks.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Conclusion
&lt;/h2&gt;

&lt;p&gt;AI coding doesn't have to be reckless vibe coding. With AWS Kiro, specifications become executable contracts, hooks become real-time boundary guards, and property-based testing ensures mathematical certainty.&lt;/p&gt;

&lt;p&gt;Code: &lt;a href="https://github.com/yaping-pro/kiroween-specguard" rel="noopener noreferrer"&gt;github.com/yaping-pro/kiroween-specguard&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Live dashboard (click the PBT stress button): &lt;a href="https://yaping-pro.github.io/kiroween-specguard/" rel="noopener noreferrer"&gt;https://yaping-pro.github.io/kiroween-specguard/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post was written as part of the Kiroween 2026 hackathon.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>aws</category>
      <category>devchallenge</category>
    </item>
  </channel>
</rss>
