Commit graph

54 commits

Author SHA1 Message Date
Khalim Conn-Kowlessar
8e86de2257 S0380.182: community-heating CHP+boilers CO2/PE credit (§12b/13b) — closes CH2/CH4 CO2+PE
SAP 10.2 worksheet block 12b (CO2) / 13b (PE) for community heating
"CHP and boilers" (SAP code 302). Per unit of network heat fuel
H = (307)+(310) the effective generation factor is:

  chp×100/(362)×f_fuel − chp×(361)/(362)×f_disp + (1−chp)×100/(367)×f_fuel

  (363)/(463) CHP fuel      = chp_frac × 100/heat_eff × f_fuel
  (364)/(464) less credit   = −chp_frac × elec_eff/heat_eff × f_disp
  (368)/(468) boiler fuel   = (1−chp_frac) × 100/boiler_eff × f_fuel

f_fuel = Table 12 heat-network fuel factor (the CHP unit and the back-up
boilers burn the same community fuel — verified vs CH2 gas / CH4 oil /
CH6 coal worksheets (363)/(368)); f_disp = Table 12f (PDF p.196) credit
for the CHP-generated electricity. RdSAP 10 §C (p.58) defaults: heat eff
50% (362), electrical eff 25% (361), boiler eff 80% (367); CHP heat frac
0.35 per-cert via community_heating_chp_fraction.

New `_heat_network_code_302_effective_factor` + Table 12f flexible
constants (0.420 CO2 / 2.369 PE) + RdSAP §C efficiency constants, wired
into all four factor helpers (main + HW, CO2 + PE) ahead of the existing
single-fuel / 1-over-heat-source-eff path. The worksheet (368)/(468)
boiler emissions DISPLAY rounded/mis-aligned in the PDF, but the
(373)/(473)/(386)/(486) totals reconcile only with the boiler at the
full Table 12 factor — verified EXACT.

Two spec citations applied:
- Table 12f flexible-operation default for RdSAP community CHP is an
  Elmhurst engine choice (Table 12f notes make "standard" the default);
  mirrored per [[feedback-software-no-special-handling]] and documented
  in SAP_CALCULATOR.md §8.3.
- Table 12 heat-network oil/biodiesel CO2 (codes 53/56) corrected
  0.298 → 0.335 per Table 12 (p.189) "assumes 'gas oil'"; the code-302
  oil cascade (CH4) was the first to exercise it. PE 1.180 was already
  correct. No other variant uses these codes (no regression).

Closures (CO2 + PE only — the CHP credit does not touch cost/SAP):
  CH2 (CHP/Gas)  CO2 −1411.49→+0.0000, PE +1331.23→+0.0000  EXACT
  CH4 (CHP/Oil)  CO2 −4378.24→−0.0000, PE  +319.81→−0.0000  EXACT
  CH6 (CHP/Coal) CO2/PE re-pinned (+2411.54 / +5023.48) — its worksheet
                 lodges a manual DLF=1.0 the Summary doesn't carry, so
                 cascade DLF=1.45 over-scales H; same root as the CH6
                 SAP −7.49 / cost +£172 (separate DLF front).

CH2/CH4 are now CO2+PE-exact but still carry the heat-network cost/SAP
residual (+0.5277 SAP / −£12.16 cost, exposed by S0380.175 — cost-side,
untouched here). CH3 unchanged (code 304 community-HP COP front).

Corpus state: 37 variants EXACT on all four metrics (incl. CH1);
remaining residuals are CH2/CH4 cost+SAP, CH3 CO2+PE (HP COP), CH6
all-metric (DLF quirk). 2223 pass + 1 skip + 0 fail (tolerances 1e-4 all
metrics per S0380.181); pyright net-zero 43→43.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 18:23:17 +00:00
Khalim Conn-Kowlessar
ba2d6e1cbb docs: handover post S0380.177..179 + CI/test-move infra
Captures the corpus state (36 EXACT + 5 pinned community-heating
variants), the SAP 302 CHP credit cluster as the highest-leverage
remaining front, the unresolved 0.8523 / 0.1994 worksheet-factor
mysteries to per-line-walk before hypothesising, and — importantly —
the new test layout (tests/domain/sap10_calculator/) that changes every
verification command.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 17:21:50 +00:00
Khalim Conn-Kowlessar
168b1941ea docs: handover post S0380.174..176
Three slices landed: §4 storage+primary loss for community heating
(.174), §14.1 heating_controls_sap extraction (.175), Table 4b combi
sub-row dispatch (.176). Cohort moves from 36 EXACT + 5 pinned to 34
EXACT + 7 pinned — net 2 new full-EXACT closures (oil 3 + oil 4) +
2 reshape (CH1/CH3 SAP/cost EXACT, CO2/PE pinned on the (372)
electrical-distribution Elmhurst-factor mystery).

933 pass + 0 fail at HEAD 326066ee. Pyright net-zero.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 13:42:42 +00:00
Khalim Conn-Kowlessar
6c2053afac docs: handover post S0380.170..173
Captures the 4-slice community-heating closure phase: blocked tier
emptied (.170), CHP cost split (.171), heat-network heat-source-eff
scaling (.172), WHC=901 HW main-fuel routing (.173).

Open fronts ranked: SAP 302 CHP credit cascade (3-variant cohort),
+£12 lighting/standing overage on CH1/CH3, oil 3/4/6 + no-system
follow-ups.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 12:13:34 +00:00
Khalim Conn-Kowlessar
7e08e7af71 docs: handover post S0380.164..169
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 10:25:24 +00:00
Khalim Conn-Kowlessar
df4d271d3b docs: handover post S0380.164
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 09:27:54 +00:00
Khalim Conn-Kowlessar
302db131c6 Slice S0380.164: Elmhurst-mirror §12.4.4 summer-immersion CO2/PE double-count
SAP 10.2 §12.4.4 (PDF p.36-37): "With open fire back boilers or closed
room heaters with boilers, an alternative system (electric immersion)
may be provided for heating water in summer. In that case water
heating is provided by the boiler for months October to May and by the
alternative system for months June to September."

