What Cadence owns
| Concern | What Cadence does |
|---|---|
| Policy validation | Validates workflow.md frontmatter against the schema; rejects invalid policy before anything runs. |
| Reduction | Reduces validated frontmatter to a typed RunPayload — the single dispatch contract. |
| Provider selection | Resolves runtime_key + method (fixed, vendor-auto, or ordered fallback) via its selection policy. Selection logic lives in Cadence, never in dispatchers. |
| Run lifecycle | Owns ticket lifecycle: dispatch, claim, progress, retry, rework, review, merge admission, close. |
| Budgets | Enforces token and wall-clock budgets declared in frontmatter. |
| Tool/sandbox power | Owns the run power profiles (read-only / edit / full / network) that bound what an agent may touch. |
| Review consensus | Runs multi-provider reviewer panels (e.g. 3 reviewers, unanimous-on-block, provider-diverse). |
| Events | Correlates progress on a typed :harness event bus; workflow state advances only from typed events, never from streaming text. |
The dispatch path
- A ticket or user action selects a workflow.
- Cadence loads and validates the workflow chain (base workflow + per-label flows + provider workflow), hashing each source for auditability.
- Frontmatter reduces to a
RunPayload; selection policy resolves the concrete runtime and method, with declared fallbacks. - The dispatcher executes the resolved route — it makes no decisions.
- Harness events stream back; Cadence advances the state machine, enforces budgets and retries, and gates completion on review and evidence.