azure-sdk-for-cpp / storage
AGENTS.md206 starsChanged 8 months agoMITView on GitHub
This file provides guidance for AI agents working in sdk/storage of the Azure SDK for C++ repository. This AGENTS file applies to: This file supplements the repository-root guidance in /AGENTS.md. Agents working in sdk/storage must follow both files: apply root repository-wide policies first, then apply storage-specific guidance from this file. For service-specific guidance, prefer the local AGENTS files: If guidance conflicts, the most local AGENTS file takes precedence. Azure Storage packages in this repo generally follow this layering: 1. azure-core…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- sdk/storage/azure-storage-blobs/AGENTS.mdAGENTS.md
- sdk/storage/azure-storage-files-datalake/AGENTS.mdAGENTS.md
- sdk/storage/azure-storage-files-shares/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-pipeline-troubleshootingSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-releaseSkill
- code-reviewSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
18 rules. About 1 is common, 17 are distinctive, and 0 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
0
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
- Distinctive: line 21
If guidance conflicts, the most local AGENTS file takes precedence.
- Distinctive: line 56
When making changes, prioritize:
- Distinctive: line 70
Follow existing patterns in neighboring storage packages before introducing new abstractions.
- Distinctive: line 72
Keep error handling aligned with azure-core and existing storage behavior.
- Distinctive: line 74
Add or update tests for every functional change.
- Distinctive: line 75
Keep generated code and hand-written code boundaries intact.
- Distinctive: line 79
Don't introduce breaking public API changes without explicit review.
- Distinctive: line 80
Don't duplicate common logic that belongs in storage common.
- Common: line 81
Don't hardcode secrets, account keys, SAS tokens, or connection strings.
- Distinctive: line 82
Don't manually edit generated assets when source-generation workflow is expected.
- Distinctive: line 83
Don't broaden scope into unrelated storage services in one change.
- Distinctive: line 104
Run targeted tests for the modified package.
- Distinctive: line 105
If request/response wire behavior changes, ensure playback/recording compatibility strategy is considered.
- Distinctive: line 106
Prefer narrowly scoped tests over broad suite expansion unless needed.
- Distinctive: line 108
Use PLAYBACK mode for fast validation where applicable, and only require LIVE/RECORD updates when behavior actually changed.
- Distinctive: line 117
Ensure samples/docs remain accurate.
- Distinctive: line 118
Keep includes, namespaces, and public headers aligned with package conventions.
- Distinctive: line 132
Test proxy / recording sanitization policy adjustments.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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 working in sdk/storage of the Azure SDK for C++ repository.
Scope
This AGENTS file applies to:
sdk/storage/**- Cross-cutting storage concepts shared across blobs, file shares, datalake, queues, and storage common.
This file supplements the repository-root guidance in /AGENTS.md.
Agents working in sdk/storage must follow both files: apply root repository-wide policies first, then apply storage-specific guidance from this file.
For service-specific guidance, prefer the local AGENTS files:
sdk/storage/azure-storage-blobs/AGENTS.mdsdk/storage/azure-storage-files-datalake/AGENTS.mdsdk/storage/azure-storage-files-shares/AGENTS.md
If guidance conflicts, the most local AGENTS file takes precedence.
Storage Architecture Basics (C++ SDK)
Azure Storage packages in this repo generally follow this layering:
- azure-core
HTTP pipeline, credentials, retries, diagnostics, policies, transport abstractions. - azure-storage-common
Shared storage primitives (SAS helpers, shared key auth policy integrations, common request/response helpers, shared models). - Service libraries
azure-storage-blobsazure-storage-files-datalakeazure-storage-files-sharesazure-storage-queues
Typical client structure
Storage libraries commonly expose:
- Service clients (account/service-level operations)
- Container/share/filesystem clients (scope-level operations)
- Item clients (blob/file/path/message operations)
- Options/Models for API inputs and outputs
Maintain consistency with existing naming, API style, and option-object patterns.
Agent Priorities
When making changes, prioritize:
- API consistency with surrounding storage clients.
- Minimal diff and surgical edits.
- Backward compatibility for public APIs.
- Tests first/with changes (unit + live/recording updates as needed).
- Documentation and changelog updates where required.
Do / Don't
Do
- Follow existing patterns in neighboring storage packages before introducing new abstractions.
- Reuse shared helpers in
azure-storage-commonwhen appropriate. - Keep error handling aligned with azure-core and existing storage behavior.
- Preserve ABI/API compatibility unless explicitly requested and reviewed.
- Add or update tests for every functional change.
- Keep generated code and hand-written code boundaries intact.
Don't
- Don't introduce breaking public API changes without explicit review.
- Don't duplicate common logic that belongs in storage common.
- Don't hardcode secrets, account keys, SAS tokens, or connection strings.
- Don't manually edit generated assets when source-generation workflow is expected.
- Don't broaden scope into unrelated storage services in one change.
Key Concepts Agents Should Understand
- Authentication modes: Shared Key, SAS, TokenCredential (Microsoft Entra ID via azure-identity).
- SAS types: account SAS, service SAS, user delegation SAS.
- Conditional requests: ETag / match conditions.
- Data integrity: transactional hashes/validation where supported.
- Paging: continuation tokens and pageable responses.
- Retries/timeouts: pipeline retry policies and per-call options.
- Service-version-sensitive behavior: preserve compatibility and existing defaults.
Testing Guidance
Before finalizing changes:
- Build impacted storage package(s).
- Run targeted tests for the modified package.
- If request/response wire behavior changes, ensure playback/recording compatibility strategy is considered.
- Prefer narrowly scoped tests over broad suite expansion unless needed.
Use PLAYBACK mode for fast validation where applicable, and only require LIVE/RECORD updates when behavior actually changed.
Expected Change Hygiene
For non-trivial changes:
- Update package
CHANGELOG.md. - Ensure samples/docs remain accurate.
- Keep includes, namespaces, and public headers aligned with package conventions.
- Validate CMake updates are minimal and correctly scoped to the package.
Escalation / Human Review Triggers
Flag for maintainer review if change involves:
- Public API shape changes.
- Authentication/signing logic.
- Retry/pipeline policy semantics.
- Cross-package refactors in multiple storage libraries.
- Service-version default changes.
- Test proxy / recording sanitization policy adjustments.
Quick Checklist for Agents
- Scope confirmed to correct storage package.
- Followed nearest existing code pattern.
- Added/updated tests.
- No secrets introduced.
- No unintended public API break.
- Changelog/docs updated (if applicable).
- Build and targeted tests pass locally/CI.
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.