The spec-literal CO2 / PE formula multiplies summer immersion fuel by
the Table 12d / 12e monthly cascade (per Table 12 footnotes (s) and
(t): "monthly factors in Table 12d/12e should be used in the SAP
worksheet"). The BRE-approved Elmhurst engine adds an extra
`summer_fuel × Table 12 annual electric` term ON TOP of the monthly
cascade for dual-rate tariffs — same Elmhurst-mirror shape as S0380.163
(§8.1) but additive rather than substitutive. Cost is computed
cleanly per spec — the double-count quirk only affects the (264) HW
CO2 and (278) HW PE factor lines.

Worksheet evidence (heating-systems corpus property 001431,
`solid fuel 2` — Table 4a code 158 closed-room-heater + back boiler,
65 % winter η + 100 % summer η, anthracite, 18-hour off-peak tariff):

  (62)m heat        303.12 .. 168.95 .. 175.91 .. 300.40 kWh
  winter fuel (W)   = 2205.80 / 0.65 = 3393.51 kWh anthracite
  summer fuel (S)   = 684.55 / 1.00  =  684.55 kWh immersion
  total fuel        = (219) = 4078.06 kWh

  (264) HW CO2  = 4078.06 × 0.3710 = 1513.15 kg/yr
    = W × 0.395 + S × (0.116 monthly_summer + 0.136 annual)
    = 1340.43 + 79.61 + 93.10 = 1513.14 ✓ within rounding

  (278) HW PE   = 4078.06 × 1.3771 = 5616.04 kWh/yr
    = W × 1.064 + S × (1.429 monthly_summer + 1.501 annual)
    = 3610.69 + 977.84 + 1027.51 = 5616.04 ✓ exact

The +annual term is precisely `S × Table 12 electric factor` and
matches the SF2 corpus pin's ΔCO2 = −93.10 and ΔPE = −1027.51 exactly.
Per [[feedback-software-no-special-handling]] mirror the engine.

Cascade rule (post-slice):

  STANDARD tariff       → winter × anth_annual + Σ wh_summer_m × Table 12d/e
                          (spec-literal, unchanged)
  7h / 10h / 18h / 24h → winter × anth_annual + Σ wh_summer_m × Table 12d/e
                          + S_fuel × Table 12 annual electric (Elmhurst mirror)

Closures `solid fuel 2`:
  ΔCO2 −93.10 → +0.0000 EXACT
  ΔPE  −1027.51 → +0.0000 EXACT
ΔSAP and Δcost remain EXACT (cascade cost path was already correct).

The 41-variant heating-systems corpus is now closed on its 25-variant
cascade-OK tier: all 25 SAP / cost / CO2 / PE EXACT (|Δ| < 1e-3) vs
the Elmhurst worksheet. Only `pcdb 1` carries a sub-tolerance gap
(−0.011 SAP / +5.7 PE — PCDB Eq D1 cascade gap on PCDF index 716, a
separate small slice).

⚠ Single-cert evidence

SF2 is the only §12.4.4 fixture in the corpus (`solid fuel 1` =
code 156 is an empty folder; no other variant exercises a back-boiler
combo with summer immersion). Per the handover ≥2-cert rule for new
§8 divergence rows, this slice was admitted under an explicit
exception: the divergence shares its shape with §8.1 (S0380.163's
Table 12 annual mirror for dual-rate HW), and the math matches the
worksheet to within rounding. The new §8.2 row is tagged with a
"⚠ Single-cert evidence" subsection so future agents know to revisit
if a second §12.4.4 cert worksheet ever diverges from this rule.

Tests:
  - test_section_12_4_4_hw_blend_mirrors_elmhurst_summer_annual_pe_co2_double_count
  - test_section_12_4_4_hw_blend_standard_tariff_keeps_spec_literal_monthly_cascade

909 pass / 0 fail; pyright net-zero 43 → 43.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 09:27:47 +00:00
Khalim Conn-Kowlessar
ef7fe01282 docs: handover post S0380.160..163
Wraps the four slices closing the heating-systems corpus from
Σ|ΔSAP_c| 1.24 → 0 (25/25 cascade-OK variants SAP/cost/CO2/PE
EXACT, except solid fuel 2 summer-immersion-blend artifact).

Highest-leverage next slice: close solid fuel 2 (the only remaining
open variant in the cascade-OK tier) via the S0380.154 blend code
path — likely a parallel Elmhurst-mirror gate for the summer-
immersion CO2/PE factors.

Other open fronts: 16 blocked-tier mapper extensions; pcdb 1 sub-
tolerance -0.011 SAP; cohort-2 golden residuals tightening per
[[feedback-golden-residuals-near-zero]].

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 08:51:21 +00:00
Khalim Conn-Kowlessar
9896644c4c Slice S0380.163: Elmhurst-mirror HW PE/CO2 factor on dual-rate tariffs
SAP 10.2 Table 12 footnote (t) (PDF p.189): "PE factors for grid
electricity vary by month. The average figure given in this table is
therefore not used directly. Instead the monthly factors given in
Table 12e should be used in the SAP worksheet." Footnote (s) says the
same for CO2 / Table 12d. Read literally, monthly factors apply to
every electric end-use including dual-rate HW.

The BRE-approved Elmhurst rdSAP engine doesn't follow that reading
for HW. The 41-variant heating-systems corpus controlled-variable
fixture lodges worksheet (278) "Water heating (low-rate cost)" with
factor **1.5010 PE / 0.136 CO2** (Table 12 annual flat) across every
dual-rate tariff cert, while applying the monthly Table 12e/12d
cascade to lighting (1.5338 winter-weighted) and secondary heating
(1.5715) on the same certs. It's an engine implementation choice,
not a documented spec exception.

Per [[feedback-software-no-special-handling]] the calculator
contract is bit-faithful replication of the engine, not literal
compliance with the spec text. This slice flips cascade
`_hot_water_primary_factor` + `_hot_water_co2_factor_kg_per_kwh` to
accept a `tariff: Tariff` parameter:

  - STANDARD tariff       → Table 12e/12d monthly cascade weighted
                            by HW demand seasonality (unchanged from
                            S0380.71 / .72, matches cohort-1 ASHP
                            standard-tariff worksheet)
  - 7-hour / 10-hour /
    18-hour / 24-hour     → Table 12 annual flat (1.501 / 0.136)
                            matching the Elmhurst worksheet (278)
                            "Water heating (low-rate cost)" row

Per-line walk on electric 3 (18-hour tariff, electric immersion HW,
2384.116 kWh annual):

  worksheet (278) factor = 1.5010
  cascade pre-slice      = 1.5214   delta = +0.0204
  (1.5214 - 1.5010) × 2384.116 = +48.66 kWh/yr PE — EXACT match
  the corpus residual pin.

Same shape for CO2: worksheet 0.1360, cascade pre-slice 0.1410,
delta +0.0050 × 2384.116 = +11.95 kg/yr.

Closures across the 18-variant deferred lighting-PE cohort
(electric 1/2/3/5/6/7/8/9 + solid fuel 4/5/6/7/8/9/10/11 + ashp +
gshp):
  ΔCO2 +6.31 / +11.95 → ±0.0000 EXACT
  ΔPE  +25.51 / +48.66 → ±0.0000 EXACT
  ΔSAP_c / Δcost unchanged at ±0.0000 EXACT (already closed
  pre-slice by S0380.156..162).

All 25 cascade-OK variants in the heating-systems corpus now
SAP / cost / CO2 / PE EXACT vs worksheet on all 4 metrics, with
solid fuel 2 as the only remaining open residual (separate
S0380.154 summer-immersion-blend CO2/PE artifact — deferred).

Documented in
`domain/sap10_calculator/docs/SAP_CALCULATOR.md §8.1
"HW PE/CO2 factors on dual-rate tariffs use Table 12 annual"` —
the master doc now carries a new §8 "Elmhurst-mirrored spec
divergences" section for cases like this. Validation tally
refreshed from stale "930/930" to current "941/941".

No regressions on the 6 Elmhurst U985 fixtures (gas combi
STANDARD tariff — unaffected) or the cohort-1 ASHP certs
(STANDARD tariff — unaffected). The dual-rate gate fires only
on the 4 off-peak tariffs.

Verbatim spec quote retained for reference (SAP 10.2 Table 12
footnote (t), PDF p.189):
  "PE factors for grid electricity vary by month. The average
   figure given in this table is therefore not used directly.
   Instead the monthly factors given in Table 12e should be used
   in the SAP worksheet."

Tests: 907 pass (+1), 0 fail. Pyright net-zero (43 → 43).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 08:34:20 +00:00
Khalim Conn-Kowlessar
0261f446f0 docs: handover post S0380.156..159
Captures the per-line walk discipline used to close electric 2 + 5
across four slices (.156 Table 3 WHC=903 primary-loss, .157 Table 2b
note b) WHC=903 ×0.9, .158 Table 4f warm-air heating fans, .159
Table 4a Cat 7 R tariff-aware dispatch). Σ |ΔSAP_c| across the
25-variant heating-systems corpus dropped from 2.87 → 1.21 (58%
reduction). All variants now sit under 0.3 SAP.

Next-slice candidate: the 9-variant cluster at ±0.09..0.12 SAP
(electric 3/5/6/7/8/9 + sf 4/9/10/11) — uniform pattern suggesting
a shared shave-the-residual fix. Worth a per-line walk on one
cluster variant before accepting the prior "Elmhurst-vs-spec quirk"
framing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 22:30:59 +00:00
Khalim Conn-Kowlessar
4350c71bdd docs: handover post S0380.153..155
Session landed three spec-clean slices closing four major residuals:

- S0380.153 (Table 3 middle row for solid-fuel boilers): SF3 EXACT all
  4 metrics (+0.30 → -0.0000). Found the rule that solid-fuel boilers
  don't ship with dual programmers per §9.2.4.

