AGENTS.md
AGENTS.mdAGENTS.mdroot
Quality
84/100
Scores the file, not the repository.Length
560 words
17 headings · 1 code blocksRepository
14k
— · pushed 0 days agoLast changed
2 days ago
First indexed 2 days ago.1# Coding Agent Instructions23This file provides guidance to agents when working with code in this repository.45## Build Commands67```bash8# Full build (clean, restore, build, test, package)9./build.ps11011# Build only (no tests)12dotnet build1314# Run all tests15dotnet test1617# Run a specific test project18dotnet test ./test/Polly.Core.Tests/Polly.Core.Tests.csproj1920# Run a single test by filter21dotnet test ./test/Polly.Core.Tests --filter "FullyQualifiedName~CircuitBreakerTests"2223# Run tests for a specific framework24dotnet test ./test/Polly.Core.Tests --framework net10.02526# Mutation testing27./build.ps1 -Target MutationTestsCore28./build.ps1 -Target MutationTestsExtensions29./build.ps1 -Target MutationTestsLegacy30./build.ps1 -Target MutationTestsRateLimiting31./build.ps1 -Target MutationTestsTesting32```3334Lint runs in CI via GitHub Actions workflows (actionlint, zizmor, PSScriptAnalyzer).3536Linting for C# is enabled through analyzers configured to run during the build process.3738## Architecture3940Polly is a .NET resilience library. Version 8+ (`Polly.Core`) is a complete redesign; `Polly` (the root package) is the legacy pre-v8 API kept for backwards compatibility.4142### Core abstractions (`src/Polly.Core`)4344- **`ResiliencePipeline`** / **`ResiliencePipeline<T>`** — the main user-facing type. Wraps one or more strategies and executes them in sequence.45- **`ResiliencePipelineBuilder`** / **`ResiliencePipelineBuilder<T>`** — fluent builder used to compose strategies.46- **`ResilienceStrategy`** / **`ResilienceStrategy<T>`** — base class for all built-in and custom strategies.47- **`ResilienceContext`** — per-execution context flowing through the pipeline (cancellation token, properties, result type, etc.).4849### Built-in strategies5051Strategies split into two categories:5253**Reactive** (respond to failures):5455- `RetryResilienceStrategy` — configurable backoff, jitter, attempt limits56- `CircuitBreakerResilienceStrategy` — state machine: Closed → Open → HalfOpen57- `FallbackResilienceStrategy` — returns an alternative value/action on failure58- `HedgingResilienceStrategy` — fires parallel attempts and returns the fastest success5960**Proactive** (prevent overload):6162- `TimeoutResilienceStrategy` — bounds execution duration63- `RateLimiterResilienceStrategy` (in `Polly.RateLimiting`) — wraps `System.Threading.RateLimiting`6465Each strategy has a corresponding `*Options` class (e.g., `RetryStrategyOptions`) that holds configuration.66Predicates for which outcomes to handle are declared via the `PredicateBuilder` fluent API.6768### Supporting packages6970- **`Polly.Extensions`** — `IServiceCollection` extensions and telemetry/OpenTelemetry support.71- **`Polly.Testing`** — `ResiliencePipelineDescriptor` and test helpers; accesses internals via `InternalsVisibleTo`.7273### Multi-targeting7475- `Polly.Core`: targets .NET Framework, .NET and .NET Standard.76- Test projects: Target all supported versions of .NET plus the latest version of .NET Framework on Windows.77- Targets for .NET 8 and later support native AoT.7879### Build system8081- **Cake** (bootstrapped by `build.ps1`) orchestrates the full pipeline via `cake.cs`.82- **Centralized package management**: all NuGet versions in `Directory.Packages.props`.83- **`Directory.Build.props` / `eng/Common.props`**: shared MSBuild properties (nullable enabled, warnings-as-errors, strong naming via `Polly.snk`, XML doc generation).84- **`LegacySupport`**: a shared source project injected into `Polly` at compile time via a custom MSBuild target.85- **MinVer** provides automatic SemVer versioning from git tags.8687### Testing patterns8889- **xUnit** for unit tests; **FsCheck** for property-based/fuzz tests.90- Test projects access internals via `InternalsVisibleTo` declared in `eng/Library.targets` (brought in via the shared MSBuild imports).91- `Polly.TestUtils` is a shared utilities project referenced by several test projects.92- `Polly.AotTest` validates AOT compatibility by publishing a trimmed app.93- Coverage is collected in CI and uploaded to Codecov.9495## General guidelines9697- Always ensure code compiles with no warnings or errors and tests pass locally before pushing changes.98- Do not change the public API unless specifically requested.99- Do not use APIs marked with `[Obsolete]`.100- Bug fixes should **always** include a test that would fail without the corresponding fix.101- Do not introduce new dependencies unless specifically requested.102- Do not update existing dependencies unless specifically requested.103
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| OnlyTerp/prompt-cache-skillsAGENTS.md · 112 | AGENTS.md | setupbuildtestlint-format+5 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago |
