Model/packages/domain
Khalim Conn-Kowlessar 28e9dd3864 P2.2: migrate golden fixtures to SAP 10.2 spec prices; loose smoke test
ADR-0010 §10: the cert-based fixtures contained compensating errors
under cert-cal prices and are scheduled for replacement by BRE
worked-example fixtures (P5). Until P5 lands they stay as a loose
smoke test catching catastrophic regressions only.

Changes:
  - Swap prices=cert_calibration_prices() → prices=SAP_10_2_SPEC_PRICES.
    Last external consumer of cert_calibration_prices — P2.3 can now
    delete table_12_cert_calibration.py cleanly.
  - Loosen tolerance: SAP ±1 → ±5, PE ±10 → ±25. The cert-cal prices
    had been numerically tuned around these specific certs, so spec
    prices alone produce a -3 to +3 SAP drift across the set.
  - Retire 9390-2722-3520-2105-8715 early (heat-network mid-floor
    flat). It drifted to SAP residual -7 because cert-cal had absorbed
    heat-network DLF + Table 12c interactions. Cert JSON remains in
    fixtures/golden/ per ADR-0010 §10; a BRE worked-example covering
    the heat-network path will subsume it during P5.

Remaining 6 fixtures pass at ±5 SAP under spec prices. The whole
suite retires when P5 lands.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 10:01:05 +00:00
..
src/domain P2.2: migrate golden fixtures to SAP 10.2 spec prices; loose smoke test 2026-05-19 10:01:05 +00:00
pyproject.toml slice 13: to_rows(properties) returns pd.DataFrame 2026-05-16 16:43:28 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

domna-domain

Shared domain types — Property, Properties, BaselinePerformance, Plan, PlanPhase, Scenario, ScenarioPhase, ScenarioSnapshot, Recommendation, OptimisedPackage, EpcPropertyData, etc.

Boundary: types only. No persistence, no IO, no business logic. Other packages and services depend on domna-domain; this package depends on nothing internal.

Domain definitions live in ../../CONTEXT.md. New types added here must match the glossary terms.

Layout

src/domain/
├── __init__.py
├── property.py             # Property, Properties, PropertyIdentity
├── site_notes.py
├── landlord_overrides.py
├── baseline_performance.py # lodged + effective pair (ADR-0004)
├── plan.py                 # Plan, PlanPhase, OptimisedPackage
├── scenario.py             # Scenario, ScenarioPhase, ScenarioSnapshot (ADR-0005)
├── recommendation.py
├── geospatial.py
├── solar.py
├── anomaly_flags.py
└── ml/
    ├── __init__.py
    ├── transform.py        # EpcMlTransform (versioned per §8.3)
    └── schema.py

When datatypes/epc/domain/ folds in, the EPC schema types move under src/domain/epc/.