Weitl Enterprises LLCWorld-changing Ideas…Enhanced
Commercial AI lending documentation

Policy-as-code for commercial lending

A credit committee may record a new threshold in a single line of meeting minutes. To implement it, an engineer needs to know which figures count, what happens at the cutoff, and who reviews an incomplete application.

With dual-format delivery, we write the policy and its machine-readable rule specification together. Your engineers can start testing against the agreed examples while credit and compliance review the wording.

One credit policy, three formats

Dual-format delivery pairs the policy people approve with the rule software applies. Here the machine-readable rule comes in two forms, a YAML configuration file and a Decision Model and Notation (DMN) table.

Follow one request. A business asks for $275,001 and passes every other check. The clause caps the agent’s authority at $275,000. YAML names that limit maxAmountUsd. In the table, row R07 sends the file to a senior credit officer and records AUTHORITY_LIMIT.

Illustrative commercial preapproval policy · EX-COM-4.2 · Version 1.0

Policy clauseFor credit committees, auditors, and bank partners

§ 4.2. Conditional preapproval and referral authority

The underwriting agent may issue a conditional preapproval up to $275,000. Apply the following instructions in order and record the first rule that determines the route.

  1. Resolve screening and data quality first. Pause the workflow on a possible or confirmed Office of Foreign Assets Control (OFAC) match and send the file to Compliance for a determination under the applicable program. Otherwise, return an incomplete screen, unverified file, or missing or invalid required input for verification.
  2. Apply the lender’s credit exclusions. Decline if the business has operated for fewer than 30 completed months, its industry is on the lender’s restricted list, or verified DSCR is below 1.18×. Check those conditions in that order.
  3. Refer exceptions to a senior credit officer. Refer if a remaining baseline credit or Know Your Business (KYB) check needs an exception, the request exceeds $275,000, DSCR is at least 1.18× and below 1.30×, or KYB confidence is below 88%. Use that order when several triggers apply.
  4. Issue conditional preapproval. The file must be verified, screening clear, the industry permitted, and all remaining baseline checks passed. The business must have at least 30 completed months of operations, DSCR of at least 1.30×, KYB confidence of at least 88%, and a positive request at or below $275,000. Return any unclassified file for verification.
YAML rule specificationFor the engineers configuring the workflow

The authority check in YAML

This excerpt shows the limit and the rule that uses it. In the complete file, engineering maps the lender’s fields to a single record named file. The KYB score runs from 0 to 1, so 0.88 means 88%. Compare verified figures at their supplied precision.

limits:
  maxAmountUsd: 275000
rules:
  - id: R07
    when:
      amount: '> limits.maxAmountUsd'
    action: SENIOR_REVIEW
    reason: AUTHORITY_LIMIT
Download the YAML specification
Read the complete YAML on this page
policy_id: "EX-COM-4.2"
version: "1.0"
effective_date: "2026-11-15"
owner: "Commercial Credit Committee (illustrative)"
use: illustrative
hit_policy: FIRST
input_record: file
# 'when' entries are FEEL unary tests keyed to the inputs below.
# An omitted input accepts any value. Retain the first matching row ID, action and reason.
limits:
  minMonths: 30
  declineDscr: 1.18
  standardDscr: 1.30
  minKyb: 0.88
  maxAmountUsd: 275000
# The client supplies a verified record and its restricted-industry classification.
inputs:
  screen: >-
    if file.screening instance of string then file.screening else null
  ready: >-
    if file.verified = true and file.screening = "clear"
    and file.businessMonths instance of number
    and file.restrictedIndustry instance of boolean
    and file.otherChecksPassed instance of boolean
    and file.dscr instance of number and file.kybConfidence instance of number
    and file.amountUsd instance of number
    then file.businessMonths >= 0 and floor(file.businessMonths) = file.businessMonths
    and file.kybConfidence >= 0 and file.kybConfidence <= 1 and file.amountUsd > 0
    else false
  months: >-
    if file.businessMonths instance of number then file.businessMonths else null
  restricted: >-
    if file.restrictedIndustry instance of boolean then file.restrictedIndustry else null
  baseline: >-
    if file.otherChecksPassed instance of boolean then file.otherChecksPassed else null
  dscr: >-
    if file.dscr instance of number then file.dscr else null
  kyb: >-
    if file.kybConfidence instance of number then file.kybConfidence else null
  amount: >-
    if file.amountUsd instance of number then file.amountUsd else null
