Skip to content

Azure App Onboard and Prereq Skill - #2190

Closed
vaibbavis wants to merge 7 commits into
microsoft:mainfrom
vaibbavis:apponboard-stagingforfork
Closed

Azure App Onboard and Prereq Skill#2190
vaibbavis wants to merge 7 commits into
microsoft:mainfrom
vaibbavis:apponboard-stagingforfork

Conversation

@vaibbavis

Copy link
Copy Markdown
Contributor

Description

Checklist

  • Tests pass locally (cd tests && npm test)
  • If modifying skill descriptions: verified routing correctness with integration tests (npm run test:skills:integration -- <skill>)
  • If modifying skill USE FOR / DO NOT USE FOR / PREFER OVER clauses: confirmed no routing regressions for competing skills

Related Issues

Copilot AI review requested due to automatic review settings May 7, 2026 19:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a comprehensive set of BYA (Azure “Build Your App”) reference docs and TypeScript schemas to formalize the prereq → prepare → scaffold → deploy workflow, including validation, self-review, healing, tagging, and CI/CD guidance.

Changes:

  • Introduces scaffold-phase reference docs for IaC generation rules, WAF/self-review checklists, validation/manifest requirements, and healing escalation.
  • Adds prepare/deploy/prereq reference docs for quota/pricing, preflight checks, code deployment patterns, portal links, and handoff protocol.
  • Splits and expands session artifact TypeScript schemas (session-schemas*.ts) to define cross-phase JSON contracts.

Reviewed changes

Copilot reviewed 70 out of 70 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
plugin/skills/azure-bya/scaffold/references/waf-checklist.md Adds WAF-alignment checklist for scaffold self-review.
plugin/skills/azure-bya/scaffold/references/validation-and-manifest.md Defines scaffold validation procedure and manifest writing rules.
plugin/skills/azure-bya/scaffold/references/self-review-procedure.md Adds a sub-agent-driven self-review procedure for layers L1–L4.
plugin/skills/azure-bya/scaffold/references/self-review-checklist.md Adds a detailed 4-layer IaC review checklist (security/pattern/hallucination/WAF).
plugin/skills/azure-bya/scaffold/references/self-healing.md Documents error classification and auto-fix strategies for validation failures.
plugin/skills/azure-bya/scaffold/references/scaffold-healing-rules.md Adds scaffold-specific healing escalation cadence and plan-change rules.
plugin/skills/azure-bya/scaffold/references/rbac-roles.md Introduces common RBAC role GUID reference + Cosmos RBAC rules.
plugin/skills/azure-bya/scaffold/references/mcp-tools.md Documents scaffold-phase MCP tool parameters and usage.
plugin/skills/azure-bya/scaffold/references/iac-generation-rules.md Adds IaC generation constraints (tags, identity, secrets, no azure.yaml, etc.).
plugin/skills/azure-bya/scaffold/references/error-handling.md Adds scaffold error handling matrix.
plugin/skills/azure-bya/scaffold/references/env-var-secrets.md Defines env var derivation and Key Vault secret seeding dependency rules.
plugin/skills/azure-bya/scaffold/references/cicd-pipelines.md Adds CI/CD patterns (GitHub Actions, OIDC) guidance.
plugin/skills/azure-bya/scaffold/references/bicep-patterns.md Adds baseline Bicep structure/naming/tagging and key patterns.
plugin/skills/azure-bya/scaffold/references/bicep-patterns-security.md Adds mandatory Bicep security defaults and examples.
plugin/skills/azure-bya/scaffold/references/bicep-patterns-data.md Adds Bicep module templates for PostgreSQL/Redis.
plugin/skills/azure-bya/scaffold/references/bicep-container-apps.md Adds Container Apps-specific Bicep patterns and pitfalls.
plugin/skills/azure-bya/scaffold/references/bicep-app-service.md Adds App Service-specific Bicep patterns for MI + SCM/FTP policies and deploy strategy.
plugin/skills/azure-bya/references/subscription-resolution.md Adds defensive subscription resolution fallback flow.
plugin/skills/azure-bya/references/session-schemas.ts Adds/updates shared BYA context interfaces.
plugin/skills/azure-bya/references/session-schemas-prepare.ts Adds prepare-plan schema definitions and healing attempt types.
plugin/skills/azure-bya/references/session-schemas-deploy.ts Adds scaffold-manifest + deploy-result schema definitions.
plugin/skills/azure-bya/references/session-protocol.md Defines session creation/resume, login gates, and artifact rules.
plugin/skills/azure-bya/references/service-advisor.md Adds service comparison tables used by architecture Q&A.
plugin/skills/azure-bya/references/pipeline-rules.md Adds cross-cutting pipeline rules (gates, lifecycle, security baseline).
plugin/skills/azure-bya/references/pipeline-rules-runtime.md Adds runtime bug workarounds and operational constraints.
plugin/skills/azure-bya/references/mcp-tool-reference.md Adds shared MCP tool index and global parameter notes.
plugin/skills/azure-bya/references/intent-gathering.md Defines quick probe + scan-informed refinement workflow.
plugin/skills/azure-bya/references/iac-resources.md Adds official docs/resources list for troubleshooting.
plugin/skills/azure-bya/references/handoff-protocol.md Defines handoff output requirements including cleanup commands.
plugin/skills/azure-bya/references/deployment-summary-template.md Adds the deployment summary template and mapping rules.
plugin/skills/azure-bya/references/azd-template-routing.md Adds routing protocol for repos with existing azd templates.
plugin/skills/azure-bya/references/approval-gates.md Defines exact scaffold/deploy approval gate formats and constraints.
plugin/skills/azure-bya/prepare/references/validation-rubric.md Adds prepare-phase validation rubric (4 dimensions).
plugin/skills/azure-bya/prepare/references/sku-matrix.md Adds SKU selection matrix by budget tier.
plugin/skills/azure-bya/prepare/references/service-mapping.md Adds component→service mapping tables and dependencies.
plugin/skills/azure-bya/prepare/references/pricing-guide.md Adds pricing guidance and free-tier shortcuts/caveats.
plugin/skills/azure-bya/prepare/references/naming-patterns.md Adds naming rules and constraints per Azure resource type.
plugin/skills/azure-bya/prepare/references/mcp-tools.md Documents prepare-phase MCP tool parameters and pitfalls.
plugin/skills/azure-bya/prepare/references/deploy-strategy.md Adds deploy strategy selection rules and schema guidance.
plugin/skills/azure-bya/prepare/SKILL.md Adds prepare sub-skill workflow and enforcement rules.
plugin/skills/azure-bya/deploy/references/preflight-checks.md Adds deploy preflight checklist and fail behavior rules.
plugin/skills/azure-bya/deploy/references/portal-links.md Adds robust portal link generation rules (avoid manual encoding).
plugin/skills/azure-bya/deploy/references/mcp-tools.md Documents deploy-phase MCP tools and parameters.
plugin/skills/azure-bya/deploy/references/health-check-patterns.md Adds post-deploy health check patterns and false-positive detection.
plugin/skills/azure-bya/deploy/references/error-classification.md Adds deploy-time error taxonomy and healing trace guidance.
plugin/skills/azure-bya/deploy/references/database-post-deploy.md Adds migration discovery/execution guidance for deployed envs.
plugin/skills/azure-bya/deploy/references/code-deployment-swa.md Adds SWA deployment procedure and Windows-specific pitfalls.
plugin/skills/azure-bya/deploy/references/code-deployment-appservice.md Adds App Service zip deploy procedure and SCM auth lifecycle.
plugin/skills/azure-bya/deploy/references/approval-gate-template.md Adds deploy approval gate display template and handlers.
plugin/skills/azure-bya/deploy/SKILL.md Adds deploy sub-skill workflow and audit/healing rules.
plugin/skills/azure-bya/SKILL.md Updates BYA orchestrator workflow and required reference reads.
plugin/skills/azure-bya-prereq/references/zero-code-path.md Adds starter-project flow for empty workspaces.
plugin/skills/azure-bya-prereq/references/remediation-protocol.md Adds remediation loop rules and artifact update requirements.
plugin/skills/azure-bya-prereq/references/readiness-gate.md Adds readiness gate rules and severity tiers.
plugin/skills/azure-bya-prereq/references/prereq-schemas.ts Adds prereq-output schema definitions.
plugin/skills/azure-bya-prereq/references/prereq-artifacts.md Adds prereq artifact write requirements and warnings persistence.
plugin/skills/azure-bya-prereq/references/error-handling.md Adds prereq error-handling matrix.
plugin/skills/azure-bya-prereq/references/deployability-check.md Adds deployability check steps and routing notes.
plugin/skills/azure-bya-prereq/references/conflict-resolution.md Adds detected-vs-stated conflict resolution rules.
plugin/skills/azure-bya-prereq/references/component-mapping.md Adds component mapping + infra detection + Terraform provider classification rules.
plugin/skills/azure-bya-prereq/references/completeness-check.md Adds completeness checks and deterministic sub-checks.
plugin/skills/azure-bya-prereq/references/build-check.md Adds build check methodology and import→manifest cross-check.
plugin/skills/azure-bya-prereq/SKILL.md Adds prereq sub-skill workflow and evaluation rules.
Comments suppressed due to low confidence (5)

