agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-rust/sdk/core/AGENTS.md

azure-sdk-for-rust / core

AGENTS.md887 starsChanged 29 days agoMITView on GitHub

These rules apply in addition to the repository root AGENTS.md.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

15 rules. About 0 are common, 4 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Treat sdk/core as an ordered stack: typespec -> typespec_client_core -> azure_core.

    line 7
  2. Very specific:

    If a higher crate is bumped only because of a propagated dependency change, its CHANGELOG.md should still mention that dependency-driven …

    line 20
  3. Very specific:

    Keep versions for sdk/core dependencies managed from the root workspace Cargo.toml.

    line 24
  4. Very specific:

    Prefer workspace = true in sdk/core crate manifests when inheriting workspace-managed dependencies.

    line 25
  5. Very specific:

    When evaluating a release, focus on normal [dependencies] that affect the published crate.

    line 26
  6. Distinctive:

    Keep crates in next-release state in their own manifests.

    line 28
  7. Distinctive:

    When changing one side of a test/example graph to local source, check all directly exchanged public types in that graph and keep them on …

    line 35
  8. Distinctive:

    Keep stubbed example APIs small and shaped like the public APIs they stand in for, but do not add real behavior unless tests need it.

    line 40
  9. Very specific:

    If a compile-only test needs just one or two service types and would otherwise mix published and local azure_core graphs, prefer a tiny …

    line 43
  10. Distinctive:

    Use "Resource Manager", not "ARM", in public documentation.

    line 47
  11. Very specific:

    Put Resource Manager (ARM)-specific functionality in existing azure_core modules where appropriate.

    line 48
  12. Very specific:

    Use resource_manager in module, field, function, and method names.

    line 49
  13. Very specific:

    When names collide, prefer a resource_manager submodule gated by the unstable_resource_manager feature, such as …

    line 50
  14. Very specific:

    Import azure_core::cloud::resource_manager::CloudConfigurationExt as _ in generated and hand-written ARM constructors to call endpoint(), …

    line 52
  15. Very specific:

    Read the caller's CloudConfiguration from client options in Resource Manager constructors.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

Core SDK Instructions

These rules apply in addition to the repository root AGENTS.md.

Semver Propagation

  • Treat sdk/core as an ordered stack: typespec -> typespec_client_core -> azure_core.
  • typespec_client_core re-exports public APIs from typespec; azure_core re-exports public APIs typespec_client_core with few exceptions.
  • A semver-relevant change in a lower crate requires at least the same bump in each higher crate.
  • A lower crate may force a higher bump, but a higher crate can still require a larger bump because of its own public API changes.
  • A new public feature in typespec requiring 1.0.x -> 1.1.0 means typespec_client_core and azure_core must be at least 1.1.0.
  • A new public feature in typespec_client_core requiring 1.0.x -> 1.1.0 means azure_core must be at least 1.1.0.
  • A breaking change in typespec requiring 2.0.0 means typespec_client_core and azure_core must be at least 2.0.0.

Changelog Propagation

  • Reflect typespec changelog changes in typespec_client_core when they affect its shipped dependency surface or release decision.
  • Reflect typespec_client_core changelog changes in azure_core when they affect its shipped dependency surface or release decision.
  • If a higher crate is bumped only because of a propagated dependency change, its CHANGELOG.md should still mention that dependency-driven update.

Dependencies and Versioning

  • Keep versions for sdk/core dependencies managed from the root workspace Cargo.toml.
  • Prefer workspace = true in sdk/core crate manifests when inheriting workspace-managed dependencies.
  • When evaluating a release, focus on normal [dependencies] that affect the published crate. Dev-only test/example/doc wiring may remain local unless the same manifest also names that package in normal dependencies.
  • For unreleased local sdk/core dependencies, use the workspace table for the needed path + version entry.
  • Keep crates in next-release state in their own manifests; manage cross-crate version wiring from the workspace table.

Published vs. unpublished graphs

  • Mixing published and local versions of typespec, typespec_client_core, azure_core, or crates that expose their types can create duplicate-type failures.
  • Cargo also requires a single canonical source for a package within one manifest. If a crate appears in both normal and dev dependencies, do not mix a published source in one entry with a local path in the other.
  • Common breakage looks like mismatched ClientOptions, TokenCredential, or trait implementations that appear identical but come from different crate instances.
  • When changing one side of a test/example graph to local source, check all directly exchanged public types in that graph and keep them on the same crate instance.

Example and documentation stub crates

  • azure_core_examples is a non-published helper crate for compile-only examples and docs. It intentionally depends on local sdk/core/azure_core by path.
  • Keep stubbed example APIs small and shaped like the public APIs they stand in for, but do not add real behavior unless tests need it.
  • Organize identity stubs in azure_core_examples::identity per credential module, mirroring azure_identity where practical, and re-export them from identity/mod.rs.
  • For markdown compile tests, alias helper modules to the public crate names used in docs (for example use azure_core_examples::identity as azure_identity;).
  • If a compile-only test needs just one or two service types and would otherwise mix published and local azure_core graphs, prefer a tiny local stub in that test module over broad dependency rewiring.

Resource Manager

  • Use "Resource Manager", not "ARM", in public documentation. "ARM" is acceptable in code.
  • Put Resource Manager (ARM)-specific functionality in existing azure_core modules where appropriate.
  • Use resource_manager in module, field, function, and method names; use unstable_resource_manager for the Cargo feature and retain azure_resourcemanager_* crate names.
  • When names collide, prefer a resource_manager submodule gated by the unstable_resource_manager feature, such as azure_core::http::poller::resource_manager, over ResourceManager type or variant prefixes; do not re-export its items from parent modules.
  • Enable azure_core's unstable_resource_manager feature and use azure_core::cloud::resource_manager::Audience for custom audience registration in all ARM crates; do not define crate-specific ARM audience markers.
  • Import azure_core::cloud::resource_manager::CloudConfigurationExt as _ in generated and hand-written ARM constructors to call endpoint(), audience(), and default_scope() without audience type parameters. Caller examples configuring CloudConfiguration and CustomConfiguration do not need this trait.
  • Keep each ARM crate's first README client-configuration example as the normal case. Add a second example configuring and using a custom cloud: set CustomConfiguration::authority_host and endpoint, register the ARM audience in Audiences with the shared marker, and use that cloud to configure the credential and client.
  • Read the caller's CloudConfiguration from client options in Resource Manager constructors; use unwrap_or_default() when omitted.
  • Resolve built-in service endpoints and authentication audiences in the library; honor supplied custom-cloud values.

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.