fix(prompt): reduce repetitive release highlights#124
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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.
| ``` | ||
|
|
||
| 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. |
There was a problem hiding this comment.
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".
| 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. |
| 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. |
There was a problem hiding this comment.
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.
| - The opening paragraph frames the release in 1-2 sentences. | |
| - The opening paragraph frames the release in 2-3 sentences. |
Greptile SummaryThis PR tightens the release-note prompt by reserving Confidence Score: 5/5Safe 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
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
Reviews (2): Last reviewed commit: "fix(prompt): reduce repetitive release h..." | Re-trigger Greptile |
4df3e67 to
4eb7397
Compare
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 -->
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
Highlightsshould be included (only for broad releases) and by explicitly assigning distinct roles to the opening summary, Highlights, and categorized sections.Extends
system_prompttests to assert the new guidance is present, and tweaks thesubmit_release_notestool 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.