|
| 1 | +--- |
| 2 | +name: maintain-changelog |
| 3 | +description: Maintain the CHANGELOG.md file by drafting or updating entries for new stable releases. Use this skill when preparing a release, after merging significant PRs, or when moving changes from Unreleased to a new version section. |
| 4 | +--- |
| 5 | + |
| 6 | +# Maintain Changelog |
| 7 | + |
| 8 | +This skill provides a systematic workflow for keeping `CHANGELOG.md` up-to-date as changes land on `main` and when cutting new stable releases. |
| 9 | + |
| 10 | +## When to Use This Skill |
| 11 | + |
| 12 | +- **After merging a PR** that adds, changes, removes, or fixes MCP server tools, prompts, resources, CodeQL query packs, VS Code extension features, or infrastructure. |
| 13 | +- **When preparing a stable release** (tagging `vMAJOR.MINOR.PATCH` without a pre-release suffix). |
| 14 | +- **When reviewing the `[Unreleased]` section** for accuracy before a release candidate or final release. |
| 15 | + |
| 16 | +## Key Concepts |
| 17 | + |
| 18 | +### Release Scope |
| 19 | + |
| 20 | +The changelog tracks changes between **stable releases only** — tags matching `vMAJOR.MINOR.PATCH` with no `-rc*` or other suffix. Pre-release tags are excluded. |
| 21 | + |
| 22 | +### Section Taxonomy |
| 23 | + |
| 24 | +Each release entry follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) categories: |
| 25 | + |
| 26 | +| Section | What goes here | |
| 27 | +| -------------------- | --------------------------------------------------------------------- | |
| 28 | +| **Highlights** | 2-4 sentence summaries of the most impactful changes, with PR links | |
| 29 | +| **Added** | New tools, prompts, resources, query packs, extension features | |
| 30 | +| **Changed** | Modifications to existing tools, prompts, resources, infrastructure | |
| 31 | +| **Deprecated** | Features marked for future removal | |
| 32 | +| **Removed** | Features or tools removed in this release | |
| 33 | +| **Fixed** | Bug fixes | |
| 34 | +| **Security** | Vulnerability fixes or hardening changes | |
| 35 | +| **Dependencies** | CodeQL CLI upgrades, npm dependency bumps, action version bumps | |
| 36 | +| **New Contributors** | First-time contributors (only in the release where they first appear) | |
| 37 | + |
| 38 | +Within `Added` and `Changed`, use sub-headings to group by area: `MCP Server Tools`, `MCP Server Prompts`, `MCP Server Resources`, `CodeQL Query Packs`, `VS Code Extension`, `Infrastructure & CI/CD`. |
| 39 | + |
| 40 | +### Entry Format |
| 41 | + |
| 42 | +- Each bullet links to the PR: `- Description of change. ([#NNN](https://github.com/advanced-security/codeql-development-mcp-server/pull/NNN))` |
| 43 | +- New or changed tools/prompts/resources use a two-column markdown table. |
| 44 | +- Each release ends with: `**Full Changelog**: [\`vPREV...vCURR\`](https://github.com/advanced-security/codeql-development-mcp-server/compare/vPREV...vCURR)` |
| 45 | + |
| 46 | +## Workflow |
| 47 | + |
| 48 | +### Phase 1: Gather Changes |
| 49 | + |
| 50 | +Identify all merged PRs since the last stable release tag. |
| 51 | + |
| 52 | +```sh |
| 53 | +# List PRs merged since the last stable release (replace vPREV with the last stable tag) |
| 54 | +git log --oneline --merges vPREV..HEAD |
| 55 | +``` |
| 56 | + |
| 57 | +Alternatively, use the GitHub compare view: |
| 58 | + |
| 59 | +``` |
| 60 | +https://github.com/advanced-security/codeql-development-mcp-server/compare/vPREV...HEAD |
| 61 | +``` |
| 62 | + |
| 63 | +### Phase 2: Classify Each Change |
| 64 | + |
| 65 | +For each merged PR, determine: |
| 66 | + |
| 67 | +1. **Which section** it belongs to (Added, Changed, Fixed, Dependencies, etc.) |
| 68 | +2. **Which sub-area** it affects (MCP Server Tools, VS Code Extension, Infrastructure, etc.) |
| 69 | +3. **Whether it warrants a Highlights mention** (significant user-facing impact) |
| 70 | + |
| 71 | +Use these heuristics: |
| 72 | + |
| 73 | +| PR title pattern | Likely section | |
| 74 | +| ----------------------------------------- | ------------------------------------------------ | |
| 75 | +| `Build(deps)` or `Bump` | Dependencies | |
| 76 | +| `Fix` or `Fixes` | Fixed | |
| 77 | +| `Add` or `New` or `Implement` | Added | |
| 78 | +| `Update` or `Improve` or `Refactor` | Changed | |
| 79 | +| `Upgrade CodeQL CLI` | Dependencies + possibly Highlights | |
| 80 | +| `[UPDATE PRIMITIVE]` | Changed > MCP Server Tools | |
| 81 | +| `Pin actions` or `dependabot` | Changed > Infrastructure & CI/CD or Dependencies | |
| 82 | +| `Security` or `TOCTOU` or `vulnerability` | Security | |
| 83 | + |
| 84 | +### Phase 3: Draft Entries |
| 85 | + |
| 86 | +1. Open `CHANGELOG.md`. |
| 87 | +2. Add entries under the `[Unreleased]` section, grouped by section and sub-area. |
| 88 | +3. Use concise, specific descriptions. Name the tool, prompt, or resource affected. |
| 89 | +4. Link every entry to its PR number. |
| 90 | + |
| 91 | +### Phase 4: Cut a Release Entry |
| 92 | + |
| 93 | +When a stable release is being tagged: |
| 94 | + |
| 95 | +1. Replace `[Unreleased]` content with a new version heading: |
| 96 | + ```markdown |
| 97 | + ## [vX.Y.Z] — YYYY-MM-DD |
| 98 | + ``` |
| 99 | +2. Re-create an empty `[Unreleased]` section above the new entry. |
| 100 | +3. Write a `Highlights` section summarizing the 2-4 most important changes. |
| 101 | +4. Add a `**Full Changelog**` comparison link at the bottom of the entry. |
| 102 | +5. Update the reference-style link definitions at the bottom of the file: |
| 103 | + - Add `[vX.Y.Z]: https://github.com/advanced-security/codeql-development-mcp-server/releases/tag/vX.Y.Z` |
| 104 | + - Update `[Unreleased]` to compare against the new tag: `https://github.com/advanced-security/codeql-development-mcp-server/compare/vX.Y.Z...HEAD` |
| 105 | +6. Add a `---` horizontal rule between the new entry and the previous release. |
| 106 | + |
| 107 | +### Phase 5: Validate |
| 108 | + |
| 109 | +1. Verify all PR links resolve correctly. |
| 110 | +2. Verify the `[Unreleased]` comparison link points to `vLATEST...HEAD`. |
| 111 | +3. Verify no duplicate entries exist across sections. |
| 112 | +4. Verify entries are in reverse chronological order. |
| 113 | +5. Run `npm run build-and-test` from the repo root to ensure no regressions. |
| 114 | + |
| 115 | +## Example: Adding an Unreleased Entry |
| 116 | + |
| 117 | +After merging PR #200 that adds a new `foo_bar` tool: |
| 118 | + |
| 119 | +```markdown |
| 120 | +## [Unreleased] |
| 121 | + |
| 122 | +### Added |
| 123 | + |
| 124 | +#### MCP Server Tools |
| 125 | + |
| 126 | +| Tool | Description | |
| 127 | +| --------- | ------------------------- | |
| 128 | +| `foo_bar` | Does X for Y, enabling Z. | |
| 129 | + |
| 130 | +- New `foo_bar` tool for doing X. ([#200](https://github.com/advanced-security/codeql-development-mcp-server/pull/200)) |
| 131 | +``` |
| 132 | + |
| 133 | +## Example: Promoting Unreleased to a New Version |
| 134 | + |
| 135 | +```markdown |
| 136 | +## [Unreleased] |
| 137 | + |
| 138 | +_Changes on `main` since the latest tagged release that have not yet been included in a stable release._ |
| 139 | + |
| 140 | +## [v2.26.0] — 2026-04-15 |
| 141 | + |
| 142 | +### Highlights |
| 143 | + |
| 144 | +- **New `foo_bar` tool** — ... |
| 145 | + |
| 146 | +### Added |
| 147 | + |
| 148 | +... |
| 149 | + |
| 150 | +**Full Changelog**: [`v2.25.0...v2.26.0`](https://github.com/advanced-security/codeql-development-mcp-server/compare/v2.25.0...v2.26.0) |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +## [v2.25.0] — 2026-03-27 |
| 155 | + |
| 156 | +... |
| 157 | +``` |
| 158 | + |
| 159 | +## Related Instructions |
| 160 | + |
| 161 | +- [`.github/instructions/changelog_md.instructions.md`](../../instructions/changelog_md.instructions.md) — Formatting rules applied when editing `CHANGELOG.md`. |
0 commit comments