Repository navigation
Improve update-skia skill: extract references, add scripts, improve tone - #3574
Merged
Merged
Conversation
Restructure the update-skia skill to reduce SKILL.md from 559 to 428 lines and make error-prone phases impossible to get wrong: References extracted: - references/known-gotchas.md — 10 lessons learned + troubleshooting table - references/typical-changes.md — files changed in a typical update - references/validation-prompt.md — Phase 3 validation agent prompt template Scripts added: - scripts/update-versions.ps1 — Phase 6: Updates ALL version files (VERSIONS.txt, cgmanifest.json, azure-pipelines-variables.yml, SK_C_INCREMENT) and runs mandatory verification greps. Exits non-zero if stale references remain. - scripts/regenerate-bindings.ps1 — Phase 7: Runs generator, PROACTIVELY reverts HarfBuzz bindings, reports diff summary, lists new functions needing wrappers. Tone improvements (per skill-creator guidelines): - Replace commanding caps (MANDATORY/MUST/NEVER) with explanations of WHY - Replace unusable checkbox pre-flight with workflow overview - Explain Phase 8 rationale instead of RE-READ warning - Add version-checking triggers to description Co-authored-by: Copilot <[email protected]>
mattleibow
added a commit
that referenced
this pull request
Jun 11, 2026
Fix SKIASHARP_VERSION yaml missed by the m148 bump (#4144) Context: #4125 Context: #3247 Context: #3574 The m148 milestone bump (#4125) updated every version number in scripts/VERSIONS.txt to 4.148.0 but left scripts/azure-templates-variables.yml at SKIASHARP_VERSION: 4.147.0 — even though that variable's own comment requires it to match the nuget version in VERSIONS.txt. It is a compile-time constant feeding the BUILD_NUMBER counter expression and cannot be derived dynamically, so the stale value silently mismatches the rest of the release. This was not a manual oversight: the update-skia Phase 6 script (.agents/skills/update-skia/scripts/update-versions.ps1) was pointed at a file that no longer exists. #3247 moved SKIASHARP_VERSION out of the deleted scripts/azure-pipelines-variables.yml into scripts/azure-templates-variables.yml (Apr 2025). When the script was authored in #3574 (Mar 2026) it referenced the old, already-deleted filename, and its `Test-Path ... else { skip }` guard made the miss invisible — so the m148 run skipped the file with no error and no gate failure. ~~ The fix ~~ * Bump SKIASHARP_VERSION to 4.148.0 in scripts/azure-templates-variables.yml. * Repoint update-versions.ps1 Step 3 at scripts/azure-templates-variables.yml, replace only the SKIASHARP_VERSION line via a targeted regex, and hard-fail (Write-Error) if the file is missing instead of silently skipping — a future rename now breaks loudly. * Replace the stale-only verification (which merely checked the old milestone number was gone) with a positive assertion that SKIASHARP_VERSION exactly equals the target nuget version. Per GPT-5.5 review the old check would have falsely passed if the value were stuck on a different milestone (e.g. 4.146.0, where the replace is a no-op) or carried a suffix (4.147.0-preview.2 -> 4.148.0-preview.2 no longer contains 147). * Update SKILL.md and references/typical-changes.md to the correct filename. Verified: PowerShell parses clean; simulated the gate against 4.146.0 (fails as expected) and 4.147.0 (passes at 4.148.0). Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructure the
update-skiaskill to reduce SKILL.md from 559→428 lines and make error-prone phases harder to get wrong.Problem
During a recent Skia milestone update, multiple skill phases were executed incorrectly:
maininstead ofskiasharp)Root cause: the skill was 559 lines with reference material, mechanical instructions, and workflow phases all mixed together. The most error-prone phases were prose instructions instead of scripts.
Changes
References extracted (consulted on demand, not always loaded):
references/known-gotchas.md— 10 lessons learned + troubleshooting tablereferences/typical-changes.md— files changed in a typical updatereferences/validation-prompt.md— Phase 3 validation agent prompt templateScripts added (mechanical work that should not be done manually):
scripts/update-versions.ps1— Phase 6: Updates ALL version files and runs verification. Exits non-zero if stale refs remain. Handles VERSIONS.txt, cgmanifest.json, azure-pipelines-variables.yml, SK_C_INCREMENT.scripts/regenerate-bindings.ps1— Phase 7: Runs generator, proactively reverts HarfBuzz, reports new functions needing wrappers.Tone improvements (per skill-creator guidelines):