← All posts

Generating Changelogs and Release Notes From Diffs, PRs and Issue Links With a Gated AI Writing Pass

Grounded release notes come from assembling context first and gating the writing.

December 2, 2026

Cover illustration for “Generating Changelogs and Release Notes From Diffs, PRs and Issue Links With a Gated AI Writing Pass”

AI writing tools for developers can write release notes worth trusting when a grounded pipeline gives them more than raw diffs to work from. Generating changelogs from diffs, PRs, and issue links is a data-assembly problem first and a writing problem second. The reliable architecture resolves source context, separates classification from writing, and gates publication on traceability, accuracy, and voice.

Why generating release notes from engineering artifacts is harder than it looks

A release manager has dozens of tabs open, moving between pull requests, commits, and tickets to establish what belongs in the release. Each artifact shows a different part of the work. PR titles, commit subjects, and ticket summaries rarely share vocabulary, and none necessarily addresses customers, support teams, or compliance reviewers. The missing element is the connection between a code change, the problem it addresses, and its effect on a user.

Manual assembly leaves that connection dependent on the person writing that week. A senior PM may produce benefit-focused notes, while a junior developer copies commit messages verbatim. Both work from the same engineering history, but they select and interpret it differently. Consequently, the output varies before anyone makes a stylistic decision. The underlying records do not provide a consistent editorial unit.

When a PR lands through a regular merge rather than a squash, a history parser may encounter dozens of WIP and fixup commits for one conceptual change. More records do not mean more useful context. The resulting changelog can be too granular about implementation and too sparse about intent, leaving readers to reconstruct the reason for the release themselves.

Why piping a raw diff into an LLM makes the problem worse, not better

A pipeline that passed raw git diff output into an LLM generated a release note claiming version 1.4.0 “optimized JSON payload serialization for low-latency clients”. The actual commit was an emergency patch for a memory leak crashing Kubernetes pods under peak traffic. The diff deleted buffer allocations. The model converted that implementation detail into an invented performance feature, obscuring the operational reason for the patch.

That failure follows from the information a diff contains. A timeout changing from 5000 to 15000 establishes a syntactic change whose rationale remains to be supplied. Without issue context, the model can fill the gap with an explanation that sounds right. Polished agent-authored PR descriptions can compound the problem when their claims have no grounding in the original bug report. Summarization preserves their confidence without establishing their truth.

Breaking-change communication has another failure path. The Conventional Commits v1.0.0 specification requires breaking changes to be indicated in the type/scope prefix or a footer. A parser focused on altered function signatures can therefore omit migration information recorded elsewhere. A raw-diff prompt has no independent defense against either omission or fabrication. A grounded pipeline needs evidence checks and counterfactual calibration as its acceptance criteria.

What structured input actually requires: the diff → PR → issue context chain

Diagram: The Three-Stage Grounded Pipeline. Visualizes: Show a linear flow of three sequential stages a reliable changelog pipeline must complete before writing begins: (1) Data Assembly — gathering pull requests (titles, descriptions, labels)…

The pipeline needs to gather and link three kinds of input before writing begins. These are pull requests with their titles, descriptions, and labels, commit messages within the release range, and tickets or work items referenced by those PRs. Partial retrieval is particularly deceptive. Notes can look complete while leaving out customer-facing work that was never fetched.

The linked GitHub issue supplies the rationale that code evidence lacks. Closing keywords such as closes, fixes, and resolves connect a PR to the record containing user symptoms, reproduction steps, and business rationale. That connection anchors the explanation of why the change exists. Before issue snippets reach the model, stack traces and debug dumps need to be stripped so the grounding material does not become another source of noise.

Commit grouping then establishes a coherent unit for synthesis. Relizy issue #237 proposes a groupByPr option that produces one changelog line per merged PR, collapsing WIP and fixup history. Diff evidence should follow the same boundary. One scoped diff per changelog line avoids asking the model to divide an entire release into changes.

Additional labels, CODEOWNERS, and linked design documents can improve classification, but they cannot substitute for the required sources. Missing context must remain visible. When required inputs are absent, the system must fail closed rather than publish a generic “bug fixes and performance improvements” paragraph.

Building the pipeline: data assembly, classification, and prompt structure before the writing step

Implementation starts by computing the diff between the previous tag and HEAD, scoped per package where a monorepo requires it. Filter out lockfiles, generated snapshots, and binary files, and truncate the material before model submission. Resolve issue references through closing-keyword patterns, bound API concurrency, and group commits by PR. Classification then assigns feature, fix, breaking, security, deprecation, or internal-only categories from explicit prefixes, labels, ticket types, and breaking-change markers.

The slack-ruby-client workflow illustrates how prompt structure preserves those boundaries. A .prompt.yml file separates system and user prompts from workflow YAML, while an instruction requests one entry per group of changes. Its response contract is JSON containing an entries array of strings. The workflow extracts the last well-formed JSON object instead of parsing the whole response, accommodating models that print reasoning before their answer. It logs the raw response unconditionally and reports an explicit error if no valid JSON appears.

