# Architecture

The package is a pure-data planning core with explicit boundary and evidence layers.

```text
model
  ├─ validation / diagnostics
  ├─ rules / measurement_math / capability
  └─ selection / planner
       ├─ execution / scheduling / batch
       ├─ plan_metrics / duration / optimizer
       └─ audit / result_collection / release_gate

csv / csv_diagnostics / normalization
  └─ report / report_sections / report_statistics / export / report_manifest

observation_analysis / quality_policy / quality_trends / evidence_index
```

`model.mbt` defines the stable records and enums: features, devices, strategies, plans, observations, verdicts, risks, and phases. Pure rules choose repeat counts, estimate uncertainty, check capability, and classify observations. `selection.mbt` ranks reachable devices by accuracy and stable identifier; `planner.mbt` consumes that ranking so the same inputs produce the same plan.

Boundary modules validate inputs and retain row-level diagnostics instead of silently dropping malformed data. The CSV diagnostic parser handles quoted fields and preserves source row numbers. Normalization is explicit and reports changes so callers can decide whether canonicalization is acceptable.

Execution modules do not control hardware. They produce datum-first phases, device-grouped orderings, bounded batches, protocol summaries, and deterministic effort estimates. Audit and release-gate modules convert those results into reviewable evidence. Report and export modules format data without changing domain decisions.

The package intentionally does not compute 3D intersections, probe collision paths, or speak a vendor machine protocol. Those responsibilities can be added as adapters around the portable `MeasurementStep` contract.
