azure-devops-rust-api
CLAUDE.md76 starsChanged 3 months agoMITView on GitHub
Auto-generates a Rust Azure DevOps API crate (azure_devops_rust_api) from the Azure DevOps OpenAPI spec (vsts-rest-api-specs, included as a git submodule). The pipeline is: Do NOT edit generated files directly — they are overwritten by ./build.sh: - azure_devops_rust_api/src/<module>/mod.rs — generated API operations - azure_devops_rust_api/src/<module>/models.rs — generated model types Hand-written source (edit these directly): - azure_devops_rust_api/src/auth.rs — Credential enum (PAT + OAuth) - azure_devops_rust_api/src/date_time.rs — datetime serde helpers - azure_devops_rust_api/src/telemetry.rs — telemetry pipeline policy - azure_devops_rust_api/src/headers.rs — common header helpers - azure_devops_rust_api/src/artifacts_download/…
In this repositoryOne other file it gives its agents.
- SKILL.mdSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 110
No conventional commit prefixes
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repo does
Auto-generates a Rust Azure DevOps API crate (azure_devops_rust_api) from the Azure DevOps OpenAPI spec (vsts-rest-api-specs, included as a git submodule). The pipeline is:
vsts-api-patcher— readsvsts-rest-api-specs/, patches known issues in the OpenAPI JSON, writesvsts-rest-api-specs.patched/autorust— readsvsts-rest-api-specs.patched/, generates Rust source intoazure_devops_rust_api/src/azure_devops_rust_api— the generated crate, compiled and published to crates.io
Commands
Full build (patch → generate → compile)
./build.shBuild individual components
# Run patcher only (from repo root)
cd vsts-api-patcher && cargo run --release && cd ..
# Run code generator only (from repo root)
cd autorust && cargo run --bin ado-autorust --release && cd ..
# Build generated crate
cd azure_devops_rust_api && cargo build --all-features && cd ..Lint
cargo clippy --all-features -- --deny warnings
cargo clippy --all-features --examples -- --deny warningsCheck (faster than build, no generated output)
cd azure_devops_rust_api
cargo check --all-features
cargo check --all-features --examplesPublish to crates.io
./publish.shArchitecture
Key distinction: generated vs. hand-written code
Do NOT edit generated files directly — they are overwritten by ./build.sh:
azure_devops_rust_api/src/<module>/mod.rs— generated API operationsazure_devops_rust_api/src/<module>/models.rs— generated model types
Hand-written source (edit these directly):
azure_devops_rust_api/src/auth.rs—Credentialenum (PAT + OAuth)azure_devops_rust_api/src/date_time.rs— datetime serde helpersazure_devops_rust_api/src/telemetry.rs— telemetry pipeline policyazure_devops_rust_api/src/headers.rs— common header helpersazure_devops_rust_api/src/artifacts_download/— Universal Package download client (dedup protocol)
Code generator internals (autorust/)
autorust/ado-autorust/src/main.rs— entry point; maps each OpenAPI spec file to an output moduleautorust/codegen/src/codegen_operations/— generates API operation code (clients, builders, responses)create_client_and_builder.rs— Pipeline/Transport/RetryOptions usagerequest_builder_send.rs— Pipeline::send() callsrequest_builder_into_future.rs— into_body()/into_model() callsresponse_code.rs— Response type definitions
autorust/codegen/src/codegen_models.rs— generates model structs/enumsautorust/autorust.toml— config for boxed/optional/invalid properties (fixes recursive type issues)
Patcher (vsts-api-patcher/)
src/main.rs— walks spec files, calls patcher, writes patched JSONsrc/patcher.rs— all spec patches; patching logic keyed on spec filename
Generated crate structure
Each Azure DevOps API area is a separate feature-gated module (e.g. git, build, wit). All features are listed in azure_devops_rust_api/Cargo.toml. API version is 7.1.
Updating azure_core / azure_identity
See SKILL.md for the full process. Key files affected by breaking changes:
- Codegen:
autorust/codegen/src/codegen_operations/files (then re-run./build.sh) - Hand-written:
azure_devops_rust_api/src/auth.rs,telemetry.rs,date_time.rs
Releasing
See SKILL.md for the full process. Files to update: azure_devops_rust_api/Cargo.toml (version), azure_devops_rust_api/README.md (version in example snippet), CHANGELOG.md.
Updating the OpenAPI spec submodule
git submodule update --remote vsts-rest-api-specs
git add .
git commit -m "Updated vsts-rest-api-specs to latest revision"
./build.sh
cargo clippy --all-features -- --deny warnings
cargo clippy --all-features --examples -- --deny warningsCommit message style
- Dependency updates:
Update azure_core, azure_identity to X.Y - Releases:
Release X.Y.0 - No conventional commit prefixes
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.

