agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-cpp/sdk/storage/azure-storage-files-shares/AGENTS.md

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:

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
  1. Distinctive:

    Keep directory/file client responsibilities well separated.

    line 56
  2. Distinctive:

    When modifying file shares code, cover:

    line 64
  3. Distinctive:

    Add boundary tests for empty files, large ranges, nested paths, and existing/non-existing resources.

    line 74
  4. Distinctive:

    Do not break public client/type names or existing method contracts.

    line 80
  5. Distinctive:

    Keep changes additive when possible.

    line 81
  6. Distinctive:

    Avoid unnecessary buffering/copies for large file/range operations.

    line 88
  7. Distinctive:

    Keep retries safe for range writes and other potentially non-idempotent calls.

    line 89
  8. Distinctive:

    Avoid adding extra service calls in common path operations.

    line 90

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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:

  1. Share create/delete/get properties flows.
  2. Directory and file CRUD operations.
  3. Range upload/clear/download behavior.
  4. Listing and paging continuation.
  5. Snapshot create/list/targeting behavior (if touched).
  6. Protocol/permission-related operations (if touched).
  7. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.