Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
AI

The AI Prompt That Checks Whether a Pull Request’s Description Actually Matches What the Diff Changes

- 27.09.26 - ErcanOPAK

🤖 The AI Prompt That Checks the PR Description Against What the Code Actually Does

A pull request description is written by a human, usually before or during the work, describing what the change is INTENDED to do – and it’s genuinely common for the code to drift from that description as the work evolves: a scope expansion that never made it back into the summary, a mentioned change that got reverted partway through, a side effect the author didn’t think to call out. This prompt asks an AI assistant to compare the two directly, specifically looking for places where they’ve quietly stopped matching.

📋 The Prompt

Here'"'"'s a pull request'"'"'s description and its actual diff. Compare them
and tell me specifically where they don'"'"'t match:

1. Anything the description claims the PR does that you can'"'"'t actually
   find evidence of in the diff
2. Anything the diff clearly changes that the description doesn'"'"'t
   mention at all - a file, a function, or a behavior that'"'"'s modified
   but never called out in the summary
3. Any place where the description'"'"'s explanation of WHY a change was
   made doesn'"'"'t seem to match what the change actually does
   mechanically, based on reading the code itself

For each mismatch found, describe it plainly and specifically enough
that I could ask the PR author about exactly that one point.

PR description:
[PASTE THE PR DESCRIPTION HERE]

Diff:
[PASTE THE DIFF HERE]

✅ Why This Prompt Works

  • Comparing the description against the diff directly, rather than reviewing either one in isolation, is what actually surfaces drift – a description read on its own always sounds plausible, and a diff read on its own is just code; the mismatch only becomes visible once the two are checked against each other specifically.
  • Explicitly asking for changes the diff makes that the description never mentions catches undisclosed scope creep – the case where a PR quietly grew beyond what it was originally framed as, which is exactly the kind of thing a reviewer skimming the description alone would have no reason to go looking for in the code.
  • Requiring a mismatch to be specific enough to ask the author about directly keeps the output actionable – a reviewer walking into a conversation with ‘you changed the retry logic in PaymentService but the description only mentions the UI update’ is in a completely different position than one who’s only vaguely uneasy that something feels off.

⚠️ Where to Draw the Line

  • This finds mismatches between two pieces of TEXT and CODE – it has no way to know whether an undisclosed change was intentional and simply left out of the summary by oversight, or something that genuinely shouldn’t be in this PR at all; that judgment call still belongs to the reviewer and the author, working from what this surfaces.
  • A PR with no meaningful mismatches at all is still worth reviewing normally for correctness – this specifically catches drift between description and diff, which is a different (and narrower) concern than whether the code itself is actually correct or well-designed.

A PR description is a claim about the diff, not a guarantee – and the only way to know whether the claim still holds is to actually read the two side by side instead of trusting one to summarize the other.

— AI Power User

Related posts:

The AI Prompt That Compares a Function's Docstring Against What the Code Actually Does and Flags Eve...

The AI Prompt That Compares a Function's Docstring Against What the Code Actually Does and Flags Eve...

The AI Prompt That Finds Unused Dependencies in a Package File

The AI Prompt That Finds Unused Dependencies in a Package File

The One AI Prompt That Turns a Messy, Undocumented Codebase Into a Clear, Refactor-Ready Map

The One AI Prompt That Turns a Messy, Undocumented Codebase Into a Clear, Refactor-Ready Map

Views: 12

Post navigation

WordPress: Recover a Site After a Bad Redirect Rule Sends Every Visitor to the Homepage
JavaScript: Why indexOf Can’t Find a NaN You Just Pushed Into the Array

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,068)
  • Get the User Name and Domain Name from an Email Address in SQL (990)
  • How to add default value for Entity Framework migrations for DateTime and Bool (986)
  • Get the First and Last Word from a String or Sentence in SQL (865)
  • How to select distinct rows in a datatable in C# (859)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (661)
  • Add Constraint to SQL Table to ensure email contains @ (619)
  • Average of all values in a column that are not zero in SQL (576)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (553)
  • Find numbers with more than two decimal places in SQL (481)

Recent Posts

  • Network Speed Monitor Windows Application v2.5.1
  • Ağ Hızı İzleyici Windows Uygulaması v2.5.1
  • How to make theater mode the default for Youtube
  • The AI Prompt That Audits a Function for Thread-Safety Gaps
  • Ajax: Fix a Fetch Request Caching a Response Despite No-Store
  • WordPress: Fix a Navigation Block Losing Submenu Items After Sync
  • Visual Studio: Fix CodeLens Reference Counts Stuck at Stale Numbers
  • C#: Fix a UTF-8 String Literal Behaving Differently in a Switch
  • Photoshop: Fix a Liquify Mesh Snapping Back on a Smart Object
  • The AI Prompt That Turns a Crash Dump Into a Short Repro Script

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,068)
  • Get the User Name and Domain Name from an Email Address in SQL (990)
  • How to add default value for Entity Framework migrations for DateTime and Bool (986)
  • Get the First and Last Word from a String or Sentence in SQL (865)
  • How to select distinct rows in a datatable in C# (859)

Recent Posts

  • Network Speed Monitor Windows Application v2.5.1
  • Ağ Hızı İzleyici Windows Uygulaması v2.5.1
  • How to make theater mode the default for Youtube
  • The AI Prompt That Audits a Function for Thread-Safety Gaps
  • Ajax: Fix a Fetch Request Caching a Response Despite No-Store

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com