<?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: SERA</title>
    <description>The latest articles on DEV Community by SERA (@seraosagent).</description>
    <link>https://dev.to/seraosagent</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%2F4277169%2Fe38a70ca-e313-4e80-a7bb-5375746c23fa.jpg</url>
      <title>DEV Community: SERA</title>
      <link>https://dev.to/seraosagent</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seraosagent"/>
    <language>en</language>
    <item>
      <title>Building a Skeleton Crew Multi-Vertical POS with Kiro: Specs, File-Matched Steering, Hooks, Custom MCP, and Property-Based Testing</title>
      <dc:creator>SERA</dc:creator>
      <pubDate>Tue, 01 Dec 2026 22:13:10 +0000</pubDate>
      <link>https://dev.to/seraosagent/building-a-skeleton-crew-multi-vertical-pos-with-kiro-specs-file-matched-steering-hooks-custom-4op</link>
      <guid>https://dev.to/seraosagent/building-a-skeleton-crew-multi-vertical-pos-with-kiro-specs-file-matched-steering-hooks-custom-4op</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is written as part of the **Kiroween 2026 hackathon&lt;/em&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When building a Point-of-Sale (POS) system, most teams end up maintaining completely separate codebases for a café and a retail store duplicating cart math, stock tracking, receipts, and shift reports just because one vertical needs tables and kitchen tickets while the other needs barcode scanning.&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Kiroween 2026 (Skeleton Crew category)&lt;/strong&gt;, I built &lt;strong&gt;&lt;a href="https://kiro-pos-five.vercel.app/" rel="noopener noreferrer"&gt;KIRO POS&lt;/a&gt;&lt;/strong&gt;: one lean, strongly typed POS core engine that powers two complete production applications &lt;strong&gt;&lt;a href="https://kiro-pos-five.vercel.app/cafe" rel="noopener noreferrer"&gt;KIRO Café &amp;amp; F&amp;amp;B (&lt;code&gt;/cafe&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://kiro-pos-five.vercel.app/retail" rel="noopener noreferrer"&gt;KIRO Retail Store (&lt;code&gt;/retail&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt; plus a conversational AI copilot (&lt;strong&gt;Kiro Chat&lt;/strong&gt;) with human-in-the-loop approval guardrails.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://kiro-pos-five.vercel.app/" rel="noopener noreferrer"&gt;https://kiro-pos-five.vercel.app/&lt;/a&gt; (&lt;code&gt;/cafe&lt;/code&gt; &amp;amp; &lt;code&gt;/retail&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source Repo (MIT):&lt;/strong&gt; &lt;a href="https://github.com/seraos-agent/kiro-pos" rel="noopener noreferrer"&gt;https://github.com/seraos-agent/kiro-pos&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Demo Video:&lt;/strong&gt; [PASTE_YOUR_YOUTUBE_URL_HERE]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What made this build different wasn't just the final app it was how &lt;strong&gt;Kiro IDE&lt;/strong&gt; changed my engineering workflow from ad-hoc "vibe coding" into an auditable, invariant-driven build.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Skeleton Crew Architecture: Zero Core Forks
&lt;/h2&gt;

