<?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: Joseph Cirello</title>
    <description>The latest articles on DEV Community by Joseph Cirello (@josephcirello).</description>
    <link>https://dev.to/josephcirello</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%2F4270105%2Fcd6f6c84-effc-410c-9280-29e064ece1e1.jpg</url>
      <title>DEV Community: Joseph Cirello</title>
      <link>https://dev.to/josephcirello</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/josephcirello"/>
    <language>en</language>
    <item>
      <title>We built a receipt book an AI can't quietly rewrite. Then we told Kiro to break it.</title>
      <dc:creator>Joseph Cirello</dc:creator>
      <pubDate>Sat, 28 Nov 2026 05:27:35 +0000</pubDate>
      <link>https://dev.to/josephcirello/we-built-a-receipt-book-an-ai-cant-quietly-rewrite-then-we-told-kiro-to-break-it-4j45</link>
      <guid>https://dev.to/josephcirello/we-built-a-receipt-book-an-ai-cant-quietly-rewrite-then-we-told-kiro-to-break-it-4j45</guid>
      <description>&lt;p&gt;&lt;em&gt;Written as part of the Kiroween 2026 hackathon.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here is a small nightmare. Maya runs a furniture workshop, and her AI agent pays the bills through PayPal. On Monday she pays a supplier $1,836.00. On Tuesday the supplier's "SECOND NOTICE" arrives, because the reminder and the payment crossed in the mail. The AI looks in PayPal, doesn't see the money land yet, and pays again.&lt;/p&gt;

&lt;p&gt;We had already built a tool that catches that one. It checks PayPal's own records before money moves and holds the payment for Maya, who declines it on her phone. Problem solved, right?&lt;/p&gt;

&lt;p&gt;Then an accountant friend asked the question that ruined our week: "A month from now, how does Maya prove she declined it?" The record of her decision lives in the same system the AI runs on. Whoever runs that system can edit it. "The software says she declined" is not proof. It's a story.&lt;/p&gt;

&lt;p&gt;So for Kiroween we dug up something from the office supply graveyard: the carbon-copy receipt book. Two sheets, one stroke of the pen, and the copy can't be changed without it showing. Carbon Copy gives every move the AI makes a copy, sealed to the one before it. Change one word, one amount, one receipt, and the check names the exact receipt. Maya's phone keeps a stamp every time she taps, so even a book rewritten from scratch gets caught.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Kiro built it
&lt;/h2&gt;

&lt;p&gt;We never vibe coded this one. When the product is "a record nobody can change without it showing", a change nobody wrote down is exactly the bug you exist to catch. So everything went through Kiro's spec: one spec, 20 requirements, 25 tasks, and the spec itself changed 18 times as we found gaps. Each task went to the Kiro CLI as one instruction, with the spec and three steering files as the only source of truth (no AI decides a payment; the book is append only; checking needs no secret; no keys in the repo). Every Kiro run is saved in the repo, with the instructions it was given and its own report.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part we didn't expect to love: an agent whose only job is to betray us
&lt;/h2&gt;

&lt;p&gt;Kiro lets you build custom agents. We built one called carbon-attacker. Its whole job is to break the book: forge it, rewrite it, hide a change, cause a false alarm, and report only what it can prove with a test.&lt;/p&gt;

&lt;p&gt;We thought we'd built something solid. The attacker disagreed. Round one: six weak spots. We fixed them, spec first. Round two: seven more. Round three: thirteen. Round four, on code we'd written to fix round three: twelve. That's 38 in all, each one fixed or written down as a limit.&lt;/p&gt;

&lt;p&gt;Some were humbling. Payments made through the MCP connection left no receipt at all. Two approvals on the phone could pay the same bill twice. A timeout after PayPal had already taken the money got recorded as "not sent". And our favourite: the check that runs "in Maya's own browser" is code our own server sends, so a dishonest operator could send a check that lies. That one made us ship verify.html, a single file you save from GitHub and open with no internet at all.&lt;/p&gt;

&lt;p&gt;Here's the thing: none of those were in the cryptography. They were in the boring parts around it. That's where real systems break, and we'd never have found them by admiring our own work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then we stopped trusting our own small examples
&lt;/h2&gt;

&lt;p&gt;We replayed every one of the 1,444 recorded AI runs from our earlier project through the book: 2,888 books, 45,571 receipts. Then we changed every single receipt, one at a time, and checked each one. All 45,571 changes were caught, at exactly the right receipt. That test now runs on every push.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed in how we build
&lt;/h2&gt;

&lt;p&gt;Before Kiro, "done" meant the tests passed. Now "done" means our own attacker ran out of ideas. Writing the requirement first felt slow for about a day. Then the attacker found something, and the fix started with one sentence in the spec instead of a frantic patch, and every later run of Kiro knew about it. That's the real win: the spec remembers what we learned.&lt;/p&gt;

&lt;p&gt;If you want to try to break it yourself: run Maya's day in the live demo, decline the double payment on her phone, and press &lt;em&gt;Try to forge a new book&lt;/em&gt;. If you find a 39th weak spot, we'd honestly like to hear about it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://carbon-copy-ywv3.onrender.com" rel="noopener noreferrer"&gt;carbon-copy-ywv3.onrender.com&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/JosephCirello/carbon-copy" rel="noopener noreferrer"&gt;github.com/JosephCirello/carbon-copy&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Video:&lt;/strong&gt; &lt;a href="https://youtu.be/4WLuuWS7IYw" rel="noopener noreferrer"&gt;youtu.be/4WLuuWS7IYw&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>hackathon</category>
      <category>security</category>
      <category>kiro</category>
    </item>
  </channel>
</rss>
