adl.loandesk · ADL 0.5.1 Loan Desk
No closing with an open condition. No approval over an unreviewed AI draft.
Mortgage underwriting where AI summarizes borrower documents with reported confidence and drafts conditions with their rationale, processors verify pages, underwriters decide which conditions stand and clear them only against verified documents, managers log justified waivers, nothing closes with an open condition or without a verified appraisal, and every decline states its adverse-action reasons.
borrower → loan (submitted → processing → underwriting → approved → clear_to_close → closed | declined [adverseReasons] | suspended [30d nightly withdraw] → withdrawn) · document (AI summary + confidence → processor verify | reject) · loancondition (AI/UW draft → accept [open] | discard [note] → clear [verified document] | manager waive [note])
Why Loan Desk Exists
Mortgage lenders, credit unions, and loan servicers spend hours per file reading uploaded paystubs, W-2s, tax returns, bank statements, appraisals, and insurance binders, then translating discrepancies into underwriting stipulations. Document-reading and condition-drafting models can cut that manual triage dramatically — yet chief credit officers, investor quality-control teams, and fair-lending examiners all ask the same first question: where can the model act on a borrower alone?
In Loan Desk, the answer enforced by the Kalos server is nowhere:
- AI summarizes documents and proposes draft conditions; signed-in staff decide: Every uploaded
documentcarries a dashedaiSummaryandaiConfidencescore inreceiveduntil a processor or underwriter explicitly verifies it or rejects it with areviewNote. Every AI-proposedloanconditionenters indraftalongside itsrationale, andreviewAiDraftsBeforeDecidingblocksloan.approveuntil an underwriter or manager accepts or discards every draft. - Every exception, waiver, suspension, and decline is explained in writing: Discarding an AI draft requires a
note, waiving an open condition is restricted to[manager]and requires anote, suspending a file requires asuspenseNote, and declining a borrower requires ECOAadverseReasonscaptured permanently in the loan’s history. - Verified evidence from submission to the closing table: Processors cannot hand a file to themselves to underwrite (
underwriterIsNotTheProcessor). Approval requires verified credit and income plusdti <= 50andltv <= 97. Clearing an open condition requires citing averifieddocument (clearAgainstAVerifiedDocument),clearToCloserequires zero open/draft conditions and a verifiedappraisal, and onceclear_to_closeis reached the condition list locks (noNewConditionsAfterClearToClose).
The entire application — 4 audited resources, 5 RBAC roles, 3 coordinated state machines, 9 cross-resource AEL rules, 3 declarative operational views, a nightly stale-suspension withdrawal schedule, and readable loan-and-condition history timelines — runs from a single ADL 0.5.1 suite (adl.loandesk) on Kalos and PostgreSQL.
Inside the 24-Loan Demonstration Pipeline
Every transition in seeds/seed.yaml (generated deterministically by seeds/gen_seed.py) executes under privileges: user as the actual role-scoped staff account (processor1, processor2, uw1, uw2, manager1, or closer1) rather than an administrative shortcut. All borrowers, employers, and 555-range phone numbers are fictional, with zero tax IDs or account numbers stored across 24 loans (LD-24100–LD-24123), 126 AI-summarized documents, and 88 underwriting conditions spanning Conventional, FHA, VA, and Jumbo programs:
- 6 Closed & 3 Clear-to-Close Loans (
LD-24100–LD-24108): Complete files demonstrating verified income/credit/appraisal chains, cleared AI and manual VOE conditions, and 3 manager waivers (LD-24100,LD-24103,LD-24106) wheremanager1waived the$8,400October deposit condition after documenting an IRS tax refund under program thresholds. PackagesLD-24106–LD-24108sit ready oncloser1’s bench. - 7 Discarded AI Misreads & 5 Rejected Bank Statements: On odd-numbered files (such as
LD-24101,LD-24103,LD-24105, andLD-24109), the AI drafted a self-employment condition because the paystub and W-2 showed different company names; underwriters discarded all seven in writing (“Same employer: it was renamed after an acquisition.”). Across five files (includingLD-24100,LD-24105, andLD-24110), processors rejected incomplete 71%-confidence bank statements missing pages 3–4 before accepting full replacements. - 4 Approved Files With Open Conditions & 3 Live AI-Draft Queues (
LD-24109–LD-24115):LD-24109–LD-24112sit inapprovedwaiting for verified clearing documents (try clearingLD-24110against its rejected bank statement to triggerclearAgainstAVerifiedDocument), whileLD-24113–LD-24115sit inunderwritingwith 11 unreviewed AI drafts blocking approval (reviewAiDraftsBeforeDeciding). - 3 ECOA Declines, 2 Suspensions, Withdrawal & Intake (
LD-24116–LD-24123):LD-24116–LD-24118record specific adverse-action reasons for credit delinquency, 54.8% DTI, and low collateral appraisal;LD-24119andLD-24120sitsuspendedawaiting written VOEs;LD-24121waswithdrawn;LD-24122is inprocessingwith 3 unverified uploads; andLD-24123is newlysubmitted.
How ADL Enforces Underwriting & Fair-Lending Governance
When an investor auditor, credit-risk committee, or regulator inspects a loan file, five declarative mechanisms in backend/domain.yaml guarantee that every invariant held at the API boundary:
- Mandatory human triage over AI drafts (
reviewAiDraftsBeforeDeciding&aiDraftReview): AI-originatedloanconditionrows enter indraft. Queryinglen(query('loancondition', { loan: $record.id, status: 'draft' })) > 0onloan.approvemakes it impossible to approve a loan while any AI proposal is unreviewed, whilediscardcapturesnoteinto both history andaiDraftReview. - Verified baseline documents & hard ratio caps (
approvalNeedsVerifiedIncomeAndCredit,debtToIncomeCap,loanToValueCap): Even after drafts are reviewed,loan.approveverifies via AELquery()that averifiedcredit_reportand at least oneverifiedincome document (paystub,w2, ortax_return) exist on the loan, and rejects files with$record.dti > 50or$record.ltv > 97. - Origination separation of duties (
underwriterIsNotTheProcessor): OnsubmitToUnderwriting, Kalos checks$record.underwriter == $record.processorand rejects self-assigned underwriting (422 "Assign a different underwriter."), which is why the seed pairsprocessor1/uw1andprocessor2/uw2across distinct accounts. - Evidence-linked condition clearing & locked closing packages (
clearAgainstAVerifiedDocument,noClosingWithOpenConditions,clearToCloseNeedsAppraisal,noNewConditionsAfterClearToClose):loancondition.clearrequires adocumentreference whose status isverified;loancondition.waiverestrictsguardsto[manager]with a requirednote;clearToCloseblocks on anyopenordraftcondition or missing verifiedappraisal; andloancondition.createrejects new conditions once a loan reachesclear_to_closeorclosed. - Non-punitive timers & ECOA adverse-action auditability (
withdrawStaleSuspensions&history): Declining a loan requiresadverseReasons(Declined: {adverseReasons}), whereas the daily02:30schedule transitions loans leftsuspendedfor more than 30 days towithdrawn— ensuring an automated timer never issues an adverse credit determination against a borrower.
Zero Sign-Up · Live Kalos Sessions
Sit at a Bench and Try It Live
Each card below signs directly into a real role-scoped JWT session on the production Kalos backend so you can test role queues, transitions, and server refusals immediately.
processor as processor1 Loan Processor · Desk 1
Assign submitted Jumbo application LD-24123, verify or reject missing-page uploads on LD-24122, route clean files to a different underwriter (testing underwriterIsNotTheProcessor), and upload supporting documents for open conditions.
Launch processor1 bench ↗underwriter as uw1 Underwriter · Desk 1
Review AI-drafted conditions on LD-24114, test why approving over unreviewed drafts or clearing LD-24110 against a rejected bank statement returns HTTP 422, add manual conditions, or issue decisions with mandatory ECOA adverse-action reasons.
Launch uw1 bench ↗manager as manager1 Underwriting Manager
Audit every AI-drafted condition and human override in aiDraftReview, waive an open condition with a mandatory written justification recorded permanently in history, and oversee suspended and approved files.
Launch manager1 bench ↗closer as closer1 Loan Closer
Work the three locked clear-to-close packages (LD-24106, LD-24107, LD-24108) — knowing every condition is cleared or waived, the appraisal is verified, and late conditions are blocked — and record final closing.
Launch closer1 bench ↗Production Interface Walkthrough
Inside Loan Desk — Screen by Screen
Captured directly from the live Kalos deployment. Click any screenshot to inspect full resolution or jump straight to that screen in the running application.
Declarative Server Enforcement
What the Kalos Server Refuses — Whoever Asks
These invariants live in the ADL domain definition, not in client-side UI JavaScript. Every REST request is checked by Kalos before touching PostgreSQL, and any violation returns a structured error naming the rule.
| Attempted Operation | Enforced ADL Rule / Guard | Regulatory Alignment |
|---|---|---|
| Approve a loan while any AI-drafted condition is still unreviewed in draft | reviewAiDraftsBeforeDeciding | Human-in-the-loop credit underwriting |
| Approve a loan without both a verified credit report and a verified income document (paystub, W-2, or tax return) | approvalNeedsVerifiedIncomeAndCredit | Ability-to-Repay (ATR) verification |
| Approve a loan above a 50% debt-to-income ratio | debtToIncomeCap | Program DTI credit policy limit |
| Approve a loan above a 97% loan-to-value ratio | loanToValueCap | Collateral & LTV program cap |
| Submit a file to underwriting with the loan's own processor assigned as its underwriter | underwriterIsNotTheProcessor | Origination separation of duties |
| Mark a loan clear to close while any condition remains open or unreviewed in draft | noClosingWithOpenConditions | Complete pre-closing condition clearance |
| Mark a loan clear to close without a verified appraisal on file | clearToCloseNeedsAppraisal | Verified collateral valuation |
| Clear an open condition against an unverified or rejected borrower document | clearAgainstAVerifiedDocument | Document-backed condition evidence |
| Add a new underwriting condition after a loan is already clear to close or closed | noNewConditionsAfterClearToClose | Locked closing package integrity |
Domain Footprint
ADL Suite Inventory
Resources (4)
borrowerloandocumentloancondition RBAC Roles (5)
processorunderwritermanagercloseradmin Declarative Views (3)
pipelineopenConditionsaiDraftReview