azure-sdk-for-cpp / azure-storage-files-shares
AGENTS.md206 starsChanged 8 months agoMITView on GitHub
Guidance for AI agents working in sdk/storage/azure-storage-files-shares. This file applies to: It extends sdk/storage/AGENTS.md with Azure Files (SMB/NFS cloud file share) specific guidance. Typical client hierarchy includes: Handles, permissions, and snapshots are exposed through these clients rather than separate client types. Preserve consistency of this hierarchy and existing naming conventions. When modifying file shares code, cover: Add boundary tests for empty files, large ranges, nested paths, and existing/non-existing resources. Flag for maintainer review when changes include:
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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- sdk/storage/AGENTS.mdAGENTS.md
- sdk/storage/azure-storage-blobs/AGENTS.mdAGENTS.md
- sdk/storage/azure-storage-files-datalake/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
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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
- Distinctive: line 56
Keep directory/file client responsibilities well separated.
- Distinctive: line 64
When modifying file shares code, cover:
- Distinctive: line 74
Add boundary tests for empty files, large ranges, nested paths, and existing/non-existing resources.
- Distinctive: line 80
Do not break public client/type names or existing method contracts.
- Distinctive: line 81
Keep changes additive when possible.
- Distinctive: line 88
Avoid unnecessary buffering/copies for large file/range operations.
- Distinctive: line 89
Keep retries safe for range writes and other potentially non-idempotent calls.
- Distinctive: line 90
Avoid adding extra service calls in common path operations.
≈ “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
Guidance for AI agents working in sdk/storage/azure-storage-files-shares.
Scope
This file applies to:
sdk/storage/azure-storage-files-shares/**
It extends sdk/storage/AGENTS.md with Azure Files (SMB/NFS cloud file share) specific guidance.
File Shares Domain Model (mental map)
Typical client hierarchy includes:
- ShareServiceClient (service/account scope)
- ShareClient (share scope)
- ShareDirectoryClient and ShareFileClient (path/item scope)
- ShareLeaseClient (share/file lease operations)
Handles, permissions, and snapshots are exposed through these clients rather than separate client types.
Preserve consistency of this hierarchy and existing naming conventions.
File Shares-Specific Concepts to Preserve
- Share vs directory vs file operation boundaries.
- Create/update ranges and sparse file range semantics.
- Handles/sessions management operations where exposed.
- SMB/NFS-relevant properties (permissions/attributes/protocol-oriented metadata as applicable).
- Snapshots of shares and snapshot-targeted operations.
- Quota/provisioning properties and service/share-level settings.
- Rename semantics, including changing the parent path within the same share, where available.
Common Pitfalls (avoid)
- Confusing blob-style operations with file share path/range behaviors.
- Incorrect range write/clear behavior or off-by-one range boundaries.
- Regressing directory traversal/listing with large shares.
- Breaking snapshot-aware request targeting.
- Mis-handling path normalization/encoding for nested directories.
Implementation Guidance
- Reuse existing request builders and models for range operations.
- Keep directory/file client responsibilities well separated.
- Preserve existing option structs and overload patterns.
- Align error handling with current file shares conventions and azure-core patterns.
Testing Focus Areas
When modifying file shares code, cover:
- Share create/delete/get properties flows.
- Directory and file CRUD operations.
- Range upload/clear/download behavior.
- Listing and paging continuation.
- Snapshot create/list/targeting behavior (if touched).
- Protocol/permission-related operations (if touched).
- Error-path behavior and condition headers.
Add boundary tests for empty files, large ranges, nested paths, and existing/non-existing resources.
API & Compatibility Guardrails
- Do not break public client/type names or existing method contracts.
- Keep changes additive when possible.
- Preserve behavioral expectations for range and path operations.
Performance & Reliability Expectations
- Avoid unnecessary buffering/copies for large file/range operations.
- Keep retries safe for range writes and other potentially non-idempotent calls.
- Avoid adding extra service calls in common path operations.
Review Triggers
Flag for maintainer review when changes include:
- Range write/read logic
- Snapshot handling
- Permission/attribute semantics
- Rename semantics, including parent-path changes
- Public API changes
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.

