Thank you for your interest in contributing to the Three Horizons Accelerator! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
This project follows a standard code of conduct. Please be respectful and constructive in all interactions.
- Azure subscription with appropriate permissions
- GitHub account
- Git configured with GPG signing (recommended)
- Tools installed:
- Terraform >= 1.5.0
- Azure CLI >= 2.50
- kubectl >= 1.28
- Helm >= 3.12
- Python >= 3.11 (for scripts)
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR-USERNAME/agentic-devops-platform.git cd agentic-devops-platform -
Add upstream remote:
git remote add upstream https://github.com/ORIGINAL-OWNER/agentic-devops-platform.git
Pre-commit hooks ensure code quality and security before commits. This is the most important step for contributing.
# Quick setup (pre-commit only)
./scripts/setup-pre-commit.sh
# Full setup with all tools
./scripts/setup-pre-commit.sh --install-toolsWhat the hooks check:
| Category | Checks |
|---|---|
| Terraform | Format, validate, TFLint, TFSec, Checkov, Terraform-docs |
| Shell | ShellCheck, shfmt formatting |
| Kubernetes | Kubeconform validation |
| YAML/JSON | Syntax validation, yamllint |
| Markdown | markdownlint |
| Python | Black, isort, Flake8 |
| Secrets | Gitleaks, detect-secrets |
| Commits | Conventional commit format |
Manual hook commands:
# Run all hooks on all files
pre-commit run --all-files
# Run specific hook
pre-commit run terraform_fmt --all-files
# Update hooks to latest versions
pre-commit autoupdate
# Skip hooks (emergency only - not recommended)
git commit --no-verify -m "message"# Verify Terraform
terraform version
# Verify Azure CLI
az versionaz login
az account set --subscription "your-subscription-id"cd terraform
terraform init -backend=falseUse descriptive branch names:
feature/add-new-module- New featuresfix/networking-issue- Bug fixesdocs/update-readme- Documentationrefactor/improve-aks-module- Refactoring
Follow conventional commits:
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationrefactor: Code refactoringtest: Adding testschore: Maintenance tasksci: CI/CD changesinfra: Infrastructure changes
Examples:
feat(aks): add support for spot node pools
Add configuration for Azure Spot VMs in AKS node pools
to reduce costs for non-critical workloads.
Closes #123
git checkout -b feature/your-feature- Write clean, well-documented code
- Follow coding standards
- Add tests if applicable
- Update documentation
# Terraform validation
cd terraform
terraform fmt -recursive
terraform validate
# Run scripts
./scripts/validate-deployment.sh --dry-rungit add .
git commit -m "feat(scope): your change description"
git push origin feature/your-feature- Use the PR template
- Fill in all sections
- Link related issues
- Request reviews from appropriate teams
- Respond to all comments
- Make requested changes
- Re-request review when ready
# Use consistent naming
resource "azurerm_resource_group" "main" {
name = "${var.project_name}-${var.environment}-rg"
location = var.location
tags = local.common_tags
}
# Document variables
variable "environment" {
type = string
description = "Environment name (dev, staging, prod)"
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}apiVersion: apps/v1
kind: Deployment
metadata:
name: my-service
labels:
app.kubernetes.io/name: my-service
app.kubernetes.io/instance: my-service-prod
app.kubernetes.io/version: "1.0.0"
spec:
# Always set resource limits
containers:
- name: my-service
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi#!/usr/bin/env bash
set -euo pipefail
# Script description
# Usage: ./script.sh [options]
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
main() {
# Implementation
}
main "$@"# Format check
terraform fmt -check -recursive
# Validate
terraform validate
# Plan (with test variables)
terraform plan -var-file=test.tfvars# ShellCheck
shellcheck scripts/*.sh
# Test execution
./scripts/validate-deployment.sh --dry-run- Verify all links work
- Check markdown formatting
- Ensure examples are accurate
- Adding new features
- Changing existing behavior
- Adding new modules or templates
- Updating configuration options
| File | Purpose |
|---|---|
README.md |
Project overview |
AGENTS.md |
Agent System Overview (17 Copilot Chat Agents) |
docs/guides/*.md |
Comprehensive guides |
module/README.md |
Module-specific docs |
- Use clear, concise language
- Include code examples
- Add diagrams where helpful (Mermaid)
- Keep up to date with code changes
- Questions: Open a Discussion
- Bugs: Open an Issue with the bug template
- Features: Open an Issue with the feature template
- Security: See SECURITY.md
Contributors will be recognized in:
- Release notes
- CONTRIBUTORS.md (for significant contributions)
- Project documentation
Thank you for contributing to the Three Horizons Accelerator!