feat(instructions): add overlay metadata annotation guidance and skill#17890
feat(instructions): add overlay metadata annotation guidance and skill#17890liunan-ms wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR is documentation-only. It adds guidance and an on-demand skill for annotating Azure Linux overlays with metadata (a category, plus optional provenance/upstreamable fields). It fits the repo's existing .github/instructions/* + .github/skills/* structure, giving agents a canonical reference for the closed set of overlay categories and a workflow to classify overlays, find grounding upstream commits/bugs, and write metadata without changing rendered specs.
Changes:
- New
overlay-metadata.instructions.mddocumenting the 10-valuecategoryset,commits/bugs/upstreamablesemantics, the per-file.overlay.tomlvs. inline TOML forms, and file layout/ordering rules. - New
skill-annotate-overlaysskill defining the classify → hunt-provenance → judge-upstreamability → write → validate workflow. - Registers the new skill in the
AGENTS.mdskills table.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/instructions/overlay-metadata.instructions.md |
New instructions on picking a category and writing overlay metadata; the multi-overlay TOML example misuses spec-remove-subpackage and has a mismatched package value. |
.github/skills/skill-annotate-overlays/SKILL.md |
New skill defining the annotation workflow; references an azldev component diff-sources subcommand that isn't documented or used elsewhere in the repo. |
AGENTS.md |
Adds a skills-table row for the new skill; format is consistent with surrounding rows. |
| # One logical change: drop the maven-local-openjdk21 subpackage. | ||
| [metadata] | ||
| category = "azl-pruning" | ||
|
|
||
| [[overlays]] | ||
| description = "Remove maven-local-openjdk21 %package section — AZL ships no java-21-openjdk" | ||
| type = "spec-remove-subpackage" | ||
| package = "maven-local-openjdk21" | ||
|
|
||
| [[overlays]] | ||
| description = "Remove maven-local-openjdk21 %files section — subpackage above is gone" | ||
| type = "spec-remove-subpackage" | ||
| package = "javapackages-local-openjdk21" |
| azldev component diff-sources -p <name> -q > ./base/build/work/scratch/<name>-diff-before.txt # before edits | ||
| # … move overlays into files / add metadata … | ||
| azldev component diff-sources -p <name> -q > ./base/build/work/scratch/<name>-diff-after.txt # after edits |
9922f66 to
e8a8cc1
Compare
| If any of these turns up the keywords, classify as `azl-disable-flaky-tests`; | ||
| otherwise treat the skipped test as `azl-disable-unsupported-tests`. |
|
|
||
| If any of these turns up the keywords, classify as `azl-disable-flaky-tests`; | ||
| otherwise treat the skipped test as `azl-disable-unsupported-tests`. | ||
| - Fedora→AZL name/path or RHEL-alignment edits → `azl-branding-policy`. |
| URL you discovered and verified is not "inventing" metadata; an unverified guess | ||
| is.** Never fabricate a `bugs` entry. | ||
|
|
||
| Search in this order, stopping at the first that yields a **verifiable** commit: |
| - **Move *all* of a component's overlays into files.** Overlays loaded via | ||
| `overlay-files` are **appended after** any inline overlays left on the | ||
| component, so a partial migration silently moves the file-loaded overlays to the | ||
| end of the sequence. Leave no inline `[[overlays]]` behind (or preserve the | ||
| exact global order via ordinals across both). |
| **Order check without a full render.** If `render` is unavailable (e.g. the mock | ||
| build root is locked in a shared environment), use `diff-sources`, which applies | ||
| the overlays in order and shows the resulting patch. Capture it before and after | ||
| the migration and confirm they are byte-identical — this directly proves the apply | ||
| order was preserved: |
|
|
||
| If `render` fails, re-check the per-file rules in the instructions — common | ||
| mistakes: per-overlay `metadata` in a `.overlay.toml`; a file-level `[metadata]` | ||
| missing `category`; an `overlay-files` glob that matches no files; leftover inline |
| Preserve any explanatory top-of-file comments and the existing `description` text | ||
| verbatim; if a `description` is missing, leave it absent unless the user asks you | ||
| to write one. |
| If you added or modified the overlay's actual behavior (not just metadata), | ||
| follow the normal build + smoke-test protocol in | ||
| [`AGENTS.md`](../../AGENTS.md) and re-run `azldev comp update -p <name>` before | ||
| opening a PR. Metadata-only edits need neither a rebuild nor a lock refresh. |
There was a problem hiding this comment.
This contradiction with what is in AGENTS.md might cause LLM issues. Please resolve.
There was a problem hiding this comment.
update is super fast, really no cost to running it always. I think the suggestion would probably work.
| If you added or modified the overlay's actual behavior (not just metadata), | ||
| follow the normal build + smoke-test protocol in | ||
| [`AGENTS.md`](../../AGENTS.md) and re-run `azldev comp update -p <name>` before | ||
| opening a PR. Metadata-only edits need neither a rebuild nor a lock refresh. |
There was a problem hiding this comment.
This contradiction with what is in AGENTS.md might cause LLM issues. Please resolve.
| @@ -0,0 +1,246 @@ | |||
| --- | |||
| applyTo: "**/*.comp.toml, **/*.overlay.toml" | |||
There was a problem hiding this comment.
Lately I'm a fan of putting as much effort into the skill file as possible. Unfortunately the instruction files are not cross agent (ie claude code won't read them). Skills are generally the globally accepted medium. You can just add a direction here "When doing any of the following: a, b, c, always load skill X"
In this case, maybe two skills if there isn't enough overlap?
Summary
Adds documentation and an on-demand skill for annotating Azure Linux overlays with
metadata(category, provenance, upstreamability).Commits
overlay-metadata.instructions.md— source of truth for the closed set of overlaycategoryvalues, field semantics (commits,bugs,upstreamable), the per-file.overlay.tomlvs. inline TOML forms, and overlay file layout/naming.skill-annotate-overlays— targeted skill that, for new or user-specified overlays, reads each change, suggests a category (with rationale), hunts for grounding upstream commits/bugs, judgesupstreamable, and writes the metadata per the instructions. Registered inAGENTS.md.Key principles
[metadata]block per logical change, with one or more[[overlays]]..overlay.tomllayout for new work, even single-overlay changes.Validation