|
| 1 | +--- |
| 2 | +name: adding-release-notes |
| 3 | +description: Adds user-facing change descriptions to DevTools release notes. Use when documenting improvements, fixes, or new features in the NEXT_RELEASE_NOTES.md file. |
| 4 | +--- |
| 5 | + |
| 6 | +# Adding Release Notes |
| 7 | + |
| 8 | +This skill helps automate adding release notes to `packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md`. |
| 9 | + |
| 10 | +## Workflow |
| 11 | +Copy this checklist into your response to track progress: |
| 12 | + |
| 13 | +```markdown |
| 14 | +Release Notes Progress: |
| 15 | +- [ ] Step 1: Formulate the entry (past tense) |
| 16 | +- [ ] Step 2: Find the PR number (if not already known) |
| 17 | +- [ ] Step 3: Determine the section (Inspector, Memory, etc.) |
| 18 | +- [ ] Step 4: Add the entry (use scripts/add_note.dart) |
| 19 | +- [ ] Step 5: Add images (if applicable) |
| 20 | +``` |
| 21 | + |
| 22 | +## Guidelines |
| 23 | + |
| 24 | +### 1. Identify the PR Number |
| 25 | +If the PR number is unknown, use the following methods to find it: |
| 26 | +- **Local Branch**: Identify the branch name using `git branch` or `git log`. If the branch is pushed to origin, it often has a linked PR. |
| 27 | +- **GitHub CLI (`gh`)**: Use the GitHub CLI to find the PR associated with the current branch. |
| 28 | + - **IMPORTANT**: Always use `PAGER=cat` to prevent `gh` from hanging in non-interactive terminals. |
| 29 | + - Command: `PAGER=cat gh pr list --head <branch_name> --json number,title` |
| 30 | +- **Search by Change Description**: Search open PRs using keywords from your change title or description. |
| 31 | + - Command: `PAGER=cat gh pr list --search "<keywords>" --limit 5` |
| 32 | +- **Web Search**: If CLI tools fail, use `search_web` to find the PR on GitHub: |
| 33 | + - Query: `site:github.com/flutter/devtools "Add support for searching within the log details view"` |
| 34 | + |
| 35 | +### 2. Formulate the Entry |
| 36 | +- **Tense**: Always use **past tense** (e.g., "Added", "Improved", "Fixed"). |
| 37 | +- **Punctuation**: Always end entries with a **period**. |
| 38 | +- **Template**: `* <Description>. [#<PR_NUMBER>](https://github.com/flutter/devtools/pull/<PR_NUMBER>)` |
| 39 | +- **Placeholder**: Use `TODO` if you have exhausted all search methods and the PR has not been created yet. |
| 40 | +- **Images**: If adding an image, indent it by two spaces to align with the bullet point, and ensure there is only one newline between the text and the image. |
| 41 | + - Correct Format: |
| 42 | + ```markdown |
| 43 | + - Added support for XYZ. [#TODO](https://github.com/flutter/devtools/pull/TODO) |
| 44 | +  |
| 45 | + ``` |
| 46 | +- **Examples**: |
| 47 | + - `* Added support for XYZ. [#12345](https://github.com/flutter/devtools/pull/12345)` |
| 48 | + - `* Fixed a crash in the ABC screen. [#67890](https://github.com/flutter/devtools/pull/67890)` |
| 49 | + |
| 50 | +### 3. User-Facing Changes Only |
| 51 | +- **Criteria**: Focus on **what** changed for the user, not **how** it was implemented. |
| 52 | +- **Avoid**: Technical details like "Implemented XYZ with a new controller", "Updated the build method", or naming internal classes. |
| 53 | +- **Example (Bad)**: `* Implemented log details search using SearchControllerMixin. [#TODO](https://github.com/flutter/devtools/pull/TODO)` |
| 54 | +- **Example (Good)**: `* Added search support to the log details view. [#TODO](https://github.com/flutter/devtools/pull/TODO)` |
| 55 | + |
| 56 | +### 4. Determine Section |
| 57 | +Match the change to the section in `NEXT_RELEASE_NOTES.md`: |
| 58 | +- `General updates` |
| 59 | +- `Inspector updates` |
| 60 | +- `Performance updates` |
| 61 | +- `CPU profiler updates` |
| 62 | +- `Memory updates` |
| 63 | +- `Debugger updates` |
| 64 | +- `Network profiler updates` |
| 65 | +- `Logging updates` |
| 66 | +- `App size tool updates` |
| 67 | +- `Deep links tool updates` |
| 68 | +- `VS Code sidebar updates` |
| 69 | +- `DevTools extension updates` |
| 70 | +- `Advanced developer mode updates` |
| 71 | + |
| 72 | +### 5. Add to NEXT_RELEASE_NOTES.md |
| 73 | +Use the provided utility script to insert the note safely. The script handles replacing the TODO placeholder if it's the first entry in that section. |
| 74 | + |
| 75 | +```bash |
| 76 | +dart .agents/skills/adding-release-notes/scripts/add_note.dart "Inspector updates" "Added XYZ support" TODO |
| 77 | +``` |
| 78 | + |
| 79 | +### 6. Optional: Images |
| 80 | +Add images to `packages/devtools_app/release_notes/images/` and reference them: |
| 81 | +```markdown |
| 82 | + |
| 83 | +``` |
| 84 | +**Constraint**: Use **dark mode** for screenshots. |
| 85 | + |
| 86 | +## Resources |
| 87 | +- [README.md](../../packages/devtools_app/release_notes/README.md): Official project guidance. |
0 commit comments