- S0380.154 (§12.4.4 back-boiler summer-immersion): SF2 SAP+cost
  EXACT (+1.86 → -0.0000 SAP; -£42.84 → -£0.00 cost). Implemented HW
  fuel kWh split + monthly blend across cost / CO2 / PE / standing.

- S0380.155 (Table 4a HP water-column dispatch): gshp closed ±0.02
  SAP (+0.94 → -0.0178). HW kWh 841 → 1138 matches worksheet exactly.

Σ |ΔSAP_c| 14.5 (session start of S0380.150) → 2.7 = 81% reduction
across 6 slices, two sessions.

Handover doc captures:
- Per-line discipline (walk worksheet before forming hypothesis)
- Elmhurst-vs-spec divergences to defer (lighting-PE +48.66 cluster
  uses Table 12 annual factor; spec Table 12d mandates monthly)
- Ranked open fronts (electric 5 R=0.20 storage MIT, electric 2
  warm-air HP HW, deferred lighting-PE cluster)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 16:01:52 +00:00
Khalim Conn-Kowlessar
3a44ca89fb docs: handover post S0380.150..152
Three slices closed:
- S0380.150 18-hour tariff for pumps+lighting (§12 + App F2)
- S0380.151 RdSAP 10 §4.1 Table 5 extract-fans default
- S0380.152 Table 3 primary loss for solid-fuel back-boilers

Cluster A closed; Cluster B partial (SF3 done, SF2 partial); Cluster
C open. Σ|ΔSAP| 14.5 → 6.4 across the 25 cascade-OK cohort variants.

Mid-session pivot documented: my Cluster B hypothesis was wrong
(Table 9c step 12), the actual gap was Table 3 primary loss for
solid-fuel boilers. Discipline added: dump per-line worksheet data
before forming a spec hypothesis.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 13:03:55 +00:00
Khalim Conn-Kowlessar
f20d96369f docs: handover post S0380.146..149
Captures the four slices that closed the oil-cohort Table 4f gap:
.146 primary loss for Table 4b regular boilers, .147 Eq D1 for
non-PCDB Table 4b, .148 liquid fuel boiler aux 100 kWh, .149
per-pump-age circulation + wet-boiler gate.

Documents the cohort-wide ~-£10/yr cost residual that S0380.149's
spec correctness exposed — the new next-slice front. Highlights the
user directive [[feedback-software-no-special-handling]] that
surfaced during S0380.147 and continued to apply through .149.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 09:18:38 +00:00
Khalim Conn-Kowlessar
de5ae2a27e docs: handover post S0380.146..147
Captures the two slices that closed oil 1 from +2.66 → +1.18 SAP via
Table 3 primary-loss extension (.146) + Appendix D §D2.1 (2) Equation
D1 wiring for non-PCDB Table 4b boilers (.147). Highlights the user
directive that surfaced this session ("BRE/Elmhurst software follows
spec exactly; no special non-spec handling") and the resulting pin
shifts on cert 0240 + 6035 (combi-no-cylinder golden fixtures
re-pinned per spec correctness).

Ranks next-slice candidates: oil 1 Table 4f auxiliary energy (~+0.4
SAP closure remaining), electric 5 -1.43 regressed by .145, solid
fuel 2/3 anthracite outliers, community heating + electric storage
unblocking.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 08:26:04 +00:00
Khalim Conn-Kowlessar
1636cfbc83 docs: handover post S0380.141..145
Five slices closing pcdb 1 (+6.95→+0.57 via §9.4.11 + §4 cylinder
gates + RdSAP10 Table 29) and the electric storage cluster (e3/e6/e7
+2.5/+1.3 SAP → <0.21 each via Table 4e (92)m→(93)m). Cumulative
|ΔSAP| 18.0 → 12.2 (-32%). Open fronts ranked + spec-source index.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 21:55:53 +00:00
Khalim Conn-Kowlessar
53ceb63624 docs: handover post S0380.141..143 (pcdb 1 closure via §9.4.11 + §4 cylinder gates + RdSAP 10 Table 29 inaccessible-cylinder insulation defaults)
Three slices on top of `8ee877e4` closed cert pcdb 1 from SAP +6.95
to +0.57 (-92% magnitude) via spec-citable fixes in three distinct
cascade areas.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 21:06:11 +00:00
Khalim Conn-Kowlessar
8ee877e44c docs: handover update — +2.5 SAP cluster is heterogeneous, not a shared cascade gap
Probed all three variants (electric 3, oil 1, solid fuel 2) in this
thread. Each has a different driver despite the matching magnitude:
- electric 3: §9 useful-demand calc for ctrl=3 storage heaters
- oil 1: HW efficiency for Table 4b oil boiler (cascade 86% vs ws ~65%)
- solid fuel 2: HW kWh lodged in different line ref (re-probe needed)

Tested combined-R hypothesis (effective_R = (1-frac)·R_main + frac·R_sec
per SAP 10.2 §9b) — the cascade currently DOES NOT pass secondary_fraction
to mean_internal_temperature_monthly, so effective_R = R_main. Monkey-
patching to inject combined R REGRESSES electric 3 (+2.55 → +3.17)
because raising R lowers cascade demand — opposite of needed direction.

Recommends taking the three variants as separate per-variant slices.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:20:43 +00:00
Khalim Conn-Kowlessar
c389645bfa docs: handover post S0380.138..140 (off-peak tariff cascade + §4 cylinder storage loss)
Three-slice handover covering:
- S0380.138: per-tariff Table 32 low-rate dispatch
- S0380.139: _is_off_peak_meter canonical normalization
- S0380.140: §4 (56)m cylinder storage loss (extractor + cascade)

Ranks next-slice candidates (top: +2.5 SAP cluster across electric 3,
oil 1, solid fuel 2 — likely shared Table 9 MIT bug).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 19:10:16 +00:00
Khalim Conn-Kowlessar
3be8b8877b docs: handover + next-agent prompt post S0380.131..137
Captures seven slices: heating-oil price flip (S0380.131),
MissingMainFuelType strict-raise (S0380.132), Elmhurst EES → fuel
dispatch (S0380.133), PE pin block-mismatch fix (S0380.134), Table 4a
R-dispatch solid fuel (S0380.135), dual-fuel cost-cascade fix
(S0380.136), Table 4a R-dispatch electric (S0380.137).

Suite: 880 pass / 0 fail at HEAD 3542186f.

Next slice candidate: the +5..+9 SAP cluster across all 7 cascade-OK
electric corpus variants — uniform −£135..−£222 cost under-count
suggests one shared Table 12a tariff-handling gap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 17:12:10 +00:00
Khalim Conn-Kowlessar
38e6d18a13 docs: handover + next-agent prompt post S0380.125..130
Captures the heating-systems corpus closure work, the new permanent
residual-pin regression test, and the queued S0380.131 candidate
(heating-oil unit price spec-vs-worksheet divergence).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-31 09:05:24 +00:00
Khalim Conn-Kowlessar
8904ec090b docs: handover + next-agent prompt post S0380.115..124
10 spec-cited slices closed this session:
  .115 — fixture ECF pin typo
  .116 — RdSAP 10 §15 A_RR_shell rounding (cert 000565 truly exact)
  .117 — re-pin golden PE residuals for 0240 + 6035
  .118 — cohort LINE_xx pins → 1e-4 + §15-aware RR test expecteds
  .119 — §5 test EPC builder propagates sap_roof_windows
  .120 — RdSAP 10 §5.11.4 NI vs explicit-0 roof discriminator
  .121 — floor_construction code 4 → "Solid" (basement cert 0712)
  .122 — tighten test_ventilation tolerances
  .123 — pin Table U5 share-column solar fluxes at exact equality
  .124 — tighten dimensions + rating arithmetic pins

Extended handover suite at HEAD `1e69bd39`: 775 pass, 0 fail.

Handover documents:
- HANDOVER_POST_S0380_124.md — full state + cert 0240 hypothesis ranking
- NEXT_AGENT_PROMPT_POST_S0380_124.md — two-task brief (0240 cost-cascade
  diagnosis + golden-corpus audit awaiting user's same-property
  heating-variant Elmhurst fixtures).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 22:15:22 +00:00
Khalim Conn-Kowlessar
2fe84fcc7e docs: handover + next-agent prompt post S0380.110..114 (cert 000565 SAP exact at 1e-4)
Five spec-cited slices closed cert 000565 from continuous SAP
Δ = -0.0059 → +0.000042 (within user 1e-4 tolerance):

- S0380.110: per-rooflight g_L via Appendix L §L2a
- S0380.111: roof-window inclination adj via Table 6e Note 2
- S0380.112: per-BP rooflight deduction via RdSAP §3.7
- S0380.113: H=0 gable retention via RdSAP §3.9.2 step (b)
- S0380.114: pump GAIN for HP+boiler via Table 5a Note a)

