azure-app-onboard-prereq

作者: microsoft

評估原始碼是否已準備好部署到 Azure——這是在基礎設施工作之前進行的檢查。評估建置健康狀態、應用程式完整性、相依性及本機…

npx skills add https://github.com/microsoft/skills --skill azure-app-onboard-prereq

Azure App Onboard Prereq — Repository Evaluation

Evaluate a user's repository for build health, app completeness, and Azure deployment feasibility — before infrastructure planning. Produces per-component verdicts (PASS/WARN/FAIL) consumed by downstream phases.

Orchestrator relationship: Called by azure-app-onboard at Step 3, or standalone for code readiness checks. When called by orchestrator, return control to azure-app-onboard after writing artifacts — do NOT invoke downstream phases directly.

Phase 1 of 4 in AppOnboard pipeline. Session: .copilot-azure/sessions/{session-id}/. Reads context.json. Writes components[], repo{}, detectedInfra[]. Produces prereq-output.json. Schema: prereq-schemas.tsPrereqOutput, BuildRequirements. Direct entry supported.

When NOT to Use

SignalRedirect
Validate infrastructure (Bicep/TF/azure.yaml)azure-validate
Generate IaCazure-prepare
End-to-end idea-to-productionazure-app-onboard
Run azd up or deployazure-deploy

Rules

ABSOLUTE PROHIBITION — npm install, npm test, npx jest, pytest, and ALL install/build/test commands are NEVER allowed. Under NO circumstances may you run npm install, npm test, npx jest, pip install, pytest, dotnet build, dotnet restore, dotnet test, go mod download, cargo build, or ANY package-manager install, build, or test command during the prereq phase. Do NOT run test suites to verify code — check for test config files statically instead. The prereq phase is read-only evaluation + static-only verification. ONLY exception — two sanctioned contexts, both consent-gated: (a) code the agent modified during migration/remediation (see remediation-protocol.md step 6), or (b) code the agent wrote from scratch on the zero-code path (see zero-code-path.md). In either case, install/build/test runs ONLY via the user-confirmed build-validation gate (build-check.md Step 3), after the user answers that specific per-command consent prompt. General prior consent never counts.

  1. Full pipeline (Steps 1–8), no exceptions. All prompts → Step 1 directly. Answer specific questions AS PART OF findings (Step 5), not before.
  2. No sub-agents for evaluation. 3-axis evaluation is inline. Exception: zero-code-path scaffolding (Step 2).
  3. Code/destructive modifications require ask_user. Max 3 questions before results. Direct entry: don't repeat orchestrator's intent questions.

MCP Tools

ToolPurpose
mcp_azure_mcp_get_azure_bestpracticesValidate detected stack patterns against Azure best practices
mcp_azure_mcp_extension_cli_installCheck/install required CLI tools (az, azd, func)

Workflow

Step 1: Session Check

Orchestrator entry: Session exists — read context.json, proceed to Step 2.

Direct entry: Check .copilot-azure/sessions/active-session.json:

  • Exists → ⛔ read session-protocol.md for resume/fresh gate. Do NOT proceed until user answers.
  • Missing → create session: generate UUID, New-Item -ItemType Directory -Path ".copilot-azure/sessions/{uuid}" -Force, write context.json + active-session.json via create tool.

Then: az account show → merge {id, name, tenantId} into context.json.azure. ⛔ Session MUST exist on disk before any scanning.

Step 2: Scan Workspace

Scan for project files. Detect components, repo{}, detectedInfra[], detectedServices[]. Classify Terraform providers. Check CLI availability. Stack detection conflicts: user explicit statement wins (write to context.json, mark scan as override); scan-only → confirm with user; multiple stacks → show all and ask (see component-mapping.md); no code → zero-code-path.md.

If no project files, no Dockerfile, AND no index.html → ⛔ read zero-code-path.md.

Cloud SDK early gate. Grep for aws-sdk|@aws-sdk|boto3|google-cloud|@google-cloud|firebase. If functional deps found → read cloud-sdk-migration.md, then ask_user: "Redirect to Azure Cloud Migrate" (set routeToSkill: "azure-cloud-migrate") · "Continue evaluation anyway" (finish readiness eval + SDK→Azure mapping, then STOP at Step 8 — no plan until the deps are swapped) · "Cancel".

Step 3: Per-Component Evaluation

Sub-stepActionReference
3.1Build checkYou MUST read build-check.md
3.2Completeness checkYou MUST read completeness-check.md
3.3Deployability checkYou MUST read deployability-check.md
3.3aComponent mapping (conditional)Read component-mapping.md ONLY IF >1 project manifest found (monorepo)

Populate buildRequirements per component after evaluation. Verdict propagation, tier rules, and f1Viable aggregation are in readiness-gate.md and the individual check references.

Step 4: Write Artifacts + Readiness Gate

⛔ Verify context.json exists on disk. Read readiness-gate.md (verdicts, tiers, batch-then-approve, fast-track) then prereq-artifacts.md (write procedures, schemas).

Step 5: Present Findings

Per readiness-gate.md § Present Findings — show verdicts grouped by severity before proceeding.

Step 6: Remediation (conditional)

You MUST read remediation-protocol.md IF any ❌ FAIL verdict, 🔧 Recommended Fix, or ⚠️ WARN with fixPhase: "prereq" exists. Contains remediation loop, static verification, re-eval mandate, post-remediation artifact updates, and the build-validation consent gate. If all verdicts are ✅ PASS or ⚠️ WARN without fixPhase: "prereq", skip to Step 7.

