<?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: Hideaki Kubo</title>
    <description>The latest articles on DEV Community by Hideaki Kubo (@logfabric).</description>
    <link>https://dev.to/logfabric</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%2F3998236%2Fafd2aa9a-40c6-4865-a2d4-b82c942b96fe.png</url>
      <title>DEV Community: Hideaki Kubo</title>
      <link>https://dev.to/logfabric</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/logfabric"/>
    <language>en</language>
    <item>
      <title>Why AI-assisted PRs expand, and how Cursor Project Rules can help</title>
      <dc:creator>Hideaki Kubo</dc:creator>
      <pubDate>Tue, 23 Jun 2026 07:58:02 +0000</pubDate>
      <link>https://dev.to/logfabric/why-ai-assisted-prs-expand-and-how-cursor-project-rules-can-help-5dch</link>
      <guid>https://dev.to/logfabric/why-ai-assisted-prs-expand-and-how-cursor-project-rules-can-help-5dch</guid>
      <description>&lt;p&gt;AI-assisted coding tools are useful, but one problem keeps showing up in day-to-day development:&lt;/p&gt;

&lt;p&gt;PRs get bigger than the original task.&lt;/p&gt;

&lt;p&gt;You ask for one small fix.&lt;br&gt;
The AI also refactors nearby code.&lt;/p&gt;

&lt;p&gt;You ask for one endpoint change.&lt;br&gt;
The AI touches routing, tests, config, and documentation.&lt;/p&gt;

&lt;p&gt;You ask it to handle a review comment.&lt;br&gt;
It turns the comment into a broader cleanup.&lt;/p&gt;

&lt;p&gt;Each change may look reasonable in isolation. The problem is that the PR becomes harder to review, harder to revert, and harder to explain later.&lt;/p&gt;

&lt;p&gt;I do not think this is only a Cursor problem.&lt;/p&gt;

&lt;p&gt;I think it is an AI-assisted PR discipline problem.&lt;/p&gt;
&lt;h2&gt;
  
  
  The issue: AI tends to expand the scope
&lt;/h2&gt;

&lt;p&gt;When an AI coding tool sees nearby problems, it often wants to improve them.&lt;/p&gt;

&lt;p&gt;That can be helpful in exploration mode. But in a pull request workflow, it creates risk.&lt;/p&gt;

&lt;p&gt;A good PR should usually answer one question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What decision is this PR asking the human reviewer to make?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If a PR contains a bug fix, a refactor, a new helper, a docs update, and a test rewrite, the human reviewer is no longer reviewing one decision.&lt;/p&gt;

&lt;p&gt;They are reviewing several decisions bundled together.&lt;/p&gt;

&lt;p&gt;That makes the PR harder to merge with confidence.&lt;/p&gt;
&lt;h2&gt;
  
  
  What I tested
&lt;/h2&gt;

&lt;p&gt;I created a small free repo called &lt;code&gt;cursor-pr-discipline&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It contains a few &lt;code&gt;.mdc&lt;/code&gt; Project Rules for Cursor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;no-unrequested-changes.mdc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;one-pr-one-topic.mdc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;classify-before-merging.mdc&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to force Cursor to behave perfectly.&lt;/p&gt;

&lt;p&gt;The goal is to give Cursor stronger project-level instructions that reinforce a human-controlled PR workflow.&lt;/p&gt;
&lt;h2&gt;
  
  
  The first test
&lt;/h2&gt;

&lt;p&gt;I created a small test file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;registerUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;registerUser&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I asked Cursor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Add input validation to test-sandbox/registration.js.

Do not modify any other files.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cursor kept the work scoped to the requested file.&lt;/p&gt;

&lt;p&gt;That was a good first result.&lt;/p&gt;

&lt;h2&gt;
  
  
  The scope expansion test
&lt;/h2&gt;

&lt;p&gt;Then I intentionally asked for a scope-expanding follow-up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Also refactor the validation into a shared utility and update the README.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first version of my rules was not strong enough.&lt;/p&gt;

&lt;p&gt;Cursor started moving toward a shared utility and README update.&lt;/p&gt;

&lt;p&gt;That was useful feedback.&lt;/p&gt;

&lt;p&gt;The rules needed to be more explicit about follow-up requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I changed
&lt;/h2&gt;

&lt;p&gt;I updated the rules to say that if a follow-up request introduces a separate concern, new abstraction, unrelated file, or documentation update, Cursor should not immediately implement it.&lt;/p&gt;

&lt;p&gt;It should first ask whether the work should be handled as a separate PR.&lt;/p&gt;

&lt;p&gt;After that change, the same follow-up request produced a better result.&lt;/p&gt;

&lt;p&gt;Cursor identified the request as multiple concerns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;keep the original validation change scoped&lt;/li&gt;
&lt;li&gt;move shared utility extraction into a follow-up PR&lt;/li&gt;
&lt;li&gt;move README documentation into another follow-up PR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the behavior I wanted.&lt;/p&gt;

&lt;p&gt;Not automatic enforcement.&lt;br&gt;
Not a guarantee.&lt;br&gt;
Just better PR discipline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;AI coding tools make it easier to generate code.&lt;/p&gt;

&lt;p&gt;But generating code is not the same as deciding what should be merged.&lt;/p&gt;

&lt;p&gt;For me, the human should still decide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what the PR is allowed to change&lt;/li&gt;
&lt;li&gt;what gets deferred&lt;/li&gt;
&lt;li&gt;what needs review before merge&lt;/li&gt;
&lt;li&gt;why the PR was merged&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Project Rules can help reinforce that workflow.&lt;/p&gt;

&lt;p&gt;They do not replace human judgment.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to try it now
&lt;/h2&gt;

&lt;p&gt;The free repo includes three &lt;code&gt;.mdc&lt;/code&gt; rules and a small scoped PR example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/logfabricteam/cursor-pr-discipline" rel="noopener noreferrer"&gt;https://github.com/logfabricteam/cursor-pr-discipline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the &lt;code&gt;.mdc&lt;/code&gt; files into your project's &lt;code&gt;.cursor/rules/&lt;/code&gt; directory, then try a small task in Cursor and watch whether the PR stays scoped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Free repo
&lt;/h2&gt;

&lt;p&gt;I published the first version here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/logfabricteam/cursor-pr-discipline" rel="noopener noreferrer"&gt;https://github.com/logfabricteam/cursor-pr-discipline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It includes the free &lt;code&gt;.mdc&lt;/code&gt; rules and a small scoped PR example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Early access
&lt;/h2&gt;

&lt;p&gt;I am also validating a Pro Pack with more examples and rules for human merge decisions, ambiguous requests, review triage, and stopping before autonomous merge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kubo03.gumroad.com/l/cursor-pr-discipline" rel="noopener noreferrer"&gt;https://kubo03.gumroad.com/l/cursor-pr-discipline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main idea is simple:&lt;/p&gt;

&lt;p&gt;AI can help write the code.&lt;br&gt;
But the PR should still stay scoped, reviewable, and human-decided.&lt;/p&gt;

&lt;p&gt;How do you manage AI scope creep in your own workflow?&lt;/p&gt;

&lt;p&gt;Do you use Cursor Project Rules, custom prompts, review checklists, or something else?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>github</category>
      <category>cursor</category>
    </item>
  </channel>
</rss>
