|
| 1 | +--- |
| 2 | +name: pr-readiness |
| 3 | +description: > |
| 4 | + Verify that a pull request into microsoft/vscode-cmake-tools meets contribution |
| 5 | + requirements. Use when preparing, reviewing, or finalizing a PR to check for a |
| 6 | + descriptive title, a meaningful description, and a properly formatted CHANGELOG entry. |
| 7 | +--- |
| 8 | + |
| 9 | +# PR Readiness |
| 10 | + |
| 11 | +## PR Requirements Checklist |
| 12 | + |
| 13 | +### 1. PR Title |
| 14 | + |
| 15 | +The title must clearly and concisely describe the change from the user's perspective. It should: |
| 16 | + |
| 17 | +- Start with a verb (e.g., "Fix", "Add", "Improve", "Remove", "Update"). |
| 18 | +- Mention the affected feature or area (e.g., presets, kits, CTest, build tasks, Project Outline). |
| 19 | +- Be specific enough that a reader understands the change without opening the PR. |
| 20 | + |
| 21 | +**Good examples:** |
| 22 | + |
| 23 | +- `Fix preset reloading loop when preset files are symlinks` |
| 24 | +- `Add "Delete Build Directory and Reconfigure" command` |
| 25 | +- `Improve CTest test ordering to match Test Explorer display` |
| 26 | + |
| 27 | +**Bad examples:** |
| 28 | + |
| 29 | +- `Fix bug` (too vague) |
| 30 | +- `Update code` (no useful information) |
| 31 | +- `WIP` (not ready for review) |
| 32 | + |
| 33 | +### 2. PR Description |
| 34 | + |
| 35 | +The PR body must include: |
| 36 | + |
| 37 | +- **What changed**: A short summary of the user-visible behavior change. |
| 38 | +- **Why**: The motivation — link to a GitHub issue if one exists (e.g., `Fixes #1234`). |
| 39 | +- **How** (if non-obvious): A brief explanation of the implementation approach when the change is complex. |
| 40 | + |
| 41 | +### 3. CHANGELOG Entry |
| 42 | + |
| 43 | +Every PR must add an entry to `CHANGELOG.md`. |
| 44 | + |
| 45 | +#### Where to insert |
| 46 | + |
| 47 | +Insert the entry under the **most recent (topmost) version heading** in `CHANGELOG.md`. The first version heading looks like `## <version>` (e.g., `## 1.23`). Always add the new entry at the **bottom** of the appropriate section (i.e., after all existing entries in that section). |
| 48 | + |
| 49 | +#### Which section |
| 50 | + |
| 51 | +Place the entry in exactly one of these three sections, creating the section if it does not already exist under the current version: |
| 52 | + |
| 53 | +| Section | Use when… | |
| 54 | +|---|---| |
| 55 | +| `Features:` | A new user-visible capability is added (new command, new setting, new UI element). | |
| 56 | +| `Improvements:` | An existing feature is enhanced, optimized, or has better UX — but no new capability is introduced. | |
| 57 | +| `Bug Fixes:` | A defect is corrected. | |
| 58 | + |
| 59 | +The sections appear in this fixed order: `Features:`, then `Improvements:`, then `Bug Fixes:`. |
| 60 | + |
| 61 | +#### Entry format |
| 62 | + |
| 63 | +Each entry follows this pattern: |
| 64 | + |
| 65 | +``` |
| 66 | +- <Description>. [#<number>](<link>) |
| 67 | +``` |
| 68 | + |
| 69 | +Where `<Description>` starts with a present-tense verb describing the user-visible change, and the link references either: |
| 70 | + |
| 71 | +- The **GitHub issue** it solves: `[#<issue number>](https://github.com/microsoft/vscode-cmake-tools/issues/<issue number>)` |
| 72 | +- Or the **PR** itself: `[#<pr number>](https://github.com/microsoft/vscode-cmake-tools/pull/<pr number>)` |
| 73 | + |
| 74 | +An entry may optionally credit an external contributor at the end: `[@user](https://github.com/user)`. |
| 75 | + |
| 76 | +**Examples:** |
| 77 | + |
| 78 | +```markdown |
| 79 | +Features: |
| 80 | +- Add "Delete Build Directory and Reconfigure" command that removes the entire build directory before reconfiguring, ensuring a completely clean state. [#4826](https://github.com/microsoft/vscode-cmake-tools/pull/4826) |
| 81 | + |
| 82 | +Improvements: |
| 83 | +- Run tests sequentially in alphabetical order (matching the Test Explorer display order) when `cmake.ctest.allowParallelJobs` is disabled. [#4829](https://github.com/microsoft/vscode-cmake-tools/issues/4829) |
| 84 | + |
| 85 | +Bug Fixes: |
| 86 | +- Fix `cmake.revealLog` set to `"focus"` not revealing the output panel or stealing focus. [#4471](https://github.com/microsoft/vscode-cmake-tools/issues/4471) |
| 87 | +- Fix garbled characters in the Output panel when MSVC outputs UTF-8 on non-UTF-8 Windows systems. [#4520](https://github.com/microsoft/vscode-cmake-tools/issues/4520) [@contributor](https://github.com/contributor) |
| 88 | +``` |
| 89 | + |
| 90 | +#### What NOT to do |
| 91 | + |
| 92 | +- Do **not** add a new version heading — use the existing topmost one. |
| 93 | +- Do **not** place the entry under an older version. |
| 94 | +- Do **not** use past tense (write "Fix …", not "Fixed …"). |
| 95 | +- Do **not** omit the issue or PR link. |
| 96 | + |
| 97 | +## Applying This Skill |
| 98 | + |
| 99 | +When reviewing or preparing a PR: |
| 100 | + |
| 101 | +1. **Check the title** — rewrite it if it is vague or missing context. |
| 102 | +2. **Check the description** — ensure it explains what, why, and (if needed) how. |
| 103 | +3. **Check `CHANGELOG.md`** — verify an entry exists under the current version in the correct section with the correct format. If missing, add one. |
0 commit comments