Elamur: **Mova** · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Groupants](https://md.groupants.elamur.ai/free/en/)

[Mova](https://md.mova.elamur.ai/free/en/) · [this page in HTML](https://mova.elamur.ai/free/en/docs/layers/)

[home](https://md.mova.elamur.ai/free/en/) / [docs](https://md.mova.elamur.ai/free/en/docs/) / layers — the conductor of the three levels

# layers — the conductor of the three levels

`layers` is level 3 of the [three levels of logic](https://md.mova.elamur.ai/free/en/docs/repo-docs/architecture/): it routes a query to the global level, then to a domain module, then marks it for escalation, and logs every decision with its scores and threshold.

## What it provides

- `Global` — the exact maths core (`math::calc`, with an independent check: if the check disagrees, the global level does not answer), principles (`global::judge`) and consequence chains (`global::consequences`).
- `Domain` — the trait of a domain module: `id`, `version`, `access` (`Public`, `Extended`, `Private`), `covers` (0..1 with a reason) and `solve`.
- `Context` — facts, registered domains, the coverage threshold (default 0.5) and the routing log. `route` tries the global level, then the best domain whose coverage reaches the threshold, else returns `Route::Escalate`.
- `Mode` — `Answer` (just the answer) or `Explain(Training | Debug | UserAsked)` (the answer with its steps).

## Test

```
cargo test -p layers
```

## Limits

`Escalate` only marks the query; this crate makes no model call. The global level answers maths and values only; other knowledge comes from the domains registered by the caller.
