Why Your AI Release Notes Hallucinate: The "Why vs What" Problem in Git History A developer re-engineered an LLM-based changelog pipeline after a raw git diff fed to a model produced fabricated release notes, claiming a memory-leak hotfix was a JSON serialization optimization. The rebuilt @necoz-oss/changelog-bot resolves GitHub closing keywords to pull linked issue context as ground truth, caps issue-fetch concurrency to avoid API rate limits, sanitizes noisy stack traces, and falls back to heuristic summaries when the API degrades. I once deployed an automated release pipeline that piped raw git diff outputs straight into an LLM prompt. Two hours later, our generated release notes claimed that version 1.4.0 "optimized JSON payload serialization for low-latency clients." In reality, the underlying commit was an emergency patch for a memory leak that crashed Kubernetes pods under peak traffic. The code diff happened to delete several buffer allocations, and the model fabricated an appealing performance feature out of thin air. That incident exposed a fundamental blind spot in how engineering teams automate changelogs with AI. When we ask an LLM to read a git commit or unified diff, we are asking it to divine human intent from syntax changes. A diff tells you that timeoutMs changed from 5000 to 15000 . It does not tell you that downstream payment gateways began dropping socket handshakes during cloud provider migrations. Without grounding context, the model resolves the ambiguity by inventing the most statistically plausible narrative: "improved network stability." This becomes dangerous when breaking changes are involved. According to the Conventional Commits v1.0.0 specification https://www.conventionalcommits.org/en/v1.0.0/ , breaking changes can reside inside commit message footers or body paragraphs. A naive diff parser summarizes the altered function signature, while completely erasing the migration path requested by the engineer. The problem deepens as more code is authored by autonomous AI coding agents. Agent-generated pull requests often arrive with beautifully formatted markdown descriptions. When I analyzed hundreds of these descriptions, I identified three recurring archetypes: Standard summarization prompts routinely latch onto the unsupported-plausible archetype. The resulting changelog looks convincing to release managers, but distributes false technical claims to your users. To stop LLMs from hallucinating reasons, I re-engineered the extraction pipeline in @necoz-oss/changelog-bot https://www.npmjs.com/package/@nyaomaru/changelog-bot hosted on GitHub https://github.com/necoz-oss/changelog-bot . Instead of relying solely on PR descriptions or diffs, the engine tracks back to where the problem was originally defined: the linked GitHub issue. Under the GitHub Issue Linking specification https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue , closing keywords establish verifiable causal links. // Match GitHub closing keywords preceding an issue reference or URL. // See: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue export const CLOSING KEYWORD PATTERN = / ?:\b ?:close sd ?|fix ?:e sd ?|resolve sd ? \s :: ?\s ?:\ ^\ +\ \ ?