Domain packs
A pack is a domain library for CFDL: it ships contract templates, validations, and industry metrics so a model declares business terms (rent, PPA price, CPR) instead of hand-building every stream. Every pack is gated by a benchmark suite checked against independent reference models.
What a pack gives you
- Contract templates — declare
contract cre.lease { ... }with the pack's term vocabulary; the compiler lowers it to fully-specified streams. - Validations — missing or inconsistent terms fail at compile time with precise diagnostics, not at run time.
- Domain metrics — each pack declares its own metric set (e.g. DSCR, NOI, collections multiple, exit proceeds) computed alongside the core total, NPV, IRR, payback and WAL metrics.
The four packs
| Pack | Domain | Guide |
|---|---|---|
energy | Renewables & project finance: PPA/merchant revenue, storage, ITC/PTC, MACRS, debt service | Energy pack guide |
cre | Commercial real estate, lease by lease: rollover, recoveries, and an exit on a stated basis | CRE pack guide |
credit | Loan pools: CPR/CDR, severity, recovery lag, floaters off rate curves, purchase pricing | Credit pack guide |
opco | Operating businesses / LBO: working capital, capex, term debt, cash taxes, trailing-EBITDA exit | OpCo pack guide |
Using a pack
version 0.1
model "office_deal"
use pack "cre" version "0.1.0"
time calendar monthly from 2026-01 for 120
entity asset property : CRE.Asset.RealProperty
contract cre.lease on entity asset.property {
term 2026-01..2035-12
terms {
rent = 25000
}
}The four packs are built into the CLI, so this compiles with no flag;
--packs <dir> is optional and names another packs directory. Pass
--pack cre at run time to compute the pack's domain metrics; that step
reads the pack's metric declarations from a packs directory, so it still
needs one, a local packs/ or --packs <dir>.