Skip to content

Issue #1085: Prefer AZD pattern modules first, fallback to AVM modules#1092

Merged
jongio merged 11 commits intomicrosoft:mainfrom
jongio:fix/1085-prefer-avm-modules-in-skills
Mar 3, 2026
Merged

Issue #1085: Prefer AZD pattern modules first, fallback to AVM modules#1092
jongio merged 11 commits intomicrosoft:mainfrom
jongio:fix/1085-prefer-avm-modules-in-skills

Conversation

@jongio
Copy link
Collaborator

@jongio jongio commented Mar 2, 2026

Summary

This PR strengthens Azure guidance to prioritize module selection in the order that yields the best customer outcomes:

  1. Use AZD pattern modules first when available
  2. If no AZD pattern exists, use AVM resource modules
  3. Then use AVM utility modules as needed

Why these changes

  • AZD pattern modules are designed and validated for the Azure Developer CLI workflow, so they are more likely to deploy successfully end-to-end for customers.
  • AVM modules provide a strong, supported fallback path when no AZD pattern module exists.
  • This reduces trial-and-error in generated IaC and improves first-run success rates.

References

Scope

  • Guidance updates in azure-prepare and azure-deploy references
  • Added/updated deploy eval coverage for AVM/AZD ordering and fallback behavior
  • Included related test harness compatibility fix already in branch history

Copilot AI review requested due to automatic review settings March 2, 2026 19:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Azure skill guidance and evaluation coverage to prioritize AZD/AVM module selection in a way that aims to improve first-run deployment success.

Changes:

  • Updated azure-prepare / azure-deploy skill descriptions and recipe references to emphasize AVM(+AZD) module selection order and fallback behavior.
  • Added a committed Waza eval suite for azure-deploy (eval spec, trigger tests, and AVM ordering/fallback tasks).
  • Adjusted the integration test agent runner to use a local approveAll permission handler compatible with the current Copilot SDK import surface.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/utils/agent-runner.ts Replaces SDK approveAll import with a locally defined PermissionHandler implementation for sessions.
tests/azure-prepare/snapshots/triggers.test.ts.snap Updates trigger keyword snapshots to reflect the new azure-prepare description text.
tests/azure-deploy/eval/trigger_tests.yaml Adds deploy trigger routing prompts for the new committed azure-deploy eval suite.
tests/azure-deploy/eval/tasks/avm-order-bicep.yaml Adds an eval task intended to validate AVM+AZD pattern-first guidance for Bicep deploy.
tests/azure-deploy/eval/tasks/avm-fallback-no-pattern.yaml Adds an eval task intended to validate AVM fallback behavior when no pattern module exists.
tests/azure-deploy/eval/eval.yaml Adds the main Waza eval spec for azure-deploy with metrics/graders and task globbing.
tests/azure-deploy/snapshots/triggers.test.ts.snap Updates trigger keyword snapshots to reflect the new azure-deploy description text.
tests/README.md Documents azure-deploy as a committed eval suite in the hybrid Waza model.
plugin/skills/azure-prepare/references/recipes/bicep/README.md Links standalone Bicep recipe module guidance to the AVM module ordering rules.
plugin/skills/azure-prepare/references/recipes/azd/terraform.md Adds Terraform-specific AVM module priority guidance and retrieval strategy notes.
plugin/skills/azure-prepare/references/recipes/azd/iac-rules.md Introduces AVM module ordering rules plus a stated docs retrieval/validation plan.
plugin/skills/azure-prepare/references/recipes/azd/README.md Links AZD recipe AVM guidance to the module ordering section.
plugin/skills/azure-prepare/references/recipes/azcli/README.md Links azcli recipe module guidance to the AVM module ordering rules.
plugin/skills/azure-prepare/SKILL.md Refines the skill description to focus on “prepare” scenarios and updates trigger phrasing.
plugin/skills/azure-deploy/references/recipes/bicep/README.md Adds an AVM verification checklist prior to running deployment commands.
plugin/skills/azure-deploy/SKILL.md Refines the skill description and fixes formatting around the references list.

@jongio jongio requested a review from wbreza March 2, 2026 20:18
@jongio jongio self-assigned this Mar 2, 2026
@jongio jongio requested a review from Copilot March 2, 2026 21:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

@jongio
Copy link
Collaborator Author

jongio commented Mar 2, 2026

Addressed the two latest Copilot review threads in commit a4d4d95:

  • Updated azure-prepare frontmatter wording to avoid migration-trigger overlap and use explicit on-premises phrasing while keeping cross-cloud routing to azure-cloud-migrate.
  • Updated azd iac-rules fallback wording to be provider-scoped: if no pattern module exists for the active provider, fallback remains AVM resource -> AVM utility for that provider.

(Inline thread replies via GraphQL addPullRequestReviewComment were blocked by permission in this fork context, so I’m posting confirmation here.)

@jongio jongio force-pushed the fix/1085-prefer-avm-modules-in-skills branch from a4d4d95 to dd3342a Compare March 2, 2026 23:16
Copilot AI review requested due to automatic review settings March 2, 2026 23:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings March 3, 2026 00:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

jongio and others added 7 commits March 2, 2026 17:31
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- narrow azure-prepare trigger wording to avoid migration overlap\n- make fallback wording provider-scoped in iac-rules\n- update azure-prepare trigger snapshots\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- add post-deployment SQL/EF migration step back to azure-deploy workflow\n- restore post-deployment reference link\n- update azure-deploy trigger snapshots\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 3, 2026 01:32
@jongio jongio force-pushed the fix/1085-prefer-avm-modules-in-skills branch from 3a2c664 to 4edc352 Compare March 3, 2026 01:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jongio jongio requested a review from Copilot March 3, 2026 13:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

plugin/skills/azure-prepare/SKILL.md:58

  • The Step 0 routing table omits the highest-priority cross-cloud/AWS/GCP migration routing to azure-cloud-migrate (even though the skill description says cross-cloud should use azure-cloud-migrate). Since Step 0 is the “MANDATORY FIRST ACTION”, leaving this out can cause incorrect first-skill invocation. Add the azure-cloud-migrate row here (or explicitly point to the full routing table as the source of truth, including that row).
**BEFORE starting Phase 1**, check if the user's prompt mentions a specialized technology that has a dedicated skill with tested templates. If matched, **invoke that skill FIRST** — then resume azure-prepare for validation and deployment.

| Prompt keywords | Invoke FIRST |
|----------------|-------------|
| copilot SDK, copilot app, copilot-powered, @github/copilot-sdk, CopilotClient | **azure-hosted-copilot-sdk** |
| Azure Functions, function app, serverless function, timer trigger, HTTP trigger, func new | Stay in **azure-prepare** — prefer Azure Functions templates in Step 4 |
| APIM, API Management, API gateway, deploy APIM | Stay in **azure-prepare** — see [APIM Deployment Guide](references/apim.md) |
| AI gateway, AI gateway policy, AI gateway backend, AI gateway configuration | **azure-aigateway** |

@jongio
Copy link
Collaborator Author

jongio commented Mar 3, 2026

We got a little carried away with trying to fix everything in this PR, so I'm just going to trim it back down to AVM changes only.

jongio and others added 2 commits March 3, 2026 08:28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 3, 2026 16:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jongio jongio requested a review from Copilot March 3, 2026 17:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

@jongio jongio requested a review from JasonYeMSFT March 3, 2026 17:37
@jongio jongio merged commit 7f36450 into microsoft:main Mar 3, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants