feature: Rework azure-prepare to be script-based#2814
Conversation
Copy the azure-prepare skill to azure-prepare-script and replace the LM-driven workflow with a PowerShell state-machine driver (scripts/prepare.ps1). The script owns <repo>/.azure-prepare/prepare-info.json, collects what it can programmatically, and emits NEXT ACTION blocks telling the LM what to provide. SKILL.md becomes a thin driver. Register the skill in tests/skills.json. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the workspace-analysis orchestration (mode selection, decision tree, detection signals, specialized-tech delegation, and Azure Functions composition mandate) from references/analyze.md into the specialized-check, analyze, and generate steps of scripts/prepare.ps1. Delete analyze.md and track conversion progress in references-to-convert.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold requirements.md into the requirements step (classification/scale/budget implications plus a new compliance field) and move its Azure Policy enforcement check into the azure-context step as a new input.policyConstraints need. Fold scan.md into the scan step (component-type classification, pure-static-site and Aspire caveats) and add programmatic detection of Aspire, Azure Functions, pure-static sites, GitHub Actions, and Azure Pipelines to Invoke-AutoCollect. Render Compliance and a Policy Constraints section in the generated plan. Delete both references, drop their SKILL.md index links, and update the conversion checklist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the recipe decision tree (special-case Aspire, default AZD, decision criteria, and auto-detection mapping) into the recipe step of prepare.ps1. Add Get-ProposedRecipe plus azure.yaml IaC-provider detection in Invoke-AutoCollect, and compute auto.suggestedRecipe in the recipe step so the LM confirms rather than derives the recipe. Expand the recipe enum to distinguish AZD (Bicep) from AZD (Terraform) and point the step refs at the per-recipe READMEs. Delete recipe-selection.md, drop its SKILL.md index link, and check it off the conversion list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the architecture decision content into the architecture step of prepare.ps1: stack selection (Containers/Serverless/App Service), Container Apps vs AKS criteria with the azure-kubernetes delegation, hosting/data/ integration service mappings, the Durable Functions + Durable Task Scheduler backend mandate, and the always-include supporting services. Add a rationale field to the architecture mapping objects. Delete architecture.md, drop its SKILL.md index link, and check it off the conversion list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the subscription/location detect-confirm-apply flow into the azure-context step: existing AZD environment reuse, defaults precedence, subscription confirmation showing actual name+id, region confirmation gated on service availability, a cross-reference to the quota step, and the critical azd env apply (azd env set AZURE_SUBSCRIPTION_ID/AZURE_LOCATION). Add Get-AzdContext to Invoke-AutoCollect (azd defaults + current env values, env call guarded by azure.yaml presence) and prefer it for auto.suggestedSubscription. Add an input.azdEnvName need. Delete azure-context.md, swap the SKILL.md index link to region-availability.md, and check it off the conversion list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reference is strictly informational (limits catalog, az quota CLI reference, service patterns, error tables, best practices, worked example) with actual quota checking delegated to the azure-quotas skill, so move it under scripts/references/ rather than fold it. Point the quota step's detail ref at the new path and add the core mandates inline (CLI-first, one resource type at a time, BadRequest -> Resource Graph fallback, Available = Limit - Usage). Check it off the conversion list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the component-research process into the research step: the 9-step progressive-loading procedure, the service-to-reference/related-skill routing map, and the special-scenario skill routing (Copilot SDK, Azure Functions composition mandate, App Insights, Foundry, cost). Point the step's detail ref at region-availability.md; per-service detail stays under references/services/. Delete research.md, drop its SKILL.md index link, and check it off the list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fold the artifact-generation procedure into the generate step: the Aspire detect-first mandate (azd init --from-code, never hand-author azure.yaml), other special patterns, generation order and layout, the mkdir-before-create caveat, and the mandatory security requirements (Entra-only SQL, SQL+MI postprovision hook, azd-service-name tag, no secrets). Preserve the existing Functions composition block and point the step refs at the per-recipe READMEs. Delete generate.md, drop its SKILL.md index link, and check it off the list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…list 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>
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>
…andates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rface list Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… infra scaffolding Move the entire references/recipes/ tree (13 files) under scripts/references/ as on-demand informational references, and update the recipe/generate step ref paths accordingly. Add a New-RecipeScaffold function that deterministically creates infra/ and infra/modules/ plus a recipe-appropriate parameters stub (main.parameters.json for Bicep/AZCLI, main.tfvars.json for AZD Terraform), wired into the generate step via an auto block. Surface MCP best-practice research calls inline in the generate guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the strictly-informational Node.js/Express production configuration reference under scripts/references/runtimes/ and update the two generate-step ref paths in prepare.ps1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the entire sdk/ tree (8 SDK quick-reference files) under scripts/references/sdk/ and update the SKILL.md reference index paths. This also fixes the relative ../auth-best-practices.md links in the identity references, which now resolve to the moved auth-best-practices.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The driver now emits SDK reference paths in the NEXT ACTION block instead of relying on the SKILL.md index. Add a dynamicRefs step field (merged with static refs at output time) plus Get-SdkLanguageCodes / Test-ArchitectureUsesService helpers. The generate step surfaces azd-deployment.md (AZD recipes) and the language-appropriate azure-appconfiguration reference when App Configuration is in the architecture; the security step surfaces the per-language azure-identity reference. Remove the now-redundant SDK line from the SKILL.md reference index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…m the script Move the entire references/services/ tree (121 files) under scripts/references/ and repoint every services path the driver emits (architecture, research, and generate guidance) to scripts/references/services/. Add Get-ServiceReadmeRefs and wire it into the research step's dynamicRefs so the script names the exact per-service README for each service in the architecture instead of a <service> placeholder. Remove the now-redundant Reference Index section from SKILL.md (the script owns all reference routing). The services tree is informational deep reference material; app-code templates remain LM-generated, so no new deterministic work was extracted beyond the existing infra scaffold. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete the references-to-convert.md tracking checklist (all references folded or moved), copy the azure-prepare description into azure-prepare-script so it routes on the same trigger phrases, and bump its version to 2.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the original LM-workflow azure-prepare skill; it is being replaced by the script-driven azure-prepare-script skill (renamed to azure-prepare next). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the skill directory to azure-prepare (replacing the deleted original), update the frontmatter name, the workflow/self references, and the script's NEXT ACTION / COMPLETE output banners to match the new name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The script-driven skill was renamed to azure-prepare; drop the now-duplicate azure-prepare-script entries from the skills list and the integration-test schedule slot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add scripts/prepare.sh, a Bash port of the PowerShell state-machine driver (prepare.ps1). It mirrors every function using Bash naming conventions and the jq-based state model, producing identical NEXT ACTION / COMPLETE output and the same prepare-info.json structure so either script is interchangeable. Update SKILL.md to reference both prepare.sh and prepare.ps1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
prepare.sh (1416->92 lines) and prepare.ps1 (1409->82 lines) are now thin entry points that source helper modules from scripts/lib/. The bulk (state model, auto-collection, plan generation, reference resolution, step definitions, guidance text, output emitters) moved verbatim into per-concern lib files, sourced via BASH_SOURCE / $PSScriptRoot. Motivation: an integration test showed the agent declined to read the 66 KB prepare.sh and bypassed the state machine. The entry points are now ~90 readable lines; SKILL.md notes the script is meant to be executed, not read. Behavior is unchanged: sourcing/dot-sourcing is equivalent to inlining, and the lib bodies reproduce the original moved lines byte-for-byte. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…gate Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sts" The azure-context guidance told the LM to run `azd env new` during planning, before any `azure.yaml`/azd project existed, causing repeated "no project exists; run azd init" failures across DTS, prepare-deployment, and the functions-template-mcp tests. Move the azd environment setup into the scripts: a new apply_azd_environment / Apply-AzdEnvironment helper creates/selects the env and applies subscription + location, guarded by the existence of azure.yaml, and runs in the generate step's onDone hook (after artifacts are generated). Records the outcome under auto.azdEnv. Drops the input.azdEnvName LM need and rewrites the azure-context step 6 guidance to say the script handles it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…d PowerShell drivers Extract the 13 duplicated per-step LM guidance blocks out of guidance.sh (Bash here-strings) and steps.ps1 (PowerShell here-strings) into shared plain-text files under scripts/lib/guidance/<step-id>.txt. guidance.sh now exposes step_guidance() as a thin file loader; steps.ps1 adds Get-StepGuidance() and output.ps1 calls it. Both drivers render byte-identical guidance (verified across all 13 steps). Pin the shared .txt files to LF since the Bash driver reads them. guidance.sh 27KB -> <1KB; steps.ps1 37KB -> 10.5KB; no behavior change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Discover enforced Azure Policy assignments programmatically from the azure-context step's onDone hook (get_policy_constraints / Get-PolicyConstraints) once the subscription is confirmed, recording them under auto.policyConstraints. The LM no longer queries Azure Policy itself; guidance is trimmed accordingly and the deployment-plan renderer reads auto.policyConstraints (falling back to input.policyConstraints). Adds no extra script invocation. Also fix a state-merge bug where invoke_auto_collect / Invoke-AutoCollect replaced the entire auto object each run, wiping auto.* keys set by earlier onDone hooks; collector output now merges over existing auto keys. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enumerate subscriptions once inside the azure-context auto step instead of having the LM run az account list. When exactly one subscription exists it is auto-confirmed into input.subscription; when several exist, the list is cached to a separate subscriptions.json file (keeping prepare-info.json small) and the state records only a pointer plus count for the LM to read on demand. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Capture the signed-in principal (object id + display name) programmatically in the azure-context step instead of having the LM run az ad signed-in-user show. Records auto.principalId/auto.principalName after the subscription is confirmed, and the azd env apply step now sets AZURE_PRINCIPAL_ID/AZURE_PRINCIPAL_NAME automatically. Best-effort: empty for service principals or when not logged in (azd auto-populates the id at provision time). Guidance updated so the LM no longer performs the lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move Azure quota limit/usage/available fetching from the LM into the prepare driver. The quota step now programmatically maps the chosen architecture's services to ARM providers, fetches all quotas per supported provider (list + usage list, joined by name), and caches the result to a separate quota-data.json. State keeps only a pointer plus a compact summary so prepare-info.json stays small. Re-fetch is gated on region change. The LM now only selects rows and formats Section 6 rather than running az quota itself. Bash az quota calls are prefixed with MSYS_NO_PATHCONV=1 so the --scope resource URI is not mangled by git-bash path conversion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify that `auto.codebaseMarkers` and `input.specializedRouting` are in prepare-info.json.
Move the Durable Functions + Durable Task Scheduler reference list out of the specialized-check guidance (emitted on the first invocation of every run) and into the research/generate steps' dynamic refs, gated on the architecture actually using Durable Functions or the Durable Task Scheduler. Adds get_durable_refs / Get-DurableRefs and wires them into step_dynrefs (bash) and the research/generate dynamicRefs (PowerShell). Non-durable runs no longer carry the durable/DTS reference block; durable runs get functions/durable.md, durable-task-scheduler/README.md, and durable-task-scheduler/bicep.md surfaced exactly when they are needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove some unnecessary text from specialized-check.txt.
For .NET Aspire projects the driver now runs �zd init --from-code -e <env>
itself at the generate step instead of instructing the LM to run it. Adds
init_azd_project/Initialize-AzdProject (idempotent, skips when azure.yaml
exists, no-op when azd is missing) plus azure_yaml_has_services/
Test-AzureYamlHasServices to detect AppHosts with no deployable services.
Results are recorded under auto.azdInit {ran, ok, envName, servicesFound,
reason}; generate auto skips the recipe scaffold for Aspire. Guidance
(generate.txt/scan.txt/recipe.txt) rewritten so the LM reads auto.azdInit
and handles blockers rather than invoking azd itself.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Aspire scanner only recognized *.AppHost.csproj / Aspire.Hosting in .csproj files, so the newer file-based AppHost format (a .cs file such as apphost.cs using #:sdk Aspire.AppHost.Sdk / #:package Aspire.Hosting directives) was missed, leaving auto.componentSignals.aspire false. Both drivers now also scan .cs files for those directives so file-based AppHosts flow through the Aspire path (including the driver-run azd init --from-code). Updated the scan.txt detection hint accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The driver now resolves and downloads the Functions starter template from the
Azure Functions CDN manifest deterministically, instead of the LM calling the
functions_template_get MCP tool and working around its download/fallback issues.
- research step captures input.functionsTemplate { resource, language } — the
driver auto-detects both from existing function source (MODERNIZE) or asks the
LM to pick them (greenfield NEW), using the selection.md intent mapping.
- generate step's auto-collector resolves the best template (by language +
resource + recipe IaC, priority-ordered), downloads the repo archive, and
extracts it into the repo root (NEW) or a staging dir (existing code). It
skips the recipe scaffold when a template lands in the repo root.
- Falls back to the reference patterns when no template exists (e.g. a Terraform
trigger with no template) or the fetch fails, recording the reason under
auto.functionsTemplate.
- Paired bash + PowerShell; PS engine now supports scriptblock (conditional) needs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the CDN-manifest resolve + GitHub-archive download with calls to
`npx --yes @azure/mcp@latest functions template get`. The driver now lists
templates for the language to resolve the best templateName (preferring the
canonical `<resource>-*` starter over ai-* variants) and fetches files with
`--output New`, writing each {fileName, content} to the destination.
This matches the exact tool/output the LM would have used, removing the
separate CDN manifest dependency. The auto.functionsTemplate record shape
({fetched, id, placement, path, files, reason}) and the NEW=repo-root /
existing=staging placement logic are unchanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The driver now fetches the Functions starter template as a subprocess
(Azure MCP CLI) rather than the agent calling the functions_template_get
MCP tool, so the old `templateCallCount >= 1` assertion no longer holds.
Preserve the original intent ("the starter template was obtained for this
trigger") by accepting either signal: a successful driver fetch recorded in
.azure-prepare/prepare-info.json (auto.functionsTemplate.fetched) or a real
functions_template_get MCP call. Adds a readDriverTemplateFetch helper and
records both signals in the test comments.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The driver now owns Azure Functions starter-template retrieval (via the Azure
MCP CLI). Scrub all LM-facing mentions of the functions_template_get MCP tool
from SKILL.md, the research/generate guidance, plan-template, the template
selection/README/composition/durable/bicep/terraform references, and the eval
docs. The LM only identifies { resource, language } for input.functionsTemplate;
only the driver calls the CLI.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When multiple starter templates match the chosen resource + IaC, the driver now lists the candidates and asks the LM to pick one (input.functionsTemplate.templateName) from auto.functionsTemplateCandidates, then fetches that template. When exactly one matches, the driver auto-selects and fetches it with no extra LM turn; when none match it records no-template-use-references. The driver remains the only caller of the Azure MCP CLI. - collect.sh/.ps1: add functions_candidates/Get-FunctionsCandidates (filter by resource + infrastructure, canonical-first ordering); fetch honors a chosen templateName, falling back to the deterministic single-pick when unset. - steps.sh/.ps1: research auto lists candidates once (auto-select at 1, cache list at >1, cache empty at 0); research needs emits the templateName pick need only when more than one candidate matches. - research.txt / templates README + selection references updated to describe the pick step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…and no-template outcomes The driver-owned template fetch surfaced two test-harness issues in the functions-template-mcp cases: - readDriverTemplateFetch only looked at the workspace root, but the agent often scaffolds the app into a subdirectory and runs prepare.sh there, so the state file (.azure-prepare/prepare-info.json) was missed and the test reported "driver fetch: none" even though the driver fetched correctly. Now searches recursively for the state file under the workspace. - Terraform triggers and Durable Functions have no matching starter template in the catalog, so the driver correctly records reason "no-template-use-references" and falls back to references. The test now accepts that outcome as satisfying intent. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolved conflicts:
- plugin/skills/azure-prepare/SKILL.md: kept the script-driven redesign (HEAD);
removed the retired azure-hosted-copilot-sdk routing hint from the description.
- references/{analyze,research,scan,specialized-routing}.md: kept deleted (folded
into the driver script). Upstream's only change to them was retiring the
azure-hosted-copilot-sdk skill.
- tests/azure-prepare/integration.test.ts: accepted upstream's deletion; azure-prepare
integration tests were migrated to vally eval suites upstream.
Reflected upstream's retirement of azure-hosted-copilot-sdk in the driver:
- collect.sh / collect.ps1: dropped the @github/copilot-sdk detection and the
auto.codebaseMarkers.copilotSdk state field (its only consumer was the retired skill).
- guidance/scan.txt, research.txt, specialized-check.txt: removed routing to
azure-hosted-copilot-sdk and the stale codebaseMarkers references.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 40 tool-call early-terminate cap in the e2e eval suite was cutting the azure-prepare state machine off before it could reach the azure-validate hand-off, causing most full-workflow tests to fail or finish incomplete. A realistic run needs >=70 calls (planning loop + one create/edit per artifact + security/verify/finalize), and 70-90 for Terraform or multi-service projects. - evals/azure-prepare/e2e-eval.yaml: raise the tool-call-count earlyTerminate cap from 40 to 90 on all 22 stimuli. The azure-validate skill-call remains the primary (success) terminator; this only lets stuck runs continue far enough to complete. Routing-eval max_turns stays at 40 (those tests only verify invocation/routing). The tool-call limit is a test-harness concern, so it is intentionally not surfaced in SKILL.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lone bicep The file-exists grader uses picomatch with default dot:false, so '**/deployment-plan.md' never matched the plan the driver writes to the hidden .azure/ directory. Point all five graders at '**/.azure/deployment-plan.md' so they descend into the dot-dir. Also fix the Standalone Bicep stimulus: its prompt requested azd while a file-not-exists grader forbade azure.yaml. Reword the prompt to request standalone Bicep via the Azure CLI (no azd) so prompt and graders agree. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Details# 🔍 Token Analysis Report
fatal: path 'plugin/skills/azure-prepare/scripts/references/apim.md' exists on disk, but not in 'origin/main' 📊 Token Change ReportComparing Summary
Changed Files
📊 Token Limit Check ReportChecked: 713 files
|
| File | Tokens | Limit | Over By |
|---|---|---|---|
.github/skills/analyze-skill-issues/SKILL.md |
2109 | 500 | +1609 |
.github/skills/analyze-test-run/SKILL.md |
2471 | 500 | +1971 |
.github/skills/file-test-bug/SKILL.md |
628 | 500 | +128 |
.github/skills/sensei/SKILL.md |
856 | 500 | +356 |
.github/skills/skill-authoring/SKILL.md |
839 | 500 | +339 |
.github/skills/vally-eval/SKILL.md |
1764 | 500 | +1264 |
plugin/skills/airunway-aks-setup/SKILL.md |
1025 | 500 | +525 |
plugin/skills/appinsights-instrumentation/SKILL.md |
937 | 500 | +437 |
plugin/skills/azure-ai/SKILL.md |
820 | 500 | +320 |
plugin/skills/azure-aigateway/SKILL.md |
1261 | 500 | +761 |
plugin/skills/azure-aigateway/references/policies.md |
2342 | 2000 | +342 |
plugin/skills/azure-cloud-migrate/SKILL.md |
1085 | 500 | +585 |
plugin/skills/azure-cloud-migrate/references/services/container-apps/cloudrun-deployment-guide.md |
2029 | 2000 | +29 |
plugin/skills/azure-cloud-migrate/references/services/container-apps/deployment-guide.md |
2458 | 2000 | +458 |
plugin/skills/azure-cloud-migrate/references/services/container-apps/fargate-deployment-guide.md |
2587 | 2000 | +587 |
plugin/skills/azure-cloud-migrate/references/services/container-apps/spring-deployment-guide.md |
3871 | 2000 | +1871 |
plugin/skills/azure-cloud-migrate/references/services/functions/lambda-to-functions.md |
2600 | 2000 | +600 |
plugin/skills/azure-cloud-migrate/references/services/functions/runtimes/javascript.md |
2181 | 2000 | +181 |
plugin/skills/azure-compliance/SKILL.md |
1188 | 500 | +688 |
plugin/skills/azure-compute/SKILL.md |
762 | 500 | +262 |
plugin/skills/azure-compute/workflows/essential-machine-management/references/emm-enable-flow.md |
2344 | 2000 | +344 |
plugin/skills/azure-compute/workflows/vm-troubleshooter/vm-troubleshooter.md |
2509 | 2000 | +509 |
plugin/skills/azure-deploy/SKILL.md |
1645 | 500 | +1145 |
plugin/skills/azure-deploy/references/pre-deploy-checklist.md |
4692 | 2000 | +2692 |
plugin/skills/azure-deploy/references/recipes/azd/errors.md |
4004 | 2000 | +2004 |
plugin/skills/azure-deploy/references/troubleshooting.md |
2038 | 2000 | +38 |
plugin/skills/azure-diagnostics/SKILL.md |
1423 | 500 | +923 |
plugin/skills/azure-enterprise-infra-planner/SKILL.md |
911 | 500 | +411 |
plugin/skills/azure-enterprise-infra-planner/references/constraints/compute-apps.md |
2022 | 2000 | +22 |
plugin/skills/azure-kubernetes/SKILL.md |
2634 | 500 | +2134 |
plugin/skills/azure-kubernetes/azure-kubernetes-automatic-readiness/SKILL.md |
3690 | 500 | +3190 |
plugin/skills/azure-kusto/SKILL.md |
2152 | 500 | +1652 |
plugin/skills/azure-messaging/SKILL.md |
821 | 500 | +321 |
plugin/skills/azure-prepare/SKILL.md |
1456 | 500 | +956 |
plugin/skills/azure-prepare/scripts/references/aspire.md |
4617 | 2000 | +2617 |
plugin/skills/azure-prepare/scripts/references/plan-template.md |
2554 | 2000 | +554 |
plugin/skills/azure-prepare/scripts/references/recipes/azd/aspire.md |
2275 | 2000 | +275 |
plugin/skills/azure-prepare/scripts/references/recipes/azd/terraform.md |
3555 | 2000 | +1555 |
plugin/skills/azure-prepare/scripts/references/resources-limits-quotas.md |
3322 | 2000 | +1322 |
plugin/skills/azure-prepare/scripts/references/security.md |
2147 | 2000 | +147 |
plugin/skills/azure-prepare/scripts/references/services/functions/bicep.md |
3002 | 2000 | +1002 |
plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/composition.md |
2806 | 2000 | +806 |
plugin/skills/azure-prepare/scripts/references/services/functions/terraform.md |
3363 | 2000 | +1363 |
plugin/skills/azure-quotas/SKILL.md |
3006 | 500 | +2506 |
plugin/skills/azure-quotas/references/commands.md |
2644 | 2000 | +644 |
plugin/skills/azure-reliability/SKILL.md |
5922 | 500 | +5422 |
plugin/skills/azure-reliability/references/configure-multi-region.md |
4729 | 2000 | +2729 |
plugin/skills/azure-reliability/references/services/app-service/reliability.md |
2591 | 2000 | +591 |
plugin/skills/azure-resource-lookup/SKILL.md |
1367 | 500 | +867 |
plugin/skills/azure-resource-visualizer/SKILL.md |
2122 | 500 | +1622 |
plugin/skills/azure-storage/SKILL.md |
1228 | 500 | +728 |
plugin/skills/azure-upgrade/SKILL.md |
1542 | 500 | +1042 |
plugin/skills/azure-upgrade/references/languages/java/INSTRUCTION.md |
2893 | 2000 | +893 |
plugin/skills/azure-upgrade/references/languages/java/package-specific/com.microsoft.azure.management.md |
2428 | 2000 | +428 |
plugin/skills/azure-upgrade/references/languages/java/templates/PLAN_TEMPLATE.md |
2411 | 2000 | +411 |
plugin/skills/azure-upgrade/references/languages/java/templates/PROGRESS_TEMPLATE.md |
2315 | 2000 | +315 |
plugin/skills/azure-upgrade/references/languages/java/templates/SUMMARY_TEMPLATE.md |
2190 | 2000 | +190 |
plugin/skills/azure-upgrade/references/services/functions/automation.md |
3463 | 2000 | +1463 |
plugin/skills/azure-upgrade/references/services/functions/consumption-to-flex.md |
2773 | 2000 | +773 |
plugin/skills/azure-validate/SKILL.md |
950 | 500 | +450 |
plugin/skills/entra-agent-id/SKILL.md |
4001 | 500 | +3501 |
plugin/skills/entra-app-registration/SKILL.md |
2070 | 500 | +1570 |
plugin/skills/entra-app-registration/references/api-permissions.md |
2545 | 2000 | +545 |
plugin/skills/entra-app-registration/references/cli-commands.md |
2211 | 2000 | +211 |
plugin/skills/entra-app-registration/references/console-app-example.md |
2752 | 2000 | +752 |
plugin/skills/entra-app-registration/references/oauth-flows.md |
2375 | 2000 | +375 |
plugin/skills/microsoft-foundry/SKILL.md |
5809 | 500 | +5309 |
plugin/skills/microsoft-foundry/finetuning/SKILL.md |
1375 | 500 | +875 |
plugin/skills/microsoft-foundry/foundry-agent/create/create-hosted.md |
7148 | 2000 | +5148 |
plugin/skills/microsoft-foundry/foundry-agent/create/quick-start-hosted.md |
5326 | 2000 | +3326 |
plugin/skills/microsoft-foundry/foundry-agent/create/references/foundry-tool-catalog.md |
10891 | 2000 | +8891 |
plugin/skills/microsoft-foundry/foundry-agent/create/references/local-run.md |
2122 | 2000 | +122 |
plugin/skills/microsoft-foundry/foundry-agent/create/references/toolbox-reference.md |
3137 | 2000 | +1137 |
plugin/skills/microsoft-foundry/foundry-agent/create/references/tools.md |
2252 | 2000 | +252 |
plugin/skills/microsoft-foundry/foundry-agent/create/references/use-toolbox-in-hosted-agent.md |
4558 | 2000 | +2558 |
plugin/skills/microsoft-foundry/foundry-agent/deploy/deploy.md |
5009 | 2000 | +3009 |
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/eval-datasets.md |
2863 | 2000 | +863 |
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/references/generate-seed-dataset.md |
2212 | 2000 | +212 |
plugin/skills/microsoft-foundry/foundry-agent/eval-datasets/references/trace-to-dataset.md |
4325 | 2000 | +2325 |
plugin/skills/microsoft-foundry/foundry-agent/invocations-ws/invocations-ws.md |
2652 | 2000 | +652 |
plugin/skills/microsoft-foundry/foundry-agent/invoke/invoke.md |
2590 | 2000 | +590 |
plugin/skills/microsoft-foundry/foundry-agent/observe/observe.md |
3856 | 2000 | +1856 |
plugin/skills/microsoft-foundry/foundry-agent/observe/references/continuous-eval.md |
3855 | 2000 | +1855 |
plugin/skills/microsoft-foundry/foundry-agent/observe/references/evaluate-step.md |
2175 | 2000 | +175 |
plugin/skills/microsoft-foundry/foundry-agent/observe/references/evaluation-suite-generation.md |
3134 | 2000 | +1134 |
plugin/skills/microsoft-foundry/foundry-agent/routine/routine.md |
2030 | 2000 | +30 |
plugin/skills/microsoft-foundry/foundry-agent/trace/references/kql-templates.md |
2701 | 2000 | +701 |
plugin/skills/microsoft-foundry/models/deploy-model/SKILL.md |
1805 | 500 | +1305 |
plugin/skills/microsoft-foundry/models/deploy-model/capacity/SKILL.md |
1739 | 500 | +1239 |
plugin/skills/microsoft-foundry/models/deploy-model/customize/SKILL.md |
2235 | 500 | +1735 |
plugin/skills/microsoft-foundry/models/deploy-model/customize/references/customize-workflow.md |
3335 | 2000 | +1335 |
plugin/skills/microsoft-foundry/models/deploy-model/preset/SKILL.md |
1226 | 500 | +726 |
plugin/skills/microsoft-foundry/models/deploy-model/preset/references/preset-workflow.md |
5534 | 2000 | +3534 |
plugin/skills/microsoft-foundry/project/create/create-foundry-project.md |
2283 | 2000 | +283 |
plugin/skills/microsoft-foundry/quota/quota.md |
2288 | 2000 | +288 |
plugin/skills/microsoft-foundry/quota/references/capacity-planning.md |
2080 | 2000 | +80 |
plugin/skills/microsoft-foundry/references/agent-metadata-contract.md |
2217 | 2000 | +217 |
plugin/skills/microsoft-foundry/references/sdk/foundry-sdk-py.md |
2162 | 2000 | +162 |
plugin/skills/python-appservice-deploy/SKILL.md |
688 | 500 | +188 |
Consider moving content to
references/subdirectories.
Automated token analysis. See skill authoring guidelines for best practices.
| skill: azure-prepare | ||
| systemPrompt: '{"mode":"append","content":"Skip the Provisioning Limit Checklist (Step 6 in the plan template). Use reasonable default values for quota/limit columns instead of running az quota commands or invoking the azure-quotas skill. Focus your effort on generating the infrastructure and application files."}' | ||
| earlyTerminate: '[{"type":"skill-call","skill":"azure-validate"},{"type":"tool-call-count","count":40}]' | ||
| earlyTerminate: '[{"type":"skill-call","skill":"azure-validate"},{"type":"tool-call-count","count":90}]' |
There was a problem hiding this comment.
Repeated updates to the .json file and script invocations mean that the tool count is much higher now, though there is room for improvement.
| @@ -1,99 +0,0 @@ | |||
| # Analyze Workspace | |||
There was a problem hiding this comment.
These high-level reference files (analyze.md, scan.md, etc.) have been replaced by operations in the script, and blocks of text that are returned by the script to the LM at every major step in the workflow. These blocks of text are under plugin/skills/azure-prepare/scripts/lib/guidance.
There was a problem hiding this comment.
Pull request overview
This PR refactors the azure-prepare skill from a mostly narrative workflow into a deterministic, script-driven state machine (Bash + PowerShell) that persists progress in JSON state files and iteratively instructs the agent with “NEXT ACTION” / “COMPLETE” blocks. It also restructures and expands the skill’s reference corpus (service docs, template/recipe guidance, and eval notes) to align with the new “driver fetches templates” model and improve consistency across runs.
Changes:
- Introduce script-based drivers (
prepare.sh/prepare.ps1) plus supporting libraries to orchestrate the workflow as a state machine with persisted JSON state. - Rework/reference documentation to route more decisions through driver-managed selection/fetch (notably Azure Functions templates) and add new recipe/service reference material.
- Replace several legacy
references/*.mdplanning docs with sharedscripts/lib/guidance/*.txtguidance consumed by both drivers; bump the skill version.
Show a summary per file
| File | Description |
|---|---|
| plugin/skills/azure-prepare/version.json | Bumps azure-prepare skill version to 2.0 to reflect the workflow rewrite. |
| plugin/skills/azure-prepare/scripts/references/services/storage/README.md | Reformatting/normalization of Storage service reference content under the scripts references tree. |
| plugin/skills/azure-prepare/scripts/references/services/static-web-apps/routing.md | Reformatting/normalization of SWA routing/auth reference content. |
| plugin/skills/azure-prepare/scripts/references/services/static-web-apps/region-availability.md | Reformatting/normalization of SWA region availability reference. |
| plugin/skills/azure-prepare/scripts/references/services/static-web-apps/README.md | Reformatting/normalization of SWA overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/static-web-apps/bicep.md | Reformatting/normalization of SWA Bicep reference. |
| plugin/skills/azure-prepare/scripts/references/services/service-bus/README.md | Reformatting/normalization of Service Bus overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/logic-apps/README.md | Reformatting/normalization of Logic Apps overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/key-vault/README.md | Reformatting/normalization of Key Vault overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/functions/terraform.md | Updates Functions Terraform guidance to use driver-mediated template fetching. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/selection.md | Updates selection guidance to set input.functionsTemplate for the driver instead of directly calling template tools. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/timer/README.md | Adds new timer trigger recipe documentation and troubleshooting guidance. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/timer/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/timer/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/sql/README.md | Adds new SQL trigger recipe documentation and troubleshooting guidance. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/sql/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/sql/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/servicebus/README.md | Adds new Service Bus trigger recipe documentation and troubleshooting guidance. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/servicebus/eval/typescript.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/servicebus/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/servicebus/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/README.md | Adds an index for function template recipes and shared patterns. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/mcp/README.md | Adds MCP recipe documentation, protocol notes, and troubleshooting. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/mcp/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/mcp/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/eventhubs/README.md | Adds Event Hubs trigger recipe documentation and troubleshooting. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/eventhubs/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/eventhubs/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/durable/README.md | Adds Durable Functions recipe guidance (DTS-focused) and troubleshooting. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/durable/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/durable/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/cosmosdb/README.md | Adds Cosmos DB trigger recipe guidance and troubleshooting. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/cosmosdb/eval/typescript.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/cosmosdb/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/cosmosdb/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/composition.md | Updates composition algorithm to treat the driver-fetched template as the base and use recipes for deltas. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/common/health-check.md | Adds multi-language health check examples for functions templates/recipes. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/common/error-handling.md | Adds multi-language error handling patterns intended for recipe composition. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/common/dotnet-entry-point.md | Adds guidance to avoid breaking the base .NET isolated template entry point. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/blob-eventgrid/README.md | Adds blob via Event Grid recipe documentation and troubleshooting. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/blob-eventgrid/eval/summary.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/recipes/blob-eventgrid/eval/python.md | Updates eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/README.md | Adds driver-centric overview of how Functions templates are selected/fetched and then composed. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/base/eval/typescript.md | Updates base template eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/base/eval/summary.md | Updates base template eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/templates/base/eval/python.md | Updates base template eval notes to reflect driver-based template fetch. |
| plugin/skills/azure-prepare/scripts/references/services/functions/README.md | Adds/updates Functions service overview emphasizing driver + composition workflow and runtime-version research. |
| plugin/skills/azure-prepare/scripts/references/services/functions/durable.md | Updates Durable guidance to use input.functionsTemplate and driver fetching. |
| plugin/skills/azure-prepare/scripts/references/services/functions/bicep.md | Updates Functions Bicep guidance to use driver fetching rather than hand authoring. |
| plugin/skills/azure-prepare/scripts/references/services/functions/aspire-containerapps.md | Adds Aspire+Container Apps note about required secret storage type for Functions under ACA. |
| plugin/skills/azure-prepare/scripts/references/services/foundry/region-availability.md | Reformatting/normalization of Foundry region availability reference. |
| plugin/skills/azure-prepare/scripts/references/services/foundry/README.md | Reformatting/normalization of Foundry overview reference (and routing to microsoft-foundry skill). |
| plugin/skills/azure-prepare/scripts/references/services/event-grid/README.md | Reformatting/normalization of Event Grid overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/cosmos-db/sdk.md | Reformatting/normalization of Cosmos DB SDK patterns reference. |
| plugin/skills/azure-prepare/scripts/references/services/cosmos-db/README.md | Reformatting/normalization of Cosmos DB overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/cosmos-db/partitioning.md | Reformatting/normalization of Cosmos DB partitioning guidance reference. |
| plugin/skills/azure-prepare/scripts/references/services/container-apps/README.md | Adds Container Apps service overview reference under scripts references. |
| plugin/skills/azure-prepare/scripts/references/services/container-apps/health-probes.md | Reformatting/normalization of Container Apps probe reference content. |
| plugin/skills/azure-prepare/scripts/references/services/container-apps/environment.md | Reformatting/normalization of Container Apps env var reference content. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/selection.md | Adds App Service template selection decision tree (reference-only) for composition workflows. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/sql/source/dotnet.md | Adds .NET source recipe guidance for SQL integration on App Service templates. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/sql/README.md | Adds App Service SQL recipe documentation (reference-only). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/redis/source/python.md | Adds Python Redis recipe source guidance (token refresh pattern). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/redis/source/nodejs.md | Adds Node.js Redis recipe source guidance (token refresh pattern). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/redis/source/dotnet.md | Adds .NET Redis recipe source guidance. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/redis/README.md | Adds App Service Redis recipe documentation (reference-only). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/README.md | Adds App Service recipe index and composition overview (reference-only). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/cosmos/source/python.md | Adds Python Cosmos recipe source guidance for App Service. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/cosmos/source/nodejs.md | Adds Node.js Cosmos recipe source guidance for App Service. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/cosmos/source/dotnet.md | Adds .NET Cosmos recipe source guidance for App Service. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/cosmos/README.md | Adds App Service Cosmos recipe documentation (reference-only). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/auth/source/python.md | Adds Python auth recipe source guidance (JWT validation) for App Service. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/auth/source/nodejs.md | Adds Node.js auth recipe source guidance (JWT validation) for App Service. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/auth/source/dotnet.md | Adds .NET auth recipe source guidance (Microsoft.Identity.Web) for App Service. |
| plugin/skills/azure-prepare/scripts/references/services/app-service/templates/recipes/auth/README.md | Adds Entra ID / Easy Auth recipe documentation (reference-only). |
| plugin/skills/azure-prepare/scripts/references/services/app-service/scaling.md | Reformatting/normalization of App Service scaling guidance. |
| plugin/skills/azure-prepare/scripts/references/services/app-insights/README.md | Reformatting/normalization of App Insights overview reference and routing to instrumentation skill. |
| plugin/skills/azure-prepare/scripts/references/services/aks/README.md | Reformatting/normalization of AKS overview reference. |
| plugin/skills/azure-prepare/scripts/references/services/aks/manifests.md | Reformatting/normalization of AKS manifests reference. |
| plugin/skills/azure-prepare/scripts/references/services/aks/addons.md | Reformatting/normalization of AKS add-ons reference. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-identity-ts.md | Adds condensed TS auth SDK quick reference used by the driver’s security step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-identity-py.md | Adds condensed Python auth SDK quick reference used by the driver’s security step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-identity-java.md | Adds condensed Java auth SDK quick reference used by the driver’s security step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-identity-dotnet.md | Adds condensed .NET auth SDK quick reference used by the driver’s security step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-appconfiguration-ts.md | Adds condensed TS App Configuration SDK quick reference for the driver’s generate step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-appconfiguration-py.md | Adds condensed Python App Configuration SDK quick reference for the driver’s generate step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azure-appconfiguration-java.md | Adds condensed Java App Configuration SDK quick reference for the driver’s generate step. |
| plugin/skills/azure-prepare/scripts/references/sdk/azd-deployment.md | Adds condensed AZD deployment quick reference for driver-assisted generation. |
| plugin/skills/azure-prepare/scripts/references/region-availability.md | Adds a centralized index of limited-availability services and region-check guidance. |
| plugin/skills/azure-prepare/scripts/references/recipes/bicep/README.md | Reformatting/normalization of the Bicep recipe reference. |
| plugin/skills/azure-prepare/scripts/references/plan-template.md | Updates plan template content to align with driver-based Functions template fetching. |
| plugin/skills/azure-prepare/scripts/references/global-rules.md | Adds global “ask_user” gates and safety rules as script-consumable references. |
| plugin/skills/azure-prepare/scripts/prepare.sh | Adds Bash state-machine driver entrypoint for azure-prepare. |
| plugin/skills/azure-prepare/scripts/prepare.ps1 | Adds PowerShell state-machine driver entrypoint for azure-prepare. |
| plugin/skills/azure-prepare/scripts/lib/output.sh | Adds Bash output emitter for NEXT ACTION / COMPLETE blocks. |
| plugin/skills/azure-prepare/scripts/lib/output.ps1 | Adds PowerShell output emitter for NEXT ACTION / COMPLETE blocks. |
| plugin/skills/azure-prepare/scripts/lib/guidance/specialized-check.txt | Adds shared step guidance text for specialized-skill routing decisions. |
| plugin/skills/azure-prepare/scripts/lib/guidance/security.txt | Adds shared step guidance text for security hardening requirements. |
| plugin/skills/azure-prepare/scripts/lib/guidance/scan.txt | Adds shared step guidance text for component detection/classification. |
| plugin/skills/azure-prepare/scripts/lib/guidance/research.txt | Adds shared step guidance text for research and related-skill invocation. |
| plugin/skills/azure-prepare/scripts/lib/guidance/requirements.txt | Adds shared step guidance text for requirements gathering via ask_user. |
| plugin/skills/azure-prepare/scripts/lib/guidance/recipe.txt | Adds shared step guidance text for recipe selection rules. |
| plugin/skills/azure-prepare/scripts/lib/guidance/quota.txt | Adds shared step guidance text for quota checklist generation. |
| plugin/skills/azure-prepare/scripts/lib/guidance/functional-verify.txt | Adds shared step guidance text for pre-validation functional verification. |
| plugin/skills/azure-prepare/scripts/lib/guidance/azure-context.txt | Adds shared step guidance text for subscription/region confirmation behavior. |
| plugin/skills/azure-prepare/scripts/lib/guidance/architecture.txt | Adds shared step guidance text for architecture mapping and rationale capture. |
| plugin/skills/azure-prepare/scripts/lib/guidance/approval.txt | Adds shared step guidance text for plan presentation and explicit approval gate. |
| plugin/skills/azure-prepare/scripts/lib/guidance/analyze.txt | Adds shared step guidance text for selecting NEW/MODIFY/MODERNIZE mode. |
| plugin/skills/azure-prepare/scripts/lib/guidance.sh | Adds Bash loader to read shared per-step guidance text files. |
| plugin/skills/azure-prepare/references/specialized-routing.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| plugin/skills/azure-prepare/references/scan.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| plugin/skills/azure-prepare/references/requirements.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| plugin/skills/azure-prepare/references/recipe-selection.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| plugin/skills/azure-prepare/references/functional-verification.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| plugin/skills/azure-prepare/references/architecture.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| plugin/skills/azure-prepare/references/analyze.md | Deletes legacy narrative doc in favor of shared guidance consumed by drivers. |
| .gitattributes | Ensures LF for shell scripts and shared azure-prepare guidance text files. |
Review details
- Files reviewed: 71/196 changed files
- Comments generated: 2
- Review effort level: Low
| # Usage: | ||
| # bash ./prepare.sh <RepoPath> | ||
| # ============================================================================= | ||
| set -o pipefail |
| get_repo_files() { | ||
| FILES="$(find "$RepoPath" -maxdepth 4 \ | ||
| \( -name .git -o -name .azure-prepare -o -name node_modules -o -name bin -o -name obj -o -name .venv -o -name dist -o -name .terraform \) -prune \ | ||
| -o -type f -print 2>/dev/null)" | ||
| } |
| --name <secret-name> \ | ||
| --value <secret-value> | ||
| ``` | ||
| # Azure CLI Commands |
There was a problem hiding this comment.
The files in plugin/skills/azure-prepare/scripts/references were originally under plugin/skills/azure-prepare/references. There is no longer a chain of Markdown links leading from SKILL.md to these files; instead the script tells the LM to read these files as needed. If we kept them in the original location they would be flagged as orphans.
In many cases the steps described in these files could be rolled into the script itself rather than leaving them up to the LM to execute. In other cases the information in the files may not be needed at all. Dealing with them is left to a future change as this PR is already quite complicated.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
The azure-prepare skill helps create a new Azure application and/or prepare an existing application for deployment to Azure. It describes a complex workflow that must account for multiple possible languages, application frameworks, and deployment approaches. While the workflow is very regular the complexity means there are many opportunities for the coding agent to skip steps or carry them out incorrectly. It may skip reading an essential reference file or make "small" modifications to the order or content of a series of command line tool invocations that renders them useless. It may call an MCP tool that returns far more information than can fit in the context window, and flail around trying to understand it.
In the end the LM does tend to get most of the expected result (generally, a set of workable IaC files and a deployment play, ready for azure-validate to take over) but the approach, time, and token usage can vary wildly. The deployment plan may even look good but not actually work because the LM forgot to do things like check for available quota. The azure-validate and azure-deploy skills may correct this, but it generally requires more time, tokens, and turns.
Here we replace much of the workflow logic with a script that works with the LM to keep the overall workflow on rails. The LM invokes the script which performs some deterministic work and tells the LM what it needs to do next. The LM takes care of that, and then calls the script again. The LM and script track progress and shared information in a set of .json files.
The end result is that the LM behavior is much more consistent from one run to another, as it only has to concern itself with the most recent instruction from the script rather than reasoning over the whole of the SKILL.md and the reference files. If it makes a mistake, the script will generally catch it and force the LM to correct it to make progress. Storing state in files means that essential information is not lost during compaction.
Note that this does not necessarily reduce the number of turns or total token usage. In fact, these are generally higher now as the LM actually goes through all of the expected steps rather than inadvertently skipping some. However, I believe the more consistent behavior will make it easier to identify and implement improvements of all sorts, including both bug fixes and performance improvements.
Checklist
cd tests && npm test)fix:,feat:,feature:,chore:,misc:,test:,eval:tests/,npm run test:integration -- <skill>ornpm run test:vally -- --skill <skill>)Related Issues