Skip to content

fix(prompt): reduce repetitive release highlights#124

Merged
jdx merged 1 commit intomainfrom
codex/reduce-release-note-highlights
Apr 26, 2026
Merged

fix(prompt): reduce repetitive release highlights#124
jdx merged 1 commit intomainfrom
codex/reduce-release-note-highlights

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Apr 26, 2026

Tighten the release-note prompt so Highlights are reserved for broad releases where they synthesize themes, rather than repeating the categorized changelog. The prompt now gives each section a distinct job and explicitly tells the model to avoid repeating the same change in the summary, Highlights, and categorized sections.\n\nValidation:\n- cargo fmt --check\n- cargo test prompt::tests::test_system_prompt_default


Note

Low Risk
Low risk: this only adjusts release-note prompting text and related tests/schema descriptions, with no runtime logic or data-flow changes.

Overview
Updates the release-notes system prompt to discourage repetitive content by tightening when Highlights should be included (only for broad releases) and by explicitly assigning distinct roles to the opening summary, Highlights, and categorized sections.

Extends system_prompt tests to assert the new guidance is present, and tweaks the submit_release_notes tool schema description to match the updated Highlights guidance.

Reviewed by Cursor Bugbot for commit 4eb7397. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.66%. Comparing base (1533cee) to head (4eb7397).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   94.65%   94.66%   +0.01%     
==========================================
  Files          26       26              
  Lines        4697     4708      +11     
  Branches     4697     4708      +11     
==========================================
+ Hits         4446     4457      +11     
  Misses        160      160              
  Partials       91       91              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refines the system prompt and tool definitions for generating release notes, introducing stricter criteria for the 'Highlights' section to ensure it synthesizes broad themes for large releases rather than duplicating categorized details. Feedback suggests improving internal consistency by standardizing the terminology for 'categorized sections' and aligning the recommended sentence count for the opening narrative summary.

