<?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: Albert Leonardi</title>
    <description>The latest articles on DEV Community by Albert Leonardi (@albertleooonardi).</description>
    <link>https://dev.to/albertleooonardi</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%2F4272047%2F7501afa3-c358-44de-9202-2d8376ac5822.jpg</url>
      <title>DEV Community: Albert Leonardi</title>
      <link>https://dev.to/albertleooonardi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/albertleooonardi"/>
    <language>en</language>
    <item>
      <title>48 lines to 715: how a Kiro steering file became my project's memory</title>
      <dc:creator>Albert Leonardi</dc:creator>
      <pubDate>Sun, 29 Nov 2026 09:53:30 +0000</pubDate>
      <link>https://dev.to/albertleooonardi/48-lines-to-715-how-a-kiro-steering-file-became-my-projects-memory-3i11</link>
      <guid>https://dev.to/albertleooonardi/48-lines-to-715-how-a-kiro-steering-file-became-my-projects-memory-3i11</guid>
      <description>&lt;p&gt;&lt;em&gt;I wrote this post as part of the Kiroween Hackathon 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For Kiroween I built &lt;strong&gt;Caspy's Prompt Heist&lt;/strong&gt;, a Halloween persuasion game. You get three prompts to talk Caspy, a stubborn little AI ghost, out of his candy. If your words work, a separate AI judge grades them, and you can mint the result as a candy NFT on Base Sepolia.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/_USRSrd0-P0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The game was the fun part. This post is about the thing that surprised me: the feature of Kiro I ended up relying on most was not code generation. It was a Markdown file.&lt;/p&gt;

&lt;h2&gt;
  
  
  The project was bigger than one chat session
&lt;/h2&gt;

&lt;p&gt;Caspy is not a single app. By the end of the hackathon it was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an Astro + React frontend on Vercel&lt;/li&gt;
&lt;li&gt;a Python game API on Render&lt;/li&gt;
&lt;li&gt;Supabase PostgreSQL for accounts, games and research data&lt;/li&gt;
&lt;li&gt;a Bifrost LLM gateway routing two different Gemini models (one plays Caspy, one judges)&lt;/li&gt;
&lt;li&gt;FLUX.1-schnell for the candy artwork&lt;/li&gt;
&lt;li&gt;two Solidity contracts on Base Sepolia (an ERC-721 with EIP-712 vouchers and a fixed-price marketplace)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I worked across &lt;strong&gt;Kiro IDE&lt;/strong&gt; and &lt;strong&gt;Kiro CLI&lt;/strong&gt;, often switching between them in the same day. Every new session needs to know what is deployed where, what has been tested and what must never change. Re-explaining that in chat every time does not scale, and the explanation drifts.&lt;/p&gt;

&lt;p&gt;That is what steering fixed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 1: 48 lines and one golden rule
&lt;/h2&gt;

&lt;p&gt;My first commit, on 31 October, included &lt;code&gt;.kiro/steering/project.md&lt;/code&gt;. It was 48 lines long. The most important part was this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Golden rule
&lt;/span&gt;
The LLM may influence the outcome, but &lt;span class="gs"&gt;**must never hold mint authority.**&lt;/span&gt;
All value-bearing decisions pass through deterministic, auditable server-side
code. Never wire an LLM tool/function to sign, mint, or write &lt;span class="sb"&gt;`won`&lt;/span&gt; to the DB.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This matters a lot in a game about persuading an AI. The obvious design is to give Caspy a &lt;code&gt;grant_treat()&lt;/code&gt; tool. Then a single clever prompt injection mints an NFT. So the rule is: Caspy has no tools, a separate judge returns a structured verdict, and server code plus the contract decide everything that carries value.&lt;/p&gt;

&lt;p&gt;Because that rule lived in steering, every session in the IDE or the CLI started from it. I never had to catch an agent drifting toward giving the model more power, because the boundary was part of the context from the first message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four weeks later: 715 lines
&lt;/h2&gt;

&lt;p&gt;Here is how the file grew, taken straight from the git history:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Lines&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;31 Oct&lt;/td&gt;
&lt;td&gt;48&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 Nov&lt;/td&gt;
&lt;td&gt;240&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6 Nov&lt;/td&gt;
&lt;td&gt;351&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9 Nov&lt;/td&gt;
&lt;td&gt;650&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17 Nov&lt;/td&gt;
&lt;td&gt;715&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The golden rule is still there at line 153, slightly stronger than before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gs"&gt;**Golden rule:**&lt;/span&gt; the LLM may influence the outcome but must never hold mint
authority. Never wire an LLM tool/function to sign, mint, transact, write &lt;span class="sb"&gt;`won`&lt;/span&gt;,
change grade or consume/refund attempts. All authority stays in server code and
verified contracts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything else changed around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steering became my project's memory
&lt;/h2&gt;

&lt;p&gt;The biggest shift in how I worked: &lt;strong&gt;I stopped treating context as chat history.&lt;/strong&gt; Whenever something was deployed, verified, broke or got fixed, it went into steering with a date. A fresh session picked up the real state of the project instead of my memory of it.&lt;/p&gt;

