<?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: Plainrail</title>
    <description>The latest articles on DEV Community by Plainrail (@plainrail).</description>
    <link>https://dev.to/plainrail</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%2F4164864%2Fa66eaaff-8ca3-44f6-878c-e4dad3512817.png</url>
      <title>DEV Community: Plainrail</title>
      <link>https://dev.to/plainrail</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/plainrail"/>
    <language>en</language>
    <item>
      <title>Three things I check before merging an AI agent’s diff</title>
      <dc:creator>Plainrail</dc:creator>
      <pubDate>Sun, 29 Nov 2026 22:16:48 +0000</pubDate>
      <link>https://dev.to/plainrail/three-things-i-check-before-merging-an-ai-agents-diff-392c</link>
      <guid>https://dev.to/plainrail/three-things-i-check-before-merging-an-ai-agents-diff-392c</guid>
      <description>&lt;p&gt;Say I ask an agent to fix one bug: clicking Save with an empty display name should show an error. Existing names should still save, and the settings API shouldn’t change.&lt;/p&gt;

&lt;p&gt;The agent reports that tests passed. The patch touches the settings form, its test, and the shared API client. That last file might belong in the patch, but I want to know why before I merge it. Here’s the review I’d run.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the task before the diff
I write the expected behavior down in one line: Empty name → show an error and don’t send a save request. Valid name → save as before. That gives me something to check each change against. If the task only said “fix settings,” I’d clarify the expected behavior before deciding whether the patch is correct.&lt;/li&gt;
&lt;li&gt;Start with the file list
For a committed branch targeting main, I start here:
git diff --name-status origin/main...HEAD
Use the branch’s actual target and make sure your local reference to it is current. The three-dot diff shows what changed on your branch since it diverged from that target. It doesn’t include uncommitted edits, so if the agent hasn’t committed its work, check git status and review the staged and unstaged changes too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this example, I expect the form and its test. I’d inspect the shared client separately:&lt;br&gt;
git diff origin/main...HEAD -- src/api/client.ts&lt;br&gt;
If the client change isn’t required for the validation fix, I’d ask for a smaller patch. If it is required, I’d want a concrete explanation and a test for the other path it affects.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make the test prove the bug is fixed
For this bug, the regression test should click Save with an empty name and assert two things: the error appears and no save request is sent. Then test a valid name to make sure the original flow still works. I’d check that the regression test fails against the old implementation and passes against the patch. I also read any changed assertions: a green test doesn’t tell me much if the patch removed the assertion that caught the bug.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;My checklist before merging: Can I explain why each file changed? Does the test catch the original bug? Does the existing behavior still work?&lt;/p&gt;

&lt;p&gt;I’m building Plainrail because I want the original task next to the changed file when I come back to review it. There’s a sample of that in the Plainrail website preview. The checklist above works with plain Git.&lt;/p&gt;

&lt;p&gt;Disclosure: I’m building Plainrail, and I used AI assistance to draft this article.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>code</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
