Shared Agent Configuration
This file contains shared configuration values that all agents should reference to maintain consistency.
Note: Agents should import these defaults rather than duplicating them.
⚠️ See Also: AVM Pitfalls for known AVM parameter issues and region limitations.
Default Regions
| Purpose |
Region |
Location |
Rationale |
| Primary |
swedencentral |
Sweden Central |
EU GDPR compliant, sustainable operations |
| Alternative |
germanywestcentral |
Germany West Central |
German data residency requirements |
| Preview Features |
eastus |
East US |
Early access to new Azure features |
Region Limitations (IMPORTANT)
Some Azure services do not support all regions:
| Service |
Supported Regions |
Default for EU |
| Static Web App |
westus2, centralus, eastus2, westeurope, eastasia |
westeurope |
| Azure OpenAI |
Limited - check Azure docs |
swedencentral |
Action: When planning Static Web Apps, hardcode westeurope region, not the location parameter.
Region Selection Guidelines
- Default (no constraints): Use
swedencentral
- German data residency: Use
germanywestcentral
- Swiss banking/healthcare: Use
switzerlandnorth
- UK GDPR requirements: Use
uksouth
- APAC latency optimization: Use
southeastasia
Required Tags
All Azure resources MUST include these tags:
| Tag |
Required |
Description |
Example |
Environment |
✅ Yes |
Deployment environment |
dev, staging, prod |
ManagedBy |
✅ Yes |
IaC tool used |
Bicep, ARM |
Project |
✅ Yes |
Project identifier |
ecommerce, patient-portal |
Owner |
✅ Yes |
Team or individual |
platform-team, john.doe |
CostCenter |
Optional |
Billing allocation |
CC-12345 |
WorkloadType |
Optional |
Resource category |
app, data, network, security |
Backup |
Optional |
Enable VM auto-backup |
true (triggers Azure Policy) |
Bicep Tag Pattern
var tags = {
Environment: environment
ManagedBy: 'Bicep'
Project: projectName
Owner: owner
CostCenter: costCenter
DeploymentDate: utcNow('yyyy-MM-dd')
}
CAF Naming Conventions
Follow Cloud Adoption Framework pattern: {type}-{workload}-{env}-{region}-{instance}
Region Abbreviations
| Region |
Abbreviation |
| swedencentral |
swc |
| germanywestcentral |
gwc |
| westeurope |
weu |
| northeurope |
neu |
| eastus |
eus |
| eastus2 |
eus2 |
| westus2 |
wus2 |
Resource Type Prefixes
| Resource Type |
Prefix |
Example |
| Resource Group |
rg- |
rg-ecommerce-prod-swc |
| Virtual Network |
vnet- |
vnet-hub-prod-swc-001 |
| Subnet |
snet- |
snet-web-prod-swc |
| Network Security Group |
nsg- |
nsg-web-prod-swc |
| Key Vault |
kv- |
kv-app-dev-swc-a1b2c3 |
| Storage Account |
st |
steabordevswca1b2c3 |
| App Service |
app- |
app-api-prod-swc |
| App Service Plan |
asp- |
asp-web-prod-swc |
| Azure SQL Server |
sql- |
sql-crm-prod-swc-main |
| Log Analytics |
log- |
log-platform-prod-swc |
| Application Insights |
appi- |
appi-web-prod-swc |
Azure Pricing MCP - Service Name Reference
When using Azure Pricing MCP tools (azure_price_search, azure_cost_estimate), use these exact service names:
| Azure Service |
Correct service_name |
Common SKUs |
Notes |
| SQL Database |
SQL Database |
Basic, Standard, S0, S1, Premium |
Not "Azure SQL" |
| App Service |
Azure App Service |
B1, S1, P1v3, P1v4 |
Include "Azure" prefix |
| Container Apps |
Azure Container Apps |
Consumption |
Include "Azure" prefix |
| Service Bus |
Service Bus |
Basic, Standard, Premium |
No prefix |
| Key Vault |
Key Vault |
Standard |
No prefix |
| Storage |
Storage |
Standard, Premium, LRS, GRS |
General category |
| Virtual Machines |
Virtual Machines |
D4s_v5, B2s, E4s_v5 |
No "Azure" prefix |
| Log Analytics |
Log Analytics |
Per-GB ingestion pricing |
Or Azure Monitor |
| Static Web Apps |
Azure Static Web Apps |
Free, Standard |
Include "Azure" prefix |
| Cosmos DB |
Azure Cosmos DB |
Serverless, Provisioned |
Include "Azure" prefix |
Tier Keywords
Use tier keywords (Basic, Standard, Premium, Free, Consumption) directly as sku_name.
The MCP automatically searches both productName and skuName fields for these.
Example Queries
# Correct usage
azure_price_search(service_name="SQL Database", sku_name="Basic", region="swedencentral")
azure_price_search(service_name="Azure App Service", sku_name="B1", region="swedencentral")
azure_price_search(service_name="Service Bus", sku_name="Basic", region="swedencentral")
# Incorrect - will return 0 results
azure_price_search(service_name="Azure SQL", sku_name="Basic") # Wrong service name
azure_price_search(service_name="Container Apps", sku_name="Consumption") # Missing "Azure" prefix
Azure Verified Modules (AVM)
MANDATORY: MUST use AVM modules for all resources where available.
Raw Bicep resources are only permitted when:
- No AVM module exists for the resource type (verified at https://aka.ms/avm/index)
- User explicitly types "approve raw bicep" when prompted
- The rationale is documented in the implementation plan/reference
AVM Approval Workflow
| Step |
Action |
| 1 |
Check mcp_bicep_list_avm_metadata or https://aka.ms/avm/index for module availability |
| 2 |
If AVM exists: Use br/public:avm/res/{service}/{resource}:{version} |
| 3 |
If no AVM: STOP and prompt user: "No AVM module found for {resource}. Type approve raw bicep to proceed." |
| 4 |
If approved: Document justification in implementation artifacts |
AVM Registry
Common AVM Modules (Verified January 2025)
| Resource |
Module Path |
Min Version |
Notes |
| Key Vault |
br/public:avm/res/key-vault/vault |
0.11.0 |
Includes PE, RBAC, diagnostics |
| Virtual Network |
br/public:avm/res/network/virtual-network |
0.5.0 |
Subnet delegation support |
| NSG |
br/public:avm/res/network/network-security-group |
0.4.0 |
Inline security rules |
| Storage Account |
br/public:avm/res/storage/storage-account |
0.14.0 |
HNS, PE, lifecycle |
| App Service |
br/public:avm/res/web/site |
0.12.0 |
VNet integration, slots |
| App Service Plan |
br/public:avm/res/web/serverfarm |
0.4.0 |
Zone redundancy (P1v3+) |
| SQL Server |
br/public:avm/res/sql/server |
0.10.0 |
AAD-only auth, TDE |
| SQL Database |
br/public:avm/res/sql/server/database |
0.8.0 |
Elastic pool support |
| Log Analytics |
br/public:avm/res/operational-insights/workspace |
0.9.0 |
Retention policies |
| App Insights |
br/public:avm/res/insights/component |
0.4.0 |
LA workspace integration |
| Redis Cache |
br/public:avm/res/cache/redis |
0.5.0 |
PE, clustering |
| Cosmos DB |
br/public:avm/res/document-db/database-account |
0.10.0 |
Multi-region, CMK |
| Event Hubs |
br/public:avm/res/event-hub/namespace |
0.7.0 |
Capture, PE |
| Service Bus |
br/public:avm/res/service-bus/namespace |
0.10.0 |
Premium tier, PE |
| Static Web App |
br/public:avm/res/web/static-site |
0.5.0 |
Custom domains |
| Front Door |
br/public:avm/res/cdn/profile |
0.7.0 |
WAF integration |
⚠️ Version Freshness: Versions shown are minimums verified as of January 2025.
Always check the AVM Module Index for latest versions before implementation.
How to Find Latest Versions
PREFERRED: Use MCP Tool (Automated)
# Call mcp_bicep_list_avm_metadata to get all AVM versions
# Returns JSON with modulePath, versions[], and documentationUri
# Latest version = LAST element in the versions array
Version Extraction Pattern:
{
"modulePath": "avm/res/storage/storage-account",
"versions": ["0.8.0", "0.9.0", ..., "0.31.0"], // ← 0.31.0 is latest
"documentationUri": "https://..."
}
Fallback Methods:
- AVM Index: https://aka.ms/avm/index (searchable catalog)
- GitHub Changelog: Each module has a CHANGELOG.md in its folder
- Bicep Registry:
bicep restore will fetch available versions
- VS Code: Bicep extension provides version intellisense
Automated Version Checks
- GitHub Actions:
.github/workflows/avm-version-check.yml runs weekly
- Agent Handoff: Use "▶ Refresh AVM Versions" in Bicep Plan agent
- GATE CHECK: Agents MUST call
mcp_bicep_list_avm_metadata before planning
Well-Architected Framework (WAF) Pillars
Scoring Guidelines
| Score |
Rating |
Description |
| 9-10 |
Excellent |
Follows all best practices, near-production-ready |
| 7-8 |
Good |
Follows most best practices, minor improvements needed |
| 5-6 |
Adequate |
Meets basic requirements, notable gaps exist |
| 3-4 |
Poor |
Significant issues, requires major improvements |
| 1-2 |
Critical |
Fundamental problems, not recommended for production |
Pillar Definitions
| Pillar |
Focus Areas |
| Security |
Identity, data protection, network security, governance |
| Reliability |
Resiliency, availability, disaster recovery, monitoring |
| Performance Efficiency |
Scalability, capacity planning, optimization |
| Cost Optimization |
Resource optimization, monitoring, governance |
| Operational Excellence |
DevOps, automation, monitoring, management |
Security Defaults
All implementations MUST include:
| Setting |
Value |
Purpose |
supportsHttpsTrafficOnly |
true |
Enforce HTTPS |
minimumTlsVersion |
TLS1_2 |
Modern TLS only |
allowBlobPublicAccess |
false |
No public blob access |
publicNetworkAccess |
Disabled |
Private endpoints preferred |
| Managed Identities |
Preferred |
Over connection strings/keys |
| Private Endpoints |
Required |
For data services |
| NSG deny rules |
Priority 4096 |
Deny-by-default networking |
Template-First Output Generation
All agents generating workflow artifacts MUST follow the template-first approach:
Before Generating Output
- Read the template file - Load
../templates/{artifact}.template.md
- Extract H2 headings - Note exact text and order of required sections
- Prepare content - Organize responses to fit the template structure
Output Structure Rules
| Rule |
Requirement |
Example |
| Exact text |
Use template's H2 text verbatim |
## Approval Gate not ## Approval Checkpoint |
| Exact order |
Required H2s appear in template-defined sequence |
Overview → Inventory → Tasks |
| Anchor rule |
Extra sections allowed only AFTER last required H2 |
Add ## References after ## Approval Gate |
| Attribution |
Include agent name and date in header |
> Generated by {agent} agent | {YYYY-MM-DD} |
Attribution Header Format
# Step N: {Artifact Title} - {project-name}
> Generated by {agent-name} agent | {YYYY-MM-DD}
> **Confidence Level**: {High|Medium|Low}
Validation
All generated artifacts are validated by:
- Pre-commit hook:
STRICTNESS=standard npm run lint:wave1-artifacts
- CI workflow:
.github/workflows/wave1-artifact-drift-guard.yml
- Project-specific:
npm run validate:{project-name} (if available)
Governance Discovery (MANDATORY for Bicep Plan)
CRITICAL: Governance constraints MUST be discovered from Azure Resource Graph, NOT assumed.
Why This Matters
Assumed governance causes deployment failures:
| Assumed |
Discovered |
Result |
| 4 tags (Environment, ManagedBy, Project, Owner) |
9 tags from Azure Policy |
❌ Deployment denied |
Discovery Workflow
Before creating 04-governance-constraints.md, execute these Azure Resource Graph queries:
- Query all Policy Assignments with effects and enforcement mode
- Query Tag Policies with actual parameter values (tag names)
- Query Security Policies for TLS, HTTPS, encryption requirements
Required Output
04-governance-constraints.md MUST include:
## Discovery Source
| Query | Results | Timestamp |
| ------------------ | --------------------- | ---------- |
| Policy Assignments | X policies discovered | {ISO-8601} |
| Tag Policies | X tags required | {ISO-8601} |
See full instructions: governance-discovery.instructions.md
Research Requirements (MANDATORY)
All agents MUST perform thorough research before implementation to ensure complete,
one-shot execution without missing context or requiring multiple iterations.
Pre-Implementation Research Checklist
Before creating ANY output files or making changes:
Research Workflow Pattern
<research_mandate>
MANDATORY: Before producing output artifacts, run comprehensive research.
Step 1: Context Gathering
- Use semantic_search, grep_search, read_file to gather workspace context
- Use Azure MCP tools to query documentation and best practices
- Read template files to understand output structure
Step 2: Validation Gate
- Confirm required inputs from previous workflow steps exist
- Verify template has been loaded
- Check Azure guidance has been obtained
Step 3: Confidence Assessment
- Only proceed when you have 80% confidence in context understanding
- If below 80%, use #tool:agent to delegate autonomous research
- Or ASK the user for clarification rather than assuming
</research_mandate>
Delegation Pattern
When extensive research is needed, delegate to a subagent:
MANDATORY: Run #tool:agent tool, instructing the agent to work autonomously
without pausing for user feedback, to gather comprehensive context.
Service Recommendation Matrix
Use this matrix when recommending Azure services based on workload patterns.
Present options to the user via askQuestions for confirmation.
Workload Pattern → Service Options
| Workload Pattern |
Option A (Cost-Optimized) |
Option B (Balanced) |
Option C (Enterprise) |
| Static Site / SPA |
Static Web App Free |
Static Web App Standard + CDN |
Front Door + Blob Storage + CDN |
| N-Tier Web App |
App Service B1 + Azure SQL Basic |
App Service S1 + Azure SQL S1 + Redis |
App Service P1v3 + Azure SQL P1 + Redis + Front Door |
| API-First / Microservices |
Container Apps Consumption |
Container Apps Dedicated + API Management Basic |
AKS + API Management Standard + Service Bus |
| Event-Driven / Serverless |
Functions Consumption + Event Grid |
Functions Premium + Service Bus + Event Grid |
Functions Premium + Event Hubs + APIM + Logic Apps |
| Data Platform / Analytics |
Azure SQL Basic + Blob Storage |
Synapse Serverless + Data Factory + SQL Managed Instance |
Synapse Dedicated + Data Factory + Databricks + Purview |
| IoT / Edge |
IoT Hub Free + Stream Analytics |
IoT Hub S1 + Stream Analytics + Time Series Insights |
IoT Hub S3 + Digital Twins + Event Hubs + Databricks |
Tier Indicators
| Tier |
Monthly Range |
Characteristics |
| 💰 Cost-Optimized |
$0–50/mo |
Shared/consumption SKUs, minimal redundancy |
| ⚖️ Balanced |
$50–500/mo |
Dedicated compute, basic HA, staging slots |
| 🏢 Enterprise |
$500+/mo |
Zone-redundant, premium SKUs, full WAF stack |
Detection Signals
Use these signals to identify workload patterns during requirements discovery:
| Signal |
Suggests Pattern |
| "static site", "SPA", "React/Vue/Angular", "no backend" |
Static Site / SPA |
| "web app + database", "CRUD", "admin portal", "3-tier" |
N-Tier Web App |
| "APIs", "microservices", "containers", "multiple services" |
API-First / Microservices |
| "triggers", "events", "queue processing", "scheduled jobs" |
Event-Driven / Serverless |
| "analytics", "data warehouse", "ETL", "reporting" |
Data Platform / Analytics |
| "devices", "sensors", "telemetry", "edge computing" |
IoT / Edge |
Business Domain Signals
When users describe their project in business terms (not technical), use these
signals to infer the workload pattern. Present the inference as a recommendation
for user confirmation — do not ask the user to self-classify into technical categories.
| Business Signal |
Inferred Pattern |
Confidence |
| "ecommerce", "online store", "shopping cart", "product catalog" |
N-Tier Web App |
High |
| "customer portal", "patient portal", "employee portal" |
N-Tier Web App |
High |
| "CRM", "ERP", "internal tool", "admin panel", "back-office" |
N-Tier Web App |
High |
| "company website", "marketing site", "landing page", "blog" |
Static Site / SPA |
High |
| "documentation site", "portfolio", "brochure site" |
Static Site / SPA |
High |
| "order processing", "payment processing", "invoice automation" |
Event-Driven / N-Tier |
Medium |
| "notification system", "email campaigns", "scheduling" |
Event-Driven / Serverless |
Medium |
| "data warehouse", "business intelligence", "KPI dashboard" |
Data Platform / Analytics |
High |
| "reporting", "data lake", "ETL pipeline" |
Data Platform / Analytics |
High |
| "mobile app backend", "REST API", "multi-tenant SaaS" |
API-First / Microservices |
High |
| "chatbot", "AI assistant", "recommendation engine" |
API-First / Microservices |
Medium |
| "fleet management", "sensor monitoring", "smart building" |
IoT / Edge |
High |
| "migrate from on-prem", "modernize legacy", "lift and shift" |
(use follow-up questions) |
Low |
| "replace existing system", "re-platform" |
(use follow-up questions) |
Low |
Low-confidence signals (migration/modernization): When the user mentions migration
or modernization, you MUST ask follow-up questions about the current system before
inferring a pattern. Migration source determines target pattern:
| Migration Source |
Typical Target Pattern |
| On-prem web app + SQL Server |
N-Tier Web App |
| Legacy APIs / SOA services |
API-First / Microservices |
| File-based data processing |
Event-Driven / Serverless |
| On-prem data warehouse |
Data Platform / Analytics |
| WordPress / Drupal / static sites |
Static Site / SPA |
| Custom industrial / SCADA systems |
IoT / Edge |
Company Size Heuristics
Use company size to suggest appropriate default budget tier and scale expectations.
These are starting points — always confirm with the user.
| Company Size |
Typical Budget Tier |
Default User Scale |
Notes |
| Startup / Small (< 50 employees) |
Cost-Optimized |
< 1,000 users |
Consumption-based, minimal redundancy |
| Mid-Market (50-500 employees) |
Balanced |
1,000-10,000 users |
Dedicated compute, staging environments |
| Enterprise (500+ employees) |
Enterprise |
10,000+ users |
Zone-redundant, premium SKUs, full WAF |
Industry Compliance Mapping
When a user mentions their industry, pre-select applicable compliance frameworks
using recommended: true in askQuestions options.
| Industry |
Primary Frameworks |
Additional Considerations |
| Retail / Ecommerce |
PCI-DSS, GDPR (if EU) |
Payment processing, customer PII |
| Healthcare |
HIPAA, GDPR (if EU) |
PHI data, audit logging |
| Financial Services |
SOC 2, PCI-DSS, GDPR (if EU) |
Transaction integrity, encryption at rest |
| Government / Public Sector |
ISO 27001, SOC 2 |
Data sovereignty, air-gapped options |
| Education |
GDPR (if EU), FERPA (if US) |
Student data protection |
| General / Technology |
GDPR (if EU), SOC 2 |
Standard security baseline |
Per-Agent Research Focus
| Agent |
Primary Research Focus |
| Requirements |
User needs, existing projects, compliance requirements |
| Architect |
Azure services, WAF pillars, SKU recommendations, pricing |
| Bicep Plan |
AVM availability, Azure Policy discovery via ARG, implementation patterns |
| Bicep Code |
Module structure, naming conventions, security defaults |
| Deploy |
Template validation, what-if results, resource dependencies |
| Diagram |
Existing architecture, icon availability, layout patterns |
| Docs |
Deployed resources, configuration details, operational procedures |
See also: Agent Research Instructions
1---2name: 1543-defaults-e665598b3description: Shared Agent Configuration4---5# Shared Agent Configuration67This file contains shared configuration values that all agents should reference to maintain consistency.89> **Note**: Agents should import these defaults rather than duplicating them.10>11> **⚠️ See Also**: [AVM Pitfalls](./avm-pitfalls.md) for known AVM parameter issues and region limitations.1213## Default Regions1415| Purpose | Region | Location | Rationale |16| -------------------- | -------------------- | -------------------- | ----------------------------------------- |17| **Primary** | `swedencentral` | Sweden Central | EU GDPR compliant, sustainable operations |18| **Alternative** | `germanywestcentral` | Germany West Central | German data residency requirements |19| **Preview Features** | `eastus` | East US | Early access to new Azure features |2021### Region Limitations (IMPORTANT)2223Some Azure services do not support all regions:2425| Service | Supported Regions | Default for EU |26| ------------------ | ------------------------------------------------- | --------------- |27| **Static Web App** | westus2, centralus, eastus2, westeurope, eastasia | `westeurope` |28| **Azure OpenAI** | Limited - check Azure docs | `swedencentral` |2930**Action**: When planning Static Web Apps, hardcode `westeurope` region, not the location parameter.3132### Region Selection Guidelines3334- **Default (no constraints)**: Use `swedencentral`35- **German data residency**: Use `germanywestcentral`36- **Swiss banking/healthcare**: Use `switzerlandnorth`37- **UK GDPR requirements**: Use `uksouth`38- **APAC latency optimization**: Use `southeastasia`3940## Required Tags4142All Azure resources MUST include these tags:4344| Tag | Required | Description | Example |45| -------------- | -------- | ---------------------- | ------------------------------------ |46| `Environment` | ✅ Yes | Deployment environment | `dev`, `staging`, `prod` |47| `ManagedBy` | ✅ Yes | IaC tool used | `Bicep`, `ARM` |48| `Project` | ✅ Yes | Project identifier | `ecommerce`, `patient-portal` |49| `Owner` | ✅ Yes | Team or individual | `platform-team`, `john.doe` |50| `CostCenter` | Optional | Billing allocation | `CC-12345` |51| `WorkloadType` | Optional | Resource category | `app`, `data`, `network`, `security` |52| `Backup` | Optional | Enable VM auto-backup | `true` (triggers Azure Policy) |5354### Bicep Tag Pattern5556```bicep57var tags = {58 Environment: environment59 ManagedBy: 'Bicep'60 Project: projectName61 Owner: owner62 CostCenter: costCenter63 DeploymentDate: utcNow('yyyy-MM-dd')64}65```6667## CAF Naming Conventions6869Follow Cloud Adoption Framework pattern: `{type}-{workload}-{env}-{region}-{instance}`7071### Region Abbreviations7273| Region | Abbreviation |74| ------------------ | ------------ |75| swedencentral | `swc` |76| germanywestcentral | `gwc` |77| westeurope | `weu` |78| northeurope | `neu` |79| eastus | `eus` |80| eastus2 | `eus2` |81| westus2 | `wus2` |8283### Resource Type Prefixes8485| Resource Type | Prefix | Example |86| ---------------------- | ------- | ----------------------- |87| Resource Group | `rg-` | `rg-ecommerce-prod-swc` |88| Virtual Network | `vnet-` | `vnet-hub-prod-swc-001` |89| Subnet | `snet-` | `snet-web-prod-swc` |90| Network Security Group | `nsg-` | `nsg-web-prod-swc` |91| Key Vault | `kv-` | `kv-app-dev-swc-a1b2c3` |92| Storage Account | `st` | `steabordevswca1b2c3` |93| App Service | `app-` | `app-api-prod-swc` |94| App Service Plan | `asp-` | `asp-web-prod-swc` |95| Azure SQL Server | `sql-` | `sql-crm-prod-swc-main` |96| Log Analytics | `log-` | `log-platform-prod-swc` |97| Application Insights | `appi-` | `appi-web-prod-swc` |9899## Azure Pricing MCP - Service Name Reference100101When using Azure Pricing MCP tools (`azure_price_search`, `azure_cost_estimate`), use these **exact** service names:102103| Azure Service | Correct `service_name` | Common SKUs | Notes |104| ---------------- | ----------------------- | ------------------------------------------ | ---------------------- |105| SQL Database | `SQL Database` | `Basic`, `Standard`, `S0`, `S1`, `Premium` | Not "Azure SQL" |106| App Service | `Azure App Service` | `B1`, `S1`, `P1v3`, `P1v4` | Include "Azure" prefix |107| Container Apps | `Azure Container Apps` | `Consumption` | Include "Azure" prefix |108| Service Bus | `Service Bus` | `Basic`, `Standard`, `Premium` | No prefix |109| Key Vault | `Key Vault` | `Standard` | No prefix |110| Storage | `Storage` | `Standard`, `Premium`, `LRS`, `GRS` | General category |111| Virtual Machines | `Virtual Machines` | `D4s_v5`, `B2s`, `E4s_v5` | No "Azure" prefix |112| Log Analytics | `Log Analytics` | Per-GB ingestion pricing | Or `Azure Monitor` |113| Static Web Apps | `Azure Static Web Apps` | `Free`, `Standard` | Include "Azure" prefix |114| Cosmos DB | `Azure Cosmos DB` | `Serverless`, `Provisioned` | Include "Azure" prefix |115116### Tier Keywords117118Use tier keywords (`Basic`, `Standard`, `Premium`, `Free`, `Consumption`) directly as `sku_name`.119The MCP automatically searches both `productName` and `skuName` fields for these.120121### Example Queries122123```python124# Correct usage125azure_price_search(service_name="SQL Database", sku_name="Basic", region="swedencentral")126azure_price_search(service_name="Azure App Service", sku_name="B1", region="swedencentral")127azure_price_search(service_name="Service Bus", sku_name="Basic", region="swedencentral")128129# Incorrect - will return 0 results130azure_price_search(service_name="Azure SQL", sku_name="Basic") # Wrong service name131azure_price_search(service_name="Container Apps", sku_name="Consumption") # Missing "Azure" prefix132```133134## Azure Verified Modules (AVM)135136**MANDATORY: MUST use AVM modules for all resources where available.**137138Raw Bicep resources are only permitted when:1391401. No AVM module exists for the resource type (verified at https://aka.ms/avm/index)1412. User explicitly types "approve raw bicep" when prompted1423. The rationale is documented in the implementation plan/reference143144### AVM Approval Workflow145146| Step | Action |147| ---- | ----------------------------------------------------------------------------------------------------------------- |148| 1 | Check `mcp_bicep_list_avm_metadata` or https://aka.ms/avm/index for module availability |149| 2 | If AVM exists: Use `br/public:avm/res/{service}/{resource}:{version}` |150| 3 | If no AVM: **STOP** and prompt user: "No AVM module found for {resource}. Type **approve raw bicep** to proceed." |151| 4 | If approved: Document justification in implementation artifacts |152153### AVM Registry154155- **Registry**: `br/public:avm/res/*`156- **Documentation**: https://aka.ms/avm157- **GitHub**: https://github.com/Azure/bicep-registry-modules/tree/main/avm/res158- **Module Index**: https://aka.ms/avm/index159160### Common AVM Modules (Verified January 2025)161162| Resource | Module Path | Min Version | Notes |163| ---------------- | -------------------------------------------------- | ----------- | ------------------------------ |164| Key Vault | `br/public:avm/res/key-vault/vault` | `0.11.0` | Includes PE, RBAC, diagnostics |165| Virtual Network | `br/public:avm/res/network/virtual-network` | `0.5.0` | Subnet delegation support |166| NSG | `br/public:avm/res/network/network-security-group` | `0.4.0` | Inline security rules |167| Storage Account | `br/public:avm/res/storage/storage-account` | `0.14.0` | HNS, PE, lifecycle |168| App Service | `br/public:avm/res/web/site` | `0.12.0` | VNet integration, slots |169| App Service Plan | `br/public:avm/res/web/serverfarm` | `0.4.0` | Zone redundancy (P1v3+) |170| SQL Server | `br/public:avm/res/sql/server` | `0.10.0` | AAD-only auth, TDE |171| SQL Database | `br/public:avm/res/sql/server/database` | `0.8.0` | Elastic pool support |172| Log Analytics | `br/public:avm/res/operational-insights/workspace` | `0.9.0` | Retention policies |173| App Insights | `br/public:avm/res/insights/component` | `0.4.0` | LA workspace integration |174| Redis Cache | `br/public:avm/res/cache/redis` | `0.5.0` | PE, clustering |175| Cosmos DB | `br/public:avm/res/document-db/database-account` | `0.10.0` | Multi-region, CMK |176| Event Hubs | `br/public:avm/res/event-hub/namespace` | `0.7.0` | Capture, PE |177| Service Bus | `br/public:avm/res/service-bus/namespace` | `0.10.0` | Premium tier, PE |178| Static Web App | `br/public:avm/res/web/static-site` | `0.5.0` | Custom domains |179| Front Door | `br/public:avm/res/cdn/profile` | `0.7.0` | WAF integration |180181> **⚠️ Version Freshness**: Versions shown are minimums verified as of January 2025.182> Always check the [AVM Module Index](https://aka.ms/avm/index) for latest versions before implementation.183184### How to Find Latest Versions185186**PREFERRED: Use MCP Tool (Automated)**187188```bash189# Call mcp_bicep_list_avm_metadata to get all AVM versions190# Returns JSON with modulePath, versions[], and documentationUri191# Latest version = LAST element in the versions array192```193194**Version Extraction Pattern:**195196```json197{198 "modulePath": "avm/res/storage/storage-account",199 "versions": ["0.8.0", "0.9.0", ..., "0.31.0"], // ← 0.31.0 is latest200 "documentationUri": "https://..."201}202```203204**Fallback Methods:**2052061. **AVM Index**: https://aka.ms/avm/index (searchable catalog)2072. **GitHub Changelog**: Each module has a CHANGELOG.md in its folder2083. **Bicep Registry**: `bicep restore` will fetch available versions2094. **VS Code**: Bicep extension provides version intellisense210211### Automated Version Checks212213- **GitHub Actions**: `.github/workflows/avm-version-check.yml` runs weekly214- **Agent Handoff**: Use "▶ Refresh AVM Versions" in Bicep Plan agent215- **GATE CHECK**: Agents MUST call `mcp_bicep_list_avm_metadata` before planning216217## Well-Architected Framework (WAF) Pillars218219### Scoring Guidelines220221| Score | Rating | Description |222| ----- | --------- | ------------------------------------------------------ |223| 9-10 | Excellent | Follows all best practices, near-production-ready |224| 7-8 | Good | Follows most best practices, minor improvements needed |225| 5-6 | Adequate | Meets basic requirements, notable gaps exist |226| 3-4 | Poor | Significant issues, requires major improvements |227| 1-2 | Critical | Fundamental problems, not recommended for production |228229### Pillar Definitions230231| Pillar | Focus Areas |232| -------------------------- | ------------------------------------------------------- |233| **Security** | Identity, data protection, network security, governance |234| **Reliability** | Resiliency, availability, disaster recovery, monitoring |235| **Performance Efficiency** | Scalability, capacity planning, optimization |236| **Cost Optimization** | Resource optimization, monitoring, governance |237| **Operational Excellence** | DevOps, automation, monitoring, management |238239## Security Defaults240241All implementations MUST include:242243| Setting | Value | Purpose |244| -------------------------- | ------------- | ---------------------------- |245| `supportsHttpsTrafficOnly` | `true` | Enforce HTTPS |246| `minimumTlsVersion` | `TLS1_2` | Modern TLS only |247| `allowBlobPublicAccess` | `false` | No public blob access |248| `publicNetworkAccess` | `Disabled` | Private endpoints preferred |249| Managed Identities | Preferred | Over connection strings/keys |250| Private Endpoints | Required | For data services |251| NSG deny rules | Priority 4096 | Deny-by-default networking |252253## Template-First Output Generation254255All agents generating workflow artifacts MUST follow the template-first approach:256257### Before Generating Output2582591. **Read the template file** - Load `../templates/{artifact}.template.md`2602. **Extract H2 headings** - Note exact text and order of required sections2613. **Prepare content** - Organize responses to fit the template structure262263### Output Structure Rules264265| Rule | Requirement | Example |266| --------------- | -------------------------------------------------- | ----------------------------------------------- |267| **Exact text** | Use template's H2 text verbatim | `## Approval Gate` not `## Approval Checkpoint` |268| **Exact order** | Required H2s appear in template-defined sequence | Overview → Inventory → Tasks |269| **Anchor rule** | Extra sections allowed only AFTER last required H2 | Add `## References` after `## Approval Gate` |270| **Attribution** | Include agent name and date in header | `> Generated by {agent} agent \| {YYYY-MM-DD}` |271272### Attribution Header Format273274```markdown275# Step N: {Artifact Title} - {project-name}276277> Generated by {agent-name} agent | {YYYY-MM-DD}278> **Confidence Level**: {High|Medium|Low}279```280281### Validation282283All generated artifacts are validated by:284285- **Pre-commit hook**: `STRICTNESS=standard npm run lint:wave1-artifacts`286- **CI workflow**: `.github/workflows/wave1-artifact-drift-guard.yml`287- **Project-specific**: `npm run validate:{project-name}` (if available)288289## Governance Discovery (MANDATORY for Bicep Plan)290291**CRITICAL**: Governance constraints MUST be discovered from Azure Resource Graph, NOT assumed.292293### Why This Matters294295Assumed governance causes deployment failures:296297| Assumed | Discovered | Result |298| ----------------------------------------------- | ------------------------ | -------------------- |299| 4 tags (Environment, ManagedBy, Project, Owner) | 9 tags from Azure Policy | ❌ Deployment denied |300301### Discovery Workflow302303Before creating `04-governance-constraints.md`, execute these Azure Resource Graph queries:3043051. **Query all Policy Assignments** with effects and enforcement mode3062. **Query Tag Policies** with actual parameter values (tag names)3073. **Query Security Policies** for TLS, HTTPS, encryption requirements308309### Required Output310311`04-governance-constraints.md` MUST include:312313```markdown314## Discovery Source315316| Query | Results | Timestamp |317| ------------------ | --------------------- | ---------- |318| Policy Assignments | X policies discovered | {ISO-8601} |319| Tag Policies | X tags required | {ISO-8601} |320```321322See full instructions: [governance-discovery.instructions.md](../../instructions/governance-discovery.instructions.md)323324## Research Requirements (MANDATORY)325326**All agents MUST perform thorough research before implementation** to ensure complete,327one-shot execution without missing context or requiring multiple iterations.328329### Pre-Implementation Research Checklist330331Before creating ANY output files or making changes:332333- [ ] **Search workspace** for existing patterns (`agent-output/`, similar projects)334- [ ] **Read relevant templates** in `.github/templates/` for output structure335- [ ] **Query documentation** via MCP tools (Azure docs, best practices)336- [ ] **Validate inputs** - confirm all required artifacts from previous steps exist337- [ ] **Achieve 80% confidence** before proceeding to implementation338339### Research Workflow Pattern340341```xml342<research_mandate>343MANDATORY: Before producing output artifacts, run comprehensive research.344345Step 1: Context Gathering346- Use semantic_search, grep_search, read_file to gather workspace context347- Use Azure MCP tools to query documentation and best practices348- Read template files to understand output structure349350Step 2: Validation Gate351- Confirm required inputs from previous workflow steps exist352- Verify template has been loaded353- Check Azure guidance has been obtained354355Step 3: Confidence Assessment356- Only proceed when you have 80% confidence in context understanding357- If below 80%, use #tool:agent to delegate autonomous research358- Or ASK the user for clarification rather than assuming359</research_mandate>360```361362### Delegation Pattern363364When extensive research is needed, delegate to a subagent:365366```markdown367MANDATORY: Run #tool:agent tool, instructing the agent to work autonomously368without pausing for user feedback, to gather comprehensive context.369```370371## Service Recommendation Matrix372373Use this matrix when recommending Azure services based on workload patterns.374Present options to the user via `askQuestions` for confirmation.375376### Workload Pattern → Service Options377378| Workload Pattern | Option A (Cost-Optimized) | Option B (Balanced) | Option C (Enterprise) |379|------------------|---------------------------|---------------------|-----------------------|380| **Static Site / SPA** | Static Web App Free | Static Web App Standard + CDN | Front Door + Blob Storage + CDN |381| **N-Tier Web App** | App Service B1 + Azure SQL Basic | App Service S1 + Azure SQL S1 + Redis | App Service P1v3 + Azure SQL P1 + Redis + Front Door |382| **API-First / Microservices** | Container Apps Consumption | Container Apps Dedicated + API Management Basic | AKS + API Management Standard + Service Bus |383| **Event-Driven / Serverless** | Functions Consumption + Event Grid | Functions Premium + Service Bus + Event Grid | Functions Premium + Event Hubs + APIM + Logic Apps |384| **Data Platform / Analytics** | Azure SQL Basic + Blob Storage | Synapse Serverless + Data Factory + SQL Managed Instance | Synapse Dedicated + Data Factory + Databricks + Purview |385| **IoT / Edge** | IoT Hub Free + Stream Analytics | IoT Hub S1 + Stream Analytics + Time Series Insights | IoT Hub S3 + Digital Twins + Event Hubs + Databricks |386387### Tier Indicators388389| Tier | Monthly Range | Characteristics |390|------|--------------|-----------------|391| 💰 Cost-Optimized | $0–50/mo | Shared/consumption SKUs, minimal redundancy |392| ⚖️ Balanced | $50–500/mo | Dedicated compute, basic HA, staging slots |393| 🏢 Enterprise | $500+/mo | Zone-redundant, premium SKUs, full WAF stack |394395### Detection Signals396397Use these signals to identify workload patterns during requirements discovery:398399| Signal | Suggests Pattern |400|--------|-----------------|401| "static site", "SPA", "React/Vue/Angular", "no backend" | Static Site / SPA |402| "web app + database", "CRUD", "admin portal", "3-tier" | N-Tier Web App |403| "APIs", "microservices", "containers", "multiple services" | API-First / Microservices |404| "triggers", "events", "queue processing", "scheduled jobs" | Event-Driven / Serverless |405| "analytics", "data warehouse", "ETL", "reporting" | Data Platform / Analytics |406| "devices", "sensors", "telemetry", "edge computing" | IoT / Edge |407408### Business Domain Signals409410When users describe their project in business terms (not technical), use these411signals to **infer** the workload pattern. Present the inference as a recommendation412for user confirmation — do not ask the user to self-classify into technical categories.413414| Business Signal | Inferred Pattern | Confidence |415|----------------|-----------------|------------|416| "ecommerce", "online store", "shopping cart", "product catalog" | N-Tier Web App | High |417| "customer portal", "patient portal", "employee portal" | N-Tier Web App | High |418| "CRM", "ERP", "internal tool", "admin panel", "back-office" | N-Tier Web App | High |419| "company website", "marketing site", "landing page", "blog" | Static Site / SPA | High |420| "documentation site", "portfolio", "brochure site" | Static Site / SPA | High |421| "order processing", "payment processing", "invoice automation" | Event-Driven / N-Tier | Medium |422| "notification system", "email campaigns", "scheduling" | Event-Driven / Serverless | Medium |423| "data warehouse", "business intelligence", "KPI dashboard" | Data Platform / Analytics | High |424| "reporting", "data lake", "ETL pipeline" | Data Platform / Analytics | High |425| "mobile app backend", "REST API", "multi-tenant SaaS" | API-First / Microservices | High |426| "chatbot", "AI assistant", "recommendation engine" | API-First / Microservices | Medium |427| "fleet management", "sensor monitoring", "smart building" | IoT / Edge | High |428| "migrate from on-prem", "modernize legacy", "lift and shift" | (use follow-up questions) | Low |429| "replace existing system", "re-platform" | (use follow-up questions) | Low |430431**Low-confidence signals** (migration/modernization): When the user mentions migration432or modernization, you MUST ask follow-up questions about the current system before433inferring a pattern. Migration source determines target pattern:434435| Migration Source | Typical Target Pattern |436|-----------------|----------------------|437| On-prem web app + SQL Server | N-Tier Web App |438| Legacy APIs / SOA services | API-First / Microservices |439| File-based data processing | Event-Driven / Serverless |440| On-prem data warehouse | Data Platform / Analytics |441| WordPress / Drupal / static sites | Static Site / SPA |442| Custom industrial / SCADA systems | IoT / Edge |443444### Company Size Heuristics445446Use company size to suggest appropriate default budget tier and scale expectations.447These are starting points — always confirm with the user.448449| Company Size | Typical Budget Tier | Default User Scale | Notes |450|-------------|--------------------|--------------------|-------|451| Startup / Small (< 50 employees) | Cost-Optimized | < 1,000 users | Consumption-based, minimal redundancy |452| Mid-Market (50-500 employees) | Balanced | 1,000-10,000 users | Dedicated compute, staging environments |453| Enterprise (500+ employees) | Enterprise | 10,000+ users | Zone-redundant, premium SKUs, full WAF |454455### Industry Compliance Mapping456457When a user mentions their industry, pre-select applicable compliance frameworks458using `recommended: true` in askQuestions options.459460| Industry | Primary Frameworks | Additional Considerations |461|----------|-------------------|--------------------------|462| Retail / Ecommerce | PCI-DSS, GDPR (if EU) | Payment processing, customer PII |463| Healthcare | HIPAA, GDPR (if EU) | PHI data, audit logging |464| Financial Services | SOC 2, PCI-DSS, GDPR (if EU) | Transaction integrity, encryption at rest |465| Government / Public Sector | ISO 27001, SOC 2 | Data sovereignty, air-gapped options |466| Education | GDPR (if EU), FERPA (if US) | Student data protection |467| General / Technology | GDPR (if EU), SOC 2 | Standard security baseline |468469### Per-Agent Research Focus470471| Agent | Primary Research Focus |472| ---------------- | ----------------------------------------------------------------------------- |473| **Requirements** | User needs, existing projects, compliance requirements |474| **Architect** | Azure services, WAF pillars, SKU recommendations, pricing |475| **Bicep Plan** | AVM availability, **Azure Policy discovery via ARG**, implementation patterns |476| **Bicep Code** | Module structure, naming conventions, security defaults |477| **Deploy** | Template validation, what-if results, resource dependencies |478| **Diagram** | Existing architecture, icon availability, layout patterns |479| **Docs** | Deployed resources, configuration details, operational procedures |480481See also: [Agent Research Instructions](../../instructions/agent-research-first.instructions.md)