feat(ai): add component, build, runtime skills - #295
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands azldev’s emitted Agent Skills and instruction wrappers with guidance for common distro workflows (components, overlays, mock-based inspection, and images), and adds tests to prevent documentation drift versus the code-defined schema.
Changes:
- Add new agent-skill content templates covering component add/update/remove, overlays, build/debug, mock-chroot inspection, and images.
- Register the new skills and add new path-scoped instruction wrappers for
*.comp.tomland rendered specs. - Add tests validating binding substitution and drift-guards ensuring the overlays skill documents all schema enum values.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/app/azldev/agentskill/content/update-component.md.tmpl | New skill content documenting comp update workflows (including post-commit render/amend). |
| internal/app/azldev/agentskill/content/remove-component.md.tmpl | New skill content documenting manual component removal workflow and validation steps. |
| internal/app/azldev/agentskill/content/overlays.md.tmpl | New overlays skill content describing overlay types, pitfalls, and metadata expectations. |
| internal/app/azldev/agentskill/content/mock.md.tmpl | New skill content for using azldev adv mock shell for RPM inspection/testing. |
| internal/app/azldev/agentskill/content/image.md.tmpl | New skill content for image build/boot/test/customize and [images.<name>] config. |
| internal/app/azldev/agentskill/content/comp-toml.md.tmpl | New skill content describing component TOML structure and review checklist. |
| internal/app/azldev/agentskill/content/build-component.md.tmpl | New skill content for the render/build/test loop and build debugging flags. |
| internal/app/azldev/agentskill/content/azldev.md.tmpl | Update azldev overview to point readers to the new workflow skills. |
| internal/app/azldev/agentskill/content/add-component.md.tmpl | New skill content documenting component import/add workflow and validation steps. |
| internal/app/azldev/agentskill/agentskill.go | Register new skills and add new instruction wrappers for component TOML and rendered specs. |
| internal/app/azldev/agentskill/agentskill_test.go | Add tests for bindings usage, wrapper emission, and schema-enum drift guards for overlays docs. |
b3b7f2c to
10cffbe
Compare
10cffbe to
f5c9679
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)
internal/app/azldev/agentskill/content/remove-component.md.tmpl:76
- Markdown list continuation indentation is inconsistent in this bullet (line 73 has a different indent than lines 74-76). This can render oddly in some markdown engines; align continuation indentation for the whole list item.
- **Dependents with manual release.** If removing this component forces a change
in a *dependent* (e.g. dropping a `BuildRequires`), and that dependent sets
`release.calculation = "manual"`, bump its release counter yourself in the same
change. Components with automatic release calculation (`auto`, `autorelease`,
`static`) are handled by the normal commit/render/amend cycle.
internal/app/azldev/agentskill/agentskill.go:232
- The instruction title says it targets only
*.comp.toml, but ApplyTo also includescomponents.toml. Updating the title to mention both makes the wrapper accurate wherever it appears.
Title: "Component definition files (`*.comp.toml`)",
internal/app/azldev/agentskill/content/remove-component.md.tmpl:27
- The skill claims
azldev comp queryonly supports local spec sources, but thecomponent querycommand explicitly resolves upstream sources and parses the spec (see internal/app/azldev/cmds/component/query.go:32-37). This sentence is misleading for users trying to inspect reverse dependencies/subpackages before removal.
`azldev comp query` currently supports local spec sources only, not the usual upstream
spec source.
internal/app/azldev/agentskill/agentskill.go:231
- This instruction applies to both
*.comp.tomlandcomponents.toml, but the description text only mentions*.comp.toml. That mismatch can confuse agents/users when the wrapper triggers oncomponents.toml.
This issue also appears on line 232 of the same file.
Description: "These are azldev component definition files (*.comp.toml). Before editing " +
"or reviewing one, load " +
"the azldev-comp-toml skill (and azldev-overlays for spec changes); do not hand-write " +
"component config from memory. Triggers include comp.toml, component config, spec source, " +
"build defines, release calculation, overlays, review component.",
No description provided.