azure-sdk-for-go
AGENTS.md1.9k starsChanged 8 months agoMITView on GitHub
This file provides guidance for AI agents (e.g., GitHub Copilot, MCP, or LLM-based assistants) interacting with the Azure SDK for Go repository. For a comprehensive overview of this repository, see the README.md. AI agents can assist with the following activities: AI agents should NOT perform the following actions without human approval: For modules with tsp-location.yaml:
- Reads credentials
- Installs packages
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about Azure/azure-sdk-for-go
- hashicorp/terraform-provider-azurerm“Support for Flux v2 AKS cluster extension”GitHub · Jan 18, 2022 · 120 reactions
- hashicorp/terraform-provider-azurerm“New Resource request: Azure Data Factory”GitHub · Aug 3, 2018 · 78 reactions
- hashicorp/terraform-provider-azurerm“Support for Azure Red Hat OpenShift (ARO)”GitHub · Jun 7, 2019 · 77 reactions
- hashicorp/terraform-provider-azurerm“New Resource request: Network Watcher Flow Log”GitHub · Aug 15, 2018 · 74 reactions
- hashicorp/terraform-provider-azurerm“Storage Soft Delete Support”GitHub · Apr 4, 2018 · 65 reactions
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub (9 times).
On GitHub · 9
- Jan 18, 2022Support for Flux v2 AKS cluster extension — hashicorp/terraform-provider-azurerm120 reactions · 17 comments
- Aug 3, 2018New Resource request: Azure Data Factory — hashicorp/terraform-provider-azurerm78 reactions · 8 comments
- Jun 7, 2019Support for Azure Red Hat OpenShift (ARO) — hashicorp/terraform-provider-azurerm77 reactions · 12 comments
- Aug 15, 2018New Resource request: Network Watcher Flow Log — hashicorp/terraform-provider-azurerm74 reactions · 14 comments
- Apr 4, 2018Storage Soft Delete Support — hashicorp/terraform-provider-azurerm65 reactions · 12 comments
4 more on GitHub
- Apr 13, 2022Issue with the size of the API surface of the models package — microsoftgraph/msgraph-sdk-go53 reactions · 105 comments
- Sep 13, 2019AKS: support setting cluster outbound IPs when using standard loadbalancer — hashicorp/terraform-provider-azurerm50 reactions · 4 comments
- May 17, 2022Support for additional properties in azurerm_api_connection — hashicorp/terraform-provider-azurerm42 reactions · 7 comments
- Jun 25, 2019Logic App: Add callback url as attribute of http request trigger — hashicorp/terraform-provider-azurerm37 reactions · 12 comments
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- code-reviewSkill
- upgrade-emitter-versionSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
29 rules. About 0 are common, 21 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 28
Testing: Write or update unit tests using github.com/stretchr/testify
- Very specific: line 29
Examples: Create example code in example*_test.go files following the Go examples guidelines
- Distinctive: line 33
Code comments: Add or improve GoDoc comments following documentation style
- Distinctive: line 34
CHANGELOG updates: Document changes in CHANGELOG.md files
- Very specific: line 46
Triggering releases: Only humans should use CheckPackageReleaseReadiness and ReleasePackage MCP tools
- Distinctive: line 55
Security issues: Must be reported privately to <secure@microsoft.com>, not in public issues
- Distinctive: line 56
License changes: No modifications to licensing without explicit approval
- Very specific: line 139
Use github.com/stretchr/testify for assertions (require when the rest of the test depends on the result, assert otherwise)
- Very specific: line 141
Look for recording.Getenv() or os.Getenv() calls to find required environment variables
- Distinctive: line 155
All Go files should have a copyright header
- Very specific: line 163
Stack Overflow: Ask questions with tags azure and go
- Distinctive: line 168
Use CODEOWNERS file to find module owners
- Distinctive: line 176
Read before writing: Always review existing code and documentation before suggesting changes
- Distinctive: line 178
Test assertions: Use the same testing patterns as existing tests
- Distinctive: line 179
Small changes: Prefer small, focused changes over large refactorings
- Distinctive: line 182
Verify compatibility: Ensure changes don't break backward compatibility without explicit approval
- Distinctive: line 186
When assisting with code reviews:
- Distinctive: line 188
Check compliance with Azure Go SDK Guidelines
- Distinctive: line 189
Verify tests are comprehensive and use proper assertions
- Distinctive: line 190
Ensure documentation is complete and accurate
- Distinctive: line 191
Check for potential breaking changes
- Distinctive: line 192
Verify CHANGELOG entries describe the changes clearly
- Distinctive: line 193
Look for security concerns or potential issues
- Distinctive: line 197
When working with tests:
- Distinctive: line 199
Run tests locally before suggesting they're complete
- Very specific: line 200
Check for required environment variables in .env files
- Very specific: line 201
Use github.com/stretchr/testify for assertions rather than hand-rolled checks.
- Distinctive: line 202
Ensure tests are repeatable and don't depend on external state
- Distinctive: line 203
Add error messages to assertions to help debugging
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides guidance for AI agents (e.g., GitHub Copilot, MCP, or LLM-based assistants) interacting with the Azure SDK for Go repository.
Repository Overview
For a comprehensive overview of this repository, see the README.md.
Key Documentation
- Main README - Getting started, package information, and repository structure
- Contributing Guide - Contribution guidelines and PR requirements
- Developer Setup - Environment setup for SDK development
- Release Documentation - Package release process
- Copilot Instructions - Copilot-specific guidance
Go Version Support
The SDK is compatible with the two most recent major Go releases, following Go's official support policy.
Agent Capabilities and Boundaries
Supported Actions
AI agents can assist with the following activities:
Code Development
- Reading and understanding code: Browse SDK packages, understand APIs, and explain functionality
- Code suggestions: Propose improvements, bug fixes, or new features following Azure Go SDK Guidelines
- Testing: Write or update unit tests using
github.com/stretchr/testify - Examples: Create example code in
example*_test.gofiles following the Go examples guidelines
Documentation
- README updates: Improve module READMEs and documentation
- Code comments: Add or improve GoDoc comments following documentation style
- CHANGELOG updates: Document changes in CHANGELOG.md files
Issue and PR Management
- Issue triage: Review issues, suggest labels, identify duplicates
- PR review assistance: Analyze PRs, suggest improvements, check for guideline compliance
- Question answering: Help developers with SDK usage questions
Automation Boundaries
AI agents should NOT perform the following actions without human approval:
Build and Release
- Triggering releases: Only humans should use
CheckPackageReleaseReadinessandReleasePackageMCP tools - Modifying CI/CD pipelines: Changes to
ci.yml, Azure Pipelines configurations, or workflow files require careful review - Approving releases: Release stage approvals in pipelines must be done by authorized humans
Code Generation
- Regenerating SDK code: Most packages in
sdk/are generated from Azure API specs using TypeSpec and should not be manually modified - TypeSpec changes: SDK generation from specifications requires specific tools and workflows (see code generation docs)
Security and Compliance
- Security issues: Must be reported privately to secure@microsoft.com, not in public issues
- License changes: No modifications to licensing without explicit approval
Key Workflows
Development Workflow
# Navigate to the SDK module you want to work with
cd sdk/azcore # or any other module
# Build the module
go build ./...
# Run tests
go test ./...TypeSpec/Code Generation Workflow
For modules with tsp-location.yaml:
# Install prerequisites
npm install -g @typespec/compiler
npm install -g @azure-tools/typespec-client-generator-cli
# Navigate to the module directory
cd sdk/<service>/<module>
# Regenerate the SDK from TypeSpec
tsp-client updateSee TypeSpec location instructions for details.
Contributing Workflow
For detailed contribution guidelines, see CONTRIBUTING.md.
Key steps:
- Fork and clone the repository
- Create a feature branch from
main - Make changes following the Go SDK Guidelines
- Add tests to ensure CI catches future regressions
- Update documentation (README, CHANGELOG, examples)
- Run tests locally to verify changes
- Submit a PR with a descriptive title and reference to related issues
- Address review feedback in additional commits
PR Review Checklist
For comprehensive PR requirements, see the Pull Requests section in CONTRIBUTING.md.
Agents can help verify PRs meet key requirements:
- Code follows Go SDK Guidelines
- Tests are added/updated with proper assertions
- CHANGELOG.md is updated with changes
- Examples are provided for new APIs
- All CI checks pass
SDK-Specific Automation
Module Structure
Most SDK modules follow this structure:
sdk/<service>/<module>/
├── ci.yml # CI/CD pipeline configuration
├── CHANGELOG.md # Version history and changes
├── README.md # Module documentation
├── go.mod # Go module dependencies
├── *_client.go # Client implementation
├── models.go # Data models
├── options.go # Client options
├── responses.go # Response types
├── *_test.go # Unit tests
├── example*_test.go # Example code
└── testdata/ # Test fixturesTest Conventions
- Use
github.com/stretchr/testifyfor assertions (requirewhen the rest of the test depends on the result,assertotherwise) - Environment variables for live testing go in
.envfiles at module root - Look for
recording.Getenv()oros.Getenv()calls to find required environment variables - See Go tests guidelines
Go Module Standards
- go.mod should only have direct references to:
- Azure SDK modules (
github.com/Azure/azure-sdk-for-go/sdk/...) golang.org/x/...modules
- Azure SDK modules (
- Exception:
github.com/stretchr/testifycan be an indirect dependency - See Go mod standards
Code Standards
- Acronyms in exported names should be uppercased (e.g.,
UserID, notUserId) - All Go files should have a copyright header
- Error handling should use descriptive messages
- See Go code guidelines
Communication Channels
Getting Help
- Issues: File issues via GitHub Issues
- Stack Overflow: Ask questions with tags
azureandgo - Slack: Chat in #Azure SDK channel on Gophers Slack
- Teams: Contact the Go team via "Language - Go" channel under "Azure SDK" team
Code Ownership
- Use CODEOWNERS file to find module owners
- Owners may be listed for parent folders due to wildcards
- Service owners handle issues; source owners handle PRs
Safety and Best Practices
For AI Agents
- Read before writing: Always review existing code and documentation before suggesting changes
- Follow patterns: Match the style and patterns used in the repository
- Test assertions: Use the same testing patterns as existing tests
- Small changes: Prefer small, focused changes over large refactorings
- Explain decisions: Provide context for why changes are being suggested
- Reference guidelines: Link to relevant guidelines when suggesting changes
- Verify compatibility: Ensure changes don't break backward compatibility without explicit approval
For Code Reviews
When assisting with code reviews:
- Check compliance with Azure Go SDK Guidelines
- Verify tests are comprehensive and use proper assertions
- Ensure documentation is complete and accurate
- Check for potential breaking changes
- Verify CHANGELOG entries describe the changes clearly
- Look for security concerns or potential issues
For Testing
When working with tests:
- Run tests locally before suggesting they're complete
- Check for required environment variables in
.envfiles - Use
github.com/stretchr/testifyfor assertions rather than hand-rolled checks; preferrequirewhen later code depends on the assertion holding, andassertfor independent checks - Ensure tests are repeatable and don't depend on external state
- Add error messages to assertions to help debugging
Additional Resources
Azure SDK Guidelines
- Azure Go SDK Guidelines - Primary reference for SDK development
- API Design Guidelines - API design principles
Documentation
- Developer Setup - Machine setup for development
- Release Guidelines - Package release process
- Migration Guide - Migrating from track 1 to track 2
- Breaking Changes Guide - Handling breaking changes
Tools and Automation
- Code Generation - SDK generation from specs
- Engineering System - Build and CI/CD systems
Version History
This AGENTS.md file follows the emerging AGENTS.md standard to provide consistent AI agent guidance across Azure SDK repositories.
Maintainers: Azure SDK Go Team
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

