Guideline rules + conditions + evaluator, sharing the LLPA predicate engine (Phase-2 Slice 8)

Featurekamo-shared-library
Shipped
June 26, 2026 at 8:34 PM UTC
Author
Kamo
Commit
ae753fa

The guideline-rule predicate conjunct of §8.1 step-2. Critically, REUSES the reviewed Slice-4 condition evaluator instead of duplicating the safety-critical predicate logic. DRY refactor (non-regressive — evaluator bodies byte-identical): - PredicateCondition interface **************** - MlosAdjustmentCondition + MlosGuidelineRuleCondition both implement it. - AdjustmentConditionEvaluator generalized to PredicateCondition; adjustmentMatches -> allConditionsMatch (List<? extends PredicateCondition>). Slice-4 test re-runs green (9), both prior HIGH fixes intact. New: - MlosGuidelineRule (mlos_guideline_rule): guidelineVersionId FK, productId FK, ruleCode (unique per version), verdict (RuleVerdict ELIGIBLE/INELIGIBLE/STIPULATED §10.3 vocab), requirementKind **************** requirementValue, severity, sourceSectionRef, unconditioned flag. + MlosGuidelineRuleCondition (implements PredicateCondition). - GuidelineRuleEvaluator (ungated @Component) + GuidelineEvaluation + GuidelineOutcome: a rule fires when all its conditions hold (via the shared evaluator); INELIGIBLE iff any fired INELIGIBLE rule; stipulations collected. 8 GuidelineRuleEvaluatorTest green. Adversarially reviewed (2-agent): refactor confirmed byte-identical/non-regressive; fixed MEDIUM over-block hazard — a non-blanket rule with zero conditions now fails SAFE (does not fire) so a half-authored/dangling-FK INELIGIBLE rule can't silently block every borrower (mirrors value-set fail-closed); explicit `unconditioned` flag for intentional blanket rules. NO KamoInitializer code change.

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