rules:
  - id: R01
    when:
      screen: '"possible_match", "confirmed_match"'
    action: COMPLIANCE_HOLD
    reason: SANCTIONS_REVIEW
  - id: R02
    when:
      ready: 'false'
    action: VERIFY_FILE
    reason: UNVERIFIED_INPUTS
  - id: R03
    when:
      months: '< limits.minMonths'
    action: DECLINE
    reason: OPERATING_HISTORY
  - id: R04
    when:
      restricted: 'true'
    action: DECLINE
    reason: RESTRICTED_INDUSTRY
  - id: R05
    when:
      dscr: '< limits.declineDscr'
    action: DECLINE
    reason: LOW_COVERAGE
  - id: R06
    when:
      baseline: 'false'
    action: SENIOR_REVIEW
    reason: BASELINE_EXCEPTION
  - id: R07
    when:
      amount: '> limits.maxAmountUsd'
    action: SENIOR_REVIEW
    reason: AUTHORITY_LIMIT
  - id: R08
    when:
      dscr: '[limits.declineDscr..limits.standardDscr)'
    action: SENIOR_REVIEW
    reason: COVERAGE_BAND
  - id: R09
    when:
      kyb: '< limits.minKyb'
    action: SENIOR_REVIEW
    reason: KYB_CONFIDENCE
  - id: R10
    when:
      screen: '"clear"'
      ready: 'true'
      months: '>= limits.minMonths'
      restricted: 'false'
      baseline: 'true'
      dscr: '>= limits.standardDscr'
      kyb: '>= limits.minKyb'
      amount: '<= limits.maxAmountUsd'
    action: CONDITIONAL_PREAPPROVAL
    reason: STANDARD_ELIGIBILITY
  - id: R11
    when: {}
    action: VERIFY_FILE
    reason: UNCLASSIFIED_FILE
DMN decision tableFor compliance sign-off and rule-engine testing

Read down to the first match

Start at R01. The first matching row supplies the rule ID, action, and reason code. A dash accepts any value. Row R07 is highlighted for the $275,001 request. The coverage band includes 1.18× and stops just below 1.30×. The download uses DMN 1.3 and the same input record as the YAML.

Download the DMN decision table
Commercial preapproval · FIRST hit policy
RuleSanctions screenVerified fileMonths tradingRestricted industryOther checks passedDSCRKYB (0–1)Amount (USD)Workflow actionReason code
R01"possible_match", "confirmed_match"–––––––COMPLIANCE_HOLDSANCTIONS_REVIEW
R02–false––––––VERIFY_FILEUNVERIFIED_INPUTS
R03––< 30–––––DECLINEOPERATING_HISTORY
R04–––true––––DECLINERESTRICTED_INDUSTRY
R05–––––< 1.18––DECLINELOW_COVERAGE
R06––––false–––SENIOR_REVIEWBASELINE_EXCEPTION
R07–––––––> 275000SENIOR_REVIEWAUTHORITY_LIMIT
R08–––––[1.18..1.30)––SENIOR_REVIEWCOVERAGE_BAND
R09––––––< 0.88–SENIOR_REVIEWKYB_CONFIDENCE
R10"clear"true>= 30falsetrue>= 1.30>= 0.88<= 275000CONDITIONAL_PREAPPROVALSTANDARD_ELIGIBILITY
R11––––––––VERIFY_FILEUNCLASSIFIED_FILE

OFAC match guidance · Regulation B notice requirements

Three ways to scope the work

Foundation

For a board or sponsor bank review.

Editable Word policies and standard operating procedures, with PDFs for review. Each decision is written in if/then terms and identifies the approval authority, permitted exceptions, and records to retain for due diligence or examination.

Full implementation

For lenders deploying automated or multi-agent workflows at scale.

Builds on the PaC-ready package with executable controls in Rego for Open Policy Agent (OPA), or Python validation modules, plus tests for boundaries, missing data, and overrides. We agree with your engineers on integration, release approval, and rollback. We can deliver the technical work directly or with an agreed partner.

What goes in the rule register

One versioned register links each policy clause to its engineering specification and acceptance tests. A reviewer can look up the wording and threshold in force on a given date.

When a threshold changes, the revised policy, parameter file, and test cases go through review together. In an implementation project, the tested rules reach the live workflow through your release process.

Authority
Rule ID, source clause, owner, approval authority, and effective date.
Decision logic
Source field and units, comparison, cutoff, rule precedence, and treatment of missing or conflicting data.
Exceptions
Who receives a referral, who can override the rule, and which reasons and evidence to record.
Change history
Proposed change, expected test results, reviewer sign-off, and release version.
Production evidence
For implemented rules, the decision log ties a result to the input references, rule version, and any authorized override. A sponsor bank can follow a sample file back to the approved policy.

Start with one policy clause

Bring a clause your team is preparing to automate and tell us which system will use it. We’ll use that example to agree on the documents, rule files, tests, and release responsibilities to include in your proposal.

Discuss a policy project