Automates end-to-end creation, validation, and maintenance of Azure Developer CLI (azd) templates using Squad -- an AI agent team framework for GitHub Copilot.
This squad reduces template creation from 6-8 weeks to hours by orchestrating 10 specialized AI agents that encode template engineering best practices. It supports:
- Non-AI templates (web apps, APIs, microservices, serverless) for the awesome-azd gallery
- AI templates (RAG, chat, agents) for the ai-app-templates gallery
- Foundry templates using AI Foundry model catalog
- Node.js >= 20
- GitHub Copilot access
- Squad CLI:
npm install -g @bradygaster/squad-cli - GitHub CLI:
gh auth login
git clone <this-repo>
cd template-creation-squad
npm install# Start the squad
squad
# In the squad shell, describe what you want:
@lead, create a RAG chat template with Python FastAPI, Azure OpenAI, AI Search, and Container Apps. Use --ai mode targeting both galleries.
# Or for a non-AI template:
@lead, create a REST API template with Node Express, Cosmos DB, and Container Apps. Target awesome-azd gallery.
# Or for a Foundry template:
@lead, create a chat completion template using AI Foundry models with .NET and App Service. Use --foundry mode.copilot --agent squad --yoloThen describe your template scenario. The squad coordinates all agents automatically.
| Agent | Role | Handles |
|---|---|---|
| lead | Template Architect | Scenario analysis, service selection, architecture decisions |
| infra | Infrastructure Engineer | Bicep modules, managed identity, Key Vault, RBAC |
| app | Application Developer | Source code, Docker, tests, SDK integration |
| azd | AZD Specialist | azure.yaml, devcontainer, hooks, GitHub Actions |
| security | Security Reviewer | Credential scanning, RBAC audit, OSSF readiness |
| docs | Documentation Writer | README, architecture diagrams, guides |
| validator | Quality Assurance | Template Doctor checks (6 categories, 30+ rules) |
| foundry | AI Model Specialist | Azure OpenAI and Foundry patterns |
| gallery | Gallery Manager | Metadata for ai-app-templates and awesome-azd |
| scribe | Memory Manager | Decision tracking, cross-session learning |
The squad follows a 7-phase workflow:
1. Scenario Analysis @lead analyzes requirements, creates template spec
2. Infrastructure @infra writes Bicep, @security reviews (parallel)
3. Application Code @app writes source, Docker, tests (parallel)
4. AZD Integration @azd creates azure.yaml, devcontainer, workflows
5. Documentation @docs writes README, guides, diagrams
6. Validation @validator runs Template Doctor suite, iterates on failures
7. Gallery Preparation @gallery creates metadata for target gallery(ies)
| Mode | Flag | Target Gallery | Includes AI |
|---|---|---|---|
| Non-AI (default) | (none) | awesome-azd | No |
| AI | --ai |
ai-app-templates + awesome-azd | Azure OpenAI, AI Search |
| Foundry | --foundry |
ai-app-templates + awesome-azd | AI Foundry model catalog |
The squad enforces 35+ best practices distilled from the azure-search-openai-demo gold standard and Template Doctor validation rules:
- Managed Identity everywhere -- no connection strings, no access keys
- Key Vault for secrets -- RBAC-based access, not access policies
- Least-privilege RBAC -- specific role GUIDs, not Contributor/Owner
- Storage hardening -- no public blobs, no shared key access, TLS 1.2
- OpenAI key-less -- disableLocalAuth: true
- OIDC in CI/CD -- federated identity, no secrets in GitHub Actions
- Dual hosting -- App Service and Container Apps support
- Cost transparency -- document every service with pricing
- Architecture diagrams -- visual service topology in every README
template-creation-squad/
squad.config.ts # Squad definition (agents, routing, team)
.squad/ # Squad runtime state
agents/ # Agent charters (expertise + best practices)
lead/charter.md # Template Architect
infra/charter.md # Infrastructure Engineer (27KB of Bicep patterns)
app/charter.md # Application Developer
azd/charter.md # AZD Integration Specialist
security/charter.md # Security Reviewer
docs/charter.md # Documentation Writer
validator/charter.md # Quality Assurance
foundry/charter.md # AI Model Specialist
gallery/charter.md # Gallery Submission Manager
team.md # Squad roster
routing.md # Work routing rules
decisions.md # Accumulated decisions
scaffolds/ # Reusable template scaffolds
shared/ # Shared across all frameworks
infra/core/ # Bicep modules (security, host, storage, ai, monitor, data)
.devcontainer/ # Codespaces configuration
.github/workflows/ # CI/CD with OIDC
.env.example # Environment variable template
SECURITY.md # Microsoft security policy
CONTRIBUTING.md # Contributing guide
CODE_OF_CONDUCT.md # Code of conduct
LICENSE # MIT
python-fastapi/ # Python FastAPI scaffold
node-express/ # Node Express TypeScript scaffold
dotnet-aspnet/ # .NET ASP.NET Core scaffold
test-scenarios/ # 7 validation scenarios (AI + non-AI mix)
docs/ # Integration documentation
template-doctor-integration.md
scout-evaluation-integration.md
| Tool | Purpose | Integration |
|---|---|---|
| Template Doctor | 30+ validation checks across 6 categories | Validator agent encodes all rules; API available for automated checks |
| Scout | E2E experience evaluation (5 phases) | Post-creation developer experience assessment |
| Sensei | Copilot Skill compliance scoring | If template includes skills |
| Waza | Skill trigger accuracy testing | If template includes skills |
| Beacon | Azure product knowledge (270+ agents) | Informs scenario design and service selection |
See CONTRIBUTING.md for development setup.
MIT