Gap
The Python policyengine-uk model has 43 files under policyengine_uk/variables/gov/dwp/universal_credit/ covering the childcare element, work allowance, taper, capital limits, transitional protection, managed migration, housing element, standard allowance, child element, carer element, and limited-capability-for-work element.
The Rust port currently has one function: compute_universal_credit in src/variables/benefits.rs.
Why it matters
UC is the largest UK welfare programme by caseload and spend. Until UC is fully modelled, Rust outputs cannot be used for any policy analysis touching working-age means-tested support — which covers the majority of distributional/revenue work the team does (transitional protection alone moves billions in scoring). Every reform notebook in the wider PolicyEngine catalogue that touches UC will diverge from Python.
What to port
Source of truth (Python): policyengine_uk/variables/gov/dwp/universal_credit/
Subdirectories to mirror in Rust:
elements/ — standard allowance, child element, childcare element, housing element, carer element, LCWRA element
work_allowance.py, earnings/ — work allowance + taper logic
capital/ — £6k disregard, £16k cliff, tariff income
transitional_protection/ — managed-migration top-up calculation
entitlement/ — final UC amount, take-up adjustments
Effort
Large. Recommend landing alongside issue for the YAML test harness so each ported variable arrives with regression coverage cross-checked against Python.
References
- Python:
policyengine_uk/variables/gov/dwp/universal_credit/
- Rust:
src/variables/benefits.rs::compute_universal_credit
- Parameter tree:
policyengine_uk/parameters/gov/dwp/universal_credit/
Gap
The Python
policyengine-ukmodel has 43 files underpolicyengine_uk/variables/gov/dwp/universal_credit/covering the childcare element, work allowance, taper, capital limits, transitional protection, managed migration, housing element, standard allowance, child element, carer element, and limited-capability-for-work element.The Rust port currently has one function:
compute_universal_creditinsrc/variables/benefits.rs.Why it matters
UC is the largest UK welfare programme by caseload and spend. Until UC is fully modelled, Rust outputs cannot be used for any policy analysis touching working-age means-tested support — which covers the majority of distributional/revenue work the team does (transitional protection alone moves billions in scoring). Every reform notebook in the wider PolicyEngine catalogue that touches UC will diverge from Python.
What to port
Source of truth (Python):
policyengine_uk/variables/gov/dwp/universal_credit/Subdirectories to mirror in Rust:
elements/— standard allowance, child element, childcare element, housing element, carer element, LCWRA elementwork_allowance.py,earnings/— work allowance + taper logiccapital/— £6k disregard, £16k cliff, tariff incometransitional_protection/— managed-migration top-up calculationentitlement/— final UC amount, take-up adjustmentsEffort
Large. Recommend landing alongside issue for the YAML test harness so each ported variable arrives with regression coverage cross-checked against Python.
References
policyengine_uk/variables/gov/dwp/universal_credit/src/variables/benefits.rs::compute_universal_creditpolicyengine_uk/parameters/gov/dwp/universal_credit/