That gap is exactly one of the hardest parts of generating release notes with AI.
A diff can give you plenty of implementation detail, but if the reason isn’t actually present in the evidence, a model can very easily fill in the blank with something that merely sounds convincing.
I’m especially happy to see the linked-issue evidence and counterfactual evaluation highlighted.
For changelog-bot, the goal isn’t just to generate nicer prose, it’s to make sure the WHY we surface is actually supported by something we can point back to.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Thanks so much for the kind words and for the work on changelog-bot! Framing it around "What vs. Why" really clicked once I saw how easily a plausible-sounding summary can mask the real reason behind a change. Grounding claims in linked issues and testing against counterfactual decoys makes the whole pipeline much more trustworthy in practice. Really appreciate you taking the time to read and share your thoughts.
This is interesting example of the difference between what machines can see and what humans understand. As the OS contributors, we know there's more to a code change than just the diff. Issues and PR discussions often tell the story behind it. But that also depends on how well we document our thoughts and decisions. AI can certainly connect the dots, but I still think human review matters.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Spot on, especially about how much depends on the context we actually write down in issues and PR threads. AI is great at connecting dots across those artifacts, but when context is missing or implicit, human review is still essential to catch what the code alone cannot explain. Thanks for sharing that perspective.
The memory leak patch turned into a 'JSON serialization optimisation' is a perfect example. The diff showed deleted buffers, so the model invented a reason that fit. Linking the issue is the fix because the issue holds the why and the diff only holds the what. Do you block generation entirely when a commit has no linked issue?
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
No, it does not block generation entirely. Unlinked changes fall back to deterministic heuristics or lighter summaries without inventing intent, while keeping ungrounded items clearly separated from issue-backed claims.
Falling back to heuristics while keeping ungrounded items clearly separated is the right call. Better a smaller honest summary than an invented reason.
I stopped reading commit messages a while ago. My agents write them, and mostly my agents read them later. The issue-link approach assumes the why lives in an issue. In a solo project with an agent it mostly lives in the chat session, and that's gone after the session ends. What worked for me: the agent writes the why into the commit body at commit time, while it still has the context. For example: "the privacy page promises credential-shaped values are masked in logs; a canary test came back unmasked; the code only masked named fields". A later agent can build an honest release note from that without guessing. And it is the default behaviour of claude code. In my opinion: not bad, enough if I will need to dive in details anytime later
Solo developer building practical CLI tools for Linux auditing and B2B data extraction. Creator of Vaultcheck and NPILift. I write about silent failures, false green lights, and infrastructure reliabi
Measure the substrate before blaming the model: on my own repo git log --format=%b is empty for 23 of 120 commits and under ten words for 50, so for 42% of the history there is no why to retrieve and any summary of those is extrapolation with a citation. Index PR bodies and issue links as a separate corpus, and make the generator name the artifact per claim instead of per commit.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Measuring the substrate before tuning the model is a great point. When commit bodies are sparse or missing, forcing a rationale is just extrapolation with extra steps. Indexing PR bodies and issue links separately and tying citations to the specific supporting artifact per claim rather than the commit as a whole makes provenance much cleaner.
Solo developer building practical CLI tools for Linux auditing and B2B data extraction. Creator of Vaultcheck and NPILift. I write about silent failures, false green lights, and infrastructure reliabi
Splitting the corpora is right, but measure corpus two before you trust it: gh api repos/:owner/:repo/pulls --paginate -f state=closed --jq '.[] | [.merge_commit_sha, (.body|length)] | @tsv' joined against git log --format=%H shows which merges carry a real body and which are just the title repeated. I'd set the bar at 100 characters and label everything under it unknown rather than citing the commit — a citation pointing at a body that says "fix tests" is the same extrapolation with a nicer reference.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Checking PR body lengths against merged commits before trusting the second corpus is a sharp way to catch title-only or near-empty descriptions. Setting a minimum threshold like 100 characters and marking shorter ones as unknown keeps a citation from dressing up a "fix tests" note as real rationale.
Solo developer building practical CLI tools for Linux auditing and B2B data extraction. Creator of Vaultcheck and NPILift. I write about silent failures, false green lights, and infrastructure reliabi
Run the join before you trust it: squash and rebase merges come back with merge_commit_sha null, so a hash join quietly drops exactly the PRs whose body is the only rationale you have. Count the loss first — gh api repos/:owner/:repo/pulls?state=closed --paginate --jq '.[] | select(.merged_at) | .merge_commit_sha' | grep -c null — and if that number is above zero, attach bodies through the "(#123)" suffix in the squash subject instead of the sha.
A technologist working in automation. Here I write up what I actually learn building tools, engineering AI agents, and keeping systems running, along with the workflows and habits that stick.
The two-issue limit makes provenance especially useful: if a PR closes three issues, a release note can end up with only part of the reason. I'd keep the issue URLs beside each generated claim and flag uncited rationale for review. That also makes the API-failure fallback visible instead of presenting a heuristic as sourced intent.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Great catch on the two-issue cap and provenance tracking. Attaching explicit issue URLs to individual claims, surfacing ungrounded items for review, and making fallback heuristics visibly distinct from verified intent are super practical ways to keep release notes honest when context is partial or APIs degrade.
Founder of Hex16, a small web studio in Poland. I build Next.js sites and headless Shopify stores, with GSAP, Three.js and shaders where they earn their place, and look after technical SEO.
The missing why bites inside a single repo too. I had a cache fix quietly undone by a later change, because nothing next to that value said why it was there. Now a bug that comes back gets a test or a note saying what must not change.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That cache regression hits on why the missing "why" hurts future maintainers and agents just as much as release notes—a bare value looks arbitrary until someone reverts it and reopens an old bug. Turning recurring bugs into regression tests or explicit inline invariants is one of the best ways to keep that context alive right next to the code. Thanks for sharing that lesson.
Founder of Hex16, a small web studio in Poland. I build Next.js sites and headless Shopify stores, with GSAP, Three.js and shaders where they earn their place, and look after technical SEO.
The memory-leak patch that became "optimized JSON payload serialization" is the clearest example I have seen of why a diff is the wrong source for intent. The model was not careless. It was given the what and asked for the why, so it filled the gap with the most plausible story.
We ran into the same shape of failure at Ascendra Ventures while building memory for AI coding tools. An audit of about three months of chats, roughly 7,000 prompts, showed the same context being retyped because the reasons behind decisions vanished when a window closed. Adding memory fixed the repetition, but not the trust: one parser read a single column off and reported numbers that were confidently and uniformly wrong. The lesson we wrote down was to put the model in the middle and never on the edges, with plain code deciding what counts as grounded. Requiring linked issues does exactly that for release notes.
When a commit has no linked issue at all, do you let the model say nothing rather than guess?
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Putting the model in the middle rather than on the edges, with deterministic code governing what counts as grounded, is such a clean rule of thumb, especially when an off-by-one parser bug can propagate uniformly wrong numbers across stored memory. When there is no linked issue at all, the pipeline avoids guessing intent and falls back to light, ungrounded summaries or deterministic heuristics kept apart from issue-backed claims rather than inventing a rationale. Thanks for sharing those findings from your audit.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Putting the model in the middle while deterministic code owns the boundaries and grounding rules is a great way to frame it. A single off-by-one parser error shows how easily bad upstream inputs become confidently wrong output. When a commit has no linked issue, we don't let the model invent intent; it falls back to lightweight, non-speculative summaries or leaves the rationale unstated rather than guessing. Thanks for sharing those findings from your audit.
There's a cross-repository edge case in resolveLinkedIssueNumbers: the regex captures repoPrefix, but the mapping discards it, so Fixes other/project#42 becomes just 42. If the caller fetches that number from the current repository, the release note can get a convincing rationale from an unrelated issue. I'd preserve the repository with each issue number, or explicitly skip references outside the current repo.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Good catch on that cross-repo edge case. Dropping repoPrefix in resolveLinkedIssueNumbers means Fixes other/project#42 can collapse into #42 in the current repo and pull context from a completely unrelated issue. Preserving the target repository alongside each issue number or filtering out external repo references unless explicitly supported is a great safeguard against accidental context mismatches. Thanks for pointing that out.
Turning a memory-leak buffer removal into 'optimized JSON payload serialization' is painfully accurate. A raw diff shows timeoutMs going from 5000 to 15000, never that a downstream gateway started dropping handshakes. Pulling linked PR descriptions or incident tickets into the prompt helps way more than feeding bare diffs.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Incident tickets and linked PR discussions carry the exact operational context that a raw diff strips away. Giving the model those upstream artifacts turns release notes from guesswork into a reliable record of why the change was actually needed.
Guessing intent from raw code diffs feels a lot like guessing box specs without an order ticket at The Printing World. Linking real issue context keeps release notes honest, just like keeping job notes with every dieline.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That dieline and job-notes comparison is spot on. The geometry alone doesn't tell you the specs that were actually requested. Keeping issue context tied to the change works the exact same way for release notes.
Great breakdown of the diff-context gap. We ran into almost the exact same failure mode when generating changelogs solely from commit logs — models love inventing "performance improvements" whenever a diff removes allocations or bumps a timeout.
Adding the linked issue summary and the "Motivation / Risk" section from the PR template into the prompt fixed most of the hallucinations, since that's usually the only place the actual why lives.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That performance improvements reflex around deleted allocations and bumped timeouts shows up everywhere when context is missing. Pulling in both the linked issue summary and an explicit Motivation / Risk section from PR templates is a very clean way to capture intent where it actually gets written down.
That opening example of an emergency memory leak patch turning into "optimized JSON payload serialization for low-latency clients" hits way too close to home. LLMs are fundamentally trained to be optimistic narrative-completers, so when you feed them raw diffs without context, they naturally treat every deleted line or tweaked constant as an intentional, user-facing improvement.
The point about AI-generated PR descriptions compounding this problem is huge, too. We’re increasingly seeing a "game of telephone" where an AI coding agent writes an unsupported-plausible rationale in the PR body, and then a second AI summarizer treats that hallucinated PR description as ground truth for the release notes. Anchoring the pipeline back to the linked GitHub issue—where a human actually described the pain point—cuts right through that noise.
Also really appreciate the Unix-style decoupling of --output stdout from side effects like opening PRs. Too many CI tools assume they should own the entire write lifecycle out of the box, which makes local dry-runs and custom release workflows way harder than they need to be.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That "game of telephone" between an AI coding agent and a changelog summarizer is a great way to put it. Once a plausible but unsupported rationale enters the PR body, downstream tools easily treat it as established fact. Going back to the linked issue where the actual pain point was reported helps break that chain, and keeping --output stdout separate from write side effects makes local testing and custom pipelines much cleaner. Thanks for sharing such a thorough response.
Building AI systems and fixing AI-generated apps before they collapse in production.
Working with agentic AI, RAG pipelines, AI orchestration, and startup MVP scaling at IT Path Solutions.
Another useful safeguard would be to make confidence in the underlying evidence visible in the release note itself. For example, distinguish between a behavior change confirmed by an issue or acceptance criteria, an implementation detail established by the diff, and a suspected user impact inferred by the model. These are three different levels of evidence and shouldn't be presented with the same certainty. I'd also preserve that distinction when the linked issue is unavailable or contains conflicting context, rather than letting the model fill the gap with a plausible explanation. A changelog doesn't need to explain every engineering decision, but every claim it does make should be traceable to something verifiable. That matters even more when release notes become part of customer-facing documentation.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Separating confirmed behavior changes, diff-verified implementation details, and inferred user impact, and keeping that distinction intact when an issue is missing or conflicting is a great way to surface epistemic confidence right inside the release notes. Treating every claim as traceable to verifiable evidence rather than forcing a narrative on every engineering detail makes customer-facing changelogs far more reliable. Thanks for building on the discussion with another strong point.
Linked issues provide useful context, but they can also contain an initial diagnosis that was later disproved. How does the pipeline handle an issue description that conflicts with the final investigation? Separating the reported symptom, intended outcome and verified cause could help prevent an early hypothesis from becoming an authoritative release note.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That is a great point. Issues often start with a best-guess diagnosis that gets overturned once someone digs into the code or traces the actual failure. Separating the reported symptom, intended outcome, and verified cause helps keep an early hypothesis from getting promoted to an authoritative claim in the release notes, especially when the PR or later discussion narrows down what actually fixed it.
GitHub issues alone aren't always enough. I think it would be useful to have coding agents keep a record of their findings and discussions throughout the development process. Combined with the original requirements and reference materials, these reports can help explain what problem is actually being solved and why certain decisions were made.
Agents may also discover unrelated bugs during implementation. If those bugs are fixed along the way, they should be included in the release notes but clearly identified as additional patches rather than part of the original task.
Context management is essential, especially since different stages of development require different context and information. I wouldn't necessarily give an agent working on architecture the same context as one implementing or testing a feature.
As for inference, I don't mind AI drawing conclusions or suggesting alternatives, as long as those suggestions aren't presented as confirmed facts or final decisions. Having another perspective to consider is useful, but the final decision should still belong to the developer.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Saving development notes and findings from coding agents alongside requirements, and separating incidental bug fixes from the main task is a great way to capture context that issues alone miss. Keeping stage-specific context focused and treating AI suggestions as proposals rather than settled decisions keeps the developer in control. Thanks for sharing such a thoughtful breakdown.
Building AI systems and fixing AI-generated apps before they collapse in production.
Working with agentic AI, RAG pipelines, AI orchestration, and startup MVP scaling at IT Path Solutions.
The counterfactual evaluation approach is particularly important here. A release note can be technically consistent with a diff and still be completely wrong about the reason behind the change. One additional safeguard is to preserve the evidence chain for every generated claim: linked issue, relevant PR context, commit, and the specific user impact being described. Issue links are useful signals, but they can be stale, overly broad, or attached to PRs that address only part of the original problem. I’d also keep unsupported rationale separate from verified facts rather than letting the model turn missing context into confident prose. That makes release notes easier to audit and gives teams a clear fallback when the source history cannot establish intent.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That evidence-chain framing, linking issue, PR context, commit, and concrete user impact - hits on why a diff-consistent note can still miss the mark when an issue is stale, broad, or only partially resolved. Keeping unsupported rationale separate from verified facts makes auditing straightforward and gives a clear fallback when history cannot establish intent. Thanks for adding such a sharp breakdown.
Even after you stop inventing a "why", a diff-only summary still drops the migration path sitting in a breaking-change footer. The model narrates the new signature and users never see the steps. I'd copy those footers through verbatim and only generate the prose around them.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Passing breaking-change footers through verbatim instead of letting a summarizer paraphrase or drop them is a really practical safeguard—migration steps lose details fast when filtered through signature-focused summaries. Keeping those exact instructions intact and framing prose around them makes breaking upgrades much safer for users.
The decoy cases are useful because a tidy explanation can still be completely unsupported. I would add a linked issue that is real but belongs to a different repository, then check that matching issue numbers cannot supply the rationale. This evaluation design exercise has a useful follow-up about reward hacking; accepting any citation feels like exactly that kind of shortcut.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Testing against a real issue from a different repository and checking that colliding issue numbers cannot supply the rationale are sharp decoy cases. Accepting any citation blindly is a classic reward-hacking shortcut, so tightening the eval around cross-repo and number-collision traps is a great addition.
"The 'unsupported-plausible' archetype nails it — that's exactly the flavor of release note I've learned to distrust on sight. Does the pipeline fall back to heuristics silently when a PR mentions the issue in prose but skips the closing keywords, or does it flag that as low-confidence?"
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Right now, CLOSING_KEYWORD_PATTERN only matches explicit GitHub closing keywords (close, fix, resolve, etc.), so an issue mentioned purely in prose without a closing keyword won't be picked up as a verified causal link and will trigger the heuristic fallback. Making that fallback path visibly distinct, such as marking unlinked or prose-only items as lower-confidence rather than blending them seamlessly with issue-backed claims is definitely the right direction so reviewers can spot missing provenance immediately.
Building LoreNext — independent long-form publishing & Passcard-gated reader clubs on Base. Own your pricing, settle in USDC, and archive works permanently.
The distinction between "what" changed in a diff and "why" it was needed is spot on. Even a simple timeout bump from 5s to 15s looks like a random tweak in isolation, whereas linked issues or PR discussions capture the actual production context. Grounding release notes in those artifacts rather than guessing from code diffs alone makes a huge difference.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
That timeout example captures it well. Isolated config changes rarely explain the production pressure behind them on their own. Anchoring release notes in issues and PR context keeps the focus on real impact instead of guesswork. Thanks for chiming in.
Sharing tutorials and API guides on omnichannel automation. We help devs build seamless end-user workflows across WhatsApp, Telegram, Meta (FB/IG), SMS, and webchat.
This is such an important point, especially as AI becomes more involved in software development. A code diff can explain what changed, but it doesn't always capture the human reasoning or real-world problem behind that change. I really like the approach of connecting commits with actual issues and using counterfactual testing to catch convincing but unsupported explanations. One thing this highlights is that good AI isn't just about generating fluent summaries; it's about knowing where the evidence ends and assumptions begin. Making release notes trustworthy is just as important as making them readable. Great work sharing both the problem and a practical solution!
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
The hardest decoys to reject are plausible operational or performance stories - like framing a stability or memory fix as a latency or throughput optimization, because they match common engineering tropes and sound convincing even without backing in the issue context. They easily slip past models when the linked issue is broad or light on concrete motivation. Thanks for asking such a sharp question, Adam.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Software consulting and development company, a US LLC and a Private Limited company. Custom software, web, mobile and desktop apps, Chromium browsers and extensions, AI, cloud and cybersecurity.
Location
30 N Gould St, Ste R, Sheridan, WY 82801, USA
Work
Software consulting and development company, INNERLUXES
One failure mode close to your memory leak story: squash merges. The squashed commit message is usually just the PR title, so the model loses the intermediate commits that explained the decision and fills the gap with whatever the diff suggests.
What fixed most of it for us was making the generator refuse to describe intent unless it can quote a source for it, either the linked issue or a line from the PR description. Anything without a source goes into a plain list of changed areas instead of a sentence about why. The notes got shorter, but nobody has had to retract one since.
Did your counterfactual benchmark show a different error rate for refactor-heavy releases compared with bug-fix releases?
Raw diffs only record line-level mutations, so prompting an LLM without linked issue graphs trades the CI latency and context-window overhead of graph hydration for plausible-sounding causal hallucinations in production release notes, while counterfactual evals fail silently whenever engineers merge unlinked hotfixes under incident pressure. Diffs record mutations, not intent.
Freelance fullstack developer creating fast, modern, and refined applications. I focus on simplicity, performance, and real value for users. I also write tech-related articles here.
Trading graph hydration latency and token overhead for ungrounded causal guesses is a real cost, and unlinked incident hotfixes are a classic blind spot when context is missing. Keeping diffs strictly to what mutated while surfacing unlinked or low-context changes explicitly helps avoid turning urgency into false confidence.
I measure AI coding claims in public. LGTM — Let's Get the Measurements: real runs, real numbers, receipts. Every article is an experiment I actually ran. Books & packs: aheadkit.gumroad.com
The v1.4.0 story is the one that stays with me. A memory leak that crashed pods under peak traffic, retold as "optimized JSON payload serialization for low-latency clients". That is not a summary error, that is a press release for a fire. I keep thinking about the gap between what happened and what got written down, because I measured a version of it last week: a finished step missed its save by 5.9 seconds, so the log said the work was banked and the patch said otherwise. Your counterfactual test is the part I want to steal. Do you have an FPR number from it yet, or is that still the next run?
I write about Next.js + TypeScript + AI engineering, with a focus on making sites discoverable to LLMs and AI search. Long-form notes at mudassirkhan.me
the unsupported plausible archetype is the one that gets everyone, because a polished PR description reads like evidence. we hit a version of it where the model turned a rollback commit into a feature line, since the diff only showed code being added back.
linking closing keywords to the issue is solid but it falls over when the issue itself is vague. what does your bot do when the linked issue states no reason, drop the line or flag it for a human?
We're a place where coders share, stay up-to-date and grow their careers.
I really like the “What vs Why” framing here! 😸
That gap is exactly one of the hardest parts of generating release notes with AI.
A diff can give you plenty of implementation detail, but if the reason isn’t actually present in the evidence, a model can very easily fill in the blank with something that merely sounds convincing.
I’m especially happy to see the linked-issue evidence and counterfactual evaluation highlighted.
For
changelog-bot, the goal isn’t just to generate nicer prose, it’s to make sure the WHY we surface is actually supported by something we can point back to.Thanks for digging into the project so deeply! 💚
Thanks so much for the kind words and for the work on
changelog-bot! Framing it around "What vs. Why" really clicked once I saw how easily a plausible-sounding summary can mask the real reason behind a change. Grounding claims in linked issues and testing against counterfactual decoys makes the whole pipeline much more trustworthy in practice. Really appreciate you taking the time to read and share your thoughts.This is interesting example of the difference between what machines can see and what humans understand. As the OS contributors, we know there's more to a code change than just the diff. Issues and PR discussions often tell the story behind it. But that also depends on how well we document our thoughts and decisions. AI can certainly connect the dots, but I still think human review matters.
Spot on, especially about how much depends on the context we actually write down in issues and PR threads. AI is great at connecting dots across those artifacts, but when context is missing or implicit, human review is still essential to catch what the code alone cannot explain. Thanks for sharing that perspective.
The memory leak patch turned into a 'JSON serialization optimisation' is a perfect example. The diff showed deleted buffers, so the model invented a reason that fit. Linking the issue is the fix because the issue holds the why and the diff only holds the what. Do you block generation entirely when a commit has no linked issue?
No, it does not block generation entirely. Unlinked changes fall back to deterministic heuristics or lighter summaries without inventing intent, while keeping ungrounded items clearly separated from issue-backed claims.
Falling back to heuristics while keeping ungrounded items clearly separated is the right call. Better a smaller honest summary than an invented reason.
I stopped reading commit messages a while ago. My agents write them, and mostly my agents read them later. The issue-link approach assumes the why lives in an issue. In a solo project with an agent it mostly lives in the chat session, and that's gone after the session ends. What worked for me: the agent writes the why into the commit body at commit time, while it still has the context. For example: "the privacy page promises credential-shaped values are masked in logs; a canary test came back unmasked; the code only masked named fields". A later agent can build an honest release note from that without guessing. And it is the default behaviour of claude code. In my opinion: not bad, enough if I will need to dive in details anytime later
Measure the substrate before blaming the model: on my own repo git log --format=%b is empty for 23 of 120 commits and under ten words for 50, so for 42% of the history there is no why to retrieve and any summary of those is extrapolation with a citation. Index PR bodies and issue links as a separate corpus, and make the generator name the artifact per claim instead of per commit.
Measuring the substrate before tuning the model is a great point. When commit bodies are sparse or missing, forcing a rationale is just extrapolation with extra steps. Indexing PR bodies and issue links separately and tying citations to the specific supporting artifact per claim rather than the commit as a whole makes provenance much cleaner.
Splitting the corpora is right, but measure corpus two before you trust it: gh api repos/:owner/:repo/pulls --paginate -f state=closed --jq '.[] | [.merge_commit_sha, (.body|length)] | @tsv' joined against git log --format=%H shows which merges carry a real body and which are just the title repeated. I'd set the bar at 100 characters and label everything under it unknown rather than citing the commit — a citation pointing at a body that says "fix tests" is the same extrapolation with a nicer reference.
Checking PR body lengths against merged commits before trusting the second corpus is a sharp way to catch title-only or near-empty descriptions. Setting a minimum threshold like 100 characters and marking shorter ones as unknown keeps a citation from dressing up a "fix tests" note as real rationale.
Run the join before you trust it: squash and rebase merges come back with merge_commit_sha null, so a hash join quietly drops exactly the PRs whose body is the only rationale you have. Count the loss first — gh api repos/:owner/:repo/pulls?state=closed --paginate --jq '.[] | select(.merged_at) | .merge_commit_sha' | grep -c null — and if that number is above zero, attach bodies through the "(#123)" suffix in the squash subject instead of the sha.
The two-issue limit makes provenance especially useful: if a PR closes three issues, a release note can end up with only part of the reason. I'd keep the issue URLs beside each generated claim and flag uncited rationale for review. That also makes the API-failure fallback visible instead of presenting a heuristic as sourced intent.
Great catch on the two-issue cap and provenance tracking. Attaching explicit issue URLs to individual claims, surfacing ungrounded items for review, and making fallback heuristics visibly distinct from verified intent are super practical ways to keep release notes honest when context is partial or APIs degrade.
The missing why bites inside a single repo too. I had a cache fix quietly undone by a later change, because nothing next to that value said why it was there. Now a bug that comes back gets a test or a note saying what must not change.
That cache regression hits on why the missing "why" hurts future maintainers and agents just as much as release notes—a bare value looks arbitrary until someone reverts it and reopens an old bug. Turning recurring bugs into regression tests or explicit inline invariants is one of the best ways to keep that context alive right next to the code. Thanks for sharing that lesson.
Thanks. Keeping it inline is the key part for me, a note in a separate doc is the first thing nobody reads.
The memory-leak patch that became "optimized JSON payload serialization" is the clearest example I have seen of why a diff is the wrong source for intent. The model was not careless. It was given the what and asked for the why, so it filled the gap with the most plausible story.
We ran into the same shape of failure at Ascendra Ventures while building memory for AI coding tools. An audit of about three months of chats, roughly 7,000 prompts, showed the same context being retyped because the reasons behind decisions vanished when a window closed. Adding memory fixed the repetition, but not the trust: one parser read a single column off and reported numbers that were confidently and uniformly wrong. The lesson we wrote down was to put the model in the middle and never on the edges, with plain code deciding what counts as grounded. Requiring linked issues does exactly that for release notes.
When a commit has no linked issue at all, do you let the model say nothing rather than guess?
Putting the model in the middle rather than on the edges, with deterministic code governing what counts as grounded, is such a clean rule of thumb, especially when an off-by-one parser bug can propagate uniformly wrong numbers across stored memory. When there is no linked issue at all, the pipeline avoids guessing intent and falls back to light, ungrounded summaries or deterministic heuristics kept apart from issue-backed claims rather than inventing a rationale. Thanks for sharing those findings from your audit.
Putting the model in the middle while deterministic code owns the boundaries and grounding rules is a great way to frame it. A single off-by-one parser error shows how easily bad upstream inputs become confidently wrong output. When a commit has no linked issue, we don't let the model invent intent; it falls back to lightweight, non-speculative summaries or leaves the rationale unstated rather than guessing. Thanks for sharing those findings from your audit.
There's a cross-repository edge case in
resolveLinkedIssueNumbers: the regex capturesrepoPrefix, but the mapping discards it, soFixes other/project#42becomes just42. If the caller fetches that number from the current repository, the release note can get a convincing rationale from an unrelated issue. I'd preserve the repository with each issue number, or explicitly skip references outside the current repo.Good catch on that cross-repo edge case. Dropping
repoPrefixinresolveLinkedIssueNumbersmeansFixes other/project#42can collapse into#42in the current repo and pull context from a completely unrelated issue. Preserving the target repository alongside each issue number or filtering out external repo references unless explicitly supported is a great safeguard against accidental context mismatches. Thanks for pointing that out.Turning a memory-leak buffer removal into 'optimized JSON payload serialization' is painfully accurate. A raw diff shows timeoutMs going from 5000 to 15000, never that a downstream gateway started dropping handshakes. Pulling linked PR descriptions or incident tickets into the prompt helps way more than feeding bare diffs.
Incident tickets and linked PR discussions carry the exact operational context that a raw diff strips away. Giving the model those upstream artifacts turns release notes from guesswork into a reliable record of why the change was actually needed.
Guessing intent from raw code diffs feels a lot like guessing box specs without an order ticket at The Printing World. Linking real issue context keeps release notes honest, just like keeping job notes with every dieline.
That dieline and job-notes comparison is spot on. The geometry alone doesn't tell you the specs that were actually requested. Keeping issue context tied to the change works the exact same way for release notes.
Great breakdown of the diff-context gap. We ran into almost the exact same failure mode when generating changelogs solely from commit logs — models love inventing "performance improvements" whenever a diff removes allocations or bumps a timeout.
Adding the linked issue summary and the "Motivation / Risk" section from the PR template into the prompt fixed most of the hallucinations, since that's usually the only place the actual why lives.
That performance improvements reflex around deleted allocations and bumped timeouts shows up everywhere when context is missing. Pulling in both the linked issue summary and an explicit Motivation / Risk section from PR templates is a very clean way to capture intent where it actually gets written down.
That opening example of an emergency memory leak patch turning into "optimized JSON payload serialization for low-latency clients" hits way too close to home. LLMs are fundamentally trained to be optimistic narrative-completers, so when you feed them raw diffs without context, they naturally treat every deleted line or tweaked constant as an intentional, user-facing improvement.
The point about AI-generated PR descriptions compounding this problem is huge, too. We’re increasingly seeing a "game of telephone" where an AI coding agent writes an unsupported-plausible rationale in the PR body, and then a second AI summarizer treats that hallucinated PR description as ground truth for the release notes. Anchoring the pipeline back to the linked GitHub issue—where a human actually described the pain point—cuts right through that noise.
Also really appreciate the Unix-style decoupling of
--output stdoutfrom side effects like opening PRs. Too many CI tools assume they should own the entire write lifecycle out of the box, which makes local dry-runs and custom release workflows way harder than they need to be.That "game of telephone" between an AI coding agent and a changelog summarizer is a great way to put it. Once a plausible but unsupported rationale enters the PR body, downstream tools easily treat it as established fact. Going back to the linked issue where the actual pain point was reported helps break that chain, and keeping
--output stdoutseparate from write side effects makes local testing and custom pipelines much cleaner. Thanks for sharing such a thorough response.Another useful safeguard would be to make confidence in the underlying evidence visible in the release note itself. For example, distinguish between a behavior change confirmed by an issue or acceptance criteria, an implementation detail established by the diff, and a suspected user impact inferred by the model. These are three different levels of evidence and shouldn't be presented with the same certainty. I'd also preserve that distinction when the linked issue is unavailable or contains conflicting context, rather than letting the model fill the gap with a plausible explanation. A changelog doesn't need to explain every engineering decision, but every claim it does make should be traceable to something verifiable. That matters even more when release notes become part of customer-facing documentation.
Separating confirmed behavior changes, diff-verified implementation details, and inferred user impact, and keeping that distinction intact when an issue is missing or conflicting is a great way to surface epistemic confidence right inside the release notes. Treating every claim as traceable to verifiable evidence rather than forcing a narrative on every engineering detail makes customer-facing changelogs far more reliable. Thanks for building on the discussion with another strong point.
Linked issues provide useful context, but they can also contain an initial diagnosis that was later disproved. How does the pipeline handle an issue description that conflicts with the final investigation? Separating the reported symptom, intended outcome and verified cause could help prevent an early hypothesis from becoming an authoritative release note.
That is a great point. Issues often start with a best-guess diagnosis that gets overturned once someone digs into the code or traces the actual failure. Separating the reported symptom, intended outcome, and verified cause helps keep an early hypothesis from getting promoted to an authoritative claim in the release notes, especially when the PR or later discussion narrows down what actually fixed it.
GitHub issues alone aren't always enough. I think it would be useful to have coding agents keep a record of their findings and discussions throughout the development process. Combined with the original requirements and reference materials, these reports can help explain what problem is actually being solved and why certain decisions were made.
Agents may also discover unrelated bugs during implementation. If those bugs are fixed along the way, they should be included in the release notes but clearly identified as additional patches rather than part of the original task.
Context management is essential, especially since different stages of development require different context and information. I wouldn't necessarily give an agent working on architecture the same context as one implementing or testing a feature.
As for inference, I don't mind AI drawing conclusions or suggesting alternatives, as long as those suggestions aren't presented as confirmed facts or final decisions. Having another perspective to consider is useful, but the final decision should still belong to the developer.
Saving development notes and findings from coding agents alongside requirements, and separating incidental bug fixes from the main task is a great way to capture context that issues alone miss. Keeping stage-specific context focused and treating AI suggestions as proposals rather than settled decisions keeps the developer in control. Thanks for sharing such a thoughtful breakdown.
The counterfactual evaluation approach is particularly important here. A release note can be technically consistent with a diff and still be completely wrong about the reason behind the change. One additional safeguard is to preserve the evidence chain for every generated claim: linked issue, relevant PR context, commit, and the specific user impact being described. Issue links are useful signals, but they can be stale, overly broad, or attached to PRs that address only part of the original problem. I’d also keep unsupported rationale separate from verified facts rather than letting the model turn missing context into confident prose. That makes release notes easier to audit and gives teams a clear fallback when the source history cannot establish intent.
That evidence-chain framing, linking issue, PR context, commit, and concrete user impact - hits on why a diff-consistent note can still miss the mark when an issue is stale, broad, or only partially resolved. Keeping unsupported rationale separate from verified facts makes auditing straightforward and gives a clear fallback when history cannot establish intent. Thanks for adding such a sharp breakdown.
Even after you stop inventing a "why", a diff-only summary still drops the migration path sitting in a breaking-change footer. The model narrates the new signature and users never see the steps. I'd copy those footers through verbatim and only generate the prose around them.
Passing breaking-change footers through verbatim instead of letting a summarizer paraphrase or drop them is a really practical safeguard—migration steps lose details fast when filtered through signature-focused summaries. Keeping those exact instructions intact and framing prose around them makes breaking upgrades much safer for users.
The decoy cases are useful because a tidy explanation can still be completely unsupported. I would add a linked issue that is real but belongs to a different repository, then check that matching issue numbers cannot supply the rationale. This evaluation design exercise has a useful follow-up about reward hacking; accepting any citation feels like exactly that kind of shortcut.
Testing against a real issue from a different repository and checking that colliding issue numbers cannot supply the rationale are sharp decoy cases. Accepting any citation blindly is a classic reward-hacking shortcut, so tightening the eval around cross-repo and number-collision traps is a great addition.
"The 'unsupported-plausible' archetype nails it — that's exactly the flavor of release note I've learned to distrust on sight. Does the pipeline fall back to heuristics silently when a PR mentions the issue in prose but skips the closing keywords, or does it flag that as low-confidence?"
Right now,
CLOSING_KEYWORD_PATTERNonly matches explicit GitHub closing keywords (close,fix,resolve, etc.), so an issue mentioned purely in prose without a closing keyword won't be picked up as a verified causal link and will trigger the heuristic fallback. Making that fallback path visibly distinct, such as marking unlinked or prose-only items as lower-confidence rather than blending them seamlessly with issue-backed claims is definitely the right direction so reviewers can spot missing provenance immediately.The distinction between "what" changed in a diff and "why" it was needed is spot on. Even a simple timeout bump from 5s to 15s looks like a random tweak in isolation, whereas linked issues or PR discussions capture the actual production context. Grounding release notes in those artifacts rather than guessing from code diffs alone makes a huge difference.
That timeout example captures it well. Isolated config changes rarely explain the production pressure behind them on their own. Anchoring release notes in issues and PR context keeps the focus on real impact instead of guesswork. Thanks for chiming in.
This is such an important point, especially as AI becomes more involved in software development. A code diff can explain what changed, but it doesn't always capture the human reasoning or real-world problem behind that change. I really like the approach of connecting commits with actual issues and using counterfactual testing to catch convincing but unsupported explanations. One thing this highlights is that good AI isn't just about generating fluent summaries; it's about knowing where the evidence ends and assumptions begin. Making release notes trustworthy is just as important as making them readable. Great work sharing both the problem and a practical solution!
Which decoy rationales did you find hardest to reject, and why?
The hardest decoys to reject are plausible operational or performance stories - like framing a stability or memory fix as a latency or throughput optimization, because they match common engineering tropes and sound convincing even without backing in the issue context. They easily slip past models when the linked issue is broad or light on concrete motivation. Thanks for asking such a sharp question, Adam.
I think the linked issue idea is the part that makes this click for me.
Thanks!
Thanks
One failure mode close to your memory leak story: squash merges. The squashed commit message is usually just the PR title, so the model loses the intermediate commits that explained the decision and fills the gap with whatever the diff suggests.
What fixed most of it for us was making the generator refuse to describe intent unless it can quote a source for it, either the linked issue or a line from the PR description. Anything without a source goes into a plain list of changed areas instead of a sentence about why. The notes got shorter, but nobody has had to retract one since.
Did your counterfactual benchmark show a different error rate for refactor-heavy releases compared with bug-fix releases?
Raw diffs only record line-level mutations, so prompting an LLM without linked issue graphs trades the CI latency and context-window overhead of graph hydration for plausible-sounding causal hallucinations in production release notes, while counterfactual evals fail silently whenever engineers merge unlinked hotfixes under incident pressure. Diffs record mutations, not intent.
Trading graph hydration latency and token overhead for ungrounded causal guesses is a real cost, and unlinked incident hotfixes are a classic blind spot when context is missing. Keeping diffs strictly to what mutated while surfacing unlinked or low-context changes explicitly helps avoid turning urgency into false confidence.
The v1.4.0 story is the one that stays with me. A memory leak that crashed pods under peak traffic, retold as "optimized JSON payload serialization for low-latency clients". That is not a summary error, that is a press release for a fire. I keep thinking about the gap between what happened and what got written down, because I measured a version of it last week: a finished step missed its save by 5.9 seconds, so the log said the work was banked and the patch said otherwise. Your counterfactual test is the part I want to steal. Do you have an FPR number from it yet, or is that still the next run?
the unsupported plausible archetype is the one that gets everyone, because a polished PR description reads like evidence. we hit a version of it where the model turned a rollback commit into a feature line, since the diff only showed code being added back.
linking closing keywords to the issue is solid but it falls over when the issue itself is vague. what does your bot do when the linked issue states no reason, drop the line or flag it for a human?