<?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: Forsale</title>
    <description>The latest articles on DEV Community by Forsale (@forsale_16e3864dbefa0b554).</description>
    <link>https://dev.to/forsale_16e3864dbefa0b554</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%2F4276672%2Fad65f01e-4c2a-4a0e-975f-03a4fbac1be3.png</url>
      <title>DEV Community: Forsale</title>
      <link>https://dev.to/forsale_16e3864dbefa0b554</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/forsale_16e3864dbefa0b554"/>
    <language>en</language>
    <item>
      <title>I Built a Haunted Fridge App Spec-First with Kiro — Here's What the Spec Caught</title>
      <dc:creator>Forsale</dc:creator>
      <pubDate>Tue, 01 Dec 2026 14:34:43 +0000</pubDate>
      <link>https://dev.to/forsale_16e3864dbefa0b554/i-built-a-haunted-fridge-app-spec-first-with-kiro-heres-what-the-spec-caught-53d9</link>
      <guid>https://dev.to/forsale_16e3864dbefa0b554/i-built-a-haunted-fridge-app-spec-first-with-kiro-heres-what-the-spec-caught-53d9</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;p&gt;Every fridge has a graveyard: the spinach that expired while you ordered takeout, the shrimp you swore you'd cook "tomorrow." For Kiroween 2026's Costume Contest, I built &lt;strong&gt;Midnight Pantry&lt;/strong&gt; — a candlelit web app that ranks your fridge ingredients by expiry urgency (&lt;em&gt;Screaming&lt;/em&gt;, &lt;em&gt;Moaning&lt;/em&gt;, &lt;em&gt;Whispering&lt;/em&gt;, &lt;em&gt;Resting&lt;/em&gt;), summons recipes that rescue the most urgent ones first, and counts the "souls saved" when you cook instead of binning food.&lt;/p&gt;

&lt;p&gt;The costume is functional: each ingredient's candle-glow intensifies with urgency, so the shelf reads at a glance. But the part I want to talk about is how it was built — spec-first, with Kiro — because the spec caught bugs that vibe coding would have shipped.&lt;/p&gt;

&lt;h2&gt;
  
  
  The spec came before the code
&lt;/h2&gt;

&lt;p&gt;Before writing a line of JavaScript, the project had a &lt;code&gt;.kiro/specs/midnight-pantry/&lt;/code&gt; folder:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;requirements.md&lt;/strong&gt; — seven user stories with acceptance criteria ("WHEN an ingredient has 0–1 days left THEN the system SHALL label it &lt;em&gt;Screaming&lt;/em&gt;…").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;design.md&lt;/strong&gt; — architecture (pure logic in &lt;code&gt;logic.js&lt;/code&gt;, rendering in &lt;code&gt;app.js&lt;/code&gt;) plus &lt;strong&gt;seven correctness properties&lt;/strong&gt; for the ranking engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tasks.md&lt;/strong&gt; — the implementation plan, each task traced to requirement numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Steering docs pinned the rules that usually get re-argued mid-build: "design must encode urgency, not just decorate," "all decision logic lives in &lt;code&gt;logic.js&lt;/code&gt; as pure functions," "tests before commits." Those three sentences settled a dozen micro-decisions without debate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Property-based testing earned its keep
&lt;/h2&gt;

&lt;p&gt;The design doc specified properties like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Ranking soundness&lt;/em&gt;: every summoned recipe uses ≥1 pantry ingredient, and a recipe rescuing more urgent ingredients never ranks below one rescuing fewer.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Cook conservation&lt;/em&gt;: rescued ∪ remaining = original pantry, with no overlap.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Normalization invariance&lt;/em&gt;: matching gives identical results for "Eggs", " egg ", and "EGGS".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The test suite checks each property over 500 randomized inputs. The first real failure was a gem: my plural-normalization rule protected words ending in "ss" (thinking of "glass"), so the noisy-input generator produced "herbss" and matching broke. No hand-written example would have tried that. The property did.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hook loop
&lt;/h2&gt;

&lt;p&gt;An agent hook re-runs the suite whenever &lt;code&gt;logic.js&lt;/code&gt; or &lt;code&gt;recipes.js&lt;/code&gt; changes. That turns the spec's properties from documentation into a guardrail: tweak the ranking, and within seconds you know whether you broke monotonicity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What spec-first changed, honestly
&lt;/h2&gt;

&lt;p&gt;Compared with vibe coding the same app, the spec cost maybe 40 minutes up front and saved at least two debugging sessions: the ranking order was never "whatever felt right," and the accessibility rule (urgency always in text, not just glow) was decided before the first pixel, not retrofitted. The one thing the spec didn't do was make the app pretty — that took iteration against the steering rule that spooky design must carry information.&lt;/p&gt;

&lt;h2&gt;
  
  
  The session pass
&lt;/h2&gt;

&lt;p&gt;The final build step is a Kiro session pass: Kiro reads the spec and steering docs and works the remaining tasks — extending the recipe library and adding property tests — with the save-hook re-running the suite on every edit. I'll update this post with what the session actually produced. The spec is the contract; the session is where it gets exercised.&lt;/p&gt;

&lt;p&gt;Midnight Pantry is live and open source (MIT): &lt;a href="https://xh18505886588.github.io/midnight-pantry/?demo=1" rel="noopener noreferrer"&gt;try the demo&lt;/a&gt;, &lt;a href="https://github.com/xh18505886588/midnight-pantry" rel="noopener noreferrer"&gt;read the code&lt;/a&gt;, &lt;a href="https://www.youtube.com/watch?v=wxCCUbVql6M" rel="noopener noreferrer"&gt;watch the 2:30 demo video&lt;/a&gt;. If your fridge is haunted too, stock the shelf and summon something cursed for dinner. 🎃&lt;/p&gt;

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