&lt;p&gt;A few patterns made the file actually useful, rather than just long.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. One authoritative section at the top.&lt;/strong&gt; The file opens with "Current hosting — authoritative checkpoint, 10 November 2026" and a table of every component, where it runs and what to watch out for. When I moved the backend from GitHub Codespaces to Render, I updated that one section. Older notes stay further down under "Historical hosting preparation".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Status words in the headings.&lt;/strong&gt; Some of my real section titles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;## Implemented stack — not the production roadmap&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;## Supabase migration — completed, do not repeat blindly&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;## Historical price-history implementation — superseded presentation&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These look odd, but they solve a real problem. An agent reading a long file can't tell a plan from a fact unless you say so. My day-1 steering said the API would be FastAPI with Redis and Cloud KMS signing. None of that shipped. Without the "not the production roadmap" label, a future session could trust the old plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Verified vs. claimed.&lt;/strong&gt; The file separates what I verified (with what command and when) from what is only planned. One line I'm glad I wrote: "MetaMask extension flow is still untested." It stopped me, and the agent, from claiming something worked when it had only been tested with local Anvil wallets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Working rules for the agent, not just the code.&lt;/strong&gt; My favorite is a one-liner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gs"&gt;**Never run development servers/watchers from the agent.**&lt;/span&gt; Ask the user to start
or restart the launcher.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Long-running processes started by an agent tend to pile up or die silently. I run &lt;code&gt;./run.sh&lt;/code&gt; myself and the agent works against it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Links instead of copies.&lt;/strong&gt; Steering points to the full docs with &lt;code&gt;#[[file:PRD.md]]&lt;/code&gt; and &lt;code&gt;#[[file:docs/render-deployment-2026-11-10.md]]&lt;/code&gt;, so they load as context when needed without duplicating them in steering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specs for the feature I didn't want to rush
&lt;/h2&gt;

&lt;p&gt;The next feature, &lt;strong&gt;Caspy Bench&lt;/strong&gt;, is a persuasion-robustness benchmark. It freezes consented, human-reviewed heists into versioned evaluation sets and replays them against other models. It touches consent, which is exactly where I didn't want to improvise.&lt;/p&gt;

&lt;p&gt;So I wrote it as a Kiro spec in &lt;code&gt;.kiro/specs/persuasion-benchmark/&lt;/code&gt;: 14 requirements with WHEN/THEN acceptance criteria, a design document and 18 tasks. Writing the criteria forced decisions I would otherwise have made halfway through the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;3. WHEN an evaluation set is published THEN the system SHALL reject any later
   change to its items or labels; a correction SHALL require a new version.
...
6. IF fewer than 30 items remain after filtering THEN the system SHALL refuse to
   publish and state how many more are needed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And for consent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;4. WHEN a player declines research THEN attempts, difficulty, win conditions and
   reward eligibility SHALL be unchanged.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every task in &lt;code&gt;tasks.md&lt;/code&gt; names the requirements it covers and is ordered so the app keeps working after each one. Caspy Bench isn't built yet, and I'm fine with that. The spec is the part I'd have gotten wrong if I'd started by coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small hook that pays for itself
&lt;/h2&gt;

&lt;p&gt;The game API is a single Python service, and a syntax error there means a failed deploy on Render. So I added a hook that compiles every backend Python file on save:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Python syntax check on save"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"trigger"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"PostFileSave"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"matcher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"scripts/[^/]+\\.py$"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"... python3 -m py_compile \"$f\" &amp;amp;&amp;amp; echo \"syntax ok: $f\""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"timeout"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&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;It's read-only and deploys nothing. It's boring, and that's the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  MCP for the boring-but-scary parts
&lt;/h2&gt;

&lt;p&gt;Kiro is connected to the Render and Vercel MCP servers, so I can check deploy status, service configuration and logs from inside the editor. The MCP config stays local and out of git because it holds credentials.&lt;/p&gt;

&lt;p&gt;Steering sets the boundaries here too. One rule says any Supabase MCP must stay read-only and project-scoped, and the app's admin database URL must never be given to an MCP server. Giving an agent a tool is easy. Writing down what it must never touch is what makes it safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone starting with Kiro
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Write the rule you can't afford to break on day 1.&lt;/strong&gt; For me it was mint authority. Put it in steering before writing any code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date your checkpoints and label stale sections.&lt;/strong&gt; "Superseded" and "not the roadmap" in a heading save more confusion than any amount of prompting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write down what you haven't verified.&lt;/strong&gt; It keeps you and the agent honest.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use specs where mistakes are expensive.&lt;/strong&gt; Consent, money and security deserve acceptance criteria. A UI tweak doesn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Share context across tools.&lt;/strong&gt; Because the IDE and the CLI read the same &lt;code&gt;.kiro/&lt;/code&gt; folder, switching tools never meant starting over.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Play the testnet preview: &lt;a href="https://caspy-prompt-heist.vercel.app" rel="noopener noreferrer"&gt;caspy-prompt-heist.vercel.app&lt;/a&gt; (test ETH only, and the free backend may take a minute to wake up)&lt;/li&gt;
&lt;li&gt;Source, including the &lt;code&gt;.kiro/&lt;/code&gt; folder: &lt;a href="https://github.com/albertleooonardi/caspy" rel="noopener noreferrer"&gt;github.com/albertleooonardi/caspy&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three prompts. One stubborn ghost. Good luck. 👻&lt;/p&gt;

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

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