| 1 |
Read session state |
Load prereq-output.json + context.json. Resolve subscription |
Cross-ref subscription-resolution.md if needed |
| 2 |
Query policy constraints |
Inline MCP: fetch policy + advisor recommendations |
mcp_azure_mcp_policy + mcp_azure_mcp_advisor |
| 3 |
Map components to services |
Per-component Azure service selection, Dockerfile routing, deploy-as-is |
⛔ You MUST read service-mapping.md and deploy-strategy.md |
| 4 |
Select SKUs + WAF analysis |
Budget-aware SKU selection, inline WAF service guidance |
⛔ You MUST read sku-matrix.md |
| 5 |
Validate quotas + region capacity |
⛔ Read subagent-quota.md → dispatch as task (NEXT action MUST be task, ⛔ agent_type: "task" — NEVER "general-purpose"). Copy the COMPLETE and UNMODIFIED template text into the task prompt between <<<TEMPLATE_START>>> / <<<TEMPLATE_END>>> delimiters — do NOT summarize. Append the caller-provided inputs listed in subagent-quota.md's Input table AFTER the template block. ⛔ After dispatching, proceed to Step 6 (cost estimation) while the subagent runs. Do NOT run quota checks yourself — the subagent handles it. Collect subagent results before Step 9 (write plan). |
⛔ You MUST read subagent-quota.md |
| 6 |
Estimate costs |
⛔ You MUST read pricing-guide.md for methodology, then pricing-guide-services.md for per-service filters. Call the pricing router (mcp_azure_mcp_pricing/azure-pricing) with command: "pricing_get" + a parameters{} object inline per paid service. If MCP unavailable or fails → ⛔ Read subagent-pricing.md → dispatch as task (NEXT action MUST be task, ⛔ agent_type: "task" — NEVER "general-purpose"). Copy the COMPLETE and UNMODIFIED template text into the task prompt between <<<TEMPLATE_START>>> / <<<TEMPLATE_END>>> delimiters — do NOT summarize. Append data (services[], region, budget tier) AFTER the template block. Write results to prepare-plan.json.costEstimate. |
pricing-guide.md |
| 7 |
Generate naming |
Centralized naming: suffix, prefix, all resource names |
⛔ You MUST read naming-patterns.md |
| 8 |
Determine IaC format |
Existing non-Azure .tf → ask_user Bicep vs TF, write to overrides[].iacFormat. No .tf → default Bicep. |
(inline) |
| 9 |
Write prepare-plan.json |
Per PreparePlan schema. Include postDeployRecommendations, deploymentVariables |
⛔ You MUST read prepare-schemas.ts for PreparePlan schema |
| 10 |
Return summary |
Structured summary for orchestrator approval gate |
(inline — 1 line) |
| 11 |
Validate plan |
4-dimension check: Goal Alignment, WAF Alignment, Dependency Completeness, Deployment Viability. Fix inline on failure, document tradeoffs in assumptions[]. |
All must pass before writing |