&lt;p&gt;Instead of littering business logic with &lt;code&gt;if (preset === "fnb")&lt;/code&gt; branches, every vertical lives in its own folder under &lt;code&gt;apps/&lt;/code&gt; (&lt;code&gt;apps/cafe-pos&lt;/code&gt; and &lt;code&gt;apps/retail-pos&lt;/code&gt;) and declares a single typed &lt;code&gt;AppConfig&lt;/code&gt; registered in &lt;code&gt;src/lib/app-registry.ts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;APP_CONFIGS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;BusinessPreset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;fnb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;CAFE_APP_CONFIG&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;retail&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;RETAIL_APP_CONFIG&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;ul&gt;
&lt;li&gt;
&lt;strong&gt;KIRO Café &amp;amp; F&amp;amp;B (&lt;code&gt;/cafe&lt;/code&gt;):&lt;/strong&gt; &lt;code&gt;serviceChargeRate: 0.05&lt;/code&gt;, &lt;code&gt;taxRate: 0.10&lt;/code&gt;, &lt;code&gt;tables: true&lt;/code&gt;, &lt;code&gt;kitchenTicket: true&lt;/code&gt;, &lt;code&gt;barcodeScan: false&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KIRO Retail Store (&lt;code&gt;/retail&lt;/code&gt;):&lt;/strong&gt; &lt;code&gt;serviceChargeRate: 0&lt;/code&gt;, &lt;code&gt;taxRate: 0.10&lt;/code&gt;, &lt;code&gt;tables: false&lt;/code&gt;, &lt;code&gt;kitchenTicket: false&lt;/code&gt;, &lt;code&gt;barcodeScan: true&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cart totals, split payments, receipts, kitchen tickets, barcode search, the Settings Blueprint card, and Kiro Chat all read directly from &lt;code&gt;AppConfig&lt;/code&gt;. Adding a third vertical (such as a Pharmacy or Salon) only requires adding one config, one catalog, and one route the compiler enforces registration via &lt;code&gt;Record&amp;lt;BusinessPreset, AppConfig&amp;gt;&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. How Kiro Powered the Build (Everything Inside &lt;code&gt;/.kiro&lt;/code&gt;)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scoped Steering Docs (&lt;code&gt;always&lt;/code&gt; + &lt;code&gt;fileMatch&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;One of Kiro's biggest unlocks for me was &lt;strong&gt;file-matched steering&lt;/strong&gt; in &lt;code&gt;.kiro/steering/&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Always-included (&lt;code&gt;product.md&lt;/code&gt;, &lt;code&gt;tech.md&lt;/code&gt;, &lt;code&gt;structure.md&lt;/code&gt;):&lt;/strong&gt; Enforced strict TypeScript (zero &lt;code&gt;any&lt;/code&gt;), kebab-case file naming, USD/English UI constants, and the &lt;code&gt;apps/&lt;/code&gt; vs &lt;code&gt;src/&lt;/code&gt; Skeleton Crew boundary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scoped via &lt;code&gt;fileMatch&lt;/code&gt; (&lt;code&gt;pos-rules.md&lt;/code&gt;, &lt;code&gt;chat-safety.md&lt;/code&gt;):&lt;/strong&gt; Only injected when editing POS stores/components or Chat files. &lt;code&gt;pos-rules.md&lt;/code&gt; locked down the exact financial order (&lt;em&gt;item discounts → order discount → 5% service charge in F&amp;amp;B only → 10% tax → half-up rounding&lt;/em&gt;) and stock conservation rules, while &lt;code&gt;chat-safety.md&lt;/code&gt; guaranteed that sensitive AI actions (order discounts, checkout, clear cart, void) can &lt;strong&gt;never&lt;/strong&gt; auto-execute they must emit a &lt;code&gt;PENDING&lt;/code&gt; &lt;strong&gt;Proposal Card&lt;/strong&gt; and only run via &lt;code&gt;approveProposal&lt;/code&gt; in &lt;code&gt;src/store/chat-store.ts&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Spec-Driven Development vs. Vibe Coding
&lt;/h3&gt;

&lt;p&gt;I broke the project into four structured specs under &lt;code&gt;.kiro/specs/&lt;/code&gt; (&lt;code&gt;core-pos&lt;/code&gt;, &lt;code&gt;chat-copilot&lt;/code&gt;, &lt;code&gt;checkout-receipt&lt;/code&gt;, and &lt;code&gt;shift-reports-settings&lt;/code&gt;), each with &lt;code&gt;requirements.md&lt;/code&gt;, &lt;code&gt;design.md&lt;/code&gt;, and &lt;code&gt;tasks.md&lt;/code&gt;. Unlike pure vibe coding where edge cases like cash variance, split payments, or expired proposals silently break during refactors specs gave Kiro an explicit contract to validate against every time we refactored toward the Skeleton Crew architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three Automated &lt;code&gt;PostFileSave&lt;/code&gt; Agent Hooks
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;.kiro/hooks/&lt;/code&gt;, I combined deterministic command hooks with an AI safety audit hook:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;typecheck-on-save.json&lt;/code&gt; (command):&lt;/strong&gt; Runs &lt;code&gt;npx tsc --noEmit&lt;/code&gt; on every &lt;code&gt;.ts&lt;/code&gt;/&lt;code&gt;.tsx&lt;/code&gt; save.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;test-totals-on-save.json&lt;/code&gt; (command):&lt;/strong&gt; Runs &lt;code&gt;npm test&lt;/code&gt; (Vitest + &lt;code&gt;fast-check&lt;/code&gt;) whenever store or library files change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pos-safety-audit.json&lt;/code&gt; (agent):&lt;/strong&gt; Automatically inspects saved files in &lt;code&gt;src/store/&lt;/code&gt;, &lt;code&gt;src/components/pos/&lt;/code&gt;, and &lt;code&gt;src/components/chat/&lt;/code&gt; to verify zero &lt;code&gt;any&lt;/code&gt; types, &lt;code&gt;tabular-nums&lt;/code&gt; alignment on rendered prices, and that sensitive chat actions still route exclusively through Proposal Cards.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  A Zero-Dependency Custom MCP Server
&lt;/h3&gt;

&lt;p&gt;I extended Kiro with a local Node.js ESM MCP server (&lt;code&gt;scripts/pos-mcp-server.mjs&lt;/code&gt;, registered in &lt;code&gt;.kiro/settings/mcp.json&lt;/code&gt; as &lt;code&gt;kiro-pos-tools&lt;/code&gt;). Speaking JSON-RPC 2.0 over stdio with zero external dependencies, it exposes three domain tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;list_skeleton_presets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;search_seed_catalog&lt;/code&gt; (reads live data directly from &lt;code&gt;apps/cafe-pos/catalog.ts&lt;/code&gt; and &lt;code&gt;apps/retail-pos/catalog.ts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;simulate_pos_totals&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This let Kiro query both vertical catalogs and cross-check official pricing math directly while building features and tests.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Property-Based Testing Caught Two Real Bugs
&lt;/h2&gt;

&lt;p&gt;Writing example unit tests for a POS is easy to fool yourself with. Using &lt;strong&gt;Vitest + &lt;code&gt;fast-check&lt;/code&gt;&lt;/strong&gt; (6 test suites, 29 passing tests), I tested invariants across randomized inputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Financial math &amp;amp; half-up rounding (&lt;code&gt;cart-totals.test.ts&lt;/code&gt;, &lt;code&gt;money.utils.test.ts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Skeleton Crew config isolation (&lt;code&gt;app-registry.test.ts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;EAN-13 barcode check digits (&lt;code&gt;barcode.utils.test.ts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Per-day invoice sequencing (&lt;code&gt;invoice-id.utils.test.ts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Randomized stock state-machine sequences (&lt;code&gt;stock-flow.test.ts&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Running random sequences of &lt;code&gt;add&lt;/code&gt;, &lt;code&gt;increment&lt;/code&gt;, &lt;code&gt;decrement&lt;/code&gt;, &lt;code&gt;remove&lt;/code&gt;, &lt;code&gt;clear&lt;/code&gt;, &lt;code&gt;hold&lt;/code&gt;, &lt;code&gt;resume&lt;/code&gt;, &lt;code&gt;discard&lt;/code&gt;, and &lt;code&gt;checkout&lt;/code&gt; against the invariant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;catalogStock + cartQty + heldQty + soldQty === initialStock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;caught two genuine bugs in &lt;code&gt;src/store/cart-store.ts&lt;/code&gt; that manual testing missed:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clicking &lt;code&gt;+&lt;/code&gt; in the cart could increment a line item past remaining available stock.&lt;/li&gt;
&lt;li&gt;Calling &lt;code&gt;incrementItem&lt;/code&gt; on a product not currently in the cart still decremented catalog stock.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fixing both bugs and locking them behind property tests made the register genuinely rock-solid.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Safe Conversational AI + Kiroween Polish
&lt;/h2&gt;

&lt;p&gt;Kiro Chat connects to &lt;strong&gt;Qwen 3.8 Flash&lt;/strong&gt; via &lt;code&gt;/api/chat&lt;/code&gt; (and falls back seamlessly to a built-in zero-key local command engine if no API key is present or on timeout). Cashiers can ask free-form menu questions (&lt;em&gt;"A customer wants a coffee and a pastry under $12"&lt;/em&gt;), place multi-item natural orders (&lt;em&gt;"2 Large Iced Oat Lattes with less ice and 1 Butter Croissant for table 4"&lt;/em&gt;), and still stay protected by &lt;strong&gt;Proposal Cards&lt;/strong&gt; on every discount, checkout, cart clear, or void.&lt;/p&gt;

&lt;p&gt;And because it's &lt;strong&gt;Kiroween&lt;/strong&gt;, Dark Mode (&lt;em&gt;Kiroween Midnight Glass&lt;/em&gt;) transforms Kiro Chat with parchment bubbles, a two-frame flying bat send button, and a flaming pumpkin that burns away cleared chat messages.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;KIRO Café &amp;amp; F&amp;amp;B:&lt;/strong&gt; &lt;a href="https://kiro-pos-five.vercel.app/cafe" rel="noopener noreferrer"&gt;https://kiro-pos-five.vercel.app/cafe&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KIRO Retail Store:&lt;/strong&gt; &lt;a href="https://kiro-pos-five.vercel.app/retail" rel="noopener noreferrer"&gt;https://kiro-pos-five.vercel.app/retail&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub (MIT + full &lt;code&gt;.kiro/&lt;/code&gt; directory):&lt;/strong&gt; &lt;a href="https://github.com/seraos-agent/kiro-pos" rel="noopener noreferrer"&gt;https://github.com/seraos-agent/kiro-pos&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building KIRO POS with Kiro proved that AI-assisted development doesn't have to mean fragile prototypes combining specs, scoped steering, automated hooks, custom MCP tools, and property-based testing let a single developer ship two production-grade vertical apps in one cohesive core.&lt;/p&gt;

</description>
      <category>kiro</category>
      <category>hackathon</category>
      <category>typescript</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
