<?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: Håvard Bartnes</title>
    <description>The latest articles on DEV Community by Håvard Bartnes (@haabe).</description>
    <link>https://dev.to/haabe</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F981276%2F123e622f-2fea-4c0e-b829-3a3009ca1a89.webp</url>
      <title>DEV Community: Håvard Bartnes</title>
      <link>https://dev.to/haabe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haabe"/>
    <language>en</language>
    <item>
      <title>Why Your AI Coding Agent Needs a Digital Straitjacket</title>
      <dc:creator>Håvard Bartnes</dc:creator>
      <pubDate>Wed, 08 Apr 2026 16:27:07 +0000</pubDate>
      <link>https://dev.to/haabe/why-your-ai-coding-agent-needs-a-digital-straitjacket-5beb</link>
      <guid>https://dev.to/haabe/why-your-ai-coding-agent-needs-a-digital-straitjacket-5beb</guid>
      <description>&lt;p&gt;&lt;strong&gt;We are giving AI coding agents way too much freedom. What they actually need is a digital straitjacket.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My north star in software development has always been simple: create actual value. Make things that make people's lives easier—or as Jonathan Smart perfectly puts it: &lt;em&gt;Better Value Sooner Safer Happier (BVSSH).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But for 20 years, I’ve watched the industry actively fight this. I started in the waterfall factory floors of the dot-com bubble. Later, as a Scrum PO and agency owner, I fought fake agile and HiPPOs (Highest Paid Person's Opinion). When consulting in critical national infrastructure, I had to drag teams kicking and screaming into modern DevOps. &lt;/p&gt;

&lt;p&gt;The core issue is always human: we know the right practices, but when deadlines loom, we drop the theories and take shortcuts.&lt;/p&gt;

&lt;p&gt;For a long time, I dreamed of building a SaaS platform—a UI to force teams to actually follow product frameworks. But as generative AI evolved, I realized that building AI middleware was a dead end. The real power lies directly in the agents. So, I shelved the idea.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem: AI Makes the Same Mistakes, Just 100x Faster
&lt;/h3&gt;

&lt;p&gt;While building my DAW project, &lt;em&gt;N-trax&lt;/em&gt;, I moved from the bloated bureaucracy of AWS Kiro to the reckless speed of &lt;a href="https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;. I finally figured out how to mechanically harness an agent’s &lt;em&gt;delivery&lt;/em&gt; phase. &lt;/p&gt;

&lt;p&gt;That was the spark. It was time to resurrect my old dream, not as a SaaS, but as an open-source boilerplate. &lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://github.com/haabe/mycelium" rel="noopener noreferrer"&gt;Mycelium&lt;/a&gt;&lt;/strong&gt;—a harnessing system for Claude Code that forces the agent to do proper product development from discovery to delivery.&lt;/p&gt;

&lt;p&gt;To test the process (and honestly, because I just really wanted these products), I used Mycelium to guide Claude through building a multiplayer WebSockets game (&lt;a href="https://huggingface.co/spaces/haabe/tic-tac-toe" rel="noopener noreferrer"&gt;play it here&lt;/a&gt;) and a native macOS app. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The early versions were a massive wake-up call.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The AI aced the product discovery. It mapped Opportunity Solution Trees perfectly. But then it shipped the macOS app with &lt;strong&gt;zero tests&lt;/strong&gt; and completely ignored accessibility (WCAG). &lt;/p&gt;

&lt;p&gt;Why? Because my rules were just "friendly advice." The AI acted exactly like a stressed human product team: it invested heavily in discovery, then took the path of least resistance during delivery.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution: Mechanical Enforcement
&lt;/h3&gt;

&lt;p&gt;Unlike humans, AI doesn't have feelings. It doesn't get annoyed by rigid, theory-driven bureaucracy.&lt;/p&gt;

&lt;p&gt;This led to Mycelium v0.5.0. It is, quite literally, a digital straitjacket designed to guarantee BVSSH. It encodes 20+ frameworks into a mechanical, three-tier enforcement architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚫 &lt;strong&gt;BLOCKED:&lt;/strong&gt; Physically stops fatal errors (e.g., exiting with code 2 if it tries to write secrets to disk).&lt;/li&gt;
&lt;li&gt;🚧 &lt;strong&gt;GATED:&lt;/strong&gt; The agent &lt;em&gt;cannot&lt;/em&gt; mark delivery as "done" until automated tests exist, accessibility is checked, and the OWASP threat model is updated. &lt;/li&gt;
&lt;li&gt;💡 &lt;strong&gt;ADVISORY:&lt;/strong&gt; Nudges for clean code (DRY, KISS) and cognitive bias awareness.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add to that a brutal &lt;strong&gt;corrections loop&lt;/strong&gt;: The agent cannot write a single line of code without first reading its own previous mistakes. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Theory Stack Under the Hood
&lt;/h3&gt;

&lt;p&gt;For those curious about how the gates are structured, Mycelium encodes frameworks from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Teresa Torres&lt;/strong&gt; (Continuous Discovery)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Marty Cagan&lt;/strong&gt; (Empowered Teams)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nicole Forsgren &amp;amp; Gene Kim&lt;/strong&gt; (DORA / Accelerate)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lou Downe&lt;/strong&gt; (Good Services)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Matthew Skelton &amp;amp; Manuel Pais&lt;/strong&gt; (Team Topologies)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Itamar Gilad&lt;/strong&gt; (GIST)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...along with OWASP, WCAG 2.1 AA, and cognitive bias mitigations by Richard Shotton and Daniel Kahneman.&lt;/p&gt;

&lt;h3&gt;
  
  
  I Need Your Help Stress-Testing This
&lt;/h3&gt;

&lt;p&gt;The era of "vibecoding" needs to end. We need to force discipline into the loop.&lt;/p&gt;

&lt;p&gt;Mycelium is a hypothesis. Testing it on my own projects isn't enough to prove it scales. If you are tired of AI writing incredibly fast code for the wrong problems, check out the repo:&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;&lt;a href="https://github.com/haabe/mycelium" rel="noopener noreferrer"&gt;haabe/mycelium on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run it on your next project, see how the agent reacts to the straitjacket, and please open an issue or a PR when it breaks. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Where do you draw the line between giving an AI agent freedom and putting it in a straitjacket? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>productivity</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