Handover documents the two parallel workstreams the next agent
should tackle:
1. Final sweep for TRULY exact continuous SAP on cert 000565
   (close the remaining sub-1e-4 cost/CO2/SH/fuel/ECF residuals)
2. Tighten golden test residuals across the corpus per
   [[feedback-golden-residuals-near-zero]]

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 19:53:45 +00:00
Khalim Conn-Kowlessar
98a4b5b9e6 docs: handover + next-agent prompt post S0380.105..109 (MEV trifecta + window routing + Connected gable + §5.7/5.8 brick formula)
Captures the 5-slice session that took cert 000565 continuous SAP
from +0.0182 → -0.0059 (magnitude 67% smaller) via spec-cited
intermediate-value closures.

  HANDOVER_POST_S0380_109.md     full state + per-slice movement
                                 + per-pin journey + lessons learned
  NEXT_AGENT_PROMPT_POST_S0380_109.md   focused briefing pointing
                                 at S0380.110 (Lighting g×FF closure
                                 — leading remaining residual at
                                 -2.17 kWh) and S0380.111 (roof
                                 window U formula refinement).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 18:16:16 +00:00
Khalim Conn-Kowlessar
7df3fef8bb docs: handover + next-agent prompt post S0380.96..103 (RIR Unknown + §9 floor + MEV PCDB arc + HP-on-E7 cost split)
8 slices shipped this session:
  S0380.96  RIR Unknown insulation       (RdSAP 10 §3.10.1)
  S0380.97  Floor §9 insulation thickness (RdSAP 10 §5.13 Table 20)
  S0380.98  PCDB Table 322 ETL+parser    (PCDF Spec §A.19)
  S0380.99  PCDB Table 329 ETL+parser    (PCDF Spec §A.20)
  S0380.100 MEV SFPav + (230a) helpers   (SAP 10.2 §2.6.4)
  S0380.101 HP SAP code → cat=4 mapper   (SAP 10.2 Table 4a)
  S0380.102 Wire MEV into pumps_fans     (SAP 10.2 Table 4f 230a)
  S0380.103 MEV-fan cost split           (SAP 10.2 Table 12a Grid 2)

Cert 000565 at HEAD `e3abe9b2`:
  sap_score (int)              ✓ EXACT
  pumps_fans_kwh_per_yr        ✓ EXACT (was +2.48 over)
  hot_water_kwh_per_yr         ✓ 0 EXACT
  sap_score_continuous         Δ +0.0182 (SH cascade-driven)
  7 expected fails (was 9)

Next slice candidate: S0380.104 investigate §3-§8 space-heating
cascade -27 kWh under-count (cert-000565-specific; cohort certs
pass at 1e-4). Alternative: S0380.105 CO2 MEV split (mirror of
.103 for Table 12d monthly factors).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 16:13:33 +00:00
Khalim Conn-Kowlessar
25f3af9eba docs: handover + next-agent prompt post S0380.91..95 (party-wall + AP4/MEV + §5.14 floor + RIR insulation + Detailed-RR residual) 2026-05-30 14:26:49 +00:00
Khalim Conn-Kowlessar
edb1e6b892 docs: handover + next-agent prompt post S0380.85..90 (BP main-wall closure + SH-channel discovery + strict-raise series)
Session summary documents covering 6 slices:

- S0380.85 — Curtain Wall §5.18 dispatch (cascade walls 443 → 555.93 W/K)
- S0380.86 — §5.6 thin-wall stone + §5.8 dry-line (555.93 → 602.40,
              worksheet 604.07, 0.27% residual)
- S0380.87 — Table 4e GROUP 2 HP control codes — single-line spec
              dispatch bug; SH residual +7924 → +1460 (82%), sap_score
              23 → 27, largest single-slice movement of session
- S0380.88 — Full Table 4e Groups 0-7 + UnmappedSapCode strict-raise
- S0380.89 — Table 4d responsiveness + screed-UFH bug fix + strict raise
              (latent bug found via strict-raise rollout)
- S0380.90 — 6 dispatch sites strict-raise + UnmappedSapCode shared
              module + GOV.UK API digit-string meter_type bug fix

HANDOVER_POST_S0380_90.md covers full state, cumulative-closure table,
strict-raise philosophy, and which 6 dispatch sites were closed.

NEXT_AGENT_PROMPT_POST_S0380_90.md briefs the next-slice work:
S0380.91 (RdSAP 10 Table 15 row 3 "Cavity masonry filled" U=0.2 in
u_party_wall — closes ~+1000 kWh of the remaining +1460 SH residual
on cert 000565 Ext1).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-30 09:52:35 +00:00
Khalim Conn-Kowlessar
b0fef688da docs: handover + next-agent prompt post S0380.81..84 (Table 32 default + Table 12a Grid 2 CO2 + RR fold-in)
Captures the 4-slice arc this session — Table 32 default prices (sap_score
28 → 29 EXACT), Table 12a Grid 2 dual-rate CO2 (CO2 65% closed), extractor
gable_type recognition + mapper preservation of cert 9501, and the full
RR mapper + cascade fix per RdSAP 10 §3.9.2 + §3.10 + Table 4 (11
per-BP RR surface areas EXACT vs worksheet PDF).

Documents the BP main-wall residual −161 W/K diagnostic localising the
next slice block to two spec-cited cascade gaps: Curtain Wall (−112
W/K, no _ENG_WALL entry for WALL_CURTAIN=9) + thin-wall stone granite
alt (−47 W/K, _insulation_bucket short-circuit + thin-wall §6.6/§6.7
formula). Each spans extractor → datatype → mapper → cascade and is a
single coherent slice when the spec lookup is tractable.

NEXT_AGENT_PROMPT_POST_S0380_84.md prescribes S0380.85 (Curtain Wall)
as the highest-leverage next slice with audit + implementation +
expected-outcome details.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 23:33:18 +00:00
Khalim Conn-Kowlessar
69710f5882 docs: handover + next-agent prompt post S0380.77..80 (cert 000565 §4 HW EXACT)
Documents the full §4 HW cascade closure for cert 000565 across the
S0380.77 → S0380.80 series:
- S0380.77 primary loss WHC 914 routing
- S0380.78 §1x.0 shower extractor + (247a) fallback cost
- S0380.79 (57)m solar storage + separately-timed-DHW cylinder default
- S0380.80 Table 4c −5% DHW for missing boiler interlock

Cumulative cert 000565 closure:
  hot_water_kwh:         +1399 → ✓ 0 EXACT (100%)
  continuous SAP:        +0.78 → -0.041   (95% closed)
  total cost:            -69   → +3.62    (95% closed)
  All §4 line refs (45)/(46)/(57)/(59)/(62)/(64)/(217)/(219) EXACT

