Model/packages
Khalim Conn-Kowlessar 737e5d6bf5 slice S-B11: e7_eligible_main_codes on PriceTable; cert calibration adds 191-196
Hand-tracing cert 0800-1364 (Detached bungalow, code 191/direct-electric,
actual SAP 71, predicted 37) showed the cert assessor applies off-peak
rates to direct-electric main heating despite SAP 10.2 Table 12a
specifying 90% high-rate. Adds e7_eligible_main_codes to PriceTable so
each price source carries its own rule:
  - SAP_10_2_SPEC_PRICES: {401-409, 421-425} (storage only, per Table 12a)
  - CERT_CALIBRATION:     {191-196, 401-409, 421-425} (empirically what
                            the cert software does)

100-cert parity probe:
  MAE 4.99 → 4.66 (recovered to pre-S-B9 best state)
  bias -1.03 → -0.70
  within ±1:  23% → 24%
  within ±3:  47% → 48%
  within ±10: 93% → 94%

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 15:43:15 +00:00
..
domain slice S-B11: e7_eligible_main_codes on PriceTable; cert calibration adds 191-196 2026-05-18 15:43:15 +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/.