Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Prepare applications for Azure deployment by generating infrastructure code, Dockerfiles, and config files.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/analyze.md
1# Analyze Workspace23## ⛔ MANDATORY FIRST — Specialized Technology Delegation45**STOP. Before choosing a mode, check the user's prompt for specialized technology keywords.**6If matched, invoke the corresponding skill **immediately** — it has tested templates and correct SDK usage.78> ⚠️ **Re-entry guard**: If azure-prepare was invoked as a **resume** from a specialized skill (e.g., azure-hosted-copilot-sdk Step 4), **skip this check** and go directly to Step 4.910| User prompt mentions | Action |11|---------------------|--------|12| copilot SDK, copilot app, copilot-powered, copilot-sdk-service, @github/copilot-sdk, CopilotClient, sendAndWait | **Invoke azure-hosted-copilot-sdk skill NOW** → then resume azure-prepare at Step 4 |13| Azure Functions, function app, serverless function, timer trigger, func new | Stay in **azure-prepare**. When selecting compute, **prefer Azure Functions** templates and best practices, then continue from Step 4. |1415> ⚠️ Check the user's **prompt text** — not just existing code. This is critical for greenfield projects with no codebase. See [full routing table](specialized-routing.md).1617If no match, continue below.1819---2021## Three Modes — Always Choose One2223> **⛔ IMPORTANT**: Always go through one of these three paths. Having `azure.yaml` does NOT mean you skip to validate — the user may want to modify or extend the app.2425| Mode | When to Use |26|------|-------------|27| **NEW** | Empty workspace, or user wants to create a new app |28| **MODIFY** | Existing Azure app, user wants to add features/components |29| **MODERNIZE** | Existing non-Azure app, user wants to migrate to Azure |3031## Decision Tree3233```34What does the user want to do?35│36├── Create new application → Mode: NEW37│38├── Add/change features to existing app39│ ├── Has azure.yaml/infra? → Mode: MODIFY40│ └── No Azure config? → Mode: MODERNIZE (add Azure support first)41│42└── Migrate/modernize for Azure43├── Cross-cloud migration (AWS/GCP/Lambda)? → **Invoke azure-cloud-migrate skill** (do NOT continue in azure-prepare)44└── On-prem or generic modernization → Mode: MODERNIZE45```4647## Mode: NEW4849Creating a new Azure application from scratch.5051**Actions:**521. Confirm project type with user532. Gather requirements → [requirements.md](requirements.md)543. Select technology stack554. Update plan5657## Mode: MODIFY5859Adding components/services to an existing Azure application.6061**Actions:**621. Scan existing codebase → [scan.md](scan.md)632. Identify existing Azure configuration643. Gather requirements for new components654. Update plan6667## Mode: MODERNIZE6869Converting an existing application to run on Azure.7071**Actions:**721. Full codebase scan → [scan.md](scan.md)732. Analyze existing infrastructure (Docker, CI/CD, etc.)743. Gather requirements → [requirements.md](requirements.md)754. Map existing components to Azure services765. Update plan7778## Detection Signals7980| Signal | Indicates |81|--------|-----------|82| `azure.yaml` exists | AZD project (MODIFY mode likely) |83| `infra/*.bicep` exists | Bicep IaC |84| `infra/*.tf` exists | Terraform IaC |85| `Dockerfile` exists | Containerized app |86| No Azure files | NEW or MODERNIZE mode |8788---8990## ⛔ MANDATORY for Azure Functions: Load Composition Rules BEFORE Execution9192**If the target compute is Azure Functions**, you MUST load the composition algorithm before generating ANY infrastructure:93941. Load `services/functions/templates/selection.md` — decision tree for base template + recipe952. Load `services/functions/templates/recipes/composition.md` — the exact algorithm to follow963. Use `functions_template_get` MCP tool to list and fetch templates and write `functionFiles[]` + `projectFiles[]` directly — NEVER hand-write Bicep/Terraform and use `azd init -t <template>`/`func init`/`func new` as fallback when composing multiple recipes and required templates are not found9798> ⚠️ **Critical**: The Functions `bicep.md` and `terraform.md` files are **REFERENCE DOCUMENTATION**, not templates to copy. Hand-writing infrastructure from these patterns results in missing RBAC, incorrect managed identity configuration, and security vulnerabilities.99100For other compute targets (Container Apps, App Service, Static Web Apps), load their respective README files in `services/` for guidance.101