Open #1 priority for the next agent: deferred ADR-0010 mains-gas
tariff Table 32 vs Table 12 cohort closure. The remaining
sap_score=28 vs worksheet 29 flip is entirely due to this £0.16/100
gas-price delta over 3755 HW kWh = +£6 → +0.041 continuous SAP →
flips integer at the 28.5 boundary. Cohort-wide change; would land
sap_score=29 EXACT for cert 000565 AND likely tighten several other
worksheet certs in the same coordinated pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 22:18:41 +00:00
Khalim Conn-Kowlessar
41566a9023 docs: handover + next-agent prompt post S0380.74..76
- HANDOVER_POST_S0380_76.md: full state including the Appendix H
  closure narrative (the trap that closed via U3.3 unit-convention
  fix), cert 000565 current pin state, and three independent
  demand-cascade bugs to tackle in follow-on slices.
- NEXT_AGENT_PROMPT_POST_S0380_76.md: focused briefing pointing at
  primary_loss (59)m for HP + external cylinder as the highest-
  yield next slice (+1175 kWh fix).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:51:02 +00:00
Khalim Conn-Kowlessar
3bf728ce2f Slice S0380.74: Appendix H (H7) U3.3 monthly-integrated convention closes 1.81× over-count
Root cause: SAP 10.2 has an internal unit-convention ambiguity for
(H7)m between page 75 (Equation H1 implies W/m² 24-hour-average flux)
and page 76 (verbatim "Monthly solar radiation per m² from U3.3 in
Appendix U", i.e. kWh/m²/month monthly integrated). Page 77 (H23)
formula's `× hours / 1000` term double-converts when (H7) is W/m².

The cascade's `surface_solar_flux_w_per_m2` returns the §U3.2 24h-avg
flux in W/m² (verified bit-exact vs Elmhurst worksheet line 295: SE
90° Jan region 0 = 36.7938 W/m²). The (H9) helper was using this
directly without applying the U3.3 conversion that page 76's "from
U3.3" cross-reference calls for. Elmhurst-certified software follows
the U3.3 reading.

SAP 10.2 spec p.76 line (H7): "Monthly solar radiation per m² from
U3.3 in Appendix U". Appendix U §U3.3 (p.130) defines the conversion
S_monthly = 0.024 × n_m × S(orient,p,m), where S(orient,p,m) is the
§U3.2 24-hour-average flux in W/m². Therefore:

  (H7)m_U3.3 [kWh/m²/month] = flux_U3.2 [W/m²] × hours / 1000

Option A fix (per ChatGPT-mediated research): apply the U3.3
conversion inside the (H9) helper, so (H9) is in kWh/month rather
than W. Spec p.77 (H23) formula then carries the conversion's
dimensional residue correctly without double-counting.

Diagnostic that closed the trap: back-solving poly(X_cas, Y_eff) =
ws_H24/H17 at fixed X across 24 worksheet-positive observations from
4 cert fixtures (000565 + new A/B/C at sap worksheets/Solar PV tests/)
revealed Y_eff/Y_cascade took ONLY two distinct values:
- 0.7200 (exact) for every 30-day month observation
- 0.7440 (exact) for every 31-day month observation
i.e. exactly days × 24 / 1000. No utilizability function, no missing
constant — a per-month unit-conversion factor that the polynomial
non-linearity had been masking.

Closure metrics (HEAD post-fix):
- 000565 (W-30, modest): annual Δ −0.0000 kWh (every month exact)
- A-baseline (S-30, modest): annual Δ +0.0001 kWh
- B-highY (S-30, none): annual Δ −0.0000 kWh (incl Oct 10.5905)
- C-lowY (N-60, signif): annual Δ −4.36 kWh (polynomial zero-clamp
  boundary; worksheet poly = 0.0024 → 0.41 kWh, cascade poly =
  −0.04 → 0)

47/48 month-observations pin at <1e-4 kWh.

Test baseline: 547 pass + 9 expected `test_sap_result_pin[000565-*]`
cascade-gap fails (unchanged — orchestrator still NOT integrated
into water_heating.py:943; that's the follow-on slice that closes
cert 000565's HW pin +272 → ~0).

Pyright net-zero on both touched files.

Files:
- domain/sap10_calculator/worksheet/appendix_h_solar.py: rename
  `monthly_solar_energy_available_h9_w` → `_h9_kwh_per_month`,
  add `hours_in_month` param, apply U3.3 conversion. Y23 param
  renamed accordingly. Orchestrator updated.
- domain/sap10_calculator/worksheet/tests/test_appendix_h_solar.py:
  add cert 000565 (H24)m monthly magnitude pin at abs < 1e-3 kWh;
  update H9 + Y23 unit tests for new kWh/month units.
- BRIEF_APPENDIX_H_EN_15316_RESEARCH.md: new "Closure" section with
  the days-in-month diagnostic, root cause, and lessons.
- HANDOVER_POST_4_CERT_EMPIRICAL.md: NEW — closure handover.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 18:02:35 +00:00
Khalim Conn-Kowlessar
6f024e3937 docs: handover + research brief + next-agent prompt for cert 000565 Appendix H
Session-end handover docs for the cert 000565 wacky-stress-test
investigation. Three documents covering:

- **HANDOVER_POST_S0380_73_APPENDIX_H_BLOCKED.md** — full state
  of the cohort closure work (S0380.70-.73) plus the Appendix H
  Solar HW investigation findings. Cumulative ASHP cluster
  compression −3.10 → −0.06 PE kWh/m² over 4 slices. Cert
  000565 HW pin blocked at +272 kWh/yr on a 1.81× formula
  over-count.

- **BRIEF_APPENDIX_H_EN_15316_RESEARCH.md** — self-contained
  brief for a research agent or human looking up BS EN 15316-4-3
  Method 2 to identify the missing clamp / useful-gain rule /
  validity envelope behind the over-count. Includes the cert
  000565 diagnostic (per-month ratio 1.5-1.7× summer, 3-4×
  shoulder), seven specific questions ranked by hypothesis
  likelihood, and the 36-data-point empirical-fit setup.

- **NEXT_AGENT_PROMPT_POST_S0380_73.md** — directive for the
  next agent. Awaits 3 user-generated solar-HW cert worksheets
  (A baseline / B high-Y / C low-Y) to empirically test whether
  the 1.81× ratio is systematic or cert-specific. Decision
  point: ship an empirical correction (if 36-point fit closes
  all 3 certs + cert 000565) or hold for the EN standard.

Also resolves the long-standing H3=4.0 / H4=0.01 default mystery:
sub-agent located the source in RdSAP 10 Specification §10.11
Table 29 row "Solar panel" page 58. RdSAP overrides the input
set; the calculator is still SAP 10.2 Appendix H. So the
defaults aren't the source of the over-count.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 16:18:31 +00:00
Khalim Conn-Kowlessar
a2a4396e25 docs: handover + next-agent prompt for S0380.64..69
New `HANDOVER_POST_S0380_69.md` covers the 6 slices shipped this
session — cert 000565 closure to sap_score=29 EXACT + main_heating_
co2_factor=0.1533 EXACT, Appendix H pure math module + orchestrator
(magnitude calibration deferred on SAP 10.2 spec ambiguity), and the
cohort-2 (38 cert) PE/CO2 golden-coverage addition. Includes
residuals table, open work breakdown with reasons (Appendix H spec
ambiguity, RR fold-in geometry, MEV PCDB external blocker, House
coal secondary cascade), spec-source quick-reference, and key-file
map.

Predecessor `HANDOVER_CERT_000565_COST_CASCADE.md` (S0380.52..63)
gets a "superseded by" note at the top so the chain is navigable.

`NEXT_AGENT_PROMPT_POST_S0380_69.md` is a self-contained prompt for
a new agent picking this up cold — references the memories to load,
ranks 5 well-scoped next-slice options (cert 2102 House coal /
Appendix H magnitude calibration / RR fold-in / PE cluster / MEV
coupled set), and includes the standard probe commands. Reinforces
`feedback_sap_10_2_only_never_10_3` as a critical-load constraint.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 10:32:32 +00:00
Khalim Conn-Kowlessar
fc84c6d49a docs: extend handover with Elmhurst-only path + 000565 extended test case
User clarified end-of-session: mapper is a thin enum-and-shape
translation; when residuals remain after closing mapper coverage
gaps, the gap is in the **calculator cascade**. This unlocks an
Elmhurst-only fixture path that doesn't need API JSON at all.

The fixture shape mirrors the 6 historical Elmhurst U985 fixtures
(000474, 000477, 000480, 000487, 000490, 000516) at
`domain/sap10_calculator/worksheet/tests/_elmhurst_worksheet_NNNNNN.py`
+ `test_e2e_elmhurst_sap_score.py`:

  build_epc() → cert_to_inputs → calculate_sap_from_inputs
  ↳ every SapResult field pinned at abs=1e-4 against U985 line refs

Any failing pin is definitionally a calculator bug. The user generates
certs in Elmhurst SAP and exports Summary + worksheet ZIPs — no gov.uk
EPB lodgement required.

Extended test case (000565) ready at `sap worksheets/extended test case/`:
- Summary_000565.pdf (input)
- U985-0001-000565.pdf (worksheet ground-truth)

Cert 000565 is a wacky stress-test that exercises 3-4 zero-coverage
cascade paths in one cert: Main + 4 extensions, age mix A through J,
RR on every part with mixed ages, conservatory with fixed heaters,
curtain-wall Ext2 post-2023, mixed wall types (solid brick + stone +
curtain wall), mixed party walls (CU + CF + Unable to determine).

After this cert lands, the user has agreed to generate single-feature
certs (oil only, LPG only, solid fuel only, electric direct only,
multi-main-heating, basement) to surface single-cause calculator gaps.

Handover doc now has implementation outline (mirror
_elmhurst_worksheet_000474.py shape) and a coverage-paths table
showing which targets each fuel-type/config exercises.
2026-05-28 21:03:23 +00:00
Khalim Conn-Kowlessar
88bf1ef472 docs: handover after S0380.47..S0380.51 — golden coverage state
Captures the per-cert validation state at HEAD b7fbbcca:

- 5 slices shipped this session: cost cascade β-split (.47), schema
  gap closure for real-API battery_capacity (.48), Table 12e
  effective-monthly PE factor for PV (.49), §4 seasonal HW for PV β
  cascade (.50), UnmappedApiCode strict-raise pattern on API mapper
  (.51).
- 769 pass + 0 fail across the full baseline; pyright net-zero on
  every touched file.

Crucial finding for the next agent: cohort-2 (38 certs) is chain-
tested at 1e-4 SAP vs worksheet but NOT in test_golden_fixtures.py
— PE/CO2 cascades have NO regression guard. Probed at HEAD:
14/38 cohort-2 certs have non-trivial PE residuals invisible to any
current test, including cert 2102 at +20.4 PE / -0.79 CO2 (single
worst undetected residual in the cohort).

Agreed next slice: add all 38 cohort-2 certs to
test_golden_fixtures.py with current PE/CO2 pinned. Surfaces cert
2102 as the next closure target (worksheet exists under
`sap worksheets/`) and creates PE/CO2 regression guards across the
worksheet-backed cohort.

Open threads ranked by tractability:
- Cert 2102 +20.4 PE — worksheet exists, well-scoped
- PV (233a)+(233b) monthly mystery — documented memory entry; ~0.5
  kWh/m² across ASHP cohort
- _api_glazing_transmission strict-raise extension — mechanical
- 8 open-front golden certs (oil + RR) at high residuals — blocked
  on worksheets

Fuel-type diversity guidance: heating system breakdown across all
60+ fixtures shows 34 gas, 20 ASHP, 2 oil (both open-front no
worksheets), 0 solid fuel, 0 LPG, 0 electric direct. Closure on
oil + solid fuel + LPG + electric blocked on worksheet availability
— the gov.uk EPB downloads UI returns API JSON only; dr87 worksheets
come from the assessor's tool (typically Elmhurst SAP) export ZIP.

Handover doc at docs/HANDOVER_GOLDEN_COVERAGE.md.
2026-05-28 20:55:17 +00:00
Khalim Conn-Kowlessar
33edff136a docs: PV β-split phase COMPLETE handover (6/6 slices)
Finalises the handover doc after S0380.49 ships the effective-monthly
Table 12e PE factor for the PV split. Full cohort residual trajectory
table across all four milestones (pre-44 / post-45 / post-48 /
post-49), final cross-cascade architecture diagram, and the punch-list
of open work (β fine-tuning, HP electricity demand, monthly E_PV
distribution) — none in the β-split phase scope, each a candidate
follow-up slice.

Cluster PE residual closed by ~50% magnitude over the phase:
-7..-14 → -2.8..-3.7 kWh/m². CO2 all <0.11 t/yr; SAP all exact.
2026-05-28 19:28:34 +00:00
Khalim Conn-Kowlessar
6788c99087 docs: refresh HANDOVER_PV_BETA_SPLIT after S0380.44..S0380.48 (5/6 shipped)
Updates the PV β-split handover doc after the three new slices land:
- S0380.47 cost cascade wiring (zero cohort impact via Table 32 collapse)
- S0380.48 real-API battery_capacity schema gap (cohort PE +2.7..+8.1
  → -3.5..-4.5)
- Restates the open slice (S0380.49) as wiring effective-monthly
  Table 12e PE factor into the PV cascade — the remaining ~4 kWh/m²
  PE delta is structural (currently uses annual factors instead of
  monthly-weighted).

Key narrative correction: the prior handover's "E_PV magnitude bug"
hypothesis ("cascade thinks 2570 kWh/yr vs worksheet 831") was wrong.
Reading the cert 0380 worksheet PDF directly (dr87-0001-000899.pdf
page 3 line 233) shows -2563.3692 kWh/yr — matching our cascade
exactly. The real bug was the schema dropping flat-shape
battery_capacity, fixed in S0380.48. Lesson captured in the doc:
verify handover-cited numerics against the source PDF before
implementing the prescribed fix (same discipline as spec-floor
skepticism applied to handover claims).

Includes the full PE residual cohort table across all three milestones
(pre-44 / post-45 / post-48) and the Slice 6 implementation outline.
2026-05-28 19:20:27 +00:00
Khalim Conn-Kowlessar
cbc6d5dbc8 docs: refresh NEXT_AGENT_PROMPT for PV β-split slices 4-6
Replaces stale legacy content (cert-mapper-validation workflow, dated
to a 9-triple staging slice) with the current handoff: branch state,
3 shipped slices (S0380.44 → S0380.46), and concrete directives for
the 3 remaining slices (cost cascade wiring, E_PV magnitude audit,
final fixture re-pin).

Companion to docs/HANDOVER_PV_BETA_SPLIT.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 18:47:08 +00:00
Khalim Conn-Kowlessar
beb0db9522 docs: handover after S0380.44..S0380.46 — PV β-split 3/6 wiring slices shipped
Documents progress on the SAP 10.2 Appendix M1 β-factor split for the
PE / CO2 / cost cascades + golden-fixture residual closure.

Shipped:
  - Slice 1 (S0380.44): pure β-factor calculator module + 13 unit tests
  - Slice 2 (S0380.45): wire β into PE cascade
  - Slice 3 (S0380.46): wire β into CO2 cascade

Cert 9501 (PV no battery): PE Δ -8.28 → +0.25, CO2 Δ +0.20 → -0.05 —
clean spec validation. The 7-cert ASHP+battery cohort overshoots PE
by +2.7..+8.1 because the cascade's E_PV is ~3× the worksheet's
value (cert 0380 cascade 2570 kWh vs worksheet 831 kWh). E_PV
magnitude audit deferred to Slice 5.

Open:
  - Slice 4 (S0380.47, next): wire β into cost cascade
  - Slice 5 (S0380.48): E_PV magnitude audit
  - Slice 6 (S0380.49): re-pin fixtures + verify chain tests <1e-4

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 18:45:00 +00:00
Khalim Conn-Kowlessar
29c4b029e3 docs: handover after S0380.39..S0380.43 — cohort-2 API path 38/38 closed
Session shipped 5 slices that closed the entire cohort-2 API-path
cluster (S0380.39 bulk-fetch, S0380.40 parametrized test, S0380.41
RdSAP 21 → SAP 10.2 glazing alias, S0380.42 Decimal HALF_UP per-window
areas, S0380.43 SAP 631 → spec fuel).

Documents:
  - Cross-mapper parity at cascade established for all 38 cohort-2
    certs (and 9 cohort-1 ASHP); both paths < 1e-4 vs worksheet.
  - Tolerance tightening deferred — 1e-4 is the realistic floor at
    HEAD (worst residual 4.91e-5 on cert 2102).
  - Lessons learned: GOV.UK RdSAP 21 enum != cascade enum (codes
    needing remap are incremental as fixtures surface them);
    Decimal HALF_UP per-window areas extends the S0380.34/35
    pattern; SAP heating-type → spec fuel dispatch is the new
    forcing-function pattern for cert-lodgement inconsistencies.
  - Open front: golden-residuals → ~0 on PE/CO2. ASHP cluster
    (-7..-15 kWh/m² PE / +0.16..+0.28 t/yr CO2 across 7 certs with
    the same PCDB heat pump) is the highest-value single thread —
    likely SAP 10.2 Appendix L1 / Table 12 PE-factor or CO2-factor
    cascade gap. Three concrete diagnostic probes proposed.

Test baseline at HEAD: 750 pass + 0 fail.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 17:22:55 +00:00
Khalim Conn-Kowlessar
f992824824 docs: handover after S0380.31..S0380.38 — cohort-2 Summary path COMPLETE, thread 4 next
State at HEAD 883d66ac:
  * Cohort-2 Summary path: 38/38 < 1e-4 (was 33 exact + 5 <=0.07)
  * Cohort-1 ASHP: 9/9 < 1e-4 both paths (was 8/9 with cert 2636 at -0.015)
  * Test suite: 712 pass + 0 fails (was 710 + 10 at handover start)
  * _ASHP_COHORT_CHAIN_TOLERANCE: 0.04 -> 1e-4

Eight slices shipped:
  S0380.31: alt-wall window deduction from (31) per SAP 10.2 K2
            -> cert 2636 cantilever -0.015 -> -2.4e-6 both paths
  S0380.32: bare "Extension" window routing per RdSAP10 §3
            -> cert 9380 +0.027 -> -4.8e-6
  S0380.33: PV kWp 2 d.p. per RdSAP10 §15
            -> cert 6835 +0.015 -> -4.3e-5
  S0380.34: living area Decimal HALF_UP per RdSAP10 §15
            -> cert 2536 +0.0007 -> -9e-8
  S0380.35: gross-wall / party-wall Decimal HALF_UP per RdSAP10 §15
            -> certs 2800 / 4800 +0.0007 -> <3e-5
  S0380.36: tighten _ASHP_COHORT_CHAIN_TOLERANCE 0.04 -> 1e-4
  S0380.37: drop redundant cert 001479 hand-built fixture
  S0380.38: loosen FEE round-trip tolerance 1e-9 -> 1e-6

Pattern emerged: three slices (S0380.33/34/35) closed the same class of
bug -- RdSAP10 §15 "2 d.p." float-arithmetic boundary failures fixed by
Decimal HALF_UP. Documented in the handover as the most likely root cause
for any future +0.0007-ish residual.

User-stated next phase (thread 4): cohort-2 API-path closure via cross-
mapper parity, in bigger slices, with golden-residuals driven toward
zero. Concrete slice plan in the handover doc.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 16:34:36 +00:00
Khalim Conn-Kowlessar
453a9216fb docs: handover after S0380.26-30 precision-floor closure
Documents the 5-slice session that closed the prior handover's
"precision floor" cluster end-to-end:

  S0380.26  RdSAP10 §5.8 dry-lining adjustment (cert 7700)
  S0380.27  floor_construction_type → _main_floor_u_value (cert 9796)
  S0380.28  SAP 10.2 Appendix N fn 43 reciprocal η interpolation
            (closes the +0.03..+0.06 ASHP cluster cohort-wide)
  S0380.29  _ASHP_COHORT_CHAIN_TOLERANCE 0.07 → 0.04
  S0380.30  glazing codes 8-15 (RdSAP 21 schema) — closes API path
            cohort-1 +0.014..+0.031 cluster

Final state:
  Cohort-2 Summary path (38): 33 exact + 5 ≤0.07
  Cohort-1 ASHP cohort (7): 6/7 <1e-4 both Summary + API paths
  cert 2636 -0.015 (cantilever, path-symmetric) — only open thread

The prior `HANDOVER_CERT_0380_MIT_CASCADE.md` had concluded the
+0.04 ASHP cluster was unfixable without Elmhurst access; the
spec citation (SAP 10.2 Appendix N fn 43) was sitting in the same
PDF that handover referenced. Be skeptical of "spec-precision
floor" framing — see [[feedback-spec-floor-skepticism]].

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 12:55:45 +00:00
Khalim Conn-Kowlessar
73fedc0ecd docs: handover for cohort-2 closure + precision-floor next steps
Captures 5 slices shipped this session (S0380.21..25):
  - Table 3a rows 1+4 + PCDB keep-hot dispatch
  - Per-BP roof exposure (Ext1 flat roof on flats)
  - RdSAP §11.1 b) % of roof area PV synthesis
  - SAP code 631 → house coal secondary fuel
  - SAP codes 2111/2113 → control type 2

Cohort-2 outcome: 22/38 exact (<1e-4), max residual ±0.55 SAP,
0 RAISES, 0 big-gaps. All structural cascade gaps closed.

Open threads diagnosed in detail:
  1. Cert 7700 -0.44 SAP — wall U code conflict
     (_WALL_INSULATION_NONE=4 vs Elmhurst "As Built"=4). Wider than
     a single slice; needs regression testing.
  2. Cert 9796 +0.55 SAP — MIT precision floor (Mid-Terrace
     bungalow + HP, +0.06°C across all months). Same mechanism as
     cohort-1 HP-COP residuals.
  3. API-path closure for all 38 certs (deferred).
  4. Tighten cohort-1 chain tests to 1e-4 once thread 2 closes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 10:33:17 +00:00
Khalim Conn-Kowlessar
a9faaddc1d docs: handover for Table 3a no-keep-hot continuation + SAP 10 spec PDFs
Adds the next-agent handover and the BRE technical papers referenced
by the cohort-2 negative-band investigation:

  - `HANDOVER_TABLE_3A_NO_KEEP_HOT.md` — picks up from Slice S0380.20.
    Covers cohort distribution at HEAD `4879e8c3`, the verified
    Table 3a Row 1 spec formula `(61)m = 600 × fu × nm / 365`, the
    dispatch recipe for `pcdb_combi_loss_override`, watch-outs (cert
    0360 / cohort-1 cert 000490 behaviour after the slice lands), the
    diagnostic probe script, test baselines, and the open-thread
    priority list (Ext1 roof, HP-COP, big-gap 2102, API path, parity).

  - `specs/STP09-B04_Combi_boiler_tests.pdf` — 2009 BRE methodology
    paper (Alan Shiret, BRE) defining the combi-loss test programme
    that produced the SAP Table 3a 600/900 kWh/yr keep-hot assumptions.
    Source: https://bregroup.com/documents/d/bre-group/stp09-b04_combi
    _boiler_tests.

  - `specs/sap10 technical papers/S10TP-{02..13}.pdf` — full SAP 10
    supporting technical paper set (Issue 1.2 / 1.3 / 1.4 across the
    eight papers). S10TP-12 §9.4 confirms: "No changes to the SEDBUK
    calculation method for water heating efficiency were considered
    necessary" — so the STP09-B04 (SAP 2009) Table 3a methodology
    carries through to SAP 10 unchanged.

These docs replace web-fetched references with locally-tracked copies
so the slice S0380.21 implementor can grep / pdftotext them directly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 08:29:12 +00:00
Khalim Conn-Kowlessar
92fc4f4f16 docs: handover — Summary + API cohort expansion to 38 additional certs
Hands off the next workstream: the 38 cert subdirs at
`sap worksheets/additional with api 2/`. Each subdir is named after
the 20-digit EPC cert reference and contains a Summary PDF + dr87
worksheet PDF. API JSONs are NOT in the dataset but ARE fetchable
via the existing `EpcClientService` (token in `backend/.env` as
`OPEN_EPC_API_TOKEN`).

User's stated ordering: Elmhurst Summary mapping FIRST, API path
SECOND. Folder names = cert refs; need to verify the matching before
bulk-pinning (any mis-filed PDF would silently invalidate slice
work).

Handover ships with verified dataset and first-attempt baselines:

  - Folder-vs-cert sweep: **38/38 match** at handover (postcode
    parity check between Summary PDF and Open EPC API).
  - First-attempt Summary-path probe across 38 certs:
      24  closed at ±0.07 (first-try, zero new slices needed)
       9 ~ small gap (<1 SAP) — likely 1 slice each
       3 ✗ big gap (>1 SAP) — multi-slice investigation
       2 RAISES UnmappedElmhurstLabel: cylinder_size='Normal'

The two `Normal` cylinder raises are the immediate Phase 1 slice —
Slice S0380.15's strict-enum pattern paid off on its first new
cohort by surfacing the gap at extraction time instead of as a
downstream SAP delta.

Workstream phases documented in the handover:

  Phase 0: folder-vs-cert sweep (already done — 38/38)
  Phase 1: fix 'Normal' cylinder unmapped-label raise
  Phase 2: bulk-pin the 24 first-try-closures as chain tests
  Phase 3: close the 9 small-gap certs one slice each
  Phase 4: investigate the 3 big-gap certs (likely HP-routing)
  Phase 5: fetch + persist API JSON for all 38, run API path tests
  Phase 6: cross-mapper EPC parity (Summary EPC ≡ API EPC) — the
    user's stated north-star

Includes:
  - Paste-able diagnostic probe scripts (Summary path + folder-vs-
    cert sweep + .env loader + EpcClientService usage example).
  - Full table of first-attempt deltas per cert with classifications.
  - All 15 prior-session slice commits indexed.
  - Memory references to the slicing / methodology conventions.
  - Per-cert diagnostic recipe template.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 22:22:13 +00:00
Khalim Conn-Kowlessar
c90853428c docs: handover — start cert 0380 Summary → EPC → calculator path
The 7-cert ASHP cohort API path is closed at the spec-precision
floor (this session). Next workstream is the Summary path for cert
0380 — the user's preferred starting point because the Summary +
worksheet PDFs surface labelled intermediate values that the API
path lacks.

Cert 0380 Summary PDF (`Summary_000899.pdf`) is already in the
test fixtures dir; just needs a path constant + RED chain test.
Previous handover flagged the extractor at Δ -58.37 SAP for HPs
— the immediate diagnostic is whether the mapper surfaces
main_heating_category=4 and main_heating_index_number=104568.

The handover also documents the user's "Elmhurst-specific"
challenge worth re-exploring: closed boiler certs hit 1e-4 vs
Elmhurst via the same cascade, so the residual is precisely at the
Appendix N3.6 PSR interpolation step. Cross-check with the BRE
xlsx canonical calculator is suggested.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 17:23:10 +00:00
Khalim Conn-Kowlessar
38a5f906bc docs: handover refresh — cohort closed to spec-precision floor
Updates the handover with the final state after 11 slices:
- All 7 ASHP cohort certs cascade SAP integer == lodged (residual 0).
- Continuous SAP residual clusters within +0.030..+0.060.
- BRE web confirmed max_output_kw values (4.39 / 3.933) match cascade
  exactly — the remaining drift is NOT a max_output bug.
- Cascade (39) annual avg HLC EXACTLY matches worksheet (39) at 4 dp
  for cert 0380 and 2225 — HLC is NOT the bug either.
- Implied drift is ~0.15% in η_space interpolation precision, likely
  in Elmhurst's internal rounding convention (not in public SAP 10.2
  spec or BRE PCDB).