Comment thread src/prompt.rs Outdated
```

Adapt the template to fit the release. Small patch releases might only need a summary and a "What's Changed" section. Large releases might use all sections. Don't include empty sections.
Adapt the template to fit the release. Small releases might only need a summary and a "What's Changed" section, regardless of whether the version is patch, minor, or major. Most releases should omit Highlights; use it only when it reduces scanning effort instead of duplicating the sections below. Don't include empty sections.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The instruction refers to a "What's Changed" section, but the template (line 35) and the tool description in submit_release_notes.rs use categorized headings like ## Added, ## Fixed, etc. To avoid confusing the model and ensure consistency with the "Keep a Changelog" style used throughout the prompt, this should refer to "categorized sections".

Suggested change
Adapt the template to fit the release. Small releases might only need a summary and a "What's Changed" section, regardless of whether the version is patch, minor, or major. Most releases should omit Highlights; use it only when it reduces scanning effort instead of duplicating the sections below. Don't include empty sections.
Adapt the template to fit the release. Small releases might only need a summary and categorized sections, regardless of whether the version is patch, minor, or major. Most releases should omit Highlights; use it only when it reduces scanning effort instead of duplicating the sections below. Don't include empty sections.

Comment thread src/prompt.rs
Adapt the template to fit the release. Small releases might only need a summary and a "What's Changed" section, regardless of whether the version is patch, minor, or major. Most releases should omit Highlights; use it only when it reduces scanning effort instead of duplicating the sections below. Don't include empty sections.

Each section needs a distinct job:
- The opening paragraph frames the release in 1-2 sentences.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a discrepancy between this instruction (1-2 sentences) and the template placeholder at line 28 (2-3 sentences). Aligning these will provide clearer guidance to the model. Given the goal of tightening the prompt, 1-2 sentences is likely preferred, but since line 28 is not part of the modified lines in this diff, updating this line to 2-3 sentences maintains internal consistency with the existing template.

Suggested change
- The opening paragraph frames the release in 1-2 sentences.
- The opening paragraph frames the release in 2-3 sentences.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 26, 2026

Greptile Summary

This PR tightens the release-note prompt by reserving ## Highlights for broad releases (10+ user-facing changes or 4+ independent themes), adding explicit "distinct job" guidance for each section, and instructing the model not to repeat the same change across the summary, Highlights, and categorized sections. The tool-schema description in submit_release_notes.rs is updated to stay in sync, and three new test assertions confirm the new guidance strings are present in the rendered prompt.

Confidence Score: 5/5

Safe to merge — text-only prompt and schema description changes with no runtime logic modifications.

All changes are prompt text and test assertions. Section ordering in the tool description matches the template, the new test assertions correctly correspond to strings present in the rendered prompt, and no runtime behaviour is altered.

No files require special attention.

Important Files Changed

Filename Overview
src/prompt.rs Tightens the release-note template: reduces narrative summary to 1-2 sentences, raises the bar for Highlights inclusion (10+ changes or 4+ themes), adds synthesis/no-repeat guidance, and adds three matching test assertions.
src/tools/submit_release_notes.rs Updates the release_body tool-schema description to mirror the new Highlights guidance from the system prompt; section ordering remains consistent with the template (summary → Highlights → categorized sections).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Release notes generation starts] --> B[Opening paragraph\n1-2 sentence narrative summary]
    B --> C{Broad release?\n10+ user-facing changes\nOR 4+ headline themes?}
    C -- Yes --> D[## Highlights\n2-3 synthesis bullets\nGroup related work only]
    C -- No --> E[Skip Highlights]
    D --> F[## Added / Fixed / Changed / etc.\nConcrete details, PR links,\nauthors, examples]
    E --> F
    F --> G{Breaking changes?}
    G -- Yes --> H[## Breaking Changes]
    G -- No --> I[Skip Breaking Changes]
    H --> I
    I --> J{New contributors?}
    J -- Yes --> K[## New Contributors]
    J -- No --> L[Full Changelog link]
    K --> L
Loading

Reviews (2): Last reviewed commit: "fix(prompt): reduce repetitive release h..." | Re-trigger Greptile

Comment thread src/tools/submit_release_notes.rs Outdated
@jdx jdx force-pushed the codex/reduce-release-note-highlights branch from 4df3e67 to 4eb7397 Compare April 26, 2026 13:29
@jdx jdx merged commit 12d92a3 into main Apr 26, 2026
9 checks passed
@jdx jdx deleted the codex/reduce-release-note-highlights branch April 26, 2026 13:37
jdx added a commit that referenced this pull request Apr 26, 2026
A small patch release that stops generated release notes from saying the
same thing three times, and keeps communique's own sponsor footer from
compounding on workflow reruns.

## Fixed

- **Reserve Highlights for genuinely broad releases** — The release-note
system prompt and the `submit_release_notes` tool schema have been
retightened so the model stops producing a `## Highlights` section that
just restates the categorized `## Added` / `## Fixed` bullets underneath
it. The opening summary is now capped at 1-2 sentences, Highlights are
gated on "roughly 10+ distinct user-facing changes or 4+ independent
headline themes", and the prompt explicitly assigns each section a
distinct job: the opening paragraph frames the release, Highlights (when
present) group broad themes for skimming, and categorized sections carry
the concrete PR links, authors, examples, and compatibility notes. The
prompt also tells the model directly to avoid saying the same change
three times. Patch and small minor releases should now skip Highlights
entirely instead of padding them out.
([#124](#124)) (@jdx)
- **Dedupe the sponsor blurb on release reruns** — communique's own
`release-plz` workflow appends a `## 💚 Sponsor communique` footer to
each GitHub release. If the workflow re-ran, or if communique itself
drafted notes that already included a sponsor section, the footer would
stack up. The `Append en.dev sponsor blurb` step is now idempotent: it
strips any existing `## 💚 Sponsor communique` section from the current
release body before appending the canonical en.dev blurb.
([#123](#123)) (@jdx)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: this PR only bumps version metadata and updates generated
documentation/changelog; no runtime behavior changes are included in the
diff (aside from a potential `CHANGELOG.md` formatting glitch).
> 
> **Overview**
> Cuts the `v1.1.1` release by bumping the crate/CLI version from
`1.1.0` → `1.1.1` across `Cargo.toml`, `Cargo.lock`, the usage spec, and
generated CLI docs.
> 
> Updates `CHANGELOG.md` with a new `1.1.1` entry describing two fixes,
though the edit also leaves a **formatting issue** where the `1.1.0`
entry appears to run into the `1.0.4` header.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
82507c2. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant