Skip to content

Azure-Samples/azure-speckit-constitution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Azure Development Constitution

A comprehensive guide defining mandatory patterns and best practices for Azure development, deployment, and operations.

Note: This constitution file (azure-constitution.md) is designed for use with GitHub Spec-Kit, a tool for creating and managing project specifications that can be referenced by AI assistants.

Purpose

This constitution establishes a standardized approach to Azure development that ensures:

  • Security: Managed Identity, Key Vault, and credential-free authentication patterns
  • Cost Optimization: Resource right-sizing, consumption-based pricing, and governance
  • Observability: Application Insights, OpenTelemetry, and structured logging
  • Infrastructure as Code: Bicep templates with Azure Verified Modules
  • AI/ML Best Practices: Agent Framework integration with Azure AI Foundry
  • Compliance: Automated verification and architecture reviews

Who Should Use This

  • Development Teams: Building applications on Azure
  • Platform Engineers: Managing Azure infrastructure and governance
  • AI/ML Engineers: Developing agents with Microsoft Agent Framework
  • DevOps Teams: Implementing CI/CD pipelines for Azure deployments
  • Architects: Designing Azure solutions with best practices

Core Principles

The constitution defines mandatory patterns across:

  1. Azure Development Prerequisites - CLI setup, authentication, MCP tool usage
  2. Service Discovery & Dynamic Configuration - Environment portability
  3. Authentication & Authorization - Managed Identity and Key Vault
  4. AI Agent Architecture - Azure AI Foundry integration patterns
  5. Observability & Telemetry - Application Insights and OpenTelemetry
  6. Environment-Aware Behavior - Development vs production configurations
  7. Bicep & Infrastructure as Code - Declarative resource management
  8. Container Registry & Image Management - ACR security and optimization
  9. Cost Management - Governance and budget controls

How to Use

This Azure Development Constitution is designed to be used with GitHub Spec-Kit's constitution feature. To integrate it into your project:

  1. Install Spec-Kit: Follow the installation instructions at github.com/github/spec-kit

  2. Reference this constitution: When running Spec-Kit commands, you can either:

    • Copy azure-constitution.md to your project's memory/ directory (or create one if it doesn't exist)
    • Reference this file directly using Spec-Kit's constitution command.
  3. Apply to your workflow: Once configured, AI assistants (like GitHub Copilot) will automatically reference these principles when helping with Azure development tasks in your repository.

The constitution will guide code generation, infrastructure decisions, and deployment practices to ensure consistency with Azure best practices.

Quick Start

Prerequisites Verification

Before any Azure development:

# Verify Azure CLI
az --version

# Authenticate
az login

# Verify subscription access
az account show

Using MCP Tools

The constitution emphasizes using Azure MCP (Model Context Protocol) tools for best practices:

# Before code generation
# Invoke: mcp_azure_mcp_get_bestpractices
# Parameters: resource="general", action="code-generation"

# Before deployment
# Invoke: mcp_azure_mcp_get_bestpractices  
# Parameters: resource="general", action="deployment"

# For AI agents
# Invoke: aitk-get_agent_code_gen_best_practices

Document Structure

The azure-constitution.md file contains:

  • Core Principles: 11 mandatory patterns for Azure development
  • Development Workflow: Step-by-step guidance with compliance checklists
  • Governance: Amendment process and compliance verification
  • Related Documentation: Links to official Microsoft resources

Compliance Checklist

Before Azure deployment:

  • Azure CLI installed and authenticated
  • Azure MCP best practices invoked
  • No hardcoded credentials or URLs
  • Managed Identity configured
  • Application Insights enabled
  • Bicep templates using Azure Verified Modules
  • Resources properly tagged
  • Health checks implemented

Contributing

This constitution uses semantic versioning:

  • MAJOR: Breaking changes to principles or patterns
  • MINOR: New principles or expanded guidance
  • PATCH: Clarifications, typos, non-semantic refinements

Changes require:

  1. Architecture decision record with rationale
  2. Impact assessment on existing patterns
  3. Approval from architecture/platform team

Related Resources

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For questions or issues:

  • Open an issue in this repository
  • Refer to official Azure documentation via MCP tools
  • Consult Azure Architecture Center for patterns

Version: 1.0.0 | Last Updated: November 18, 2025

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published