## Adaptive execution

v0.6.0 made execution **governed**. v0.7.0 makes it **adaptive** — the graph now reacts to *why* a call failed and *how much budget is left*, instead of retrying blindly or stopping hard:

- **Reason-aware `RetryPolicy`** — a pluggable `FailureClassifier` sorts each failure into `TRANSIENT` (retry, honouring a `Retry-After` hint), `PERMANENT` (stop immediately — no wasted attempts), or `OVER_BUDGET` (surface an `InterruptRequest` for human approval). The default classifier already understands JDK I/O timeouts and Spring AI / Spring Web `5xx` + `429` vs. other `4xx` — with **zero compile-time Spring dependency**. Add your own rules via `orElse(...)`; the legacy `retryOn` predicate still works unchanged.
- **Budget-aware `RoutingStrategy`** — `RoutingStrategy.budgetAware(budget, scope, threshold, premium, fallback)` routes to a premium agent while budget remains, then **degrades gracefully** to a cheaper fallback once the remaining budget at a scope drops below a threshold. Deterministic and free: it reads the live `BudgetPolicy` counters, with no extra LLM call to classify complexity.

Both build on the existing `BudgetPolicy`, `RetryPolicy` and graph machinery from v0.6.0. Defaults are unchanged, so upgrading is drop-in.

### Docs
- [Resilience & error handling](https://github.com/datallmhub/agentflow4j/blob/main/docs/resilience.md) — reason-aware retries + cost-aware routing

### Install (JitPack)
```xml
<dependency>
    <groupId>com.github.datallmhub.agentflow4j</groupId>
    <artifactId>agentflow4j-starter</artifactId>
    <version>v0.7.0</version>
</dependency>
```