plugin/skills/azure-bya/scaffold/references/validation-and-manifest.md:1

  • The documented validationResult shape and status values do not match the ValidationResult / ValidationCheck schema in session-schemas-deploy.ts (schema uses checks[].passed: boolean and status: "Validated" | "Partial" | "Failed"). Update this reference to emit the schema-correct fields and align the status vocabulary (also remove "Passed" / "Skipped" which aren’t valid per the current interface).
    plugin/skills/azure-bya/scaffold/references/self-review-procedure.md:1
  • The prompt instructs the sub-agent to return layer as 'L1' | 'L2' | 'L3' | 'L4', but SelfReviewFinding.layer is currently typed as number in session-schemas-deploy.ts. Pick one representation and make it consistent across the prompt, checklist docs, and schema (either numeric 1..4 or string labels).
    plugin/skills/azure-bya/scaffold/references/rbac-roles.md:1
  • The tool name azure__documentation appears inconsistent with other references (which mention mcp_azure_mcp_documentation) and the MCP tool indexes included in this PR don’t define either explicitly. Please standardize on the actual tool name exposed in this repo’s MCP tool reference (and update all references accordingly) so the runbook doesn’t direct the agent to call a non-existent tool.
    plugin/skills/azure-bya/references/handoff-protocol.md:1
  • Multiple references assume prepare-plan.json.naming.resourceGroupName, but the NamingConfig interface currently only contains pattern, resourcePrefix, and resources[]. Either (a) add resourceGroupName (and ensure prepare populates it), or (b) update docs to derive the RG name from naming.resources[] (e.g., the type: "resourceGroup" entry) or from context.json.azure.resourceGroup—and make that the consistent contract throughout.
    plugin/skills/azure-bya/references/approval-gates.md:1
  • The gate templates rely on {rg-name} and {region} being readily available from session artifacts, but the schema currently doesn’t provide a single, consistent source in prepare-plan.json (e.g., no naming.resourceGroupName, and deploymentVariables has location but no RG). To prevent downstream ambiguity, consider adding explicit resourceGroupName + region fields to PreparePlan (or NamingConfig / DeploymentVariables) and updating all gate/handoff templates to use those canonical fields.


## MCP Tools

> ⛔ **`pricing_get` requires `--sku` on EVERY call.** For free-tier SKUs, skip the API — see [pricing-guide.md](references/pricing-guide.md).
Comment on lines +44 to +65
export interface PrereqOutput {
// BYAComponent[] — see session-schemas.ts
components: any[];
warnings: string[];
detectedStack: string;
isMonorepo: boolean;
scaffoldedFromScratch: boolean;
/** Prereq-only: auto-approves readiness gate + simplifies prepare alt analysis.
* Does NOT skip any phase, gate, reference read, or validation. */
fastTrackEligible: boolean;
overallHealth?: "ready" | "readyWithCaveats" | "blocked";
/** Build-time requirements detected from manifests and lockfiles */
buildRequirements?: BuildRequirements;
/** Structured recommendations derived from WARN findings.
* Merged into prepare-plan.json.postDeployRecommendations[] by the prepare phase.
* PostDeployRecommendation type — see session-schemas.ts */
postDeployRecommendations?: any[];
/** Non-Azure cloud SDK dependencies mapped to Azure equivalents.
* Populated by prereq when CLOUD_SDK_DEPENDENCY findings are detected.
* Consumed by scaffold to perform inline SDK code swaps. */
cloudSdkSwaps?: CloudSdkSwap[];
}

```powershell
# Enable SCM for zip deploy
az rest --method put --url "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Web/sites/{app}/basicPublishingCredentialsPolicies/scm?api-version=2023-12-01" --body '{"properties":{"allow":true}}'
Comment on lines +11 to +12
📁 **Resource Group:** {prepare-plan.json.naming.resourceGroupName}
🌍 **Region:** {prepare-plan.json.services[0].region}

After IaC deployment creates the Azure resources, deploy application code.

> ⛔ **`--subscription {subscriptionId}` on EVERY `az` command** (from `deploymentVariables.subscriptionId`). Without it, the CLI uses whatever subscription is currently active — which may have changed since the prepare phase. This applies to ALL commands below.
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.

3 participants