Model/scripts/hyde/RESUME_AFTER_KHALIM.md
Jun-te Kim 6c0545a8ee Add resume prompt to finish portfolio-796 run after Khalim review 📝
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 19:58:53 +00:00

2.7 KiB

Resume prompt — finish the Hyde portfolio-796 property_overrides run (after Khalim review)

Paste the block below to continue. It tells the assistant to review the unknown-override decisions with me, verify them, confirm before writing, then run the remaining steps.


We paused the Hyde property-overrides bulk load to review the UNKNOWN classifications with Khalim. Pick it back up.

Context (already done):

  • Target is portfolio 796 in DevAssessmentModelDB (NOT 795 — 795 is empty).
  • Script: scripts/hyde/build_property_overrides.py. Pass 1 (classify) is DONE — the landlord_*_overrides ledger is populated; re-running classify is free (cache hits).
  • The 19 unresolved descriptions are documented in scripts/hyde/unknowns_review.md, with proposed values already written to overrides_edits.csv (gitignored).
  • Env (DB creds + OPENAI_API_KEY) is in /workspaces/home/github/Model/.env; load it with python-dotenv and set POSTGRES_DRIVER=psycopg2. Writes are idempotent upserts (unique on property_id, override_component, building_part) — safe to re-run, never duplicates.

Do this, in order:

  1. Ask me what Khalim decided for the unknowns. The one real judgement call is the flat-roof reading: Flat: As Built (1,172 rows) + Flat: Unknown (194) → which of Flat, no insulation (assumed) / Flat, insulated (assumed) / Flat, limited insulation (assumed). The construction_age_band bands (29,829 rows) are deterministic (band = first letter) — keep as-is unless I say otherwise. Confirm the other roof/wall proposals too.
  2. Update overrides_edits.csv (corrected_value column) to match Khalim's decisions.
  3. Run validate --edits overrides_edits.csv and fix anything it rejects.
  4. Show me the final edits + the planned write counts, and WAIT for my explicit go-ahead before any --apply. Do not write to the DB before I confirm.
  5. On my go-ahead:
    • apply-edits --edits overrides_edits.csv --portfolio-id 796 --apply (user corrections → ledger)
    • write --excel scripts/hyde/hyde_property_overrides.xlsx --portfolio-id 796 (DRY RUN — report unmatched org_refs + unresolved across all 31,773 first)
    • then the same write ... --apply
  6. verify --portfolio-id 796 --org-ref <a few org_refs> to confirm property_overrides + overlays landed.
  7. Remind me about the deferred age-classifier prompt-hint fix for the production lambda (the live frontend will hit the same "D: 1950-1966" → UNKNOWN until that lands).

Every DB command loads env from /workspaces/home/github/Model/.env. Read-only checks (verify, dry-run write) are fine to run unprompted; anything --apply needs my confirm.