azure-architecture-autopilot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Azure Architecture Builder

Azure架构构建器

A pipeline that designs Azure infrastructure using natural language, or analyzes existing resources to visualize architecture and proceed through modification and deployment.
The diagram engine is embedded within the skill (
scripts/
folder). No
pip install
needed — it directly uses the bundled Python scripts to generate interactive HTML diagrams with 605+ official Azure icons. Ready to use immediately without network access or package installation.
这是一个可通过自然语言设计Azure基础设施,或分析现有资源以可视化架构,并完成修改与部署的工作流。
架构图引擎内嵌于该技能中(位于
scripts/
文件夹)。无需执行
pip install
——它直接使用捆绑的Python脚本生成包含605+官方Azure图标的交互式HTML架构图。无需网络连接或安装额外包,即可立即使用。

Automatic User Language Detection

自动用户语言检测

🚨 Detect the language of the user's first message and provide all subsequent responses in that language. This is the highest-priority principle.
  • If the user writes in Korean → respond in Korean
  • If the user writes in English → respond in English (ask_user, progress updates, reports, Bicep comments — all in English)
  • The instructions and examples in this document are written in English, and all user-facing output must match the user's language
⚠️ Do not copy examples from this document verbatim to the user. Use only the structure as reference, and adapt text to the user's language.
🚨 检测用户第一条消息的语言,并使用该语言提供后续所有响应。这是最高优先级原则。
  • 如果用户使用韩语提问 → 用韩语回复
  • 如果用户使用英语提问 → 用英语回复(包括询问用户、进度更新、报告、Bicep注释等所有内容)
  • 本文档中的说明和示例均为英文,所有面向用户的输出必须与用户使用的语言保持一致
⚠️ 请勿直接复制本文档中的示例内容回复给用户。 仅可参考示例结构,并根据用户使用的语言调整文本内容。

Tool Usage Guide (GHCP Environment)

GHCP环境下的工具使用指南

FeatureTool NameNotes
Fetch URL content
web_fetch
For MS Docs lookups, etc.
Web search
web_search
URL discovery
Ask user
ask_user
choices
must be a string array
Sub-agents
task
explore/task/general-purpose
Shell command execution
powershell
Windows PowerShell
All sub-agents (explore/task/general-purpose) cannot use
web_fetch
or
web_search
. Fact-checking that requires MS Docs lookups must be performed directly by the main agent.
功能工具名称说明
获取URL内容
web_fetch
用于查阅MS Docs等内容
网页搜索
web_search
用于发现URL
询问用户
ask_user
choices
必须为字符串数组
子代理
task
探索型/任务型/通用型
执行Shell命令
powershell
Windows PowerShell
所有子代理(探索型/任务型/通用型)无法使用
web_fetch
web_search
。 需要查阅MS Docs进行事实核验的操作必须由主代理直接执行

External Tool Path Discovery

外部工具路径发现

az
,
python
,
bicep
, etc. are often not on PATH. Discover once before starting a Phase and cache the result. Do not re-discover every time.
⚠️ Do not use
Get-Command python
— risk of Windows Store alias. Direct filesystem discovery (
$env:LOCALAPPDATA\Programs\Python
) takes priority.
az CLI path:
powershell
$azCmd = $null
if (Get-Command az -ErrorAction SilentlyContinue) { $azCmd = 'az' }
if (-not $azCmd) {
  $azExe = Get-ChildItem -Path "$env:ProgramFiles\Microsoft SDKs\Azure\CLI2\wbin", "$env:LOCALAPPDATA\Programs\Azure CLI\wbin" -Filter "az.cmd" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
  if ($azExe) { $azCmd = $azExe }
}
Python path + embedded diagram engine: refer to the diagram generation section in
references/phase1-advisor.md
.
az
python
bicep
等工具通常不在系统PATH中。 在开始某个阶段前一次性完成路径发现并缓存结果,请勿每次都重复执行发现操作。
⚠️ 请勿使用
Get-Command python
—— 存在匹配Windows Store别名的风险。 优先使用直接文件系统发现方式(如
$env:LOCALAPPDATA\Programs\Python
)。
az CLI路径:
powershell
$azCmd = $null
if (Get-Command az -ErrorAction SilentlyContinue) { $azCmd = 'az' }
if (-not $azCmd) {
  $azExe = Get-ChildItem -Path "$env:ProgramFiles\Microsoft SDKs\Azure\CLI2\wbin", "$env:LOCALAPPDATA\Programs\Azure CLI\wbin" -Filter "az.cmd" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
  if ($azExe) { $azCmd = $azExe }
}
Python路径 + 内嵌架构图引擎:请参考
references/phase1-advisor.md
中的架构图生成章节。

Progress Updates Required

必须提供进度更新

Use blockquote + emoji + bold format:
markdown
> **⏳ [Action]** — [Reason]
> **✅ [Complete]** — [Result]
> **⚠️ [Warning]** — [Details]
> **❌ [Failed]** — [Cause]
请使用“块引用 + 表情符号 + 粗体”格式:
markdown
> **⏳ [操作中]** — [原因]
> **✅ [已完成]** — [结果]
> **⚠️ [警告]** — [详情]
> **❌ [失败]** — [原因]

Parallel Preload Principle

并行预加载原则

While waiting for user input via
ask_user
, preload information needed for the next step in parallel.
ask_user QuestionPreload Simultaneously
Project name / scan scopeReference files, MS Docs, Python path discovery, diagram module path verification
Model/SKU selectionMS Docs for next question choices
Architecture confirmation
az account show/list
,
az group list
Subscription selection
az group list

在通过
ask_user
等待用户输入的同时,并行预加载下一步所需的信息。
ask_user提问内容需并行预加载的信息
项目名称 / 扫描范围参考文件、MS Docs、Python路径发现、架构图模块路径验证
模型/SKU选择用于生成下一轮提问选项的MS Docs内容
架构确认
az account show/list
az group list
订阅选择
az group list

Path Branching — Automatically Determined by User Request

路径分支——根据用户请求自动判定

Path A: New Design (New Build)

路径A:全新设计(新建场景)

Trigger: "create", "set up", "deploy", "build", etc.
Phase 1 (references/phase1-advisor.md) — Interactive architecture design + diagram
Phase 2 (references/bicep-generator.md) — Bicep code generation
Phase 3 (references/bicep-reviewer.md) — Code review + compilation verification
Phase 4 (references/phase4-deployer.md) — validate → what-if → deploy
触发关键词:"create"、"set up"、"deploy"、"build"等
阶段1(参考references/phase1-advisor.md)—— 交互式架构设计 + 架构图生成
阶段2(参考references/bicep-generator.md)—— Bicep代码生成
阶段3(参考references/bicep-reviewer.md)—— 代码审查 + 编译验证
阶段4(参考references/phase4-deployer.md)—— 验证 → 预演(what-if)→ 部署

Path B: Existing Analysis + Modification (Analyze & Modify)

路径B:现有资源分析+修改(分析与调整场景)

Trigger: "analyze", "current resources", "scan", "draw a diagram", "show my infrastructure", etc.
Phase 0 (references/phase0-scanner.md) — Existing resource scan + diagram
Modification conversation — "What would you like to change here?" (natural language modification request → follow-up questions)
Phase 1 (references/phase1-advisor.md) — Confirm modifications + update diagram
Phase 2~4 — Same as above
触发关键词:"analyze"、"current resources"、"scan"、"draw a diagram"、"show my infrastructure"等
阶段0(参考references/phase0-scanner.md)—— 现有资源扫描 + 架构图生成
修改对话环节 —— "您想要对这里进行哪些修改?"(接收自然语言修改请求 → 跟进提问)
阶段1(参考references/phase1-advisor.md)—— 确认修改内容 + 更新架构图
阶段2~4 —— 与路径A流程一致

When Path Determination Is Ambiguous

当路径判定模糊时

Ask the user directly:
ask_user({
  question: "What would you like to do?",
  choices: [
    "Design a new Azure architecture (Recommended)",
    "Analyze + modify existing Azure resources"
  ]
})

直接询问用户:
ask_user({
  question: "您想要执行什么操作?",
  choices: [
    "设计全新的Azure架构(推荐)",
    "分析并修改现有Azure资源"
  ]
})

Phase Transition Rules

阶段转换规则

  • Each Phase reads and follows the instructions in its corresponding
    references/*.md
    file
  • When transitioning between Phases, always inform the user about the next step
  • Do not skip Phases (especially the what-if between Phase 3 → Phase 4)
  • 🚨 Required condition for Phase 1 → Phase 2 transition:
    01_arch_diagram_draft.html
    must have been generated using the embedded diagram engine and shown to the user. Do not proceed to Bicep generation without a diagram. Completing spec collection alone does not mean Phase 1 is done — Phase 1 includes diagram generation + user confirmation.
  • Modification request after deployment → return to Phase 1, not Phase 0 (Delta Confirmation Rule)
  • 每个阶段需读取并遵循对应
    references/*.md
    文件中的说明
  • 在阶段转换时,必须告知用户下一步操作内容
  • 请勿跳过任何阶段(尤其是阶段3→阶段4之间的预演(what-if)环节)
  • 🚨 阶段1→阶段2的必要转换条件:必须已使用内嵌架构图引擎生成
    01_arch_diagram_draft.html
    并展示给用户。未生成架构图请勿进入Bicep代码生成环节。仅完成需求收集并不代表阶段1已完成——阶段1包含架构图生成+用户确认两个部分。
  • 部署完成后的修改请求 → 返回至阶段1,而非阶段0(增量确认规则)

Service Coverage & Fallback

服务覆盖与 fallback 机制

Optimized Services

优化支持的服务

Microsoft Foundry, Azure OpenAI, AI Search, ADLS Gen2, Key Vault, Microsoft Fabric, Azure Data Factory, VNet/Private Endpoint, AML/AI Hub
Microsoft Foundry、Azure OpenAI、AI Search、ADLS Gen2、Key Vault、Microsoft Fabric、Azure Data Factory、VNet/专用端点、AML/AI Hub

Other Azure Services

其他Azure服务

All supported — MS Docs are automatically consulted to generate at the same quality standard. Do not send messages that cause user anxiety such as "out of scope" or "best-effort".
所有Azure服务均支持——会自动查阅MS Docs以生成同等质量的结果。请勿向用户发送诸如“超出范围”或“尽力而为”等引发焦虑的消息。

Stable vs Dynamic Information Handling

稳定信息与动态信息的处理方式

CategoryHandling MethodExamples
StableReference files first
isHnsEnabled: true
, PE triple set
DynamicAlways fetch MS DocsAPI version, model availability, SKU, region
类别处理方式示例
稳定信息优先参考本地文件
isHnsEnabled: true
、专用端点三元组配置
动态信息必须查阅MS DocsAPI版本、模型可用性、SKU、区域支持

Quick Reference

快速参考

FileRole
references/phase0-scanner.md
Existing resource scan + relationship inference + diagram
references/phase1-advisor.md
Interactive architecture design + fact checking
references/bicep-generator.md
Bicep code generation rules
references/bicep-reviewer.md
Code review checklist
references/phase4-deployer.md
validate → what-if → deploy
references/service-gotchas.md
Required properties, PE mappings
references/azure-dynamic-sources.md
MS Docs URL registry
references/azure-common-patterns.md
PE/security/naming patterns
references/ai-data.md
AI/Data service guide
文件作用
references/phase0-scanner.md
现有资源扫描 + 关系推断 + 架构图生成
references/phase1-advisor.md
交互式架构设计 + 事实核验
references/bicep-generator.md
Bicep代码生成规则
references/bicep-reviewer.md
代码审查清单
references/phase4-deployer.md
验证 → 预演(what-if)→ 部署
references/service-gotchas.md
必填属性、专用端点映射关系
references/azure-dynamic-sources.md
MS Docs URL注册表
references/azure-common-patterns.md
专用端点/安全/命名规范
references/ai-data.md
AI/数据类服务指南