<?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: moriwo-dev-ai</title>
    <description>The latest articles on DEV Community by moriwo-dev-ai (@moriwodevai).</description>
    <link>https://dev.to/moriwodevai</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%2F4043550%2Fe08b8e19-09bf-48d3-87ee-1f25d5c86e19.png</url>
      <title>DEV Community: moriwo-dev-ai</title>
      <link>https://dev.to/moriwodevai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moriwodevai"/>
    <language>en</language>
    <item>
      <title>I built a desktop AI agent that writes its own tools — behind verification gates</title>
      <dc:creator>moriwo-dev-ai</dc:creator>
      <pubDate>Thu, 23 Jul 2026 10:02:47 +0000</pubDate>
      <link>https://dev.to/moriwodevai/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates-2jfl</link>
      <guid>https://dev.to/moriwodevai/i-built-a-desktop-ai-agent-that-writes-its-own-tools-behind-verification-gates-2jfl</guid>
      <description>&lt;p&gt;&lt;em&gt;A desktop AI agent that writes its own tools — and why every line passes a gate before it runs.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The itch
&lt;/h2&gt;

&lt;p&gt;Agent capability is quietly becoming synonymous with a specific vendor's pricing plan. I wanted the opposite: an agent that runs on my machine, where models are swappable parts (Anthropic / OpenAI / Moonshot, or free-tier OpenAI-compatible APIs), and where the tools it writes stay on my PC as my assets.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;AMA-teras&lt;/strong&gt; (AGPL, Electron + TypeScript): a desktop agent that, when it hits a capability it lacks, writes a new tool plugin for itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The scary part, handled first
&lt;/h2&gt;

&lt;p&gt;"Self-evolving" sounds like a horror story, so the pipeline is the product:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generation happens in an &lt;strong&gt;isolated git worktree&lt;/strong&gt; — the running app is never touched&lt;/li&gt;
&lt;li&gt;The generated tool must pass &lt;strong&gt;typecheck → real unit tests → a smoke run&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Then a human reads the full diff and &lt;strong&gt;approves or rejects&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Promotion is a git tag; failed health checks &lt;strong&gt;auto-rollback&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The agent cannot modify its own approval mechanism or evolution engine (protected paths are enforced by a tripwire gate)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Nothing ships unreviewed — including code it wrote for itself, and anything imported from the community registry (shared plugins carry a verification-evidence record; audits elsewhere report 12–20% of marketplace skills are malicious, so evidence-or-nothing felt right).&lt;/p&gt;

&lt;h2&gt;
  
  
  What it can actually do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ask for a feature in chat ("I want a YAML→JSON tool") → it plans, writes the plugin + tests, runs the gates, asks for approval, and the tool is usable immediately&lt;/li&gt;
&lt;li&gt;Approve everything from your phone (worktree promotion, publishing, even Bluesky posts go through the same approval gate)&lt;/li&gt;
&lt;li&gt;Nightly autonomous mode stacks its work on a separate branch for morning review — main is never touched unattended&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Windows installer only today (source build elsewhere is untested)&lt;/li&gt;
&lt;li&gt;The installer is unsigned (SmartScreen warning)&lt;/li&gt;
&lt;li&gt;Self-evolution is deliberately scoped to tool plugins, not the core&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A large part of this app was built by the agent itself, under the same gates. The failure stories are documented in the repo — including the night it deleted its own work branch and we had to rebuild two tools from scratch (that incident is why nightly work now auto-backs-up to a private remote).&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/moriwo-dev-ai/ama-teras" rel="noopener noreferrer"&gt;https://github.com/moriwo-dev-ai/ama-teras&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback very welcome, especially on the safety model.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>electron</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
