<?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: Ahmed Hassan</title>
    <description>The latest articles on DEV Community by Ahmed Hassan (@ahmedhassan-eng).</description>
    <link>https://dev.to/ahmedhassan-eng</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%2F4064609%2Fc6d93e7a-9c7c-4e5d-a282-85364f19b6a1.jpg</url>
      <title>DEV Community: Ahmed Hassan</title>
      <link>https://dev.to/ahmedhassan-eng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmedhassan-eng"/>
    <language>en</language>
    <item>
      <title>Who checks the AI software factory?</title>
      <dc:creator>Ahmed Hassan</dc:creator>
      <pubDate>Thu, 19 Nov 2026 15:25:44 +0000</pubDate>
      <link>https://dev.to/ahmedhassan-eng/who-checks-the-ai-software-factory-293i</link>
      <guid>https://dev.to/ahmedhassan-eng/who-checks-the-ai-software-factory-293i</guid>
      <description>&lt;p&gt;Picture a team where AI agents write the tests, write the code, review it and merge it. A person only says what to build, and accepts the result at the end. Teams are starting to build exactly this. One name for it is an AI software factory.&lt;/p&gt;

&lt;p&gt;Here is the catch. Once the factory builds the product, the factory is the thing that must not be wrong. So who checks the factory?&lt;/p&gt;

&lt;p&gt;I don't run a factory. I have one small board on which AI coding agents are set up to work unattended. It is built on four rules. In my view the same four belong under any factory, though I have not tested them under one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: the agents don't get the keys
&lt;/h2&gt;

&lt;p&gt;On a computer, "root" is the account that can change anything. My agents don't have it. They work as an ordinary, non-root user, inside a harness that root owns.&lt;/p&gt;

&lt;p&gt;They get four fixed admin commands and no more: two that only read, one that starts the existing deploy job early, and one that installs the pinned version of their own tool.&lt;/p&gt;

&lt;p&gt;They also can't quietly change the plan. If an agent run writes to the work queue or to the loop's protocol, the run fails, and the agent has to propose the change instead. A run that adds, changes or deletes a ruling fails too.&lt;/p&gt;

&lt;p&gt;So when an agent goes wrong, the damage is limited by design to what its user can write and what those four commands can do.&lt;/p&gt;

&lt;p&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%2F5jznu6ftpdt4jkic992k.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%2F5jznu6ftpdt4jkic992k.png" alt="1  Three nested rings. Outer, the machine: everything root can change. Only I change this, with a cleared script, apart from the four fixed commands. Middle, shared state: the queue, the protocol, the rulings. An agent run that writes here fails. Inner, the agent: its own work. A non-root user with four fixed admin commands, and no more." width="799" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: risky work goes through a person
&lt;/h2&gt;

&lt;p&gt;Some jobs do need root, like changing a service's definition or repairing the host. Beyond those four commands, no agent does these.&lt;/p&gt;

&lt;p&gt;Each one becomes a shell script. An independent session reads it line by line. That session did not write the script and has no stake in it passing. Then I run it by hand.&lt;/p&gt;

&lt;p&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%2Fce6uh5i20ppueu5ld0c5.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%2Fce6uh5i20ppueu5ld0c5.png" alt="2  Four steps in a row. 1: A job needs root. 2: It becomes a script, a shell script, written down. 3: An independent session reads it line by line; it did not write the script. 4: I run it by hand. No agent does." width="800" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Is the review worth the wait? It found three kinds of mistake in those scripts: a link swapped in after the checks had run, an environment that the agent could set, and a gap between checking a script and running it. Each has its fix on record. The repository holds 104 operator scripts so far.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 3: make a check fail before you trust it
&lt;/h2&gt;

&lt;p&gt;A test that cannot fail looks like safety and protects nothing.&lt;/p&gt;

&lt;p&gt;Here is one case. A test passed 14 of 14. It was running against a stub, a stand-in for the real thing, and the stub could not show the fault. On the real machine, the change it was testing never took effect.&lt;/p&gt;

