Contributing
Overview
Contributions to the Azure Foundry Enterprise Kit are welcome from internal teams and authorized partners. All contributions must align with Azure AI Foundry patterns, use the azure-ai-projects SDK 2.0, and follow the Foundry Toolbox MCP integration model. This guide covers the development workflow, coding standards, and review process.
Development Setup
# Clone and install
git clone https://github.com/your-org/azure-foundry-enterprise-kit.git
cd azure-foundry-enterprise-kit
# Python environment
python -m venv .venv
source .venv/bin/activate
pip install -e ".[adapters,dev]"
# Run tests
pytest tests/ -v --cov
# Lint
ruff check .
mypy trust-extensions/ adapters/Project Structure
adapters/— MCP adapters (Python, FastAPI)agent-templates/— Agent blueprints (YAML manifests + prompts)eval-packs/— Evaluators and datasetsinfra/bicep/— Infrastructure as Codepolicy-packs/— Declarative governance policiessdk-starters/— Python and TypeScript SDK clientstrust-extensions/— Decision Ledger, Scorecard, Cert Pipelineobservability/— Monitoring workbooks and KQL queriestests/— Test suite (pytest)website/— Documentation website (Next.js + Carbon)
Coding Standards
Python
- Python 3.11+ required
- Ruff for linting (line length: 120)
- MyPy for type checking (strict mode for trust-extensions)
- Pytest for testing (coverage gate: 60%)
- Async-first for all adapters and trust extensions
- Use
azure-ai-projectsSDK 2.0 for all Foundry interactions - Use
azure-identity(DefaultAzureCredential) for authentication
TypeScript
- TypeScript 5.x strict mode
- ESLint with Next.js config for website
- Azure AI Projects SDK patterns
Bicep
- Subscription-scoped deployments
- Module-per-resource pattern (10 modules in
infra/bicep/modules/) - Parameter files per environment (dev, staging, prod)
- No hardcoded secrets — Azure Key Vault references only
- Private endpoints and VNet integration for all data-plane services
- Managed identity for all service-to-service authentication
Pull Request Process
- Create a feature branch from
main - Make changes following coding standards
- Add/update tests for any new functionality
- Run
pytest tests/ -v --covand ensure coverage gate passes - Run
ruff check .and fix any issues - Update documentation if behavior changes
- Submit PR with clear description
- Address review feedback
Adding a New Adapter
- Create directory under
adapters/<system-name>/ - Implement FastAPI app with
/mcp/tools,/mcp/call,/health - Define
MCP_TOOL_SCHEMASlist and_TOOL_HANDLERSdict - Implement Azure Cache for Redis-backed token caching, secrets from Azure Key Vault
- Register adapter in Foundry Toolbox with appropriate MCP Auth pattern
- Add tests in
tests/test_adapters.py - Update
docs/ADAPTERS.mdand website docs
Adding a New Trust Extension
- Create module in
trust-extensions/ - Follow async patterns from existing extensions
- Add Azure Cosmos DB schema if persistence needed
- Wire telemetry to Azure Application Insights
- Register in
trust-extensions/__init__.py - Add tests and documentation