惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
爱范儿
爱范儿
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
宝玉的分享
宝玉的分享
Jina AI
Jina AI
B
Blog
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
腾讯CDC
C
Check Point Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
罗磊的独立博客
B
Blog RSS Feed
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
M
MIT News - Artificial intelligence
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Why AI-assisted PRs expand, and how Cursor Project Rules ...
Hideaki Kubo · 2026-06-23 · via DEV Community

Hideaki Kubo

AI-assisted coding tools are useful, but one problem keeps showing up in day-to-day development:

PRs get bigger than the original task.

You ask for one small fix.
The AI also refactors nearby code.

You ask for one endpoint change.
The AI touches routing, tests, config, and documentation.

You ask it to handle a review comment.
It turns the comment into a broader cleanup.

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.

I do not think this is only a Cursor problem.

I think it is an AI-assisted PR discipline problem.

The issue: AI tends to expand the scope

When an AI coding tool sees nearby problems, it often wants to improve them.

That can be helpful in exploration mode. But in a pull request workflow, it creates risk.

A good PR should usually answer one question:

What decision is this PR asking the human reviewer to make?

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.

They are reviewing several decisions bundled together.

That makes the PR harder to merge with confidence.

What I tested

I created a small free repo called cursor-pr-discipline.

It contains a few .mdc Project Rules for Cursor:

  • no-unrequested-changes.mdc
  • one-pr-one-topic.mdc
  • classify-before-merging.mdc

The goal is not to force Cursor to behave perfectly.

The goal is to give Cursor stronger project-level instructions that reinforce a human-controlled PR workflow.

The first test

I created a small test file:

function registerUser(input) {
  return {
    email: input.email,
    password: input.password
  };
}

module.exports = { registerUser };

Then I asked Cursor:

Add input validation to test-sandbox/registration.js.

Do not modify any other files.

Cursor kept the work scoped to the requested file.

That was a good first result.

The scope expansion test

Then I intentionally asked for a scope-expanding follow-up:

Also refactor the validation into a shared utility and update the README.

The first version of my rules was not strong enough.

Cursor started moving toward a shared utility and README update.

That was useful feedback.

The rules needed to be more explicit about follow-up requests.

What I changed

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.

It should first ask whether the work should be handled as a separate PR.

After that change, the same follow-up request produced a better result.

Cursor identified the request as multiple concerns:

  • keep the original validation change scoped
  • move shared utility extraction into a follow-up PR
  • move README documentation into another follow-up PR

That is the behavior I wanted.

Not automatic enforcement.
Not a guarantee.
Just better PR discipline.

Why this matters

AI coding tools make it easier to generate code.

But generating code is not the same as deciding what should be merged.

For me, the human should still decide:

  • what the PR is allowed to change
  • what gets deferred
  • what needs review before merge
  • why the PR was merged

Project Rules can help reinforce that workflow.

They do not replace human judgment.

Free repo

I published the first version here:

https://github.com/logfabricteam/cursor-pr-discipline

It includes the free .mdc rules and a small scoped PR example.

Early access

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.

https://kubo03.gumroad.com/l/cursor-pr-discipline

The main idea is simple:

AI can help write the code.
But the PR should still stay scoped, reviewable, and human-decided.