<?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: Hedieh Moshtaghi</title>
    <description>The latest articles on DEV Community by Hedieh Moshtaghi (@hediem).</description>
    <link>https://dev.to/hediem</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%2F4274386%2F9f1a4957-9f68-4bdd-9cb6-e21d222d7267.jpg</url>
      <title>DEV Community: Hedieh Moshtaghi</title>
      <link>https://dev.to/hediem</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hediem"/>
    <language>en</language>
    <item>
      <title>I built HookGuard: A &lt;50ms Local Guardrail &amp; Loop Detector for AI Coding Agents</title>
      <dc:creator>Hedieh Moshtaghi</dc:creator>
      <pubDate>Mon, 30 Nov 2026 13:40:23 +0000</pubDate>
      <link>https://dev.to/hediem/i-built-hookguard-a-50ms-local-guardrail-loop-detector-for-ai-coding-agents-57a4</link>
      <guid>https://dev.to/hediem/i-built-hookguard-a-50ms-local-guardrail-loop-detector-for-ai-coding-agents-57a4</guid>
      <description>&lt;p&gt;Got tired of coding agents getting stuck running the same failing command over and over or trying to read &lt;code&gt;.env&lt;/code&gt; / run &lt;code&gt;git reset --hard&lt;/code&gt;, so I open-sourced &lt;strong&gt;HookGuard&lt;/strong&gt; (MIT, 100% local, &amp;lt;50ms overhead).&lt;/p&gt;

&lt;p&gt;One command (&lt;code&gt;hookguard init&lt;/code&gt;) configures hooks for &lt;strong&gt;Claude Code, Antigravity, Cursor, and Codex CLI&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security rules (&lt;code&gt;hookguard.yaml&lt;/code&gt;):&lt;/strong&gt; blocks &lt;code&gt;rm -rf&lt;/code&gt; / &lt;code&gt;Remove-Item -Recurse -Force&lt;/code&gt;, &lt;code&gt;git push --force&lt;/code&gt;, &lt;code&gt;git reset --hard&lt;/code&gt;, &lt;code&gt;curl | bash&lt;/code&gt;, and &lt;code&gt;.env&lt;/code&gt;/key reads &amp;amp; writes (while allowing &lt;code&gt;.env.example&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loop &amp;amp; thrashing detector:&lt;/strong&gt; stops consecutive or ping-pong command loops when no files changed in between, plus rapid repeated edits to the same file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session budget cap:&lt;/strong&gt; local SQLite tracking (&lt;code&gt;~/.hookguard/data.db&lt;/code&gt;, native &lt;code&gt;node:sqlite&lt;/code&gt;, zero C++ deps) with 80% warning and 100% cap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local dashboard (&lt;code&gt;hookguard ui&lt;/code&gt;):&lt;/strong&gt; dark-mode UI to inspect sessions, blocked actions, loop alerts, and edit &lt;code&gt;hookguard.yaml&lt;/code&gt; with live Zod validation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/hediem/HookGuard" rel="noopener noreferrer"&gt;https://github.com/hediem/HookGuard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love any feedback on rules, adapters, or features you'd want in v0.2!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foeex97rdp6uqnb34awxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foeex97rdp6uqnb34awxv.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>opensource</category>
      <category>security</category>
    </item>
  </channel>
</rss>
