Canonical scenario-fact spine — genesis deriver + factsJson populate + write-back + overlay matcher (D45)

Featurekamo-shared-library
Shipped
July 4, 2026 at 7:51 PM UTC
Author
Kamo
Commit
923f4e3

D1/D45 broadens BorrowerScenarioProfile consumption. Populates the dormant factsJson and makes it the shared source of truth for borrower/loan facts: - ScenarioFactKeys: single canonical fact-key vocabulary + tier (structural vs enrichment) + normalize(); the D21 whitelist/deriver/consumers reference these. - ScenarioFactDeriver: promotes the D18 LTV/CLTV/HCLTV + categorical derivation out of MLOSPricingService into shared-lib (one home for entity-derived facts). - BorrowerScenarioProfileService: produceFromUrla now populates structural facts (preserving enrichment); resolveFacts() for advisory gap-fill; mergeFacts() write-back that filters to the enrichment tier (genesis owns structural, D45.3). - ScenarioFacts.fillGapsFrom(): advisory merge (request wins, profile fills gaps). - InvestorOverlayMatcher: pure fail-safe matcher (present-and-violating only). No schema/KI change (factsJson column pre-exists). 27 targeted tests green.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing