|
| 1 | +# Update CHANGELOG.md (Unreleased) |
| 2 | + |
| 3 | +You will be given a block of “changes” immediately after this message (pasted by the user). |
| 4 | +Your job: update the repository changelog. |
| 5 | + |
| 6 | +## Target file |
| 7 | +- Prefer `CHANGELOG.md` at the repo root. |
| 8 | +- If not found, search the repo for a changelog file (common names: CHANGELOG.md, Changelog.md, changelog.md) and use the main one. |
| 9 | + |
| 10 | +## Rules (must follow) |
| 11 | +1) Keep existing formatting and conventions of the file. |
| 12 | +2) Update ONLY the `Unreleased` section: |
| 13 | + - If a `## [Unreleased]` (or `## Unreleased`) section exists, merge the pasted changes into it. |
| 14 | + - If it does not exist, create it near the top of the changelog: |
| 15 | + - After the main title/introduction |
| 16 | + - Before the first released version section |
| 17 | +3) Merge behavior: |
| 18 | + - If the pasted changes already contain subsection headings like `### Added`, `### Changed`, `### Fixed`, etc., merge bullets under matching subsections in Unreleased. |
| 19 | + - If a needed subsection doesn’t exist under Unreleased, create it. |
| 20 | + - If the pasted changes do NOT include headings, classify each line into one of: |
| 21 | + - Added / Changed / Deprecated / Removed / Fixed / Security |
| 22 | + - Use best-effort classification by wording (add/introduce -> Added, fix/bug -> Fixed, remove/delete -> Removed, security/vuln -> Security, deprecate -> Deprecated, otherwise -> Changed) |
| 23 | + - If onf of the pasted changes seems worthy of highlighting, propose to the user to do so and get their approval. |
| 24 | +4) De-duplicate: |
| 25 | + - If a very similar bullet already exists in Unreleased, do not add it again. |
| 26 | +5) Preserve order: |
| 27 | + - Keep the pasted changes in the order provided within each subsection. |
| 28 | + |
| 29 | +## Output |
| 30 | +- Make the minimal necessary edits to the changelog file. |
| 31 | +- When done, reply with: |
| 32 | + - A brief summary of what you added (by subsection) |
| 33 | + - The exact diff or the updated Unreleased section (whichever is shorter). |
0 commit comments