Step 7: Write Final State

completedPhases already has "prereq" + currentPhase: null (from Step 4). Then:

Write lastScanCommit. Run git rev-parse HEAD and store the full 40-character SHA as context.json.repo.lastScanCommit. Required — staleness guard in Step 1 compares to HEAD on resume to detect changes.

Step 8: Route

Mandatory — do NOT skip this step.

Routing fields: All routing writes routeToSkill and routeReason to context.json.

Post-remediation context: If Step 6 ran, lead the routing prompt with: "Remediation complete — {N} issues fixed, your app is now {overallHealth}."

Evaluate rows top to bottom — first match wins.

#ConditionAction
1routeToSkill set (any entry)ask_user: "Redirect to {routeToSkill}" / "Not now". ⛔ Pipeline stops — do NOT proceed to architecture planning.
2cloudSdkFindings[] non-empty (user chose "Continue evaluation anyway")Present the cloud-SDK → Azure swap mapping as 🔶 blockers, then ask_user with this exact prompt: "🔶 Cloud SDK migration required — these dependencies must be swapped before this app can deploy to Azure. (Redirect to azure-cloud-migrate / Stop — swap manually and re-run)" — Redirect sets routeToSkill: "azure-cloud-migrate", Stop halts. ⛔ Pipeline stops — do NOT proceed to architecture planning, and do NOT offer a "continue to prepare" option; the app can't deploy until the deps are swapped.
3Orchestrator + no routeToSkillTell the user: "✅ Your app has been evaluated and is ready — let's plan your Azure deployment." Then invoke azure-app-onboard. ⛔ Do NOT stop, do NOT wait for user input, do NOT narrate internal handoffs. The user already consented to the full pipeline at scope triage.
4Direct + ready/readyWithCaveats + no Azure infraask_user: "Deploy to Azure (full pipeline)" → invoke azure-app-onboard / "Not now"
5Direct + ready/readyWithCaveats + existing Azure infraask_user: "Start fresh" → invoke azure-app-onboard / "Use existing infra" → invoke azure-prepare / "Not now"
6Direct + blockedReport blocker summary + "Fix and re-run."

Severity tiers (🛑🔶❌🔧⚠️✅) are defined in readiness-gate.md.

Outputs

ArtifactLocationConsumer
Session contextcontext.jsoncomponents[], repo{}, detectedInfra[], detectedServices[]All downstream phases
Prereq outputprereq-output.jsonprepare phase (via azure-app-onboard)
Readiness report.copilot-azure/sessions/{uuid}/readiness-report.mdUser (offline reference)

來自 microsoft 的更多技能

oss-growth
microsoft
開源增長駭客角色
agent-framework-azure-ai-py
microsoft
使用Microsoft Agent Framework Python SDK(agent-framework-azure-ai)构建Azure AI Foundry代理。适用于使用AzureAIAgentsProvider创建持久化代理、使用托管工具(代码解释器、文件搜索、网络搜索)、集成MCP服务器、管理对话线程或实现流式响应。涵盖函数工具、结构化输出和多工具代理。
development
airunway-aks-setup
microsoft
在AKS上設定AI Runway——從裸叢集到執行模型。涵蓋叢集驗證、控制器安裝、GPU評估、供應商設定及首次部署。時機:「設定AI Runway」、「上線AKS叢集」、「安裝AI Runway」、「airunway設定」、「部署模型至AKS」、「在AKS上進行GPU推論」、「在AKS上設定KAITO」、「在AKS上執行LLM」、「在AKS上使用vLLM」、「在AKS上設定模型服務」、「AI Runway控制器」。
devops
appinsights-instrumentation
microsoft
使用Azure Application Insights檢測Web應用程式的指南。提供遙測模式、SDK設定與組態參考。適用時機:如何檢測應用程式、App Insights SDK、遙測模式、什麼是App Insights、Application Insights指南、檢測範例、APM最佳實踐。
devops
applicationinsights-web-ts
microsoft
使用Application Insights JavaScript SDK(@microsoft/applicationinsights-web)為瀏覽器/Web應用程式進行檢測。適用於真實使用者監控(RUM)——頁面檢視、點擊、AJAX/fetch依賴、例外、自訂事件,以及與後端OpenTelemetry追蹤關聯的瀏覽器端GenAI代理追蹤。涵蓋SDK載入器指令碼與npm設定、框架擴充(React、React Native、Angular)、點擊分析、遙測初始化器,以及從瀏覽器發出的代理/工具/模型span的OTel GenAI語意慣例。
devops
azure-ai-anomalydetector-java
microsoft
使用適用於 Java 的 Azure AI 異常偵測器 SDK 建置異常偵測應用程式。在實作單變量/多變量異常偵測、時間序列分析或 AI 驅動監控時使用。
development
azure-ai-language-conversations-py
microsoft
使用 azure-ai-language-conversations Python SDK 實作對話語言理解(CLU)。當使用 ConversationAnalysisClient 分析對話意圖與實體、建置 NLP 功能,或將語言理解整合至應用程式時使用。
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python。用於機器學習工作區、作業、模型、資料集、計算資源與管線。 觸發詞:「azure-ai-ml」、「MLClient」、「workspace」、「model registry」、「training jobs」、「datasets」。
development