Recommends Path A (ship Layer 4 chain tests at ±0.07 SAP tolerance)
as the spec-precision floor. Path B (close to 1e-4) requires Elmhurst
implementation access that's outside public docs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 17:03:09 +00:00
Khalim Conn-Kowlessar
a62c26758e docs: handover update — slices 102f-prep.1-8 shipped, cohort analysis
Refreshes the handover with the full session's work:
- All 7 ASHP cohort certs' MIT cascade matches worksheet (92) at 1e-3.
- 6/7 cohort SAP residuals cluster at +0.03..+0.06 vs worksheet.
- Identified PSR-formula drift root cause: max_output_kw ≈ 4.40 kW
  back-solved from 3 certs' worksheet η_space pins, vs the 4.39 lodged
  at PCDB position 47 (likely a field-position misread; needs BRE web
  cross-check for PCDB 104568 / 102421).
- Identified cert 2636's +0.49 outlier as missing cantilever Exposed
  floor (3.74 m² = upper-floor 42.92 − ground-floor 39.18 area diff).

Recommends Path A (resolve max_output + cantilever to land 1e-4) or
Path B (widen Layer 4 tolerance to 0.1 with documented limitations).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 16:06:20 +00:00
Khalim Conn-Kowlessar
143d11d39f docs: handover — cert 0380 §N3.5 MIT cascade shipped (102f-prep.1-6)
Session shipped 6 slices closing cert 0380's SAP residual from
+0.5999 → +0.0594 vs worksheet 88.5104. The MIT cascade now matches
worksheet line (92) at 1e-3 per month and is spec-faithful through
SAP 10.2 Appendix N3.5 + Equation N5. Remaining residual is a
single PSR-formula divergence (cascade PSR 1.4266 per spec vs
worksheet-implied 1.4321, ~0.4%) that propagates to η_space at 0.2%
and ~0.045 SAP. Three candidate root causes documented; investigation
deferred to next session as the blocker for slice 102f's Layer 4
1e-4 chain test.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 14:15:51 +00:00
Khalim Conn-Kowlessar
7237bc25b0 docs: handover — cert 0380 HW cascade (slices 102a-e shipped, MIT residual deferred to next session) 2026-05-27 12:42:44 +00:00
Khalim Conn-Kowlessar
2b2953c46d docs: update handover — cert 0380 API path Δ -18.37 → +2.92 SAP
Cert 0380 (semi-detached bungalow ASHP) was the prior handover's
"defer until HP go-ahead" pilot. Three slices this session closed
the dwelling-shape part of the gap:

- 101a: glazing_type=14 → DG/TG post-2022 (windows HLC exact)
- 101b: cavity wall + filled cavity + external insulation
  (composite U via Table 14 R_ins + 2 d.p. round; walls HLC exact)
  + Table 11 cat-4 secondary fraction = 0
- 101c: Table 4f cat-4 pumps/fans kWh = 0

(37) total fabric heat loss is now EXACT vs worksheet 96.0889.

Remaining gap (Δ +2.92 SAP) is dominated by the hot water cascade:
the cert lodges a 160 L cylinder (storage loss + primary loss) and
the HW HP COP is model-specific (PCDB index 104568 → 1.711 per
worksheet, not the Table 4a generic 2.3 our cascade uses). Both
require new cascade work — HP HW-specific COP from PCDB plus
cylinder storage/primary loss application.

Cert 0380's HW work will benefit all 6 sibling ASHPs sharing PCDB
idx 104568 (and partially the 102421 outlier).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 22:46:30 +00:00