Every Lending Rule Lives in YAML

How policy files define what the decision engine enforces

Evaluation Pipeline
YAML Rule
Predicate Match
Stage Evaluation
Pass / Fail
Policy Layers
Dispatch
Routes loans to the correct policy set
Manifest
Declares stages and their execution order
Definitions
Reusable predicates and requirement blocks
Dispatch schemamarketplace/lc/engines/decision/schema/dispatch.py
Manifest schemamarketplace/lc/engines/decision/schema/manifest.py
Policy schemamarketplace/lc/engines/decision/schema/policy.py
Scope
Per-Company
Each company folder holds its own dispatch, manifests, and definitions
Examplemarketplace/lc/engines/decision/policies/

Three Layers Route Every Lending Decision

Each company folder holds a dispatch file, manifests, and shared definition files

ℹ️
Stages share definition files across manifests — most rules are written once
Source Files
Dispatch filemarketplace/lc/engines/decision/policies/AAA_FAKE_LENDER/dispatch.yaml
Routingmarketplace/lc/engines/decision/api.py
TOE manifestmarketplace/lc/engines/decision/policies/AAA_FAKE_LENDER/toe.yaml
FastTrack manifestmarketplace/lc/engines/decision/policies/AAA_FAKE_LENDER/fasttrack.yaml
Definitions foldermarketplace/lc/engines/decision/policies/AAA_FAKE_LENDER/definitions/

Each Stage Carries Its Own Policy

Each manifest stage links to a definition file and optional pricing

ℹ️
A loan must pass every stage in order — failure at any stage halts the pipeline
Source Files
Stage structmarketplace/lc/engines/decision/schema/manifest.py
StageEnummarketplace/lc/engines/decision/enums.py
Example manifestmarketplace/lc/engines/decision/policies/AAA_FAKE_LENDER/toe.yaml

Anatomy of a Requirement

Satisfy code + gate predicate + auto-satisfy logic + remediation strategy

satisfy_code
What to check
when
Gate predicate
satisfied_when
Auto-satisfy logic
strategies
Remediation action
Source Files
Structmarketplace/lc/engines/decision/schema/policy.py
Codesmarketplace/lc/engines/decision/enums.py
Examplepolicies/AAA_FAKE_LENDER/definitions/toe_application.yaml
Evalmarketplace/lc/engines/decision/eval/eval_req.py
Strategy schemamarketplace/lc/engines/decision/schema/strategy.py

Predicates Are the Building Blocks

Every when and satisfied_when expression is built from typed predicates

ℹ️
Every predicate returns tri-logic: True, False, or Unknown — missing data never causes a crash

Each Stage Has a Different Character

Complexity grows as the loan moves through the pipeline

Three Patterns for Extending Policy

Adding a new requirement, guarding against duplicates, and gating on borrower context

Policy YAML — Key Takeaways

The three layers that define every lending rule

Navigation

Keyboard Shortcuts

→ / Space
Next slide / reveal fragment
Previous slide / hide fragment
Home / End
First / last slide
F
Toggle fullscreen
?
Toggle this help
Esc
Close help
Comments