Model/packages/domain
Khalim Conn-Kowlessar 1f271ca891 Slice 80: 1:1 windows expansion in cohort 000487 (2 → 5 entries)
Closes the final `sap_windows: LEN 5 vs 2` divergence by replacing
the cohort 000487 hand-built's 2-window collapsed encoding with 5
SapWindow entries mirroring the Summary §11 1:1. All South-facing
(orient=5) / PVC frame; two glazing-type groups; per-bp totals
preserved (cascade-equivalent):

  g=0.76/U=2.8: 0.77 m² (Ext1) — unchanged
  g=0.72/U=1.4: 6.69 m² total split per-bp
    Main: 1.65 m² (1 row)
    Ext1: 5.04 m² split 2.16 + 1.53 + 1.35 (3 rows)

Mapper places the Main window between two Ext1 rows in the §11 table;
the hand-built mirrors that order so list-position diffs are zero.

Cascade output unchanged: all 11 `_FIXTURE_PINS["000487"]` SapResult
pins remain GREEN at 1e-4 against worksheet `SAP value 61.6431`.

**Cohort 000487 is now fully Layer-2 GREEN** —
`test_from_elmhurst_site_notes_matches_hand_built_000487` passes with
zero load-bearing divergences between the mapped EpcPropertyData and
the hand-built fixture.

Full sweep: 105 passed (was 104 pre-Slice-77; +1 new diff test), 10
failed (same 10 001479-related). Pyright net-zero.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 18:06:24 +00:00
..
src/domain Slice 80: 1:1 windows expansion in cohort 000487 (2 → 5 entries) 2026-05-25 18:06:24 +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/.