You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify when to include Resolves/Related lines in log agent changelog entries
✨ Enhancement📝 Documentation🕐 Less than 5 minutes
AI Description
• Define rules for adding "- Resolves:" based on the last non-agent changelog entry.
• Skip changelog entries authored by packaging agents when determining prior style.
• Omit Resolves/Related lines when the last human entry did not include them.
Diagram
graph TD
A(["Log agent"]) --> B["instructions.j2"] --> C[["add_changelog_entry tool"]] --> D[("Spec changelog")]
B --> E["Last non-agent entry"] --> F{"Include Resolves/Related?"}
F -->|"yes"| D
F -->|"no"| D
subgraph Legend
direction LR
_agent(["Agent"]) ~~~ _file["Prompt/file"] ~~~ _tool[["Tool"]] ~~~ _db[("Changelog")] ~~~ _dec{"Decision"}
end
Loading
High-Level Assessment
The following are alternative approaches to this PR:
1. Move Resolves/Related logic into the changelog tool
➕ Enforces consistent behavior regardless of prompt wording
➕ Reduces prompt complexity and risk of LLM misinterpretation
➖ Requires tool/API changes and test coverage
➖ Less flexible if projects want different per-repo conventions
2. Add a repo-level changelog style config
➕ Makes the rule explicit and easily editable without prompt changes
➕ Supports different conventions across packages
➖ Introduces additional configuration surface area
➖ Still requires the agent/tool to correctly interpret the config
Recommendation: This prompt clarification is a good low-cost improvement and likely sufficient if the main failure mode is inconsistent LLM formatting. If recurring inconsistencies persist, prefer moving the rule into add_changelog_entry (or a shared helper) so the formatting decision is deterministic and not prompt-dependent.
Files changed (1) +4 / -0
Documentation (1) +4 / -0
instructions.j2Clarify Resolves/Related inclusion rules for changelog entries+4/-0
Clarify Resolves/Related inclusion rules for changelog entries
• Adds guidance to decide whether to include a "- Resolves:" line by inspecting the last changelog entry not authored by Ymir-related agents. The prompt now explicitly mirrors prior human-authored style (include Resolves/Related only if the last non-agent entry had one).
The new instruction says to include/omit a "- Resolves:" line based on the last non-Ymir entry, but
it doesn’t clearly override the later default guidance that tells the agent to use "- Resolves:
<JIRA_ISSUES>", leaving precedence ambiguous. It also only references "- Resolves:"/"- Related:"
while the repo already contains valid changelog styles like indented " Resolves:", so the agent may
mis-detect existing style and choose the wrong tag/format.
+ To decide whether to include a "- Resolves:" line, find the last changelog+ entry that was NOT authored by Ymir (skip entries by "RHEL Packaging Agent"+ or "redhat-ymir-agent"). If that entry includes a "- Resolves:" or+ "- Related:" line, include one in your entry. If it does not, omit it.
Relevance
⭐⭐⭐ High
Team previously fixed brittle Resolves/Related matching and accepts prompt wording clarifications to
avoid ambiguous/contradictory guidance.
ⓘ Recommendations generated based on similar findings in past PRs
Evidence
The prompt now adds a conditional include/omit rule for a "- Resolves:" line, but the same template
later still tells the agent to use "- Resolves: <JIRA_ISSUES>" by default, which makes the effective
rule unclear. Separately, the repo’s own unit tests show a valid changelog style using an indented
Resolves: line (not a - Resolves: bullet), demonstrating that the new instruction’s literal
matching is too narrow.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
The log agent instructions added in `log/instructions.j2` introduce a new rule for including a Resolves/Related line, but:
1) It’s unclear whether this new rule overrides the later default instruction to use `- Resolves: <JIRA_ISSUES>` when writing a new entry.
2) The detection criterion is too literal (`- Resolves:` / `- Related:`) and does not cover existing formats in the repo such as indented ` Resolves:`.
This ambiguity can cause inconsistent changelog output across runs and packages.
## Issue Context
The log agent is expected to "use the same style" as existing spec changelog entries, including whether it uses `Resolves:` or `Related:` and how those lines are formatted.
## Fix Focus Areas
- ymir/agents/prompts/log/instructions.j2[13-32]
## Suggested fix approach
- Rewrite the new rule to explicitly state precedence (e.g., “This historical-style check overrides the default `- Resolves:` guidance below”).
- Broaden the style detection language to recognize `Resolves:`/`Related:` lines regardless of indentation/bullet marker (e.g., `Resolves:` / `Related:` with optional leading whitespace and optional `- `).
- When a prior entry contains `Related:` (not `Resolves:`), instruct the agent to emit the same tag (`Related:`) and formatting style, not just “include one.”
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.