Runner dependencies also require attention. GitHub Models was retired on July 30, 2026, and actions/ai-inference no longer connects to it at any version. The v1 tag retains the old integration. Version v3 uses GitHub Copilot CLI exclusively, requiring a separate CLI installation and authentication through COPILOT_GITHUB_TOKEN.

API degradation and publication eligibility must remain separate decisions. Heuristic summaries can still give useful output without failing the build, but release copy based on incomplete evidence must not be approved. Generation should write to stdout or a file, with PR creation and publishing downstream, so delivery failures do not invalidate the assembly step.

Why a single model writing the full changelog is an architectural mistake

Even with clean inputs, the goals within a single call can compete. Classification, synthesis, audience selection, and phrasing each call for a different kind of judgment. Combining them spreads attention across requirements and encourages generic compromises. The architectural remedy is task specialization, with separate invocations for extraction, classification, and audience-targeted writing. Each stage gets its own instructions, rules for what passes, and output format.

TriAdReview, published in June 2026, gives evidence for the value of independent review, though it offers no recipe for building a changelog system. It uses two reviewer models with engineering and boundary perspectives, plus a triangular judging mechanism that iteratively improves a generator’s output. The paper reports 10.1% overall improvement over a single-model baseline across five tasks. That result supports the broader principle that independent criticism can improve generated technical work.

Audience segmentation provides a practical specialization boundary. Developers need endpoint changes, schema differences, SDK bumps, exact identifiers, and migration steps. Customers need outcomes and recognizable symptoms, while support needs incident mapping and workarounds.

Letterwrite, an adversarial writing kernel platform, integrates drafting with a council of models that critique and vote line by line. Such disagreement can surface a plausible but unsupported claim like the serialization note. This writing mechanism still requires source assembly and an explicit publication gate.

What the gated writing pass enforces and what it must catch

The gate is an automated quality layer between generated output and final human sign-off. Its first condition is traceability. Every entry must map to a real PR, commit, or ticket within the release, and an untraceable entry fails regardless of how convincing it sounds. A source link alone, however, does not establish that the explanation is supported by that source.

Counterfactual evaluation tests that distinction directly. A test corpus should contain matched case families with verified rationales grounded in issue reports and decoy rationales describing unrelated features or false root causes. The evaluation tracks false positives when the model encounters those decoys. Plausibility becomes the test’s adversary. A model that accepts convincing false explanations is unsuitable for automated production release writing, even when its prose reads well.

The gate must also enforce classification and completeness rules. Breaking changes and security items must come first, and the output must reflect the markers in the input. Flagged features must state whether their flag is on or off by default. Checks must catch forbidden phrases, marketing adjectives, and off-register language in the output, since prompt instructions alone are not enough.

Filtering must leave a clear accounting of exclusions. An intentionally sparse section is different from an incomplete input set, and the release manager needs to see which condition occurred. Automated checks reduce avoidable review work. Human sign-off still checks that the facts, tone, and legal wording are right.

Making the gate enforce your team's voice, not generic web-English

Traceable, correctly classified prose can still sound generically machine-written. General models default to patterns learned across broad training material, and a short style instruction cannot reliably displace those habits. Voice therefore needs an observable reference. A substantial, curated corpus of approved human writing provides that reference more effectively than abstract requests to sound professional or concise.

The corpus must represent actual linguistic choices. Sentence-length distribution, lexicon, hedging frequency, and prohibited constructions give the gate attributes it can measure. Generated output can then be tested for divergence alongside editorial judgment. Forbidden phrases are especially straightforward to enforce. They become hard stops in the rules layer.

This constraint is strongest in customer-facing release notes. Developer-facing entries already have vocabulary boundaries imposed by identifiers, semver, and deprecation syntax. Explanations for customers have more room for vague claims about benefits and adjectives that overstate them. Corpus-based checks give that freedom a defined register without turning technical precision into marketing language.

Letterwrite supports corpus-based refinement and post-training of its kernels using past posts, brand guidelines, and subject-matter documents. With that approach, learning the team’s voice is part of how the writing system works, so it depends on more than a longer prompt. The gate still needs to check the output against the team’s measurable standard.

Where AI writing tools for developers fit in the workflow and how the gate plugs into CI

Release-note generation belongs after scope is frozen and before, or in parallel with, the final go/no-go decision. A fixed tag or release branch sets a boundary that stays in place. Continuously drafting against a moving commit range creates notes that can be stale before review. The gate must run automatically at that release boundary if it is to function as an enforceable check.

The writing harness should behave like a developer tool. Its CLI should support initializing a prompt project, rendering prompts with variables, testing fixtures, comparing versions, and publishing or tagging a release. Predictable commands make the harness scriptable. In CI, the gate should return an explicit pass/fail signal with a readable account of untraceable entries, classification misses, and voice violations.

Publication remains a separate downstream job that runs only after the gate passes. An API error must not become a publishing action. The release manager’s final review checks artifact mappings, the priority of breaking and security items, exclusion of internal-only work, and resolving links. The language model drafts, but the release manager owns publication.

GitSaga, which turned GitHub commits into changelogs, closed with a notice stating that “in the age of agents it no longer makes sense to keep GitSaga running”. A writing mechanism such as Letterwrite can handle one stage while source assembly, CI checks, and delivery each have their own stage.

Developer Content Workflows

Sources