<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ritzy Lab Engineering Blog | IoT, Embedded Systems & AI for Startups]]></title><description><![CDATA[Deep-dive articles from Ritzy Lab on IoT, embedded firmware, sensor pipelines, and AI/ML — practical engineering guides for startups shipping connected products faster.
<meta name="keywords" content="Ritzy Lab, IoT consulting, embedded systems, embedded firmware, sensor pipelines, AI/ML, LLM, computer vision, robotics, startup engineering, Silicon Valley IoT" />
<meta property="og:site_name" content="Ritzy Lab Engineering Blog" />
<meta name="author" content="Ritzy Lab" />]]></description><link>https://blog.ritzylab.com</link><image><url>https://cdn.hashnode.com/uploads/logos/69bf3beb4a1e513e415879fb/2ce8cdc9-0bb3-4665-a6b7-2988b40c2520.png</url><title>Ritzy Lab Engineering Blog | IoT, Embedded Systems &amp; AI for Startups</title><link>https://blog.ritzylab.com</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 10:05:26 GMT</lastBuildDate><atom:link href="https://blog.ritzylab.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[You Cannot Review Your Way to Quality 🔍 ]]></title><description><![CDATA[Quality by Design: What a Big Tech Vendor Problem Taught Me About Firmware Architecture]]></description><link>https://blog.ritzylab.com/you-cannot-review-your-way-to-quality</link><guid isPermaLink="true">https://blog.ritzylab.com/you-cannot-review-your-way-to-quality</guid><dc:creator><![CDATA[Ritesh Anand]]></dc:creator><pubDate>Thu, 23 Apr 2026 22:29:57 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69bf3beb4a1e513e415879fb/2dd6c67e-3c95-4e13-8f19-c5a1bbacf1f0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p><strong>What this is.<br />Experience + Opinion + Fact (50% experience · 35% opinion · 15% fact)<br /><em>Written in collaboration with AI — I discuss, I do not outsource.</em></strong></p>
</blockquote>
<hr />
<h2><strong>Chapter 1. Hired to Hold the Quality Gate 🏭</strong></h2>
<p>A Fortune 500 hardware company. An external vendor doing all the firmware and embedded software. A gap between "we'll handle it" and "this ships to consumers."</p>
<p>My job: sit between the two. Review every pull request. Catch every defect before it reached the product. Be the gate.</p>
<p>It was a clear mandate. I took it seriously. I built the gate, I sat at the gate, and I started reviewing.</p>
<p>The vendor engineers were competent professionals. Experienced. Working hard under real deadline pressure. I want to be clear about that, because it matters for everything that follows — the problem I eventually found had nothing to do with their skill.</p>
<p>▸ <strong>First principle.</strong> <em>When you are hired to enforce quality, the first move always looks obvious: review more, catch more. The second move is harder to see.</em></p>
<hr />
<h2><strong>Chapter 2. The Obvious Solution: Review Everything 📋</strong></h2>
<p>The first few months: a grind of pull requests, inline comments, and back-and-forth threads.</p>
<p>A missing null check that could corrupt a state machine on edge input. Caught it. Written up. Fixed. Merged. Move on.</p>
<p>An implicit assumption in a sensor driver — the kind that works fine in the lab and surfaces at 2 a.m. on a factory floor. Caught it. Fixed. Merged. Move on.</p>
<p>I added structure: review guidelines, a shared doc cataloguing common patterns. Checklist items. A process. All reasonable things. All things I believed would work.</p>
<p>For a while, the rate of defects in review slowed. The gate felt like it was holding.</p>
<p>▸ <strong>First principle.</strong> <em>More thorough review catches more defects. That is true. But "catching more" and "solving the problem" are not the same thing.</em></p>
<hr />
<h2><strong>Chapter 3. Same Class. Different Module. Every Sprint. 🔧</strong></h2>
<p>This is the moment I kept running into — and it took longer than it should have to name it clearly.</p>
<p>It was never the same bug. It was always the same <em>class</em> of bug, appearing in a new module, written by a different engineer, in a different subsystem, every sprint.</p>
<p>A null check missing here. An ownership boundary left implicit there. A state machine embedded in conditionals instead of modelled explicitly. The surface kept changing. The underlying shape never did.</p>
<p>I wrote longer guidelines. I added more detail to the review checklist. The cycle slowed a little. It kept going.</p>
<p>Each module was a fresh canvas. Each sprint was a fresh opportunity for the same structural hole to open somewhere new. I could not write guidelines fast enough to describe every location where the same gap might appear next.</p>
<p>The frustration I felt during that period was not with the vendor engineers — they were doing their best inside the structure they were given. The frustration was with the <em>approach</em>. With the loop itself. Review → catch → fix → same class appears somewhere else. Review → catch → fix → repeat.</p>
<p>Something was wrong with the model, not the people.</p>
<p>▸ <strong>First principle.</strong> <em>A recurring class of defect is a structural signal. It is the architecture telling you something — not the engineers.</em></p>
<hr />
<h2><strong>Chapter 4. Review Is a Lagging Indicator 💡</strong></h2>
<p>At some point I stopped asking "how do I catch this faster?" and started asking "why does this keep being possible?"</p>
<p>Here is what I eventually saw:</p>
<p><code>REVIEW-GATE MODEL (lagging):   Code written → Bug introduced → PR submitted → Reviewer catches it → Fix → Repeat      ARCHITECTURE-ENFORCED MODEL (leading):   Structure defined → Wrong pattern structurally constrained → Violation surfaces at compile/boot/CI → No reviewer required</code></p>
<p>By the time a bug arrives at a reviewer, the architectural decision that <em>allowed</em> that bug was already made. The module boundary was drawn loosely — that happened weeks earlier, when someone was designing the module, under a deadline, without a structural constraint telling them to draw it tightly. The ownership contract was left implicit — that happened when there was no typed interface requiring it to be explicit.</p>
<p>Review sees the result. Review cannot see the moment of cause. That moment is upstream. That moment is in the architecture.</p>
<p>▸ <strong>First principle.</strong> <em>Review is a lagging indicator — by the time the bug is visible, the structural decision that made it possible has already shipped into the codebase.</em></p>
<hr />
<h2><strong>Chapter 5. Quality Has to Be Designed In 📐</strong></h2>
<p>The shift I am describing is not cosmetic. It is a genuine change in where quality lives.</p>
<p>In a review-gate model, quality is a person. It lives in the reviewer's judgment, applied after the fact. It scales as well as that person scales. Which is: not very far, and not very fast.</p>
<p>In an architecture-enforced model, quality is a property of the structure. Typed interfaces between layers make the ownership contract explicit — not as prose in a review doc, but as a constraint the compiler or runtime validates. Explicit state machines make behavior visible before deployment, not after. Layer boundaries are enforced, not hoped for. Violations surface at compile time, at system boot, in CI — before runtime, before the reviewer ever sees the code.</p>
<p>This is not a new idea in software engineering broadly. But it is a deeply underbuilt idea in embedded firmware. Most firmware projects run as flat procedural code — threads, callbacks, globals, and flags — with quality enforced through review and tribal knowledge. When you outsource that development, the tribal knowledge walks out the door with the team that held it. What remains is review. And review alone cannot carry the weight.</p>
<p>▸ <strong>First principle.</strong> <em>Structure enforces what guidelines only describe. The right architecture makes the correct pattern the default path and the wrong pattern difficult to reach.</em></p>
<hr />
<h2><strong>Chapter 6. If You Are Outsourcing Firmware Today 🤔</strong></h2>
<p>This pattern is not rare. I have seen it across many engagements, in various forms.</p>
<p>A hardware company — startup or established — hands firmware development to a vendor. The vendor delivers code. Someone internal reviews it. The same class of issue surfaces in different modules. Review guidelines get longer. The cycle continues.</p>
<p>The root cause is rarely vendor skill. The vendor engineers are often good. The root cause is the absence of an architectural baseline the vendor must conform to. Without a framework that enforces structure — explicit layer boundaries, typed contracts between modules, no uncontrolled cross-layer coupling, observable runtime state — every module becomes a judgment call. And judgment calls, made by different engineers under different deadline pressures, diverge.</p>
<p>The point of intervention is earlier than the first line of vendor code. Define the structure before work begins. Make the right pattern the only available path. A vendor working inside a well-defined architectural framework produces different output than the same vendor working from a blank file and a document of guidelines.</p>
<p>The question worth asking: if your vendor can write code in any pattern, and the only gate is review — what are you actually enforcing? ✅</p>
<p>▸ <strong>First principle.</strong> <em>The architecture you hand a vendor is the quality floor you will get back. No review process substitutes for a well-defined structure handed over before work begins.</em></p>
<hr />
<h2><strong>Chapter 7. What I Do About This at Ritzy Lab 🤝</strong></h2>
<p>That year of reviewing pull requests, watching the same class of defect appear in a new module every sprint, changed how I think about firmware quality. The lesson compounded across subsequent projects. Same pattern, different clients, different chips.</p>
<p>At Ritzy Lab, this is the lens we bring to every firmware engagement. Before code gets written, the architectural contracts get defined. Layer boundaries are drawn explicitly. Ownership is typed, not assumed. The structure that makes violations visible before runtime — that comes first, not as an afterthought after review has already caught the same thing three times.</p>
<p>The details of what that looks like in practice — what the structural enforcement actually means across different RTOS environments and hardware targets — is a longer story.</p>
<p><em>Next: the specific architecture patterns that make violations visible before runtime — and what it takes to enforce them across a distributed team.</em></p>
<p>▸ <strong>First principle.</strong> <em>The commitment is to put quality in the architecture, not in the review queue. When the structure enforces the contract, the reviewer becomes the last line of defence — not the only one.</em></p>
<hr />
<p><strong>Labeled:</strong> Experience + Opinion + Fact<br />*(50% experience · 35% opinion · 15% fact)*</p>
<p><strong>Sources:</strong> <em>(none required for this piece — all experience-based)</em></p>
<p><em>(Written in collaboration with AI — I discuss, I do not outsource.)</em></p>
<p><em>New to this labeling? Read the framework →</em> <a href="https://www.linkedin.com/pulse/20-years-ideas-articulation-craft-heres-how-i-write-now-ritesh-anand-2vwqc"><em>https://www.linkedin.com/pulse/20-years-ideas-articulation-craft-heres-how-i-write-now-ritesh-anand-2vwqc</em></a></p>
<p>— Ritesh | <a href="http://ritzylab.com">ritzylab.com</a></p>
<p>#EmbeddedSystems #FirmwareDevelopment #EmbeddedEngineering #IoT #FirstPrinciples</p>
]]></content:encoded></item><item><title><![CDATA[20+ Years of Ideas. Articulation Is the Craft. Here's How I Write Now. ✍️]]></title><description><![CDATA[1: what kind of writing is this? — fact, experience, opinion, fiction — with percentages . Clear from the first line. 2. how I actually use AI to write…]]></description><link>https://blog.ritzylab.com/20-years-of-ideas-articulation-is-the-craft-here-s-how-i-write-now</link><guid isPermaLink="true">https://blog.ritzylab.com/20-years-of-ideas-articulation-is-the-craft-here-s-how-i-write-now</guid><category><![CDATA[Thought Leadership]]></category><category><![CDATA[how to use ai  effectively]]></category><category><![CDATA[how is use ai]]></category><category><![CDATA[FirstPrinciples]]></category><category><![CDATA[AICollaboration]]></category><dc:creator><![CDATA[Ritesh Anand]]></dc:creator><pubDate>Tue, 21 Apr 2026 04:25:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69bf3beb4a1e513e415879fb/e51c94d1-c272-428b-a4c0-b8ae59f83ce1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<blockquote>
<p><strong>What this is.</strong> <strong>Opinion + Experience + Fact</strong> (45% opinion · 30% experience · 20% fact · 5% fiction) <em>Written in collaboration with AI — I discuss, I do not outsource.</em></p>
</blockquote>
<hr />
<h3><strong>Chapter 1. Ideas Came Easy. Writing Took Practice.</strong></h3>
<p>20+ years of building 🛠️. 40+ products shipped 📦. Plenty of stories to share.</p>
<p>What took longer to develop was articulation. English came to me later in life. The ideas came fast 💡. Putting them down the way they lived in my head took work — passes, then more passes. That has always been the real craft.</p>
<p>▸ <strong>First principle.</strong> <em>Ideas are abundant; the scarce resource is clear articulation that other people can actually use.</em></p>
<hr />
<h3><strong>Chapter 2. Two Writing Desks in One Home</strong></h3>
<p>When our kids want to write something, they know exactly where to go. For <em>what to write</em> — the idea, the angle, the thing worth saying — they come to me. For <em>how to write</em> — grammar, structure, polish — they go to their mom. She is a technical writer.</p>
<p>Yes, our family literally has two service desks. And yes, the queue at her desk is always longer 😊. I have always been the <em>what</em> parent. The <em>how</em> has always lived at a different desk.</p>
<p>▸ <strong>First principle.</strong> <em>Separating "what" and "how" works inside a family, but if you want to ship serious work, you eventually have to own both.</em></p>
<hr />
<h3><strong>Chapter 3. Finding My Own "How" Partner</strong></h3>
<p>Today I finally have a "how" partner of my own — my AI agent 🤖. One I can talk to anytime.</p>
<p>The Age of Google taught me how to learn 🔍. Search, read, find sources of truth, then stitch those into whatever you are building. I started as an embedded engineer, but that approach helped me build complete products — hardware to cloud, bench to factory floor 🏭.</p>
<p>The Age of AI gives me a different mode. AI can answer questions too — that is a valid use. What makes AI genuinely new is discussion 🧠.</p>
<p>▸ <strong>First principle.</strong> <em>Tools change, but the job is the same — turn information into working systems. Google did it with links; AI does it with dialogue.</em></p>
<hr />
<h3><strong>Chapter 4. Why Discussion Beats One-Shot Answers</strong></h3>
<p>Under the hood, AI predicts the next best token from the context it has. A bare question gets a generic answer. A discussion does three things at once: it feeds richer context, it lets me correct as it pushes back, and it sends the AI to research and validate against real sources. Each turn, the context sharpens. The predictions sharpen with it.</p>
<p>What emerges is articulation ✨ — work the two of us did together. Google gives you results. AI discusses, validates, and builds an answer with you.</p>
<p>Those of us who survived a wall of Stack Overflow tabs know which one we prefer 😅.</p>
<p>There is another reason discussion matters. A recent MIT study compared writers who used an AI assistant to generate essays upfront with writers who wrote first and brought AI in afterward. The second group — the ones who led with their own thinking — showed higher brain engagement, better memory recall, and stronger ownership of their work.</p>
<p>Discussion sharpens you over time 🎯. Outsourcing sharpens the AI.</p>
<p>▸ <strong>First principle.</strong> <em>If the tool does the thinking, your brain goes idle. To grow, you have to carry the reasoning and let AI amplify, not replace, your work.</em></p>
<hr />
<h3><strong>Chapter 5. The Idea Lives in Your Head, Not in the Prompt</strong></h3>
<p>And there is still one more reason discussion works — one that has nothing to do with AI at all. The idea lives in your head. AI cannot read it.</p>
<p>That is the whole problem. When I ask a question — anyone's question — the words on the screen carry only a fraction of what is actually going on upstairs. The full picture, the constraints, the weird edge case I am worried about, the several products I have seen this fail on, the part I cannot quite put into words yet — all of that stays in my head.</p>
<p>Engineers have known this for a long time 🦆. Rubber duck debugging says: explain your bug to a rubber duck on your desk, and in the act of explaining, you solve it yourself. The duck never spoke. You did the work. What the duck did was force you to articulate.</p>
<p>AI works the same way, with one big upgrade. It listens, pushes back, and asks what you missed. Each question it asks is a nudge to surface more of what is already in your head.</p>
<p>This is how AI helps you think out loud. That is why the same AI tool gives different quality of answers to different people. The output depends on the quality of the conversation.</p>
<p>▸ <strong>First principle.</strong> <em>The real bottleneck is not the model; it is your ability to externalise your own context so the model has something meaningful to work with.</em></p>
<hr />
<h3><strong>Chapter 6. Four Lenses I Read (and Write) Through</strong></h3>
<p>Two decades of reading others' writing taught me to ask one question first: what kind of writing is this? 📖</p>
<p>Is it <strong>fact</strong> — something I can verify? Is it <strong>experience</strong> — something this person lived through? Is it <strong>opinion</strong> — a position, even an informed one? Is it <strong>fiction</strong> — a hypothetical, a scenario, a thought experiment?</p>
<p>The answer changes how much weight I give it. An engineer's lived experience building a sensor driver is worth more to me than an essay theorising about sensor drivers. A cited benchmark is worth more than a comparison opinion. A hypothetical has its own role — it is how we imagine futures.</p>
<p>All four have their place. They are just different 🎯. A post built on pure opinion is still useful, if I know it is opinion. Writing that tells you what it is earns the reader's trust.</p>
<p>When you are shipping products, you learn to sort quickly. What can I rely on? What is someone's view worth considering? What is storytelling making a point?</p>
<p>I still read that way. I just did it silently, for years, in my own head.</p>
<p>▸ <strong>First principle.</strong> <em>Every reader silently sorts what they read into fact, experience, opinion, or fiction. Labeling that sort upfront speeds trust on both sides.</em></p>
<hr />
<h3><strong>Chapter 7. The Responsibility Flip: Reader to Writer</strong></h3>
<p>Today I am writing 🎤. That changes my role.</p>
<p>As a reader, I could quietly judge what kind of writing each post was. The writer never knew. As a writer, the responsibility flips. If I am asking readers to spend a few minutes with my words, I owe them the same clarity I always demanded as a reader.</p>
<p>Saying <em>"this is opinion"</em> out loud is a small act. It lets the reader weigh it accordingly. Saying <em>"this is experience from 40+ products"</em> tells them: this is what I lived — one builder's view. Saying <em>"this is a hypothetical"</em> tells them I am imagining, not reporting.</p>
<p>So here is the commitment 🤝 — every post I write from today forward will tell you what it is. The labeling will be visible. The formula will be honest. If I get the mix wrong, please tell me. Accuracy matters to me more than appearing perfect.</p>
<p>Writing publicly is a privilege. The least I can do is be honest about what I put in front of you.</p>
<p>▸ <strong>First principle.</strong> <em>Long-term trust comes from showing your confidence and perspective directly — letting readers see what kind of writing this is, not making them guess.</em></p>
<hr />
<h3><strong>Chapter 8. The Four Categories and the Math</strong></h3>
<p>Here are the four categories and how the math works 📐.</p>
<p><strong>Fact</strong> — something verifiable. A cited benchmark, a proven principle, numbers I can back up with a source.</p>
<p><strong>Experience</strong> — something I lived through. A specific project, a specific bug, a moment on the factory floor.</p>
<p><strong>Opinion</strong> — a position, even an informed one.</p>
<p><strong>Fiction</strong> — speculation, hypothetical, a thought experiment. Humor counts — it is almost always a small fiction.</p>
<p>The formula is simple. My AI agent and I read the draft paragraph by paragraph. We tag each one by its dominant substance. We weight by word count. We round to the nearest 5%. Pretending to be 62.7% opinion would be its own kind of dishonesty 😊.</p>
<p>When I committed to this approach, I checked whether others do something similar. They do.</p>
<p>Scott Alexander (Astral Codex Ten) has used a short <em>"epistemic status"</em> line at the top of his posts for years — a one-line note about how confident he is in what follows. NPR clearly labels opinion content and distinguishes it from news, analysis, and reviews to help readers understand what they are seeing.</p>
<p>Each of us found a version of this idea. We arrived at the same place from different roads. Mine is four categories with percentages, built for a builder writing on LinkedIn in the age of AI.</p>
<p>▸ <strong>First principle.</strong> <em>Posts travel further than their author. A clear contents label keeps the post honest wherever it lands.</em></p>
<hr />
<h3><strong>Chapter 9. What My Stamp Will Look Like</strong></h3>
<p>So here is what the stamp will look like 📋. Words first, percentages in brackets — telling you the mix of fact, experience, opinion, and fiction. Sources where research is cited. A note that the post was built in conversation with AI, not handed off to it.</p>
<p>If you take one thing from this: writing online is more useful when readers know what they are reading 🎯.</p>
<p><em>Next: a pattern I have watched repeat on project after project — and what finally stops it.</em></p>
<p>▸ <strong>First principle.</strong> <em>A visible commitment is more durable than a stated intention. The stamp at the bottom of every post is the commitment kept.</em></p>
<hr />
<h2>STAMP BLOCK</h2>
<p><strong>Labeled:</strong> Opinion + Experience + Fact <em>(45% opinion · 30% experience · 20% fact · 5% fiction)</em></p>
<p><strong>Sources:</strong></p>
<ul>
<li><p><em>Your Brain on ChatGPT</em> — MIT Media Lab study (2025)</p>
</li>
<li><p>Scott Alexander / Astral Codex Ten — epistemic status tags</p>
</li>
<li><p>NPR Opinion labeling policy and transparency standards</p>
</li>
<li><p>Advanced Chess / Centaur Model — Kasparov, 1998</p>
</li>
</ul>
<p><em>(Written in collaboration with AI — I discuss, I do not outsource.)</em></p>
<p>— Ritesh | ritzylab.com</p>
<hr />
<p>#ThoughtLeadership #WritingPublicly #FirstPrinciples #AICollaboration #BuilderVoice</p>
<hr />
<h2>NOTES</h2>
<ul>
<li><p>This is the foundational labeling article. It does NOT carry the <em>"New to this labeling? Read the framework → [link]"</em> footer, because it IS the framework. Starting from the next long-form article, that link footer points back to this piece.</p>
</li>
<li><p>All nine chapters carry a <code>▸ **First principle.**</code> line per Rule 10.</p>
</li>
<li><p>Top declaration uses Option 1 locked format.</p>
</li>
<li><p>All repeats from earlier drafts resolved: <em>"20+ years"</em> appears once in Ch1; Ch6 uses <em>"Two decades"</em>. <em>"Discussion is how AI..."</em> in Ch5 replaced with <em>"This is how AI..."</em>. Ch9 describes the stamp rather than re-promising.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[My AI agent reads the rules before writing code.]]></title><description><![CDATA[We share 3+ years of hands‑on experience using AI coding agents on complex, long‑running products—covering workflows, guardrails, and patterns that bo]]></description><link>https://blog.ritzylab.com/my-ai-agent-reads-the-rules-before-writing-code</link><guid isPermaLink="true">https://blog.ritzylab.com/my-ai-agent-reads-the-rules-before-writing-code</guid><dc:creator><![CDATA[Ritesh Anand]]></dc:creator><pubDate>Mon, 13 Apr 2026 05:29:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69bf3beb4a1e513e415879fb/baaf3f70-d53e-4037-ba5c-05d012b301aa.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every. Single. Time.  </p>
<p>I'm deep in building an embedded framework — strict architecture, multiple layers, the kind of project where one wrong abstraction costs three weeks.  </p>
<p>My coding partner is an AI agent. Not a chatbot I paste snippets into — a co-architect that reads the architecture, understands constraints, and writes implementation across files.  </p>
<p>Here's the thing nobody talks about:  </p>
<p>AI agents are only as disciplined as the system you put around them.  </p>
<p>Left unchecked, they hallucinate structure. They invent conventions. They "help" by quietly ignoring your rules.  </p>
<p>So I treat my AI agent like a talented engineer on day one — read the rules, prove you understood them, then code.  </p>
<p>Every task starts with a mandatory step: the agent reads <a href="https://www.linkedin.com/safety/go/?url=http%3A%2F%2FCODING_RULES%2Emd&amp;urlhash=vmYA&amp;mt=j7w-W5hBXRN6OFhxteXiAwZ8vzStIsVxkBh1SHWlcoW8KJwroNApUJNYjQqrK1wgUBUQ8YYnAvBEGQDSsb3Zbxx1YCuaIrkvu1FP59Wf8-RRENB5mQyzWLoI&amp;isSdui=true"><strong>CODING_</strong></a><a href="http://RULES.md"><strong>RULES.md</strong></a> and <a href="http://ARCHITECTURE.md"><strong>ARCHITECTURE.md</strong></a>, then states the three most relevant rules for that specific task and why they apply. No code until that's done.  </p>
<p>Not a checklist. Proof of understanding.  </p>
<p>Same thing you'd want from any engineer joining a serious project. The difference — with AI, you enforce it every single time. No ego. No shortcuts. No "I already know this codebase."  </p>
<p>The result? Architecture stays clean. Naming stays consistent. Mistakes are small — edge cases, not structural.  </p>
<p>I'm not building with AI to go faster.  </p>
<p>I'm building with AI to go faster without losing control.  </p>
<p>Do you enforce rules on your AI coding agent — or hope for the best?  </p>
<p>— Ritesh | <a href="http://ritzylab.com"><strong>ritzylab.com</strong></a>  </p>
<p><a href="https://www.linkedin.com/search/results/all/?keywords=%23embeddedsystems&amp;origin=HASH_TAG_FROM_FEED"><strong>#EmbeddedSystems</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23ai&amp;origin=HASH_TAG_FROM_FEED"><strong>#AI</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23firmwaredevelopment&amp;origin=HASH_TAG_FROM_FEED"><strong>#FirmwareDevelopment</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23embeddedengineering&amp;origin=HASH_TAG_FROM_FEED"><strong>#EmbeddedEngineering</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23iot&amp;origin=HASH_TAG_FROM_FEED"><strong>#IoT</strong></a></p>
]]></content:encoded></item><item><title><![CDATA[AI Can Write Your Frontend. It Can't Write Your Firmware. Here's Why.]]></title><description><![CDATA[Ask an AI agent to build a React dashboard. You'll get something that runs. Ask it to write firmware for a sensor driver on FreeRTOS. You'll get something…]]></description><link>https://blog.ritzylab.com/ai-can-write-your-frontend-it-can-t-write-your-firmware-here-s-why</link><guid isPermaLink="true">https://blog.ritzylab.com/ai-can-write-your-frontend-it-can-t-write-your-firmware-here-s-why</guid><category><![CDATA[Firmware Development]]></category><category><![CDATA[embedded systems]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[coding]]></category><dc:creator><![CDATA[Ritesh Anand]]></dc:creator><pubDate>Mon, 13 Apr 2026 05:22:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69bf3beb4a1e513e415879fb/5b42b0ca-dd1d-4f39-a24d-f1c485971bd8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p> <br />Ask an AI agent to build a React dashboard. You'll get something that runs.<br /> <br />Ask it to write firmware for a sensor driver on FreeRTOS. You'll get something that compiles. Maybe. And crashes at 3am under load.<br /> <br />I've spent 20+ years building embedded and edge systems. The last 18 months, I've watched AI coding tools get genuinely good — for web, for mobile, for backend. But for firmware and edge systems? Still guessing.<br /> <br />It's not the AI's fault. It's ours.<br /> <br />React works because the framework is well-described. Components have typed props. State has a contract. Routing has a schema. An AI agent reads the structure and generates code that fits.<br /> <br />Firmware has none of that.<br /> <br />We write tasks with shared globals. We communicate through flags and callbacks. We debug with printf and timing luck. Our "architecture" is whatever the last senior engineer decided before they left.<br /> <br />No typed message schema for the AI to read. No formal state machine contract. No machine-readable description of which component talks to which.<br /> <br />The AI has nothing to anchor to — so it hallucinates plausible-looking code that violates assumptions nobody ever wrote down.<br /> <br />I've seen this across 45+ products. The teams that struggle most with AI-assisted firmware aren't the ones with bad engineers. They're the ones with no structure above the RTOS.<br /> <br />The fix isn't better prompts. It's better architecture.<br /> <br />When every component carries metadata. When every message has a typed schema. When every state machine is a table — an AI agent can generate firmware the same way it generates React. Not by guessing. By reading the structure and filling in the logic.<br /> <br />I've been building exactly this. The architecture exists. The contracts are frozen. It runs on my laptop right now — a thermostat and an industrial gateway, same codebase. Apache 2.0.<br /> <br />The AI-firmware gap isn't a model problem. It's a structure problem.<br /> <br />What's the biggest thing stopping you from trusting AI-generated firmware on a real project?<br /> <br />— Ritesh | <a href="http://ritzylab.com"><strong>ritzylab.com</strong></a>  </p>
<p><a href="https://www.linkedin.com/search/results/all/?keywords=%23embeddedsystems&amp;origin=HASH_TAG_FROM_FEED"><strong>#EmbeddedSystems</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23ai&amp;origin=HASH_TAG_FROM_FEED"><strong>#AI</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23firmwaredevelopment&amp;origin=HASH_TAG_FROM_FEED"><strong>#FirmwareDevelopment</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23rtos&amp;origin=HASH_TAG_FROM_FEED"><strong>#RTOS</strong></a> <a href="https://www.linkedin.com/search/results/all/?keywords=%23embeddedengineering&amp;origin=HASH_TAG_FROM_FEED"><strong>#EmbeddedEngineering</strong></a></p>
]]></content:encoded></item><item><title><![CDATA[Your RTOS Is Not Your Architecture]]></title><description><![CDATA[Pain + Solution]]></description><link>https://blog.ritzylab.com/your-rtos-is-not-your-architecture</link><guid isPermaLink="true">https://blog.ritzylab.com/your-rtos-is-not-your-architecture</guid><dc:creator><![CDATA[Ritesh Anand]]></dc:creator><pubDate>Fri, 10 Apr 2026 05:55:07 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69bf3beb4a1e513e415879fb/c6f0b1ba-bdf1-4c67-941c-9808e85f364a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every few months, I watch an engineering team spend weeks debating FreeRTOS vs Zephyr.</p>
<p>They compare tick rates. Memory footprints. Community size. Licensing. They build evaluation boards. They write comparison docs. Eventually, someone makes the call.</p>
<p>Then they build on top of it — and the same structural problems show up again.</p>
<p>Not because the engineers are careless. The opposite. These are good teams doing careful work. But the RTOS doesn't tell you how to structure your application. And without that guidance, every team figures it out differently.</p>
<p>Here's what I mean.</p>
<p>An RTOS gives you tasks, semaphores, queues, and a scheduler. That's its job. It manages concurrency and timing.</p>
<p>But it doesn't define how your sensor task talks to your comms task. It doesn't enforce boundaries between subsystems. It doesn't prevent one module from reaching into another module's state. That's not the RTOS's job.</p>
<p>That's the architecture's job.</p>
<p>And most embedded projects don't have a formal one.</p>
<p>What they have is conventions. A lead engineer who carries the system map in their head. A naming scheme. Maybe a block diagram drawn during the first sprint that nobody updated since.</p>
<p>That works for a while. Then the team grows. Or the product ships and field bugs come in. Or you port to a new MCU and discover that your "architecture" was really just assumptions wired to a specific BSP.</p>
<p>I've worked on products where a state machine in one module was reading a global variable set by an ISR in a completely different module. No contract between them. No typed interface. Just a shared <code>volatile</code> and a convention that both sides understood.</p>
<p>Nobody wrote that to be reckless. It was the pragmatic shortcut when there's no framework enforcing a better pattern. And it works — until it doesn't.</p>
<p>Web development figured this out years ago. Nobody builds a production web app by wiring raw HTTP handlers together with global state. You use a framework. The framework enforces structure. Your code plugs into it.</p>
<p>Embedded never got that layer.</p>
<p>We got great RTOSes. We got HALs. We got BSPs. But the application layer — the thing that defines how your firmware modules are structured, how they communicate, how they're observed — that layer has been left to each team to reinvent.</p>
<p>Every project. From scratch. With the same structural problems emerging at scale.</p>
<p>I decided to stop watching that cycle and build the layer that's missing. Not another RTOS. The thing that sits above it — RTOS-agnostic, structured, observable from day one.</p>
<p>Still building. But the architecture is clear, and the pattern has held across every codebase I've tested it against.</p>
<p>What's your experience — has your team ever spent weeks on the RTOS decision and then zero time designing what sits above it?</p>
<p>— Ritesh | <a href="http://ritzylab.com">ritzylab.com</a></p>
<p>#EmbeddedSystems #RTOS #FirmwareDevelopment #EmbeddedEngineering #IoT</p>
]]></content:encoded></item><item><title><![CDATA[I Almost Built This 5 Years Ago. Here's What Changed.]]></title><description><![CDATA[Five years ago, after the third field failure of the same kind in two years, I sat down and sketched the architecture that would have prevented all of…]]></description><link>https://blog.ritzylab.com/i-almost-built-this-5-years-ago-here-s-what-changed</link><guid isPermaLink="true">https://blog.ritzylab.com/i-almost-built-this-5-years-ago-here-s-what-changed</guid><dc:creator><![CDATA[Ritesh Anand]]></dc:creator><pubDate>Sun, 22 Mar 2026 00:52:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69bf3beb4a1e513e415879fb/c18c221e-0767-4f73-80f9-e8ba117ef0e8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Five years ago, after the third field failure of the same kind in two years, I sat down and sketched the architecture that would have prevented all of them.</p>
<p>Not a fix. An architecture.</p>
<p>A way to structure firmware so that the ISR boundary is a contract, not an assumption. So that component communication is typed and visible, not implicit and buried. So that the next engineer who touches the code doesn't have to reverse-engineer what the first one was thinking.</p>
<p>I sketched it. Then I closed the notebook.</p>
<hr />
<p>The idea was sound. The timing was wrong.</p>
<p>Building a framework — a real one, not a prototype — means writing it across multiple RTOS targets. Writing the hardware abstraction layer. Writing the tooling. Writing the documentation that makes it usable by someone who isn't you.</p>
<p>That's a two-year project for a small team.</p>
<p>For one engineer with a full-time job and client work: a permanent backlog item.</p>
<p>So I kept doing what everyone does. Rebuilt the same infrastructure on every new project. Watched the same class of bugs appear on schedule. Wrote the same post-mortems with slightly different serial numbers.</p>
<hr />
<p>What changed isn't the problem. The problem is exactly what it was in 2021.</p>
<p>What changed is the cost of building it.</p>
<p>AI-assisted development didn't give me the architecture — I've had that since that notebook. What it gave me was the capacity to execute it without a team. To move from "this should exist" to "we are building this" without the two-year runway I didn't have five years ago.</p>
<p>That's not a small thing.</p>
<p>For a certain class of problem — the kind where deep domain knowledge is the real bottleneck, not raw coding hours — the build-to-quality cost just dropped significantly.</p>
<hr />
<p>Three months ago I stopped waiting.</p>
<p>The architecture is done. The contracts are written. The first code is compiling.</p>
<p>We're building the layer above the RTOS that nobody has built properly yet.</p>
<p>More soon.</p>
<hr />
<p>If you've had an idea you knew was right but couldn't execute alone — what was the constraint that held you back?</p>
<p>— Ritesh <a href="http://ritzylab.com"><strong>ritzylab.com</strong></a></p>
<p>#EmbeddedSystems #IoT #FirmwareDevelopment #OpenSource #EmbeddedEngineering</p>
]]></content:encoded></item></channel></rss>