Model/packages
Khalim Conn-Kowlessar 29c776bb23 slice S-B6: glazing g_perpendicular + frame_factor lookups (Tables 6b/6c)
Replaces the two hardcoded glazing defaults (g⊥=0.63, FF=0.7) in the
cert→inputs mapper with spec-driven lookups:

  - g_perpendicular by glazing_type (Table 6b):
      single → 0.85, double 2002+ → 0.72, low-E soft → 0.63,
      secondary → 0.76, triple → 0.68. Default 0.72 when missing.
  - frame_factor by frame_material (Table 6c):
      wood/PVC/composite → 0.70, aluminium/steel/metal → 0.83.

Measured values from window_transmission_details / SapWindow.frame_factor
still take precedence. Overshading factor stays at 0.77 ("average") since
RdSAP 10 doesn't lodge a per-window overshading code.

100-cert parity probe:
  MAE 5.65 → 5.70  (flat)
  exact-match within ±1: 18% → 20%
  bias +1.13 → +1.50

Slight bias drift toward over-prediction is expected — bigger solar
gains reduce predicted heating demand. Net: the engine is now more
spec-correct (more exact matches), but composition of errors elsewhere
needs the next slice to bring bias back toward 0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 14:48:11 +00:00
..
domain slice S-B6: glazing g_perpendicular + frame_factor lookups (Tables 6b/6c) 2026-05-18 14:48:11 +00:00
fetchers added potential file scaffolding: 2026-05-15 10:56:53 +00:00
repos added potential file scaffolding: 2026-05-15 10:56:53 +00:00
utils added potential file scaffolding: 2026-05-15 10:56:53 +00:00
README.md added potential file scaffolding: 2026-05-15 10:56:53 +00:00

Shared packages

Workspace packages consumed by services/*. Each package is its own Python distribution with its own pyproject.toml; services import via the workspace dependency mechanism ({ workspace = true }).

Package Purpose
domain/ Shared domain types — Property, BaselinePerformance, Plan, Scenario, EpcPropertyData, etc. No persistence, no IO, no business logic.
repos/ Persistence layer — one repo per aggregate. Owns the SQL. Depends on domain.
fetchers/ External API clients (gov EPC, Ofgem, Google Solar, etc.). Depend on domain for response shapes.
utils/ Cross-cutting infra — logging, S3, CloudWatch URL builders, SQS task helpers.

Adding a new shared package

Only when a real second consumer materialises. Don't pre-shatter (repos-epc, repos-property, ...) — split when a deployment needs to drop a dep, not before.

See ../ara_backend_design.md §11 for the broader monorepo layout and ../CONTEXT.md for the domain glossary that names the types living in domain/.