Model/packages/domain
Khalim Conn-Kowlessar 2bfecad272 Slice 31: §11a SAP rating cascade pin (24/24)
Adds `sap_rating_section_from_cert(epc) -> SapRatingSection`. Composes
§1 TFA + §10a (255) total fuel cost via `fuel_cost_section_from_cert`,
then runs the SAP rating equations (`energy_cost_factor`, `sap_rating`,
`sap_rating_integer`).

Pins (256) deflator, (257) ECF, SAP continuous, (258) SAP integer for
all 6 fixtures — 24/24 PASS.

Existing e2e pins on `ecf`, `sap_score_continuous`, `sap_score`
already verified these outputs; cascade pins formalise §11a for the
worksheet-conformance test surface.

Cascade scoreboard: 660/660 → 684/684 (§7..§11a closed).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 08:06:52 +00:00
..
src/domain Slice 31: §11a SAP rating cascade pin (24/24) 2026-05-24 08:06:52 +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/.