Repository navigation
Adds skill for generating engine diffs for new releases. - #189869
Conversation
|
@reidbaker how do you like including this and iterating on it? |
|
If it is valuable to you we can add it. Let me give it a review |
| @@ -0,0 +1,69 @@ | |||
| --- | |||
| name: engine-whats-new | |||
| description: Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44). Use when asked to generate what's new in the engine, diff engine releases, or summarize engine changes for a Flutter release. | |||
There was a problem hiding this comment.
Let's be crisp about the formats you want to accept here. Are they tags?
Also I think for now given how infrequently we expect this skill to be used we should say that the skills should be run only when called out by name.
If you want to leave it with the prompts I would ask that you move the skill to a agent for the engine team "engine-agent"
There was a problem hiding this comment.
Let's be crisp about the formats you want to accept here. Are they tags?
That's part of the value I see this skill providing. There is a lot of knowledge that goes into determining a git ref from a semantic version name.
Also I think for now given how infrequently we expect this skill to be used we should say that the skills should be run only when called out by name.
Sounds good, done.
|
|
||
| # Flutter Engine What's New & Diff Skill | ||
|
|
||
| This skill generates a complete diff and structured "What's New" release summary for changes made in the Flutter engine directory (//engine/src/flutter) between a target Flutter release and its predecessor release (e.g., comparing 3.47 to 3.44). |
There was a problem hiding this comment.
This summary section is both common when you ask Gemini based models to author a skills and also un-needed token bloat. Information here needs to be in the description or deleted.
| Execute the Dart script from the Flutter repository root: | ||
|
|
||
| ```bash | ||
| dart .agents/skills/engine-whats-new/scripts/generate_engine_whats_new.dart --release <TARGET_RELEASE> |
There was a problem hiding this comment.
Non blocking but I would encourage you to author this not as a script but as a dart package that has tests. Especially given the complexity
There was a problem hiding this comment.
I want the skill and the script to evolve together. Maybe it will evolve into a script that will have independent value at some point.
|
|
||
| The tool produces two primary artifacts in the repository root: | ||
| 1. **Diff File (`engine_diff_<BASE_RELEASE>_to_<TARGET_RELEASE>.diff`):** The full unified git diff of all changes in //engine/src/flutter between the two releases. | ||
| 2. **Summary Document (`engine_whats_new_<TARGET_RELEASE>.md`):** A categorized Markdown summary covering: |
There was a problem hiding this comment.
If your script is doing the bulk of the work and not the llm running the skill is the script alone valuable enough to check on without the skill?
There was a problem hiding this comment.
The llm provides 2 valuable features:
- Mapping semantic names to git references, example "version 3.47" means
3.47.0-0.1.pretoday. It will be something different in the future. - Summarizes and characterizes the changes outlined by the script. The script is there just to provide a deterministic base for it to summarize from.
| @@ -0,0 +1,69 @@ | |||
| --- | |||
| name: engine-whats-new | |||
There was a problem hiding this comment.
I would expect the llm to be used more in this skill to help with the identification and summarization
There was a problem hiding this comment.
It is providing summarizations, I wanted it to generate a paper trail too though so that it's auditable.
The way I used it was to read the summarization, then look through the generated files to get more information. Wether the summary was helpful was hit or miss and I hope we can refine it.
There was a problem hiding this comment.
Code Review
This pull request introduces a new agent skill and a helper Dart script to generate release summaries and diff files for the Flutter engine. Feedback on the implementation highlights a critical correctness issue where the script incorrectly assumes the engine source code resides within the main Flutter repository. Additionally, suggestions were made to document public members per the style guide, use a Set to eliminate duplicate git ref candidates, and refine the commit categorization logic to prevent false positives from substring matches.
| import 'dart:convert'; | ||
| import 'dart:io'; | ||
|
|
||
| class CommitInfo { |
There was a problem hiding this comment.
The class CommitInfo (and other public members in this file, such as ReleaseAnalysis, findRepoRoot, runGit, etc.) lacks documentation comments. According to the repository style guide, all public members should have documentation using ///.
References
- All public members should have documentation. (link)
| final candidates = <String>[ | ||
| cleanVersion, | ||
| if (!cleanVersion.contains('.')) '3.$cleanVersion.0', | ||
| if (cleanVersion.startsWith('3.') && | ||
| !cleanVersion.contains('-') && | ||
| cleanVersion.split('.').length == 2) | ||
| '$cleanVersion.0', | ||
| 'origin/flutter-$cleanVersion-candidate.0', | ||
| 'flutter-$cleanVersion-candidate.0', | ||
| if (cleanVersion.startsWith('3.')) | ||
| 'origin/flutter-${cleanVersion.split('.').take(2).join('.')}-candidate.0', | ||
| if (cleanVersion.startsWith('3.')) | ||
| 'flutter-${cleanVersion.split('.').take(2).join('.')}-candidate.0', | ||
| 'v$cleanVersion', | ||
| 'v$cleanVersion.0', | ||
| ]; |
There was a problem hiding this comment.
The list of candidates contains duplicate entries when cleanVersion starts with '3.' (e.g., 'origin/flutter-3.47-candidate.0' and 'flutter-3.47-candidate.0' are added twice). Using a Set<String> instead of a List<String> is a cleaner and more efficient way to automatically eliminate duplicates.
| final candidates = <String>[ | |
| cleanVersion, | |
| if (!cleanVersion.contains('.')) '3.$cleanVersion.0', | |
| if (cleanVersion.startsWith('3.') && | |
| !cleanVersion.contains('-') && | |
| cleanVersion.split('.').length == 2) | |
| '$cleanVersion.0', | |
| 'origin/flutter-$cleanVersion-candidate.0', | |
| 'flutter-$cleanVersion-candidate.0', | |
| if (cleanVersion.startsWith('3.')) | |
| 'origin/flutter-${cleanVersion.split('.').take(2).join('.')}-candidate.0', | |
| if (cleanVersion.startsWith('3.')) | |
| 'flutter-${cleanVersion.split('.').take(2).join('.')}-candidate.0', | |
| 'v$cleanVersion', | |
| 'v$cleanVersion.0', | |
| ]; | |
| final Set<String> candidates = <String>{ | |
| cleanVersion, | |
| if (!cleanVersion.contains('.')) '3.$cleanVersion.0', | |
| if (cleanVersion.startsWith('3.') && | |
| !cleanVersion.contains('-') && | |
| cleanVersion.split('.').length == 2) | |
| '$cleanVersion.0', | |
| 'origin/flutter-$cleanVersion-candidate.0', | |
| 'flutter-$cleanVersion-candidate.0', | |
| if (cleanVersion.startsWith('3.')) | |
| 'origin/flutter-${cleanVersion.split('.').take(2).join('.')}-candidate.0', | |
| if (cleanVersion.startsWith('3.')) | |
| 'flutter-${cleanVersion.split('.').take(2).join('.')}-candidate.0', | |
| 'v$cleanVersion', | |
| 'v$cleanVersion.0', | |
| }; |
| String categorizeCommit(String title) { | ||
| final String lower = title.toLowerCase(); | ||
|
|
||
| if (title.startsWith('Roll Skia') || | ||
| title.startsWith('Roll Dart SDK') || | ||
| title.startsWith('Roll ICU') || | ||
| title.startsWith('Roll HarfBuzz') || | ||
| title.startsWith('Roll ANGLE') || | ||
| lower.contains('roll skia') || | ||
| lower.contains('roll dart sdk') || | ||
| lower.contains('roll icu')) { | ||
| return '🔄 Dependency Rolls'; | ||
| } | ||
|
|
||
| if (lower.contains('impeller') || | ||
| lower.contains('ubersdf') || | ||
| lower.contains('flutter gpu') || | ||
| lower.contains('display_list') || | ||
| lower.contains('displaylist') || | ||
| lower.contains('vulkan') || | ||
| lower.contains('metal') || | ||
| lower.contains('opengl') || | ||
| lower.contains('shader') || | ||
| lower.contains('render') || | ||
| lower.contains('flow')) { | ||
| return '🚀 Impeller & Graphics Rendering'; | ||
| } | ||
|
|
||
| if (lower.contains('[web]') || | ||
| lower.contains('web_ui') || | ||
| lower.contains('web_sdk') || | ||
| lower.contains('wasm') || | ||
| lower.contains('skwasm') || | ||
| lower.contains('html') || | ||
| lower.contains('canvaskit')) { | ||
| return '🌐 Web Engine & Wasm'; | ||
| } | ||
|
|
||
| if (lower.contains('[android]') || | ||
| lower.contains('android') || | ||
| lower.contains('agp') || | ||
| lower.contains('gradle') || | ||
| lower.contains('embedding/engine')) { | ||
| return '📱 Android Embedding'; | ||
| } | ||
|
|
||
| if (lower.contains('[ios]') || | ||
| lower.contains('[macos]') || | ||
| lower.contains('[darwin]') || | ||
| lower.contains('darwin') || | ||
| lower.contains('ios') || | ||
| lower.contains('macos') || | ||
| lower.contains('xcode') || | ||
| lower.contains('metalview')) { | ||
| return '🍎 iOS & macOS Embeddings'; | ||
| } | ||
|
|
||
| if (lower.contains('[windows]') || | ||
| lower.contains('[linux]') || | ||
| lower.contains('windows') || | ||
| lower.contains('linux') || | ||
| lower.contains('win32') || | ||
| lower.contains('embedder')) { | ||
| return '🪟 Windows & Linux Desktop Embeddings'; | ||
| } | ||
|
|
||
| if (lower.contains('[a11y]') || | ||
| lower.contains('semantics') || | ||
| lower.contains('accessibility') || | ||
| lower.contains('typography') || | ||
| lower.contains('txt') || | ||
| lower.contains('font') || | ||
| lower.contains('text input') || | ||
| lower.contains('autofill')) { | ||
| return '🔤 Text, Typography & Accessibility'; | ||
| } | ||
|
|
||
| if (lower.contains('[ci]') || | ||
| lower.contains('ci:') || | ||
| lower.contains('build.gn') || | ||
| lower.contains('tools') || | ||
| lower.contains('testing') || | ||
| lower.contains('header_guard') || | ||
| lower.contains('license') || | ||
| lower.contains('format')) { | ||
| return '🛠️ Build System, CI & Tooling'; | ||
| } | ||
|
|
||
| return '⚙️ Core Runtime & Shell'; | ||
| } |
There was a problem hiding this comment.
The categorizeCommit function has several redundancies and potential false positives:
-
Redundancies:
title.startsWith('Roll Skia')etc. are redundant becauselower.contains('roll skia')is already checked.lower.contains('[android]')is redundant becauselower.contains('android')is checked.- Same for
[ios],[macos],[darwin],[windows],[linux].
-
False Positives:
lower.contains('flow')matches "workflow" (very common in CI/tooling), causing CI commits to be miscategorized under "Impeller & Graphics Rendering".lower.contains('format')matches "information" and "transformation", causing general commits to be miscategorized under "Build System, CI & Tooling".
Using RegExp with word boundaries (\b) resolves these false positives elegantly.
String categorizeCommit(String title) {
final String lower = title.toLowerCase();
if (lower.contains('roll skia') ||
lower.contains('roll dart sdk') ||
lower.contains('roll icu') ||
lower.contains('roll harfbuzz') ||
lower.contains('roll angle')) {
return '🔄 Dependency Rolls';
}
if (lower.contains('impeller') ||
lower.contains('ubersdf') ||
lower.contains('flutter gpu') ||
lower.contains('display_list') ||
lower.contains('displaylist') ||
lower.contains('vulkan') ||
lower.contains('metal') ||
lower.contains('opengl') ||
lower.contains('shader') ||
lower.contains('render') ||
RegExp(r'\bflow\b').hasMatch(lower)) {
return '🚀 Impeller & Graphics Rendering';
}
if (lower.contains('web_ui') ||
lower.contains('web_sdk') ||
lower.contains('wasm') ||
lower.contains('skwasm') ||
lower.contains('html') ||
lower.contains('canvaskit') ||
RegExp(r'\bweb\b').hasMatch(lower)) {
return '🌐 Web Engine & Wasm';
}
if (lower.contains('android') ||
lower.contains('agp') ||
lower.contains('gradle') ||
lower.contains('embedding/engine')) {
return '📱 Android Embedding';
}
if (lower.contains('darwin') ||
lower.contains('ios') ||
lower.contains('macos') ||
lower.contains('xcode') ||
lower.contains('metalview')) {
return '🍎 iOS & macOS Embeddings';
}
if (lower.contains('windows') ||
lower.contains('linux') ||
lower.contains('win32') ||
lower.contains('embedder')) {
return '🪟 Windows & Linux Desktop Embeddings';
}
if (lower.contains('semantics') ||
lower.contains('accessibility') ||
lower.contains('typography') ||
lower.contains('txt') ||
lower.contains('font') ||
lower.contains('text input') ||
lower.contains('autofill') ||
RegExp(r'\ba11y\b').hasMatch(lower)) {
return '🔤 Text, Typography & Accessibility';
}
if (lower.contains('build.gn') ||
lower.contains('tools') ||
lower.contains('testing') ||
lower.contains('header_guard') ||
lower.contains('license') ||
RegExp(r'\bci\b').hasMatch(lower) ||
RegExp(r'\bformat\b').hasMatch(lower)) {
return '🛠️ Build System, CI & Tooling';
}
return '⚙️ Core Runtime & Shell';
}|
I still think the repo would be better off with the script as a package but approving to unblock. Thank you for responding to my feedback. |
flutter/flutter@2a2a79d...b65f4d9 2026-07-24 [email protected] Add dart_runtime_service_vm_aot.dart.snapshot to the snapshot list in the macOS code signing configuration (flutter/flutter#189981) 2026-07-24 [email protected] Roll Fuchsia Test Scripts from wLST_A-xfOeGT_5mj... to E8hJ1AfK8CtGtaES0... (flutter/flutter#189956) 2026-07-23 [email protected] Consolidate AndroidArch and DarwinArch into CpuArch (flutter/flutter#189315) 2026-07-23 [email protected] Roll Dart SDK from 9258584f98b8 to e3fc57eae9eb (7 revisions) (flutter/flutter#189949) 2026-07-23 [email protected] [flutter_tools] Do not always wait for the full timeout when running Spotlight to locate Android Studio on macOS (flutter/flutter#189952) 2026-07-23 [email protected] Roll Skia from 1d8bf9270d8c to 6e9c4687c001 (15 revisions) (flutter/flutter#189954) 2026-07-23 [email protected] [flutter_tools] Initialize Cache.flutterRoot at the start of the upgrade_test suite (flutter/flutter#189937) 2026-07-23 [email protected] Parse AndroidX property in gradle.properties (flutter/flutter#188372) 2026-07-23 [email protected] [Impeller]Use the IO context for OpenGL program setup (flutter/flutter#185723) 2026-07-23 [email protected] Allow building projects lacking Runner.xcworkspace (flutter/flutter#186239) 2026-07-23 [email protected] [flutter_tools] Invalidate WebEntrypointTarget when plugin set changes (flutter/flutter#189460) 2026-07-23 [email protected] Bump devtools_shared to 13.1.0 (flutter/flutter#189507) 2026-07-23 [email protected] forceNdkDownload should skip configuring cmake when ndk-build is used (flutter/flutter#187201) 2026-07-23 [email protected] Disable execution order shuffling for the flutter_tools upgrade_test suite (flutter/flutter#189920) 2026-07-23 [email protected] Move WindowManager outside of WidgetsApp (flutter/flutter#188866) 2026-07-23 [email protected] Roll Skia from 3424966b8a2b to 1d8bf9270d8c (3 revisions) (flutter/flutter#189901) 2026-07-23 [email protected] Roll Fuchsia Linux SDK from GswhlPRO-D1qSNclx... to 9org0yL3yZkp80x5S... (flutter/flutter#189898) 2026-07-23 [email protected] Remove outdated logs that were added to track #172636 (flutter/flutter#189282) 2026-07-23 [email protected] Roll Skia from 5e183e5aeac5 to 3424966b8a2b (33 revisions) (flutter/flutter#189890) 2026-07-23 [email protected] [examples] Use super parameters in missed spots (flutter/flutter#186194) 2026-07-23 [email protected] [flutter_tools] Bound Spotlight mdfind execution with timeout on macOS (flutter/flutter#189461) 2026-07-23 [email protected] Fix non primary buttons not being captured on windows (flutter/flutter#188394) 2026-07-22 [email protected] Listen to log reader before VM Service and make delay configurable (flutter/flutter#187202) 2026-07-22 [email protected] Roll Dart SDK from 1e65011ee004 to 9258584f98b8 (7 revisions) (flutter/flutter#189883) 2026-07-22 [email protected] Adds skill for generating engine diffs for new releases. (flutter/flutter#189869) 2026-07-22 [email protected] [ios,macos] Add Swift Sourcekit LSP support (flutter/flutter#189761) 2026-07-22 [email protected] [iOS] Mark DisplayLinkManager.shared and init() @mainactor (flutter/flutter#189815) 2026-07-22 [email protected] Fix `Rect::ExpandToMinTransformedSize` to return the input rectangle when no expansion is needed, and remove 1-pixel roundrect to rect simplification (flutter/flutter#189808) 2026-07-22 [email protected] Skip emulator.getEmulators test (flutter/flutter#189879) 2026-07-22 [email protected] Fix null terminator in input truncates clipboard (flutter/flutter#188652) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Adds a skill for generating a "what's new" for the flutter engine across branches. This skill wasn't able to generate the information directly needed for a blog post but it was informative to writing highlights for a blog post. It's probably worth checking this in and trying to refine it further in the future.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.