&lt;p&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%2F47mlgqnkx4lubb2eskri.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%2F47mlgqnkx4lubb2eskri.png" alt="3  Two panels. What the test said: 14 of 14 passed, against a stub that could not show the fault. What happened on the real machine: nothing; the change it was testing never took effect. So checks come with a control: a test that plants the defect and shows the check catches it." width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So checks come with a control: a test that plants the defect and shows the check catches it. The same goes for tools. A script that reports zero problems should be believed only after it has been fed one input known to be bad and has said so. The repository holds 317 control scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 4: every rule says what it prevents
&lt;/h2&gt;

&lt;p&gt;The agent sessions work under 47 numbered rules. Every rule carries a line that starts "Prevents" and says what went wrong before the rule existed.&lt;/p&gt;

&lt;p&gt;One of them, reworded for this article: "A wait for every busy service exempts the service it runs in, and prints the full list it waits on. Prevents: a measurement job waited 46 minutes on its own service, then stopped with nothing run."&lt;/p&gt;

&lt;p&gt;A rule without its story gets argued away the first time it is inconvenient. A rule with one gets followed, or it gets changed on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is on record
&lt;/h2&gt;

&lt;p&gt;The loop has four agent roles on timers: an orchestrator, an executor, a reviewer and an operator. Two judges sit beside them. They take work from a queue and act on written rulings. The agents' usage is capped: at 95% of the weekly allowance the loop pauses itself.&lt;/p&gt;

&lt;p&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%2F50bwiyddsr2u6mr15p7t.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%2F50bwiyddsr2u6mr15p7t.png" alt="4  Bar chart of five counts in the repository, 2026-09-18 to 2026-11-18: 2126 commits, 360 decision entries, 317 control scripts, 104 operator scripts, 47 operating rules. They say how much was written down, not how good it is." width="799" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These counts are as of 2026-11-18. They are counts of different things, not a comparison. They say how much was written down, not how good it is, and I give no rate for them.&lt;/p&gt;

&lt;p&gt;And it is not finished. The loop stopped falsely twice, on 2026-11-09 and 2026-11-17. The fix is built and not yet live. I make no uptime claim: the loop has stood still for days at a time.&lt;/p&gt;

&lt;p&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%2Fvz406asw8jn4759b6tzg.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%2Fvz406asw8jn4759b6tzg.png" alt="5  Timeline from 18 Sep 2026 to 18 Nov 2026 with two marks near the end: false stops on 9 Nov and 17 Nov. The loop stopped falsely twice. The fix is built and not yet live. I make no uptime claim: it has stood still for days at a time." width="800" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What carries over
&lt;/h2&gt;

&lt;p&gt;None of the four rules names a framework or a model. The loop is custom and uses no agent framework.&lt;/p&gt;

&lt;p&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%2Fjj8t7gwfwezlj88m0dhc.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%2Fjj8t7gwfwezlj88m0dhc.png" alt="6  Two columns, four pairs: what the loop does, and what carries over to any framework. Agents run as a non-root user with four fixed commands: where the permission boundary goes, and who reviews it. Other root work is a script a person runs after an independent review: which actions need a person, and what that person is shown. Checks are shown failing on a planted defect: proving the evaluation can fail before trusting a pass. Every rule names what it prevents: writing down the incident behind each control. The loop is custom and uses no agent framework." width="799" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I plan to publish the loop so that its three pieces can sit under a factory built on any of them: the non-root harness, the reviewed path for root work, and the control rigs. A reference agent that applies the same controls on LangGraph, with a retrieval step and runs on Azure, is specified; its code comes next.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not show
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It is one person's setup on one machine. Nothing here was measured against another way of working.&lt;/li&gt;
&lt;li&gt;The method costs time. Each root step waits for a review and for me.&lt;/li&gt;
&lt;li&gt;The loop's repository is private for now. The first project to be published under this discipline will be peddet-orin, a benchmark of a person detector on a Jetson board; the loop did not build it.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>devops</category>
      <category>security</category>
    </item>
  </channel>
</rss>
