# DO-005 — Ratify 5-Adapter Architecture + ArboricultureProvider

**Date:** 2026-06-29
**Status:** Locally binding via OSCR-

---

## Decision

Oscar ratifies a **5-adapter architecture** wrapped in `ArboricultureProvider`:

1. **stub** — canned responses (offline demo)
2. **smart** — rules engine + cached standards (default; the user-chosen Smart App Level 5 alternative to a micro-model)
3. **local** — Qwen 0.5B Q4_K M (STUB; §15.3 ceiling pending §15.3-bis)
4. **anthropic** — Claude API (requires API key)
5. **openai** — OpenAI API (requires API key)

## Why 5 adapters (not 1)?

Different use cases:
- `stub` for offline demo
- `smart` for sovereign operation (no cloud)
- `local` for privacy-sensitive sites (STUB pending)
- `anthropic`/`openai` for generative prose

The user (operator) selects one in Settings. The provider ID is `oscar-arboriculture-provider`.

## Architecture

```
User → askOscar(prompt)
  → ArboricultureProvider.complete(req)
    → augments with system context (BS5837 + retention categories)
    → active adapter.complete(augmented)
  → AskResult
```

Every adapter has a unique id. The provider's `setActiveAdapter()` method swaps adapters at runtime.

## Cross-references

- `app/src/intelligence/ArboricultureProvider.ts`
- `app/src/intelligence/adapters/{stub,smart,local,anthropic,openai}.ts`
- `pact/codex/intelligence.codex.md` C1
- `pact/recipes/smart/engines.json`

